diff options
Diffstat (limited to 'src')
179 files changed, 48334 insertions, 26683 deletions
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c index e0f81c61f..3a74f443d 100644 --- a/src/char/HPMchar.c +++ b/src/char/HPMchar.c @@ -36,6 +36,7 @@ #include "char/int_party.h" #include "char/int_pet.h" #include "char/int_quest.h" +#include "char/int_rodex.h" #include "char/int_storage.h" #include "char/loginif.h" #include "char/mapif.h" diff --git a/src/char/Makefile.in b/src/char/Makefile.in index fe40621fb..1a7d067a4 100644 --- a/src/char/Makefile.in +++ b/src/char/Makefile.in @@ -42,16 +42,16 @@ MT19937AR_H = $(MT19937AR_D)/mt19937ar.h CHAR_C = char.c HPMchar.c loginif.c mapif.c geoip.c inter.c int_auction.c int_elemental.c int_guild.c \ int_homun.c int_mail.c int_mercenary.c int_party.c int_pet.c \ - int_quest.c int_storage.c pincode.c + int_quest.c int_rodex.c int_storage.c pincode.c CHAR_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(CHAR_C))) CHAR_H = char.h HPMchar.h loginif.h mapif.h geoip.h inter.h int_auction.h int_elemental.h int_guild.h \ int_homun.h int_mail.h int_mercenary.h int_party.h int_pet.h \ - int_quest.h int_storage.h pincode.h + int_quest.h int_rodex.h int_storage.h pincode.h CHAR_PH = HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC) + CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC) else CHAR_SERVER_SQL_DEPENDS=needs_mysql endif @@ -110,8 +110,8 @@ char-server: ../../char-server@EXEEXT@ ../../char-server@EXEEXT@: $(CHAR_SERVER_SQL_DEPENDS) Makefile @echo " LD $(notdir $@)" - @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a \ - $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \ + $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ # missing object files $(COMMON_D)/obj_all/common.a: diff --git a/src/char/char.c b/src/char/char.c index 952c3d781..78b2d19fa 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -34,6 +34,7 @@ #include "char/int_party.h" #include "char/int_pet.h" #include "char/int_quest.h" +#include "char/int_rodex.h" #include "char/int_storage.h" #include "char/inter.h" #include "char/loginif.h" @@ -97,6 +98,8 @@ char auction_db[256] = "auction"; // Auctions System char friend_db[256] = "friends"; char hotkey_db[256] = "hotkey"; char quest_db[256] = "quest"; +char rodex_db[256] = "rodex_mail"; +char rodex_item_db[256] = "rodex_items"; char homunculus_db[256] = "homunculus"; char skill_homunculus_db[256] = "skill_homunculus"; char mercenary_db[256] = "mercenary"; @@ -287,8 +290,10 @@ void char_set_char_offline(int char_id, int account_id) } else { - struct mmo_charstatus* cp = (struct mmo_charstatus*)idb_get(chr->char_db_,char_id); + struct mmo_charstatus* cp = (struct mmo_charstatus*) idb_get(chr->char_db_,char_id); + inter_guild->CharOffline(char_id, cp?cp->guild_id:-1); + if (cp) idb_remove(chr->char_db_,char_id); @@ -428,7 +433,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) //map inventory data if( memcmp(p->inventory, cp->inventory, sizeof(p->inventory)) ) { - if (!chr->memitemdata_to_sql(p->inventory, MAX_INVENTORY, p->char_id, TABLE_INVENTORY)) + if (!chr->memitemdata_to_sql(p->inventory, p->char_id, TABLE_INVENTORY)) strcat(save_status, " inventory"); else errors++; @@ -436,20 +441,12 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) //map cart data if( memcmp(p->cart, cp->cart, sizeof(p->cart)) ) { - if (!chr->memitemdata_to_sql(p->cart, MAX_CART, p->char_id, TABLE_CART)) + if (!chr->memitemdata_to_sql(p->cart, p->char_id, TABLE_CART)) strcat(save_status, " cart"); else errors++; } - //map storage data - if( memcmp(p->storage.items, cp->storage.items, sizeof(p->storage.items)) ) { - if (!chr->memitemdata_to_sql(p->storage.items, MAX_STORAGE, p->account_id, TABLE_STORAGE)) - strcat(save_status, " storage"); - else - errors++; - } - if ( (p->base_exp != cp->base_exp) || (p->base_level != cp->base_level) || (p->job_level != cp->job_level) || (p->job_exp != cp->job_exp) || @@ -463,10 +460,10 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) (p->int_ != cp->int_) || (p->dex != cp->dex) || (p->luk != cp->luk) || (p->option != cp->option) || (p->party_id != cp->party_id) || (p->guild_id != cp->guild_id) || - (p->pet_id != cp->pet_id) || (p->weapon != cp->weapon) || (p->hom_id != cp->hom_id) || - (p->ele_id != cp->ele_id) || (p->shield != cp->shield) || (p->head_top != cp->head_top) || - (p->head_mid != cp->head_mid) || (p->head_bottom != cp->head_bottom) || (p->delete_date != cp->delete_date) || - (p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->robe != cp->robe) || + (p->pet_id != cp->pet_id) || (p->look.weapon != cp->look.weapon) || (p->hom_id != cp->hom_id) || + (p->ele_id != cp->ele_id) || (p->look.shield != cp->look.shield) || (p->look.head_top != cp->look.head_top) || + (p->look.head_mid != cp->look.head_mid) || (p->look.head_bottom != cp->look.head_bottom) || (p->delete_date != cp->delete_date) || + (p->rename != cp->rename) || (p->slotchange != cp->slotchange) || (p->look.robe != cp->look.robe) || (p->show_equip != cp->show_equip) || (p->allow_party != cp->allow_party) || (p->font != cp->font) || (p->uniqueitem_counter != cp->uniqueitem_counter) || (p->hotkey_rowshift != cp->hotkey_rowshift) ) { @@ -479,7 +476,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) opt |= OPT_SHOW_EQUIP; if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d'," - "`base_exp`='%u', `job_exp`='%u', `zeny`='%d'," + "`base_exp`='%"PRIu64"', `job_exp`='%"PRIu64"', `zeny`='%d'," "`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d'," "`str`='%d',`agi`='%d',`vit`='%d',`int`='%d',`dex`='%d',`luk`='%d'," "`option`='%u',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',`homun_id`='%d',`elemental_id`='%d'," @@ -493,11 +490,11 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point, p->str, p->agi, p->vit, p->int_, p->dex, p->luk, p->option, p->party_id, p->guild_id, p->pet_id, p->hom_id, p->ele_id, - p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom, + p->look.weapon, p->look.shield, p->look.head_top, p->look.head_mid, p->look.head_bottom, mapindex_id2name(p->last_point.map), p->last_point.x, p->last_point.y, mapindex_id2name(p->save_point.map), p->save_point.x, p->save_point.y, p->rename, (unsigned long)p->delete_date, // FIXME: platform-dependent size - p->robe,p->slotchange,opt,p->font,p->uniqueitem_counter, + p->look.robe,p->slotchange,opt,p->font,p->uniqueitem_counter, p->hotkey_rowshift, p->account_id, p->char_id) ) { @@ -519,7 +516,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) if ( (p->hair != cp->hair) || (p->hair_color != cp->hair_color) || (p->clothes_color != cp->clothes_color) || (p->body != cp->body) || - (p->class_ != cp->class_) || + (p->class != cp->class) || (p->partner_id != cp->partner_id) || (p->father != cp->father) || (p->mother != cp->mother) || (p->child != cp->child) || (p->karma != cp->karma) || (p->manner != cp->manner) || @@ -531,7 +528,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) "`partner_id`='%d', `father`='%d', `mother`='%d', `child`='%d'," "`karma`='%d', `manner`='%d', `fame`='%d'" " WHERE `account_id`='%d' AND `char_id` = '%d'", - char_db, p->class_, + char_db, p->class, p->hair, p->hair_color, p->clothes_color, p->body, p->partner_id, p->father, p->mother, p->child, p->karma, p->manner, p->fame, @@ -702,176 +699,287 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p) } /** - * Saves an array of 'item' entries into the specified table. - * - * @param items The items array. - * @param max The array size. - * @param id The character/account/guild ID (depending on tableswitch). - * @param tableswitch The type of table (@see enum inventory_table_type). - * @return Error code. - * @retval 0 in case of success. + * Gets a player object's item data from an sql table. [Smokexyz/Hercules] + * @param[in|out] items reference to the item list of a character/account/guild. + * @param[in] max Max amount of items to be pulled into the list. + * @param[in] guid Unique ID of the player object (account_id, char_id, guild_id). + * @param[in] table Table to be used for the transaction. + * @return -1 on failure or number of items added to the list if successful. */ -int char_memitemdata_to_sql(const struct item items[], int max, int id, int tableswitch) +int char_getitemdata_from_sql(struct item *items, int max, int guid, enum inventory_table_type table) { - StringBuf buf; + int i = 0; struct SqlStmt *stmt = NULL; - int i, j; const char *tablename = NULL; const char *selectoption = NULL; bool has_favorite = false; + StringBuf buf; struct item item = { 0 }; // temp storage variable - bool *flag = NULL; // bit array for inventory matching - bool found; - int errors = 0; - - nullpo_ret(items); - switch (tableswitch) { - case TABLE_INVENTORY: tablename = inventory_db; selectoption = "char_id"; has_favorite = true; break; - case TABLE_CART: tablename = cart_db; selectoption = "char_id"; break; - case TABLE_STORAGE: tablename = storage_db; selectoption = "account_id"; break; - case TABLE_GUILD_STORAGE: tablename = guild_storage_db; selectoption = "guild_id"; break; + nullpo_retr(-1, items); + Assert_retr(-1, guid > 0); + Assert_retr(-1, max > 0); + + // Initialize the array. + memset(items, 0x0, sizeof(struct item) * max); + + switch (table) { + case TABLE_INVENTORY: + tablename = inventory_db; + selectoption = "char_id"; + has_favorite = true; + break; + case TABLE_CART: + tablename = cart_db; + selectoption = "char_id"; + break; + case TABLE_GUILD_STORAGE: + tablename = guild_storage_db; + selectoption = "guild_id"; + break; default: - ShowError("Invalid table name!\n"); - Assert_retr(1, tableswitch); + ShowError("char_getitemdata_from_sql: Invalid table type %d!\n", (int) table); + Assert_retr(-1, table); + return -1; } - // The following code compares inventory with current database values - // and performs modification/deletion/insertion only on relevant rows. - // This approach is more complicated than a trivial delete&insert, but - // it significantly reduces cpu load on the database server. - StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`"); - for (j = 0; j < MAX_SLOTS; ++j) - StrBuf->Printf(&buf, ", `card%d`", j); + for(i = 0; i < MAX_SLOTS; i++) + StrBuf->Printf(&buf, ", `card%d`", i); + for(i = 0; i < MAX_ITEM_OPTIONS; i++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i); if (has_favorite) StrBuf->AppendStr(&buf, ", `favorite`"); - StrBuf->Printf(&buf, " FROM `%s` WHERE `%s`='%d'", tablename, selectoption, id); + StrBuf->Printf(&buf, " FROM `%s` WHERE `%s`=?", tablename, selectoption); stmt = SQL->StmtMalloc(inter->sql_handle); if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) - || SQL_ERROR == SQL->StmtExecute(stmt)) { + || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &guid, 0) + || SQL_ERROR == SQL->StmtExecute(stmt)) { SqlStmt_ShowDebug(stmt); SQL->StmtFree(stmt); StrBuf->Destroy(&buf); - return 1; + return -1; } - SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL); - for (j = 0; j < MAX_SLOTS; ++j) - SQL->StmtBindColumn(stmt, 10+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + if (SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &item.refine, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &item.attribute, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL)) + { + SqlStmt_ShowDebug(stmt); + } + + for (i = 0; i < MAX_SLOTS; i++) + if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + i, SQLDT_SHORT, &item.card[i], 0, NULL, NULL)) + SqlStmt_ShowDebug(stmt); + + for (i = 0; i < MAX_ITEM_OPTIONS; i++) + if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + i * 2, SQLDT_INT16, &item.option[i].value, 0, NULL, NULL)) + SqlStmt_ShowDebug(stmt); + if (has_favorite) - SQL->StmtBindColumn(stmt, 10+MAX_SLOTS, SQLDT_UCHAR, &item.favorite, 0, NULL, NULL); + if (SQL_ERROR == SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + MAX_ITEM_OPTIONS * 2, SQLDT_UCHAR, &item.favorite, 0, NULL, NULL)) + SqlStmt_ShowDebug(stmt); - // bit array indicating which inventory items have already been matched - flag = aCalloc(max, sizeof(bool)); + if (SQL->StmtNumRows(stmt) > 0 ) { + i = 0; + while (SQL_SUCCESS == SQL->StmtNextRow(stmt) && i < max) { + items[i++] = item; + } + } - while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) { - found = false; - // search for the presence of the item in the char's inventory - for (i = 0; i < max; ++i) { - // skip empty and already matched entries - if (items[i].nameid == 0 || flag[i]) - continue; + SQL->StmtFree(stmt); + StrBuf->Destroy(&buf); - if (items[i].nameid == item.nameid - && items[i].unique_id == item.unique_id - && items[i].card[0] == item.card[0] - && items[i].card[2] == item.card[2] - && items[i].card[3] == item.card[3] - ) { - // They are the same item. - ARR_FIND(0, MAX_SLOTS, j, items[i].card[j] != item.card[j]); - if (j == MAX_SLOTS - && items[i].amount == item.amount - && items[i].equip == item.equip - && items[i].identify == item.identify - && items[i].refine == item.refine - && items[i].attribute == item.attribute - && items[i].expire_time == item.expire_time - && items[i].bound == item.bound - && (!has_favorite || items[i].favorite == item.favorite) - ) { - ; //Do nothing. - } else { - // update all fields. - StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%u', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'", - tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound); - for (j = 0; j < MAX_SLOTS; ++j) - StrBuf->Printf(&buf, ", `card%d`='%d'", j, items[i].card[j]); - if (has_favorite) - StrBuf->Printf(&buf, ", `favorite`='%d'", items[i].favorite); - StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); + return i; +} + +/** + * Saves an array of 'item' entries into the specified table. [Smokexyz/Hercules] + * @param[in] items The items array. + * @param[in] guid The character/account/guild ID (depending on table). + * @param[in] tableswitch The type of table (@see enum inventory_table_type). + * @retval -1 in case of failure, or number of changes made within the table. + */ +int char_memitemdata_to_sql(const struct item *p_items, int guid, enum inventory_table_type table) +{ + StringBuf buf; + int i = 0, j = 0; + const char *tablename = NULL; + const char *selectoption = NULL; + bool has_favorite = false; + struct item *cp_items = NULL; // temp item storage variable + bool *matched_p = NULL; + int total_updates = 0, total_deletes = 0, total_inserts = 0, total_changes = 0; + int item_count = 0, db_max = 0; + + nullpo_ret(p_items); + + switch (table) { + case TABLE_INVENTORY: + tablename = inventory_db; + selectoption = "char_id"; + has_favorite = true; + item_count = MAX_INVENTORY; + break; + case TABLE_CART: + tablename = cart_db; + selectoption = "char_id"; + item_count = MAX_CART; + break; + case TABLE_GUILD_STORAGE: + tablename = guild_storage_db; + selectoption = "guild_id"; + item_count = MAX_GUILD_STORAGE; + break; + default: + ShowError("Invalid table type %d!\n", (int) table); + Assert_retr(-1, table); + return -1; + } + + cp_items = aCalloc(item_count, sizeof(struct item)); + matched_p = aCalloc(item_count, sizeof(bool)); + + StrBuf->Init(&buf); + + /** + * If the storage table is not empty, check for items and replace or delete where needed. + */ + if ((db_max = chr->getitemdata_from_sql(cp_items, item_count, guid, table)) > 0) { + int *deletes = aCalloc(db_max, sizeof(struct item)); + + for (i = 0; i < db_max; i++) { + struct item *cp_it = &cp_items[i]; + + ARR_FIND(0, item_count, j, + matched_p[j] != true + && p_items[j].nameid != 0 + && cp_it->nameid == p_items[j].nameid + && cp_it->unique_id == p_items[j].unique_id + && memcmp(p_items[j].card, cp_it->card, sizeof(short) * MAX_SLOTS) == 0 + && memcmp(p_items[j].option, cp_it->option, 5 * MAX_ITEM_OPTIONS) == 0); + + if (j < item_count) { // Item found. + matched_p[j] = true; // Mark the item as matched. + + // If the amount has changed, set for replacement with current item properties. + if (memcmp(cp_it, &p_items[j], sizeof(struct item)) != 0) { + int k = 0; + + if (total_updates == 0) { + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "REPLACE INTO `%s` (`id`, `%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`", tablename, selectoption); + for (k = 0; k < MAX_SLOTS; k++) + StrBuf->Printf(&buf, ", `card%d`", k); + for (k = 0; k < MAX_ITEM_OPTIONS; k++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", k, k); + StrBuf->AppendStr(&buf, ", `expire_time`, `bound`, `unique_id`"); + if (has_favorite) + StrBuf->AppendStr(&buf, ", `favorite`"); + + StrBuf->AppendStr(&buf, ") VALUES "); - if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) { - Sql_ShowDebug(inter->sql_handle); - errors++; } - } - found = flag[i] = true; //Item dealt with, - break; //skip to next item in the db. + StrBuf->Printf(&buf, "%s('%d', '%d', '%d', '%d', '%u', '%d', '%d', '%d'", + total_updates > 0 ? ", " : "", cp_it->id, guid, p_items[j].nameid, p_items[j].amount, p_items[j].equip, p_items[j].identify, p_items[j].refine, p_items[j].attribute); + for (k = 0; k < MAX_SLOTS; k++) + StrBuf->Printf(&buf, ", '%d'", p_items[j].card[k]); + for (k = 0; k < MAX_ITEM_OPTIONS; ++k) + StrBuf->Printf(&buf, ", '%d', '%d'", p_items[j].option[k].index, p_items[j].option[k].value); + StrBuf->Printf(&buf, ", '%u', '%d', '%"PRIu64"'", p_items[j].expire_time, p_items[j].bound, p_items[j].unique_id); + if (has_favorite) + StrBuf->Printf(&buf, ", %d", p_items[j].favorite); + + StrBuf->AppendStr(&buf, ")"); + + total_updates++; + } + } else { // Doesn't exist in the table, set for deletion. + deletes[total_deletes++] = cp_it->id; } } - if (!found) { - // Item not present in inventory, remove it. - if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE from `%s` where `id`='%d' LIMIT 1", tablename, item.id)) { + + if (total_updates > 0 && SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) + Sql_ShowDebug(inter->sql_handle); + + /** + * Handle deletions, if any. + */ + if (total_deletes > 0) { + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE `id` IN (", tablename); + for (i = 0; i < total_deletes; i++) + StrBuf->Printf(&buf, "%s'%d'", i == 0 ? "" : ", ", deletes[i]); + + StrBuf->AppendStr(&buf, ");"); + + if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) Sql_ShowDebug(inter->sql_handle); - errors++; - } } + + aFree(deletes); } - SQL->StmtFree(stmt); - StrBuf->Clear(&buf); - StrBuf->Printf(&buf, "INSERT INTO `%s`(`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", tablename, selectoption); - for (j = 0; j < MAX_SLOTS; ++j) - StrBuf->Printf(&buf, ", `card%d`", j); - if (has_favorite) - StrBuf->AppendStr(&buf, ", `favorite`"); - StrBuf->AppendStr(&buf, ") VALUES "); + /** + * Check for new items and add if required. + */ + for (i = 0; i < item_count; i++) { + const struct item *p_it = &p_items[i]; - found = false; - // insert non-matched items into the db as new items - for (i = 0; i < max; ++i) { - // skip empty and already matched entries - if (items[i].nameid == 0 || flag[i]) + if (matched_p[i] || p_it->nameid == 0) continue; - if (found) - StrBuf->AppendStr(&buf, ","); - else - found = true; + if (total_inserts == 0) { + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "INSERT INTO `%s` (`%s`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", tablename, selectoption); + for (j = 0; j < MAX_SLOTS; ++j) + StrBuf->Printf(&buf, ", `card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); + if (has_favorite) + StrBuf->AppendStr(&buf, ", `favorite`"); + StrBuf->AppendStr(&buf, ") VALUES "); + } + + StrBuf->Printf(&buf, "%s('%d', '%d', '%d', '%u', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", + total_inserts > 0 ? ", " : "", guid, p_it->nameid, p_it->amount, p_it->equip, p_it->identify, p_it->refine, + p_it->attribute, p_it->expire_time, p_it->bound, p_it->unique_id); - StrBuf->Printf(&buf, "('%d', '%d', '%d', '%u', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", - id, items[i].nameid, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound, items[i].unique_id); for (j = 0; j < MAX_SLOTS; ++j) - StrBuf->Printf(&buf, ", '%d'", items[i].card[j]); + StrBuf->Printf(&buf, ", '%d'", p_it->card[j]); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", '%d', '%d'", p_it->option[j].index, p_it->option[j].value); + if (has_favorite) - StrBuf->Printf(&buf, ", '%d'", items[i].favorite); + StrBuf->Printf(&buf, ", '%d'", p_it->favorite); + StrBuf->AppendStr(&buf, ")"); + + total_inserts++; } - if (found && SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) { + if (total_inserts > 0 && SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) Sql_ShowDebug(inter->sql_handle); - errors++; - } StrBuf->Destroy(&buf); - aFree(flag); - return errors; + aFree(cp_items); + aFree(matched_p); + + ShowInfo("%s save complete - guid: %d (replace: %d, insert: %d, delete: %d)\n", tablename, guid, total_updates, total_inserts, total_deletes); + + return total_changes; } /** @@ -961,11 +1069,11 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof(p.name), NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &p.class_, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &p.class, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT, &p.base_exp, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &p.job_exp, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p.job_exp, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &p.zeny, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_SHORT, &p.str, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p.agi, 0, NULL, NULL) @@ -986,15 +1094,15 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_SHORT, &p.hair_color, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_SHORT, &p.clothes_color, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_SHORT, &p.body, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_SHORT, &p.weapon, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_SHORT, &p.shield, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.head_top, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.head_mid, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.head_bottom, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_SHORT, &p.look.weapon, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_SHORT, &p.look.shield, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 30, SQLDT_SHORT, &p.look.head_top, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p.look.head_mid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p.look.head_bottom, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_USHORT, &p.rename, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_UINT32, &p.delete_date, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.robe, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p.look.robe, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_USHORT, &p.slotchange, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_LONG, &unban_time, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_ENUM, &sex, sizeof(sex), NULL, NULL) @@ -1023,16 +1131,14 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) //===================================================================================================== int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything) { - int i,j; + int i = 0; char t_msg[128] = ""; struct mmo_charstatus* cp; - StringBuf buf; struct SqlStmt *stmt; char last_map[MAP_NAME_LENGTH_EXT]; char save_map[MAP_NAME_LENGTH_EXT]; char point_map[MAP_NAME_LENGTH_EXT]; struct point tmp_point; - struct item tmp_item; struct s_skill tmp_skill; struct s_friend tmp_friend; #ifdef HOTKEY_SAVING @@ -1072,11 +1178,11 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof(p->name), NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &p->class_, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &p->class, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &p->base_exp, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UINT, &p->job_exp, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UINT64, &p->job_exp, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_INT, &p->zeny, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_SHORT, &p->str, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_SHORT, &p->agi, 0, NULL, NULL) @@ -1102,11 +1208,11 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every || SQL_ERROR == SQL->StmtBindColumn(stmt, 31, SQLDT_SHORT, &p->hair_color, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 32, SQLDT_SHORT, &p->clothes_color, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 33, SQLDT_SHORT, &p->body, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_SHORT, &p->weapon, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_SHORT, &p->shield, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->head_top, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->head_mid, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->head_bottom, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 34, SQLDT_SHORT, &p->look.weapon, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 35, SQLDT_SHORT, &p->look.shield, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 36, SQLDT_SHORT, &p->look.head_top, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 37, SQLDT_SHORT, &p->look.head_mid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 38, SQLDT_SHORT, &p->look.head_bottom, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 39, SQLDT_STRING, &last_map, sizeof(last_map), NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 40, SQLDT_SHORT, &p->last_point.x, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 41, SQLDT_SHORT, &p->last_point.y, 0, NULL, NULL) @@ -1120,7 +1226,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every || SQL_ERROR == SQL->StmtBindColumn(stmt, 49, SQLDT_INT, &p->fame, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 50, SQLDT_USHORT, &p->rename, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 51, SQLDT_UINT32, &p->delete_date, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->robe, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 52, SQLDT_SHORT, &p->look.robe, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 53, SQLDT_USHORT, &p->slotchange, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 54, SQLDT_UINT, &opt, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 55, SQLDT_UCHAR, &p->font, 0, NULL, NULL) @@ -1184,76 +1290,13 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every } strcat(t_msg, " memo"); - //read inventory - //`inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `expire_time`, `favorite`, `bound`, `unique_id`) - StrBuf->Init(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `favorite`, `bound`, `unique_id`"); - for( i = 0; i < MAX_SLOTS; ++i ) - StrBuf->Printf(&buf, ", `card%d`", i); - StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", inventory_db, MAX_INVENTORY); - - memset(&tmp_item, 0, sizeof(tmp_item)); - if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) - || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0) - || SQL_ERROR == SQL->StmtExecute(stmt) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_CHAR, &tmp_item.favorite, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UCHAR, &tmp_item.bound, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_UINT64, &tmp_item.unique_id, 0, NULL, NULL) - ) - SqlStmt_ShowDebug(stmt); - for( i = 0; i < MAX_SLOTS; ++i ) - if( SQL_ERROR == SQL->StmtBindColumn(stmt, 11+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) - SqlStmt_ShowDebug(stmt); - - for( i = 0; i < MAX_INVENTORY && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) - memcpy(&p->inventory[i], &tmp_item, sizeof(tmp_item)); + /* read inventory [Smokexyz/Hercules] */ + if (chr->getitemdata_from_sql(p->inventory, MAX_INVENTORY, p->char_id, TABLE_INVENTORY) > 0) + strcat(t_msg, " inventory"); - strcat(t_msg, " inventory"); - - //read cart - //`cart_inventory` (`id`,`char_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, expire_time`, `bound`, `unique_id`) - StrBuf->Clear(&buf); - StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) - StrBuf->Printf(&buf, ", `card%d`", j); - StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`=? LIMIT %d", cart_db, MAX_CART); - - memset(&tmp_item, 0, sizeof(tmp_item)); - if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) - || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0) - || SQL_ERROR == SQL->StmtExecute(stmt) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_item.id, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &tmp_item.nameid, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &tmp_item.amount, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &tmp_item.equip, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &tmp_item.bound, 0, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &tmp_item.unique_id, 0, NULL, NULL) - ) { - SqlStmt_ShowDebug(stmt); - } - for( i = 0; i < MAX_SLOTS; ++i ) - if( SQL_ERROR == SQL->StmtBindColumn(stmt, 10+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) - SqlStmt_ShowDebug(stmt); - - for( i = 0; i < MAX_CART && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i ) - memcpy(&p->cart[i], &tmp_item, sizeof(tmp_item)); - strcat(t_msg, " cart"); - - //read storage - inter_storage->fromsql(p->account_id, &p->storage); - strcat(t_msg, " storage"); + /* read cart [Smokexyz/Hercules] */ + if (chr->getitemdata_from_sql(p->cart, MAX_CART, p->char_id, TABLE_CART) > 0) + strcat(t_msg, " cart"); //read skill //`skill` (`char_id`, `id`, `lv`) @@ -1344,7 +1387,6 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every if (chr->show_save_log) ShowInfo("Loaded char (%d - %s): %s\n", char_id, p->name, t_msg); //ok. all data load successfully! SQL->StmtFree(stmt); - StrBuf->Destroy(&buf); /* load options into proper vars */ if( opt & OPT_ALLOW_PARTY ) @@ -1544,7 +1586,7 @@ int char_check_char_name(char * name, char * esc_name) * -5: 'Symbols in Character Names are forbidden' * char_id: Success **/ -int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style) +int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int16 starting_class, uint8 sex) { char name[NAME_LENGTH]; char esc_name[NAME_LENGTH*2+1]; @@ -1557,9 +1599,17 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int SQL->EscapeStringLen(inter->sql_handle, esc_name, name, strnlen(name, NAME_LENGTH)); flag = chr->check_char_name(name,esc_name); - if( flag < 0 ) + if (flag < 0) return flag; + switch (starting_class) { + case JOB_SUMMONER: + case JOB_NOVICE: + break; + default: + return -2; // Char Creation Denied + } + //check other inputs #if PACKETVER >= 20120307 if(slot < 0 || slot >= sd->char_slots) @@ -1579,24 +1629,24 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int if( sd->found_char[slot] != -1 ) return -2; /* character account limit exceeded */ + #if PACKETVER >= 20120307 - //Insert the new char entry to the database - if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`," - "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES (" - "'%d', '%d', '%s', '%d', '%d','%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')", - char_db, sd->account_id , slot, esc_name, start_zeny, 48, str, agi, vit, int_, dex, luk, + // Insert the new char entry to the database + if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`," + "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`) VALUES (" + "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c')", + char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, 48, str, agi, vit, int_, dex, luk, (40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color, - mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) ) - { - Sql_ShowDebug(inter->sql_handle); - return -2; //No, stop the procedure! + mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y, sex)) { + Sql_ShowDebug(inter->sql_handle); + return -2; //No, stop the procedure! } #else //Insert the new char entry to the database - if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`," + if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`," "`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES (" - "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')", - char_db, sd->account_id , slot, esc_name, start_zeny, str, agi, vit, int_, dex, luk, + "'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')", + char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, str, agi, vit, int_, dex, luk, (40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color, mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) ) { @@ -1613,9 +1663,9 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int // Validation success, log result if (chr->enable_logs) { if (SQL_ERROR == SQL->Query(inter->sql_handle, - "INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)" - "VALUES (NOW(), '%s', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", - charlog_db, "make new char", sd->account_id, char_id, slot, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color)) + "INSERT INTO `%s` (`time`, `char_msg`, `account_id`, `char_id`, `char_num`, `class`, `name`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hair`, `hair_color`)" + "VALUES (NOW(), '%s', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')", + charlog_db, "make new char", sd->account_id, char_id, slot, starting_class, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color)) Sql_ShowDebug(inter->sql_handle); } @@ -1639,7 +1689,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int } } - ShowInfo("Created char: account: %d, char: %d, slot: %d, name: %s\n", sd->account_id, char_id, slot, name); + ShowInfo("Created char: account: %d, char: %d, slot: %d, name: %s, sex: %c\n", sd->account_id, char_id, slot, name, sex); return char_id; } @@ -1859,10 +1909,23 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { return 0; buf = WBUFP(buffer,0); + WBUFL(buf,0) = p->char_id; - WBUFL(buf,4) = min(p->base_exp, INT32_MAX); +#if PACKETVER >= 20170830 + WBUFQ(buf,4) = min(p->base_exp, INT64_MAX); + offset += 4; + buf = WBUFP(buffer, offset); +#else + WBUFL(buf,4) = min((uint32)(p->base_exp), INT32_MAX); +#endif WBUFL(buf,8) = p->zeny; - WBUFL(buf,12) = min(p->job_exp, INT32_MAX); +#if PACKETVER >= 20170830 + WBUFQ(buf,12) = min(p->job_exp, INT64_MAX); + offset += 4; + buf = WBUFP(buffer, offset); +#else + WBUFL(buf,12) = min((uint32)(p->job_exp), INT32_MAX); +#endif WBUFL(buf,16) = p->job_level; WBUFL(buf,20) = 0; // probably opt1 WBUFL(buf,24) = 0; // probably opt2 @@ -1882,7 +1945,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { WBUFW(buf,46) = min(p->sp, INT16_MAX); WBUFW(buf,48) = min(p->max_sp, INT16_MAX); WBUFW(buf,50) = DEFAULT_WALK_SPEED; // p->speed; - WBUFW(buf,52) = p->class_; + WBUFW(buf,52) = p->class; WBUFW(buf,54) = p->hair; #if PACKETVER >= 20141022 WBUFW(buf,56) = p->body; @@ -1892,14 +1955,14 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { //When the weapon is sent and your option is riding, the client crashes on login!? // FIXME[Haru]: is OPTION_HANBOK intended to be part of this list? And if it is, should the list also include other OPTION_ costumes? - WBUFW(buf,56) = (p->option&(OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_HANBOK)) ? 0 : p->weapon; + WBUFW(buf,56) = (p->option&(OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_HANBOK)) ? 0 : p->look.weapon; WBUFW(buf,58) = p->base_level; WBUFW(buf,60) = min(p->skill_point, INT16_MAX); - WBUFW(buf,62) = p->head_bottom; - WBUFW(buf,64) = p->shield; - WBUFW(buf,66) = p->head_top; - WBUFW(buf,68) = p->head_mid; + WBUFW(buf,62) = p->look.head_bottom; + WBUFW(buf,64) = p->look.shield; + WBUFW(buf,66) = p->look.head_top; + WBUFW(buf,68) = p->look.head_mid; WBUFW(buf,70) = p->hair_color; WBUFW(buf,72) = p->clothes_color; memcpy(WBUFP(buf,74), p->name, NAME_LENGTH); @@ -1923,7 +1986,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { offset += 4; #endif #if PACKETVER >= 20110111 - WBUFL(buf,128) = p->robe; + WBUFL(buf,128) = p->look.robe; offset += 4; #endif #if PACKETVER != 20111116 //2011-11-16 wants 136, ask gravity. @@ -1945,11 +2008,15 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) { } /* Made Possible by Yommy~! <3 */ -void char_mmo_char_send099d(int fd, struct char_session_data *sd) { +void char_mmo_char_send099d(int fd, struct char_session_data *sd) +{ +// support added for client between 20121010 and 20130320 +#if PACKETVER > 20120418 WFIFOHEAD(fd,4 + (MAX_CHARS*MAX_CHAR_BUF)); WFIFOW(fd,0) = 0x99d; WFIFOW(fd,2) = chr->mmo_chars_fromsql(sd, WFIFOP(fd,4)) + 4; WFIFOSET(fd,WFIFOW(fd,2)); +#endif } /* Sends character ban list */ @@ -2314,33 +2381,33 @@ void char_changesex(int account_id, int sex) * @param sex The new sex (SEX_MALE or SEX_FEMALE). * @param acc The character's account ID. * @param char_id The character ID. - * @param class_ The character's current job class. + * @param class The character's current job class. * @param guild_id The character's guild ID. */ -void char_change_sex_sub(int sex, int acc, int char_id, int class_, int guild_id) +void char_change_sex_sub(int sex, int acc, int char_id, int class, int guild_id) { // job modification - if (class_ == JOB_BARD || class_ == JOB_DANCER) - class_ = (sex == SEX_MALE ? JOB_BARD : JOB_DANCER); - else if (class_ == JOB_CLOWN || class_ == JOB_GYPSY) - class_ = (sex == SEX_MALE ? JOB_CLOWN : JOB_GYPSY); - else if (class_ == JOB_BABY_BARD || class_ == JOB_BABY_DANCER) - class_ = (sex == SEX_MALE ? JOB_BABY_BARD : JOB_BABY_DANCER); - else if (class_ == JOB_MINSTREL || class_ == JOB_WANDERER) - class_ = (sex == SEX_MALE ? JOB_MINSTREL : JOB_WANDERER); - else if (class_ == JOB_MINSTREL_T || class_ == JOB_WANDERER_T) - class_ = (sex == SEX_MALE ? JOB_MINSTREL_T : JOB_WANDERER_T); - else if (class_ == JOB_BABY_MINSTREL || class_ == JOB_BABY_WANDERER) - class_ = (sex == SEX_MALE ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER); - else if (class_ == JOB_KAGEROU || class_ == JOB_OBORO) - class_ = (sex == SEX_MALE ? JOB_KAGEROU : JOB_OBORO); + if (class == JOB_BARD || class == JOB_DANCER) + class = (sex == SEX_MALE ? JOB_BARD : JOB_DANCER); + else if (class == JOB_CLOWN || class == JOB_GYPSY) + class = (sex == SEX_MALE ? JOB_CLOWN : JOB_GYPSY); + else if (class == JOB_BABY_BARD || class == JOB_BABY_DANCER) + class = (sex == SEX_MALE ? JOB_BABY_BARD : JOB_BABY_DANCER); + else if (class == JOB_MINSTREL || class == JOB_WANDERER) + class = (sex == SEX_MALE ? JOB_MINSTREL : JOB_WANDERER); + else if (class == JOB_MINSTREL_T || class == JOB_WANDERER_T) + class = (sex == SEX_MALE ? JOB_MINSTREL_T : JOB_WANDERER_T); + else if (class == JOB_BABY_MINSTREL || class == JOB_BABY_WANDERER) + class = (sex == SEX_MALE ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER); + else if (class == JOB_KAGEROU || class == JOB_OBORO) + class = (sex == SEX_MALE ? JOB_KAGEROU : JOB_OBORO); if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `equip`='0' WHERE `char_id`='%d'", inventory_db, char_id)) Sql_ShowDebug(inter->sql_handle); if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `class`='%d', `weapon`='0', `shield`='0', " "`head_top`='0', `head_mid`='0', `head_bottom`='0' WHERE `char_id`='%d'", - char_db, class_, char_id)) + char_db, class, char_id)) Sql_ShowDebug(inter->sql_handle); if (guild_id) // If there is a guild, update the guild_member data [Skotlex] inter_guild->sex_changed(guild_id, acc, char_id, sex); @@ -2348,7 +2415,7 @@ void char_change_sex_sub(int sex, int acc, int char_id, int class_, int guild_id int char_parse_fromlogin_changesex_reply(int fd) { - int char_id = 0, class_ = 0, guild_id = 0; + int char_id = 0, class = 0, guild_id = 0; int i; struct char_auth_node *node; struct SqlStmt *stmt; @@ -2377,11 +2444,11 @@ int char_parse_fromlogin_changesex_reply(int fd) SQL->StmtFree(stmt); } SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, 0, NULL, NULL); - SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class_, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, 0, NULL, NULL); for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) { - char_change_sex_sub(sex, acc, char_id, class_, guild_id); + char_change_sex_sub(sex, acc, char_id, class, guild_id); } SQL->StmtFree(stmt); @@ -3359,7 +3426,7 @@ void char_ask_name_ack(int fd, int acc, const char* name, int type, int result) */ int char_changecharsex(int char_id, int sex) { - int class_ = 0, guild_id = 0, account_id = 0; + int class = 0, guild_id = 0, account_id = 0; char *data; // get character data @@ -3372,7 +3439,7 @@ int char_changecharsex(int char_id, int sex) return 1; } SQL->GetData(inter->sql_handle, 0, &data, NULL); account_id = atoi(data); - SQL->GetData(inter->sql_handle, 1, &data, NULL); class_ = atoi(data); + SQL->GetData(inter->sql_handle, 1, &data, NULL); class = atoi(data); SQL->GetData(inter->sql_handle, 2, &data, NULL); guild_id = atoi(data); SQL->FreeResult(inter->sql_handle); @@ -3380,7 +3447,7 @@ int char_changecharsex(int char_id, int sex) Sql_ShowDebug(inter->sql_handle); return 1; } - char_change_sex_sub(sex, account_id, char_id, class_, guild_id); + char_change_sex_sub(sex, account_id, char_id, class, guild_id); // disconnect player if online on char-server chr->disconnect_player(account_id); @@ -4397,14 +4464,21 @@ void char_parse_char_connect(int fd, struct char_session_data* sd, uint32 ipl) void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) { +#if PACKETVER < 20170329 + const int cmd = 0x71; + const int len = 28; +#else + const int cmd = 0xac5; + const int len = 156; +#endif nullpo_retv(cd); - WFIFOHEAD(fd,28); - WFIFOW(fd,0) = 0x71; - WFIFOL(fd,2) = cd->char_id; - mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd,6)); - WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip); - WFIFOW(fd,26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!] - WFIFOSET(fd,28); + WFIFOHEAD(fd, len); + WFIFOW(fd, 0) = cmd; + WFIFOL(fd, 2) = cd->char_id; + mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd, 6)); + WFIFOL(fd, 22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip); + WFIFOW(fd, 26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!] + WFIFOSET(fd, len); } void char_send_wait_char_server(int fd) @@ -4621,11 +4695,27 @@ void char_parse_char_create_new_char(int fd, struct char_session_data* sd) //turn character creation on/off [Kevin] result = -2; } else { - #if PACKETVER >= 20120307 - result = chr->make_new_char_sql(sd, RFIFOP(fd,2), 1, 1, 1, 1, 1, 1, RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29)); - #else - result = chr->make_new_char_sql(sd, RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35)); - #endif +#if PACKETVER >= 20151001 + uint8 sex = RFIFOB(fd, 35); + + switch (sex) { + case SEX_FEMALE: + sex = 'F'; + break; + case SEX_MALE: + sex = 'M'; + break; + default: + chr->creation_failed(fd, -2); // Char Creation Denied + RFIFOSKIP(fd, 36); + return; + } + result = chr->make_new_char_sql(sd, RFIFOP(fd, 2), 1, 1, 1, 1, 1, 1, RFIFOB(fd, 26), RFIFOW(fd, 27), RFIFOW(fd, 29), RFIFOW(fd, 31), sex); +#elif PACKETVER >= 20120307 + result = chr->make_new_char_sql(sd, RFIFOP(fd, 2), 1, 1, 1, 1, 1, 1, RFIFOB(fd, 26), RFIFOW(fd, 27), RFIFOW(fd, 29), JOB_NOVICE, 'U'); +#else + result = chr->make_new_char_sql(sd, RFIFOP(fd, 2), RFIFOB(fd, 26), RFIFOB(fd, 27), RFIFOB(fd, 28), RFIFOB(fd, 29), RFIFOB(fd, 30), RFIFOB(fd, 31), RFIFOB(fd, 32), RFIFOW(fd, 33), RFIFOW(fd, 35), JOB_NOVICE, 'U'); +#endif } //'Charname already exists' (-1), 'Char creation denied' (-2) and 'You are underaged' (-3) @@ -4640,11 +4730,13 @@ void char_parse_char_create_new_char(int fd, struct char_session_data* sd) // add new entry to the chars list sd->found_char[char_dat.slot] = result; // the char_id of the new char } - #if PACKETVER >= 20120307 - RFIFOSKIP(fd,31); - #else - RFIFOSKIP(fd,37); - #endif +#if PACKETVER >= 20151001 + RFIFOSKIP(fd, 36); +#elif PACKETVER >= 20120307 + RFIFOSKIP(fd, 31); +#else + RFIFOSKIP(fd, 37); +#endif } // flag: @@ -5022,17 +5114,22 @@ int char_parse_char(int fd) break; // create new char - #if PACKETVER >= 20120307 +#if PACKETVER >= 20151001 + // S 0a39 <name>.24B <slot>.B <hair color>.W <hair style>.W <starting job class ID>.W <Unknown>.(W or 2 B's)??? <sex>.B + case 0xa39: + { + FIFOSD_CHECK(36); +#elif PACKETVER >= 20120307 // S 0970 <name>.24B <slot>.B <hair color>.W <hair style>.W case 0x970: { FIFOSD_CHECK(31); - #else +#else // S 0067 <name>.24B <str>.B <agi>.B <vit>.B <int>.B <dex>.B <luk>.B <slot>.B <hair color>.W <hair style>.W case 0x67: { FIFOSD_CHECK(37); - #endif +#endif chr->parse_char_create_new_char(fd, sd); } @@ -5919,7 +6016,7 @@ bool char_config_read_player_new(const char *filename, const struct config_t *co #else const char *start_point_setting = "start_point_pre"; #endif - long long int i64 = 0; // TODO: Temporary until the signature of libconfig->setting_lookup_int64 is changed to take a defined-size int (int64) + int64 i64 = 0; nullpo_retr(false, filename); nullpo_retr(false, config); @@ -6331,6 +6428,7 @@ void char_load_defaults(void) inter_pet_defaults(); inter_quest_defaults(); inter_storage_defaults(); + inter_rodex_defaults(); inter_defaults(); geoip_defaults(); } @@ -6374,6 +6472,7 @@ void char_defaults(void) chr->create_charstatus = char_create_charstatus; chr->mmo_char_tosql = char_mmo_char_tosql; chr->memitemdata_to_sql = char_memitemdata_to_sql; + chr->getitemdata_from_sql = char_getitemdata_from_sql; chr->mmo_gender = char_mmo_gender; chr->mmo_chars_fromsql = char_mmo_chars_fromsql; chr->mmo_char_fromsql = char_mmo_char_fromsql; diff --git a/src/char/char.h b/src/char/char.h index 4dbdfd9db..3689690c7 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -139,7 +139,8 @@ struct char_interface { void (*set_all_offline_sql) (void); struct DBData (*create_charstatus) (union DBKey key, va_list args); int (*mmo_char_tosql) (int char_id, struct mmo_charstatus* p); - int (*memitemdata_to_sql) (const struct item items[], int max, int id, int tableswitch); + int (*getitemdata_from_sql) (struct item *items, int max, int guid, enum inventory_table_type table); + int (*memitemdata_to_sql) (const struct item items[], int id, enum inventory_table_type table); int (*mmo_gender) (const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); int (*mmo_chars_fromsql) (struct char_session_data* sd, uint8* buf); int (*mmo_char_fromsql) (int char_id, struct mmo_charstatus* p, bool load_everything); @@ -147,7 +148,7 @@ struct char_interface { bool (*char_slotchange) (struct char_session_data *sd, int fd, unsigned short from, unsigned short to); int (*rename_char_sql) (struct char_session_data *sd, int char_id); int (*check_char_name) (char * name, char * esc_name); - int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style); + int (*make_new_char_sql) (struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); int (*divorce_char_sql) (int partner_id1, int partner_id2); int (*count_users) (void); int (*mmo_char_tobuf) (uint8* buffer, struct mmo_charstatus* p); @@ -327,6 +328,8 @@ extern char pet_db[256]; extern char mail_db[256]; extern char auction_db[256]; extern char quest_db[256]; +extern char rodex_db[256]; +extern char rodex_item_db[256]; extern char homunculus_db[256]; extern char skill_homunculus_db[256]; extern char mercenary_db[256]; diff --git a/src/char/geoip.c b/src/char/geoip.c index 002045850..0b84d2b09 100644 --- a/src/char/geoip.c +++ b/src/char/geoip.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/geoip.h b/src/char/geoip.h index 61ebb535f..c5d71f5e1 100644 --- a/src/char/geoip.h +++ b/src/char/geoip.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 51acb32a6..05914c3a0 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -71,8 +71,10 @@ void inter_auction_save(struct auction_data *auction) StrBuf->Init(&buf); StrBuf->Printf(&buf, "UPDATE `%s` SET `seller_id` = '%d', `seller_name` = ?, `buyer_id` = '%d', `buyer_name` = ?, `price` = '%d', `buynow` = '%d', `hours` = '%d', `timestamp` = '%lu', `nameid` = '%d', `item_name` = ?, `type` = '%d', `refine` = '%d', `attribute` = '%d'", auction_db, auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, (unsigned long)auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute); - for( j = 0; j < MAX_SLOTS; j++ ) + for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ", `card%d` = '%d'", j, auction->item.card[j]); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ", `opt_idx%d` = '%d', `opt_val%d` = '%d'", j, auction->item.option[j].index, j, auction->item.option[j].value); StrBuf->Printf(&buf, " WHERE `auction_id` = '%u'", auction->auction_id); stmt = SQL->StmtMalloc(inter->sql_handle); @@ -95,33 +97,35 @@ unsigned int inter_auction_create(struct auction_data *auction) StringBuf buf; struct SqlStmt *stmt; - if( !auction ) - return false; + nullpo_ret(auction); auction->timestamp = time(NULL) + (auction->hours * 3600); StrBuf->Init(&buf); StrBuf->Printf(&buf, "INSERT INTO `%s` (`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`,`unique_id`", auction_db); - for( j = 0; j < MAX_SLOTS; j++ ) + for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ",`card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); StrBuf->Printf(&buf, ") VALUES ('%d',?,'%d',?,'%d','%d','%d','%lu','%d',?,'%d','%d','%d','%"PRIu64"'", auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, (unsigned long)auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute, auction->item.unique_id); - for( j = 0; j < MAX_SLOTS; j++ ) + for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ",'%d'", auction->item.card[j]); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ",'%d','%d'", auction->item.option[j].index, auction->item.option[j].value); + StrBuf->AppendStr(&buf, ")"); stmt = SQL->StmtMalloc(inter->sql_handle); - if( SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + if (SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, auction->seller_name, strnlen(auction->seller_name, NAME_LENGTH)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, auction->buyer_name, strnlen(auction->buyer_name, NAME_LENGTH)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, auction->item_name, strnlen(auction->item_name, ITEM_NAME_LENGTH)) - || SQL_SUCCESS != SQL->StmtExecute(stmt) ) + || SQL_SUCCESS != SQL->StmtExecute(stmt)) { SqlStmt_ShowDebug(stmt); auction->auction_id = 0; - } - else - { + } else { struct auction_data *auction_; int64 tick = (int64)auction->hours * 3600000; @@ -204,8 +208,10 @@ void inter_auctions_fromsql(void) StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `auction_id`,`seller_id`,`seller_name`,`buyer_id`,`buyer_name`," "`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`,`unique_id`"); - for( i = 0; i < MAX_SLOTS; i++ ) + for (i = 0; i < MAX_SLOTS; i++) StrBuf->Printf(&buf, ",`card%d`", i); + for (i = 0; i < MAX_ITEM_OPTIONS; i++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i); StrBuf->Printf(&buf, " FROM `%s` ORDER BY `auction_id` DESC", auction_db); if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) @@ -238,14 +244,20 @@ void inter_auctions_fromsql(void) item->identify = 1; item->amount = 1; item->expire_time = 0; - - for( i = 0; i < MAX_SLOTS; i++ ) - { + /* Card Slots */ + for (i = 0; i < MAX_SLOTS; i++) { SQL->GetData(inter->sql_handle, 15 + i, &data, NULL); item->card[i] = atoi(data); } + /* Item Options */ + for (i = 0; i < MAX_ITEM_OPTIONS; i++) { + SQL->GetData(inter->sql_handle, 15 + MAX_SLOTS + i * 2, &data, NULL); + item->option[i].index = atoi(data); + SQL->GetData(inter->sql_handle, 16 + MAX_SLOTS + i * 2, &data, NULL); + item->option[i].value = atoi(data); + } - if( auction->timestamp > now ) + if (auction->timestamp > now) endtick = ((int64)(auction->timestamp - now) * 1000) + tick; else endtick = tick + 10000; // 10 seconds to process ended auctions diff --git a/src/char/int_auction.h b/src/char/int_auction.h index ccd5bfbf5..9f0ccbd09 100644 --- a/src/char/int_auction.h +++ b/src/char/int_auction.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index 9cdd63e7f..8a046b0f8 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_guild.c b/src/char/int_guild.c index dcc1ed7cb..0102f11a0 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -138,7 +138,7 @@ int inter_guild_tosql(struct guild *g,int flag) if (g->guild_id<=0 && g->guild_id != -1) return 0; #ifdef NOISY - ShowInfo("Save guild request ("CL_BOLD"%d"CL_RESET" - flag 0x%x).",g->guild_id, flag); + ShowInfo("Save guild request ("CL_BOLD"%d"CL_RESET" - flag 0x%x).\n",g->guild_id, flag); #endif SQL->EscapeStringLen(inter->sql_handle, esc_name, g->name, strnlen(g->name, NAME_LENGTH)); @@ -251,7 +251,7 @@ int inter_guild_tosql(struct guild *g,int flag) "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%"PRIu64"','%d','%d','%d','%s')", guild_member_db, g->guild_id, m->account_id, m->char_id, m->hair, m->hair_color, m->gender, - m->class_, m->lv, m->exp, m->exp_payper, m->online, m->position, esc_name) ) + m->class, m->lv, m->exp, m->exp_payper, m->online, m->position, esc_name) ) Sql_ShowDebug(inter->sql_handle); if (m->modified&GS_MEMBER_NEW || new_guild == 1) { @@ -433,7 +433,7 @@ struct guild * inter_guild_fromsql(int guild_id) SQL->GetData(inter->sql_handle, 2, &data, NULL); m->hair = atoi(data); SQL->GetData(inter->sql_handle, 3, &data, NULL); m->hair_color = atoi(data); SQL->GetData(inter->sql_handle, 4, &data, NULL); m->gender = atoi(data); - SQL->GetData(inter->sql_handle, 5, &data, NULL); m->class_ = atoi(data); + SQL->GetData(inter->sql_handle, 5, &data, NULL); m->class = atoi(data); SQL->GetData(inter->sql_handle, 6, &data, NULL); m->lv = atoi(data); SQL->GetData(inter->sql_handle, 7, &data, NULL); m->exp = strtoull(data, NULL, 10); SQL->GetData(inter->sql_handle, 8, &data, NULL); m->exp_payper = (unsigned int)atoi(data); @@ -984,7 +984,7 @@ int mapif_guild_memberinfoshort(struct guild *g, int idx) WBUFL(buf,10)=g->member[idx].char_id; WBUFB(buf,14)=(unsigned char)g->member[idx].online; WBUFW(buf,15)=g->member[idx].lv; - WBUFW(buf,17)=g->member[idx].class_; + WBUFW(buf,17)=g->member[idx].class; mapif->sendall(buf,19); return 0; } @@ -1349,7 +1349,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in } // Change member info -int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) +int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) { // Could speed up by manipulating only guild_member struct guild * g; @@ -1365,7 +1365,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, { g->member[i].online = online; g->member[i].lv = lv; - g->member[i].class_ = class_; + g->member[i].class = class; g->member[i].modified = GS_MEMBER_MODIFIED; mapif->guild_memberinfoshort(g,i); } @@ -1602,7 +1602,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int } case GMI_CLASS: { - g->member[i].class_ = *(const short *)data; + g->member[i].class = *(const int16 *)data; g->member[i].modified = GS_MEMBER_MODIFIED; mapif->guild_memberinfochanged(guild_id,account_id,char_id,type,data,len); g->save_flag |= GS_MEMBER; //Save new data. diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 252c2dc47..93bf6c699 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_homun.h b/src/char/int_homun.h index e070cccb6..7ea7331f2 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_mail.c b/src/char/int_mail.c index bf3403b5f..7f054eda1 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -57,6 +57,8 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md) "`zeny`,`amount`,`nameid`,`refine`,`attribute`,`identify`,`unique_id`"); for (i = 0; i < MAX_SLOTS; i++) StrBuf->Printf(&buf, ",`card%d`", i); + for (i = 0; i < MAX_ITEM_OPTIONS; i++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", i, i); // I keep the `status` < 3 just in case someone forget to apply the sqlfix StrBuf->Printf(&buf, " FROM `%s` WHERE `dest_id`='%d' AND `status` < 3 ORDER BY `id` LIMIT %d", @@ -90,12 +92,18 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md) SQL->GetData(inter->sql_handle,15, &data, NULL); item->unique_id = strtoull(data, NULL, 10); item->expire_time = 0; item->bound = 0; - - for (j = 0; j < MAX_SLOTS; j++) - { + /* Card Slots */ + for (j = 0; j < MAX_SLOTS; j++) { SQL->GetData(inter->sql_handle, 16 + j, &data, NULL); item->card[j] = atoi(data); } + /* Item Options */ + for (j = 0; j < MAX_ITEM_OPTIONS; j++) { + SQL->GetData(inter->sql_handle, 16 + MAX_SLOTS + j * 2, &data, NULL); + item->option[j].index = atoi(data); + SQL->GetData(inter->sql_handle, 17 + MAX_SLOTS + j * 2, &data, NULL); + item->option[j].value = atoi(data); + } } md->full = ( SQL->NumRows(inter->sql_handle) > MAIL_MAX_INBOX ); @@ -138,25 +146,30 @@ int inter_mail_savemessage(struct mail_message* msg) StrBuf->Printf(&buf, "INSERT INTO `%s` (`send_name`, `send_id`, `dest_name`, `dest_id`, `title`, `message`, `time`, `status`, `zeny`, `amount`, `nameid`, `refine`, `attribute`, `identify`, `unique_id`", mail_db); for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ", `card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); StrBuf->Printf(&buf, ") VALUES (?, '%d', ?, '%d', ?, ?, '%lu', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%"PRIu64"'", msg->send_id, msg->dest_id, (unsigned long)msg->timestamp, msg->status, msg->zeny, msg->item.amount, msg->item.nameid, msg->item.refine, msg->item.attribute, msg->item.identify, msg->item.unique_id); for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ", '%d'", msg->item.card[j]); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ", '%d', '%d'", msg->item.option[j].index, msg->item.option[j].value); StrBuf->AppendStr(&buf, ")"); // prepare and execute query stmt = SQL->StmtMalloc(inter->sql_handle); - if( SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + if (SQL_SUCCESS != SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 0, SQLDT_STRING, msg->send_name, strnlen(msg->send_name, NAME_LENGTH)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 1, SQLDT_STRING, msg->dest_name, strnlen(msg->dest_name, NAME_LENGTH)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 2, SQLDT_STRING, msg->title, strnlen(msg->title, MAIL_TITLE_LENGTH)) || SQL_SUCCESS != SQL->StmtBindParam(stmt, 3, SQLDT_STRING, msg->body, strnlen(msg->body, MAIL_BODY_LENGTH)) - || SQL_SUCCESS != SQL->StmtExecute(stmt) ) + || SQL_SUCCESS != SQL->StmtExecute(stmt)) { SqlStmt_ShowDebug(stmt); msg->id = 0; - } else + } else { msg->id = (int)SQL->StmtLastInsertId(stmt); + } SQL->StmtFree(stmt); StrBuf->Destroy(&buf); @@ -176,8 +189,10 @@ static bool inter_mail_loadmessage(int mail_id, struct mail_message* msg) StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `id`,`send_name`,`send_id`,`dest_name`,`dest_id`,`title`,`message`,`time`,`status`," "`zeny`,`amount`,`nameid`,`refine`,`attribute`,`identify`,`unique_id`"); - for( j = 0; j < MAX_SLOTS; j++ ) + for (j = 0; j < MAX_SLOTS; j++) StrBuf->Printf(&buf, ",`card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; j++) + StrBuf->Printf(&buf, ",`opt_idx%d`,`opt_val%d`", j, j); StrBuf->Printf(&buf, " FROM `%s` WHERE `id` = '%d'", mail_db, mail_id); if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf)) @@ -207,12 +222,18 @@ static bool inter_mail_loadmessage(int mail_id, struct mail_message* msg) SQL->GetData(inter->sql_handle,15, &data, NULL); msg->item.unique_id = strtoull(data, NULL, 10); msg->item.expire_time = 0; msg->item.bound = 0; - - for( j = 0; j < MAX_SLOTS; j++ ) - { + /* Card Slots */ + for (j = 0; j < MAX_SLOTS; j++) { SQL->GetData(inter->sql_handle,16 + j, &data, NULL); msg->item.card[j] = atoi(data); } + /* Item Options */ + for (j = 0 ; j < MAX_ITEM_OPTIONS; j++) { + SQL->GetData(inter->sql_handle, 16 + MAX_SLOTS + j * 2, &data, NULL); + msg->item.option[j].index = atoi(data); + SQL->GetData(inter->sql_handle, 17 + MAX_SLOTS + j * 2, &data, NULL); + msg->item.option[j].value = atoi(data); + } } StrBuf->Destroy(&buf); @@ -269,6 +290,8 @@ static bool inter_mail_DeleteAttach(int mail_id) StrBuf->Printf(&buf, "UPDATE `%s` SET `zeny` = '0', `nameid` = '0', `amount` = '0', `refine` = '0', `attribute` = '0', `identify` = '0'", mail_db); for (i = 0; i < MAX_SLOTS; i++) StrBuf->Printf(&buf, ", `card%d` = '0'", i); + for (i = 0; i < MAX_ITEM_OPTIONS; i++) + StrBuf->Printf(&buf, ", `opt_idx%d` = '0', `opt_val%d` = '0'", i, i); StrBuf->Printf(&buf, " WHERE `id` = '%d'", mail_id); if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) { @@ -403,7 +426,7 @@ void mapif_parse_mail_return(int fd) safestrncpy(msg.dest_name, temp_, NAME_LENGTH); // set reply message title - snprintf(temp_, MAIL_TITLE_LENGTH, "RE:%s", msg.title); + safesnprintf(temp_, MAIL_TITLE_LENGTH, "RE:%s", msg.title); safestrncpy(msg.title, temp_, MAIL_TITLE_LENGTH); msg.status = MAIL_NEW; diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 346adeea7..cb72db504 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 17cc97fda..3b1623438 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_party.c b/src/char/int_party.c index e2be9f3ca..764387981 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -89,7 +89,7 @@ static void inter_party_calc_state(struct party_data *p) // FIXME[Haru]: What if the occupied positions aren't the first three? It can happen if some party members leave. This is the reason why family sharing some times stops working until you recreate your party if( p->size == 2 && ( chr->char_child(p->party.member[0].char_id,p->party.member[1].char_id) || chr->char_child(p->party.member[1].char_id,p->party.member[0].char_id) ) ) { //Child should be able to share with either of their parents [RoM] - if(p->party.member[0].class_&JOBL_BABY) //first slot is the child? + if (p->party.member[0].class >= JOB_BABY && p->party.member[0].class <= JOB_SUPER_BABY) //first slot is the child? p->family = p->party.member[0].char_id; else p->family = p->party.member[1].char_id; @@ -252,7 +252,7 @@ struct party_data *inter_party_fromsql(int party_id) SQL->GetData(inter->sql_handle, 3, &data, NULL); m->lv = atoi(data); SQL->GetData(inter->sql_handle, 4, &data, NULL); m->map = mapindex->name2id(data); SQL->GetData(inter->sql_handle, 5, &data, NULL); m->online = (atoi(data) ? 1 : 0); - SQL->GetData(inter->sql_handle, 6, &data, NULL); m->class_ = atoi(data); + SQL->GetData(inter->sql_handle, 6, &data, NULL); m->class = atoi(data); m->leader = (m->account_id == leader_id && m->char_id == leader_char ? 1 : 0); } SQL->FreeResult(inter->sql_handle); @@ -634,30 +634,20 @@ int mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) mapif->party_withdraw(party_id, account_id, char_id); - if (p->party.member[i].leader){ - p->party.member[i].account_id = 0; - for (j = 0; j < MAX_PARTY; j++) { - if (!p->party.member[j].account_id) - continue; - mapif->party_withdraw(party_id, p->party.member[j].account_id, p->party.member[j].char_id); - p->party.member[j].account_id = 0; - } - //Party gets deleted on the check_empty call below. - } else { - inter_party->tosql(&p->party,PS_DELMEMBER,i); - j = p->party.member[i].lv; - if(p->party.member[i].online) p->party.count--; - memset(&p->party.member[i], 0, sizeof(struct party_member)); - p->size--; - if (j == p->min_lv || j == p->max_lv || p->family) - { - if(p->family) p->family = 0; //Family state broken. - inter_party->check_lv(p); - } + j = p->party.member[i].lv; + if (p->party.member[i].online > 0) + p->party.count--; + memset(&p->party.member[i], 0, sizeof(struct party_member)); + p->size--; + if (j == p->min_lv || j == p->max_lv || p->family) { + if(p->family) p->family = 0; //Family state broken. + inter_party->check_lv(p); } - if (inter_party->check_empty(p) == 0) + if (inter_party->check_empty(p) == 0) { + inter_party->tosql(&p->party, PS_DELMEMBER, i); mapif->party_info(-1, &p->party, 0); + } return 0; } // When member goes to other map or levels up. @@ -727,7 +717,7 @@ int mapif_parse_BreakParty(int fd, int party_id) if(!p) return 0; inter_party->tosql(&p->party,PS_BREAK,0); - mapif->party_broken(fd,party_id); + mapif->party_broken(party_id, 1); return 0; } diff --git a/src/char/int_party.h b/src/char/int_party.h index 62fef4192..77363dd45 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_pet.h b/src/char/int_pet.h index 3eb19d656..13291e226 100644 --- a/src/char/int_pet.h +++ b/src/char/int_pet.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 7b3d746dd..bd49cb7d4 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_quest.h b/src/char/int_quest.h index 8d5cd5807..737213fff 100644 --- a/src/char/int_quest.h +++ b/src/char/int_quest.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c new file mode 100644 index 000000000..994e8110e --- /dev/null +++ b/src/char/int_rodex.c @@ -0,0 +1,560 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2017 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#define HERCULES_CORE + +#include "int_rodex.h" + +#include "char/char.h" +#include "char/inter.h" +#include "char/mapif.h" +#include "common/db.h" +#include "common/memmgr.h" +#include "common/mmo.h" +#include "common/nullpo.h" +#include "common/showmsg.h" +#include "common/socket.h" +#include "common/sql.h" +#include "common/strlib.h" +#include "common/timer.h" + +#include <stdio.h> +#include <stdlib.h> + +struct inter_rodex_interface inter_rodex_s; +struct inter_rodex_interface *inter_rodex; + +// Loads new mails of this char_id/account_id +static int inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails) +{ + int i, count = 0; + struct rodex_message msg = { 0 }; + struct SqlStmt *stmt; + struct SqlStmt *stmt_items; + + nullpo_retr(-1, mails); + + stmt = SQL->StmtMalloc(inter->sql_handle); + + switch (opentype) { + case RODEX_OPENTYPE_MAIL: + if (SQL_ERROR == SQL->StmtPrepare(stmt, + "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`," + "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`" + "FROM `%s` WHERE `expire_date` > '%d' AND `receiver_id` = '%d' AND `mail_id` > '%"PRId64"'" + "ORDER BY `mail_id` ASC", rodex_db, (int)time(NULL), char_id, mail_id) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + break; + + case RODEX_OPENTYPE_ACCOUNT: + if (SQL_ERROR == SQL->StmtPrepare(stmt, + "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`," + "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`" + "FROM `%s` WHERE " + "`expire_date` > '%d' AND `receiver_accountid` = '%d' AND `mail_id` > '%"PRId64"'" + "ORDER BY `mail_id` ASC", rodex_db, (int)time(NULL), account_id, mail_id) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + break; + + case RODEX_OPENTYPE_RETURN: + if (SQL_ERROR == SQL->StmtPrepare(stmt, + "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`," + "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`" + "FROM `%s` WHERE (`sender_id` = '%d' AND `expire_date` <= '%d' AND `send_date` + '%d' > '%d' AND `mail_id` > '%"PRId64"')" + "ORDER BY `mail_id` ASC", rodex_db, char_id, (int)time(NULL), 2 * RODEX_EXPIRE, (int)time(NULL), mail_id) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + break; + + case RODEX_OPENTYPE_UNSET: + if (SQL_ERROR == SQL->StmtPrepare(stmt, + "SELECT `mail_id`, `sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`," + "`title`, `body`, `zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`" + "FROM `%s` WHERE `expire_date` > '%d' AND (`receiver_id` = '%d' or `receiver_accountid` = '%d') AND `mail_id` > '%"PRId64"'" + "ORDER BY `mail_id` ASC", rodex_db, (int)time(NULL), char_id, account_id, mail_id) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + break; + } + + if (SQL_ERROR == SQL->StmtExecute(stmt) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT64, &msg.id, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_STRING, &msg.sender_name, sizeof(msg.sender_name), NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &msg.sender_id, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &msg.receiver_name, sizeof(msg.receiver_name), NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &msg.receiver_id, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &msg.receiver_accountid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_STRING, &msg.title, sizeof(msg.title), NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_STRING, &msg.body, sizeof(msg.body), NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &msg.zeny, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_UINT8, &msg.type, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_INT8, &msg.is_read, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_INT, &msg.send_date, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_INT, &msg.expire_date, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_INT, &msg.weight, 0, NULL, NULL) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return -1; + } + + stmt_items = SQL->StmtMalloc(inter->sql_handle); + if (stmt_items == NULL) { + SQL->StmtFreeResult(stmt); + SQL->StmtFree(stmt); + return -1; + } + + // Read mails + while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) { + struct item it = { 0 }; + + if (msg.type & MAIL_TYPE_ITEM) { + if (SQL_ERROR == SQL->StmtPrepare(stmt_items, "SELECT `nameid`, `amount`, `equip`, `identify`," + "`refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `opt_idx0`, `opt_val0`," + "`opt_idx1`, `opt_val1`, `opt_idx2`, `opt_val2`, `opt_idx3`, `opt_val3`, `opt_idx4`, `opt_val4`," + "`expire_time`, `bound`, `unique_id`" + "FROM `%s` WHERE mail_id = '%"PRId64"' ORDER BY `mail_id` ASC", rodex_item_db, msg.id) + || SQL_ERROR == SQL->StmtExecute(stmt_items) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 0, SQLDT_INT, &it.nameid, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 1, SQLDT_INT, &it.amount, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 2, SQLDT_UINT, &it.equip, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 3, SQLDT_INT8, &it.identify, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 4, SQLDT_INT8, &it.refine, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 5, SQLDT_INT8, &it.attribute, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 6, SQLDT_INT16, &it.card[0], 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 7, SQLDT_INT16, &it.card[1], 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 8, SQLDT_INT16, &it.card[2], 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 9, SQLDT_INT16, &it.card[3], 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 10, SQLDT_INT16, &it.option[0].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 11, SQLDT_INT16, &it.option[0].value, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 12, SQLDT_INT16, &it.option[1].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 13, SQLDT_INT16, &it.option[1].value, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 14, SQLDT_INT16, &it.option[2].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 15, SQLDT_INT16, &it.option[2].value, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 16, SQLDT_INT16, &it.option[3].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 17, SQLDT_INT16, &it.option[3].value, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 18, SQLDT_INT16, &it.option[4].index, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 19, SQLDT_INT16, &it.option[4].value, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 20, SQLDT_INT, &it.expire_time, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 21, SQLDT_UINT8, &it.bound, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt_items, 22, SQLDT_UINT64, &it.unique_id, 0, NULL, NULL)) { + SqlStmt_ShowDebug(stmt_items); + } + + for (i = 0; i < RODEX_MAX_ITEM && SQL_SUCCESS == SQL->StmtNextRow(stmt_items); ++i) { + msg.items[i].item = it; + msg.items_count++; + } + } + + if (msg.items_count == 0) { + msg.type &= ~MAIL_TYPE_ITEM; + } + + if (msg.zeny == 0) { + msg.type &= ~MAIL_TYPE_ZENY; + } + +#if PACKETVER >= 20170419 + if (opentype == RODEX_OPENTYPE_UNSET) { + if (msg.receiver_id != 0) + msg.opentype = RODEX_OPENTYPE_MAIL; + else + msg.opentype = RODEX_OPENTYPE_ACCOUNT; + } else { + msg.opentype = opentype; + } +#else + msg.opentype = opentype; +#endif +#if PACKETVER < 20160601 + // NPC Message Type isn't supported in old clients + msg.type &= ~MAIL_TYPE_NPC; +#endif + + ++count; + VECTOR_ENSURE(*mails, 1, 1); + VECTOR_PUSH(*mails, msg); + memset(&msg, 0, sizeof(struct rodex_message)); + } + + SQL->StmtFreeResult(stmt); + SQL->StmtFreeResult(stmt_items); + + SQL->StmtFree(stmt); + SQL->StmtFree(stmt_items); + + ShowInfo("rodex load complete from DB - id: %d (total: %d)\n", char_id, count); + return count; +} + +// Checks if user has non-read mails +static bool inter_rodex_hasnew(int char_id, int account_id) +{ + int count = 0; + char *data; + + if (SQL_ERROR == SQL->Query(inter->sql_handle, + "SELECT count(*) FROM `%s` WHERE (" + "(`expire_date` > '%d' AND (`receiver_id` = '%d' OR `receiver_accountid` = '%d')) OR" + "(`sender_id` = '%d' AND `expire_date` <= '%d' AND `send_date` + '%d' > '%d')" + ") AND (`is_read` = 0 OR (`type` > 0 AND `type` != 8))", + rodex_db, (int)time(NULL), char_id, account_id, + char_id, (int)time(NULL), 2 * RODEX_EXPIRE, (int)time(NULL)) + ) { + Sql_ShowDebug(inter->sql_handle); + return -1; + } + + if (SQL_SUCCESS != SQL->NextRow(inter->sql_handle)) + return false; + + SQL->GetData(inter->sql_handle, 0, &data, NULL); + count = atoi(data); + SQL->FreeResult(inter->sql_handle); + + return count > 0; +} + +/// Checks player name and retrieves some data +static bool inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) +{ + char esc_name[NAME_LENGTH * 2 + 1]; + bool found = false; + + nullpo_retr(false, name); + nullpo_retr(false, target_char_id); + nullpo_retr(false, target_class); + nullpo_retr(false, target_level); + + // Try to find the Dest Char by Name + SQL->EscapeStringLen(inter->sql_handle, esc_name, name, strnlen(name, NAME_LENGTH)); + if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `char_id`, `class`, `base_level` FROM `%s` WHERE `name` = '%s'", char_db, esc_name)) { + Sql_ShowDebug(inter->sql_handle); + } else { + if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) { + char *data; + SQL->GetData(inter->sql_handle, 0, &data, NULL); *target_char_id = atoi(data); + SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = (short)atoi(data); + SQL->GetData(inter->sql_handle, 2, &data, NULL); *target_level = atoi(data); + found = true; + } + } + SQL->FreeResult(inter->sql_handle); + + return found; +} + +/// Stores a single message in the database. +/// Returns the message's ID if successful (or 0 if it fails). +int64 inter_rodex_savemessage(struct rodex_message* msg) +{ + char sender_name[NAME_LENGTH * 2 + 1]; + char receiver_name[NAME_LENGTH * 2 + 1]; + char body[RODEX_BODY_LENGTH * 2 + 1]; + char title[RODEX_TITLE_LENGTH * 2 + 1]; + int i; + + nullpo_retr(false, msg); + + SQL->EscapeStringLen(inter->sql_handle, sender_name, msg->sender_name, strnlen(msg->sender_name, NAME_LENGTH)); + SQL->EscapeStringLen(inter->sql_handle, receiver_name, msg->receiver_name, strnlen(msg->receiver_name, NAME_LENGTH)); + SQL->EscapeStringLen(inter->sql_handle, body, msg->body, strnlen(msg->body, RODEX_BODY_LENGTH)); + SQL->EscapeStringLen(inter->sql_handle, title, msg->title, strnlen(msg->title, RODEX_TITLE_LENGTH)); + + if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`sender_name`, `sender_id`, `receiver_name`, `receiver_id`, `receiver_accountid`, `title`, `body`," + "`zeny`, `type`, `is_read`, `send_date`, `expire_date`, `weight`) VALUES " + "('%s', '%d', '%s', '%d', '%d', '%s', '%s', '%"PRId64"', '%d', '%d', '%d', '%d', '%d')", + rodex_db, sender_name, msg->sender_id, receiver_name, msg->receiver_id, msg->receiver_accountid, + title, body, msg->zeny, msg->type, msg->is_read == true ? 1 : 0, msg->send_date, msg->expire_date, msg->weight)) { + Sql_ShowDebug(inter->sql_handle); + return 0; + } + + msg->id = (int64)SQL->LastInsertId(inter->sql_handle); + + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + // Should we use statement here? [KIRIEZ] + struct item *it = &msg->items[i].item; + if (it->nameid == 0) + continue; + + if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`mail_id`, `nameid`, `amount`, `equip`, `identify`," + "`refine`, `attribute`, `card0`, `card1`, `card2`, `card3`, `opt_idx0`, `opt_val0`, `opt_idx1`, `opt_val1`, `opt_idx2`," + "`opt_val2`, `opt_idx3`, `opt_val3`, `opt_idx4`, `opt_val4`,`expire_time`, `bound`, `unique_id`) VALUES " + "('%"PRId64"', '%d', '%d', '%u', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%u', '%"PRIu64"')", + rodex_item_db, msg->id, it->nameid, it->amount, it->equip, it->identify, it->refine, it->attribute, it->card[0], it->card[1], it->card[2], it->card[3], + it->option[0].index, it->option[0].value, it->option[1].index, it->option[1].value, it->option[2].index, it->option[2].value, it->option[3].index, + it->option[3].value, it->option[4].index, it->option[4].value, it->expire_time, it->bound, it->unique_id) + ) { + Sql_ShowDebug(inter->sql_handle); + continue; + } + } + + return msg->id; +} + +/*========================================== + * Inbox Request + *------------------------------------------*/ +void mapif_rodex_sendinbox(int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails) +{ + int per_packet = (UINT16_MAX - 15) / sizeof(struct rodex_message); + int sent = 0; + nullpo_retv(mails); + Assert_retv(char_id > 0); + Assert_retv(count >= 0); + + do { + int i = 15, j, size, limit; + bool is_last = true; + + if (count <= per_packet) { + size = count * sizeof(struct rodex_message) + 15; + limit = count; + is_last = true; + } else { + int to_send = count - sent; + limit = min(to_send, per_packet); + if (limit != to_send) { + is_last = false; + } + size = limit * sizeof(struct rodex_message) + 15; + } + + WFIFOHEAD(fd, size); + WFIFOW(fd, 0) = 0x3895; + WFIFOW(fd, 2) = size; + WFIFOL(fd, 4) = char_id; + WFIFOB(fd, 8) = opentype; + WFIFOB(fd, 9) = flag; + WFIFOB(fd, 10) = is_last; + WFIFOL(fd, 11) = count; + for (j = 0; j < limit; ++j, ++sent, i += sizeof(struct rodex_message)) { + memcpy(WFIFOP(fd, i), &VECTOR_INDEX(*mails, sent), sizeof(struct rodex_message)); + } + WFIFOSET(fd, size); + } while (sent < count); +} + +void mapif_parse_rodex_requestinbox(int fd) +{ + int count; + int char_id = RFIFOL(fd,2); + int account_id = RFIFOL(fd, 6); + int8 flag = RFIFOB(fd, 10); + int8 opentype = RFIFOB(fd, 11); + int64 mail_id = RFIFOQ(fd, 12); + struct rodex_maillist mails = { 0 }; + + VECTOR_INIT(mails); + if (flag == 0) + count = inter_rodex->fromsql(char_id, account_id, opentype, 0, &mails); + else + count = inter_rodex->fromsql(char_id, account_id, opentype, mail_id, &mails); + mapif->rodex_sendinbox(fd, char_id, opentype, flag, count, &mails); + VECTOR_CLEAR(mails); +} + +/*========================================== +* Checks if there are new mails +*------------------------------------------*/ +void mapif_rodex_sendhasnew(int fd, int char_id, bool has_new) +{ + Assert_retv(char_id > 0); + + WFIFOHEAD(fd, 7); + WFIFOW(fd, 0) = 0x3896; + WFIFOL(fd, 2) = char_id; + WFIFOB(fd, 6) = has_new; + WFIFOSET(fd, 7); +} + +void mapif_parse_rodex_checkhasnew(int fd) +{ + int char_id = RFIFOL(fd, 2); + int account_id = RFIFOL(fd, 6); + bool has_new; + + Assert_retv(account_id >= START_ACCOUNT_NUM && account_id <= END_ACCOUNT_NUM); + Assert_retv(char_id >= START_CHAR_NUM); + + has_new = inter_rodex->hasnew(char_id, account_id); + mapif->rodex_sendhasnew(fd, char_id, has_new); +} + +/*========================================== + * Update/Delete mail + *------------------------------------------*/ +void mapif_parse_rodex_updatemail(int fd) +{ + int64 mail_id = RFIFOL(fd, 2); + int8 flag = RFIFOB(fd, 10); + + Assert_retv(mail_id > 0); + Assert_retv(flag >= 0 && flag <= 3); + + switch (flag) { + case 0: // Read + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `is_read` = 1 WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + break; + + case 1: // Get Zeny + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~2) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + break; + + case 2: // Get Items + if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_item_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `zeny` = 0, `type` = `type` & (~4) WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + break; + + case 3: // Delete Mail + if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + if (SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `mail_id` = '%"PRId64"'", rodex_item_db, mail_id)) + Sql_ShowDebug(inter->sql_handle); + break; + } +} + +/*========================================== + * Send Mail + *------------------------------------------*/ +void mapif_rodex_send(int fd, int sender_id, int receiver_id, int receiver_accountid, bool result) +{ + Assert_retv(sender_id >= 0); + Assert_retv(receiver_id + receiver_accountid > 0); + + WFIFOHEAD(fd,15); + WFIFOW(fd,0) = 0x3897; + WFIFOL(fd,2) = sender_id; + WFIFOL(fd,6) = receiver_id; + WFIFOL(fd,10) = receiver_accountid; + WFIFOB(fd,14) = result; + WFIFOSET(fd,15); +} + +void mapif_parse_rodex_send(int fd) +{ + struct rodex_message msg = { 0 }; + + if (RFIFOW(fd,2) != 4 + sizeof(struct rodex_message)) + return; + + memcpy(&msg, RFIFOP(fd,4), sizeof(struct rodex_message)); + if (msg.receiver_id > 0 || msg.receiver_accountid > 0) + msg.id = inter_rodex->savemessage(&msg); + + mapif->rodex_send(fd, msg.sender_id, msg.receiver_id, msg.receiver_accountid, msg.id > 0 ? true : false); +} + +/*------------------------------------------ + * Check Player + *------------------------------------------*/ +void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) +{ + nullpo_retv(name); + Assert_retv(reqchar_id > 0); + Assert_retv(target_char_id >= 0); + + WFIFOHEAD(fd, 16 + NAME_LENGTH); + WFIFOW(fd, 0) = 0x3898; + WFIFOL(fd, 2) = reqchar_id; + WFIFOL(fd, 6) = target_char_id; + WFIFOW(fd, 10) = target_class; + WFIFOL(fd, 12) = target_level; + safestrncpy(WFIFOP(fd, 16), name, NAME_LENGTH); + WFIFOSET(fd, 16 + NAME_LENGTH); +} + +void mapif_parse_rodex_checkname(int fd) +{ + int reqchar_id = RFIFOL(fd, 2); + char name[NAME_LENGTH]; + int target_char_id, target_level; + short target_class; + + safestrncpy(name, RFIFOP(fd, 6), NAME_LENGTH); + + if (inter_rodex->checkname(name, &target_char_id, &target_class, &target_level) == true) + mapif->rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); + else + mapif->rodex_checkname(fd, reqchar_id, 0, 0, 0, name); +} + +/*========================================== + * Packets From Map Server + *------------------------------------------*/ +int inter_rodex_parse_frommap(int fd) +{ + switch(RFIFOW(fd,0)) + { + case 0x3095: mapif->parse_rodex_requestinbox(fd); break; + case 0x3096: mapif->parse_rodex_checkhasnew(fd); break; + case 0x3097: mapif->parse_rodex_updatemail(fd); break; + case 0x3098: mapif->parse_rodex_send(fd); break; + case 0x3099: mapif->parse_rodex_checkname(fd); break; + default: + return 0; + } + return 1; +} + +int inter_rodex_sql_init(void) +{ + return 1; +} + +void inter_rodex_sql_final(void) +{ + return; +} + +void inter_rodex_defaults(void) +{ + inter_rodex = &inter_rodex_s; + + inter_rodex->savemessage = inter_rodex_savemessage; + inter_rodex->parse_frommap = inter_rodex_parse_frommap; + inter_rodex->sql_init = inter_rodex_sql_init; + inter_rodex->sql_final = inter_rodex_sql_final; + inter_rodex->fromsql = inter_rodex_fromsql; + inter_rodex->hasnew = inter_rodex_hasnew; + inter_rodex->checkname = inter_rodex_checkname; +} diff --git a/src/char/int_rodex.h b/src/char/int_rodex.h new file mode 100644 index 000000000..801ebcb89 --- /dev/null +++ b/src/char/int_rodex.h @@ -0,0 +1,47 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2017 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef CHAR_INT_RODEX_H +#define CHAR_INT_RODEX_H + +#include "common/mmo.h" +#include "common/db.h" + +struct item; + +/** + * inter_rodex interface + **/ +struct inter_rodex_interface { + int (*sql_init) (void); + void (*sql_final) (void); + int (*parse_frommap) (int fd); + int (*fromsql) (int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); + bool (*hasnew) (int char_id, int account_id); + bool (*checkname) (const char *name, int *target_char_id, short *target_class, int *target_level); + int64 (*savemessage) (struct rodex_message* msg); +}; + +#ifdef HERCULES_CORE +void inter_rodex_defaults(void); +#endif // HERCULES_CORE + +HPShared struct inter_rodex_interface *inter_rodex; + +#endif /* CHAR_INT_RODEX_H */ diff --git a/src/char/int_storage.c b/src/char/int_storage.c index e46a1c80f..aafba8520 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -41,30 +41,150 @@ struct inter_storage_interface inter_storage_s; struct inter_storage_interface *inter_storage; /// Save storage data to sql -int inter_storage_tosql(int account_id, struct storage_data* p) +int inter_storage_tosql(int account_id, const struct storage_data *p) { + int i = 0, j = 0; + bool matched_p[MAX_STORAGE] = { false }; + int delete[MAX_STORAGE] = { 0 }; + int total_deletes = 0, total_updates = 0, total_inserts = 0; + int total_changes = 0; + struct storage_data cp = { 0 }; + StringBuf buf; + nullpo_ret(p); - chr->memitemdata_to_sql(p->items, MAX_STORAGE, account_id, TABLE_STORAGE); - return 0; + + VECTOR_INIT(cp.item); + inter_storage->fromsql(account_id, &cp); + + StrBuf->Init(&buf); + + if (VECTOR_LENGTH(cp.item) > 0) { + /** + * Compare and update items, if any. + */ + for (i = 0; i < VECTOR_LENGTH(cp.item); i++) { + struct item *cp_it = &VECTOR_INDEX(cp.item, i); + struct item *p_it = NULL; + + ARR_FIND(0, VECTOR_LENGTH(p->item), j, + matched_p[j] != true + && (p_it = &VECTOR_INDEX(p->item, j)) != NULL + && cp_it->nameid == p_it->nameid + && cp_it->unique_id == p_it->unique_id + && memcmp(p_it->card, cp_it->card, sizeof(short) * MAX_SLOTS) == 0 + && memcmp(p_it->option, cp_it->option, 5 * MAX_ITEM_OPTIONS) == 0); + + if (j < VECTOR_LENGTH(p->item)) { + int k = 0; + if (memcmp(cp_it, p_it, sizeof(struct item)) != 0) { + if (total_updates == 0) { + StrBuf->Printf(&buf, "REPLACE INTO `%s` (`id`, `account_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`", storage_db); + for (k = 0; k < MAX_SLOTS; k++) + StrBuf->Printf(&buf, ", `card%d`", k); + for (k = 0; k < MAX_ITEM_OPTIONS; k++) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", k, k); + StrBuf->AppendStr(&buf, ", `expire_time`, `bound`, `unique_id`) VALUES"); + } + + StrBuf->Printf(&buf, "%s('%d', '%d', '%d', '%d', '%u', '%d', '%d', '%d'", + total_updates > 0 ? ", " : "", cp_it->id, account_id, p_it->nameid, p_it->amount, p_it->equip, p_it->identify, p_it->refine, p_it->attribute); + for (k = 0; k < MAX_SLOTS; k++) + StrBuf->Printf(&buf, ", '%d'", p_it->card[k]); + for (k = 0; k < MAX_ITEM_OPTIONS; ++k) + StrBuf->Printf(&buf, ", '%d', '%d'", p_it->option[k].index, p_it->option[k].value); + StrBuf->Printf(&buf, ", '%u', '%d', '%"PRIu64"')", p_it->expire_time, p_it->bound, p_it->unique_id); + + total_updates++; + } + matched_p[j] = true; + } else { // Does not exist, so set for deletion. + delete[total_deletes++] = cp_it->id; + } + } + + if (total_updates > 0 && SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) + Sql_ShowDebug(inter->sql_handle); + + /** + * Handle deletions, if any. + */ + if (total_deletes > 0) { + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE `id` IN (", storage_db); + for (i = 0; i < total_deletes; i++) { + StrBuf->Printf(&buf, "%s'%d'", i == 0 ? "" : ", ", delete[i]); + } + StrBuf->AppendStr(&buf, ");"); + + if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) + Sql_ShowDebug(inter->sql_handle); + } + } + + /** + * Check for new items. + */ + for (i = 0; i < VECTOR_LENGTH(p->item); i++) { + struct item *p_it = &VECTOR_INDEX(p->item, i); + + if (matched_p[i]) + continue; // Item is not a new entry, so lets continue. + + // Store the remaining items. + if (total_inserts == 0) { + StrBuf->Clear(&buf); + StrBuf->Printf(&buf, "INSERT INTO `%s` (`account_id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`", storage_db); + for (j = 0; j < MAX_SLOTS; ++j) + StrBuf->Printf(&buf, ", `card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); + StrBuf->AppendStr(&buf, ") VALUES "); + } + + StrBuf->Printf(&buf, "%s('%d', '%d', '%d', '%u', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", + total_inserts > 0 ? ", " : "", account_id, p_it->nameid, p_it->amount, p_it->equip, p_it->identify, p_it->refine, + p_it->attribute, p_it->expire_time, p_it->bound, p_it->unique_id); + for (j = 0; j < MAX_SLOTS; ++j) + StrBuf->Printf(&buf, ", '%d'", p_it->card[j]); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", '%d', '%d'", p_it->option[j].index, p_it->option[j].value); + StrBuf->AppendStr(&buf, ")"); + + total_inserts++; + } + + if (total_inserts > 0 && SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) + Sql_ShowDebug(inter->sql_handle); + + StrBuf->Destroy(&buf); + VECTOR_CLEAR(cp.item); + + total_changes = total_inserts + total_updates + total_deletes; + ShowInfo("storage save complete - id: %d (total: %d)\n", account_id, total_changes); + return total_changes; } /// Load storage data to mem -int inter_storage_fromsql(int account_id, struct storage_data* p) +int inter_storage_fromsql(int account_id, struct storage_data *p) { StringBuf buf; char* data; int i; int j; + int num_rows = 0; nullpo_ret(p); - memset(p, 0, sizeof(struct storage_data)); //clean up memory - p->storage_amount = 0; + + if (VECTOR_LENGTH(p->item) > 0) + VECTOR_CLEAR(p->item); // storage {`account_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`} StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`expire_time`,`bound`,`unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + for (j = 0; j < MAX_SLOTS; ++j) StrBuf->Printf(&buf, ",`card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ",`opt_idx%d`,`opt_val%d`", j, j); StrBuf->Printf(&buf, " FROM `%s` WHERE `account_id`='%d' ORDER BY `nameid`", storage_db, account_id); if (SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) @@ -72,35 +192,53 @@ int inter_storage_fromsql(int account_id, struct storage_data* p) StrBuf->Destroy(&buf); - for (i = 0; i < MAX_STORAGE && SQL_SUCCESS == SQL->NextRow(inter->sql_handle); ++i) { - struct item *item = &p->items[i]; - SQL->GetData(inter->sql_handle, 0, &data, NULL); item->id = atoi(data); - SQL->GetData(inter->sql_handle, 1, &data, NULL); item->nameid = atoi(data); - SQL->GetData(inter->sql_handle, 2, &data, NULL); item->amount = atoi(data); - SQL->GetData(inter->sql_handle, 3, &data, NULL); item->equip = atoi(data); - SQL->GetData(inter->sql_handle, 4, &data, NULL); item->identify = atoi(data); - SQL->GetData(inter->sql_handle, 5, &data, NULL); item->refine = atoi(data); - SQL->GetData(inter->sql_handle, 6, &data, NULL); item->attribute = atoi(data); - SQL->GetData(inter->sql_handle, 7, &data, NULL); item->expire_time = (unsigned int)atoi(data); - SQL->GetData(inter->sql_handle, 8, &data, NULL); item->bound = atoi(data); - SQL->GetData(inter->sql_handle, 9, &data, NULL); item->unique_id = strtoull(data, NULL, 10); - for( j = 0; j < MAX_SLOTS; ++j ) - { - SQL->GetData(inter->sql_handle, 10+j, &data, NULL); item->card[j] = atoi(data); + if ((num_rows = (int)SQL->NumRows(inter->sql_handle)) != 0) { + + VECTOR_ENSURE(p->item, num_rows > MAX_STORAGE ? MAX_STORAGE : num_rows, 1); + + for (i = 0; i < MAX_STORAGE && SQL_SUCCESS == SQL->NextRow(inter->sql_handle); ++i) { + struct item item = { 0 }; + SQL->GetData(inter->sql_handle, 0, &data, NULL); item.id = atoi(data); + SQL->GetData(inter->sql_handle, 1, &data, NULL); item.nameid = atoi(data); + SQL->GetData(inter->sql_handle, 2, &data, NULL); item.amount = atoi(data); + SQL->GetData(inter->sql_handle, 3, &data, NULL); item.equip = atoi(data); + SQL->GetData(inter->sql_handle, 4, &data, NULL); item.identify = atoi(data); + SQL->GetData(inter->sql_handle, 5, &data, NULL); item.refine = atoi(data); + SQL->GetData(inter->sql_handle, 6, &data, NULL); item.attribute = atoi(data); + SQL->GetData(inter->sql_handle, 7, &data, NULL); item.expire_time = (unsigned int)atoi(data); + SQL->GetData(inter->sql_handle, 8, &data, NULL); item.bound = atoi(data); + SQL->GetData(inter->sql_handle, 9, &data, NULL); item.unique_id = strtoull(data, NULL, 10); + + /* Card Slots */ + for (j = 0; j < MAX_SLOTS; ++j) { + SQL->GetData(inter->sql_handle, 10 + j, &data, NULL); + item.card[j] = atoi(data); + } + + /* Item Options */ + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { + SQL->GetData(inter->sql_handle, 10 + MAX_SLOTS + j * 2, &data, NULL); + item.option[j].index = atoi(data); + SQL->GetData(inter->sql_handle, 11 + MAX_SLOTS + j * 2, &data, NULL); + item.option[j].value = atoi(data); + } + + VECTOR_PUSH(p->item, item); } } - p->storage_amount = i; + SQL->FreeResult(inter->sql_handle); - ShowInfo("storage load complete from DB - id: %d (total: %d)\n", account_id, p->storage_amount); - return 1; + ShowInfo("storage load complete from DB - id: %d (total: %d)\n", account_id, VECTOR_LENGTH(p->item)); + + return VECTOR_LENGTH(p->item); } /// Save guild_storage data to sql int inter_storage_guild_storage_tosql(int guild_id, const struct guild_storage *p) { nullpo_ret(p); - chr->memitemdata_to_sql(p->items, MAX_GUILD_STORAGE, guild_id, TABLE_GUILD_STORAGE); + chr->memitemdata_to_sql(p->items, guild_id, TABLE_GUILD_STORAGE); ShowInfo ("guild storage save to DB - guild: %d\n", guild_id); return 0; } @@ -121,8 +259,10 @@ int inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage* p) // storage {`guild_id`/`id`/`nameid`/`amount`/`equip`/`identify`/`refine`/`attribute`/`card0`/`card1`/`card2`/`card3`} StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `id`,`nameid`,`amount`,`equip`,`identify`,`refine`,`attribute`,`bound`,`unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + for (j = 0; j < MAX_SLOTS; ++j) StrBuf->Printf(&buf, ",`card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); StrBuf->Printf(&buf, " FROM `%s` WHERE `guild_id`='%d' ORDER BY `nameid`", guild_storage_db, guild_id); if( SQL_ERROR == SQL->QueryStr(inter->sql_handle, StrBuf->Value(&buf))) @@ -142,9 +282,17 @@ int inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage* p) SQL->GetData(inter->sql_handle, 7, &data, NULL); item->bound = atoi(data); SQL->GetData(inter->sql_handle, 8, &data, NULL); item->unique_id = strtoull(data, NULL, 10); item->expire_time = 0; - - for( j = 0; j < MAX_SLOTS; ++j ) { - SQL->GetData(inter->sql_handle, 9+j, &data, NULL); item->card[j] = atoi(data); + /* Card Slots */ + for (j = 0; j < MAX_SLOTS; ++j) { + SQL->GetData(inter->sql_handle, 9 + j, &data, NULL); + item->card[j] = atoi(data); + } + /* Item Options */ + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { + SQL->GetData(inter->sql_handle, 9 + MAX_SLOTS + j * 2, &data, NULL); + item->option[j].index = atoi(data); + SQL->GetData(inter->sql_handle, 10 + MAX_SLOTS + j * 2, &data, NULL); + item->option[j].value = atoi(data); } } p->storage_amount = i; @@ -220,13 +368,125 @@ int mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail) return 0; } +//========================================================= +// Account Storage //--------------------------------------------------------- -// packet from map server +/** + * Parses account storage load request from map server. + * @packet 0x3010 [in] <account_id>.L + * @param fd [in] file/socket descriptor + * @return 1 on success, 0 on failure. + */ +int mapif_parse_AccountStorageLoad(int fd) +{ + int account_id = RFIFOL(fd, 2); + + Assert_ret(fd > 0); + Assert_ret(account_id > 0); + + mapif->account_storage_load(fd, account_id); + + return 1; +} + +/** + * Loads the account storage and send to the map server. + * @packet 0x3805 [out] <account_id>.L <struct item[]>.P + * @param fd [in] file/socket descriptor. + * @param account_id [in] account id of the session. + * @return 1 on success, 0 on failure. + */ +int mapif_account_storage_load(int fd, int account_id) +{ + struct storage_data stor = { 0 }; + int count = 0, i = 0, len = 0; + + Assert_ret(account_id > 0); + + VECTOR_INIT(stor.item); + count = inter_storage->fromsql(account_id, &stor); + + len = 8 + count * sizeof(struct item); + + WFIFOHEAD(fd, len); + WFIFOW(fd, 0) = 0x3805; + WFIFOW(fd, 2) = (uint16) len; + WFIFOL(fd, 4) = account_id; + for (i = 0; i < count; i++) + memcpy(WFIFOP(fd, 8 + i * sizeof(struct item)), &VECTOR_INDEX(stor.item, i), sizeof(struct item)); + WFIFOSET(fd, len); + + VECTOR_CLEAR(stor.item); + + return 1; +} + +/** + * Parses an account storage save request from the map server. + * @packet 0x3011 [in] <packet_len>.W <account_id>.L <struct item[]>.P + * @param fd [in] file/socket descriptor. + * @return 1 on success, 0 on failure. + */ +int mapif_parse_AccountStorageSave(int fd) +{ + int payload_size = RFIFOW(fd, 2) - 8, account_id = RFIFOL(fd, 4); + int i = 0, count = 0; + struct storage_data p_stor = { 0 }; + + Assert_ret(fd > 0); + Assert_ret(account_id > 0); + + count = payload_size/sizeof(struct item); + + VECTOR_INIT(p_stor.item); + + if (count > 0) { + VECTOR_ENSURE(p_stor.item, count, 1); + for (i = 0; i < count; i++) { + const struct item *it = RFIFOP(fd, 8 + i * sizeof(struct item)); + + VECTOR_PUSH(p_stor.item, *it); + } + + p_stor.aggregate = count; + } + + inter_storage->tosql(account_id, &p_stor); + + VECTOR_CLEAR(p_stor.item); + + mapif->sAccountStorageSaveAck(fd, account_id, true); + + return 1; +} + +/** + * Sends an acknowledgement for the save + * status of the account storage. + * @packet 0x3808 [out] <account_id>.L <save_flag>.B + * @param fd [in] File/Socket Descriptor. + * @param account_id [in] Account ID of the storage in question. + * @param flag [in] Save flag, true for success and false for failure. + */ +void mapif_send_AccountStorageSaveAck(int fd, int account_id, bool flag) +{ + WFIFOHEAD(fd, 7); + WFIFOW(fd, 0) = 0x3808; + WFIFOL(fd, 2) = account_id; + WFIFOB(fd, 6) = flag ? 1 : 0; + WFIFOSET(fd, 7); +} + +//========================================================= +// Guild Storage +//--------------------------------------------------------- int mapif_parse_LoadGuildStorage(int fd) { RFIFOHEAD(fd); + mapif->load_guild_storage(fd,RFIFOL(fd,2),RFIFOL(fd,6),1); + return 0; } @@ -254,6 +514,7 @@ int mapif_parse_SaveGuildStorage(int fd) SQL->FreeResult(inter->sql_handle); } mapif->save_guild_storage_ack(fd, RFIFOL(fd,4), guild_id, 1); + return 0; } @@ -288,8 +549,10 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd) StrBuf->Init(&buf); StrBuf->AppendStr(&buf, "SELECT `id`, `nameid`, `amount`, `equip`, `identify`, `refine`, `attribute`, `expire_time`, `bound`, `unique_id`"); - for( j = 0; j < MAX_SLOTS; ++j ) + for (j = 0; j < MAX_SLOTS; ++j) StrBuf->Printf(&buf, ", `card%d`", j); + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", j, j); StrBuf->Printf(&buf, " FROM `%s` WHERE `char_id`='%d' AND `bound` = '%d'",inventory_db,char_id,IBT_GUILD); stmt = SQL->StmtMalloc(inter->sql_handle); @@ -313,17 +576,22 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd) SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &item.expire_time, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 8, SQLDT_UCHAR, &item.bound, 0, NULL, NULL); SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, 0, NULL, NULL); - for( j = 0; j < MAX_SLOTS; ++j ) - SQL->StmtBindColumn(stmt, 10+j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); - - while( SQL_SUCCESS == SQL->StmtNextRow(stmt)) { + /* Card Slots */ + for (j = 0; j < MAX_SLOTS; ++j) + SQL->StmtBindColumn(stmt, 10 + j, SQLDT_SHORT, &item.card[j], 0, NULL, NULL); + /* Item Options */ + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { + SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].index, 0, NULL, NULL); + SQL->StmtBindColumn(stmt, 11 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].value, 0, NULL, NULL); + } + while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) { Assert_retb(i < MAX_INVENTORY); memcpy(&items[i],&item,sizeof(struct item)); i++; } SQL->FreeResult(inter->sql_handle); - if(!i) { //No items found - No need to continue + if (i == 0) { //No items found - No need to continue StrBuf->Destroy(&buf); SQL->StmtFree(stmt); return 0; @@ -408,24 +676,28 @@ int mapif_parse_ItemBoundRetrieve_sub(int fd) StrBuf->Printf(&buf,"INSERT INTO `%s` (`guild_id`,`nameid`,`amount`,`equip`,`identify`,`refine`," "`attribute`,`expire_time`,`bound`,`unique_id`", guild_storage_db); - for( s = 0; s < MAX_SLOTS; ++s ) + for (s = 0; s < MAX_SLOTS; ++s) StrBuf->Printf(&buf, ", `card%d`", s); + for (s = 0; s < MAX_ITEM_OPTIONS; ++s) + StrBuf->Printf(&buf, ", `opt_idx%d`, `opt_val%d`", s, s); StrBuf->AppendStr(&buf," ) VALUES "); - for( j = 0; j < i; ++j ) { - if( j ) + for (j = 0; j < i; ++j) { + if (j != 0) StrBuf->AppendStr(&buf, ","); StrBuf->Printf(&buf, "('%d', '%d', '%d', '%u', '%d', '%d', '%d', '%u', '%d', '%"PRIu64"'", guild_id, items[j].nameid, items[j].amount, items[j].equip, items[j].identify, items[j].refine, items[j].attribute, items[j].expire_time, items[j].bound, items[j].unique_id); - for( s = 0; s < MAX_SLOTS; ++s ) + for (s = 0; s < MAX_SLOTS; ++s) StrBuf->Printf(&buf, ", '%d'", items[j].card[s]); + for (s = 0; s < MAX_ITEM_OPTIONS; ++s) + StrBuf->Printf(&buf, ", '%d', '%d'", items[j].option[s].index, items[j].option[s].value); StrBuf->AppendStr(&buf, ")"); } - if( SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) - || SQL_ERROR == SQL->StmtExecute(stmt) ) + if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + || SQL_ERROR == SQL->StmtExecute(stmt)) { Sql_ShowDebug(inter->sql_handle); SQL->StmtFree(stmt); @@ -456,6 +728,8 @@ int inter_storage_parse_frommap(int fd) { RFIFOHEAD(fd); switch(RFIFOW(fd,0)){ + case 0x3010: mapif->pAccountStorageLoad(fd); break; + case 0x3011: mapif->pAccountStorageSave(fd); break; case 0x3018: mapif->parse_LoadGuildStorage(fd); break; case 0x3019: mapif->parse_SaveGuildStorage(fd); break; #ifdef GP_BOUND_ITEMS diff --git a/src/char/int_storage.h b/src/char/int_storage.h index 3c48c00ec..46bb6910f 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -21,6 +21,7 @@ #ifndef CHAR_INT_STORAGE_H #define CHAR_INT_STORAGE_H +#include "common/db.h" #include "common/hercules.h" struct storage_data; @@ -30,8 +31,8 @@ struct guild_storage; * inter_storage interface **/ struct inter_storage_interface { - int (*tosql) (int account_id, struct storage_data* p); - int (*fromsql) (int account_id, struct storage_data* p); + int (*tosql) (int account_id, const struct storage_data *p); + int (*fromsql) (int account_id, struct storage_data *p); int (*guild_storage_tosql) (int guild_id, const struct guild_storage *p); int (*guild_storage_fromsql) (int guild_id, struct guild_storage* p); int (*sql_init) (void); diff --git a/src/char/inter.c b/src/char/inter.c index 05f2bf4f6..557ee5313 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -33,6 +33,7 @@ #include "char/int_party.h" #include "char/int_pet.h" #include "char/int_quest.h" +#include "char/int_rodex.h" #include "char/int_storage.h" #include "char/mapif.h" #include "common/cbasetypes.h" @@ -68,7 +69,7 @@ int party_share_level = 10; // recv. packet list int inter_recv_packet_length[] = { -1,-1, 7,-1, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000- - 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- + 6,-1, 0, 0, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- Account Storage [Smokexyz] -1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- -1, 9, 0, 0, 0, 0, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- @@ -76,7 +77,7 @@ int inter_recv_packet_length[] = { 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] 48,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- - -1,10,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator] + -1,10,-1, 6, 0, 20,10,11, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets }; struct WisData { @@ -168,9 +169,9 @@ void inter_do_final_msg(void) aFree(msg_table[i]); } /* from pc.c due to @accinfo. any ideas to replace this crap are more than welcome. */ -const char* inter_job_name(int class_) +const char* inter_job_name(int class) { - switch (class_) { + switch (class) { case JOB_NOVICE: // 550 case JOB_SWORDMAN: // 551 case JOB_MAGE: // 552 @@ -178,7 +179,7 @@ const char* inter_job_name(int class_) case JOB_ACOLYTE: // 554 case JOB_MERCHANT: // 555 case JOB_THIEF: // 556 - return inter->msg_txt(550 - JOB_NOVICE+class_); + return inter->msg_txt(550 - JOB_NOVICE + class); case JOB_KNIGHT: // 557 case JOB_PRIEST: // 558 @@ -186,7 +187,7 @@ const char* inter_job_name(int class_) case JOB_BLACKSMITH: // 560 case JOB_HUNTER: // 561 case JOB_ASSASSIN: // 562 - return inter->msg_txt(557 - JOB_KNIGHT+class_); + return inter->msg_txt(557 - JOB_KNIGHT + class); case JOB_KNIGHT2: return inter->msg_txt(557); @@ -198,7 +199,7 @@ const char* inter_job_name(int class_) case JOB_ALCHEMIST: // 567 case JOB_BARD: // 568 case JOB_DANCER: // 569 - return inter->msg_txt(563 - JOB_CRUSADER+class_); + return inter->msg_txt(563 - JOB_CRUSADER + class); case JOB_CRUSADER2: return inter->msg_txt(563); @@ -208,7 +209,7 @@ const char* inter_job_name(int class_) case JOB_GUNSLINGER: // 572 case JOB_NINJA: // 573 case JOB_XMAS: // 574 - return inter->msg_txt(570 - JOB_WEDDING+class_); + return inter->msg_txt(570 - JOB_WEDDING + class); case JOB_SUMMER: return inter->msg_txt(621); @@ -220,7 +221,7 @@ const char* inter_job_name(int class_) case JOB_ACOLYTE_HIGH: // 579 case JOB_MERCHANT_HIGH: // 580 case JOB_THIEF_HIGH: // 581 - return inter->msg_txt(575 - JOB_NOVICE_HIGH+class_); + return inter->msg_txt(575 - JOB_NOVICE_HIGH + class); case JOB_LORD_KNIGHT: // 582 case JOB_HIGH_PRIEST: // 583 @@ -228,7 +229,7 @@ const char* inter_job_name(int class_) case JOB_WHITESMITH: // 585 case JOB_SNIPER: // 586 case JOB_ASSASSIN_CROSS: // 587 - return inter->msg_txt(582 - JOB_LORD_KNIGHT+class_); + return inter->msg_txt(582 - JOB_LORD_KNIGHT + class); case JOB_LORD_KNIGHT2: return inter->msg_txt(582); @@ -240,7 +241,7 @@ const char* inter_job_name(int class_) case JOB_CREATOR: // 592 case JOB_CLOWN: // 593 case JOB_GYPSY: // 594 - return inter->msg_txt(588 - JOB_PALADIN + class_); + return inter->msg_txt(588 - JOB_PALADIN + class); case JOB_PALADIN2: return inter->msg_txt(588); @@ -252,7 +253,7 @@ const char* inter_job_name(int class_) case JOB_BABY_ACOLYTE: // 599 case JOB_BABY_MERCHANT: // 600 case JOB_BABY_THIEF: // 601 - return inter->msg_txt(595 - JOB_BABY + class_); + return inter->msg_txt(595 - JOB_BABY + class); case JOB_BABY_KNIGHT: // 602 case JOB_BABY_PRIEST: // 603 @@ -260,7 +261,7 @@ const char* inter_job_name(int class_) case JOB_BABY_BLACKSMITH: // 605 case JOB_BABY_HUNTER: // 606 case JOB_BABY_ASSASSIN: // 607 - return inter->msg_txt(602 - JOB_BABY_KNIGHT + class_); + return inter->msg_txt(602 - JOB_BABY_KNIGHT + class); case JOB_BABY_KNIGHT2: return inter->msg_txt(602); @@ -272,7 +273,7 @@ const char* inter_job_name(int class_) case JOB_BABY_ALCHEMIST: // 612 case JOB_BABY_BARD: // 613 case JOB_BABY_DANCER: // 614 - return inter->msg_txt(608 - JOB_BABY_CRUSADER + class_); + return inter->msg_txt(608 - JOB_BABY_CRUSADER + class); case JOB_BABY_CRUSADER2: return inter->msg_txt(608); @@ -291,7 +292,7 @@ const char* inter_job_name(int class_) case JOB_GANGSI: // 622 case JOB_DEATH_KNIGHT: // 623 case JOB_DARK_COLLECTOR: // 624 - return inter->msg_txt(622 - JOB_GANGSI+class_); + return inter->msg_txt(622 - JOB_GANGSI + class); case JOB_RUNE_KNIGHT: // 625 case JOB_WARLOCK: // 626 @@ -299,7 +300,7 @@ const char* inter_job_name(int class_) case JOB_ARCH_BISHOP: // 628 case JOB_MECHANIC: // 629 case JOB_GUILLOTINE_CROSS: // 630 - return inter->msg_txt(625 - JOB_RUNE_KNIGHT+class_); + return inter->msg_txt(625 - JOB_RUNE_KNIGHT + class); case JOB_RUNE_KNIGHT_T: // 656 case JOB_WARLOCK_T: // 657 @@ -307,7 +308,7 @@ const char* inter_job_name(int class_) case JOB_ARCH_BISHOP_T: // 659 case JOB_MECHANIC_T: // 660 case JOB_GUILLOTINE_CROSS_T: // 661 - return inter->msg_txt(656 - JOB_RUNE_KNIGHT_T+class_); + return inter->msg_txt(656 - JOB_RUNE_KNIGHT_T + class); case JOB_ROYAL_GUARD: // 631 case JOB_SORCERER: // 632 @@ -316,7 +317,7 @@ const char* inter_job_name(int class_) case JOB_SURA: // 635 case JOB_GENETIC: // 636 case JOB_SHADOW_CHASER: // 637 - return inter->msg_txt(631 - JOB_ROYAL_GUARD+class_); + return inter->msg_txt(631 - JOB_ROYAL_GUARD + class); case JOB_ROYAL_GUARD_T: // 662 case JOB_SORCERER_T: // 663 @@ -325,7 +326,7 @@ const char* inter_job_name(int class_) case JOB_SURA_T: // 666 case JOB_GENETIC_T: // 667 case JOB_SHADOW_CHASER_T: // 668 - return inter->msg_txt(662 - JOB_ROYAL_GUARD_T+class_); + return inter->msg_txt(662 - JOB_ROYAL_GUARD_T + class); case JOB_RUNE_KNIGHT2: return inter->msg_txt(625); @@ -364,7 +365,7 @@ const char* inter_job_name(int class_) case JOB_BABY_SURA: // 648 case JOB_BABY_GENETIC: // 649 case JOB_BABY_CHASER: // 650 - return inter->msg_txt(638 - JOB_BABY_RUNE+class_); + return inter->msg_txt(638 - JOB_BABY_RUNE + class); case JOB_BABY_RUNE2: return inter->msg_txt(638); @@ -380,15 +381,18 @@ const char* inter_job_name(int class_) case JOB_SUPER_NOVICE_E: // 651 case JOB_SUPER_BABY_E: // 652 - return inter->msg_txt(651 - JOB_SUPER_NOVICE_E+class_); + return inter->msg_txt(651 - JOB_SUPER_NOVICE_E + class); case JOB_KAGEROU: // 653 case JOB_OBORO: // 654 - return inter->msg_txt(653 - JOB_KAGEROU+class_); + return inter->msg_txt(653 - JOB_KAGEROU + class); case JOB_REBELLION: return inter->msg_txt(655); + case JOB_SUMMONER: + return inter->msg_txt(669); + default: return inter->msg_txt(620); // "Unknown Job" } @@ -474,18 +478,18 @@ void mapif_parse_accinfo(int fd) } else {// more than one, listing... [Dekamaster/Nightroad] inter->msg_to_fd(fd, u_fd, aid, "Your query returned the following %d results, please be more specific...",(int)SQL->NumRows(inter->sql_handle)); while ( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) ) { - int class_; + int class; int base_level, job_level, online; char name[NAME_LENGTH]; SQL->GetData(inter->sql_handle, 0, &data, NULL); account_id = atoi(data); SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(name, data, sizeof(name)); - SQL->GetData(inter->sql_handle, 2, &data, NULL); class_ = atoi(data); + SQL->GetData(inter->sql_handle, 2, &data, NULL); class = atoi(data); SQL->GetData(inter->sql_handle, 3, &data, NULL); base_level = atoi(data); SQL->GetData(inter->sql_handle, 4, &data, NULL); job_level = atoi(data); SQL->GetData(inter->sql_handle, 5, &data, NULL); online = atoi(data); - inter->msg_to_fd(fd, u_fd, aid, "[AID: %d] %s | %s | Level: %d/%d | %s", account_id, name, inter->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, inter->job_name(class), base_level, job_level, online?"Online":"Offline"); } SQL->FreeResult(inter->sql_handle); return; @@ -546,19 +550,19 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc } else { while ( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) ) { char *data; - int char_id, class_; + int char_id, class; int char_num, base_level, job_level, online; char name[NAME_LENGTH]; SQL->GetData(inter->sql_handle, 0, &data, NULL); char_id = atoi(data); SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(name, data, sizeof(name)); SQL->GetData(inter->sql_handle, 2, &data, NULL); char_num = atoi(data); - SQL->GetData(inter->sql_handle, 3, &data, NULL); class_ = atoi(data); + SQL->GetData(inter->sql_handle, 3, &data, NULL); class = atoi(data); SQL->GetData(inter->sql_handle, 4, &data, NULL); base_level = atoi(data); SQL->GetData(inter->sql_handle, 5, &data, NULL); job_level = atoi(data); SQL->GetData(inter->sql_handle, 6, &data, NULL); online = atoi(data); - inter->msg_to_fd(map_fd, u_fd, u_aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, inter->job_name(class_), base_level, job_level, online?"On":"Off"); + inter->msg_to_fd(map_fd, u_fd, u_aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, inter->job_name(class), base_level, job_level, online?"On":"Off"); } } SQL->FreeResult(inter->sql_handle); @@ -971,6 +975,7 @@ int inter_init_sql(const char *file) inter_elemental->sql_init(); inter_mail->sql_init(); inter_auction->sql_init(); + inter_rodex->sql_init(); geoip->init(); inter->msg_config_read("conf/messages.conf", false); @@ -991,6 +996,7 @@ void inter_final(void) inter_elemental->sql_final(); inter_mail->sql_final(); inter_auction->sql_final(); + inter_rodex->sql_final(); geoip->final(true); inter->do_final_msg(); @@ -1413,6 +1419,7 @@ int inter_parse_frommap(int fd) || inter_mail->parse_frommap(fd) || inter_auction->parse_frommap(fd) || inter_quest->parse_frommap(fd) + || inter_rodex->parse_frommap(fd) ) break; else diff --git a/src/char/inter.h b/src/char/inter.h index dbbc6f4e8..796f89a96 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -39,7 +39,7 @@ struct inter_interface { const char* (*msg_txt) (int msg_number); bool (*msg_config_read) (const char *cfg_name, bool allow_override); void (*do_final_msg) (void); - const char* (*job_name) (int class_); + const char* (*job_name) (int class); void (*vmsg_to_fd) (int fd, int u_fd, int aid, char* msg, va_list ap); void (*msg_to_fd) (int fd, int u_fd, int aid, char *msg, ...) __attribute__((format(printf, 4, 5))); void (*savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string); diff --git a/src/char/loginif.c b/src/char/loginif.c index 1e457fcca..b0e18eb1f 100644 --- a/src/char/loginif.c +++ b/src/char/loginif.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/loginif.h b/src/char/loginif.h index d1bfe5c3c..daafdf4ac 100644 --- a/src/char/loginif.h +++ b/src/char/loginif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/char/mapif.c b/src/char/mapif.c index 91bfd884c..9fccd691b 100644 --- a/src/char/mapif.c +++ b/src/char/mapif.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -26,6 +26,7 @@ #include "char/int_auction.h" #include "char/int_guild.h" #include "char/int_homun.h" +#include "char/int_rodex.h" #include "common/cbasetypes.h" #include "common/mmo.h" #include "common/random.h" @@ -89,7 +90,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, const char *name, const stru int mapif_parse_GuildInfo(int fd, int guild_id); int mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_member *m); int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); -int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); +int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); int mapif_parse_BreakGuild(int fd, int guild_id); int mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len); int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len); @@ -182,10 +183,24 @@ void mapif_quest_save_ack(int fd, int char_id, bool success); int mapif_parse_quest_save(int fd); void mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests); int mapif_parse_quest_load(int fd); +/* RoDEX */ +int mapif_parse_rodex_requestinbox(int fd); +void mapif_rodex_sendinbox(int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails); +int mapif_parse_rodex_checkhasnew(int fd); +void mapif_rodex_sendhasnew(int fd, int char_id, bool has_new); +int mapif_parse_rodex_updatemail(int fd); +int mapif_parse_rodex_send(int fd); +void mapif_rodex_send(int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); +int mapif_parse_rodex_checkname(int fd); +void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); int mapif_load_guild_storage(int fd,int account_id,int guild_id, char flag); int mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail); int mapif_parse_LoadGuildStorage(int fd); int mapif_parse_SaveGuildStorage(int fd); +int mapif_account_storage_load(int fd, int account_id); +int mapif_parse_AccountStorageLoad(int fd); +int mapif_parse_AccountStorageSave(int fd); +void mapif_send_AccountStorageSaveAck(int fd, int account_id, bool save); int mapif_itembound_ack(int fd, int aid, int guild_id); int mapif_parse_ItemBoundRetrieve_sub(int fd); void mapif_parse_ItemBoundRetrieve(int fd); @@ -359,10 +374,24 @@ void mapif_defaults(void) { mapif->parse_quest_save = mapif_parse_quest_save; mapif->send_quests = mapif_send_quests; mapif->parse_quest_load = mapif_parse_quest_load; + /* RoDEX */ + mapif->parse_rodex_requestinbox = mapif_parse_rodex_requestinbox; + mapif->rodex_sendinbox = mapif_rodex_sendinbox; + mapif->parse_rodex_checkhasnew = mapif_parse_rodex_checkhasnew; + mapif->rodex_sendhasnew = mapif_rodex_sendhasnew; + mapif->parse_rodex_updatemail = mapif_parse_rodex_updatemail; + mapif->parse_rodex_send = mapif_parse_rodex_send; + mapif->rodex_send = mapif_rodex_send; + mapif->parse_rodex_checkname = mapif_parse_rodex_checkname; + mapif->rodex_checkname = mapif_rodex_checkname; mapif->load_guild_storage = mapif_load_guild_storage; mapif->save_guild_storage_ack = mapif_save_guild_storage_ack; mapif->parse_LoadGuildStorage = mapif_parse_LoadGuildStorage; mapif->parse_SaveGuildStorage = mapif_parse_SaveGuildStorage; + mapif->pAccountStorageLoad = mapif_parse_AccountStorageLoad; + mapif->pAccountStorageSave = mapif_parse_AccountStorageSave; + mapif->sAccountStorageSaveAck = mapif_send_AccountStorageSaveAck; + mapif->account_storage_load = mapif_account_storage_load; mapif->itembound_ack = mapif_itembound_ack; mapif->parse_ItemBoundRetrieve_sub = mapif_parse_ItemBoundRetrieve_sub; mapif->parse_ItemBoundRetrieve = mapif_parse_ItemBoundRetrieve; diff --git a/src/char/mapif.h b/src/char/mapif.h index 37d9444e2..a78940ba2 100644 --- a/src/char/mapif.h +++ b/src/char/mapif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -83,7 +83,7 @@ struct mapif_interface { int (*parse_GuildInfo) (int fd, int guild_id); int (*parse_GuildAddMember) (int fd, int guild_id, const struct guild_member *m); int (*parse_GuildLeave) (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); - int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); int (*parse_BreakGuild) (int fd, int guild_id); int (*parse_GuildMessage) (int fd, int guild_id, int account_id, const char *mes, int len); int (*parse_GuildBasicInfoChange) (int fd, int guild_id, int type, const void *data, int len); @@ -176,10 +176,23 @@ struct mapif_interface { int (*parse_quest_save) (int fd); void (*send_quests) (int fd, int char_id, struct quest *tmp_questlog, int num_quests); int (*parse_quest_load) (int fd); + int(*parse_rodex_requestinbox) (int fd); + void(*rodex_sendinbox) (int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails); + int(*parse_rodex_checkhasnew) (int fd); + void(*rodex_sendhasnew) (int fd, int char_id, bool has_new); + int(*parse_rodex_updatemail) (int fd); + int(*parse_rodex_send) (int fd); + void(*rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); + int(*parse_rodex_checkname) (int fd); + void(*rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); int (*load_guild_storage) (int fd, int account_id, int guild_id, char flag); int (*save_guild_storage_ack) (int fd, int account_id, int guild_id, int fail); int (*parse_LoadGuildStorage) (int fd); int (*parse_SaveGuildStorage) (int fd); + int (*account_storage_load) (int fd, int account_id); + int (*pAccountStorageLoad) (int fd); + int (*pAccountStorageSave) (int fd); + void (*sAccountStorageSaveAck) (int fd, int account_id, bool save); int (*itembound_ack) (int fd, int aid, int guild_id); int (*parse_ItemBoundRetrieve_sub) (int fd); void (*parse_ItemBoundRetrieve) (int fd); diff --git a/src/common/HPM.c b/src/common/HPM.c index dbe121940..c84b447e8 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -103,6 +103,7 @@ void hplugin_export_symbol(void *value, const char *name) void *hplugin_import_symbol(char *name, unsigned int pID) { int i; + nullpo_retr(NULL, name); ARR_FIND(0, VECTOR_LENGTH(HPM->symbols), i, strcmp(VECTOR_INDEX(HPM->symbols, i)->name, name) == 0); if (i != VECTOR_LENGTH(HPM->symbols)) @@ -133,6 +134,7 @@ bool hplugin_iscompatible(char* version) { bool hplugin_exists(const char *filename) { int i; + nullpo_retr(false, filename); for (i = 0; i < VECTOR_LENGTH(HPM->plugins); i++) { if (strcmpi(VECTOR_INDEX(HPM->plugins, i)->filename,filename) == 0) return true; @@ -259,6 +261,7 @@ void hplugins_addToHPData(enum HPluginDataTypes type, uint32 pluginID, struct hp return; } store = *storeptr; + nullpo_retv(store); /* duplicate check */ ARR_FIND(0, VECTOR_LENGTH(store->entries), i, VECTOR_INDEX(store->entries, i)->pluginID == pluginID && VECTOR_INDEX(store->entries, i)->classid == classid); @@ -447,7 +450,8 @@ bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *na return true; } -struct hplugin *hplugin_load(const char* filename) { +struct hplugin *hplugin_load(const char* filename) +{ struct hplugin *plugin; struct hplugin_info *info; struct HPMi_interface **HPMi; @@ -563,6 +567,7 @@ struct hplugin *hplugin_load(const char* filename) { /* id */ plugin->hpi->pid = plugin->idx; /* core */ + plugin->hpi->memmgr = HPMiMalloc; #ifdef CONSOLE_INPUT plugin->hpi->addCPCommand = console->input->addCommand; #endif // CONSOLE_INPUT @@ -596,6 +601,7 @@ struct hplugin *hplugin_load(const char* filename) { void hplugin_unload(struct hplugin* plugin) { int i; + nullpo_retv(plugin); if (plugin->filename) aFree(plugin->filename); if (plugin->dll) @@ -622,7 +628,8 @@ CMDLINEARG(loadplugin) /** * Reads the plugin configuration and loads the plugins as necessary. */ -void hplugins_config_read(void) { +void hplugins_config_read(void) +{ struct config_t plugins_conf; struct config_setting_t *plist = NULL; const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name @@ -788,6 +795,7 @@ const char *HPM_file2ptr(const char *file) { int i; + nullpo_retr(NULL, file); ARR_FIND(0, HPM->filenames.count, i, HPM->filenames.data[i].addr == file); if (i != HPM->filenames.count) { return HPM->filenames.data[i].name; @@ -801,19 +809,29 @@ const char *HPM_file2ptr(const char *file) return HPM->filenames.data[i].name; } -void* HPM_mmalloc(size_t size, const char *file, int line, const char *func) { + +void* HPM_mmalloc(size_t size, const char *file, int line, const char *func) +{ return iMalloc->malloc(size,HPM_file2ptr(file),line,func); } -void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + +void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char *func) +{ return iMalloc->calloc(num,size,HPM_file2ptr(file),line,func); } -void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) { + +void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) +{ return iMalloc->realloc(p,size,HPM_file2ptr(file),line,func); } -void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + +void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) +{ return iMalloc->reallocz(p,size,HPM_file2ptr(file),line,func); } -char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { + +char* HPM_astrdup(const char *p, const char *file, int line, const char *func) +{ return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } @@ -849,6 +867,7 @@ bool hplugins_get_battle_conf(const char *w1, int *value) { int i; + nullpo_retr(false, w1); nullpo_retr(false, value); ARR_FIND(0, VECTOR_LENGTH(HPM->config_listeners[HPCT_BATTLE]), i, strcmpi(w1, VECTOR_INDEX(HPM->config_listeners[HPCT_BATTLE], i).key) == 0); @@ -880,7 +899,7 @@ bool hplugins_parse_conf(const struct config_t *config, const char *filename, en for (i = 0; i < VECTOR_LENGTH(HPM->config_listeners[point]); i++) { const struct HPConfListenStorage *entry = &VECTOR_INDEX(HPM->config_listeners[point], i); const char *config_name = entry->key; - const char *str = buf; + const char *str = NULL; if ((setting = libconfig->lookup(config, config_name)) == NULL) { if (!imported && entry->required) { ShowWarning("Missing configuration '%s' in file %s!\n", config_name, filename); @@ -1012,9 +1031,11 @@ void hplugin_data_store_create(struct hplugin_data_store **storeptr, enum HPlugi /** * Called by HPM->DataCheck on a plugins incoming data, ensures data structs in use are matching! **/ -bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, char *name) { +bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, char *name) +{ unsigned int i, j; + nullpo_retr(false, src); if (version != datacheck_version) { ShowError("HPMDataCheck:%s: DataCheck API version mismatch %d != %d\n", name, datacheck_version, version); return false; @@ -1039,7 +1060,8 @@ bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, c return true; } -void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, int version) { +void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, int version) +{ unsigned int i; datacheck_version = version; @@ -1055,11 +1077,13 @@ void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, i } } -void HPM_datacheck_final(void) { +void HPM_datacheck_final(void) +{ db_destroy(datacheck_db); } -void hpm_init(void) { +void hpm_init(void) +{ int i; datacheck_db = NULL; datacheck_data = NULL; @@ -1070,8 +1094,8 @@ void hpm_init(void) { HPM->off = false; - memcpy(&iMalloc_HPM, iMalloc, sizeof(struct malloc_interface)); HPMiMalloc = &iMalloc_HPM; + *HPMiMalloc = *iMalloc; HPMiMalloc->malloc = HPM_mmalloc; HPMiMalloc->calloc = HPM_calloc; HPMiMalloc->realloc = HPM_realloc; @@ -1151,6 +1175,7 @@ void hpm_final(void) return; } + void hpm_defaults(void) { HPM = &HPM_s; diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index d0e23811c..7480269e5 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2014-2016 Hercules Dev Team + * Copyright (C) 2014-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -101,6 +101,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #else #define CHAR_INT_QUEST_H #endif // CHAR_INT_QUEST_H + #ifdef CHAR_INT_RODEX_H + { "inter_rodex_interface", sizeof(struct inter_rodex_interface), SERVER_TYPE_CHAR }, + #else + #define CHAR_INT_RODEX_H + #endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H { "inter_storage_interface", sizeof(struct inter_storage_interface), SERVER_TYPE_CHAR }, #else @@ -207,6 +212,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "party_member", sizeof(struct party_member), SERVER_TYPE_ALL }, { "point", sizeof(struct point), SERVER_TYPE_ALL }, { "quest", sizeof(struct quest), SERVER_TYPE_ALL }, + { "rodex_maillist", sizeof(struct rodex_maillist), SERVER_TYPE_ALL }, + { "rodex_message", sizeof(struct rodex_message), SERVER_TYPE_ALL }, { "s_elemental", sizeof(struct s_elemental), SERVER_TYPE_ALL }, { "s_friend", sizeof(struct s_friend), SERVER_TYPE_ALL }, { "s_homunculus", sizeof(struct s_homunculus), SERVER_TYPE_ALL }, @@ -452,6 +459,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "item_combo", sizeof(struct item_combo), SERVER_TYPE_MAP }, { "item_data", sizeof(struct item_data), SERVER_TYPE_MAP }, { "item_group", sizeof(struct item_group), SERVER_TYPE_MAP }, + { "item_option", sizeof(struct item_option), SERVER_TYPE_MAP }, { "item_package", sizeof(struct item_package), SERVER_TYPE_MAP }, { "item_package_must_entry", sizeof(struct item_package_must_entry), SERVER_TYPE_MAP }, { "item_package_rand_entry", sizeof(struct item_package_rand_entry), SERVER_TYPE_MAP }, @@ -542,8 +550,33 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #ifdef MAP_PACKETS_STRUCT_H { "EQUIPITEM_INFO", sizeof(struct EQUIPITEM_INFO), SERVER_TYPE_MAP }, { "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO), SERVER_TYPE_MAP }, + { "ItemOptions", sizeof(struct ItemOptions), SERVER_TYPE_MAP }, { "NORMALITEM_INFO", sizeof(struct NORMALITEM_INFO), SERVER_TYPE_MAP }, - { "RndOptions", sizeof(struct RndOptions), SERVER_TYPE_MAP }, + { "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_DELETE_MAIL", sizeof(struct PACKET_CZ_REQ_DELETE_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_ITEM_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ITEM_FROM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_NEXT_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_NEXT_MAIL_LIST), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_OPEN_MAIL", sizeof(struct PACKET_CZ_REQ_OPEN_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_OPEN_WRITE_MAIL", sizeof(struct PACKET_CZ_REQ_OPEN_WRITE_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_READ_MAIL", sizeof(struct PACKET_CZ_REQ_READ_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_REFRESH_MAIL_LIST", sizeof(struct PACKET_CZ_REQ_REFRESH_MAIL_LIST), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_REMOVE_ITEM_MAIL", sizeof(struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_REQ_ZENY_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ZENY_FROM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_CZ_SEND_MAIL", sizeof(struct PACKET_CZ_SEND_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_DELETE_MAIL", sizeof(struct PACKET_ZC_ACK_DELETE_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_ITEM_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ITEM_FROM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_OPEN_WRITE_MAIL", sizeof(struct PACKET_ZC_ACK_OPEN_WRITE_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_REMOVE_ITEM_MAIL", sizeof(struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ACK_ZENY_FROM_MAIL", sizeof(struct PACKET_ZC_ACK_ZENY_FROM_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_ZC_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_CHECKNAME", sizeof(struct PACKET_ZC_CHECKNAME), SERVER_TYPE_MAP }, + { "PACKET_ZC_MAIL_LIST", sizeof(struct PACKET_ZC_MAIL_LIST), SERVER_TYPE_MAP }, + { "PACKET_ZC_NOTIFY_UNREADMAIL", sizeof(struct PACKET_ZC_NOTIFY_UNREADMAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP }, + { "PACKET_ZC_WRITE_MAIL_RESULT", sizeof(struct PACKET_ZC_WRITE_MAIL_RESULT), SERVER_TYPE_MAP }, + { "mail_item", sizeof(struct mail_item), SERVER_TYPE_MAP }, + { "maillistinfo", sizeof(struct maillistinfo), SERVER_TYPE_MAP }, { "packet_additem", sizeof(struct packet_additem), SERVER_TYPE_MAP }, { "packet_authok", sizeof(struct packet_authok), SERVER_TYPE_MAP }, { "packet_banking_check", sizeof(struct packet_banking_check), SERVER_TYPE_MAP }, @@ -671,6 +704,11 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #else #define MAP_QUEST_H #endif // MAP_QUEST_H + #ifdef MAP_RODEX_H + { "rodex_interface", sizeof(struct rodex_interface), SERVER_TYPE_MAP }, + #else + #define MAP_RODEX_H + #endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H { "Script_Config", sizeof(struct Script_Config), SERVER_TYPE_MAP }, { "casecheck_data", sizeof(struct casecheck_data), SERVER_TYPE_MAP }, diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h index 7ccb960de..5ee8a014b 100644 --- a/src/common/HPMSymbols.inc.h +++ b/src/common/HPMSymbols.inc.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -125,6 +125,9 @@ struct inter_pet_interface *inter_pet; #ifdef CHAR_INT_QUEST_H /* inter_quest */ struct inter_quest_interface *inter_quest; #endif // CHAR_INT_QUEST_H +#ifdef CHAR_INT_RODEX_H /* inter_rodex */ +struct inter_rodex_interface *inter_rodex; +#endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H /* inter_storage */ struct inter_storage_interface *inter_storage; #endif // CHAR_INT_STORAGE_H @@ -155,9 +158,6 @@ struct loginif_interface *loginif; #ifdef MAP_MAIL_H /* mail */ struct mail_interface *mail; #endif // MAP_MAIL_H -#ifdef COMMON_MEMMGR_H /* iMalloc */ -struct malloc_interface *iMalloc; -#endif // COMMON_MEMMGR_H #ifdef MAP_MAP_H /* map */ struct map_interface *map; #endif // MAP_MAP_H @@ -221,6 +221,9 @@ struct quest_interface *quest; #ifdef COMMON_RANDOM_H /* rnd */ struct rnd_interface *rnd; #endif // COMMON_RANDOM_H +#ifdef MAP_RODEX_H /* rodex */ +struct rodex_interface *rodex; +#endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H /* script */ struct script_interface *script; #endif // MAP_SCRIPT_H @@ -277,250 +280,336 @@ struct vending_interface *vending; HPExport const char *HPM_shared_symbols(int server_type) { #ifdef COMMON_UTILS_H /* HCache */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("HCache", HCache)) return "HCache"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("HCache", HCache)) + return "HCache"; #endif // COMMON_UTILS_H #ifdef MAP_ATCOMMAND_H /* atcommand */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("atcommand", atcommand)) return "atcommand"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("atcommand", atcommand)) + return "atcommand"; #endif // MAP_ATCOMMAND_H #ifdef MAP_BATTLE_H /* battle */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("battle", battle)) return "battle"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("battle", battle)) + return "battle"; #endif // MAP_BATTLE_H #ifdef MAP_BATTLEGROUND_H /* bg */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("battlegrounds", bg)) return "battlegrounds"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("battlegrounds", bg)) + return "battlegrounds"; #endif // MAP_BATTLEGROUND_H #ifdef MAP_BUYINGSTORE_H /* buyingstore */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("buyingstore", buyingstore)) return "buyingstore"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("buyingstore", buyingstore)) + return "buyingstore"; #endif // MAP_BUYINGSTORE_H #ifdef MAP_CHANNEL_H /* channel */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("channel", channel)) return "channel"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("channel", channel)) + return "channel"; #endif // MAP_CHANNEL_H #ifdef CHAR_CHAR_H /* chr */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("chr", chr)) return "chr"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("chr", chr)) + return "chr"; #endif // CHAR_CHAR_H #ifdef MAP_CHAT_H /* chat */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("chat", chat)) return "chat"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("chat", chat)) + return "chat"; #endif // MAP_CHAT_H #ifdef MAP_CHRIF_H /* chrif */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("chrif", chrif)) return "chrif"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("chrif", chrif)) + return "chrif"; #endif // MAP_CHRIF_H #ifdef MAP_CLIF_H /* clif */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("clif", clif)) return "clif"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("clif", clif)) + return "clif"; #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("cmdline", cmdline)) return "cmdline"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("cmdline", cmdline)) + return "cmdline"; #endif // COMMON_CORE_H #ifdef COMMON_CONSOLE_H /* console */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("console", console)) return "console"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("console", console)) + return "console"; #endif // COMMON_CONSOLE_H #ifdef COMMON_CORE_H /* core */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("core", core)) return "core"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("core", core)) + return "core"; #endif // COMMON_CORE_H #ifdef COMMON_DB_H /* DB */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("DB", DB)) return "DB"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("DB", DB)) + return "DB"; #endif // COMMON_DB_H #ifdef COMMON_DES_H /* des */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("des", des)) return "des"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("des", des)) + return "des"; #endif // COMMON_DES_H #ifdef MAP_DUEL_H /* duel */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("duel", duel)) return "duel"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("duel", duel)) + return "duel"; #endif // MAP_DUEL_H #ifdef MAP_ELEMENTAL_H /* elemental */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("elemental", elemental)) return "elemental"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("elemental", elemental)) + return "elemental"; #endif // MAP_ELEMENTAL_H #ifdef CHAR_GEOIP_H /* geoip */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("geoip", geoip)) return "geoip"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("geoip", geoip)) + return "geoip"; #endif // CHAR_GEOIP_H #ifdef COMMON_GRFIO_H /* grfio */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("grfio", grfio)) return "grfio"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("grfio", grfio)) + return "grfio"; #endif // COMMON_GRFIO_H #ifdef MAP_GUILD_H /* guild */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("guild", guild)) return "guild"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("guild", guild)) + return "guild"; #endif // MAP_GUILD_H #ifdef MAP_STORAGE_H /* gstorage */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("gstorage", gstorage)) return "gstorage"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("gstorage", gstorage)) + return "gstorage"; #endif // MAP_STORAGE_H #ifdef MAP_HOMUNCULUS_H /* homun */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("homun", homun)) return "homun"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("homun", homun)) + return "homun"; #endif // MAP_HOMUNCULUS_H #ifdef MAP_INSTANCE_H /* instance */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("instance", instance)) return "instance"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("instance", instance)) + return "instance"; #endif // MAP_INSTANCE_H #ifdef CHAR_INT_AUCTION_H /* inter_auction */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_auction", inter_auction)) return "inter_auction"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_auction", inter_auction)) + return "inter_auction"; #endif // CHAR_INT_AUCTION_H #ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_elemental", inter_elemental)) return "inter_elemental"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_elemental", inter_elemental)) + return "inter_elemental"; #endif // CHAR_INT_ELEMENTAL_H #ifdef CHAR_INT_GUILD_H /* inter_guild */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_guild", inter_guild)) return "inter_guild"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_guild", inter_guild)) + return "inter_guild"; #endif // CHAR_INT_GUILD_H #ifdef CHAR_INT_HOMUN_H /* inter_homunculus */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_homunculus", inter_homunculus)) return "inter_homunculus"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_homunculus", inter_homunculus)) + return "inter_homunculus"; #endif // CHAR_INT_HOMUN_H #ifdef CHAR_INTER_H /* inter */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter", inter)) return "inter"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter", inter)) + return "inter"; #endif // CHAR_INTER_H #ifdef CHAR_INT_MAIL_H /* inter_mail */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_mail", inter_mail)) return "inter_mail"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_mail", inter_mail)) + return "inter_mail"; #endif // CHAR_INT_MAIL_H #ifdef CHAR_INT_MERCENARY_H /* inter_mercenary */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_mercenary", inter_mercenary)) return "inter_mercenary"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_mercenary", inter_mercenary)) + return "inter_mercenary"; #endif // CHAR_INT_MERCENARY_H #ifdef CHAR_INT_PARTY_H /* inter_party */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_party", inter_party)) return "inter_party"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_party", inter_party)) + return "inter_party"; #endif // CHAR_INT_PARTY_H #ifdef CHAR_INT_PET_H /* inter_pet */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_pet", inter_pet)) return "inter_pet"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_pet", inter_pet)) + return "inter_pet"; #endif // CHAR_INT_PET_H #ifdef CHAR_INT_QUEST_H /* inter_quest */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_quest", inter_quest)) return "inter_quest"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_quest", inter_quest)) + return "inter_quest"; #endif // CHAR_INT_QUEST_H +#ifdef CHAR_INT_RODEX_H /* inter_rodex */ + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_rodex", inter_rodex)) + return "inter_rodex"; +#endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H /* inter_storage */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_storage", inter_storage)) return "inter_storage"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("inter_storage", inter_storage)) + return "inter_storage"; #endif // CHAR_INT_STORAGE_H #ifdef MAP_INTIF_H /* intif */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("intif", intif)) return "intif"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("intif", intif)) + return "intif"; #endif // MAP_INTIF_H #ifdef MAP_IRC_BOT_H /* ircbot */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("ircbot", ircbot)) return "ircbot"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("ircbot", ircbot)) + return "ircbot"; #endif // MAP_IRC_BOT_H #ifdef MAP_ITEMDB_H /* itemdb */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("itemdb", itemdb)) return "itemdb"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("itemdb", itemdb)) + return "itemdb"; #endif // MAP_ITEMDB_H #ifdef LOGIN_LCLIF_H /* lclif */ -if ((server_type&(SERVER_TYPE_LOGIN)) && !HPM_SYMBOL("lclif", lclif)) return "lclif"; + if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("lclif", lclif)) + return "lclif"; #endif // LOGIN_LCLIF_H #ifdef COMMON_CONF_H /* libconfig */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("libconfig", libconfig)) return "libconfig"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("libconfig", libconfig)) + return "libconfig"; #endif // COMMON_CONF_H #ifdef MAP_LOG_H /* logs */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("logs", logs)) return "logs"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("logs", logs)) + return "logs"; #endif // MAP_LOG_H #ifdef LOGIN_LOGIN_H /* login */ -if ((server_type&(SERVER_TYPE_LOGIN)) && !HPM_SYMBOL("login", login)) return "login"; + if ((server_type&(SERVER_TYPE_LOGIN)) != 0 && !HPM_SYMBOL("login", login)) + return "login"; #endif // LOGIN_LOGIN_H #ifdef CHAR_LOGINIF_H /* loginif */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("loginif", loginif)) return "loginif"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("loginif", loginif)) + return "loginif"; #endif // CHAR_LOGINIF_H #ifdef MAP_MAIL_H /* mail */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mail", mail)) return "mail"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mail", mail)) + return "mail"; #endif // MAP_MAIL_H -#ifdef COMMON_MEMMGR_H /* iMalloc */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("iMalloc", iMalloc)) return "iMalloc"; -#endif // COMMON_MEMMGR_H #ifdef MAP_MAP_H /* map */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("map", map)) return "map"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("map", map)) + return "map"; #endif // MAP_MAP_H #ifdef CHAR_MAPIF_H /* mapif */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("mapif", mapif)) return "mapif"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("mapif", mapif)) + return "mapif"; #endif // CHAR_MAPIF_H #ifdef COMMON_MAPINDEX_H /* mapindex */ -if ((server_type&(SERVER_TYPE_MAP|SERVER_TYPE_CHAR)) && !HPM_SYMBOL("mapindex", mapindex)) return "mapindex"; + if ((server_type&(SERVER_TYPE_MAP|SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("mapindex", mapindex)) + return "mapindex"; #endif // COMMON_MAPINDEX_H #ifdef MAP_MAP_H /* mapit */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mapit", mapit)) return "mapit"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mapit", mapit)) + return "mapit"; #endif // MAP_MAP_H #ifdef MAP_MAPREG_H /* mapreg */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mapreg", mapreg)) return "mapreg"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mapreg", mapreg)) + return "mapreg"; #endif // MAP_MAPREG_H #ifdef COMMON_MD5CALC_H /* md5 */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("md5", md5)) return "md5"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("md5", md5)) + return "md5"; #endif // COMMON_MD5CALC_H #ifdef MAP_MERCENARY_H /* mercenary */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mercenary", mercenary)) return "mercenary"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mercenary", mercenary)) + return "mercenary"; #endif // MAP_MERCENARY_H #ifdef MAP_MOB_H /* mob */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mob", mob)) return "mob"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("mob", mob)) + return "mob"; #endif // MAP_MOB_H #ifdef COMMON_MUTEX_H /* mutex */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("mutex", mutex)) return "mutex"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("mutex", mutex)) + return "mutex"; #endif // COMMON_MUTEX_H #ifdef MAP_NPC_H /* npc_chat */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("npc_chat", npc_chat)) return "npc_chat"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("npc_chat", npc_chat)) + return "npc_chat"; #endif // MAP_NPC_H #ifdef MAP_NPC_H /* npc */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("npc", npc)) return "npc"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("npc", npc)) + return "npc"; #endif // MAP_NPC_H #ifdef COMMON_NULLPO_H /* nullpo */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("nullpo", nullpo)) return "nullpo"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("nullpo", nullpo)) + return "nullpo"; #endif // COMMON_NULLPO_H #ifdef MAP_PARTY_H /* party */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("party", party)) return "party"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("party", party)) + return "party"; #endif // MAP_PARTY_H #ifdef MAP_PATH_H /* path */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("path", path)) return "path"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("path", path)) + return "path"; #endif // MAP_PATH_H #ifdef MAP_PC_GROUPS_H /* pcg */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc_groups", pcg)) return "pc_groups"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("pc_groups", pcg)) + return "pc_groups"; #endif // MAP_PC_GROUPS_H #ifdef MAP_PC_H /* pc */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc", pc)) return "pc"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("pc", pc)) + return "pc"; #endif // MAP_PC_H #ifdef MAP_NPC_H /* libpcre */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("libpcre", libpcre)) return "libpcre"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("libpcre", libpcre)) + return "libpcre"; #endif // MAP_NPC_H #ifdef MAP_PET_H /* pet */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pet", pet)) return "pet"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("pet", pet)) + return "pet"; #endif // MAP_PET_H #ifdef CHAR_PINCODE_H /* pincode */ -if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("pincode", pincode)) return "pincode"; + if ((server_type&(SERVER_TYPE_CHAR)) != 0 && !HPM_SYMBOL("pincode", pincode)) + return "pincode"; #endif // CHAR_PINCODE_H #ifdef MAP_QUEST_H /* quest */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("quest", quest)) return "quest"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("quest", quest)) + return "quest"; #endif // MAP_QUEST_H #ifdef COMMON_RANDOM_H /* rnd */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("rnd", rnd)) return "rnd"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("rnd", rnd)) + return "rnd"; #endif // COMMON_RANDOM_H +#ifdef MAP_RODEX_H /* rodex */ + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("rodex", rodex)) + return "rodex"; +#endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H /* script */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("script", script)) return "script"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("script", script)) + return "script"; #endif // MAP_SCRIPT_H #ifdef MAP_SEARCHSTORE_H /* searchstore */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("searchstore", searchstore)) return "searchstore"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("searchstore", searchstore)) + return "searchstore"; #endif // MAP_SEARCHSTORE_H #ifdef COMMON_SHOWMSG_H /* showmsg */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("showmsg", showmsg)) return "showmsg"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("showmsg", showmsg)) + return "showmsg"; #endif // COMMON_SHOWMSG_H #ifdef MAP_SKILL_H /* skill */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("skill", skill)) return "skill"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("skill", skill)) + return "skill"; #endif // MAP_SKILL_H #ifdef COMMON_SOCKET_H /* sockt */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sockt", sockt)) return "sockt"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("sockt", sockt)) + return "sockt"; #endif // COMMON_SOCKET_H #ifdef COMMON_SQL_H /* SQL */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("SQL", SQL)) return "SQL"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("SQL", SQL)) + return "SQL"; #endif // COMMON_SQL_H #ifdef MAP_STATUS_H /* status */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("status", status)) return "status"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("status", status)) + return "status"; #endif // MAP_STATUS_H #ifdef MAP_STORAGE_H /* storage */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("storage", storage)) return "storage"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("storage", storage)) + return "storage"; #endif // MAP_STORAGE_H #ifdef COMMON_STRLIB_H /* StrBuf */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("StrBuf", StrBuf)) return "StrBuf"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("StrBuf", StrBuf)) + return "StrBuf"; #endif // COMMON_STRLIB_H #ifdef COMMON_STRLIB_H /* strlib */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("strlib", strlib)) return "strlib"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("strlib", strlib)) + return "strlib"; #endif // COMMON_STRLIB_H #ifdef COMMON_STRLIB_H /* sv */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sv", sv)) return "sv"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("sv", sv)) + return "sv"; #endif // COMMON_STRLIB_H #ifdef COMMON_SYSINFO_H /* sysinfo */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sysinfo", sysinfo)) return "sysinfo"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("sysinfo", sysinfo)) + return "sysinfo"; #endif // COMMON_SYSINFO_H #ifdef COMMON_THREAD_H /* thread */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("thread", thread)) return "thread"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("thread", thread)) + return "thread"; #endif // COMMON_THREAD_H #ifdef COMMON_TIMER_H /* timer */ -if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("timer", timer)) return "timer"; + if ((server_type&(SERVER_TYPE_ALL)) != 0 && !HPM_SYMBOL("timer", timer)) + return "timer"; #endif // COMMON_TIMER_H #ifdef MAP_TRADE_H /* trade */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("trade", trade)) return "trade"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("trade", trade)) + return "trade"; #endif // MAP_TRADE_H #ifdef MAP_UNIT_H /* unit */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("unit", unit)) return "unit"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("unit", unit)) + return "unit"; #endif // MAP_UNIT_H #ifdef MAP_VENDING_H /* vending */ -if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("vending", vending)) return "vending"; + if ((server_type&(SERVER_TYPE_MAP)) != 0 && !HPM_SYMBOL("vending", vending)) + return "vending"; #endif // MAP_VENDING_H return NULL; } diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 19b9b20a5..143c325c1 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -231,6 +231,7 @@ struct HPMi_interface { /* Hooking */ struct HPMHooking_interface *hooking; + struct malloc_interface *memmgr; }; #ifdef HERCULES_CORE #define HPM_SYMBOL(n, s) (HPM->share((s), (n)), true) diff --git a/src/common/atomic.h b/src/common/atomic.h index 82d579bf4..b370052a9 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) rAthena Project (www.rathena.org) * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 33d617b13..5be2d62e4 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -109,6 +109,14 @@ # define __attribute__(x) #endif +/// Feature/extension checking macros +#ifndef __has_extension /* Available in clang and gcc >= 3 */ +#define __has_extension(x) 0 +#endif +#ifndef __has_feature /* Available in clang and gcc >= 5 */ +#define __has_feature(x) __has_extension(x) +#endif + ////////////////////////////////////////////////////////////////////////// // portable printf/scanf format macros and integer definitions // NOTE: Visual C++ uses <inttypes.h> and <stdint.h> provided in /3rdparty @@ -291,12 +299,19 @@ typedef uintptr_t uintptr; #define GCC_VERSION 0 #endif -// Pragma macro only enabled on gcc >= 4.5 or clang - borrowed from Mana Plus -#if defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) -#define PRAGMA_GCC45(str) _Pragma(#str) -#else // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) -#define PRAGMA_GCC45(str) -#endif // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) +// Pragma macro only enabled on gcc >= 4.6 or clang - borrowed from Mana Plus +#if defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) +#define PRAGMA_GCC46(str) _Pragma(#str) +#else // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) +#define PRAGMA_GCC46(str) +#endif // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) + +// Pragma macro only enabled on gcc >= 5 or clang - borrowed from Mana Plus +#if defined(__GNUC__) && (GCC_VERSION >= 50000) +#define PRAGMA_GCC5(str) _Pragma(#str) +#else // ! defined(__GNUC__) && (GCC_VERSION >= 50000) +#define PRAGMA_GCC5(str) +#endif // ! defined(__GNUC__) && (GCC_VERSION >= 50000) // fallthrough attribute only enabled on gcc >= 7.0 #if defined(__GNUC__) && (GCC_VERSION >= 70000) @@ -441,4 +456,23 @@ typedef char bool; /** Support macros for marking structs as unavailable */ #define UNAVAILABLE_STRUCT int8 HERC__unavailable_struct +/** Static assertion (only on compilers that support it) */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +// C11 version +#define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) +#elif __has_feature(c_static_assert) +// Clang support (as per http://clang.llvm.org/docs/LanguageExtensions.html) +#define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) +#elif defined(__GNUC__) && GCC_VERSION >= 40700 +// GCC >= 4.7 is known to support it +#define STATIC_ASSERT(ex, msg) _Static_assert(ex, msg) +#elif defined(_MSC_VER) +// MSVC doesn't support it, but it accepts the C++ style version +#define STATIC_ASSERT(ex, msg) static_assert(ex, msg) +#else +// Otherise just ignore it until it's supported +#define STATIC_ASSERT(ex, msg) +#endif + + #endif /* COMMON_CBASETYPES_H */ diff --git a/src/common/conf.c b/src/common/conf.c index 9188affa4..96b9bff9f 100644 --- a/src/common/conf.c +++ b/src/common/conf.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -373,6 +373,80 @@ int config_lookup_mutable_string(const struct config_t *config, const char *name return CONFIG_FALSE; } +/** + * Wrapper for config_setting_get_int64() using defined-size variables + * + * @see config_setting_get_int64_real() + */ +int64 config_setting_get_int64_real(const struct config_setting_t *setting) +{ + return (int64)config_setting_get_int64(setting); +} + +/** + * Wrapper for config_setting_lookup_int64() using defined-size variables + * + * @see config_setting_lookup_int64() + */ +int config_setting_lookup_int64_real(const struct config_setting_t *setting, const char *name, int64 *value) +{ + long long int lli = 0; + + if (config_setting_lookup_int64(setting, name, &lli) != CONFIG_TRUE) + return CONFIG_FALSE; + + *value = (int64)lli; + + return CONFIG_TRUE; +} + +/** + * Wrapper for config_setting_set_int64() using defined-size variables + * + * @see config_setting_set_int64() + */ +int config_setting_set_int64_real(struct config_setting_t *setting, int64 value) +{ + return config_setting_set_int64(setting, (long long int)value); +} + +/** + * Wrapper for config_setting_get_int64_elem() using defined-size variables + * + * @see config_setting_get_int64_elem() + */ +int64 config_setting_get_int64_elem_real(const struct config_setting_t *setting, int idx) +{ + return (int64)config_setting_get_int64_elem(setting, idx); +} + +/** + * Wrapper for config_setting_set_int64_elem() using defined-size variables + * + * @see config_setting_set_int64_elem() + */ +struct config_setting_t *config_setting_set_int64_elem_real(struct config_setting_t *setting, int idx, int64 value) +{ + return config_setting_set_int64_elem(setting, idx, (long long int)value); +} + +/** + * Wrapper for config_lookup_int64() using defined-size variables + * + * @see config_lookup_int64() + */ +int config_lookup_int64_real(const struct config_t *config, const char *filepath, int64 *value) +{ + long long int lli = 0; + + if (config_lookup_int64(config, filepath, &lli) != CONFIG_TRUE) + return CONFIG_FALSE; + + *value = (int64)lli; + + return CONFIG_TRUE; +} + void libconfig_defaults(void) { libconfig = &libconfig_s; @@ -393,20 +467,20 @@ void libconfig_defaults(void) { libconfig->destroy = config_destroy; /* */ libconfig->setting_get_int = config_setting_get_int; - libconfig->setting_get_int64 = config_setting_get_int64; + libconfig->setting_get_int64 = config_setting_get_int64_real; libconfig->setting_get_float = config_setting_get_float; libconfig->setting_get_bool = config_setting_get_bool; libconfig->setting_get_string = config_setting_get_string; /* */ libconfig->setting_lookup = config_setting_lookup; libconfig->setting_lookup_int = config_setting_lookup_int; - libconfig->setting_lookup_int64 = config_setting_lookup_int64; + libconfig->setting_lookup_int64 = config_setting_lookup_int64_real; libconfig->setting_lookup_float = config_setting_lookup_float; libconfig->setting_lookup_bool = config_setting_lookup_bool; libconfig->setting_lookup_string = config_setting_lookup_string; /* */ libconfig->setting_set_int = config_setting_set_int; - libconfig->setting_set_int64 = config_setting_set_int64; + libconfig->setting_set_int64 = config_setting_set_int64_real; libconfig->setting_set_float = config_setting_set_float; libconfig->setting_set_bool = config_setting_set_bool; libconfig->setting_set_string = config_setting_set_string; @@ -415,13 +489,13 @@ void libconfig_defaults(void) { libconfig->setting_get_format = config_setting_get_format; /* */ libconfig->setting_get_int_elem = config_setting_get_int_elem; - libconfig->setting_get_int64_elem = config_setting_get_int64_elem; + libconfig->setting_get_int64_elem = config_setting_get_int64_elem_real; libconfig->setting_get_float_elem = config_setting_get_float_elem; libconfig->setting_get_bool_elem = config_setting_get_bool_elem; libconfig->setting_get_string_elem = config_setting_get_string_elem; /* */ libconfig->setting_set_int_elem = config_setting_set_int_elem; - libconfig->setting_set_int64_elem = config_setting_set_int64_elem; + libconfig->setting_set_int64_elem = config_setting_set_int64_elem_real; libconfig->setting_set_float_elem = config_setting_set_float_elem; libconfig->setting_set_bool_elem = config_setting_set_bool_elem; libconfig->setting_set_string_elem = config_setting_set_string_elem; @@ -441,7 +515,7 @@ void libconfig_defaults(void) { libconfig->lookup = config_lookup; /* */ libconfig->lookup_int = config_lookup_int; - libconfig->lookup_int64 = config_lookup_int64; + libconfig->lookup_int64 = config_lookup_int64_real; libconfig->lookup_float = config_lookup_float; libconfig->lookup_bool = config_lookup_bool; libconfig->lookup_string = config_lookup_string; diff --git a/src/common/conf.h b/src/common/conf.h index f2bfcac62..bd6acc4be 100644 --- a/src/common/conf.h +++ b/src/common/conf.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -46,7 +46,7 @@ struct libconfig_interface { void (*destroy) (struct config_t *config); int (*setting_get_int) (const struct config_setting_t *setting); - long long (*setting_get_int64) (const struct config_setting_t *setting); + int64 (*setting_get_int64) (const struct config_setting_t *setting); double (*setting_get_float) (const struct config_setting_t *setting); int (*setting_get_bool) (const struct config_setting_t *setting); @@ -55,12 +55,12 @@ struct libconfig_interface { struct config_setting_t * (*setting_lookup) (struct config_setting_t *setting, const char *name); int (*setting_lookup_int) (const struct config_setting_t *setting, const char *name, int *value); - int (*setting_lookup_int64) (const struct config_setting_t *setting, const char *name, long long *value); + int (*setting_lookup_int64) (const struct config_setting_t *setting, const char *name, int64 *value); int (*setting_lookup_float) (const struct config_setting_t *setting, const char *name, double *value); int (*setting_lookup_bool) (const struct config_setting_t *setting, const char *name, int *value); int (*setting_lookup_string) (const struct config_setting_t *setting, const char *name, const char **value); - int (*setting_set_int) (struct config_setting_t *setting ,int value); - int (*setting_set_int64) (struct config_setting_t *setting, long long value); + int (*setting_set_int) (struct config_setting_t *setting, int value); + int (*setting_set_int64) (struct config_setting_t *setting, int64 value); int (*setting_set_float) (struct config_setting_t *setting, double value); int (*setting_set_bool) (struct config_setting_t *setting, int value); int (*setting_set_string) (struct config_setting_t *setting, const char *value); @@ -69,12 +69,12 @@ struct libconfig_interface { short (*setting_get_format) (const struct config_setting_t *setting); int (*setting_get_int_elem) (const struct config_setting_t *setting, int idx); - long long (*setting_get_int64_elem) (const struct config_setting_t *setting, int idx); + int64 (*setting_get_int64_elem) (const struct config_setting_t *setting, int idx); double (*setting_get_float_elem) (const struct config_setting_t *setting, int idx); int (*setting_get_bool_elem) (const struct config_setting_t *setting, int idx); const char * (*setting_get_string_elem) (const struct config_setting_t *setting, int idx); struct config_setting_t * (*setting_set_int_elem) (struct config_setting_t *setting, int idx, int value); - struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, long long value); + struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, int64 value); struct config_setting_t * (*setting_set_float_elem) (struct config_setting_t *setting, int idx, double value); struct config_setting_t * (*setting_set_bool_elem) (struct config_setting_t *setting, int idx, int value); struct config_setting_t * (*setting_set_string_elem) (struct config_setting_t *setting, int idx, const char *value); @@ -93,7 +93,7 @@ struct libconfig_interface { struct config_setting_t * (*lookup) (const struct config_t *config, const char *filepath); int (*lookup_int) (const struct config_t *config, const char *filepath, int *value); - int (*lookup_int64) (const struct config_t *config, const char *filepath, long long *value); + int (*lookup_int64) (const struct config_t *config, const char *filepath, int64 *value); int (*lookup_float) (const struct config_t *config, const char *filepath, double *value); int (*lookup_bool) (const struct config_t *config, const char *filepath, int *value); int (*lookup_string) (const struct config_t *config, const char *filepath, const char **value); diff --git a/src/common/console.c b/src/common/console.c index f1b4523e2..0f79b9494 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -68,7 +68,8 @@ struct { /*====================================== * CORE : Display title *--------------------------------------*/ -void display_title(void) { +void display_title(void) +{ const char *vcstype = sysinfo->vcstype(); ShowMessage("\n"); @@ -99,7 +100,7 @@ void display_title(void) { */ void display_gplnotice(void) { - ShowInfo("Hercules, Copyright (C) 2012-2015, Hercules Dev Team and others.\n"); + ShowInfo("Hercules, Copyright (C) 2012-2016, Hercules Dev Team and others.\n"); ShowInfo("Licensed under the GNU General Public License, version 3 or later.\n"); } @@ -130,21 +131,24 @@ int console_parse_key_pressed(void) /** * Stops server **/ -CPCMD_C(exit,server) { +CPCMD_C(exit, server) +{ core->runflag = 0; } /** * Displays ERS-related statistics (Entry Reusage System) **/ -CPCMD_C(ers_report,server) { +CPCMD_C(ers_report, server) +{ ers_report(); } /** * Displays memory usage **/ -CPCMD_C(mem_report,server) { +CPCMD_C(mem_report, server) +{ #ifdef USE_MEMMGR memmgr_report(line?atoi(line):0); #endif @@ -171,7 +175,8 @@ CPCMD(help) * [Ind/Hercules] * Displays current malloc usage */ -CPCMD_C(malloc_usage,server) { +CPCMD_C(malloc_usage, server) +{ unsigned int val = (unsigned int)iMalloc->usage(); ShowInfo("malloc_usage: %.2f MB\n",(double)(val)/1024); } @@ -180,7 +185,8 @@ CPCMD_C(malloc_usage,server) { * Skips an sql update * Usage: sql update skip UPDATE-FILE.sql **/ -CPCMD_C(skip,update) { +CPCMD_C(skip, update) +{ if( !line ) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; @@ -311,6 +317,7 @@ void console_parse_create(char *name, CParseFunc func) char sublist[CP_CMD_LENGTH * 5]; struct CParseEntry *cmd; + nullpo_retv(name); safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); @@ -364,6 +371,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { int i; char msg[CP_CMD_LENGTH * 2]; + nullpo_retv(cmd); Assert_retv(cmd->type == CPET_CATEGORY); for (i = 0; i < VECTOR_LENGTH(cmd->u.children); i++) { struct CParseEntry *child = VECTOR_INDEX(cmd->u.children, i); @@ -391,6 +399,7 @@ void console_parse_sub(char *line) char sublist[CP_CMD_LENGTH * 5]; int i; + nullpo_retv(line); memcpy(bline, line, 200); tok = strtok(line, " "); @@ -444,9 +453,12 @@ void console_parse_sub(char *line) } ShowError("Is only a category, type '"CL_WHITE"%s help"CL_RESET"' to list its subcommands\n",sublist); } -void console_parse(char* line) { + +void console_parse(char *line) +{ int c, i = 0, len = MAX_CONSOLE_INPUT - 1;/* we leave room for the \0 :P */ + nullpo_retv(line); while( (c = fgetc(stdin)) != EOF ) { if( --len == 0 ) break; @@ -458,7 +470,9 @@ void console_parse(char* line) { line[i++] = '\0'; } -void *cThread_main(void *x) { + +void *cThread_main(void *x) +{ while( console->input->ptstate ) {/* loopx */ if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; @@ -483,7 +497,9 @@ void *cThread_main(void *x) { return NULL; } -int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { + +int console_parse_timer(int tid, int64 tick, int id, intptr_t data) +{ int i; EnterSpinLock(console->input->ptlock); for(i = 0; i < cinput.count; i++) { @@ -494,7 +510,9 @@ int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { mutex->cond_signal(console->input->ptcond); return 0; } -void console_parse_final(void) { + +void console_parse_final(void) +{ if( console->input->ptstate ) { InterlockedDecrement(&console->input->ptstate); mutex->cond_signal(console->input->ptcond); @@ -506,7 +524,9 @@ void console_parse_final(void) { mutex->destroy(console->input->ptmutex); } } -void console_parse_init(void) { + +void console_parse_init(void) +{ cinput.count = 0; console->input->ptstate = 1; @@ -524,6 +544,7 @@ void console_parse_init(void) { timer->add_func_list(console->input->parse_timer, "console_parse_timer"); timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } + void console_setSQL(struct Sql *SQL_handle) { console->input->SQL = SQL_handle; diff --git a/src/common/core.c b/src/common/core.c index 63123dfea..9a131d042 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -100,7 +100,8 @@ struct core_interface *core = &core_s; #ifndef POSIX #define compat_signal(signo, func) signal((signo), (func)) #else -sigfunc *compat_signal(int signo, sigfunc *func) { +sigfunc *compat_signal(int signo, sigfunc *func) +{ struct sigaction sact, oact; sact.sa_handler = func; @@ -121,7 +122,8 @@ sigfunc *compat_signal(int signo, sigfunc *func) { * CORE : Console events for Windows *--------------------------------------*/ #ifdef _WIN32 -static BOOL WINAPI console_handler(DWORD c_event) { +static BOOL WINAPI console_handler(DWORD c_event) +{ switch(c_event) { case CTRL_CLOSE_EVENT: case CTRL_LOGOFF_EVENT: @@ -137,7 +139,8 @@ static BOOL WINAPI console_handler(DWORD c_event) { return TRUE; } -static void cevents_init(void) { +static void cevents_init(void) +{ if (SetConsoleCtrlHandler(console_handler,TRUE)==FALSE) ShowWarning ("Unable to install the console handler!\n"); } @@ -146,7 +149,8 @@ static void cevents_init(void) { /*====================================== * CORE : Signal Sub Function *--------------------------------------*/ -static void sig_proc(int sn) { +static void sig_proc(int sn) +{ static int is_called = 0; switch (sn) { @@ -179,7 +183,8 @@ static void sig_proc(int sn) { } } -void signals_init (void) { +void signals_init (void) +{ compat_signal(SIGTERM, sig_proc); compat_signal(SIGINT, sig_proc); #ifndef _DEBUG // need unhandled exceptions to debug on Windows @@ -245,7 +250,8 @@ bool usercheck(void) return true; } -void core_defaults(void) { +void core_defaults(void) +{ nullpo_defaults(); #ifndef MINICORE hpm_defaults(); @@ -271,16 +277,20 @@ void core_defaults(void) { thread_defaults(); #endif } + /** * Returns the source (core or plugin name) for the given command-line argument */ -const char *cmdline_arg_source(struct CmdlineArgData *arg) { +const char *cmdline_arg_source(struct CmdlineArgData *arg) +{ #ifdef MINICORE return "core"; #else // !MINICORE + nullpo_retr(NULL, arg); return HPM->pid2name(arg->pluginID); #endif // MINICORE } + /** * Defines a command line argument. * @@ -292,9 +302,11 @@ const char *cmdline_arg_source(struct CmdlineArgData *arg) { * @param options options associated to the command-line argument. @see enum cmdline_options. * @return the success status. */ -bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { +bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) +{ struct CmdlineArgData *data = NULL; + nullpo_retr(false, name); VECTOR_ENSURE(cmdline->args_data, 1, 1); VECTOR_PUSHZEROED(cmdline->args_data); data = &VECTOR_LAST(cmdline->args_data); @@ -310,6 +322,7 @@ bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, Cm return true; } + /** * Help screen to be displayed by '--help'. */ @@ -333,6 +346,7 @@ static CMDLINEARG(help) } return false; } + /** * Info screen to be displayed by '--version'. */ @@ -343,6 +357,7 @@ static CMDLINEARG(version) ShowInfo("Open "CL_WHITE"readme.txt"CL_RESET" for more information.\n"); return false; } + /** * Checks if there is a value available for the current argument * @@ -360,6 +375,7 @@ bool cmdline_arg_next_value(const char *name, int current_arg, int argc) return true; } + /** * Executes the command line arguments handlers. * @@ -381,11 +397,15 @@ bool cmdline_arg_next_value(const char *name, int current_arg, int argc) int cmdline_exec(int argc, char **argv, unsigned int options) { int count = 0, i; + + nullpo_ret(argv); for (i = 1; i < argc; i++) { int j; struct CmdlineArgData *data = NULL; const char *arg = argv[i]; if (arg[0] != '-') { // All arguments must begin with '-' + if ((options&(CMDLINE_OPT_SILENT|CMDLINE_OPT_PREINIT)) != 0) + continue; ShowError("Invalid option '%s'.\n", argv[i]); exit(EXIT_FAILURE); } @@ -423,6 +443,7 @@ int cmdline_exec(int argc, char **argv, unsigned int options) } return count; } + /** * Defines the global command-line arguments. */ @@ -466,10 +487,12 @@ void cmdline_defaults(void) cmdline->arg_next_value = cmdline_arg_next_value; cmdline->arg_source = cmdline_arg_source; } + /*====================================== * CORE : MAINROUTINE *--------------------------------------*/ -int main (int argc, char **argv) { +int main (int argc, char **argv) +{ int retval = EXIT_SUCCESS; {// initialize program arguments char *p1 = SERVER_NAME = argv[0]; diff --git a/src/common/core.h b/src/common/core.h index 4aaa6cfac..a8726fcef 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/db.c b/src/common/db.c index 0c7bc2ae0..91592fdac 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -93,6 +93,7 @@ #include "common/ers.h" #include "common/memmgr.h" #include "common/mmo.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" @@ -2795,7 +2796,8 @@ void *db_data2ptr(struct DBData *data) * @public * @see #db_final(void) */ -void db_init(void) { +void db_init(void) +{ db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); ers_chunk_size(db_alloc_ers, 50); @@ -2907,7 +2909,7 @@ void db_final(void) } // Link DB System - jAthena -void linkdb_insert( struct linkdb_node** head, void *key, void* data) +void linkdb_insert(struct linkdb_node **head, void *key, void *data) { struct linkdb_node *node; if( head == NULL ) return ; @@ -2928,7 +2930,8 @@ void linkdb_insert( struct linkdb_node** head, void *key, void* data) node->data = data; } -void linkdb_vforeach( struct linkdb_node** head, LinkDBFunc func, va_list ap) { +void linkdb_vforeach(struct linkdb_node **head, LinkDBFunc func, va_list ap) +{ struct linkdb_node *node; if( head == NULL ) return; node = *head; @@ -2941,14 +2944,15 @@ void linkdb_vforeach( struct linkdb_node** head, LinkDBFunc func, va_list ap) { } } -void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ...) { +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) +void* linkdb_search(struct linkdb_node **head, void *key) { int n = 0; struct linkdb_node *node; @@ -2973,7 +2977,7 @@ void* linkdb_search( struct linkdb_node** head, void *key) return NULL; } -void* linkdb_erase( struct linkdb_node** head, void *key) +void* linkdb_erase(struct linkdb_node **head, void *key) { struct linkdb_node *node; if( head == NULL ) return NULL; @@ -2995,7 +2999,7 @@ void* linkdb_erase( struct linkdb_node** head, void *key) return NULL; } -void linkdb_replace( struct linkdb_node** head, void *key, void *data ) +void linkdb_replace(struct linkdb_node **head, void *key, void *data) { int n = 0; struct linkdb_node *node; @@ -3022,7 +3026,7 @@ void linkdb_replace( struct linkdb_node** head, void *key, void *data ) linkdb_insert( head, key, data ); } -void linkdb_final( struct linkdb_node** head ) +void linkdb_final(struct linkdb_node **head) { struct linkdb_node *node, *node2; if( head == NULL ) return ; @@ -3034,7 +3038,9 @@ void linkdb_final( struct linkdb_node** head ) } *head = NULL; } -void db_defaults(void) { + +void db_defaults(void) +{ DB = &DB_s; DB->alloc = db_alloc; DB->custom_release = db_custom_release; @@ -3055,5 +3061,4 @@ void db_defaults(void) { DB->ui2key = db_ui2key; DB->i642key = db_i642key; DB->ui642key = db_ui642key; - } diff --git a/src/common/db.h b/src/common/db.h index 1c0955221..2918e5acb 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -1114,7 +1114,11 @@ HPShared struct db_interface *DB; * @param _vec Vector. */ #define VECTOR_INIT(_vec) \ - memset(&(_vec), 0, sizeof(_vec)) + do { \ + VECTOR_DATA(_vec) = NULL; \ + VECTOR_CAPACITY(_vec) = 0; \ + VECTOR_LENGTH(_vec) = 0; \ + } while(false) /** * Returns the internal array of values. @@ -1220,12 +1224,11 @@ HPShared struct db_interface *DB; */ #define VECTOR_ENSURE(_vec, _n, _step) \ do { \ - int _empty_ = VECTOR_CAPACITY(_vec)-VECTOR_LENGTH(_vec); \ - if ((_n) > _empty_) { \ - while ((_n) > _empty_) \ - _empty_ += (_step); \ - VECTOR_RESIZE(_vec, _empty_+VECTOR_LENGTH(_vec)); \ - } \ + int _newcapacity_ = VECTOR_CAPACITY(_vec); \ + while ((_n) + VECTOR_LENGTH(_vec) > _newcapacity_) \ + _newcapacity_ += (_step); \ + if (_newcapacity_ > VECTOR_CAPACITY(_vec)) \ + VECTOR_RESIZE(_vec, _newcapacity_); \ } while(false) /** diff --git a/src/common/des.c b/src/common/des.c index c680610e9..73297ab70 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -23,6 +23,7 @@ #include "des.h" #include "common/cbasetypes.h" +#include "common/nullpo.h" /** @file * Implementation of the des interface. @@ -54,6 +55,7 @@ static void des_IP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for(i = 0; i < ARRAYLENGTH(ip_table); ++i) { uint8_t j = ip_table[i] - 1; if (src->b[(j >> 3) & 7] & mask[j & 7]) @@ -81,6 +83,7 @@ static void des_FP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(fp_table); ++i) { uint8_t j = fp_table[i] - 1; if (src->b[(j >> 3) & 7] & mask[j & 7]) @@ -119,6 +122,7 @@ static void des_E(struct des_bit64 *src) tmp.b[i / 6 + 0] |= mask[i % 6]; } #endif + nullpo_retv(src); // optimized tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n @@ -150,6 +154,7 @@ static void des_TP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(tp_table); ++i) { uint8_t j = tp_table[i] - 1; if (src->b[(j >> 3) + 0] & mask[j & 7]) @@ -194,6 +199,7 @@ static void des_SBOX(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(s_table); ++i) { tmp.b[i] = (s_table[i][src->b[i*2+0]] & 0xf0) | (s_table[i][src->b[i*2+1]] & 0x0f); @@ -214,6 +220,7 @@ static void des_RoundFunction(struct des_bit64 *src) des_SBOX(&tmp); des_TP(&tmp); + nullpo_retv(src); src->b[0] ^= tmp.b[4]; src->b[1] ^= tmp.b[5]; src->b[2] ^= tmp.b[6]; diff --git a/src/common/ers.c b/src/common/ers.c index 8970fefc2..f2256cf30 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -149,7 +149,8 @@ static struct ers_instance_t *InstanceList = NULL; /** * @param Options the options from the instance seeking a cache, we use it to give it a cache with matching configuration **/ -static ers_cache_t *ers_find_cache(unsigned int size, enum ERSOptions Options) { +static ers_cache_t *ers_find_cache(unsigned int size, enum ERSOptions Options) +{ ers_cache_t *cache; for (cache = CacheList; cache; cache = cache->Next) @@ -187,6 +188,7 @@ static void ers_free_cache(ers_cache_t *cache, bool remove) { unsigned int i; + nullpo_retv(cache); for (i = 0; i < cache->Used; i++) aFree(cache->Blocks[i]); @@ -307,7 +309,8 @@ static void ers_obj_destroy(ERS *self) aFree(instance); } -void ers_cache_size(ERS *self, unsigned int new_size) { +void ers_cache_size(ERS *self, unsigned int new_size) +{ struct ers_instance_t *instance = (struct ers_instance_t *)self; nullpo_retv(instance); @@ -319,10 +322,11 @@ void ers_cache_size(ERS *self, unsigned int new_size) { instance->Cache->ChunkSize = new_size; } - ERS *ers_new(uint32 size, char *name, enum ERSOptions options) { struct ers_instance_t *instance; + + nullpo_retr(NULL, name); CREATE(instance,struct ers_instance_t, 1); size += sizeof(struct ers_list); @@ -359,7 +363,8 @@ ERS *ers_new(uint32 size, char *name, enum ERSOptions options) return &instance->VTable; } -void ers_report(void) { +void ers_report(void) +{ ers_cache_t *cache; unsigned int cache_c = 0, blocks_u = 0, blocks_a = 0, memory_b = 0, memory_t = 0; #ifdef DEBUG @@ -403,7 +408,8 @@ void ers_report(void) { /** * Call on shutdown to clear remaining entries **/ -void ers_final(void) { +void ers_final(void) +{ struct ers_instance_t *instance = InstanceList, *next; while( instance ) { diff --git a/src/common/ers.h b/src/common/ers.h index 1689345dc..5f9516ad6 100644 --- a/src/common/ers.h +++ b/src/common/ers.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/grfio.c b/src/common/grfio.c index 0a9708f17..fba3dda86 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -86,11 +86,13 @@ struct grfio_interface *grfio; // little endian char array to uint conversion static unsigned int getlong(unsigned char *p) { + nullpo_ret(p); return (p[0] << 0 | p[1] << 8 | p[2] << 16 | p[3] << 24); } static void NibbleSwap(unsigned char *src, int len) { + nullpo_retv(src); while (len > 0) { *src = (*src >> 4) | (*src << 4); ++src; @@ -135,6 +137,7 @@ static void grf_shuffle_enc(struct des_bit64 *src) { struct des_bit64 out; + nullpo_retv(src); out.b[0] = src->b[3]; out.b[1] = src->b[4]; out.b[2] = src->b[5]; @@ -152,6 +155,7 @@ static void grf_shuffle_dec(struct des_bit64 *src) { struct des_bit64 out; + nullpo_retv(src); out.b[0] = src->b[3]; out.b[1] = src->b[4]; out.b[2] = src->b[6]; @@ -175,6 +179,7 @@ static void grf_decode_header(unsigned char *buf, size_t len) struct des_bit64 *p = (struct des_bit64 *)buf; size_t nblocks = len / sizeof(struct des_bit64); size_t i; + nullpo_retv(buf); // first 20 blocks are all des-encrypted for (i = 0; i < 20 && i < nblocks; ++i) @@ -197,6 +202,7 @@ static void grf_decode_full(unsigned char *buf, size_t len, int cycle) int dcycle, scycle; size_t i, j; + nullpo_retv(buf); // first 20 blocks are all des-encrypted for (i = 0; i < 20 && i < nblocks; ++i) des->decrypt_block(&p[i]); @@ -314,6 +320,7 @@ static void hashinit(void) static int grf_filehash(const char *fname) { uint32 hash = 0; + nullpo_ret(fname); while (*fname != '\0') { hash = (hash<<1) + (hash>>7)*9 + TOLOWER(*fname); fname++; @@ -396,7 +403,9 @@ static struct grf_filelist *grfio_filelist_add(struct grf_filelist *entry) */ static struct grf_filelist *grfio_filelist_modify(struct grf_filelist *entry) { - struct grf_filelist *fentry = grfio_filelist_find(entry->fn); + struct grf_filelist *fentry; + nullpo_retr(NULL, entry); + fentry = grfio_filelist_find(entry->fn); if (fentry != NULL) { int tmp = fentry->next; memcpy(fentry, entry, sizeof(struct grf_filelist)); @@ -434,6 +443,7 @@ static void grfio_localpath_create(char *buffer, size_t size, const char *filena int i; size_t len; + nullpo_retv(buffer); len = strlen(data_dir); if (data_dir[0] == '\0' || data_dir[len-1] == '/' || data_dir[len-1] == '\\') @@ -553,6 +563,7 @@ void *grfio_reads(const char *fname, int *size) static char *grfio_decode_filename(unsigned char *buf, int len) { int i; + nullpo_retr(NULL, buf); for (i = 0; i < len; i += 8) { NibbleSwap(&buf[i],8); des->decrypt(&buf[i],8); @@ -568,7 +579,9 @@ static char *grfio_decode_filename(unsigned char *buf, int len) */ static bool grfio_is_full_encrypt(const char *fname) { - const char *ext = strrchr(fname, '.'); + const char *ext; + nullpo_retr(false, fname); + ext = strrchr(fname, '.'); if (ext != NULL) { static const char *extensions[] = { ".gnd", ".gat", ".act", ".str" }; int i; @@ -594,8 +607,10 @@ static int grfio_entryread(const char *grfname, int gentry) unsigned char grf_header[0x2e] = { 0 }; int entry,entrys,ofs,grf_version; unsigned char *grf_filelist; + FILE *fp; - FILE *fp = fopen(grfname, "rb"); + nullpo_retr(1, grfname); + fp = fopen(grfname, "rb"); if (fp == NULL) { ShowWarning("GRF data file not found: '%s'\n", grfname); return 1; // 1:not found error @@ -764,6 +779,7 @@ static bool grfio_parse_restable_row(const char *row) char local[256]; struct grf_filelist *entry = NULL; + nullpo_retr(false, row); if (sscanf(row, "%255[^#\r\n]#%255[^#\r\n]#", w1, w2) != 2) return false; @@ -854,6 +870,7 @@ static void grfio_resourcecheck(void) */ static int grfio_add(const char *fname) { + nullpo_retr(1, fname); if (gentry_entrys >= gentry_maxentry) { #define GENTRY_ADDS 4 // The number increment of gentry_table entries gentry_maxentry += GENTRY_ADDS; @@ -899,6 +916,7 @@ void grfio_init(const char *fname) FILE *data_conf; int grf_num = 0; + nullpo_retv(fname); hashinit(); // hash table initialization data_conf = fopen(fname, "r"); diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5b0f6169b..e16eb4216 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ #include "common/cbasetypes.h" #include "common/db.h" #include "common/mmo.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" @@ -37,11 +38,14 @@ struct mapindex_interface *mapindex; /// Retrieves the map name from 'string' (removing .gat extension if present). /// Result gets placed either into 'buf' or in a static local buffer. -const char* mapindex_getmapname(const char* string, char* output) { +const char* mapindex_getmapname(const char* string, char* output) +{ static char buf[MAP_NAME_LENGTH]; char* dest = (output != NULL) ? output : buf; - size_t len = strnlen(string, MAP_NAME_LENGTH_EXT); + size_t len; + nullpo_retr(buf, string); + len = strnlen(string, MAP_NAME_LENGTH_EXT); if (len == MAP_NAME_LENGTH_EXT) { ShowWarning("(mapindex_normalize_name) Map name '%*s' is too long!\n", 2*MAP_NAME_LENGTH_EXT, string); len--; @@ -58,12 +62,15 @@ const char* mapindex_getmapname(const char* string, char* output) { /// Retrieves the map name from 'string' (adding .gat extension if not already present). /// Result gets placed either into 'buf' or in a static local buffer. -const char* mapindex_getmapname_ext(const char* string, char* output) { +const char* mapindex_getmapname_ext(const char* string, char* output) +{ static char buf[MAP_NAME_LENGTH_EXT]; char* dest = (output != NULL) ? output : buf; size_t len; + nullpo_retr(buf, string); + safestrncpy(buf,string, sizeof(buf)); sscanf(string, "%*[^#]%*[#]%15s", buf); @@ -87,7 +94,8 @@ const char* mapindex_getmapname_ext(const char* string, char* output) { /// Adds a map to the specified index /// Returns 1 if successful, 0 otherwise -int mapindex_addmap(int index, const char* name) { +int mapindex_addmap(int index, const char* name) +{ char map_name[MAP_NAME_LENGTH]; if (index == -1){ @@ -128,7 +136,8 @@ int mapindex_addmap(int index, const char* name) { return index; } -unsigned short mapindex_name2id(const char* name) { +unsigned short mapindex_name2id(const char* name) +{ int i; char map_name[MAP_NAME_LENGTH]; @@ -141,7 +150,8 @@ unsigned short mapindex_name2id(const char* name) { return 0; } -const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const char *func) { +const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const char *func) +{ if (id >= MAX_MAPINDEX || !mapindex_exists(id)) { ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache. %s:%s:%d\n", id,file,func,line); return mapindex->list[0].name; // dummy empty string so that the callee doesn't crash @@ -149,7 +159,8 @@ const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const ch return mapindex->list[id].name; } -int mapindex_init(void) { +int mapindex_init(void) +{ FILE *fp; char line[1024]; int last_index = -1; @@ -196,16 +207,20 @@ bool mapindex_check_default(void) return true; } -void mapindex_removemap(int index){ +void mapindex_removemap(int index) +{ + Assert_retv(index < MAX_MAPINDEX); strdb_remove(mapindex->db, mapindex->list[index].name); mapindex->list[index].name[0] = '\0'; } -void mapindex_final(void) { +void mapindex_final(void) +{ db_destroy(mapindex->db); } -void mapindex_defaults(void) { +void mapindex_defaults(void) +{ mapindex = &mapindex_s; /* TODO: place it in inter-server.conf? */ diff --git a/src/common/mapindex.h b/src/common/mapindex.h index 0ebbeb04b..91f59aeaf 100644 --- a/src/common/mapindex.h +++ b/src/common/mapindex.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/md5calc.c b/src/common/md5calc.c index bd6b48f10..d2fc32371 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -168,16 +168,15 @@ static void md5_Round_Calculate(const unsigned char *block, } /// @copydoc md5_interface::binary() -static void md5_string2binary(const char *string, unsigned char *output) +static void md5_buf2binary(const uint8 *buf, const int buf_size, uint8 *output) { //var /*8bit*/ unsigned char padding_message[64]; //Extended message 512bit 64byte - const unsigned char *pstring; // The position of string in the present scanning notes is held. + const uint8 *pbuf; // The position of string in the present scanning notes is held. /*32bit*/ - unsigned int string_byte_len, //The byte chief of string is held. - string_bit_len, //The bit length of string is held. + unsigned int buf_bit_len, //The bit length of string is held. copy_len, //The number of bytes which is used by 1-3 and which remained msg_digest[4]; //Message digest 128bit 4byte unsigned int *A = &msg_digest[0], //The message digest in accordance with RFC (reference) @@ -195,16 +194,15 @@ static void md5_string2binary(const char *string, unsigned char *output) //Step 1.Append Padding Bits (extension of a mark bit) //1-1 - string_byte_len = (unsigned int)strlen(string); //The byte chief of a character sequence is acquired. - pstring = (const unsigned char *)string; // The position of the present character sequence is set. + pbuf = buf; // The position of the present character sequence is set. //1-2 Repeat calculation until length becomes less than 64 bytes. - for (i=string_byte_len; 64<=i; i-=64,pstring+=64) - md5_Round_Calculate(pstring, A,B,C,D); + for (i=buf_size; 64<=i; i-=64,pbuf+=64) + md5_Round_Calculate(pbuf, A,B,C,D); //1-3 - copy_len = string_byte_len % 64; //The number of bytes which remained is computed. - strncpy((char *)padding_message, (const char *)pstring, copy_len); // A message is copied to an extended bit sequence. + copy_len = buf_size % 64; //The number of bytes which remained is computed. + strncpy((char *)padding_message, (const char *)pbuf, copy_len); // A message is copied to an extended bit sequence. memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length. padding_message[copy_len] |= 0x80; //The next of a message is 1. @@ -216,12 +214,12 @@ static void md5_string2binary(const char *string, unsigned char *output) } //Step 2.Append Length (the information on length is added) - string_bit_len = string_byte_len * 8; //From the byte chief to bit length (32 bytes of low rank) - memcpy(&padding_message[56], &string_bit_len, 4); //32 bytes of low rank is set. + buf_bit_len = buf_size * 8; //From the byte chief to bit length (32 bytes of low rank) + memcpy(&padding_message[56], &buf_bit_len, 4); //32 bytes of low rank is set. //When bit length cannot be expressed in 32 bytes of low rank, it is a beam raising to a higher rank. - if (UINT_MAX / 8 < string_byte_len) { - unsigned int high = (string_byte_len - UINT_MAX / 8) * 8; + if (UINT_MAX / 8 < (unsigned int)buf_size) { + unsigned int high = (buf_size - UINT_MAX / 8) * 8; memcpy(&padding_message[60], &high, 4); } else { memset(&padding_message[60], 0, 4); //In this case, it is good for a higher rank at 0. @@ -237,12 +235,12 @@ static void md5_string2binary(const char *string, unsigned char *output) /// @copydoc md5_interface::string() void md5_string(const char *string, char *output) { - unsigned char digest[16]; + uint8 digest[16]; nullpo_retv(string); nullpo_retv(output); - md5->binary(string,digest); + md5->binary((const uint8 *)string, (int)strlen(string), digest); snprintf(output, 33, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest[ 0], digest[ 1], digest[ 2], digest[ 3], digest[ 4], digest[ 5], digest[ 6], digest[ 7], @@ -267,7 +265,7 @@ void md5_salt(int len, char *output) void md5_defaults(void) { md5 = &md5_s; - md5->binary = md5_string2binary; + md5->binary = md5_buf2binary; md5->string = md5_string; md5->salt = md5_salt; } diff --git a/src/common/md5calc.h b/src/common/md5calc.h index b4d4995f9..f55ebe312 100644 --- a/src/common/md5calc.h +++ b/src/common/md5calc.h @@ -46,7 +46,7 @@ struct md5_interface { * @param[in] string The source string. * @param[out] output Output buffer (at least 16 bytes available). */ - void (*binary) (const char *string, unsigned char *output); + void (*binary) (const uint8 *buf, const int buf_size, uint8 *output); /** * Generates a random salt. diff --git a/src/common/memmgr.c b/src/common/memmgr.c index dfea24465..b80b4d4e9 100644 --- a/src/common/memmgr.c +++ b/src/common/memmgr.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/memmgr.h b/src/common/memmgr.h index 680947466..6381c5bfa 100644 --- a/src/common/memmgr.h +++ b/src/common/memmgr.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -101,8 +101,10 @@ struct malloc_interface { void malloc_defaults(void); void memmgr_report(int extra); -#endif // HERCULES_CORE HPShared struct malloc_interface *iMalloc; +#else +#define iMalloc HPMi->memmgr +#endif // HERCULES_CORE #endif /* COMMON_MEMMGR_H */ diff --git a/src/common/mmo.h b/src/common/mmo.h index 77f706f0d..52f68b719 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -23,6 +23,7 @@ #include "config/core.h" #include "common/cbasetypes.h" +#include "common/db.h" // VECTORS // server->client protocol version // 0 - pre-? @@ -114,7 +115,15 @@ #define MAX_INVENTORY 100 //Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well. -#define MAX_CHARS 9 +#if PACKETVER >= 20100413 +#ifndef MAX_CHARS + #define MAX_CHARS 12 +#endif +#else +#ifndef MAX_CHARS + #define MAX_CHARS 9 +#endif +#endif //Number of slots carded equipment can have. Never set to less than 4 as they are also used to keep the data of forged items/equipment. [Skotlex] //Note: The client seems unable to receive data for more than 4 slots due to all related packets having a fixed size. #define MAX_SLOTS 4 @@ -131,7 +140,7 @@ #define MAX_FAME 1000000000 #define MAX_CART 100 #ifndef MAX_SKILL -#define MAX_SKILL 1478 +#define MAX_SKILL 1510 #endif #ifndef MAX_SKILL_ID #define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID @@ -256,15 +265,32 @@ #define MAX_ELESKILLTREE 3 #endif +// Maximum item options [Smokexyz] +#ifndef MAX_ITEM_OPTIONS +#define MAX_ITEM_OPTIONS 5 +#endif +STATIC_ASSERT(MAX_ITEM_OPTIONS <= 5, "This value is limited by the client and database layout and should only be increased if you know the consequences."); + +// RoDEX +#define RODEX_TITLE_LENGTH (40 + 1) +#define RODEX_BODY_LENGTH (500 + 1) +#define RODEX_MAX_ITEM (5) +#define RODEX_EXPIRE (1 * 15 * 24 * 60 * 60) +#if PACKETVER >= 20170419 +#define RODEX_MAIL_PER_PAGE 32 +#else +#define RODEX_MAIL_PER_PAGE 7 +#endif + // The following system marks a different job ID system used by the map server, // which makes a lot more sense than the normal one. [Skotlex] // These marks the "level" of the job. -#define JOBL_2_1 0x100 //256 -#define JOBL_2_2 0x200 //512 -#define JOBL_2 0x300 -#define JOBL_UPPER 0x1000 //4096 -#define JOBL_BABY 0x2000 //8192 -#define JOBL_THIRD 0x4000 //16384 +#define JOBL_2_1 0x0100 +#define JOBL_2_2 0x0200 +#define JOBL_2 0x0300 // JOBL_2_1 | JOBL_2_2 +#define JOBL_UPPER 0x1000 +#define JOBL_BABY 0x2000 +#define JOBL_THIRD 0x4000 #define SCRIPT_VARNAME_LENGTH 32 ///< Maximum length of a script variable @@ -326,6 +352,12 @@ struct item { char favorite; unsigned char bound; uint64 unique_id; + + struct { + int16 index; + int16 value; + uint8 param; + } option[MAX_ITEM_OPTIONS]; }; //Equip position constants @@ -390,7 +422,7 @@ enum e_item_bound_type { #endif }; -enum { +enum e_option { OPTION_NOTHING = 0x00000000, OPTION_SIGHT = 0x00000001, OPTION_HIDE = 0x00000002, @@ -416,6 +448,7 @@ enum { OPTION_DRAGON5 = 0x04000000, OPTION_HANBOK = 0x08000000, OPTION_OKTOBERFEST = 0x10000000, + OPTION_SUMMER2 = 0x20000000, #ifndef NEW_CARTS OPTION_CART1 = 0x00000008, OPTION_CART2 = 0x00000080, @@ -427,7 +460,7 @@ enum { #endif // compound constants OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5, - OPTION_COSTUME = OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER|OPTION_HANBOK|OPTION_OKTOBERFEST, + OPTION_COSTUME = OPTION_WEDDING | OPTION_XMAS | OPTION_SUMMER | OPTION_HANBOK | OPTION_OKTOBERFEST | OPTION_SUMMER2, }; struct s_skill { @@ -459,8 +492,10 @@ struct status_change_data { }; struct storage_data { - int storage_amount; - struct item items[MAX_STORAGE]; + bool save; ///< save flag. + bool received; ///< received flag. + int aggregate; ///< total item count. + VECTOR_DECL(struct item) item; ///< item vector. }; struct guild_storage { @@ -562,11 +597,11 @@ struct mmo_charstatus { int mother; int child; - unsigned int base_exp,job_exp; + uint64 base_exp, job_exp; int zeny; int bank_vault; - short class_; + int16 class; int status_point, skill_point; int hp,max_hp,sp,max_sp; unsigned int option; @@ -581,10 +616,14 @@ struct mmo_charstatus { int spear_faith, spear_calls; int sword_faith, sword_calls; - short weapon; // enum weapon_type - short shield; // view-id - short head_top,head_mid,head_bottom; - short robe; + struct { + short weapon; ///< Weapon view sprite id. + short shield; ///< Shield view sprite id. + short head_top; ///< Top headgear view sprite id. + short head_mid; ///< Middle headgear view sprite id. + short head_bottom; ///< Bottom headgear view sprite id. + short robe; ///< Robe view sprite id. + } look; char name[NAME_LENGTH]; int base_level, job_level; @@ -596,7 +635,6 @@ struct mmo_charstatus { struct point last_point,save_point,memo_point[MAX_MEMOPOINTS]; struct item inventory[MAX_INVENTORY],cart[MAX_CART]; - struct storage_data storage; struct s_skill skill[MAX_SKILL]; struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex] @@ -670,7 +708,7 @@ struct party_member { int account_id; int char_id; char name[NAME_LENGTH]; - unsigned short class_; + int16 class; unsigned short map; unsigned short lv; unsigned leader : 1, @@ -689,7 +727,9 @@ struct party { struct map_session_data; struct guild_member { int account_id, char_id; - short hair,hair_color,gender,class_,lv; + short hair,hair_color,gender; + int16 class; + short lv; uint64 exp; int exp_payper; short online,position; @@ -777,12 +817,54 @@ struct fame_list { }; enum fame_list_type { + RANKTYPE_UNKNOWN = -1, RANKTYPE_BLACKSMITH = 0, RANKTYPE_ALCHEMIST = 1, RANKTYPE_TAEKWON = 2, RANKTYPE_PK = 3, //Not supported yet }; +struct rodex_message { + int64 id; + int sender_id; + char sender_name[NAME_LENGTH]; + int receiver_id; + int receiver_accountid; + char receiver_name[NAME_LENGTH]; + char title[RODEX_TITLE_LENGTH]; + char body[RODEX_BODY_LENGTH]; + struct { + struct item item; + int idx; + + } items[RODEX_MAX_ITEM]; + int64 zeny; + uint8 type; + int8 opentype; + bool is_read; + bool is_deleted; + int send_date; + int expire_date; + int weight; + int items_count; +}; + +VECTOR_STRUCT_DECL(rodex_maillist, struct rodex_message); + +enum rodex_opentype { + RODEX_OPENTYPE_MAIL = 0, + RODEX_OPENTYPE_ACCOUNT = 1, + RODEX_OPENTYPE_RETURN = 2, + RODEX_OPENTYPE_UNSET = 3, +}; + +enum MAIL_TYPE { + MAIL_TYPE_TEXT = 0x0, + MAIL_TYPE_ZENY = 0x2, + MAIL_TYPE_ITEM = 0x4, + MAIL_TYPE_NPC = 0x8 +}; + /** * Guild Basic Information * It is used to request changes via intif_guild_change_basicinfo in map-server and to @@ -840,7 +922,7 @@ enum { }; //These mark the ID of the jobs, as expected by the client. [Skotlex] -enum { +enum e_class { JOB_NOVICE, JOB_SWORDMAN, JOB_MAGE, @@ -993,6 +1075,8 @@ enum { JOB_OBORO, JOB_REBELLION = 4215, + JOB_SUMMONER = 4218, + #ifndef JOB_MAX JOB_MAX, #endif @@ -1057,6 +1141,7 @@ enum ammo_type { A_KUNAI, //7 A_CANNONBALL, //8 A_THROWWEAPON, //9 + MAX_AMMO_TYPE }; enum e_char_server_type { diff --git a/src/common/mutex.c b/src/common/mutex.c index bdc2fb4dc..464a54161 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -24,6 +24,7 @@ #include "common/cbasetypes.h" // for WIN32 #include "common/memmgr.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/timer.h" @@ -84,6 +85,7 @@ struct mutex_data *mutex_create(void) /// @copydoc mutex_interface::destroy() void mutex_destroy(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 DeleteCriticalSection(&m->hMutex); #else @@ -96,6 +98,7 @@ void mutex_destroy(struct mutex_data *m) /// @copydoc mutex_interface::lock() void mutex_lock(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 EnterCriticalSection(&m->hMutex); #else @@ -106,6 +109,7 @@ void mutex_lock(struct mutex_data *m) /// @copydoc mutex_interface::trylock() bool mutex_trylock(struct mutex_data *m) { + nullpo_retr(false, m); #ifdef WIN32 if (TryEnterCriticalSection(&m->hMutex) != FALSE) return true; @@ -119,6 +123,7 @@ bool mutex_trylock(struct mutex_data *m) /// @copydoc mutex_interface::unlock() void mutex_unlock(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 LeaveCriticalSection(&m->hMutex); #else @@ -152,6 +157,7 @@ struct cond_data *cond_create(void) /// @copydoc mutex_interface::cond_destroy() void cond_destroy(struct cond_data *c) { + nullpo_retv(c); #ifdef WIN32 CloseHandle(c->events[EVENT_COND_SIGNAL]); CloseHandle(c->events[EVENT_COND_BROADCAST]); @@ -171,6 +177,7 @@ void cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) int result; bool is_last = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); c->nWaiters++; LeaveCriticalSection(&c->waiters_lock); @@ -201,6 +208,7 @@ void cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) mutex->lock(m); #else + nullpo_retv(m); if (timeout_ticks < 0) { pthread_cond_wait(&c->hCond, &m->hMutex); } else { @@ -221,6 +229,7 @@ void cond_signal(struct cond_data *c) #ifdef WIN32 # if 0 bool has_waiters = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); if(c->nWaiters > 0) has_waiters = true; @@ -230,6 +239,7 @@ void cond_signal(struct cond_data *c) # endif // 0 SetEvent(c->events[EVENT_COND_SIGNAL]); #else + nullpo_retv(c); pthread_cond_signal(&c->hCond); #endif } @@ -240,6 +250,7 @@ void cond_broadcast(struct cond_data *c) #ifdef WIN32 # if 0 bool has_waiters = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); if(c->nWaiters > 0) has_waiters = true; @@ -249,6 +260,7 @@ void cond_broadcast(struct cond_data *c) # endif // 0 SetEvent(c->events[EVENT_COND_BROADCAST]); #else + nullpo_retv(c); pthread_cond_broadcast(&c->hCond); #endif } diff --git a/src/common/nullpo.c b/src/common/nullpo.c index 5b1be14ea..6525793bf 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/nullpo.h b/src/common/nullpo.h index 098e669f3..28d058dc0 100644 --- a/src/common/nullpo.h +++ b/src/common/nullpo.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/showmsg.c b/src/common/showmsg.c index d8864684d..23679e762 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/showmsg.h b/src/common/showmsg.h index 303c8dd28..eee6b467b 100644 --- a/src/common/showmsg.h +++ b/src/common/showmsg.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/socket.c b/src/common/socket.c index ea7bfab40..d4b8bb43f 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -520,7 +520,8 @@ void flush_fifos(void) /*====================================== * CORE : Connection functions *--------------------------------------*/ -int connect_client(int listen_fd) { +int connect_client(int listen_fd) +{ int fd; struct sockaddr_in client_address; socklen_t len; @@ -647,7 +648,8 @@ int make_listen_bind(uint32 ip, uint16 port) return fd; } -int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { +int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) +{ struct sockaddr_in remote_address = { 0 }; int fd; int result; @@ -817,9 +819,12 @@ int rfifoskip(int fd, size_t len) int wfifoset(int fd, size_t len) { size_t newreserve; - struct socket_data* s = sockt->session[fd]; + struct socket_data* s; - if (!sockt->session_is_valid(fd) || s->wdata == NULL) + if (!sockt->session_is_valid(fd)) + return 0; + s = sockt->session[fd]; + if (s == NULL || s->wdata == NULL) return 0; // we have written len bytes to the buffer already before calling WFIFOSET @@ -1018,10 +1023,6 @@ int do_sockets(int next) } } -#ifdef __clang_analyzer__ - // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_is_valid) - if (!sockt->session[i]) continue; -#endif // __clang_analyzer__ sockt->session[i]->func_parse(i); if(!sockt->session[i]) @@ -1199,7 +1200,8 @@ static int connect_check_(uint32 ip) /// Timer function. /// Deletes old connection history records. -static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) { +static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) +{ int clear = 0; int list = 0; struct connect_history *hist = NULL; @@ -1235,6 +1237,9 @@ int access_ipmask(const char *str, struct access_control *acc) uint32 ip; uint32 mask; + nullpo_ret(str); + nullpo_ret(acc); + if( strcmp(str,"all") == 0 ) { ip = 0; mask = 0; @@ -1736,9 +1741,11 @@ bool session_is_active(int fd) } // Resolves hostname into a numeric ip. -uint32 host2ip(const char* hostname) +uint32 host2ip(const char *hostname) { - struct hostent* h = gethostbyname(hostname); + struct hostent* h; + nullpo_ret(hostname); + h = gethostbyname(hostname); return (h != NULL) ? ntohl(*(uint32*)h->h_addr) : 0; } @@ -1771,7 +1778,8 @@ uint16 ntows(uint16 netshort) } /* [Ind/Hercules] - socket_datasync */ -void socket_datasync(int fd, bool send) { +void socket_datasync(int fd, bool send) +{ struct { unsigned int length;/* short is not enough for some */ } data_list[] = { @@ -2055,7 +2063,8 @@ void socket_net_config_read(const char *filename) return; } -void socket_defaults(void) { +void socket_defaults(void) +{ sockt = &sockt_s; sockt->fd_max = 0; diff --git a/src/common/socket.h b/src/common/socket.h index 947ea8d3e..e3a309f20 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/sql.c b/src/common/sql.c index 7e3e2e46f..235be3aca 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -91,7 +91,10 @@ struct Sql *Sql_Malloc(void) self->lengths = NULL; self->result = NULL; self->keepalive = INVALID_TIMER; - self->handle.reconnect = 1; + { + my_bool reconnect = 1; + mysql_options(&self->handle, MYSQL_OPT_RECONNECT, &reconnect); + } return self; } @@ -144,6 +147,7 @@ int Sql_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_ size_t len; size_t off = 0; + nullpo_retr(SQL_ERROR, out_buf); if( self == NULL || SQL_ERROR == SQL->Query(self, "EXPLAIN `%s`", table) ) return SQL_ERROR; @@ -377,7 +381,8 @@ void Sql_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned lon } /// Frees a Sql handle returned by Sql_Malloc. -void Sql_Free(struct Sql *self) { +void Sql_Free(struct Sql *self) +{ if( self ) { SQL->FreeResult(self); @@ -414,6 +419,7 @@ static enum enum_field_types Sql_P_SizeToMysqlIntType(int sz) /// @private static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, void* buffer, size_t buffer_len, unsigned long* out_length, int8* out_is_null) { + nullpo_retr(SQL_ERROR, bind); memset(bind, 0, sizeof(MYSQL_BIND)); switch( buffer_type ) { @@ -494,7 +500,8 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, /// Prints debug information about a field (type and length). /// /// @private -static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_types type, int is_unsigned, unsigned long length, const char* length_postfix) { +static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_types type, int is_unsigned, unsigned long length, const char* length_postfix) +{ const char *sign = (is_unsigned ? "UNSIGNED " : ""); const char *type_string = NULL; switch (type) { @@ -535,6 +542,7 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(struct SqlStmt *self, size_t i) MYSQL_FIELD* field; MYSQL_BIND* column; + nullpo_retv(self); meta = mysql_stmt_result_metadata(self->stmt); field = mysql_fetch_field_direct(meta, (unsigned int)i); ShowSQL("DB error - data of field '%s' was truncated.\n", field->name); @@ -664,8 +672,8 @@ int SqlStmt_BindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_ if (idx >= self->max_params) return SQL_SUCCESS; // out of range - ignore -PRAGMA_GCC45(GCC diagnostic push) -PRAGMA_GCC45(GCC diagnostic ignored "-Wcast-qual") +PRAGMA_GCC46(GCC diagnostic push) +PRAGMA_GCC46(GCC diagnostic ignored "-Wcast-qual") /* * MySQL uses the same struct with a non-const buffer for both * parameters (input) and columns (output). @@ -673,7 +681,7 @@ PRAGMA_GCC45(GCC diagnostic ignored "-Wcast-qual") * dropping a const qualifier here. */ return Sql_P_BindSqlDataType(self->params+idx, buffer_type, (void *)buffer, buffer_len, NULL, NULL); -PRAGMA_GCC45(GCC diagnostic pop) +PRAGMA_GCC46(GCC diagnostic pop) } /// Executes the prepared statement. @@ -874,8 +882,10 @@ void SqlStmt_Free(struct SqlStmt *self) aFree(self); } } + /* receives mysql error codes during runtime (not on first-time-connects) */ -void hercules_mysql_error_handler(unsigned int ecode) { +void hercules_mysql_error_handler(unsigned int ecode) +{ switch( ecode ) { case 2003:/* Can't connect to MySQL (this error only happens here when failing to reconnect) */ if( mysql_reconnect_type == 1 ) { @@ -1041,10 +1051,13 @@ void Sql_HerculesUpdateSkip(struct Sql *self, const char *filename) return; } -void Sql_Init(void) { +void Sql_Init(void) +{ Sql_inter_server_read("conf/common/inter-server.conf", false); // FIXME: Hardcoded path } -void sql_defaults(void) { + +void sql_defaults(void) +{ SQL = &sql_s; SQL->Connect = Sql_Connect; diff --git a/src/common/strlib.c b/src/common/strlib.c index b67adb63c..df8093456 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -344,6 +344,7 @@ int strlib_config_switch(const char *str) { } /// strncpy that always null-terminates the string +/// @remark this function will read at most `n` - 1 bytes from `src` (from 0 to `n` - 2) char *strlib_safestrncpy(char *dst, const char *src, size_t n) { if( n > 0 ) @@ -629,6 +630,7 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i svstate.delim = delim; svstate.done = false; svstate.start = 0; + svstate.end = 0; // parse count = 0; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index aeb8d8e71..3c7e25a0c 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -31,6 +31,7 @@ #include "common/cbasetypes.h" #include "common/core.h" #include "common/memmgr.h" +#include "common/nullpo.h" #include "common/strlib.h" #include <stdio.h> // fopen @@ -237,11 +238,13 @@ enum windows_ver_suite { * @retval true if a revision was correctly detected. * @retval false if no revision was detected. out is set to NULL in this case. */ -bool sysinfo_svn_get_revision(char **out) { +bool sysinfo_svn_get_revision(char **out) +{ // Only include SVN support if detected it, or we're on MSVC #if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_SVN || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN FILE *fp; + nullpo_ret(out); // subversion 1.7 uses a sqlite3 database // FIXME this is hackish at best... // - ignores database file structure @@ -291,6 +294,8 @@ bool sysinfo_svn_get_revision(char **out) { if (*out != NULL) return true; } +#else + nullpo_ret(out); #endif if (*out != NULL) aFree(*out); @@ -305,11 +310,13 @@ bool sysinfo_svn_get_revision(char **out) { * @retval true if a revision was correctly detected. * @retval false if no revision was detected. out is set to NULL in this case. */ -bool sysinfo_git_get_revision(char **out) { +bool sysinfo_git_get_revision(char **out) +{ // Only include Git support if we detected it, or we're on MSVC #if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_GIT || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN char ref[128], filepath[128], line[128]; + nullpo_ret(out); strcpy(ref, "HEAD"); while (*ref) { @@ -334,6 +341,7 @@ bool sysinfo_git_get_revision(char **out) { if (*out != NULL) return true; #else + nullpo_ret(out); if (*out != NULL) aFree(*out); *out = NULL; @@ -351,7 +359,8 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); * * Once retrieved, the version string is stored into sysinfo->p->osversion. */ -void sysinfo_osversion_retrieve(void) { +void sysinfo_osversion_retrieve(void) +{ OSVERSIONINFOEX osvi; StringBuf buf; ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); @@ -602,7 +611,8 @@ typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); * System info is not stored anywhere after retrieval * @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx **/ -void sysinfo_systeminfo_retrieve( LPSYSTEM_INFO info ) { +void sysinfo_systeminfo_retrieve(LPSYSTEM_INFO info) +{ PGNSI pGNSI; // Call GetNativeSystemInfo if supported or GetSystemInfo otherwise. @@ -619,7 +629,8 @@ void sysinfo_systeminfo_retrieve( LPSYSTEM_INFO info ) { * Returns number of bytes in a memory page * Only needed when compiling with MSVC **/ -long sysinfo_getpagesize( void ) { +long sysinfo_getpagesize(void) +{ SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -633,7 +644,8 @@ long sysinfo_getpagesize( void ) { * Once retrieved, the name is stored into sysinfo->p->cpu and the * number of cores in sysinfo->p->cpucores. */ -void sysinfo_cpu_retrieve(void) { +void sysinfo_cpu_retrieve(void) +{ StringBuf buf; SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -669,7 +681,8 @@ void sysinfo_cpu_retrieve(void) { * * Once retrieved, the name is stored into sysinfo->p->arch. */ -void sysinfo_arch_retrieve(void) { +void sysinfo_arch_retrieve(void) +{ SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -697,7 +710,8 @@ void sysinfo_arch_retrieve(void) { * * Once retrieved, the value is stored in sysinfo->p->vcsrevision_src. */ -void sysinfo_vcsrevision_src_retrieve(void) { +void sysinfo_vcsrevision_src_retrieve(void) +{ if (sysinfo->p->vcsrevision_src != NULL) { aFree(sysinfo->p->vcsrevision_src); sysinfo->p->vcsrevision_src = NULL; @@ -721,7 +735,8 @@ void sysinfo_vcsrevision_src_retrieve(void) { * * Once retrieved, the value is stored in sysinfo->p->vcstype_name. */ -void sysinfo_vcstype_name_retrieve(void) { +void sysinfo_vcstype_name_retrieve(void) +{ if (sysinfo->p->vcstype_name != NULL) { aFree(sysinfo->p->vcstype_name); sysinfo->p->vcstype_name = NULL; @@ -750,7 +765,8 @@ void sysinfo_vcstype_name_retrieve(void) { * * Output example: "Linux", "Darwin", "Windows", etc. */ -const char *sysinfo_platform(void) { +const char *sysinfo_platform(void) +{ return sysinfo->p->platform; } @@ -768,7 +784,8 @@ const char *sysinfo_platform(void) { * Output example: "Windows 2008 Small Business Server", "OS X 10.8 Mountain Lion", * "Gentoo Base System Release 2.2", "Debian GNU/Linux 6.0.6 (squeeze)", etc. */ -const char *sysinfo_osversion(void) { +const char *sysinfo_osversion(void) +{ return sysinfo->p->osversion; } @@ -787,7 +804,8 @@ const char *sysinfo_osversion(void) { * "Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz", "Intel Core i7", * "x86 CPU, Family 6, Model 54, Stepping 1", etc. */ -const char *sysinfo_cpu(void) { +const char *sysinfo_cpu(void) +{ return sysinfo->p->cpu; } @@ -800,7 +818,8 @@ const char *sysinfo_cpu(void) { * * @return the number of CPU cores. */ -int sysinfo_cpucores(void) { +int sysinfo_cpucores(void) +{ return sysinfo->p->cpucores; } @@ -817,7 +836,8 @@ int sysinfo_cpucores(void) { * * Output example: "x86", "x86_64", "IA-64", "ARM", etc. */ -const char *sysinfo_arch(void) { +const char *sysinfo_arch(void) +{ return sysinfo->p->arch; } @@ -827,7 +847,8 @@ const char *sysinfo_arch(void) { * @retval true if this is a 64 bit build. * @retval false if this isn't a 64 bit build (i.e. it is a 32 bit build). */ -bool sysinfo_is64bit(void) { +bool sysinfo_is64bit(void) +{ #ifdef _LP64 return true; #else @@ -845,7 +866,8 @@ bool sysinfo_is64bit(void) { * Output example: "Microsoft Visual C++ 2012 (v170050727)", * "Clang v5.0.0", "MinGW32 v3.20", "GCC v4.7.3", etc. */ -const char *sysinfo_compiler(void) { +const char *sysinfo_compiler(void) +{ return sysinfo->p->compiler; } @@ -860,7 +882,8 @@ const char *sysinfo_compiler(void) { * * Output example: "-ggdb -O2 -flto -pipe -ffast-math ..." */ -const char *sysinfo_cflags(void) { +const char *sysinfo_cflags(void) +{ return sysinfo->p->cflags; } @@ -875,7 +898,8 @@ const char *sysinfo_cflags(void) { * * @see VCSTYPE_NONE, VCSTYPE_GIT, VCSTYPE_SVN, VCSTYPE_UNKNOWN */ -int sysinfo_vcstypeid(void) { +int sysinfo_vcstypeid(void) +{ return sysinfo->p->vcstype; } @@ -892,7 +916,8 @@ int sysinfo_vcstypeid(void) { * * Output example: "Git", "SVN", "Exported" */ -const char *sysinfo_vcstype(void) { +const char *sysinfo_vcstype(void) +{ return sysinfo->p->vcstype_name; } @@ -910,7 +935,8 @@ const char *sysinfo_vcstype(void) { * * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546" */ -const char *sysinfo_vcsrevision_src(void) { +const char *sysinfo_vcsrevision_src(void) +{ return sysinfo->p->vcsrevision_src; } @@ -926,7 +952,8 @@ const char *sysinfo_vcsrevision_src(void) { * * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546" */ -const char *sysinfo_vcsrevision_scripts(void) { +const char *sysinfo_vcsrevision_scripts(void) +{ return sysinfo->p->vcsrevision_scripts; } @@ -934,7 +961,8 @@ const char *sysinfo_vcsrevision_scripts(void) { * Reloads the run-time (scripts) VCS revision information. To be used during * script reloads to refresh the cached version. */ -void sysinfo_vcsrevision_reload(void) { +void sysinfo_vcsrevision_reload(void) +{ if (sysinfo->p->vcsrevision_scripts != NULL) { aFree(sysinfo->p->vcsrevision_scripts); sysinfo->p->vcsrevision_scripts = NULL; @@ -956,7 +984,8 @@ void sysinfo_vcsrevision_reload(void) { * @retval false if the current process is running as regular user, or * in any case under Windows. */ -bool sysinfo_is_superuser(void) { +bool sysinfo_is_superuser(void) +{ #ifndef _WIN32 if (geteuid() == 0) return true; @@ -967,7 +996,8 @@ bool sysinfo_is_superuser(void) { /** * Interface runtime initialization. */ -void sysinfo_init(void) { +void sysinfo_init(void) +{ sysinfo->p->compiler = SYSINFO_COMPILER; #ifdef WIN32 sysinfo->p->platform = "Windows"; @@ -993,7 +1023,8 @@ void sysinfo_init(void) { /** * Interface shutdown cleanup. */ -void sysinfo_final(void) { +void sysinfo_final(void) +{ #ifdef WIN32 // Only need to be free'd in win32, they're #defined elsewhere if (sysinfo->p->osversion) @@ -1035,7 +1066,8 @@ static const char *sysinfo_time(void) /** * Interface default values initialization. */ -void sysinfo_defaults(void) { +void sysinfo_defaults(void) +{ sysinfo = &sysinfo_s; memset(&sysinfo_p, '\0', sizeof(sysinfo_p)); sysinfo->p = &sysinfo_p; diff --git a/src/common/timer.c b/src/common/timer.c index 0b28f6a06..4f2b86a32 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -258,10 +258,6 @@ int64 timer_gettick(void) { /// Adds a timer to the timer_heap static void push_timer_heap(int tid) { BHEAP_ENSURE(timer_heap, 1, 256); -#ifdef __clang_analyzer__ // Clang's static analyzer warns that BHEAP_ENSURE might set BHEAP_DATA(timer_heap) to NULL. -#include "assert.h" - assert(BHEAP_DATA(timer_heap) != NULL); -#endif // __clang_analyzer__ BHEAP_PUSH(timer_heap, tid, DIFFTICK_MINTOPCMP, swap); } diff --git a/src/common/timer.h b/src/common/timer.h index 2161f5e31..88c891dff 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/common/utils.c b/src/common/utils.c index 73df3aae1..0d76a885e 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -54,6 +54,9 @@ void WriteDump(FILE* fp, const void* buffer, size_t length) size_t i; char hex[48+1], ascii[16+1]; + nullpo_retv(fp); + nullpo_retv(buffer); + fprintf(fp, "--- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F 0123456789ABCDEF\n"); ascii[16] = 0; @@ -78,10 +81,12 @@ void WriteDump(FILE* fp, const void* buffer, size_t length) } /// Dumps given buffer on the console. -void ShowDump(const void *buffer, size_t length) { +void ShowDump(const void *buffer, size_t length) +{ size_t i; char hex[48+1], ascii[16+1]; + nullpo_retv(buffer); ShowDebug("--- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F 0123456789ABCDEF\n"); ascii[16] = 0; @@ -108,6 +113,7 @@ static char* checkpath(char *path, const char *srcpath) { // just make sure the char*path is not const char *p = path; + if (NULL == path || NULL == srcpath) return path; while(*srcpath) { @@ -353,6 +359,28 @@ unsigned int get_percentage(const unsigned int A, const unsigned int B) return (unsigned int)floor(result); } +/// calculates the value of A / B, in percent (rounded down) +uint64 get_percentage64(const uint64 A, const uint64 B) +{ + double result; + + if( B == 0 ) + { + ShowError("get_percentage(): division by zero! (A=%"PRIu64",B=%"PRIu64")\n", A, B); + return ~0U; + } + + result = 100 * ((double)A / (double)B); + + if( result > UINT_MAX ) + { + ShowError("get_percentage(): result percentage too high! (A=%"PRIu64",B=%"PRIu64",result=%g)\n", A, B, result); + return UINT_MAX; + } + + return (uint64)floor(result); +} + /** * Applies a percentual rate modifier. * @@ -400,7 +428,9 @@ int apply_percentrate(int value, int rate, int maxrate) //----------------------------------------------------- const char* timestamp2string(char* str, size_t size, time_t timestamp, const char* format) { - size_t len = strftime(str, size, format, localtime(×tamp)); + size_t len; + nullpo_retr(NULL, str); + len = strftime(str, size, format, localtime(×tamp)); memset(str + len, '\0', size - len); return str; } @@ -413,6 +443,7 @@ bool HCache_check(const char *file) char s_path[255], dT[1]; time_t rtime; + nullpo_retr(false, file); if (!(first = fopen(file,"rb"))) return false; @@ -456,10 +487,14 @@ bool HCache_check(const char *file) return true; } -FILE *HCache_open(const char *file, const char *opt) { +FILE *HCache_open(const char *file, const char *opt) +{ FILE *first; char s_path[255]; + nullpo_retr(NULL, file); + nullpo_retr(NULL, opt); + if( file[0] == '.' && file[1] == '/' ) file += 2; else if( file[0] == '.' ) @@ -498,15 +533,19 @@ void HCache_init(void) } /* transit to fread, shields vs warn_unused_result */ -size_t hread(void * ptr, size_t size, size_t count, FILE * stream) { +size_t hread(void *ptr, size_t size, size_t count, FILE *stream) +{ return fread(ptr, size, count, stream); } + /* transit to fwrite, shields vs warn_unused_result */ -size_t hwrite(const void * ptr, size_t size, size_t count, FILE * stream) { +size_t hwrite(const void *ptr, size_t size, size_t count, FILE *stream) +{ return fwrite(ptr, size, count, stream); } -void HCache_defaults(void) { +void HCache_defaults(void) +{ HCache = &HCache_s; HCache->init = HCache_init; diff --git a/src/common/utils.h b/src/common/utils.h index c5f64124f..e77c63cf2 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -44,6 +44,7 @@ bool exists(const char* filename); /// calculates the value of A / B, in percent (rounded down) unsigned int get_percentage(const unsigned int A, const unsigned int B); +uint64 get_percentage64(const uint64 A, const uint64 B); int64 apply_percentrate64(int64 value, int rate, int maxrate); int apply_percentrate(int value, int rate, int maxrate); diff --git a/src/common/winapi.h b/src/common/winapi.h index 724f052a0..b410e00cd 100644 --- a/src/common/winapi.h +++ b/src/common/winapi.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/config/classes/general.h b/src/config/classes/general.h index f1fa63179..330e6437e 100644 --- a/src/config/classes/general.h +++ b/src/config/classes/general.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/config/const.h b/src/config/const.h index 655f0f949..5c6b451db 100644 --- a/src/config/const.h +++ b/src/config/const.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/config/core.h b/src/config/core.h index afd138a43..bdc7f3eee 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/config/renewal.h b/src/config/renewal.h index 67d216226..2b5a043d4 100644 --- a/src/config/renewal.h +++ b/src/config/renewal.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/config/secure.h b/src/config/secure.h index 3f1342b22..3d111be69 100644 --- a/src/config/secure.h +++ b/src/config/secure.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/login/Makefile.in b/src/login/Makefile.in index c74ed1e10..69cc6a897 100644 --- a/src/login/Makefile.in +++ b/src/login/Makefile.in @@ -47,7 +47,7 @@ LOGIN_PH = lclif.p.h HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC)) + LOGIN_SERVER_SQL_DEPENDS=$(LOGIN_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC) else LOGIN_SERVER_SQL_DEPENDS=needs_mysql endif @@ -106,8 +106,8 @@ login-server: ../../login-server@EXEEXT@ ../../login-server@EXEEXT@: $(LOGIN_SERVER_SQL_DEPENDS) Makefile @echo " LD $(notdir $@)" - @$(CC) @STATIC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_sql/common_sql.a \ - $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @$(CC) @STATIC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \ + $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ # missing object files $(COMMON_D)/obj_all/common.a: diff --git a/src/login/lclif.c b/src/login/lclif.c index 3ed257e85..47b2526c4 100644 --- a/src/login/lclif.c +++ b/src/login/lclif.c @@ -262,7 +262,11 @@ bool lclif_send_server_list(struct login_session_data *sd) WFIFOHEAD(sd->fd, length); packet = WP2PTR(sd->fd); +#if PACKETVER < 20170315 packet->packet_id = PACKET_ID_AC_ACCEPT_LOGIN; +#else + packet->packet_id = PACKET_ID_AC_ACCEPT_LOGIN2; +#endif packet->packet_len = length; packet->auth_code = sd->login_id1; packet->aid = sd->account_id; @@ -280,7 +284,7 @@ bool lclif_send_server_list(struct login_session_data *sd) packet->server_list[n].ip = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip); packet->server_list[n].port = sockt->ntows(htons(server[i].port)); // [!] LE byte order here [!] safestrncpy(packet->server_list[n].name, server[i].name, 20); - packet->server_list[n].usercount = server[i].users; + packet->server_list[n].usercount = login->convert_users_to_colors(server[i].users); if (server[i].type == CST_PAYING && sd->expiration_time > time(NULL)) packet->server_list[n].property = CST_NORMAL; diff --git a/src/login/lclif.p.h b/src/login/lclif.p.h index ae9d1bc14..d28f1c587 100644 --- a/src/login/lclif.p.h +++ b/src/login/lclif.p.h @@ -56,7 +56,9 @@ enum login_packet_id { //PACKET_ID_CA_SSO_LOGIN_REQa = 0x825a, /* unused */ // AC (Login to Client) + PACKET_ID_AC_ACCEPT_LOGIN = 0x0069, + PACKET_ID_AC_ACCEPT_LOGIN2 = 0x0ac4, PACKET_ID_AC_REFUSE_LOGIN = 0x006a, PACKET_ID_SC_NOTIFY_BAN = 0x0081, PACKET_ID_AC_ACK_HASH = 0x01dc, @@ -256,6 +258,9 @@ struct packet_AC_ACCEPT_LOGIN { uint32 last_login_ip; ///< Last login IP char last_login_time[26]; ///< Last login timestamp uint8 sex; ///< Account sex +#if PACKETVER >= 20170315 + char unknown1[17]; +#endif struct { uint32 ip; ///< Server IP address int16 port; ///< Server port @@ -263,6 +268,9 @@ struct packet_AC_ACCEPT_LOGIN { uint16 usercount; ///< Online users uint16 state; ///< Server state uint16 property; ///< Server property +#if PACKETVER >= 20170315 + char unknown2[128]; +#endif } server_list[]; ///< List of charservers } __attribute__((packed)); diff --git a/src/login/login.c b/src/login/login.c index ae584206f..3db9558b8 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1604,7 +1604,7 @@ bool login_config_read_account(const char *filename, struct config_t *config, bo /** * Frees login->config->client_hash_nodes **/ -void clear_client_hash_nodes(void) +void login_clear_client_hash_nodes(void) { struct client_hash_node *node = login->config->client_hash_nodes; @@ -1618,7 +1618,7 @@ void clear_client_hash_nodes(void) } /** - * Reads information from login_configuration.permission.hash.md5_hashes. + * Reads information from login_configuration.permission.hash.md5_hashes (unused function) * * @param setting The setting to read from. */ @@ -1627,7 +1627,7 @@ void login_config_set_md5hash(struct config_setting_t *setting) int i; int count = libconfig->setting_length(setting); - clear_client_hash_nodes(); + login->clear_client_hash_nodes(); // There's no need to parse if it's disabled or if there's no list if (count <= 0 || !login->config->client_hash_check) @@ -1702,7 +1702,7 @@ bool login_config_read_permission_hash(const char *filename, struct config_t *co libconfig->setting_lookup_bool_real(setting, "enabled", &login->config->client_hash_check); if ((setting = libconfig->lookup(config, "login_configuration/permission/hash/MD5_hashes")) != NULL) - login_config_set_md5hash(setting); + login->config_set_md5hash(setting); return true; } @@ -1710,7 +1710,7 @@ bool login_config_read_permission_hash(const char *filename, struct config_t *co /** * Clears login->config->dnsbl_servers, freeing any allocated memory. */ -void clear_dnsbl_servers(void) +void login_clear_dnsbl_servers(void) { while (VECTOR_LENGTH(login->config->dnsbl_servers) > 0) { aFree(&VECTOR_POP(login->config->dnsbl_servers)); @@ -1728,7 +1728,7 @@ void login_config_set_dnsbl_servers(struct config_setting_t *setting) int i; int count = libconfig->setting_length(setting); - clear_dnsbl_servers(); + login->clear_dnsbl_servers(); // There's no need to parse if it's disabled if (count <= 0 || !login->config->use_dnsbl) @@ -1772,7 +1772,7 @@ bool login_config_read_permission_blacklist(const char *filename, struct config_ libconfig->setting_lookup_bool_real(setting, "enabled", &login->config->use_dnsbl); if ((setting = libconfig->lookup(config, "login_configuration/permission/DNS_blacklist/dnsbl_servers")) != NULL) - login_config_set_dnsbl_servers(setting); + login->config_set_dnsbl_servers(setting); return true; } @@ -1806,15 +1806,47 @@ bool login_config_read_permission(const char *filename, struct config_t *config, libconfig->setting_lookup_bool_real(setting, "check_client_version", &login->config->check_client_version); libconfig->setting_lookup_uint32(setting, "client_version_to_connect", &login->config->client_version_to_connect); - if (!login_config_read_permission_hash(filename, config, imported)) + if (!login->config_read_permission_hash(filename, config, imported)) retval = false; - if (!login_config_read_permission_blacklist(filename, config, imported)) + if (!login->config_read_permission_blacklist(filename, config, imported)) retval = false; return retval; } /** + * Reads 'login_configuration.users_count' and initializes required variables. + * + * @param filename Path to configuration file (used in error and warning messages). + * @param config The current config being parsed. + * @param imported Whether the current config is imported from another file. + * + * @retval false in case of error. + */ +bool login_config_read_users(const char *filename, struct config_t *config, bool imported) +{ + struct config_setting_t *setting = NULL; + bool retval = true; + + nullpo_retr(false, filename); + nullpo_retr(false, config); + + if ((setting = libconfig->lookup(config, "login_configuration/users_count")) == NULL) { + if (imported) + return true; + ShowError("login_config_read: login_configuration/users_count was not found in %s!\n", filename); + return false; + } + + libconfig->setting_lookup_bool_real(setting, "send_user_count_description", &login->config->send_user_count_description); + libconfig->setting_lookup_uint32(setting, "low", &login->config->users_low); + libconfig->setting_lookup_uint32(setting, "medium", &login->config->users_medium); + libconfig->setting_lookup_uint32(setting, "high", &login->config->users_high); + + return retval; +} + +/** * Reads the 'login-config' configuration file and initializes required variables. * * @param filename Path to configuration file. @@ -1833,15 +1865,17 @@ bool login_config_read(const char *filename, bool imported) if (!libconfig->load_file(&config, filename)) return false; // Error message is already shown by libconfig->load_file - if (!login_config_read_inter(filename, &config, imported)) + if (!login->config_read_inter(filename, &config, imported)) retval = false; - if (!login_config_read_console(filename, &config, imported)) + if (!login->config_read_console(filename, &config, imported)) retval = false; - if (!login_config_read_log(filename, &config, imported)) + if (!login->config_read_log(filename, &config, imported)) retval = false; - if (!login_config_read_account(filename, &config, imported)) + if (!login->config_read_account(filename, &config, imported)) retval = false; - if (!login_config_read_permission(filename, &config, imported)) + if (!login->config_read_permission(filename, &config, imported)) + retval = false; + if (!login->config_read_users(filename, &config, imported)) retval = false; if (!loginlog_config_read("conf/common/inter-server.conf", imported)) // Only inter-server @@ -1866,6 +1900,30 @@ bool login_config_read(const char *filename, bool imported) return retval; } +/** + * Convert users count to colors. + * + * @param users Actual users count. + * + * @retval users count or color id. + **/ +uint16 login_convert_users_to_colors(uint16 users) +{ +#if PACKETVER >= 20170726 + if (!login->config->send_user_count_description) + return 4; + if (users <= login->config->users_low) + return 0; + else if (users <= login->config->users_medium) + return 1; + else if (users <= login->config->users_high) + return 2; + return 3; +#else + return users; +#endif +} + //-------------------------------------- // Function called at exit of the server //-------------------------------------- @@ -1877,8 +1935,8 @@ int do_final(void) HPM->event(HPET_FINAL); - clear_client_hash_nodes(); - clear_dnsbl_servers(); + login->clear_client_hash_nodes(); + login->clear_dnsbl_servers(); login_log(0, "login server", 100, "login server shutdown"); @@ -2168,6 +2226,20 @@ void login_defaults(void) { login->config_set_defaults = login_config_set_defaults; login->config_read = login_config_read; + login->config_read_inter = login_config_read_inter; + login->config_read_console = login_config_read_console; + login->config_read_log = login_config_read_log; + login->config_read_account = login_config_read_account; + login->config_read_permission = login_config_read_permission; + login->config_read_permission_hash = login_config_read_permission_hash; + login->config_read_permission_blacklist = login_config_read_permission_blacklist; + login->config_read_users = login_config_read_users; + login->config_set_dnsbl_servers = login_config_set_dnsbl_servers; + + login->clear_dnsbl_servers = login_clear_dnsbl_servers; + login->clear_client_hash_nodes = login_clear_client_hash_nodes; + login->config_set_md5hash = login_config_set_md5hash; + login->convert_users_to_colors = login_convert_users_to_colors; login->LOGIN_CONF_NAME = NULL; login->NET_CONF_NAME = NULL; } diff --git a/src/login/login.h b/src/login/login.h index 5632e6529..d5c9972c0 100644 --- a/src/login/login.h +++ b/src/login/login.h @@ -32,6 +32,8 @@ struct mmo_account; struct AccountDB; +struct config_t; +struct config_setting_t; enum E_LOGINSERVER_ST { @@ -119,6 +121,11 @@ struct Login_Config { bool use_dnsbl; ///< dns blacklist blocking ? VECTOR_DECL(char *) dnsbl_servers; ///< dnsbl servers + bool send_user_count_description; + uint32 users_low; + uint32 users_medium; + uint32 users_high; + bool client_hash_check; ///< flags for checking client md5 // TODO: VECTOR candidate struct client_hash_node *client_hash_nodes; ///< linked list containg md5 hash for each gm group @@ -209,6 +216,19 @@ struct login_interface { void (*parse_request_connection) (int fd, struct login_session_data* sd, const char *ip, uint32 ipl); void (*config_set_defaults) (void); bool (*config_read) (const char *filename, bool included); + bool (*config_read_inter) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_console) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_log) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_account) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission_hash) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_permission_blacklist) (const char *filename, struct config_t *config, bool imported); + bool (*config_read_users) (const char *filename, struct config_t *config, bool imported); + void (*clear_dnsbl_servers) (void); + void (*config_set_dnsbl_servers) (struct config_setting_t *setting); + void (*clear_client_hash_nodes) (void); + void (*config_set_md5hash) (struct config_setting_t *setting); + uint16 (*convert_users_to_colors) (uint16 users); char *LOGIN_CONF_NAME; char *NET_CONF_NAME; ///< Network configuration filename }; diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 84544976a..381dbf599 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -78,6 +78,7 @@ #include "map/pc_groups.h" #include "map/pet.h" #include "map/quest.h" +#include "map/rodex.h" #include "map/script.h" #include "map/searchstore.h" #include "map/skill.h" diff --git a/src/map/Makefile.in b/src/map/Makefile.in index 3c6a3f806..6147285e9 100644 --- a/src/map/Makefile.in +++ b/src/map/Makefile.in @@ -44,20 +44,20 @@ MAP_C = atcommand.c battle.c battleground.c buyingstore.c channel.c chat.c \ chrif.c clif.c date.c duel.c elemental.c guild.c homunculus.c HPMmap.c \ instance.c intif.c irc-bot.c itemdb.c log.c mail.c map.c mapreg_sql.c \ mercenary.c mob.c npc.c npc_chat.c party.c path.c pc.c pc_groups.c \ - pet.c quest.c script.c searchstore.c skill.c status.c storage.c \ + pet.c quest.c rodex.c script.c searchstore.c skill.c status.c storage.c \ trade.c unit.c vending.c MAP_OBJ = $(addprefix obj_sql/, $(patsubst %c,%o,$(MAP_C))) MAP_H = atcommand.h battle.h battleground.h buyingstore.h channel.h chat.h \ chrif.h clif.h date.h duel.h elemental.h guild.h homunculus.h HPMmap.h \ instance.h intif.h irc-bot.h itemdb.h log.h mail.h map.h mapreg.h \ - mercenary.h mob.h npc.h packets.h packets_struct.h party.h path.h \ - pc.h pc_groups.h pet.h quest.h script.h searchstore.h skill.h \ + mercenary.h mob.h npc.h packets.h packets_keys.h packets_struct.h party.h path.h \ + pc.h pc_groups.h pet.h quest.h rodex.h script.h searchstore.h skill.h \ status.h storage.h trade.h unit.h vending.h MAP_PH = HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ $(SYSINFO_INC)) + MAP_SERVER_SQL_DEPENDS=$(MAP_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC) else MAP_SERVER_SQL_DEPENDS=needs_mysql endif @@ -116,8 +116,8 @@ map-server: ../../map-server@EXEEXT@ ../../map-server@EXEEXT@: $(MAP_SERVER_SQL_DEPENDS) Makefile @echo " LD $(notdir $@)" - @$(CC) @STATIC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_sql/common_sql.a \ - $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @$(CC) @STATIC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \ + $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ # missing object files $(COMMON_D)/obj_all/common.a: diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3f916eb42..d9f4810ee 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -639,7 +639,7 @@ ACMD(who) { if (pc_get_group_id(pl_sd) > 0) // Player title, if exists StrBuf->Printf(&buf, msg_fd(fd,344), pcg->get_name(pl_sd->group)); // "(%s) " StrBuf->Printf(&buf, msg_fd(fd,347), pl_sd->status.base_level, pl_sd->status.job_level, - pc->job_name(pl_sd->status.class_)); // "| Lv:%d/%d | Job: %s" + pc->job_name(pl_sd->status.class)); // "| Lv:%d/%d | Job: %s" break; } case 3: { @@ -748,7 +748,7 @@ ACMD(whogm) safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,915), // BLvl: %d | Job: %s (Lvl: %d) pl_sd->status.base_level, - pc->job_name(pl_sd->status.class_), pl_sd->status.job_level); + pc->job_name(pl_sd->status.class), pl_sd->status.job_level); clif->message(fd, atcmd_output); p = party->search(pl_sd->status.party_id); @@ -937,7 +937,7 @@ ACMD(hide) { if (sd->disguise != -1 ) status->set_viewdata(&sd->bl, sd->disguise); else - status->set_viewdata(&sd->bl, sd->status.class_); + status->set_viewdata(&sd->bl, sd->status.class); clif->message(fd, msg_fd(fd,10)); // Invisible: Off // increment the number of pvp players on the map @@ -951,7 +951,7 @@ ACMD(hide) { map->foreachinmovearea(clif->insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl); } else { sd->sc.option |= OPTION_INVISIBLE; - sd->vd.class_ = INVISIBLE_CLASS; + sd->vd.class = INVISIBLE_CLASS; clif->message(fd, msg_fd(fd,11)); // Invisible: On // decrement the number of pvp players on the map @@ -1408,7 +1408,7 @@ ACMD(baselevelup) pc->baselevelchanged(sd); if(sd->status.party_id) party->send_levelup(sd); - + if (level > 0 && battle_config.atcommand_levelup_events) npc->script_event(sd, NPCE_BASELVUP); // Trigger OnPCBaseLvUpEvent @@ -1714,7 +1714,23 @@ ACMD(bodystyle) memset(atcmd_output, '\0', sizeof(atcmd_output)); - if (!*message || sscanf(message, "%d", &body_style) < 1) { + if ((sd->job & MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS + && (sd->job & MAPID_THIRDMASK) != MAPID_GENETIC + && (sd->job & MAPID_THIRDMASK) != MAPID_MECHANIC + && (sd->job & MAPID_THIRDMASK) != MAPID_ROYAL_GUARD + && (sd->job & MAPID_THIRDMASK) != MAPID_ARCH_BISHOP + && (sd->job & MAPID_THIRDMASK) != MAPID_RANGER + && (sd->job & MAPID_THIRDMASK) != MAPID_WARLOCK + && (sd->job & MAPID_THIRDMASK) != MAPID_SHADOW_CHASER + && (sd->job & MAPID_THIRDMASK) != MAPID_MINSTRELWANDERER + && (sd->job & MAPID_THIRDMASK) != MAPID_SORCERER + && (sd->job & MAPID_THIRDMASK) != MAPID_SURA + ) { + clif->message(fd, msg_fd(fd, 35)); // This job has no alternate body styles. + return false; + } + + if (*message == '\0' || sscanf(message, "%d", &body_style) < 1) { sprintf(atcmd_output, "Please, enter a body style (usage: @bodystyle <body ID: %d-%d>).", MIN_BODY_STYLE, MAX_BODY_STYLE); clif->message(fd, atcmd_output); return false; @@ -1722,9 +1738,9 @@ ACMD(bodystyle) if (body_style >= MIN_BODY_STYLE && body_style <= MAX_BODY_STYLE) { pc->changelook(sd, LOOK_BODY2, body_style); - clif->message(fd, msg_txt(36)); // Appearence changed. + clif->message(fd, msg_fd(fd, 36)); // Appearence changed. } else { - clif->message(fd, msg_txt(37)); // An invalid number was specified. + clif->message(fd, msg_fd(fd, 37)); // An invalid number was specified. return false; } @@ -3892,6 +3908,8 @@ ACMD(mapinfo) strcat(atcmd_output, msg_fd(fd,1096)); // PartyLock | if (map->list[m_id].flag.guildlock) strcat(atcmd_output, msg_fd(fd,1097)); // GuildLock | + if (map->list[m_id].flag.noautoloot) + strcat(atcmd_output, msg_fd(fd, 1063)); // NoAutoloot | if (map->list[m_id].flag.noviewid != EQP_NONE) strcat(atcmd_output, msg_fd(fd,1079)); // NoViewID | clif->message(fd, atcmd_output); @@ -3975,7 +3993,7 @@ ACMD(mount_peco) return false; } - if ((sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { + if ((sd->job & MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { if (!pc->checkskill(sd,RK_DRAGONTRAINING)) { safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,213), skill->get_desc(RK_DRAGONTRAINING)); // You need %s to mount! clif->message(fd, atcmd_output); @@ -3990,7 +4008,7 @@ ACMD(mount_peco) } return true; } - if ((sd->class_&MAPID_THIRDMASK) == MAPID_RANGER) { + if ((sd->job & MAPID_THIRDMASK) == MAPID_RANGER) { if (!pc->checkskill(sd,RA_WUGRIDER)) { safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,213), skill->get_desc(RA_WUGRIDER)); // You need %s to mount! clif->message(fd, atcmd_output); @@ -4005,7 +4023,7 @@ ACMD(mount_peco) } return true; } - if ((sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC) { + if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { if (!pc_ismadogear(sd)) { clif->message(sd->fd,msg_fd(fd,1123)); // You have mounted your Mado Gear. pc->setmadogear(sd, true); @@ -4015,7 +4033,7 @@ ACMD(mount_peco) } return true; } - if (sd->class_&MAPID_SWORDMAN && sd->class_&JOBL_2) { + if ((sd->job & MAPID_BASEMASK) == MAPID_SWORDMAN && (sd->job & JOBL_2) != 0) { if (!pc_isridingpeco(sd)) { // if actually no peco if (!pc->checkskill(sd, KN_RIDING)) { safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,213), skill->get_desc(KN_RIDING)); // You need %s to mount! @@ -4850,21 +4868,19 @@ ACMD(undisguiseguild) *------------------------------------------*/ ACMD(exp) { - char output[CHAT_SIZE_MAX]; - double nextb, nextj; - - memset(output, '\0', sizeof(output)); + double percentb = 0.0, percentj = 0.0; + uint64 nextb, nextj; nextb = pc->nextbaseexp(sd); - if (nextb) - nextb = sd->status.base_exp*100.0/nextb; + if (nextb != 0) + percentb = sd->status.base_exp * 100.0 / nextb; nextj = pc->nextjobexp(sd); - if (nextj) - nextj = sd->status.job_exp*100.0/nextj; + if (nextj != 0) + percentj = sd->status.job_exp * 100.0 / nextj; - sprintf(output, msg_fd(fd,1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) - clif->message(fd, output); + sprintf(atcmd_output, msg_fd(fd,1148), sd->status.base_level, percentb, sd->status.job_level, percentj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%) + clif->message(fd, atcmd_output); return true; } @@ -5145,6 +5161,11 @@ ACMD(storeall) } } + if (sd->storage.received == false) { + clif->message(fd, msg_fd(fd, 27)); // "Storage has not been loaded yet" + return false; + } + for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount) { if(sd->status.inventory[i].equip != 0) @@ -5160,17 +5181,25 @@ ACMD(storeall) ACMD(clearstorage) { - int i, j; + int i; if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) { clif->message(fd, msg_fd(fd,250)); return false; } - j = sd->status.storage.storage_amount; - for (i = 0; i < j; ++i) { - storage->delitem(sd, i, sd->status.storage.items[i].amount); + if (sd->storage.received == false) { + clif->message(fd, msg_fd(fd, 27)); // "Storage has not been loaded yet" + return false; } + + for (i = 0; i < VECTOR_LENGTH(sd->storage.item); ++i) { + if (VECTOR_INDEX(sd->storage.item, i).nameid == 0) + continue; // we skip the already deleted items. + + storage->delitem(sd, i, VECTOR_INDEX(sd->storage.item, i).amount); + } + storage->close(sd); clif->message(fd, msg_fd(fd,1394)); // Your storage was cleaned. @@ -5578,7 +5607,7 @@ ACMD(changegm) { return false; } - guild->gm_change(sd->status.guild_id, pl_sd); + guild->gm_change(sd->status.guild_id, pl_sd->status.char_id); return true; } @@ -6610,9 +6639,9 @@ ACMD(mobinfo) // stats if (monster->mexp) - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1240), monster->name, monster->jname, monster->sprite, monster->vd.class_); // MVP Monster: '%s'/'%s'/'%s' (%d) + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1240), monster->name, monster->jname, monster->sprite, monster->vd.class); // MVP Monster: '%s'/'%s'/'%s' (%d) else - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1241), monster->name, monster->jname, monster->sprite, monster->vd.class_); // Monster: '%s'/'%s'/'%s' (%d) + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1241), monster->name, monster->jname, monster->sprite, monster->vd.class); // Monster: '%s'/'%s'/'%s' (%d) clif->message(fd, atcmd_output); safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1242), monster->lv, monster->status.max_hp, base_exp, job_exp, MOB_HIT(monster), MOB_FLEE(monster)); // Lv:%d HP:%d Base EXP:%u Job EXP:%u HIT:%d FLEE:%d @@ -8027,8 +8056,8 @@ ACMD(itemlist) if( strcmpi(info->command, "storagelist") == 0 ) { location = "storage"; - items = sd->status.storage.items; - size = MAX_STORAGE; + items = VECTOR_DATA(sd->storage.item); + size = VECTOR_LENGTH(sd->storage.item); } else if( strcmpi(info->command, "cartlist") == 0 ) { location = "cart"; items = sd->status.cart; @@ -8049,7 +8078,7 @@ ACMD(itemlist) const struct item* it = &items[i]; struct item_data* itd; - if( it->nameid == 0 || (itd = itemdb->exists(it->nameid)) == NULL ) + if (it->nameid == 0 || (itd = itemdb->exists(it->nameid)) == NULL) continue; counter += it->amount; @@ -8210,7 +8239,7 @@ ACMD(stats) output_table[14].value = sd->change_level_2nd; output_table[15].value = sd->change_level_3rd; - sprintf(job_jobname, "Job - %s %s", pc->job_name(sd->status.class_), "(level %d)"); + sprintf(job_jobname, "Job - %s %s", pc->job_name(sd->status.class), "(level %d)"); sprintf(output, msg_fd(fd,53), sd->status.name); // '%s' stats: clif->message(fd, output); @@ -8366,6 +8395,38 @@ void atcommand_commands_sub(struct map_session_data* sd, const int fd, AtCommand dbi_destroy(iter); clif->message(fd,line_buff); + if (atcommand->binding_count > 0) { + int i, count_bind = 0; + int gm_lvl = pc_get_group_level(sd); + + for (i = 0; i < atcommand->binding_count; i++) { + if (gm_lvl >= ((type == COMMAND_ATCOMMAND) ? atcommand->binding[i]->group_lv : atcommand->binding[i]->group_lv_char) + || (type == COMMAND_ATCOMMAND && atcommand->binding[i]->at_groups[pcg->get_idx(sd->group)] > 0) + || (type == COMMAND_CHARCOMMAND && atcommand->binding[i]->char_groups[pcg->get_idx(sd->group)] > 0)) { + size_t slen = strlen(atcommand->binding[i]->command); + if (count_bind == 0) { + cur = line_buff; + memset(line_buff, ' ', CHATBOX_SIZE); + line_buff[CHATBOX_SIZE - 1] = 0; + clif->message(fd, "------------------"); + clif->message(fd, "Custom commands:"); + } + if (slen + cur - line_buff >= CHATBOX_SIZE) { + clif->message(fd, line_buff); + cur = line_buff; + memset(line_buff, ' ', CHATBOX_SIZE); + line_buff[CHATBOX_SIZE - 1] = 0; + } + memcpy(cur, atcommand->binding[i]->command, slen); + cur += slen + (10 - slen % 10); + count_bind++; + } + } + if (count_bind > 0) + clif->message(fd, line_buff); // Last Line + count += count_bind; + } + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,274), count); // "%d commands found." clif->message(fd, atcmd_output); @@ -8390,22 +8451,24 @@ ACMD(charcommands) return true; } -/* for new mounts */ +/* For new mounts */ ACMD(cashmount) { if (pc_hasmount(sd)) { - clif->message(fd, msg_fd(fd,1476)); // You are already mounting something else + clif->message(fd, msg_fd(fd, 1476)); // You are already mounting something else return false; } - clif->message(sd->fd,msg_fd(fd,1362)); // NOTICE: If you crash with mount your LUA is outdated. + clif->message(sd->fd, msg_fd(fd, 1362)); // NOTICE: If you crash with mount your LUA is outdated. + if (!sd->sc.data[SC_ALL_RIDING]) { - clif->message(sd->fd,msg_fd(fd,1363)); // You have mounted. - sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, 25, INFINITE_DURATION); + clif->message(sd->fd, msg_fd(fd, 1363)); // You have mounted. + sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, battle_config.boarding_halter_speed, INFINITE_DURATION); } else { - clif->message(sd->fd,msg_fd(fd,1364)); // You have released your mount. + clif->message(sd->fd, msg_fd(fd, 1364)); // You have released your mount. status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); } + return true; } @@ -9218,7 +9281,12 @@ ACMD(searchstore){ searchstore->open(sd, 99, val); return true; } -ACMD(costume){ + +/*========================================== +* @costume +*------------------------------------------*/ +ACMD(costume) +{ const char* names[] = { "Wedding", "Xmas", @@ -9227,6 +9295,9 @@ ACMD(costume){ #if PACKETVER >= 20131218 "Oktoberfest", #endif +#if PACKETVER >= 20141022 + "Summer2", +#endif }; const int name2id[] = { SC_WEDDING, @@ -9236,41 +9307,47 @@ ACMD(costume){ #if PACKETVER >= 20131218 SC_OKTOBERFEST, #endif +#if PACKETVER >= 20141022 + SC_DRESS_UP, +#endif }; unsigned short k = 0, len = ARRAYLENGTH(names); if (!*message) { - for( k = 0; k < len; k++ ) { - if( sd->sc.data[name2id[k]] ) { - safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1473),names[k]);//Costume '%s' removed. - clif->message(sd->fd,atcmd_output); - status_change_end(&sd->bl,name2id[k],INVALID_TIMER); + for (k = 0; k < len; k++) { + if (sd->sc.data[name2id[k]]) { + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1473), names[k]); // Costume '%s' removed. + clif->message(sd->fd, atcmd_output); + status_change_end(&sd->bl, name2id[k], INVALID_TIMER); return true; } } - clif->message(sd->fd,msg_fd(fd,1472)); - for( k = 0; k < len; k++ ) { - safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1471),names[k]);//-- %s - clif->message(sd->fd,atcmd_output); + + clif->message(sd->fd, msg_fd(fd, 1472)); // - Available Costumes + + for (k = 0; k < len; k++) { + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1471), names[k]); //-- %s + clif->message(sd->fd, atcmd_output); } return false; } - for( k = 0; k < len; k++ ) { - if( sd->sc.data[name2id[k]] ) { - safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1470),names[k]);// You're already with a '%s' costume, type '@costume' to remove it. - clif->message(sd->fd,atcmd_output); + for (k = 0; k < len; k++) { + if (sd->sc.data[name2id[k]]) { + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1470), names[k]); // You're already with a '%s' costume, type '@costume' to remove it. + clif->message(sd->fd, atcmd_output); return false; } } - for( k = 0; k < len; k++ ) { - if( strcmpi(message,names[k]) == 0 ) + for (k = 0; k < len; k++) { + if (strcmpi(message,names[k]) == 0) break; } - if( k == len ) { - safesnprintf(atcmd_output, sizeof(atcmd_output),msg_fd(fd,1469),message);// '%s' is not a known costume - clif->message(sd->fd,atcmd_output); + + if (k == len) { + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1469), message); // '%s' is not a known costume + clif->message(sd->fd, atcmd_output); return false; } @@ -9278,6 +9355,7 @@ ACMD(costume){ return true; } + /* for debugging purposes (so users can easily provide us with debug info) */ /* should be trashed as soon as its no longer necessary */ ACMD(skdebug) @@ -9887,6 +9965,8 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa && ( (is_atcommand && pc_get_group_level(sd) >= binding->group_lv) || (!is_atcommand && pc_get_group_level(sd) >= binding->group_lv_char) + || (is_atcommand && binding->at_groups[pcg->get_idx(sd->group)] > 0) + || (!is_atcommand && binding->char_groups[pcg->get_idx(sd->group)] > 0) ) ) { if (binding->log) /* log only if this command should be logged [Ind/Hercules] */ @@ -10150,31 +10230,34 @@ void atcommand_db_load_groups(GroupSettings **groups, struct config_setting_t ** } bool atcommand_can_use(struct map_session_data *sd, const char *command) { - AtCommandInfo *info = atcommand->get_info_byname(atcommand->check_alias(command + 1)); + AtCommandInfo *acmd_d; + struct atcmd_binding_data *bcmd_d; nullpo_retr(false, sd); - nullpo_retr(false, command); - if (info == NULL) - return false; - if ((*command == atcommand->at_symbol && info->at_groups[pcg->get_idx(sd->group)] != 0) || - (*command == atcommand->char_symbol && info->char_groups[pcg->get_idx(sd->group)] != 0) ) { - return true; + if ((acmd_d = atcommand->get_info_byname(atcommand->check_alias(command + 1))) != NULL) { + return ((*command == atcommand->at_symbol && acmd_d->at_groups[pcg->get_idx(sd->group)] > 0) || + (*command == atcommand->char_symbol && acmd_d->char_groups[pcg->get_idx(sd->group)] > 0)); + } else if ((bcmd_d = atcommand->get_bind_byname(atcommand->check_alias(command + 1))) != NULL) { + return ((*command == atcommand->at_symbol && bcmd_d->at_groups[pcg->get_idx(sd->group)] > 0) || + (*command == atcommand->char_symbol && bcmd_d->char_groups[pcg->get_idx(sd->group)] > 0)); } return false; } + bool atcommand_can_use2(struct map_session_data *sd, const char *command, AtCommandType type) { - AtCommandInfo *info = atcommand->get_info_byname(atcommand->check_alias(command)); + AtCommandInfo *acmd_d; + struct atcmd_binding_data *bcmd_d; nullpo_retr(false, sd); - nullpo_retr(false, command); - if (info == NULL) - return false; - if ((type == COMMAND_ATCOMMAND && info->at_groups[pcg->get_idx(sd->group)] != 0) || - (type == COMMAND_CHARCOMMAND && info->char_groups[pcg->get_idx(sd->group)] != 0) ) { - return true; + if ((acmd_d = atcommand->get_info_byname(atcommand->check_alias(command))) != NULL) { + return ((type == COMMAND_ATCOMMAND && acmd_d->at_groups[pcg->get_idx(sd->group)] > 0) || + (type == COMMAND_CHARCOMMAND && acmd_d->char_groups[pcg->get_idx(sd->group)] > 0)); + } else if ((bcmd_d = atcommand->get_bind_byname(atcommand->check_alias(command))) != NULL) { + return ((type == COMMAND_ATCOMMAND && bcmd_d->at_groups[pcg->get_idx(sd->group)] > 0) || + (type == COMMAND_CHARCOMMAND && bcmd_d->char_groups[pcg->get_idx(sd->group)] > 0)); } return false; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index ef8be7807..efcf6dd31 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -79,8 +79,10 @@ struct AtCommandInfo { struct atcmd_binding_data { char command[ATCOMMAND_LENGTH]; char npc_event[ATCOMMAND_LENGTH]; - int group_lv; - int group_lv_char; + int group_lv; // DEPRECATED + int group_lv_char; // DEPRECATED + char *at_groups; // quick @commands "can-use" lookup + char *char_groups; // quick @charcommands "can-use" lookup bool log; }; diff --git a/src/map/battle.c b/src/map/battle.c index daef8f6a8..8983e93c9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -875,7 +875,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, } #else if( skill_id != ASC_BREAKER && weapon ) // Adv Katar Mastery is does not applies to ASC_BREAKER, but other masteries DO apply >_> - if( sd->status.weapon == W_KATAR && (skill2_lv=pc->checkskill(sd,ASC_KATAR)) > 0 ) + if (sd->weapontype == W_KATAR && (skill2_lv=pc->checkskill(sd,ASC_KATAR)) > 0) damage += damage * (10 + 2 * skill2_lv) / 100; #endif @@ -892,7 +892,7 @@ int64 battle_calc_masteryfix(struct block_list *src, struct block_list *target, damage += damage * ratio / 100; } - if( sd->status.class_ == JOB_ARCH_BISHOP_T || sd->status.class_ == JOB_ARCH_BISHOP ){ + if ((sd->job & MAPID_THIRDMASK) == MAPID_ARCH_BISHOP) { if((skill2_lv = pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) damage += damage * skill2_lv / 100; @@ -993,11 +993,7 @@ int64 battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64 // FIXME: wflag is undocumented int64 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 cflag, int wflag){ struct map_session_data *sd, *tsd; -#ifdef RENEWAL - short cardfix = 100; -#else - short cardfix = 1000; -#endif + int cardfix = 1000; short t_class, s_class, s_race2, t_race2; struct status_data *sstatus, *tstatus; int i; @@ -1073,24 +1069,14 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ if( tsd->sc.data[SC_PROTECT_MDEF] ) cardfix = cardfix * ( 100 - tsd->sc.data[SC_PROTECT_MDEF]->val1 ) / 100; } -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if ( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif break; case BF_WEAPON: t_race2 = status->get_race2(target); if( cflag&2 ){ if( sd && !(nk&NK_NO_CARDFIX_ATK) ){ - short cardfix_ = -#ifdef RENEWAL - 100; -#else - 1000; -#endif + int cardfix_ = 1000; if( sd->state.arrow_atk ){ cardfix = cardfix * (100 + sd->right_weapon.addrace[tstatus->race] + sd->arrow_addrace[tstatus->race]) / 100; if( !(nk&NK_NO_ELEFIX) ){ @@ -1190,16 +1176,11 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ #ifndef RENEWAL if( wflag&BF_LONG ) cardfix = cardfix * (100 + sd->bonus.long_attack_atk_rate) / 100; +#endif if( (cflag&1) && cardfix_ != 1000 ) damage = damage * cardfix_ / 1000; else if( cardfix != 1000 ) damage = damage * cardfix / 1000; -#else - if ((cflag & 1) && cardfix_ != 100) - damage += damage * (cardfix_ - 100) / 100; - else if (cardfix != 100) - damage += damage * (cardfix - 100) / 100; -#endif } }else{ // Target side @@ -1249,13 +1230,8 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ #endif if( tsd->sc.data[SC_PROTECT_DEF] ) cardfix = cardfix * (100 - tsd->sc.data[SC_PROTECT_DEF]->val1) / 100; -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif } } break; @@ -1287,13 +1263,8 @@ int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct block_ cardfix = cardfix*(100 - tsd->subsize[sstatus->size]) / 100; cardfix = cardfix*(100 - tsd->subrace2[s_race2]) / 100; cardfix = cardfix * (100 - tsd->bonus.misc_def_rate) / 100; -#ifdef RENEWAL - if ( cardfix != 100 ) - damage += damage * (cardfix - 100) / 100; -#else if ( cardfix != 1000 ) damage = damage * cardfix / 1000; -#endif } break; } @@ -1666,8 +1637,29 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block break; #endif /** - * Arch Bishop - **/ + * Summoner + **/ + case SU_BITE: + skillratio += 100; + break; + case SU_SCRATCH: + skillratio += -50 + 50 * skill_lv; + break; + case SU_SCAROFTAROU: + skillratio += -100 + 100 * skill_lv; + break; + case SU_PICKYPECK: + case SU_PICKYPECK_DOUBLE_ATK: + skillratio += 100 + 100 * skill_lv; + if ((status_get_max_hp(target) / 100) <= 50) + skillratio *= 2; + break; + case SU_LUNATICCARROTBEAT: + skillratio += 100 + 100 * skill_lv; + break; + /** + * Arch Bishop + **/ case AB_JUDEX: skillratio = 300 + 20 * skill_lv; RE_LVL_DMOD(100); @@ -1886,6 +1878,12 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block pc->del_charm(sd, sd->charm_count, sd->charm_type); } break; + case SU_SV_STEMSPEAR: + skillratio += 600; + break; + case SU_CN_METEOR: + skillratio += 100 + 100 * skill_lv; + break; default: battle->calc_skillratio_magic_unknown(&attack_type, src, target, &skill_id, &skill_lv, &skillratio, &flag); break; @@ -2005,7 +2003,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += 100 + 100 * skill_lv + 100 * (skill_lv / 2); break; case RG_BACKSTAP: - if( sd && sd->status.weapon == W_BOW && battle_config.backstab_bow_penalty ) + if (sd != NULL && sd->weapontype == W_BOW && battle_config.backstab_bow_penalty) skillratio += (200 + 40 * skill_lv) / 2; else skillratio += 200 + 40 * skill_lv; @@ -2026,10 +2024,10 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block case CR_HOLYCROSS: { int ratio = 35 * skill_lv; - #ifdef RENEWAL - if(sd && sd->status.weapon == W_2HSPEAR) - ratio *= 2; - #endif +#ifdef RENEWAL + if (sd != NULL && sd->weapontype == W_2HSPEAR) + ratio *= 2; +#endif skillratio += ratio; break; } @@ -2687,7 +2685,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio += 2*sc->data[SC_TRUESIGHT]->val1; if( sc->data[SC_LKCONCENTRATION] ) skillratio += sc->data[SC_LKCONCENTRATION]->val2; - if( sd && sd->status.weapon == W_KATAR && (i=pc->checkskill(sd,ASC_KATAR)) > 0 ) + if (sd != NULL && sd->weapontype == W_KATAR && (i=pc->checkskill(sd,ASC_KATAR)) > 0) skillratio += skillratio * (10 + 2 * i) / 100; #endif if( (!skill_id || skill_id == KN_AUTOCOUNTER) && sc->data[SC_CRUSHSTRIKE] ){ @@ -2996,7 +2994,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam status_change_end(bl,SC_DEEP_SLEEP,INVALID_TIMER); } if( s_sd && t_sd && sc->data[SC_COLD] && flag&BF_WEAPON ){ - switch(s_sd->status.weapon){ + switch (s_sd->weapontype) { case W_MACE: case W_2HMACE: case W_1HAXE: @@ -3068,6 +3066,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam damage -= 50 * damage / 100;//50% reduction to physical ranged attacks } + if (sc->data[SC_SU_STOOP]) + damage -= damage * 90 / 100; + // Compressed code, fixed by map.h [Epoque] if (src->type == BL_MOB) { const struct mob_data *md = BL_UCCAST(BL_MOB, src); @@ -3135,7 +3136,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam if( (sce = sc->data[SC_STONEHARDSKIN]) && flag&(BF_SHORT|BF_WEAPON) && damage > 0 ) { sce->val2 -= (int)cap_value(damage,INT_MIN,INT_MAX); if( src->type == BL_PC ) { - if (s_sd && s_sd->status.weapon != W_BOW) + if (s_sd != NULL && s_sd->weapontype != W_BOW) skill->break_equip(src, EQP_WEAPON, 3000, BCT_SELF); } else skill->break_equip(src, EQP_WEAPON, 3000, BCT_SELF); @@ -3176,6 +3177,19 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam status_change_end(bl, SC_KYRIE, INVALID_TIMER); } + if ((sce = sc->data[SC_TUNAPARTY]) != NULL && damage > 0) { + clif->specialeffect(bl, 336, AREA); + sce->val2 -= (int)cap_value(damage, INT_MIN, INT_MAX); + if (sce->val2 >= 0) { + damage = 0; + } else { + damage = -sce->val2; + } + if (sce->val2 <= 0) { + status_change_end(bl, SC_TUNAPARTY, INVALID_TIMER); + } + } + if( sc->data[SC_MEIKYOUSISUI] && rnd()%100 < 40 ) // custom value damage = 0; @@ -3676,6 +3690,12 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list //Damage calculation from iRO wiki. [Jobbie] ad.damage = status->get_lv(src) * 10 + sstatus->int_; break; + /** + * Summoner + */ + case SU_SV_ROOTTWIST_ATK: + ad.damage = 100; + break; default: { unsigned int skillratio = 100; //Skill dmg modifiers. MATK_ADD( status->get_matk(src, 2) ); @@ -3711,10 +3731,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list //Constant/misc additions from skills if (skill_id == WZ_FIREPILLAR) MATK_ADD(100+50*skill_lv); - if( sd && ( sd->status.class_ == JOB_ARCH_BISHOP_T || sd->status.class_ == JOB_ARCH_BISHOP ) && - (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && - (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) - MATK_ADDRATE(i); + if (sd != NULL && (sd->job & MAPID_THIRDMASK) == MAPID_ARCH_BISHOP) { + int eucharistica_level = pc->checkskill(sd,AB_EUCHARISTICA); + if (eucharistica_level > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK)) + MATK_ADDRATE(eucharistica_level); + } } } #ifndef HMAP_ZONE_DAMAGE_CAP_TYPE @@ -4525,8 +4546,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if(!skill_id) { //Skills ALWAYS use ONLY your right-hand weapon (tested on Aegis 10.2) - if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0) - { + if (sd && sd->weapontype1 == W_FIST && sd->weapontype2 != W_FIST) { flag.rh=0; flag.lh=1; } @@ -4599,7 +4619,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list short cri = sstatus->cri; if (sd != NULL) { // if show_katar_crit_bonus is enabled, it already done the calculation in status.c - if (!battle_config.show_katar_crit_bonus && sd->status.weapon == W_KATAR) { + if (!battle_config.show_katar_crit_bonus && sd->weapontype == W_KATAR) { cri <<= 1; } @@ -4772,8 +4792,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if ((temp = pc->checkskill(sd,BS_WEAPONRESEARCH)) > 0) hitrate += hitrate * ( 2 * temp ) / 100; - if( (sd->status.weapon == W_1HSWORD || sd->status.weapon == W_DAGGER) && - (temp = pc->checkskill(sd, GN_TRAINING_SWORD))>0 ) + if ((sd->weapontype == W_1HSWORD || sd->weapontype == W_DAGGER) && (temp = pc->checkskill(sd, GN_TRAINING_SWORD)) > 0) hitrate += 3 * temp; } @@ -4907,7 +4926,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list (!skill_id && sc && sc->data[SC_HLIF_CHANGE]?4:0)| (sc && sc->data[SC_WEAPONPERFECT]?8:0); if (flag.arrow && sd) - switch(sd->status.weapon) { + switch (sd->weapontype) { case W_BOW: case W_REVOLVER: case W_GATLING: @@ -5199,8 +5218,16 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if (hd != NULL) ATK_ADD(hd->homunculus.spiritball * 3); } + if ((wd.flag&(BF_LONG|BF_MAGIC)) == BF_LONG) { + if (sd != NULL && pc->checkskill(sd, SU_POWEROFLIFE) > 0) { + if (pc->checkskill(sd, SU_SCAROFTAROU) == 5 && pc->checkskill(sd, SU_PICKYPECK) == 5 && pc->checkskill(sd, SU_ARCLOUSEDASH) == 5 && pc->checkskill(sd, SU_LUNATICCARROTBEAT) == 5) { + ATK_ADDRATE(20); + } + } + } } + switch (skill_id) { case AS_SONICBLOW: if (sc && sc->data[SC_SOULLINK] && @@ -5263,6 +5290,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if( sc && sc->data[SC_MTF_RANGEATK] ) ATK_ADDRATE(sc->data[SC_MTF_RANGEATK]->val1);// temporary it should be 'bonus.long_attack_atk_rate' #endif + if (sc != NULL && sc->data[SC_ARCLOUSEDASH] != NULL && sc->data[SC_ARCLOUSEDASH]->val4 != 0) { + ATK_ADDRATE(sc->data[SC_ARCLOUSEDASH]->val4); + } if( (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) ATK_ADDRATE(-i); @@ -5505,13 +5535,13 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list //Dual-wield if (wd.damage) { temp = pc->checkskill(sd,AS_RIGHT) * 10; - if( (sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) temp = pc->checkskill(sd,KO_RIGHT) * 10 + 20; ATK_RATER( 50 + temp ); } if (wd.damage2) { temp = pc->checkskill(sd,AS_LEFT) * 10; - if( (sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) temp = pc->checkskill(sd,KO_LEFT) * 10 + 20; ATK_RATEL( 30 + temp ); } @@ -5522,7 +5552,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if(wd.damage < 1) wd.damage = 1; if(wd.damage2 < 1) wd.damage2 = 1; #endif - } else if(sd->status.weapon == W_KATAR && !skill_id) { //Katars (offhand damage only applies to normal attacks, tested on Aegis 10.2) + } else if (sd->weapontype == W_KATAR && skill_id == 0) { + // Katars (offhand damage only applies to normal attacks, tested on Aegis 10.2) temp = pc->checkskill(sd,TF_DOUBLE); wd.damage2 = wd.damage * (1 + (temp * 2))/100; @@ -5641,7 +5672,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list } //Reject Sword bugreport:4493 by Daegaladh if (wd.damage != 0 && tsc != NULL && tsc->data[SC_SWORDREJECT] != NULL - && (sd == NULL || sd->weapontype1 == W_DAGGER || sd->weapontype1 == W_1HSWORD || sd->status.weapon == W_2HSWORD) + && (sd == NULL || sd->weapontype1 == W_DAGGER || sd->weapontype1 == W_1HSWORD || sd->weapontype == W_2HSWORD) && rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { ATK_RATER(50); @@ -6008,20 +6039,18 @@ int battle_damage_area(struct block_list *bl, va_list ap) { if (bl->type == BL_MOB && BL_UCCAST(BL_MOB, bl)->class_ == MOBID_EMPELIUM) return 0; if( bl != src && battle->check_target(src,bl,BCT_ENEMY) > 0 ) { - struct map_session_data *sd = NULL; nullpo_ret(src); map->freeblock_lock(); - sd = BL_CAST(BL_PC, src); if (src->type == BL_PC) - battle->drain(sd, bl, damage, damage, status_get_race(bl), is_boss(bl)); + battle->drain(BL_UCAST(BL_PC, src), bl, damage, damage, status_get_race(bl), is_boss(bl)); if( amotion ) battle->delay_damage(tick, amotion,src,bl,0,CR_REFLECTSHIELD,0,damage,ATK_DEF,0,true); else status_fix_damage(src,bl,damage,0); clif->damage(bl,bl,amotion,dmotion,damage,1,BDT_ENDURE,0); - if (src->type != BL_PC || !sd->state.autocast) + if (src->type != BL_PC || !BL_UCCAST(BL_PC, src)->state.autocast) skill->additional_effect(src, bl, CR_REFLECTSHIELD, 1, BF_WEAPON|BF_SHORT|BF_NORMAL,ATK_DEF,tick); map->freeblock_unlock(); } @@ -6041,9 +6070,9 @@ bool battle_check_arrows(struct map_session_data *sd) } //Ammo check by Ishizu-chan if (sd->inventory_data[index]) { - switch (sd->status.weapon) { + switch (sd->weapontype) { case W_BOW: - if (sd->inventory_data[index]->look != A_ARROW) { + if (sd->inventory_data[index]->subtype != A_ARROW) { clif->arrow_fail(sd, 0); return false; } @@ -6052,13 +6081,13 @@ bool battle_check_arrows(struct map_session_data *sd) case W_RIFLE: case W_GATLING: case W_SHOTGUN: - if (sd->inventory_data[index]->look != A_BULLET) { + if (sd->inventory_data[index]->subtype != A_BULLET) { clif->skill_fail(sd, 0, USESKILL_FAIL_NEED_MORE_BULLET, 0); return false; } break; case W_GRENADE: - if (sd->inventory_data[index]->look != A_GRENADE) { + if (sd->inventory_data[index]->subtype != A_GRENADE) { clif->skill_fail(sd, 0, USESKILL_FAIL_NEED_MORE_BULLET, 0); return false; } @@ -6102,7 +6131,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if (sd) { - sd->state.arrow_atk = (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)); + sd->state.arrow_atk = (sd->weapontype == W_BOW || (sd->weapontype >= W_REVOLVER && sd->weapontype <= W_GRENADE)); if (sd->state.arrow_atk) { if (battle->check_arrows(sd) == false) @@ -6128,7 +6157,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t return ATK_BLOCK; } } - if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->status.weapon == W_FIST ? 1 : 2)) ) + if( tsc && tsc->data[SC_BLADESTOP_WAIT] && !is_boss(src) && (src->type == BL_PC || tsd == NULL || distance_bl(src, target) <= (tsd->weapontype == W_FIST ? 1 : 2)) ) { uint16 skill_lv = tsc->data[SC_BLADESTOP_WAIT]->val1; int duration = skill->get_time2(MO_BLADESTOP,skill_lv); @@ -6755,14 +6784,23 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if( flag&(BCT_PARTY|BCT_ENEMY) ) { int s_party = status->get_party_id(s_bl); int s_guild = status->get_guild_id(s_bl); + int t_guild = status->get_guild_id(t_bl); - if( s_party && s_party == status->get_party_id(t_bl) - && !(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty) - && !(map_flag_gvg(m) && map->list[m].flag.gvg_noparty && !( s_guild && s_guild == status->get_guild_id(t_bl) )) - && (!map->list[m].flag.battleground || sbg_id == tbg_id) ) - state |= BCT_PARTY; - else + if (s_party != 0 && s_party == status->get_party_id(t_bl)) { + if (map_flag_gvg(m) && map->list[m].flag.gvg_noparty) { + if (s_guild != 0 && t_guild != 0 && (s_guild == t_guild || guild->isallied(s_guild, t_guild))) + state |= BCT_PARTY; + else + state |= flag&BCT_ENEMY ? BCT_ENEMY : BCT_PARTY; + } else if (!(map->list[m].flag.pvp && map->list[m].flag.pvp_noparty) + && (!map->list[m].flag.battleground || sbg_id == tbg_id)) { + state |= BCT_PARTY; + } else { + state |= BCT_ENEMY; + } + } else { state |= BCT_ENEMY; + } } if( flag&(BCT_GUILD|BCT_ENEMY) ) { int s_guild = status->get_guild_id(s_bl); @@ -6783,8 +6821,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f const struct map_session_data *s_sd = BL_UCCAST(BL_PC, s_bl); const struct map_session_data *t_sd = BL_UCCAST(BL_PC, t_bl); if ( - (s_sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE || - (t_sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE || + (s_sd->job & MAPID_UPPERMASK) == MAPID_NOVICE || + (t_sd->job & MAPID_UPPERMASK) == MAPID_NOVICE || s_sd->status.base_level < battle_config.pk_min_level || t_sd->status.base_level < battle_config.pk_min_level || (battle_config.pk_level_range && abs(s_sd->status.base_level - t_sd->status.base_level) > battle_config.pk_level_range) @@ -6966,14 +7004,15 @@ static const struct battle_data { { "max_heal_lv", &battle_config.max_heal_lv, 11, 1, INT_MAX, }, { "max_heal", &battle_config.max_heal, 9999, 0, INT_MAX, }, { "combo_delay_rate", &battle_config.combo_delay_rate, 100, 0, INT_MAX, }, - { "item_check", &battle_config.item_check, 0, 0, 1, }, + { "item_check", &battle_config.item_check, 0, 0, 0xF, }, { "item_use_interval", &battle_config.item_use_interval, 100, 0, INT_MAX, }, - { "cashfood_use_interval", &battle_config.cashfood_use_interval, 60000, 0, INT_MAX, }, { "wedding_modifydisplay", &battle_config.wedding_modifydisplay, 0, 0, 1, }, { "wedding_ignorepalette", &battle_config.wedding_ignorepalette, 0, 0, 1, }, { "xmas_ignorepalette", &battle_config.xmas_ignorepalette, 0, 0, 1, }, { "summer_ignorepalette", &battle_config.summer_ignorepalette, 0, 0, 1, }, { "hanbok_ignorepalette", &battle_config.hanbok_ignorepalette, 0, 0, 1, }, + { "oktoberfest_ignorepalette", &battle_config.oktoberfest_ignorepalette, 0, 0, 1, }, + { "summer2_ignorepalette", &battle_config.summer2_ignorepalette, 0, 0, 1, }, { "natural_healhp_interval", &battle_config.natural_healhp_interval, 6000, NATURAL_HEAL_INTERVAL, INT_MAX, }, { "natural_healsp_interval", &battle_config.natural_healsp_interval, 8000, NATURAL_HEAL_INTERVAL, INT_MAX, }, { "natural_heal_skill_interval", &battle_config.natural_heal_skill_interval, 10000, NATURAL_HEAL_INTERVAL, INT_MAX, }, @@ -7028,6 +7067,7 @@ static const struct battle_data { { "vending_over_max", &battle_config.vending_over_max, 1, 0, 1, }, { "show_steal_in_same_party", &battle_config.show_steal_in_same_party, 0, 0, 1, }, { "party_hp_mode", &battle_config.party_hp_mode, 0, 0, 1, }, + { "party_change_leader_same_map", &battle_config.party_change_leader_same_map, 0, 0, 1, }, { "show_party_share_picker", &battle_config.party_show_share_picker, 1, 0, 1, }, { "show_picker_item_type", &battle_config.show_picker_item_type, 112, 0, INT_MAX, }, { "party_update_interval", &battle_config.party_update_interval, 1000, 100, INT_MAX, }, @@ -7108,6 +7148,7 @@ static const struct battle_data { { "castrate_dex_scale", &battle_config.castrate_dex_scale, 150, 1, INT_MAX, }, { "vcast_stat_scale", &battle_config.vcast_stat_scale, 530, 1, INT_MAX, }, { "area_size", &battle_config.area_size, 14, 0, INT_MAX, }, + { "chat_area_size", &battle_config.chat_area_size, 9, 0, INT_MAX, }, { "zeny_from_mobs", &battle_config.zeny_from_mobs, 0, 0, 1, }, { "mobs_level_up", &battle_config.mobs_level_up, 0, 0, 1, }, { "mobs_level_up_exp_rate", &battle_config.mobs_level_up_exp_rate, 1, 1, INT_MAX, }, @@ -7141,7 +7182,6 @@ static const struct battle_data { { "mob_npc_event_type", &battle_config.mob_npc_event_type, 1, 0, 1, }, { "character_size", &battle_config.character_size, 1|2, 0, 1|2, }, { "retaliate_to_master", &battle_config.retaliate_to_master, 1, 0, 1, }, - { "rare_drop_announce", &battle_config.rare_drop_announce, 0, 0, 10000, }, { "duel_allow_pvp", &battle_config.duel_allow_pvp, 0, 0, 1, }, { "duel_allow_gvg", &battle_config.duel_allow_gvg, 0, 0, 1, }, { "duel_allow_teleport", &battle_config.duel_allow_teleport, 0, 0, 1, }, @@ -7260,6 +7300,14 @@ static const struct battle_data { { "save_body_style", &battle_config.save_body_style, 0, 0, 1, }, { "player_warp_keep_direction", &battle_config.player_warp_keep_direction, 0, 0, 1, }, { "atcommand_levelup_events", &battle_config.atcommand_levelup_events, 0, 0, 1, }, + { "bow_unequip_arrow", &battle_config.bow_unequip_arrow, 1, 0, 1, }, + { "max_summoner_parameter", &battle_config.max_summoner_parameter, 120, 10, 10000, }, + { "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, }, + { "monster_eye_range_bonus", &battle_config.mob_eye_range_bonus, 0, 0, 10, }, + { "prevent_logout_trigger", &battle_config.prevent_logout_trigger, 0xE, 0, 0xF, }, + { "boarding_halter_speed", &battle_config.boarding_halter_speed, 25, 0, 100, }, + { "features/rodex", &battle_config.feature_rodex, 1, 0, 1, }, + { "features/rodex_use_accountmail", &battle_config.feature_rodex_use_accountmail, 0, 0, 1, }, }; #ifndef STATS_OPT_OUT /** @@ -7538,6 +7586,13 @@ void battle_adjust_conf(void) { } #endif +#if PACKETVER < 20131223 + if (battle_config.mvp_exp_reward_message) { + ShowWarning("conf/map/battle/client.conf MVP EXP reward message is enabled but it requires PACKETVER 2013-12-23 or newer, disabling...\n"); + battle_config.mvp_exp_reward_message = 0; + } +#endif + #ifndef CELL_NOSTACK if (battle_config.custom_cell_stack_limit != 1) ShowWarning("Battle setting 'custom_cell_stack_limit' takes no effect as this server was compiled without Cell Stack Limit support.\n"); diff --git a/src/map/battle.h b/src/map/battle.h index ebfa0e305..4a63887c4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -240,12 +240,13 @@ struct Battle_Config { int combo_delay_rate; int item_check; int item_use_interval; //[Skotlex] - int cashfood_use_interval; int wedding_modifydisplay; int wedding_ignorepalette; //[Skotlex] int xmas_ignorepalette; // [Valaris] int summer_ignorepalette; // [Zephyrus] int hanbok_ignorepalette; + int oktoberfest_ignorepalette; + int summer2_ignorepalette; int natural_healhp_interval; int natural_healsp_interval; int natural_heal_skill_interval; @@ -297,6 +298,7 @@ struct Battle_Config { int show_steal_in_same_party; int party_share_type; int party_hp_mode; + int party_change_leader_same_map; int party_show_share_picker; int show_picker_item_type; int attack_attr_none; @@ -362,6 +364,7 @@ struct Battle_Config { int castrate_dex_scale; // added by [MouseJstr] int area_size; // added by [MouseJstr] + int chat_area_size; // added by [gumi] int max_def, over_def_bonus; //added by [Skotlex] @@ -406,7 +409,6 @@ struct Battle_Config { int mob_npc_event_type; //Determines on who the npc_event is executed. [Skotlex] int character_size; // if riders have size=2, and baby class riders size=1 [Lupus] - int rare_drop_announce; // chance <= to show rare drops global announces int retaliate_to_master; //Whether when a mob is attacked by another mob, it will retaliate versus the mob or the mob's master. [Skotlex] @@ -544,6 +546,19 @@ struct Battle_Config { int player_warp_keep_direction; int atcommand_levelup_events; // Enable atcommands trigger level up events for NPCs + + int bow_unequip_arrow; + + int max_summoner_parameter; // Summoner Max Stats + int mvp_exp_reward_message; + + int mob_eye_range_bonus; //Vulture's Eye and Snake's Eye range bonus + + int prevent_logout_trigger; + int boarding_halter_speed; + + int feature_rodex; + int feature_rodex_use_accountmail; }; /* criteria for battle_config.idletime_critera */ diff --git a/src/map/battleground.c b/src/map/battleground.c index 7419a1928..cd7178951 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -822,7 +822,7 @@ enum BATTLEGROUNDS_QUEUE_ACK bg_canqueue(struct map_session_data *sd, struct bg_ if ( sd->status.base_level > arena->max_level || sd->status.base_level < arena->min_level ) return BGQA_FAIL_LEVEL_INCORRECT; - if ( !(sd->class_&JOBL_2) ) /* TODO: maybe make this a per-arena setting, so users may make custom arenas like baby-only,whatever. */ + if ((sd->job & JOBL_2) == 0) /* TODO: maybe make this a per-arena setting, so users may make custom arenas like baby-only,whatever. */ return BGQA_FAIL_CLASS_INVALID; tsec = (unsigned int)time(NULL); diff --git a/src/map/battleground.h b/src/map/battleground.h index 4c3d4878f..6bd0f2c99 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index d2e2a2c20..70e08a4b4 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 1e277b7fa..b3756c39e 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/channel.c b/src/map/channel.c index ee8242b23..9ec415883 100644 --- a/src/map/channel.c +++ b/src/map/channel.c @@ -26,6 +26,7 @@ #include "map/instance.h" #include "map/irc-bot.h" #include "map/map.h" +#include "map/npc.h" #include "map/pc.h" #include "common/cbasetypes.h" #include "common/conf.h" @@ -278,12 +279,21 @@ void channel_send(struct channel_data *chan, struct map_session_data *sd, const clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1455)); return; } else if (sd) { + int i; + safesnprintf(message, 150, "[ #%s ] %s : %s", chan->name, sd->status.name, msg); clif->channel_msg(chan,sd,message); if (chan->type == HCS_TYPE_IRC) ircbot->relay(sd->status.name,msg); if (chan->msg_delay != 0) sd->hchsysch_tick = timer->gettick(); + + for (i = 0; i < MAX_EVENTQUEUE; i++) { + if (chan->handlers[i][0] != '\0') { + pc->setregstr(sd, script->add_str("@channelmes$"), msg); + npc->event(sd, chan->handlers[i], 0); + } + } } else { safesnprintf(message, 150, "[ #%s ] %s", chan->name, msg); clif->channel_msg2(chan, message); diff --git a/src/map/channel.h b/src/map/channel.h index e8696fd90..4ac3c6037 100644 --- a/src/map/channel.h +++ b/src/map/channel.h @@ -23,6 +23,8 @@ #include "common/hercules.h" #include "common/mmo.h" +#include "map/map.h" // EVENT_NAME_LENGTH, MAX_EVENTQUEUE + /** * Declarations **/ @@ -85,6 +87,7 @@ struct channel_data { unsigned char color; struct DBMap *users; struct DBMap *banned; + char handlers[MAX_EVENTQUEUE][EVENT_NAME_LENGTH]; unsigned int options; unsigned int owner; enum channel_types type; diff --git a/src/map/chat.c b/src/map/chat.c index 145d44d1e..763d98f7a 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/chat.h b/src/map/chat.h index af43d9703..bcdf674f7 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/chrif.c b/src/map/chrif.c index d641c6dd3..39aa046d7 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -324,6 +324,9 @@ bool chrif_save(struct map_session_data *sd, int flag) { if( sd->save_quest ) intif->quest_save(sd); + if (sd->storage.received == true && sd->storage.save == true) + intif->send_account_storage(sd); + return true; } @@ -1059,19 +1062,17 @@ int chrif_disconnectplayer(int fd) { /*========================================== * Request/Receive top 10 Fame character list *------------------------------------------*/ -int chrif_updatefamelist(struct map_session_data* sd) { - char type; +int chrif_updatefamelist(struct map_session_data *sd) +{ + int type; nullpo_retr(0, sd); chrif_check(-1); - switch(sd->class_ & MAPID_UPPERMASK) { - case MAPID_BLACKSMITH: type = RANKTYPE_BLACKSMITH; break; - case MAPID_ALCHEMIST: type = RANKTYPE_ALCHEMIST; break; - case MAPID_TAEKWON: type = RANKTYPE_TAEKWON; break; - default: - return 0; - } + type = pc->famelist_type(sd->job); + + if (type == RANKTYPE_UNKNOWN) + return 0; WFIFOHEAD(chrif->fd, 11); WFIFOW(chrif->fd,0) = 0x2b10; diff --git a/src/map/chrif.h b/src/map/chrif.h index 4a1e1da47..615521e0f 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/clif.c b/src/map/clif.c index 040f86a58..4dc36be6d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -46,6 +46,7 @@ #include "map/pc.h" #include "map/pet.h" #include "map/quest.h" +#include "map/rodex.h" #include "map/script.h" #include "map/skill.h" #include "map/status.h" @@ -276,7 +277,7 @@ unsigned char clif_bl_type(struct block_list *bl) vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - if (clif->isdisguised(bl) && !pc->db_checkid(vd->class_)) + if (clif->isdisguised(bl) && !pc->db_checkid(vd->class)) return CLUT_NPC; return CLUT_PC; case BL_ITEM: @@ -288,15 +289,19 @@ unsigned char clif_bl_type(struct block_list *bl) case BL_MOB: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_MOB; + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_MOB; case BL_NPC: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_EVENT; +#if PACKETVER >= 20170726 + return CLUT_EVENT; +#else + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT; +#endif case BL_PET: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_PET; + return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_PET; case BL_HOM: return CLUT_HOMNUCLUS; case BL_MER: @@ -451,8 +456,8 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target break; case AREA_CHAT_WOC: nullpo_retr(true, bl); - map->foreachinarea(clif->send_sub, bl->m, bl->x-(AREA_SIZE-5), bl->y-(AREA_SIZE-5), - bl->x+(AREA_SIZE-5), bl->y+(AREA_SIZE-5), BL_PC, buf, len, bl, AREA_WOC); + map->foreachinarea(clif->send_sub, bl->m, bl->x-CHAT_AREA_SIZE, bl->y-CHAT_AREA_SIZE, + bl->x+CHAT_AREA_SIZE, bl->y+CHAT_AREA_SIZE, BL_PC, buf, len, bl, AREA_WOC); break; case CHAT: @@ -677,7 +682,8 @@ void clif_authok(struct map_session_data *sd) #if PACKETVER >= 20080102 p.font = sd->status.font; #endif -#if PACKETVER >= 20141016 +// Some clients smaller than 20160330 cant be tested [4144] +#if PACKETVER >= 20141022 && PACKETVER < 20160330 p.sex = sd->status.sex; #endif clif->send(&p,sizeof(p),&sd->bl,SELF); @@ -886,8 +892,8 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un } #if PACKETVER < 4 - *rhand = sd->status.weapon; - *lhand = sd->status.shield; + *rhand = sd->status.look.weapon; + *lhand = sd->status.look.shield; #else if (sd->equip_index[EQI_HAND_R] >= 0 && sd->inventory_data[sd->equip_index[EQI_HAND_R]]) @@ -961,14 +967,15 @@ void clif_set_unit_idle2(struct block_list* bl, struct map_session_data *tsd, en p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; p.shield = vd->shield; p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.shield = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1005,7 +1012,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu nullpo_retv(bl); #if PACKETVER < 20091103 - if( !pc->db_checkid(vd->class_) ) { + if (!pc->db_checkid(vd->class)) { clif->set_unit_idle2(bl,tsd,target); return; } @@ -1028,7 +1035,7 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1037,7 +1044,8 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu #endif p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.accessory = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1063,27 +1071,36 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 p.body = vd->body_style; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 safestrncpy(p.name, clif->get_bl_name(bl), NAME_LENGTH); #endif - clif->send(&p,sizeof(p),tsd?&tsd->bl:bl,target); if (clif->isdisguised(bl)) { #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE +#if PACKETVER >= 20131223 + p.AID = -bl->id; +#else p.GID = -bl->id; +#endif #else p.GID = -bl->id; #endif @@ -1115,11 +1132,12 @@ void clif_spawn_unit2(struct block_list* bl, enum send_target target) { p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; - p.job = vd->class_; + p.job = vd->class; p.shield = vd->shield; p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.shield = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1147,7 +1165,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { nullpo_retv(bl); #if PACKETVER < 20091103 - if( !pc->db_checkid(vd->class_) ) { + if (!pc->db_checkid(vd->class)) { clif->spawn_unit2(bl,target); return; } @@ -1170,7 +1188,7 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1179,7 +1197,8 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { #endif p.accessory2 = vd->head_top; p.accessory3 = vd->head_mid; - if( bl->type == BL_NPC && vd->class_ == FLAG_CLASS ) { //The hell, why flags work like this? + if (bl->type == BL_NPC && vd->class == FLAG_CLASS) { + // The hell, why flags work like this? p.accessory = status->get_emblem_id(bl); p.accessory2 = GetWord(g_id, 1); p.accessory3 = GetWord(g_id, 0); @@ -1204,27 +1223,37 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) { #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 p.body = vd->body_style; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 safestrncpy(p.name, clif->get_bl_name(bl), NAME_LENGTH); #endif if (clif->isdisguised(bl)) { nullpo_retv(sd); - if( sd->status.class_ != sd->disguise ) + if (sd->status.class != sd->disguise) clif->send(&p,sizeof(p),bl,target); #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE +#if PACKETVER >= 20131223 + p.AID = -bl->id; +#else p.GID = -bl->id; +#endif #else p.GID = -bl->id; #endif @@ -1258,7 +1287,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, #endif #if PACKETVER >= 20131223 p.AID = bl->id; - p.GID = (tsd) ? tsd->status.char_id : 0; // CCODE + p.GID = (sd) ? sd->status.char_id : 0; // CCODE #else p.GID = bl->id; #endif @@ -1266,7 +1295,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, p.bodyState = (sc) ? sc->opt1 : 0; p.healthState = (sc) ? sc->opt2 : 0; p.effectState = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - p.job = vd->class_; + p.job = vd->class; p.head = vd->hair_style; p.weapon = vd->weapon; p.accessory = vd->head_bottom; @@ -1296,18 +1325,24 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, #endif #if PACKETVER >= 20120221 if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) { - const struct mob_data *md = BL_UCCAST(BL_MOB, bl); p.maxHP = status_get_max_hp(bl); p.HP = status_get_hp(bl); - p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0; } else { p.maxHP = -1; p.HP = -1; - p.isBoss = 0; + } + if (bl->type == BL_MOB) { + const struct mob_data *md = BL_UCCAST(BL_MOB, bl); + p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE; + } else { + p.isBoss = BTYPE_NONE; } #endif #if PACKETVER >= 20150513 p.body = vd->body_style; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 safestrncpy(p.name, clif->get_bl_name(bl), NAME_LENGTH); #endif @@ -1315,8 +1350,12 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, if (clif->isdisguised(bl)) { #if PACKETVER >= 20091103 - p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE + p.objecttype = pc->db_checkid(status->get_viewdata(bl)->class) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE +#if PACKETVER >= 20131223 + p.AID = -bl->id; +#else p.GID = -bl->id; +#endif #else p.GID = -bl->id; #endif @@ -1328,7 +1367,7 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd, /// 01b0 <id>.L <type>.B <value>.L /// type: /// unused -void clif_class_change(struct block_list *bl, int class_, int type) +void clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd) { nullpo_retv(bl); @@ -1339,7 +1378,11 @@ void clif_class_change(struct block_list *bl, int class_, int type) WBUFL(buf,2)=bl->id; WBUFB(buf,6)=type; WBUFL(buf,7)=class_; - clif->send(buf,packet_len(0x1b0),bl,AREA); + + if (sd == NULL) + clif->send(buf, packet_len(0x1b0), bl, AREA); + else + clif->send(buf, packet_len(0x1b0), &sd->bl, SELF); } } @@ -1360,7 +1403,7 @@ void clif_spiritball_single(int fd, struct map_session_data *sd) { *------------------------------------------*/ void clif_charm_single(int fd, struct map_session_data *sd) { -#if PACKETVER >= 20120410 +#if PACKETVER >= 20110809 nullpo_retv(sd); WFIFOHEAD(fd, packet_len(0x08cf)); WFIFOW(fd,0) = 0x08cf; @@ -1427,7 +1470,7 @@ bool clif_spawn(struct block_list *bl) if( !vd ) return false; - if (vd->class_ == INVISIBLE_CLASS) + if (vd->class == INVISIBLE_CLASS) return true; // Doesn't need to be spawned, so everything is alright if (bl->type == BL_NPC) { @@ -1461,8 +1504,8 @@ bool clif_spawn(struct block_list *bl) } if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0) clif->spiritcharm(sd); - if (sd->status.robe) - clif->refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA); + if (sd->status.look.robe != 0) + clif->refreshlook(bl, bl->id, LOOK_ROBE, sd->status.look.robe, AREA); } break; case BL_MOB: @@ -1774,7 +1817,7 @@ void clif_move(struct unit_data *ud) bl = ud->bl; nullpo_retv(bl); vd = status->get_viewdata(bl); - if (!vd || vd->class_ == INVISIBLE_CLASS) + if (vd == NULL || vd->class == INVISIBLE_CLASS) return; //This performance check is needed to keep GM-hidden objects from being notified to bots. if (bl->type == BL_NPC) { @@ -2374,23 +2417,37 @@ void clif_addcards2(unsigned short *cards, struct item* item) { } /** - * Fills in RandomOptions(Bonuses) of items into the buffer + * Fills in ItemOptions(Bonuses) of items into the buffer * - * Dummy datais used since this feature isn't supported yet (ITEM_RDM_OPT). - * A maximum of 5 random options can be supported. + * A maximum of 5 item options can be supported. * * @param buf[in,out] The buffer to write to. The pointer must be valid and initialized. * @param item[in] The source item. */ -void clif_add_random_options(unsigned char* buf, struct item* item) + int clif_add_item_options(struct ItemOptions *buf, const struct item *it) { - int i; - nullpo_retv(buf); - for (i = 0; i < 5; i++){ - WBUFW(buf,i*5+0) = 0; // OptIndex - WBUFW(buf,i*5+2) = 0; // Value - WBUFB(buf,i*5+4) = 0; // Param1 + int i = 0, j = 0, total_options = 0; + + nullpo_ret(buf); + + // Append the buffer with existing options first. + for (i = 0; i < MAX_ITEM_OPTIONS; i++) { + if (it->option[i].index) { + WBUFW(buf, j * 5 + 0) = it->option[i].index; // OptIndex + WBUFW(buf, j * 5 + 2) = it->option[i].value; // Value + WBUFB(buf, j * 5 + 4) = it->option[i].param; // Param1 + total_options++; + j++; + } + } + // Append the remaining buffer with no values; + for (; j < MAX_ITEM_OPTIONS || j < 5; j++) { + WBUFW(buf, j * 5 + 0) = 0; + WBUFW(buf, j * 5 + 2) = 0; + WBUFB(buf, j * 5 + 4) = 0; } + + return total_options; } /// Notifies the client, about a received inventory item or the result of a pick-up request. @@ -2399,7 +2456,9 @@ void clif_add_random_options(unsigned char* buf, struct item* item) /// 02d4 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.W <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK3) /// 0990 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V5) /// 0a0c <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W (ZC_ITEM_PICKUP_ACK_V6) -void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { +/// 0a37 <index>.W <amount>.W <name id>.W <identified>.B <damaged>.B <refine>.B <card1>.W <card2>.W <card3>.W <card4>.W <equip location>.L <item type>.B <result>.B <expire time>.L <bindOnEquipType>.W <favorite>.B <view id>.W (ZC_ITEM_PICKUP_ACK_V7) +void clif_additem(struct map_session_data *sd, int n, int amount, int fail) +{ struct packet_additem p; nullpo_retv(sd); @@ -2414,9 +2473,6 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.count = amount; if( !fail ) { -#if PACKETVER >= 20150226 - int i; -#endif if( n < 0 || n >= MAX_INVENTORY || sd->status.inventory[n].nameid <=0 || sd->inventory_data[n] == NULL ) return; @@ -2441,11 +2497,11 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) { p.bindOnEquipType = sd->status.inventory[n].bound && !itemdb->isstackable2(sd->inventory_data[n]) ? 2 : sd->inventory_data[n]->flag.bindonequip ? 1 : 0; #endif #if PACKETVER >= 20150226 - for (i=0; i<5; i++){ - p.option_data[i].index = 0; - p.option_data[i].value = 0; - p.option_data[i].param = 0; - } + clif->add_item_options(&p.option_data[0], &sd->status.inventory[n]); +#endif +#if PACKETVER >= 20160921 + p.favorite = sd->status.inventory[n].favorite; + p.look = sd->inventory_data[n]->view_sprite; #endif } p.result = (unsigned char)fail; @@ -2518,61 +2574,54 @@ void clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_data * } -void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { -#if PACKETVER >= 20150226 - int j; -#endif +void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *it, struct item_data *id, int eqp_pos) +{ nullpo_retv(p); - nullpo_retv(i); + nullpo_retv(it); nullpo_retv(id); p->index = idx; if (id->view_id > 0) p->ITID = id->view_id; else - p->ITID = i->nameid; + p->ITID = it->nameid; p->type = itemtype(id->type); #if PACKETVER < 20120925 - p->IsIdentified = i->identify ? 1 : 0; + p->IsIdentified = it->identify ? 1 : 0; #endif p->location = eqp_pos; - p->WearState = i->equip; + p->WearState = it->equip; #if PACKETVER < 20120925 - p->IsDamaged = (i->attribute & ATTR_BROKEN) != 0 ? 1 : 0; + p->IsDamaged = (it->attribute & ATTR_BROKEN) != 0 ? 1 : 0; #endif - p->RefiningLevel = i->refine; + p->RefiningLevel = it->refine; - clif->addcards2(&p->slot.card[0], i); + clif->addcards2(&p->slot.card[0], it); #if PACKETVER >= 20071002 - p->HireExpireDate = i->expire_time; + p->HireExpireDate = it->expire_time; #endif #if PACKETVER >= 20080102 - p->bindOnEquipType = i->bound ? 2 : id->flag.bindonequip ? 1 : 0; + p->bindOnEquipType = it->bound ? 2 : id->flag.bindonequip ? 1 : 0; #endif #if PACKETVER >= 20100629 - p->wItemSpriteNumber = (id->equip&EQP_VISIBLE) ? id->look : 0; + p->wItemSpriteNumber = (id->equip&EQP_VISIBLE) ? id->view_sprite : 0; #endif #if PACKETVER >= 20120925 - p->Flag.IsIdentified = i->identify ? 1 : 0; - p->Flag.IsDamaged = (i->attribute & ATTR_BROKEN) != 0 ? 1 : 0; - p->Flag.PlaceETCTab = i->favorite ? 1 : 0; + p->Flag.IsIdentified = it->identify ? 1 : 0; + p->Flag.IsDamaged = (it->attribute & ATTR_BROKEN) != 0 ? 1 : 0; + p->Flag.PlaceETCTab = it->favorite ? 1 : 0; p->Flag.SpareBits = 0; #endif #if PACKETVER >= 20150226 - p->option_count = 0; - for (j=0; j<5; j++){ - p->option_data[j].index = 0; - p->option_data[j].value = 0; - p->option_data[j].param = 0; - } + p->option_count = clif->add_item_options(p->option_data, it); #endif } @@ -2949,13 +2998,6 @@ void clif_updatestatus(struct map_session_data *sd,int type) break; case SP_HP: WFIFOL(fd,4)=sd->battle_status.hp; - // TODO: Won't these overwrite the current packet? - if( map->list[sd->bl.m].hpmeter_visible ) - clif->hpmeter(sd); - if( !battle_config.party_hp_mode && sd->status.party_id ) - clif->party_hp(sd); - if( sd->bg_id ) - clif->bg_hp(sd); break; case SP_SP: WFIFOL(fd,4)=sd->battle_status.sp; @@ -3004,27 +3046,50 @@ void clif_updatestatus(struct map_session_data *sd,int type) WFIFOL(fd,4)=sd->status.zeny; len = packet_len(0xb1); break; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 case SP_BASEEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=sd->status.base_exp; + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = sd->status.base_exp; + len = packet_len(0xacb); + break; + case SP_JOBEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = sd->status.job_exp; + len = packet_len(0xacb); + break; + case SP_NEXTBASEEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = pc->nextbaseexp(sd); + len = packet_len(0xacb); + break; + case SP_NEXTJOBEXP: + WFIFOW(fd, 0) = 0xacb; + WFIFOQ(fd, 4) = pc->nextjobexp(sd); + len = packet_len(0xacb); + break; +#else + case SP_BASEEXP: + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)(sd->status.base_exp); len = packet_len(0xb1); break; case SP_JOBEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=sd->status.job_exp; + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)(sd->status.job_exp); len = packet_len(0xb1); break; case SP_NEXTBASEEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=pc->nextbaseexp(sd); + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)pc->nextbaseexp(sd); len = packet_len(0xb1); break; case SP_NEXTJOBEXP: - WFIFOW(fd,0)=0xb1; - WFIFOL(fd,4)=pc->nextjobexp(sd); + WFIFOW(fd, 0) = 0xb1; + WFIFOL(fd, 4) = (uint32)pc->nextjobexp(sd); len = packet_len(0xb1); break; - +#endif /** * SP_U<STAT> are used to update the amount of points necessary to increase that stat **/ @@ -3105,6 +3170,21 @@ void clif_updatestatus(struct map_session_data *sd,int type) return; } WFIFOSET(fd,len); + + // Additional update packets that should be sent right after + switch (type) { + case SP_BASELEVEL: + pc->update_job_and_level(sd); + break; + case SP_HP: + if (map->list[sd->bl.m].hpmeter_visible) + clif->hpmeter(sd); + if (!battle_config.party_hp_mode && sd->status.party_id) + clif->party_hp(sd); + if (sd->bg_id) + clif->bg_hp(sd); + break; + } } /// Notifies client of a parameter change of an another player (ZC_PAR_CHANGE_USER). @@ -3139,7 +3219,9 @@ void clif_changelook(struct block_list *bl,int type,int val) struct status_change* sc; struct view_data* vd; enum send_target target = AREA; +#if PACKETVER >= 4 int val2 = 0; +#endif nullpo_retv(bl); sd = BL_CAST(BL_PC, bl); @@ -3165,31 +3247,31 @@ void clif_changelook(struct block_list *bl,int type,int val) vd->shield = val; break; case LOOK_BASE: - if( !sd ) break; + if (sd == NULL) + break; - if ( val == INVISIBLE_CLASS ) /* nothing to change look */ + if (val == INVISIBLE_CLASS) /* nothing to change look */ return; - if( sd->sc.option&OPTION_COSTUME ) + if (sd->sc.option & OPTION_COSTUME) vd->weapon = vd->shield = 0; - if( !vd->cloth_color ) + if (!vd->cloth_color) break; - if (sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette) + if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true) vd->cloth_color = 0; - if (sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette) + if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true) vd->cloth_color = 0; - if (sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette) + if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true) vd->cloth_color = 0; - if (sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette) + if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true) vd->cloth_color = 0; - if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */) + if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true) vd->cloth_color = 0; - if (vd->body_style && ( - sd->sc.option&OPTION_WEDDING || sd->sc.option&OPTION_XMAS || - sd->sc.option&OPTION_SUMMER || sd->sc.option&OPTION_HANBOK || - sd->sc.option&OPTION_OKTOBERFEST)) + if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true) + vd->cloth_color = 0; + if (vd->body_style != 0 && (sd->sc.option & OPTION_COSTUME) != 0) vd->body_style = 0; break; case LOOK_HAIR: @@ -3208,16 +3290,18 @@ void clif_changelook(struct block_list *bl,int type,int val) vd->hair_color = val; break; case LOOK_CLOTHES_COLOR: - if( val && sd ) { - if( sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette ) + if (val && sd != NULL) { + if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true) + val = 0; + if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true) val = 0; - if( sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette ) + if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true) val = 0; - if( sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette ) + if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true) val = 0; - if( sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette ) + if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true) val = 0; - if( sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */ ) + if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true) val = 0; } vd->cloth_color = val; @@ -3249,10 +3333,7 @@ void clif_changelook(struct block_list *bl,int type,int val) #endif break; case LOOK_BODY2: - if (val && ( - sd->sc.option&OPTION_WEDDING || sd->sc.option&OPTION_XMAS || - sd->sc.option&OPTION_SUMMER || sd->sc.option&OPTION_HANBOK || - sd->sc.option&OPTION_OKTOBERFEST)) + if (sd != NULL && (sd->sc.option&OPTION_COSTUME) != OPTION_NOTHING) val = 0; vd->body_style = val; break; @@ -3264,17 +3345,22 @@ void clif_changelook(struct block_list *bl,int type,int val) #if PACKETVER < 4 clif->sendlook(bl, bl->id, type, val, 0, target); #else - if(type == LOOK_WEAPON || type == LOOK_SHIELD) { - nullpo_retv(vd); - type = LOOK_WEAPON; - val = vd->weapon; - val2 = vd->shield; - } - if (clif->isdisguised(bl)) { - clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); - clif->sendlook(bl, -bl->id, type, val, val2, SELF); + if (bl->type != BL_NPC) { + if(type == LOOK_WEAPON || type == LOOK_SHIELD) { + nullpo_retv(vd); + type = LOOK_WEAPON; + val = vd->weapon; + val2 = vd->shield; + } + if (clif->isdisguised(bl)) { + clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); + clif->sendlook(bl, -bl->id, type, val, val2, SELF); + } else { + clif->sendlook(bl, bl->id, type, val, val2, target); + } } else { - clif->sendlook(bl, bl->id, type, val, val2, target); + struct npc_data *nd = BL_UCAST(BL_NPC, bl); + npc->refresh(nd); } #endif } @@ -3484,7 +3570,7 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,enum e_EQUIP_IT p.wearLocation = pos; #if PACKETVER >= 20100629 if (result == EIA_SUCCESS && sd->inventory_data[n]->equip&EQP_VISIBLE) - p.wItemSpriteNumber = sd->inventory_data[n]->look; + p.wItemSpriteNumber = sd->inventory_data[n]->view_sprite; else p.wItemSpriteNumber = 0; #endif @@ -3991,7 +4077,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd WBUFW(buf,15)= 0; //card (4w) WBUFW(buf,17)= 0; //card (4w) #if PACKETVER >= 20150226 - clif->add_random_options(WBUFP(buf, 19), &sd->status.inventory[index]); + clif->add_item_options(WBUFP(buf, 19), &sd->status.inventory[index]); #endif } else @@ -4017,7 +4103,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd WBUFB(buf,10)= sd->status.inventory[index].refine; //refine clif->addcards(WBUFP(buf, 11), &sd->status.inventory[index]); #if PACKETVER >= 20150226 - clif->add_random_options(WBUFP(buf, 19), &sd->status.inventory[index]); + clif->add_item_options(WBUFP(buf, 19), &sd->status.inventory[index]); #endif } WFIFOSET(fd,packet_len(tradeaddType)); @@ -4148,7 +4234,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde WFIFOB(fd,12+offset) = i->refine; //refine clif->addcards(WFIFOP(fd,13+offset), i); #if PACKETVER >= 20150226 - clif->add_random_options(WFIFOP(fd,21+offset), i); + clif->add_item_options(WFIFOP(fd, 21 + offset), i); #endif WFIFOSET(fd,packet_len(storageaddType)); } @@ -4161,12 +4247,13 @@ void clif_storageitemremoved(struct map_session_data* sd, int index, int amount) nullpo_retv(sd); - fd=sd->fd; - WFIFOHEAD(fd,packet_len(0xf6)); - WFIFOW(fd,0)=0xf6; // Storage item removed - WFIFOW(fd,2)=index+1; - WFIFOL(fd,4)=amount; - WFIFOSET(fd,packet_len(0xf6)); + fd = sd->fd; + + WFIFOHEAD(fd, packet_len(0xf6)); + WFIFOW(fd, 0) = 0xf6; // Storage item removed + WFIFOW(fd, 2) = index + 1; + WFIFOL(fd, 4) = amount; + WFIFOSET(fd, packet_len(0xf6)); } /// Closes storage (ZC_CLOSE_STORE). @@ -4234,7 +4321,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { nullpo_retv(bl); vd = status->get_viewdata(bl); - if (!vd || vd->class_ == INVISIBLE_CLASS) + if (vd == NULL || vd->class == INVISIBLE_CLASS) return; if (bl->type == BL_NPC) { @@ -4265,8 +4352,8 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) { clif->specialeffect_single(bl,421,sd->fd); if (tsd->bg_id != 0 && 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); + if (tsd->status.look.robe != 0) + clif->refreshlook(&sd->bl, bl->id, LOOK_ROBE, tsd->status.look.robe, SELF); } break; case BL_MER: // Devotion Effects @@ -4694,7 +4781,7 @@ int clif_outsight(struct block_list *bl,va_list ap) nullpo_ret(bl); switch(bl->type){ case BL_PC: - if (sd->vd.class_ != INVISIBLE_CLASS) + if (sd->vd.class != INVISIBLE_CLASS) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); if (sd->chat_id != 0) { struct chat_data *cd = map->id2cd(sd->chat_id); @@ -4717,7 +4804,7 @@ int clif_outsight(struct block_list *bl,va_list ap) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); break; default: - if ((vd=status->get_viewdata(bl)) && vd->class_ != INVISIBLE_CLASS) + if ((vd=status->get_viewdata(bl)) && vd->class != INVISIBLE_CLASS) clif->clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd); break; } @@ -4726,7 +4813,7 @@ int clif_outsight(struct block_list *bl,va_list ap) nullpo_ret(tbl); if (tbl->type == BL_SKILL) //Trap knocked out of sight clif->clearchar_skillunit(BL_UCAST(BL_SKILL, tbl), sd->fd); - else if ((vd = status->get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS + else if ((vd = status->get_viewdata(tbl)) != NULL && vd->class != INVISIBLE_CLASS && !(tbl->type == BL_NPC && (BL_UCAST(BL_NPC, tbl)->option&OPTION_INVISIBLE))) clif->clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd); } @@ -4802,7 +4889,7 @@ void clif_skillinfoblock(struct map_session_data *sd) } safestrncpy(WFIFOP(fd,len+12), skill->get_name(id), NAME_LENGTH); if(sd->status.skill[i].flag == SKILL_FLAG_PERMANENT) - WFIFOB(fd,len+36) = (sd->status.skill[i].lv < skill->tree_get_max(id, sd->status.class_))? 1:0; + WFIFOB(fd,len+36) = (sd->status.skill[i].lv < skill->tree_get_max(id, sd->status.class))? 1:0; else WFIFOB(fd,len+36) = 0; len += 37; @@ -4853,7 +4940,7 @@ void clif_addskill(struct map_session_data *sd, int id) } safestrncpy(WFIFOP(fd,14), skill->get_name(id), NAME_LENGTH); if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT) - WFIFOB(fd,38) = (skill_lv < skill->tree_get_max(id, sd->status.class_))? 1:0; + WFIFOB(fd,38) = (skill_lv < skill->tree_get_max(id, sd->status.class))? 1:0; else WFIFOB(fd,38) = 0; WFIFOSET(fd,packet_len(0x111)); @@ -4898,7 +4985,7 @@ void clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, in WFIFOW(fd, 6) = skill->get_sp(skill_id, skill_lv); WFIFOW(fd, 8) = (flag)?skill->get_range2(&sd->bl, skill_id, skill_lv) : skill->get_range(skill_id, skill_lv); if( flag ) - WFIFOB(fd,10) = (skill_lv < skill->tree_get_max(skill_id, sd->status.class_)) ? 1 : 0; + WFIFOB(fd,10) = (skill_lv < skill->tree_get_max(skill_id, sd->status.class)) ? 1 : 0; else WFIFOB(fd,10) = 1; @@ -4931,7 +5018,7 @@ void clif_skillinfo(struct map_session_data *sd,int skill_id, int inf) WFIFOW(fd,12) = 0; } if (sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT) - WFIFOB(fd,14) = (skill_lv < skill->tree_get_max(skill_id, sd->status.class_))? 1:0; + WFIFOB(fd,14) = (skill_lv < skill->tree_get_max(skill_id, sd->status.class))? 1:0; else WFIFOB(fd,14) = 0; WFIFOSET(fd,packet_len(0x7e1)); @@ -5752,7 +5839,7 @@ void clif_heal(int fd, int type, int val) int len = packet_len(cmd); WFIFOHEAD(fd, len); - WFIFOW(fd, 0) = 0x13d; + WFIFOW(fd, 0) = cmd; WFIFOW(fd, 2) = type; #if PACKETVER < 20150513 WFIFOW(fd, 4) = cap_value(val, 0, INT16_MAX); @@ -6222,7 +6309,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail) WBUFB(buf,12+offset)=sd->status.cart[n].refine; clif->addcards(WBUFP(buf,13+offset), &sd->status.cart[n]); #if PACKETVER >= 20150226 - clif->add_random_options(WBUFP(buf,21+offset), &sd->status.cart[n]); + clif->add_item_options(WBUFP(buf, 21 + offset), &sd->status.cart[n]); #endif WFIFOSET(fd,packet_len(cartaddType)); } @@ -6316,10 +6403,13 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven const int offset = 12; #endif -#if PACKETVER >= 20150226 +#if PACKETVER < 20150226 + const int item_length = 22; +// [4144] date 20160921 not confirmend. Can be bigger or smaller +#elif PACKETVER < 20160921 const int item_length = 47; #else - const int item_length = 22; + const int item_length = 53; #endif nullpo_retv(sd); @@ -6350,7 +6440,12 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven WFIFOB(fd,offset+13+i*item_length) = vsd->status.cart[index].refine; clif->addcards(WFIFOP(fd,offset+14+i*item_length), &vsd->status.cart[index]); #if PACKETVER >= 20150226 - clif->add_random_options(WFIFOP(fd,offset+22+i*item_length), &vsd->status.cart[index]); + clif->add_item_options(WFIFOP(fd, offset + 22 + i * item_length), &vsd->status.cart[index]); +#endif +// [4144] date 20160921 not confirmend. Can be bigger or smaller +#if PACKETVER >= 20160921 + WFIFOL(fd, offset + 47 + i * item_length) = pc->item_equippoint(sd, data); + WFIFOW(fd, offset + 51 + i * item_length) = data->view_sprite; #endif } WFIFOSET(fd,WFIFOW(fd,2)); @@ -6416,17 +6511,17 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven WFIFOB(fd,21+i*item_length) = sd->status.cart[index].refine; clif->addcards(WFIFOP(fd,22+i*item_length), &sd->status.cart[index]); #if PACKETVER >= 20150226 - clif->add_random_options(WFIFOP(fd,30+22+i*item_length), &sd->status.cart[index]); + clif->add_item_options(WFIFOP(fd, 30 + i * item_length), &sd->status.cart[index]); #endif } WFIFOSET(fd,WFIFOW(fd,2)); -#if PACKETVER >= 20141022 +#if PACKETVER >= 20140625 /** should go elsewhere perhaps? it has to be bundled with this however. **/ - WFIFOHEAD(fd, 3); + WFIFOHEAD(fd, packet_len(0xa28)); WFIFOW(fd, 0) = 0xa28; WFIFOB(fd, 2) = 0;/** 1 is failure. our current responses to failure are working so not yet implemented **/ - WFIFOSET(fd, 3); + WFIFOSET(fd, packet_len(0xa28)); #endif } @@ -6482,6 +6577,7 @@ void clif_party_created(struct map_session_data *sd,int result) /// Adds new member to a party. /// 0104 <account id>.L <role>.L <x>.W <y>.W <state>.B <party name>.24B <char name>.24B <map name>.16B (ZC_ADD_MEMBER_TO_GROUP) /// 01e9 <account id>.L <role>.L <x>.W <y>.W <state>.B <party name>.24B <char name>.24B <map name>.16B <item pickup rule>.B <item share rule>.B (ZC_ADD_MEMBER_TO_GROUP2) +/// 0a43 <account id>.L <role>.L <class>.W <base level>.W <x>.W <y>.W <state>.B <party name>.24B <char name>.24B <map name>.16B <item pickup rule>.B <item share rule>.B (ZC_ADD_MEMBER_TO_GROUP3) /// role: /// 0 = leader /// 1 = normal @@ -6490,35 +6586,50 @@ void clif_party_created(struct map_session_data *sd,int result) /// 1 = disconnected void clif_party_member_info(struct party_data *p, struct map_session_data *sd) { - unsigned char buf[81]; int i; +#if PACKETVER < 20170502 + unsigned char buf[81]; + const int cmd = 0x1e9; + const int offset = 0; +#else + unsigned char buf[85]; +// [4144] probably 0xa43 packet can works on older clients because in client was added in 2015-10-07 + const int cmd = 0xa43; + int offset = 4; +#endif nullpo_retv(p); nullpo_retv(sd); if (!sd) { //Pick any party member (this call is used when changing item share rules) - ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd != 0 ); + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd != 0); } else { - ARR_FIND( 0, MAX_PARTY, i, p->data[i].sd == sd ); + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd); } - if (i >= MAX_PARTY) return; //Should never happen... + if (i >= MAX_PARTY) + return; //Should never happen... sd = p->data[i].sd; - WBUFW(buf, 0) = 0x1e9; + WBUFW(buf, 0) = cmd; WBUFL(buf, 2) = sd->status.account_id; - WBUFL(buf, 6) = (p->party.member[i].leader)?0:1; - WBUFW(buf,10) = sd->bl.x; - WBUFW(buf,12) = sd->bl.y; - WBUFB(buf,14) = (p->party.member[i].online)?0:1; - memcpy(WBUFP(buf,15), p->party.name, NAME_LENGTH); - memcpy(WBUFP(buf,39), sd->status.name, NAME_LENGTH); - mapindex->getmapname_ext(map->list[sd->bl.m].custom_name ? map->list[map->list[sd->bl.m].instance_src_map].name : map->list[sd->bl.m].name, 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); + WBUFL(buf, 6) = (p->party.member[i].leader) ? 0 : 1; +#if PACKETVER >= 20170502 + WBUFW(buf, 10) = sd->status.class; + WBUFW(buf, 12) = sd->status.base_level; +#endif + WBUFW(buf, offset + 10) = sd->bl.x; + WBUFW(buf, offset + 12) = sd->bl.y; + WBUFB(buf, offset + 14) = (p->party.member[i].online) ? 0 : 1; + memcpy(WBUFP(buf, offset + 15), p->party.name, NAME_LENGTH); + memcpy(WBUFP(buf, offset + 39), sd->status.name, NAME_LENGTH); + mapindex->getmapname_ext(map->list[sd->bl.m].custom_name ? map->list[map->list[sd->bl.m].instance_src_map].name : map->list[sd->bl.m].name, WBUFP(buf, offset + 63)); + WBUFB(buf, offset + 79) = (p->party.item & 1) ? 1 : 0; + WBUFB(buf, offset + 80) = (p->party.item & 2) ? 1 : 0; + clif->send(buf, packet_len(cmd), &sd->bl, PARTY); } /// Sends party information (ZC_GROUP_LIST). /// 00fb <packet len>.W <party name>.24B { <account id>.L <nick>.24B <map name>.16B <role>.B <state>.B }* +/// 0a44 <packet len>.W <party name>.24B { <account id>.L <nick>.24B <map name>.16B <role>.B <state>.B <class>.W <base level>.W }* <item pickup rule>.B <item share rule>.B <unknown>.L /// role: /// 0 = leader /// 1 = normal @@ -6527,37 +6638,78 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd) /// 1 = disconnected void clif_party_info(struct party_data* p, struct map_session_data *sd) { - unsigned char buf[2+2+NAME_LENGTH+(4+NAME_LENGTH+MAP_NAME_LENGTH_EXT+1+1)*MAX_PARTY]; struct map_session_data* party_sd = NULL; int i, c; +#if PACKETVER < 20170502 + const int cmd = 0xfb; + const int size = 46; + unsigned char buf[2 + 2 + NAME_LENGTH + 46 * MAX_PARTY]; +#else +// [4144] probably 0xa44 packet can works on older clients because in client was added in 2015-10-07 + const int cmd = 0xa44; + const int size = 50; + unsigned char buf[2 + 2 + NAME_LENGTH + 50 * MAX_PARTY + 6]; +#endif nullpo_retv(p); - WBUFW(buf,0) = 0xfb; - memcpy(WBUFP(buf,4), p->party.name, NAME_LENGTH); + WBUFW(buf, 0) = cmd; + memcpy(WBUFP(buf, 4), p->party.name, NAME_LENGTH); for(i = 0, c = 0; i < MAX_PARTY; i++) { - struct party_member* m = &p->party.member[i]; - if(!m->account_id) continue; - - if(party_sd == NULL) party_sd = p->data[i].sd; + struct party_member *m = &p->party.member[i]; + if (!m->account_id) + continue; - WBUFL(buf,28+c*46) = m->account_id; - memcpy(WBUFP(buf,28+c*46+4), m->name, NAME_LENGTH); - mapindex->getmapname_ext(mapindex_id2name(m->map), WBUFP(buf,28+c*46+28)); - WBUFB(buf,28+c*46+44) = (m->leader) ? 0 : 1; - WBUFB(buf,28+c*46+45) = (m->online) ? 0 : 1; + if (party_sd == NULL) + party_sd = p->data[i].sd; + + WBUFL(buf, 28 + c * size) = m->account_id; + memcpy(WBUFP(buf, 28 + c * size + 4), m->name, NAME_LENGTH); + mapindex->getmapname_ext(mapindex_id2name(m->map), WBUFP(buf, 28 + c * size + 28)); + WBUFB(buf, 28 + c * size + 44) = (m->leader) ? 0 : 1; + WBUFB(buf, 28 + c * size + 45) = (m->online) ? 0 : 1; +#if PACKETVER >= 20170502 + WBUFW(buf, 28 + c * size + 46) = m->class; + WBUFW(buf, 28 + c * size + 48) = m->lv; +#endif c++; } - WBUFW(buf,2) = 28+c*46; +#if PACKETVER < 20170502 + WBUFW(buf, 2) = 28 + c * size; +#else + WBUFB(buf, 28 + c * size) = (p->party.item & 1) ? 1 : 0; + WBUFB(buf, 28 + c * size + 1) = (p->party.item & 2) ? 1 : 0; + WBUFL(buf, 28 + c * size + 2) = 0; // unknown + WBUFW(buf, 2) = 28 + c * size + 6; +#endif - if(sd) { // send only to self - clif->send(buf, WBUFW(buf,2), &sd->bl, SELF); + if (sd) { // send only to self + clif->send(buf, WBUFW(buf, 2), &sd->bl, SELF); } else if (party_sd) { // send to whole party - clif->send(buf, WBUFW(buf,2), &party_sd->bl, PARTY); + clif->send(buf, WBUFW(buf, 2), &party_sd->bl, PARTY); } } +/// Updates the job and level of a party member +/// 0abd <account id>.L <job>.W <level>.W +void clif_party_job_and_level(struct map_session_data *sd) +{ +// [4144] packet 0xabd added in client in 2017-02-15 because this probably it can works for clients older than 20170502 +#if PACKETVER >= 20170502 + unsigned char buf[10]; + + nullpo_retv(sd); + + WBUFW(buf, 0) = 0xabd; + WBUFL(buf, 2) = sd->status.account_id; + WBUFW(buf, 6) = sd->status.class; + WBUFW(buf, 8) = sd->status.base_level; + + clif_send(buf, packet_len(0xabd), &sd->bl, PARTY); +#endif +} + /// The player's 'party invite' state, sent during login (ZC_PARTY_CONFIG). /// 02c9 <flag>.B /// flag: @@ -7231,6 +7383,13 @@ void clif_mvp_item(struct map_session_data *sd,int nameid) /// 010b <exp>.L void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { +#if PACKETVER >= 20131223 // Kro removed this packet [Napster] + if (battle_config.mvp_exp_reward_message) { + char e_msg[CHAT_SIZE_MAX]; + sprintf(e_msg, msg_txt(855), exp); + clif->messagecolor_self(sd->fd, COLOR_CYAN, e_msg); // Congratulations! You are the MVP! Your reward EXP Points are %u !! + } +#else int fd; nullpo_retv(sd); @@ -7240,6 +7399,7 @@ void clif_mvp_exp(struct map_session_data *sd, unsigned int exp) WFIFOW(fd,0)=0x10b; WFIFOL(fd,2)=cap_value(exp,0,INT32_MAX); WFIFOSET(fd,packet_len(0x10b)); +#endif } /// Dropped MVP item reward message (ZC_THROW_MVPITEM). @@ -7396,36 +7556,48 @@ void clif_guild_masterormember(struct map_session_data *sd) /// Guild basic information (Territories [Valaris]) /// 0150 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B (ZC_GUILD_INFO) /// 01b6 <guild id>.L <level>.L <member num>.L <member max>.L <exp>.L <max exp>.L <points>.L <honor>.L <virtue>.L <emblem id>.L <name>.24B <master name>.24B <manage land>.16B <zeny>.L (ZC_GUILD_INFO2) -void clif_guild_basicinfo(struct map_session_data *sd) { +void clif_guild_basicinfo(struct map_session_data *sd) +{ int fd; struct guild *g; +#if PACKETVER < 20160622 + const int cmd = 0x1b6; //0x150; [4144] this is packet for older versions? +#else + const int cmd = 0xa84; +#endif + nullpo_retv(sd); fd = sd->fd; - if( (g = sd->guild) == NULL ) + if ((g = sd->guild) == NULL) return; - WFIFOHEAD(fd,packet_len(0x1b6)); - WFIFOW(fd, 0)=0x1b6;//0x150; - WFIFOL(fd, 2)=g->guild_id; - WFIFOL(fd, 6)=g->guild_lv; - WFIFOL(fd,10)=g->connect_member; - WFIFOL(fd,14)=g->max_member; - WFIFOL(fd,18)=g->average_lv; - WFIFOL(fd,22)=(uint32)cap_value(g->exp,0,INT32_MAX); - WFIFOL(fd,26)=g->next_exp; - WFIFOL(fd,30)=0; // Tax Points - WFIFOL(fd,34)=0; // Honor: (left) Vulgar [-100,100] Famed (right) - WFIFOL(fd,38)=0; // Virtue: (down) Wicked [-100,100] Righteous (up) - WFIFOL(fd,42)=g->emblem_id; - memcpy(WFIFOP(fd,46),g->name, NAME_LENGTH); - memcpy(WFIFOP(fd,70),g->master, NAME_LENGTH); - - safestrncpy(WFIFOP(fd,94),msg_sd(sd,300+guild->checkcastles(g)),16); // "'N' castles" - WFIFOL(fd,110) = 0; // zeny + WFIFOHEAD(fd, packet_len(cmd)); + WFIFOW(fd, 0) = cmd; + WFIFOL(fd, 2) = g->guild_id; + WFIFOL(fd, 6) = g->guild_lv; + WFIFOL(fd, 10) = g->connect_member; + WFIFOL(fd, 14) = g->max_member; + WFIFOL(fd, 18) = g->average_lv; + WFIFOL(fd, 22) = (uint32)cap_value(g->exp, 0, INT32_MAX); + WFIFOL(fd, 26) = g->next_exp; + WFIFOL(fd, 30) = 0; // Tax Points + WFIFOL(fd, 34) = 0; // Honor: (left) Vulgar [-100,100] Famed (right) + WFIFOL(fd, 38) = 0; // Virtue: (down) Wicked [-100,100] Righteous (up) + WFIFOL(fd, 42) = g->emblem_id; + memcpy(WFIFOP(fd, 46), g->name, NAME_LENGTH); +#if PACKETVER < 20160622 + memcpy(WFIFOP(fd, 70), g->master, NAME_LENGTH); + safestrncpy(WFIFOP(fd, 94), msg_sd(sd, 300 + guild->checkcastles(g)), 16); // "'N' castles" + WFIFOL(fd, 110) = 0; // zeny +#else + safestrncpy(WFIFOP(fd, 70), msg_sd(sd, 300 + guild->checkcastles(g)), 16); // "'N' castles" + WFIFOL(fd, 86) = 0; // zeny + WFIFOL(fd, 90) = g->member[0].char_id; // leader +#endif - WFIFOSET(fd,packet_len(0x1b6)); + WFIFOSET(fd, packet_len(cmd)); } /// Guild alliance and opposition list (ZC_MYGUILD_BASIC_INFO). @@ -7467,35 +7639,47 @@ void clif_guild_memberlist(struct map_session_data *sd) int fd; int i,c; struct guild *g; +#if PACKETVER < 20161026 + const int cmd = 0x154; + const int size = 104; +#else + const int cmd = 0xaa5; + const int size = 34; +#endif + nullpo_retv(sd); - if( (fd = sd->fd) == 0 ) + if ((fd = sd->fd) == 0) return; - if( (g = sd->guild) == NULL ) + if ((g = sd->guild) == NULL) return; - WFIFOHEAD(fd, g->max_member * 104 + 4); - WFIFOW(fd, 0)=0x154; - for(i=0,c=0;i<g->max_member;i++){ - struct guild_member *m=&g->member[i]; - if(m->account_id==0) + WFIFOHEAD(fd, g->max_member * size + 4); + WFIFOW(fd, 0) = cmd; + for (i = 0, c = 0; i < g->max_member; i++) { + struct guild_member *m = &g->member[i]; + if (m->account_id == 0) continue; - WFIFOL(fd,c*104+ 4)=m->account_id; - WFIFOL(fd,c*104+ 8)=m->char_id; - WFIFOW(fd,c*104+12)=m->hair; - WFIFOW(fd,c*104+14)=m->hair_color; - WFIFOW(fd,c*104+16)=m->gender; - WFIFOW(fd,c*104+18)=m->class_; - WFIFOW(fd,c*104+20)=m->lv; - WFIFOL(fd,c*104+22)=(int)cap_value(m->exp,0,INT32_MAX); - WFIFOL(fd,c*104+26)=m->online; - WFIFOL(fd,c*104+30)=m->position; - memset(WFIFOP(fd,c*104+34),0,50); //[Ind] - This is displayed in the 'note' column but being you can't edit it it's sent empty. - memcpy(WFIFOP(fd,c*104+84),m->name,NAME_LENGTH); + WFIFOL(fd, c * size + 4) = m->account_id; + WFIFOL(fd, c * size + 8) = m->char_id; + WFIFOW(fd, c * size + 12) = m->hair; + WFIFOW(fd, c * size + 14) = m->hair_color; + WFIFOW(fd, c * size + 16) = m->gender; + WFIFOW(fd, c * size + 18) = m->class; + WFIFOW(fd, c * size + 20) = m->lv; + WFIFOL(fd, c * size + 22) = (int)cap_value(m->exp, 0, INT32_MAX); + WFIFOL(fd, c * size + 26) = m->online; + WFIFOL(fd, c * size + 30) = m->position; +#if PACKETVER < 20161026 + memset(WFIFOP(fd, c * size + 34), 0, 50); //[Ind] - This is displayed in the 'note' column but being you can't edit it it's sent empty. + memcpy(WFIFOP(fd, c * size + 84), m->name, NAME_LENGTH); +#else + WFIFOL(fd, c * size + 34) = 0; // [4144] this is member last login time. But in hercules it not present. +#endif c++; } - WFIFOW(fd, 2)=c*104+4; - WFIFOSET(fd,WFIFOW(fd,2)); + WFIFOW(fd, 2) = c * size + 4; + WFIFOSET(fd, WFIFOW(fd, 2)); } /// Guild position name information (ZC_POSITION_ID_NAME_INFO). @@ -8395,9 +8579,11 @@ void clif_refresh_storagewindow(struct map_session_data *sd) nullpo_retv(sd); // Notify the client that the storage is open if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) { - 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); + if (sd->storage.aggregate > 0) { + storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); + clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); + } + clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); } // Notify the client that the gstorage is open otherwise it will // remain locked forever and nobody will be able to access it @@ -8916,7 +9102,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts safestrncpy(viewequip_list.characterName, tsd->status.name, NAME_LENGTH); - viewequip_list.job = tsd->status.class_; + viewequip_list.job = tsd->status.class; viewequip_list.head = tsd->vd.hair_style; viewequip_list.accessory = tsd->vd.head_bottom; viewequip_list.accessory2 = tsd->vd.head_mid; @@ -9304,31 +9490,36 @@ void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) { sd->state.warping = 0; sd->state.dialog = 0;/* reset when warping, client dialog will go missing */ - // look + // Character Looks #if PACKETVER < 4 - clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); - clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield); + clif->changelook(&sd->bl, LOOK_WEAPON, sd->status.look.weapon); + clif->changelook(&sd->bl, LOOK_SHIELD, sd->status.look.shield); #else clif->changelook(&sd->bl,LOOK_WEAPON,0); #endif if(sd->vd.cloth_color) clif->refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF); + if (sd->vd.body_style) clif->refreshlook(&sd->bl,sd->bl.id,LOOK_BODY2,sd->vd.body_style,SELF); - // item - clif->inventorylist(sd); // inventory list first, otherwise deleted items in pc->checkitem show up as 'unknown item' - pc->checkitem(sd); - // cart + // Send character inventory to the client. + // call this before pc->checkitem() so that the client isn't called to delete a non-existent item. + clif->inventorylist(sd); + + // Send the cart inventory, counts & weight to the client. if(pc_iscarton(sd)) { clif->cartlist(sd); - clif->updatestatus(sd,SP_CARTINFO); + clif->updatestatus(sd, SP_CARTINFO); } - // weight - clif->updatestatus(sd,SP_WEIGHT); - clif->updatestatus(sd,SP_MAXWEIGHT); + // Check for and delete unavailable/disabled items. + pc->checkitem(sd); + + // Send the character's weight to the client. + clif->updatestatus(sd, SP_WEIGHT); + clif->updatestatus(sd, SP_MAXWEIGHT); // guild // (needs to go before clif_spawn() to show guild emblems correctly) @@ -9631,7 +9822,7 @@ void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) { struct questinfo *qi = &map->list[sd->bl.m].qi_data[i]; if( quest->check(sd, qi->quest_id, HAVEQUEST) == -1 ) {// Check if quest is not started if( qi->hasJob ) { // Check if quest is job-specific, check is user is said job class. - if( sd->class_ == qi->job ) + if (sd->status.class == qi->job) clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color); } else { clif->quest_show_event(sd, &qi->nd->bl, qi->icon, qi->color); @@ -9822,11 +10013,9 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) __attribute__((non void clif_parse_QuitGame(int fd, struct map_session_data *sd) { /* Rovert's prevent logout option fixed [Valaris] */ - if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && - (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) - { + if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] && + (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout)) { sockt->eof(fd); - clif->disconnect_ack(sd, 0); } else { clif->disconnect_ack(sd, 1); @@ -9875,7 +10064,7 @@ int clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data * sd; if( (sd = map->id2sd(id)) ) { sd->fontcolor_tid = INVALID_TIMER; - if( sd->fontcolor && sd->disguise == sd->status.class_ ) + if (sd->fontcolor && sd->disguise == sd->status.class) pc->disguise(sd,-1); } return 0; @@ -9926,12 +10115,12 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) if (sd->disguise == -1) { sd->fontcolor_tid = timer->add(timer->gettick()+5000, clif->undisguise_timer, sd->bl.id, 0); - pc->disguise(sd,sd->status.class_); + pc->disguise(sd,sd->status.class); if (pc_isdead(sd)) clif->clearunit_single(-sd->bl.id, CLR_DEAD, sd->fd); if (unit->is_walking(&sd->bl)) clif->move(&sd->ud); - } else if (sd->disguise == sd->status.class_ && sd->fontcolor_tid != INVALID_TIMER) { + } else if (sd->disguise == sd->status.class && sd->fontcolor_tid != INVALID_TIMER) { const struct TimerData *td; if ((td = timer->get(sd->fontcolor_tid)) != NULL) timer->settick(sd->fontcolor_tid, td->tick+5000); @@ -10058,7 +10247,7 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) { int emoticon = RFIFOB(fd,packet_db[RFIFOW(fd,0)].pos[0]); - if (battle_config.basic_skill_check == 0 || pc->checkskill(sd, NV_BASIC) >= 2) { + if (battle_config.basic_skill_check == 0 || pc->check_basicskill(sd, 2)) { if (emoticon == E_MUTE) {// prevent use of the mute emote [Valaris] clif->skill_fail(sd, 1, USESKILL_FAIL_LEVEL, 1); return; @@ -10118,7 +10307,8 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, sd->sc.data[SC_TRICKDEAD] || (sd->sc.data[SC_AUTOCOUNTER] && action_type != 0x07) || sd->sc.data[SC_BLADESTOP] || - sd->sc.data[SC_DEEP_SLEEP] ) + sd->sc.data[SC_DEEP_SLEEP] || + sd->sc.data[SC_SUHIDE] ) ) return; @@ -10158,7 +10348,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, } break; case 0x02: // sitdown - if (battle_config.basic_skill_check && pc->checkskill(sd, NV_BASIC) < 3) { + if (battle_config.basic_skill_check && !pc->check_basicskill(sd, 3)) { clif->skill_fail(sd, 1, USESKILL_FAIL_LEVEL, 2); break; } @@ -10243,7 +10433,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) { case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] - && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] + && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] && (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. @@ -10431,6 +10621,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) sd->sc.data[SC_TRICKDEAD] || sd->sc.data[SC_BLADESTOP] || sd->sc.data[SC_CLOAKINGEXCEED] || + sd->sc.data[SC_SUHIDE] || pc_ismuted(&sd->sc, MANNER_NOITEM) ) ) break; @@ -10598,9 +10789,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) clif->clearunit_area(&sd->bl,CLR_DEAD); return; } - if( sd->npc_id || sd->state.workinprogress&2 ){ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 2) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif return; } @@ -10613,9 +10806,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) clif->pActionRequest_sub(sd, 0x07, bl->id, timer->gettick()); break; case BL_NPC: - if( sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER ) {// TODO: should only work with none 3rd job skills -#ifdef RENEWAL + if (sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER) { // TODO: should only work with none 3rd job skills +#if PACKETVER >= 20110309 clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif break; } @@ -10763,7 +10958,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) if (pc_ismuted(&sd->sc, MANNER_NOROOM)) return; - if(battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 4) { + if(battle_config.basic_skill_check && !pc->check_basicskill(sd, 4)) { clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,3); return; } @@ -10880,7 +11075,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) { return; } - if( battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 1) { + if( battle_config.basic_skill_check && !pc->check_basicskill(sd, 1)) { clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,0); return; } @@ -10991,39 +11186,38 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd) void clif_parse_ChangeCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2))); /// Request to change cart's visual look (CZ_REQ_CHANGECART). /// 01af <num>.W -void clif_parse_ChangeCart(int fd,struct map_session_data *sd) +void clif_parse_ChangeCart(int fd, struct map_session_data *sd) {// TODO: State tracking? int type; - if( pc->checkskill(sd, MC_CHANGECART) < 1 ) + if (pc->checkskill(sd, MC_CHANGECART) == 0) return; -#ifdef RENEWAL - if( sd->npc_id || sd->state.workinprogress&1 ){ + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); +#endif return; } -#endif - type = RFIFOW(fd,2); + type = RFIFOW(fd, 2); + + if ( #ifdef NEW_CARTS - if( (type == 9 && sd->status.base_level > 131) || - (type == 8 && sd->status.base_level > 121) || - (type == 7 && sd->status.base_level > 111) || - (type == 6 && sd->status.base_level > 101) || + (type == 9 && sd->status.base_level > 130) || + (type == 8 && sd->status.base_level > 120) || + (type == 7 && sd->status.base_level > 110) || + (type == 6 && sd->status.base_level > 100) || +#endif (type == 5 && sd->status.base_level > 90) || (type == 4 && sd->status.base_level > 80) || (type == 3 && sd->status.base_level > 65) || (type == 2 && sd->status.base_level > 40) || (type == 1)) -#else - if( (type == 5 && sd->status.base_level > 90) || - (type == 4 && sd->status.base_level > 80) || - (type == 3 && sd->status.base_level > 65) || - (type == 2 && sd->status.base_level > 40) || - (type == 1)) -#endif - pc->setcart(sd,type); + + pc->setcart(sd, type); } /// Request to select cart's visual look for new cart design (CZ_SELECTCART). @@ -11210,9 +11404,11 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) // Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] pc->update_idle_time(sd, BCIDLE_USESKILLTOID); - if( sd->npc_id || sd->state.workinprogress&1 ){ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif return; } @@ -11307,12 +11503,14 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski return; } -#ifdef RENEWAL - if( sd->state.workinprogress&1 ){ - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); +#endif return; } -#endif //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] pc->update_idle_time(sd, BCIDLE_USESKILLTOPOS); @@ -11593,7 +11791,12 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) __attribute_ /// 01d5 <packet len>.W <npc id>.L <string>.?B void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) { - int message_len = RFIFOW(fd,2)-8; +// [4144] can't confirm exact client version. At least >= correct for 20150513 +#if PACKETVER >= 20151029 + int message_len = RFIFOW(fd, 2) - 7; +#else + int message_len = RFIFOW(fd, 2) - 8; +#endif int npcid = RFIFOL(fd,4); const char *message = RFIFOP(fd,8); @@ -11926,7 +12129,7 @@ void clif_parse_CreateParty(int fd, struct map_session_data *sd) clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map. return; } - if( battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 7 ) { + if (battle_config.basic_skill_check && !pc->check_basicskill(sd, 7)) { clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,4); return; } @@ -11948,7 +12151,7 @@ void clif_parse_CreateParty2(int fd, struct map_session_data *sd) clif->message(fd, msg_fd(fd,227)); // Party modification is disabled in this map. return; } - if( battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 7 ) { + if (battle_config.basic_skill_check && !pc->check_basicskill(sd, 7)) { clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,4); return; } @@ -12571,7 +12774,7 @@ void clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) nullpo_retv(sd); WBUFW(buf, 0) = 0x8f2; WBUFL(buf, 2) = sd->status.account_id; - WBUFL(buf, 6) = sd->status.class_; + WBUFL(buf, 6) = sd->status.class; WBUFW(buf, 10) = sd->status.base_level; memcpy(WBUFP(buf, 12), sd->status.name, NAME_LENGTH); @@ -12897,13 +13100,22 @@ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) _ void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd) { int i; + int len = RFIFOW(fd, 2); if(!sd->state.gmaster_flag) return; + // Guild leadership change + if (len == 16 && RFIFOL(fd, 12) == 0) { + guild->gm_change(sd->status.guild_id, RFIFOL(fd, 8)); + return; + } + for(i=4;i<RFIFOW(fd,2);i+=12){ - guild->change_memberposition(sd->status.guild_id, - RFIFOL(fd,i),RFIFOL(fd,i+4),RFIFOL(fd,i+8)); + int position = RFIFOL(fd, i + 8); + if (position > 0) { + guild->change_memberposition(sd->status.guild_id, RFIFOL(fd, i), RFIFOL(fd, i + 4), position); + } } } @@ -13827,7 +14039,7 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) { if (sd->state.doridori) return; - switch (sd->class_&MAPID_UPPERMASK) { + switch (sd->job & MAPID_UPPERMASK) { case MAPID_SOUL_LINKER: case MAPID_STAR_GLADIATOR: case MAPID_TAEKWON: @@ -13855,8 +14067,8 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) /* game client is currently broken on this (not sure the packetver range) */ /* it sends the request when the criteria doesn't match (and of course we let it fail) */ /* so restoring the old parse_globalmes method. */ - if( ( sd->class_&MAPID_UPPERMASK ) == MAPID_SUPER_NOVICE ) { - unsigned int next = pc->nextbaseexp(sd); + if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) { + uint64 next = pc->nextbaseexp(sd); if( next == 0 ) next = pc->thisbaseexp(sd); if( next ) { int percent = (int)( ( (float)sd->status.base_exp/(float)next )*1000. ); @@ -14219,30 +14431,27 @@ void clif_ranklist_sub(unsigned char *buf, enum fame_list_type type) { } /// 097d <RankingType>.W {<CharName>.24B <point>L}*10 <mypoint>L (ZC_ACK_RANKING) -void clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { +void clif_ranklist(struct map_session_data *sd, enum fame_list_type type) +{ +#if PACKETVER >= 20120502 int fd; - int mypoint = 0; - int upperMask; + int len = packet_len(0x97d); nullpo_retv(sd); fd = sd->fd; - upperMask = sd->class_&MAPID_UPPERMASK; - WFIFOHEAD(fd, 288); + WFIFOHEAD(fd, len); WFIFOW(fd, 0) = 0x97d; WFIFOW(fd, 2) = type; clif_ranklist_sub(WFIFOP(fd,4), type); - if( (upperMask == MAPID_BLACKSMITH && type == RANKTYPE_BLACKSMITH) - || (upperMask == MAPID_ALCHEMIST && type == RANKTYPE_ALCHEMIST) - || (upperMask == MAPID_TAEKWON && type == RANKTYPE_TAEKWON) - ) { - mypoint = sd->status.fame; + if (pc->famelist_type(sd->job) == type) { + WFIFOL(fd, 284) = sd->status.fame; //mypoint } else { - mypoint = 0; + WFIFOL(fd, 284) = 0; //mypoint } - WFIFOL(fd, 284) = mypoint; //mypoint - WFIFOSET(fd, 288); + WFIFOSET(fd, len); +#endif } void clif_parse_ranklist(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -14262,8 +14471,9 @@ void clif_parse_ranklist(int fd, struct map_session_data *sd) { } // 097e <RankingType>.W <point>.L <TotalPoint>.L (ZC_UPDATE_RANKING_POINT) -void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) { -#if PACKETVER < 20130710 +void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type type, int points) +{ +#if PACKETVER < 20120502 switch( type ) { case RANKTYPE_BLACKSMITH: clif->fame_blacksmith(sd,points); break; case RANKTYPE_ALCHEMIST: clif->fame_alchemist(sd,points); break; @@ -14272,15 +14482,16 @@ void clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_type t #else int fd; + int len = packet_len(0x97e); nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd, 12); + WFIFOHEAD(fd, len); WFIFOW(fd, 0) = 0x97e; WFIFOW(fd, 2) = type; WFIFOL(fd, 4) = points; WFIFOL(fd, 8) = sd->status.fame; - WFIFOSET(fd, 12); + WFIFOSET(fd, len); #endif } @@ -16201,7 +16412,7 @@ void clif_bg_hp(struct map_session_data *sd) { unsigned char buf[34]; -// packet version can be wrong, because inconsistend data in other servers. +// packet version can be wrong, because inconsistend data in other servers. From packets table it start from 20140312 [4144] #if PACKETVER < 20140613 const int cmd = 0x2e0; nullpo_retv(sd); @@ -16248,7 +16459,7 @@ void clif_bg_xy(struct map_session_data *sd) WBUFW(buf,0)=0x2df; WBUFL(buf,2)=sd->status.account_id; memcpy(WBUFP(buf,6), sd->status.name, NAME_LENGTH); - WBUFW(buf,30)=sd->status.class_; + WBUFW(buf,30)=sd->status.class; WBUFW(buf,32)=sd->bl.x; WBUFW(buf,34)=sd->bl.y; @@ -16527,20 +16738,34 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat /// exp type: /// 0 = normal exp gain/loss /// 1 = quest exp gain/loss -void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) { +void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest) +{ int fd; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 + const int cmd = 0xacc; +#else + const int cmd = 0x7f6; +#endif nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd, packet_len(0x7f6)); - WFIFOW(fd,0) = 0x7f6; - WFIFOL(fd,2) = sd->bl.id; - WFIFOL(fd,6) = exp; - WFIFOW(fd,10) = type; - WFIFOW(fd,12) = is_quest?1:0;// Normal exp is shown in yellow, quest exp is shown in purple. - WFIFOSET(fd,packet_len(0x7f6)); + WFIFOHEAD(fd, packet_len(cmd)); + WFIFOW(fd, 0) = cmd; + WFIFOL(fd, 2) = sd->bl.id; +// [4144] unconfirment exact version can be from 20170405 to 20170913 +#if PACKETVER >= 20170830 + WFIFOQ(fd, 6) = exp; + WFIFOW(fd, 14) = type; + WFIFOW(fd, 16) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple. +#else + WFIFOL(fd, 6) = (uint32)exp; + WFIFOW(fd, 10) = type; + WFIFOW(fd, 12) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple. +#endif + WFIFOSET(fd, packet_len(cmd)); } /// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT). @@ -17494,7 +17719,7 @@ void clif_parse_SkillSelectMenu(int fd, struct map_session_data *sd) { *------------------------------------------*/ void clif_charm(struct map_session_data *sd) { -#if PACKETVER >= 20120410 +#if PACKETVER >= 20110809 unsigned char buf[10]; nullpo_retv(sd); @@ -17559,7 +17784,7 @@ void clif_cashshop_db(void) { if( cashshop != NULL && (cats = libconfig->setting_get_elem(cashshop, 0)) != NULL ) { for(i = 0; i < CASHSHOP_TAB_MAX; i++) { struct config_setting_t *cat; - char entry_name[10]; + char entry_name[15]; sprintf(entry_name,"cat_%d",i); @@ -17620,7 +17845,7 @@ void clif_favorite_item(struct map_session_data* sd, unsigned short index) { } void clif_snap( struct block_list *bl, short x, short y ) { -#if PACKETVER >= 20111005 +#if PACKETVER >= 20110809 unsigned char buf[10]; nullpo_retv(bl); @@ -17633,7 +17858,9 @@ void clif_snap( struct block_list *bl, short x, short y ) { #endif } -void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) { +void clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) +{ +#if PACKETVER >= 20120228 struct packet_monster_hp p; nullpo_retv(md); @@ -17644,6 +17871,7 @@ void clif_monster_hp_bar( struct mob_data* md, struct map_session_data *sd ) { p.MaxHP = md->status.max_hp; clif->send(&p, sizeof(p), &sd->bl, SELF); +#endif } /* [Ind/Hercules] placeholder for unsupported incoming packets (avoids server disconnecting client) */ @@ -17672,7 +17900,9 @@ void clif_parse_CashShopClose(int fd, struct map_session_data *sd) { } void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); -void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) { +void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) +{ +#if PACKETVER >= 20110614 int i, j = 0; for( i = 0; i < CASHSHOP_TAB_MAX; i++ ) { @@ -17692,6 +17922,7 @@ void clif_parse_CashShopSchedule(int fd, struct map_session_data *sd) { WFIFOSET(fd, 8 + ( clif->cs.item_count[i] * 6 )); } +#endif } void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -17785,7 +18016,9 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); /* [Ind/Hercules] */ -void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) { +void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) +{ +#if PACKETVER >= 20110222 short tab = RFIFOW(fd, 2); int j; @@ -17804,9 +18037,12 @@ void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) { } WFIFOSET(fd, 10 + ( clif->cs.item_count[tab] * 6 )); +#endif } + /* [Ind/Hercules] */ -void clif_maptypeproperty2(struct block_list *bl,enum send_target t) { +void clif_maptypeproperty2(struct block_list *bl,enum send_target t) +{ #if PACKETVER >= 20121010 struct packet_maptypeproperty2 p; struct map_session_data *sd = NULL; @@ -17859,6 +18095,7 @@ void clif_partytickack(struct map_session_data* sd, bool flag) { void clif_ShowScript(struct block_list *bl, const char *message) { +#if PACKETVER >= 20110111 char buf[256]; int len; nullpo_retv(bl); @@ -17878,6 +18115,7 @@ void clif_ShowScript(struct block_list *bl, const char *message) WBUFL(buf,4) = bl->id; safestrncpy(WBUFP(buf,8),message,len); clif->send(buf,WBUFW(buf,2),bl,AREA); +#endif } void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type) { @@ -18034,14 +18272,17 @@ void clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char arena_ clif->send(&p,sizeof(p), &sd->bl, target); } -void clif_scriptclear(struct map_session_data *sd, int npcid) { +void clif_scriptclear(struct map_session_data *sd, int npcid) +{ +#if PACKETVER >= 20110928 struct packet_script_clear p; nullpo_retv(sd); p.PacketType = script_clearType; p.NpcID = npcid; - clif->send(&p,sizeof(p), &sd->bl, SELF); + clif->send(&p, sizeof(p), &sd->bl, SELF); +#endif } /* Made Possible Thanks to Yommy! */ @@ -18163,7 +18404,9 @@ void clif_parse_BankWithdraw(int fd, struct map_session_data *sd) } void clif_parse_BankCheck(int fd, struct map_session_data* sd) __attribute__((nonnull (2))); -void clif_parse_BankCheck(int fd, struct map_session_data* sd) { +void clif_parse_BankCheck(int fd, struct map_session_data* sd) +{ +#if PACKETVER >= 20130313 struct packet_banking_check p; if (!battle_config.feature_banking) { @@ -18176,6 +18419,7 @@ void clif_parse_BankCheck(int fd, struct map_session_data* sd) { p.Reason = (short)0; clif->send(&p,sizeof(p), &sd->bl, SELF); +#endif } void clif_parse_BankOpen(int fd, struct map_session_data* sd) __attribute__((nonnull (2))); @@ -18188,7 +18432,9 @@ void clif_parse_BankClose(int fd, struct map_session_data* sd) { return; } -void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason) { +void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason) +{ +#if PACKETVER >= 20130313 struct packet_banking_deposit_ack p; nullpo_retv(sd); @@ -18198,9 +18444,12 @@ void clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK r p.Reason = (short)reason; clif->send(&p,sizeof(p), &sd->bl, SELF); +#endif } -void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK reason) { +void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK reason) +{ +#if PACKETVER >= 20130313 struct packet_banking_withdraw_ack p; nullpo_retv(sd); @@ -18210,6 +18459,7 @@ void clif_bank_withdraw(struct map_session_data *sd,enum e_BANKING_WITHDRAW_ACK p.Reason = (short)reason; clif->send(&p,sizeof(p), &sd->bl, SELF); +#endif } /* TODO: official response packet (tried 0x8cb/0x97b but the display was quite screwed up.) */ @@ -18466,6 +18716,7 @@ void clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, i void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) __attribute__((nonnull (2))); /* Roulette System [Yommy/Hercules] */ void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) { +#if PACKETVER >= 20140612 struct packet_roulette_open_ack p; if( !battle_config.feature_roulette ) { @@ -18484,10 +18735,13 @@ void clif_parse_RouletteOpen(int fd, struct map_session_data* sd) { p.SilverPoint = pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")); clif->send(&p,sizeof(p), &sd->bl, SELF); +#endif } void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) __attribute__((nonnull (2))); -void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) { +void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) +{ +#if PACKETVER >= 20140612 struct packet_roulette_info_ack p; unsigned short i, j, count = 0; @@ -18510,7 +18764,7 @@ void clif_parse_RouletteInfo(int fd, struct map_session_data* sd) { } } clif->send(&p,sizeof(p), &sd->bl, SELF); - return; +#endif } void clif_parse_RouletteClose(int fd, struct map_session_data* sd) __attribute__((nonnull (2))); @@ -18584,7 +18838,9 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) __attribut /** * Request to cash in! **/ -void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) { +void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) +{ +#if PACKETVER >= 20140612 struct packet_roulette_itemrecv_ack p; if( !battle_config.feature_roulette ) { @@ -18627,7 +18883,7 @@ void clif_parse_RouletteRecvItem(int fd, struct map_session_data* sd) { p.Result = RECV_ITEM_FAILED; clif->send(&p,sizeof(p), &sd->bl, SELF); - return; +#endif } bool clif_parse_roulette_db(void) { @@ -18722,7 +18978,9 @@ bool clif_parse_roulette_db(void) { /** * **/ -void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { +void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) +{ +#if PACKETVER >= 20140612 struct packet_roulette_generate_ack p; nullpo_retv(sd); @@ -18736,6 +18994,7 @@ void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char resul p.RemainSilver = pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")); clif->send(&p,sizeof(p), &sd->bl, SELF); +#endif } /** @@ -18743,6 +19002,7 @@ void clif_roulette_generate_ack(struct map_session_data *sd, unsigned char resul */ void clif_openmergeitem(int fd, struct map_session_data *sd) { +#if PACKETVER > 20120228 int i = 0, n = 0, j = 0; struct merge_item merge_items[MAX_INVENTORY]; struct merge_item *merge_items_[MAX_INVENTORY] = {0}; @@ -18785,6 +19045,7 @@ void clif_openmergeitem(int fd, struct map_session_data *sd) for ( i = 0; i < j; i++ ) WFIFOW(fd,i*2+4) = merge_items_[i]->position; WFIFOSET(fd,2*j+4); +#endif } int clif_comparemergeitem(const void *a, const void *b) @@ -18801,6 +19062,7 @@ int clif_comparemergeitem(const void *a, const void *b) void clif_ackmergeitems(int fd, struct map_session_data *sd) { +#if PACKETVER > 20120228 int i = 0, n = 0, length = 0, count = 0; int16 nameid = 0, indexes[MAX_INVENTORY] = {0}, amounts[MAX_INVENTORY] = {0}; struct item item_data; @@ -18880,6 +19142,7 @@ void clif_ackmergeitems(int fd, struct map_session_data *sd) WFIFOW(fd,4) = count; WFIFOB(fd,6) = MERGEITEM_SUCCESS; WFIFOSET(fd,7); +#endif } void clif_cancelmergeitem (int fd, struct map_session_data *sd) @@ -18928,13 +19191,14 @@ void clif_selectcart(struct map_session_data *sd) /// Starts navigation to the given target on client side void clif_navigate_to(struct map_session_data *sd, const char* mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id) { -#if PACKETVER >= 20111010 +// probably this packet with other fields present in older packet versions +#if PACKETVER >= 20120307 int fd; nullpo_retv(sd); nullpo_retv(mapname); fd = sd->fd; - WFIFOHEAD(fd, 27); + WFIFOHEAD(fd, packet_len(0x8e2)); WFIFOW(fd, 0) = 0x8e2; // How detailed will our navigation be? @@ -18962,7 +19226,7 @@ void clif_navigate_to(struct map_session_data *sd, const char* mapname, uint16 x WFIFOW(fd, 23) = y; // Target monster ID WFIFOW(fd, 25) = mob_id; - WFIFOSET(fd, 27); + WFIFOSET(fd, packet_len(0x8e2)); #endif } @@ -19020,6 +19284,583 @@ unsigned short clif_parse_cmd_optional( int fd, struct map_session_data *sd ) { } /*========================================== + * RoDEX + *------------------------------------------*/ + +void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_open_write_mail(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_OPEN_WRITE_MAIL *rPacket = RFIFOP(fd, 0); + int8 result = (rodex->isenabled() == true) ? 1 : 0; + + clif->rodex_open_write_mail(fd, rPacket->receiveName, result); +} + +void clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result) +{ +#if PACKETVER >= 20140416 + struct PACKET_ZC_ACK_OPEN_WRITE_MAIL *sPacket = NULL; + + nullpo_retv(receiver_name); + + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexopenwrite; + safestrncpy(sPacket->receiveName, receiver_name, NAME_LENGTH); + sPacket->result = result; + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_parse_rodex_add_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_add_item(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_ADD_ITEM_TO_MAIL *rPacket = RFIFOP(fd, 0); + int16 idx = rPacket->index - 2; + + rodex->add_item(sd, idx, (int16)rPacket->count); +} + +void clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result) +{ +#if PACKETVER >= 20141119 + struct PACKET_ZC_ADD_ITEM_TO_MAIL *packet; + int fd, j; + + nullpo_retv(sd); + if (idx < 0 || idx >= MAX_INVENTORY) + result = RODEX_ADD_ITEM_FATAL_ERROR; + + fd = sd->fd; + + WFIFOHEAD(fd, sizeof(*packet)); + packet = WFIFOP(fd, 0); + memset(packet, 0x0, sizeof(*packet)); + packet->PacketType = rodexadditem; + packet->result = result; + + if (result != RODEX_ADD_ITEM_SUCCESS) { //No need to continue building the packet if it failed + WFIFOSET(fd, sizeof(*packet)); + return; + } + + packet->index = idx + 2; + packet->count = amount; + packet->ITID = sd->status.inventory[idx].nameid; + packet->type = itemtype(sd->inventory_data[idx]->type); + packet->IsIdentified = sd->status.inventory[idx].identify ? 1 : 0; + packet->IsDamaged = (sd->status.inventory[idx].attribute & ATTR_BROKEN) != 0 ? 1 : 0; + packet->refiningLevel = sd->status.inventory[idx].refine; + for (j = 0; j < ARRAYLENGTH(packet->slot.card); ++j) + packet->slot.card[j] = sd->status.inventory[idx].card[j]; + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { + packet->optionData[j].index = sd->status.inventory[idx].option[j].index; + packet->optionData[j].param = sd->status.inventory[idx].option[j].param; + packet->optionData[j].value = sd->status.inventory[idx].option[j].value; + } + packet->weight = sd->rodex.tmp.weight / 10; + WFIFOSET(fd, sizeof(*packet)); +#endif +} + +void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_remove_item(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL *rPacket = RFIFOP(fd, 0); + int16 idx = rPacket->index - 2; + + rodex->remove_item(sd, idx, (int16)rPacket->cnt); +} + +void clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16 amount) +{ +#if PACKETVER >= 20140521 + struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL *packet; + int fd; + + nullpo_retv(sd); + Assert_retv(idx >= 0 && idx < MAX_INVENTORY); + + fd = sd->fd; + + WFIFOHEAD(fd, sizeof(*packet)); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexremoveitem; + packet->result = (amount < 0) ? 0 : 1; + packet->cnt = (amount < 0) ? 0 : sd->status.inventory[idx].amount - amount; + packet->index = idx + 2; + packet->weight = sd->rodex.tmp.weight / 10; + WFIFOSET(fd, sizeof(*packet)); +#endif +} + +void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_CHECKNAME *rPacket = RFIFOP(fd, 0); + int char_id = 0, base_level = 0; + short class = 0; + char name[NAME_LENGTH]; + + safestrncpy(name, rPacket->Name, NAME_LENGTH); + + rodex->check_player(sd, name, &base_level, &char_id, &class); +} + +void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) +{ +#if PACKETVER >= 20140521 + struct PACKET_ZC_CHECKNAME *sPacket; + int fd; + + nullpo_retv(sd); + nullpo_retv(name); + + fd = sd->fd; + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexcheckplayer; + if (char_id == 0) { + sPacket->CharId = 0; + WFIFOSET(fd, sizeof(*sPacket)); + return; + } + sPacket->CharId = char_id; + sPacket->Class = class_; + sPacket->BaseLevel = base_level; +#if PACKETVER >= 20160316 + strncpy(sPacket->Name, name, NAME_LENGTH); +#endif + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_send_mail(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_SEND_MAIL *rPacket = RFIFOP(fd, 0); + int8 result; + + if (rPacket->TextcontentsLength + rPacket->Titlelength > rPacket->PacketLength - sizeof(*rPacket)) { + result = RODEX_SEND_MAIL_FATAL_ERROR; + } else if (rPacket->TextcontentsLength > RODEX_BODY_LENGTH || rPacket->Titlelength > RODEX_TITLE_LENGTH) { + result = RODEX_SEND_MAIL_FATAL_ERROR; + } else { + char rname[NAME_LENGTH] = ""; + char title[RODEX_TITLE_LENGTH] = ""; + char body[RODEX_BODY_LENGTH] = ""; + + safestrncpy(rname, rPacket->receiveName, NAME_LENGTH); + safestrncpy(title, rPacket->string, RODEX_TITLE_LENGTH); + safestrncpy(body, &rPacket->string[rPacket->Titlelength], RODEX_BODY_LENGTH); + + result = rodex->send_mail(sd, rname, body, title, rPacket->zeny); + } + + if (result != RODEX_SEND_MAIL_SUCCESS) + clif->rodex_send_mail_result(fd, sd, result); + rodex->clean(sd, 1); +} + +void clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 result) +{ +#if PACKETVER >= 20131230 + struct PACKET_ZC_WRITE_MAIL_RESULT *sPacket; + + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexwriteresult; + sPacket->result = result; + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_type, int64 page_start) +{ +#if PACKETVER >= 20131218 + struct PACKET_ZC_MAIL_LIST *packet; + struct maillistinfo *inner; + int16 size = sizeof(*packet); + int8 count = 0; + + nullpo_retv(sd); + + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = ((page_start == (VECTOR_LENGTH(sd->rodex.messages) - 1)) ? rodexmailList : rodexnextpage); +#if PACKETVER < 20170419 + packet->opentype = open_type; +#endif + inner = WFIFOP(fd, size); + + while (page_start >= 0 && count < RODEX_MAIL_PER_PAGE) { + struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, page_start); + --page_start; + + if (msg->is_deleted) + continue; + + inner->MailID = msg->id; + inner->Isread = msg->is_read == true ? 1 : 0; + inner->type = msg->type; +#if PACKETVER >= 20170419 + inner->openType = msg->opentype; +#else + inner->regDateTime = (int)time(NULL) - msg->send_date; +#endif + inner->expireDateTime = msg->expire_date - (int)time(NULL); + if (open_type == RODEX_OPENTYPE_RETURN) { + inner->expireDateTime += RODEX_EXPIRE; + } + inner->Titlelength = (int16)strlen(msg->title) + 1; + if (open_type != RODEX_OPENTYPE_RETURN) { + strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + } else { + strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + } + strncpy(inner->title, msg->title, inner->Titlelength); + size += sizeof(*inner) + inner->Titlelength; + inner = WFIFOP(fd, size); + ++count; + } + + packet->PacketLength = size; +#if PACKETVER < 20170419 + packet->cnt = count; +#endif + packet->IsEnd = page_start > 0 ? 0 : 1; + WFIFOSET(fd, size); +#endif +} + +void clif_rodex_send_mails_all(int fd, struct map_session_data *sd) +{ +#if PACKETVER >= 20170419 + struct PACKET_ZC_MAIL_LIST *packet; + struct maillistinfo *inner; + int16 size = sizeof(*packet); + int packetMailCount = 0; + int mailListCount = 0; + int mailsSize = VECTOR_LENGTH(sd->rodex.messages); + int i; + + nullpo_retv(sd); + + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexmailList; + inner = WFIFOP(fd, size); + + i = mailsSize - 1; + while (i >= 0) { + struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, i); + --i; + + if (msg->is_deleted) + continue; + + inner->MailID = msg->id; + inner->Isread = msg->is_read == true ? 1 : 0; + inner->type = msg->type; + inner->openType = msg->opentype; + inner->expireDateTime = msg->expire_date - (int)time(NULL); + if (msg->opentype == RODEX_OPENTYPE_RETURN) { + inner->expireDateTime += RODEX_EXPIRE; + } + inner->Titlelength = (int16)strlen(msg->title) + 1; + if (msg->opentype != RODEX_OPENTYPE_RETURN) { + strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + } else { + strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + } + strncpy(inner->title, msg->title, inner->Titlelength); + size += sizeof(*inner) + inner->Titlelength; + inner = WFIFOP(fd, size); + packetMailCount ++; + mailListCount ++; + if (packetMailCount == RODEX_MAIL_PER_PAGE) { + packet->PacketLength = size; + packet->IsEnd = mailListCount > mailsSize ? 1 : 0; + WFIFOSET(fd, size); + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexmailList; + size = sizeof(*packet); + inner = WFIFOP(fd, size); + packetMailCount = 0; + } + } + + if (packetMailCount > 0 || mailListCount == 0) { + packet->PacketLength = size; + packet->IsEnd = 1; + WFIFOSET(fd, size); + } +#endif +} + +void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count) +{ +#if PACKETVER >= 20131218 + struct PACKET_ZC_MAIL_LIST *packet; + struct maillistinfo *inner; + int16 size = sizeof(*packet); + int i, j; + + nullpo_retv(sd); + + WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE); + packet = WFIFOP(fd, 0); + packet->PacketType = rodexmailList; +#if PACKETVER < 20170419 + packet->opentype = open_type; +#endif + inner = WFIFOP(fd, size); + + i = VECTOR_LENGTH(sd->rodex.messages) - 1; + j = count; + while (i >= 0 && j > 0) { + struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, i); + --i; + + if (msg->is_deleted) + continue; + + inner->MailID = msg->id; + inner->Isread = msg->is_read == true ? 1 : 0; + inner->type = msg->type; +#if PACKETVER >= 20170419 + inner->openType = msg->opentype; +#else + inner->regDateTime = (int)time(NULL) - msg->send_date; +#endif + inner->expireDateTime = msg->expire_date - (int)time(NULL); + if (open_type == RODEX_OPENTYPE_RETURN) { + inner->expireDateTime += RODEX_EXPIRE; + } + inner->Titlelength = (int16)strlen(msg->title) + 1; + if (open_type != RODEX_OPENTYPE_RETURN) { + strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name)); + } else { + strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name)); + } + strncpy(inner->title, msg->title, inner->Titlelength); + size += sizeof(*inner) + inner->Titlelength; + inner = WFIFOP(fd, size); + --j; + } + + packet->PacketLength = size; +#if PACKETVER < 20170419 + packet->cnt = count; +#endif + packet->IsEnd = 1; + WFIFOSET(fd, size); +#endif +} + +void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_next_maillist(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_NEXT_MAIL_LIST *packet = RFIFOP(fd, 0); + + rodex->next_page(sd, packet->opentype, packet->Lower_MailID); +} + +void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_read_mail(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_READ_MAIL *rPacket = RFIFOP(fd, 0); + + rodex->read_mail(sd, rPacket->MailID); +} + +void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg) +{ +#if PACKETVER >= 20140115 + struct PACKET_ZC_READ_MAIL *sPacket; + struct mail_item *item; + int fd, i, body_len, size; + + nullpo_retv(sd); + nullpo_retv(msg); + + fd = sd->fd; + body_len = (int)strlen(msg->body) + 1; + size = sizeof(*sPacket); + + WFIFOHEAD(fd, sizeof(*sPacket) + body_len + (sizeof(*item) * RODEX_MAX_ITEM)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexread; + sPacket->opentype = opentype; + sPacket->MailID = msg->id; + sPacket->TextcontentsLength = body_len; + sPacket->zeny = msg->zeny; + sPacket->ItemCnt = msg->items_count; + strncpy(WFIFOP(fd, size), msg->body, body_len); + size += body_len; + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + struct item *it = &msg->items[i].item; + int j, k; + + if (it->nameid == 0) { + continue; + } + + item = WFIFOP(fd, size); + memset(item, 0x0, sizeof(*item)); + item->ITID = it->nameid; + item->count = it->amount; + item->type = itemtype(itemdb->search(it->nameid)->type); + item->IsIdentified = it->identify ? 1 : 0; + item->IsDamaged = (it->attribute & ATTR_BROKEN) != 0 ? 1 : 0; + item->refiningLevel = it->refine; + for (k = 0; k < MAX_SLOTS; ++k) { + item->slot.card[k] = it->card[k]; + } + for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { + item->optionData[j].index = it->option[j].index; + item->optionData[j].value = it->option[j].value; + } + + size += sizeof(*item); + } + sPacket->PacketLength = size; + WFIFOSET(fd, size); +#endif +} + +void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_delete_mail(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_DELETE_MAIL *rPacket = RFIFOP(fd, 0); + + rodex->delete_mail(sd, rPacket->MailID); +} + +void clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 mail_id) +{ +#if PACKETVER >= 20131218 + struct PACKET_ZC_ACK_DELETE_MAIL *sPacket; + int fd; + + nullpo_retv(sd); + + fd = sd->fd; + + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexdelete; + sPacket->opentype = opentype; + sPacket->MailID = mail_id; + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_ZENY_FROM_MAIL *rPacket = RFIFOP(fd, 0); + + rodex->get_zeny(sd, rPacket->opentype, rPacket->MailID); +} + +void clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) +{ +#if PACKETVER >= 20140409 + struct PACKET_ZC_ACK_ZENY_FROM_MAIL *sPacket; + int fd; + + nullpo_retv(sd); + + fd = sd->fd; + + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexgetzeny; + sPacket->MailID = mail_id; + sPacket->opentype = opentype; + sPacket->result = result; + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_parse_rodex_request_items(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_request_items(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_ITEM_FROM_MAIL *rPacket = RFIFOP(fd, 0); + + rodex->get_items(sd, rPacket->opentype, rPacket->MailID); +} + +void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) +{ +#if PACKETVER >= 20140409 + struct PACKET_ZC_ACK_ITEM_FROM_MAIL *sPacket; + int fd; + + nullpo_retv(sd); + + fd = sd->fd; + + WFIFOHEAD(fd, sizeof(*sPacket)); + sPacket = WFIFOP(fd, 0); + sPacket->PacketType = rodexgetitem; + sPacket->MailID = mail_id; + sPacket->opentype = opentype; + sPacket->result = result; + WFIFOSET(fd, sizeof(*sPacket)); +#endif +} + +void clif_rodex_icon(int fd, bool show) +{ +// packet add date is 20140716, but from players reports it wrong. Using closer known correct version. +#if PACKETVER >= 20141112 + WFIFOHEAD(fd, 3); + WFIFOW(fd, 0) = rodexicon; + WFIFOB(fd, 2) = (show == true ? 1 : 0); + WFIFOSET(fd, 3); +#endif +} + +void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0); +#if PACKETVER >= 20170419 + rodex->refresh(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID); +#else + rodex->refresh(sd, packet->opentype, packet->Upper_MailID); +#endif +} + +void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) +{ + const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0); +#if PACKETVER >= 20170419 + rodex->open(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID); +#else + rodex->open(sd, packet->opentype, packet->Upper_MailID); +#endif + rodex->clean(sd, 1); +} + +void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_close_mailbox(int fd, struct map_session_data *sd) +{ + rodex->clean(sd, 0); + intif->rodex_checkhasnew(sd); +} + +void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) __attribute__((nonnull(2))); +void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) +{ + rodex->clean(sd, 1); +} + +/*========================================== * Main client packet processing function *------------------------------------------*/ int clif_parse(int fd) { @@ -19230,9 +20071,10 @@ void packetdb_loaddb(void) { memset(packet_db,0,sizeof(packet_db)); #define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF) -#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0) #include "packets.h" /* load structure data */ #undef packet +#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0) +#include "packets_keys.h" #undef packetKeys } void clif_bc_ready(void) { @@ -19608,6 +20450,7 @@ void clif_defaults(void) { clif->party_created = clif_party_created; clif->party_member_info = clif_party_member_info; clif->party_info = clif_party_info; + clif->party_job_and_level = clif_party_job_and_level; clif->party_invite = clif_party_invite; clif->party_inviteack = clif_party_inviteack; clif->party_option = clif_party_option; @@ -20053,9 +20896,37 @@ void clif_defaults(void) { clif->pNPCMarketClosed = clif_parse_NPCMarketClosed; clif->pNPCMarketPurchase = clif_parse_NPCMarketPurchase; /* */ - clif->add_random_options = clif_add_random_options; + clif->add_item_options = clif_add_item_options; clif->pHotkeyRowShift = clif_parse_HotkeyRowShift; clif->dressroom_open = clif_dressroom_open; clif->pOneClick_ItemIdentify = clif_parse_OneClick_ItemIdentify; clif->get_bl_name = clif_get_bl_name; + /* RODEX */ + clif->pRodexOpenWriteMail = clif_parse_rodex_open_write_mail; + clif->rodex_open_write_mail = clif_rodex_open_write_mail; + clif->pRodexAddItem = clif_parse_rodex_add_item; + clif->rodex_add_item_result = clif_rodex_add_item_result; + clif->pRodexRemoveItem = clif_parse_rodex_remove_item; + clif->rodex_remove_item_result = clif_rodex_remove_item_result; + clif->pRodexSendMail = clif_parse_rodex_send_mail; + clif->rodex_send_mail_result = clif_rodex_send_mail_result; + clif->rodex_send_maillist = clif_rodex_send_maillist; + clif->rodex_send_refresh = clif_rodex_send_refresh; + clif->pRodexReadMail = clif_parse_rodex_read_mail; + clif->rodex_read_mail = clif_rodex_read_mail; + clif->pRodexNextMaillist = clif_parse_rodex_next_maillist; + clif->pRodexCloseMailbox = clif_parse_rodex_close_mailbox; + clif->pRodexCancelWriteMail = clif_parse_rodex_cancel_write_mail; + clif->pRodexOpenMailbox = clif_parse_rodex_open_mailbox; + clif->pRodexCheckName = clif_parse_rodex_checkname; + clif->rodex_checkname_result = clif_rodex_checkname_result; + clif->pRodexDeleteMail = clif_parse_rodex_delete_mail; + clif->rodex_delete_mail = clif_rodex_delete_mail; + clif->pRodexRefreshMaillist = clif_parse_rodex_refresh_maillist; + clif->pRodexRequestZeny = clif_parse_rodex_request_zeny; + clif->rodex_request_zeny = clif_rodex_request_zeny; + clif->pRodexRequestItems = clif_parse_rodex_request_items; + clif->rodex_request_items = clif_rodex_request_items; + clif->rodex_icon = clif_rodex_icon; + clif->rodex_send_mails_all = clif_rodex_send_mails_all; } diff --git a/src/map/clif.h b/src/map/clif.h index 3203a3e66..851c823ea 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -65,9 +65,11 @@ struct view_data; #define MAX_ROULETTE_COLUMNS 9 /** client-defined value **/ #define RGB2BGR(c) (((c) & 0x0000FF) << 16 | ((c) & 0x00FF00) | ((c) & 0xFF0000) >> 16) +#define COLOR_CYAN 0x00ffffU #define COLOR_RED 0xff0000U #define COLOR_GREEN 0x00ff00U #define COLOR_WHITE 0xffffffU +#define COLOR_YELLOW 0xffff00U #define COLOR_DEFAULT COLOR_GREEN /** @@ -357,30 +359,33 @@ typedef enum useskill_fail_cause { // clif_skill_fail }useskill_fail_cause; enum clif_messages { - MSG_ITEM_CANT_OBTAIN_WEIGHT = 0x034, ///< You cannot carry more items because you are overweight. - MSG_ITEM_NEED_STANDING = 0x297, ///< You cannot use this item while sitting. - MSG_MERCENARY_EXPIRED = 0x4f2, ///< The mercenary contract has expired. - MSG_MERCENARY_DIED = 0x4f3, ///< The mercenary has died. - MSG_MERCENARY_RELEASED = 0x4f4, ///< You have released the mercenary. - MSG_MERCENARY_ESCAPED = 0x4f5, ///< The mercenary has run away. - MSG_SKILL_CANT_USE_AREA = 0x536, ///< This skill cannot be used within this area - MSG_ITEM_CANT_USE_AREA = 0x537, ///< This item cannot be used within this area. - MSG_EQUIP_NOT_PUBLIC = 0x54d, ///< This character's equipment information is not open to the public. - MSG_ITEM_NEED_MADO = 0x59b, ///< Item can only be used when Mado Gear is mounted. - MSG_ITEM_NEED_CART = 0x5ef, ///< Usable only when cart is put on - MSG_RUNE_STONE_MAX_AMOUNT = 0x61b, ///< Cannot create Rune stone more than the maximum amount. - MSG_SKILL_POINTS_LEFT_JOB1 = 0x61e, ///< You must consume all '%d' remaining points in your 1st Job tab. - MSG_SKILL_POINTS_LEFT_JOB2 = 0x61f, ///< You must consume all '%d' remaining points in your 2nd Job tab. 1st Tab is already done. - MSG_SKILL_ITEM_NOT_FOUND = 0x623, // FIXME[Haru]: This seems to be 0x622 in the msgstringtable files I found. - MSG_SKILL_SUCCESS = 0x627, // FIXME[Haru]: This seems to be 0x626 in the msgstringtable files I found. - MSG_SKILL_FAILURE = 0x628, // FIXME[Haru]: This seems to be 0x627 in the msgstringtable files I found. - MSG_SKILL_ITEM_NEED_IDENTIFY = 0x62d, ///< Unable to use unchecked items as materials. - MSG_ITEM_CANT_EQUIP_LVL = 0x6ed, // FIXME[Haru]: This seems to be 0x6ee in the msgstringtable files I found. - MSG_ITEM_CANT_USE_LVL = 0x6ee, // FIXME[Haru]: This seems to be 0x6ef in the msgstringtable files I found. - MSG_COOKING_LIST_FAIL = 0x625, // FIXME[Haru]: This might be a wrong message ID. Not sure what it should be. - MSG_SECONDS_UNTIL_USE = 0x746, ///< %d seconds left until you can use - MSG_NPC_WORK_IN_PROGRESS = 0x783, // FIXME[Haru]: This seems to be 0x784 in the msgstringtable files I found. - MSG_REINS_CANT_USE_MOUNTED = 0x78b, // FIXME[Haru]: This seems to be 0x785 in the msgstringtalbe files I found. + MSG_ITEM_CANT_OBTAIN_WEIGHT = 0x034, ///< You cannot carry more items because you are overweight. + MSG_ITEM_NEED_STANDING = 0x297, ///< You cannot use this item while sitting. + MSG_MERCENARY_EXPIRED = 0x4f2, ///< The mercenary contract has expired. + MSG_MERCENARY_DIED = 0x4f3, ///< The mercenary has died. + MSG_MERCENARY_RELEASED = 0x4f4, ///< You have released the mercenary. + MSG_MERCENARY_ESCAPED = 0x4f5, ///< The mercenary has run away. + MSG_PARTY_MEMBER_NOT_SUMMONED = 0x4c5, ///< The party member was not summoned because you are not the party leader. + MSG_PARTY_NO_MEMBER_IN_MAP = 0x4c6, ///< There is no party member to summon in the current map. + MSG_SKILL_CANT_USE_AREA = 0x536, ///< This skill cannot be used within this area + MSG_ITEM_CANT_USE_AREA = 0x537, ///< This item cannot be used within this area. + MSG_EQUIP_NOT_PUBLIC = 0x54d, ///< This character's equipment information is not open to the public. + MSG_ITEM_NEED_MADO = 0x59b, ///< Item can only be used when Mado Gear is mounted. + MSG_ITEM_NEED_CART = 0x5ef, ///< Usable only when cart is put on + MSG_RUNE_STONE_MAX_AMOUNT = 0x61b, ///< Cannot create Rune stone more than the maximum amount. + MSG_SKILL_POINTS_LEFT_JOB1 = 0x61e, ///< You must consume all '%d' remaining points in your 1st Job tab. + MSG_SKILL_POINTS_LEFT_JOB2 = 0x61f, ///< You must consume all '%d' remaining points in your 2nd Job tab. 1st Tab is already done. + MSG_SKILL_ITEM_NOT_FOUND = 0x623, // FIXME[Haru]: This seems to be 0x622 in the msgstringtable files I found. + MSG_SKILL_SUCCESS = 0x627, // FIXME[Haru]: This seems to be 0x626 in the msgstringtable files I found. + MSG_SKILL_FAILURE = 0x628, // FIXME[Haru]: This seems to be 0x627 in the msgstringtable files I found. + MSG_SKILL_ITEM_NEED_IDENTIFY = 0x62d, ///< Unable to use unchecked items as materials. + MSG_ITEM_CANT_EQUIP_LVL = 0x6ed, // FIXME[Haru]: This seems to be 0x6ee in the msgstringtable files I found. + MSG_ITEM_CANT_USE_LVL = 0x6ee, // FIXME[Haru]: This seems to be 0x6ef in the msgstringtable files I found. + MSG_COOKING_LIST_FAIL = 0x625, // FIXME[Haru]: This might be a wrong message ID. Not sure what it should be. + MSG_SECONDS_UNTIL_USE = 0x746, ///< %d seconds left until you can use + MSG_NPC_WORK_IN_PROGRESS = 0x783, // FIXME[Haru]: This seems to be 0x784 in the msgstringtable files I found. + MSG_REINS_CANT_USE_MOUNTED = 0x78b, // FIXME[Haru]: This seems to be 0x785 in the msgstringtalbe files I found. + MSG_PARTY_LEADER_SAMEMAP = 0x82e, //< It is only possible to change the party leader while on the same map. }; /** @@ -671,7 +676,7 @@ struct clif_interface { void (*changetraplook) (struct block_list *bl,int val); void (*refreshlook) (struct block_list *bl,int id,int type,int val,enum send_target target); void (*sendlook) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); - void (*class_change) (struct block_list *bl,int class_,int type); + void (*class_change) (struct block_list *bl,int class_,int type, struct map_session_data *sd); void (*skill_delunit) (struct skill_unit *su); void (*skillunit_update) (struct block_list* bl); int (*clearunit_delayed_sub) (int tid, int64 tick, int id, intptr_t data); @@ -779,7 +784,7 @@ struct clif_interface { void (*equiptickack) (struct map_session_data* sd, int flag); void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd); void (*equpcheckbox) (struct map_session_data* sd); - void (*displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); + void (*displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); void (*font) (struct map_session_data *sd); void (*progressbar) (struct map_session_data * sd, unsigned int color, unsigned int second); void (*progressbar_abort) (struct map_session_data * sd); @@ -913,6 +918,7 @@ struct clif_interface { void (*party_created) (struct map_session_data *sd,int result); void (*party_member_info) (struct party_data *p, struct map_session_data *sd); void (*party_info) (struct party_data* p, struct map_session_data *sd); + void (*party_job_and_level) (struct map_session_data *sd); void (*party_invite) (struct map_session_data *sd,struct map_session_data *tsd); void (*party_inviteack) (struct map_session_data* sd, const char* nick, int result); void (*party_option) (struct party_data *p,struct map_session_data *sd,int flag); @@ -1351,7 +1357,7 @@ struct clif_interface { void (*pNPCMarketClosed) (int fd, struct map_session_data *sd); void (*pNPCMarketPurchase) (int fd, struct map_session_data *sd); /* */ - void (*add_random_options) (unsigned char* buf, struct item* item); + int (*add_item_options) (struct ItemOptions *buf, const struct item *it); void (*pHotkeyRowShift) (int fd, struct map_session_data *sd); void (*dressroom_open) (struct map_session_data *sd, int view); void (*pOneClick_ItemIdentify) (int fd,struct map_session_data *sd); @@ -1360,6 +1366,35 @@ struct clif_interface { void (*pSelectCart) (int fd, struct map_session_data *sd); const char *(*get_bl_name) (const struct block_list *bl); + + /* RoDEX */ + void (*pRodexOpenWriteMail) (int fd, struct map_session_data *sd); + void (*rodex_open_write_mail) (int fd, const char *receiver_name, int8 result); + void (*pRodexAddItem) (int fd, struct map_session_data *sd); + void (*rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, int8 result); + void (*pRodexRemoveItem) (int fd, struct map_session_data *sd); + void (*rodex_remove_item_result) (struct map_session_data *sd, int16 idx, int16 amount); + void (*pRodexSendMail) (int fd, struct map_session_data *sd); + void (*rodex_send_mail_result) (int fd, struct map_session_data *sd, int8 result); + void (*rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); + void (*rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); + void (*rodex_send_mails_all) (int fd, struct map_session_data *sd); + void (*pRodexReadMail) (int fd, struct map_session_data *sd); + void (*rodex_read_mail) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); + void (*pRodexNextMaillist) (int fd, struct map_session_data *sd); + void (*pRodexCloseMailbox) (int fd, struct map_session_data *sd); + void (*pRodexCancelWriteMail) (int fd, struct map_session_data *sd); + void (*pRodexOpenMailbox) (int fd, struct map_session_data *sd); + void (*pRodexCheckName) (int fd, struct map_session_data *sd); + void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); + void (*pRodexDeleteMail) (int fd, struct map_session_data *sd); + void (*rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id); + void (*pRodexRefreshMaillist) (int fd, struct map_session_data *sd); + void (*pRodexRequestZeny) (int fd, struct map_session_data *sd); + void (*rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + void (*pRodexRequestItems) (int fd, struct map_session_data *sd); + void (*rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + void (*rodex_icon) (int fd, bool show); }; #ifdef HERCULES_CORE diff --git a/src/map/date.c b/src/map/date.c index 5579962bf..b06ec18d6 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -77,6 +77,27 @@ int date_get_sec(void) return lt->tm_sec; } +int date_get_dayofweek(void) +{ + time_t t = time(NULL); + struct tm *lt = localtime(&t); + return lt->tm_wday; +} + +// Returns YYYYMMDD of now +int date_get_date(void) +{ + time_t t; + struct tm * lt; + t = time(NULL); + lt = localtime(&t); + + return + (lt->tm_year + 1900) * 10000 + + (lt->tm_mon + 1) * 100 + + (lt->tm_mday); +} + /*========================================== * Star gladiator related checks *------------------------------------------*/ diff --git a/src/map/date.h b/src/map/date.h index 831539e3c..f4f119ade 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -31,6 +31,8 @@ int date_get_day(void); int date_get_hour(void); int date_get_min(void); int date_get_sec(void); +int date_get_dayofweek(void); +int date_get_date(void); bool is_day_of_sun(void); bool is_day_of_moon(void); diff --git a/src/map/duel.c b/src/map/duel.c index 64991d39c..558dc1d9e 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/duel.h b/src/map/duel.h index 60b5b09ab..c0af04df6 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/elemental.c b/src/map/elemental.c index b6297c2cf..ae1fda0a2 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -704,7 +704,7 @@ int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *s if( DIFF_TICK(tick,ed->last_spdrain_time) >= 10000 ){// Drain SP every 10 seconds int sp = 5; - switch (ed->vd->class_) { + switch (ed->vd->class) { case ELEID_EL_AGNI_M: case ELEID_EL_AQUA_M: case ELEID_EL_VENTUS_M: @@ -864,7 +864,7 @@ int read_elementaldb(void) { db->lv = atoi(str[3]); estatus = &db->status; - db->vd.class_ = db->class_; + db->vd.class = db->class_; estatus->max_hp = atoi(str[4]); estatus->max_sp = atoi(str[5]); diff --git a/src/map/elemental.h b/src/map/elemental.h index cdd83fd21..f13d095df 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/guild.c b/src/map/guild.c index 83afc9538..bb0484477 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -268,7 +268,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd) m->hair = sd->status.hair; m->hair_color = sd->status.hair_color; m->gender = sd->status.sex; - m->class_ = sd->status.class_; + m->class = sd->status.class; m->lv = sd->status.base_level; //m->exp = 0; //m->exp_payper = 0; @@ -977,7 +977,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) return 0; intif->guild_memberinfoshort(g->guild_id, - sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class_); + sd->status.account_id,sd->status.char_id,online,sd->status.base_level,sd->status.class); if(!online){ int i = guild->getindex(g,sd->status.account_id,sd->status.char_id); @@ -996,7 +996,7 @@ int guild_send_memberinfoshort(struct map_session_data *sd,int online) return 0; } -int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_) +int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { // cleaned up [LuzZza] int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1; struct guild *g = guild->search(guild_id); @@ -1011,7 +1011,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin oldonline=m->online; m->online=online; m->lv=lv; - m->class_=class_; + m->class = class; idx=i; } alv+=m->lv; @@ -1282,7 +1282,8 @@ struct DBData create_expcache(union DBKey key, va_list args) /*==================================================== * Return taxed experience from player sd to guild *---------------------------------------------------*/ -unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp) { +uint64 guild_payexp(struct map_session_data *sd, uint64 exp) +{ struct guild *g; struct guild_expcache *c; int per; @@ -1814,23 +1815,28 @@ int guild_broken(int guild_id,int flag) } //Changes the Guild Master to the specified player. [Skotlex] -int guild_gm_change(int guild_id, struct map_session_data *sd) +int guild_gm_change(int guild_id, int char_id) { - struct guild *g; - nullpo_ret(sd); + struct guild *g = guild->search(guild_id); + char *name; + int i; - if (sd->status.guild_id != guild_id) - return 0; + nullpo_ret(g); - g=guild->search(guild_id); + ARR_FIND(0, MAX_GUILD, i, g->member[i].char_id == char_id); - nullpo_ret(g); + if (i == MAX_GUILD ) { + // Not part of the guild + return 0; + } + + name = g->member[i].name; - if (strcmp(g->master, sd->status.name) == 0) //Nothing to change. + if (strcmp(g->master, name) == 0) //Nothing to change. return 0; //Notify servers that master has changed. - intif->guild_change_gm(guild_id, sd->status.name, (int)strlen(sd->status.name)+1); + intif->guild_change_gm(guild_id, name, (int)strlen(name) + 1); return 1; } @@ -1864,6 +1870,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) if (g->member[pos].sd && g->member[pos].sd->fd) { clif->message(g->member[pos].sd->fd, msg_sd(g->member[pos].sd,878)); //"You no longer are the Guild Master." g->member[pos].sd->state.gmaster_flag = 0; + clif->charnameack(0, &g->member[pos].sd->bl); } if (g->member[0].sd && g->member[0].sd->fd) { @@ -1871,6 +1878,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) g->member[0].sd->state.gmaster_flag = 1; //Block his skills for 5 minutes to prevent abuse. guild->block_skill(g->member[0].sd, 300000); + clif->charnameack(0, &g->member[pos].sd->bl); } // announce the change to all guild members @@ -1880,6 +1888,7 @@ int guild_gm_changed(int guild_id, int account_id, int char_id) { clif->guild_basicinfo(g->member[i].sd); clif->guild_memberlist(g->member[i].sd); + clif->guild_belonginfo(g->member[i].sd, g); // Update clientside guildmaster flag } } diff --git a/src/map/guild.h b/src/map/guild.h index 4fe7106d3..9296f9ec0 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -100,7 +100,7 @@ struct guild_interface { struct map_session_data *(*getavailablesd) (struct guild *g); int (*getindex) (const struct guild *g, int account_id, int char_id); int (*getposition) (struct guild *g, struct map_session_data *sd); - unsigned int (*payexp) (struct map_session_data *sd,unsigned int exp); + uint64 (*payexp) (struct map_session_data *sd, uint64 exp); int (*getexp) (struct map_session_data *sd,int exp); // [Celest] /* */ int (*create) (struct map_session_data *sd, const char *name); @@ -126,7 +126,7 @@ struct guild_interface { int (*check_alliance) (int guild_id1, int guild_id2, int flag); /* */ int (*send_memberinfoshort) (struct map_session_data *sd,int online); - int (*recv_memberinfoshort) (int guild_id,int account_id,int char_id,int online,int lv,int class_); + int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class); int (*change_memberposition) (int guild_id,int account_id,int char_id,short idx); int (*memberposition_changed) (struct guild *g,int idx,int pos); int (*change_position) (int guild_id,int idx,int mode,int exp_mode,const char *name); @@ -141,7 +141,7 @@ struct guild_interface { int (*skillupack) (int guild_id,uint16 skill_id,int account_id); int (*dobreak) (struct map_session_data *sd, const char *name); int (*broken) (int guild_id,int flag); - int (*gm_change) (int guild_id, struct map_session_data *sd); + int (*gm_change) (int guild_id, int char_id); int (*gm_changed) (int guild_id, int account_id, int char_id); /* */ void (*castle_map_init) (void); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index cc920b888..ddaf3443a 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1215,7 +1215,7 @@ void homunculus_read_db(void) { if( i > 0 ) { char filepath[256]; - snprintf(filepath, 256, "%s/%s", map->db_path, filename[i]); + safesnprintf(filepath, 256, "%s/%s", map->db_path, filename[i]); if( !exists(filepath) ) { continue; @@ -1350,7 +1350,7 @@ void do_init_homunculus(bool minimal) { //Stock view data for homuncs memset(homun->dbs->viewdb, 0, sizeof(homun->dbs->viewdb)); for (class_ = 0; class_ < MAX_HOMUNCULUS_CLASS; class_++) - homun->dbs->viewdb[class_].class_ = HM_CLASS_BASE+class_; + homun->dbs->viewdb[class_].class = HM_CLASS_BASE + class_; } void do_final_homunculus(void) { diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 3dd9e4772..a80392cf6 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/instance.c b/src/map/instance.c index fa2cfec16..21ee6bf80 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/instance.h b/src/map/instance.h index 2019b1a42..141d37a8f 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/intif.c b/src/map/intif.c index 2d6d39406..60edc8d8b 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -38,6 +38,7 @@ #include "map/pc.h" #include "map/pet.h" #include "map/quest.h" +#include "map/rodex.h" #include "map/storage.h" #include "common/memmgr.h" #include "common/nullpo.h" @@ -439,6 +440,135 @@ int intif_request_registry(struct map_session_data *sd, int flag) return 0; } +//================================================================= +// Account Storage +//----------------------------------------------------------------- + +/** + * Request the inter-server for a character's storage data. + * @packet 0x3010 [out] <account_id>.L + * @param sd [in] pointer to session data. + */ +void intif_request_account_storage(const struct map_session_data *sd) +{ + nullpo_retv(sd); + + /* Check for character server availability */ + if (intif->CheckForCharServer()) + return; + + WFIFOHEAD(inter_fd, 6); + WFIFOW(inter_fd, 0) = 0x3010; + WFIFOL(inter_fd, 2) = sd->status.account_id; + WFIFOSET(inter_fd, 6); +} + +/** + * Parse the reception of account storage from the inter-server. + * @packet 0x3805 [in] <packet_len>.W <account_id>.L <struct item[]>.P + * @param fd [in] file/socket descriptor. + */ +void intif_parse_account_storage(int fd) +{ + int account_id = 0, payload_size = 0, storage_count = 0; + int i = 0; + struct map_session_data *sd = NULL; + + Assert_retv(fd > 0); + + payload_size = RFIFOW(fd, 2) - 8; + + if ((account_id = RFIFOL(fd, 4)) == 0 || (sd = map->id2sd(account_id)) == NULL) { + ShowError("intif_parse_account_storage: Session pointer was null for account id %d!\n", account_id); + return; + } + + if (sd->storage.received == true) { + ShowError("intif_parse_account_storage: Multiple calls from the inter-server received.\n"); + return; + } + + storage_count = (payload_size/sizeof(struct item)); + + VECTOR_ENSURE(sd->storage.item, storage_count, 1); + + sd->storage.aggregate = storage_count; // Total items in storage. + + for (i = 0; i < storage_count; i++) { + const struct item *it = RFIFOP(fd, 8 + i * sizeof(struct item)); + VECTOR_PUSH(sd->storage.item, *it); + } + + sd->storage.received = true; // Mark the storage state as received. + sd->storage.save = false; // Initialize the save flag as false. + + pc->checkitem(sd); // re-check remaining items. +} + +/** + * Send account storage information for saving. + * @packet 0x3011 [out] <packet_len>.W <account_id>.L <struct item[]>.P + * @param sd [in] pointer to session data. + */ +void intif_send_account_storage(const struct map_session_data *sd) +{ + int len = 0, i = 0, c = 0; + + nullpo_retv(sd); + + // Assert that at this point in the code, both flags are true. + Assert_retv(sd->storage.save == true); + Assert_retv(sd->storage.received == true); + + if (intif->CheckForCharServer()) + return; + + len = 8 + sd->storage.aggregate * sizeof(struct item); + + WFIFOHEAD(inter_fd, len); + + WFIFOW(inter_fd, 0) = 0x3011; + WFIFOW(inter_fd, 2) = (uint16) len; + WFIFOL(inter_fd, 4) = sd->status.account_id; + for (i = 0, c = 0; i < VECTOR_LENGTH(sd->storage.item); i++) { + if (VECTOR_INDEX(sd->storage.item, i).nameid == 0) + continue; + memcpy(WFIFOP(inter_fd, 8 + c * sizeof(struct item)), &VECTOR_INDEX(sd->storage.item, i), sizeof(struct item)); + c++; + } + + WFIFOSET(inter_fd, len); +} + +/** + * Parse acknowledgement packet for the saving of an account's storage. + * @packet 0x3808 [in] <account_id>.L <saved_flag>.B + * @param fd [in] file/socket descriptor. + */ +void intif_parse_account_storage_save_ack(int fd) +{ + int account_id = RFIFOL(fd, 2); + uint8 saved = RFIFOB(fd, 6); + struct map_session_data *sd = NULL; + + Assert_retv(account_id > 0); + Assert_retv(fd > 0); + + if ((sd = map->id2sd(account_id)) == NULL) + return; // character is most probably offline. + + if (saved == 0) { + ShowError("intif_parse_account_storage_save_ack: Storage has not been saved! (AID: %d)\n", account_id); + return; + } + + sd->storage.save = false; // Storage has been saved. +} + +//================================================================= +// Guild Storage +//----------------------------------------------------------------- + int intif_request_guild_storage(int account_id,int guild_id) { if (intif->CheckForCharServer()) @@ -693,7 +823,7 @@ int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const cha } //Update request / Lv online status of the guild members -int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_) +int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { if (intif->CheckForCharServer()) return 0; @@ -704,7 +834,7 @@ int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int onli WFIFOL(inter_fd,10) = char_id; WFIFOB(inter_fd,14) = online; WFIFOW(inter_fd,15) = lv; - WFIFOW(inter_fd,17) = class_; + WFIFOW(inter_fd,17) = class; WFIFOSET(inter_fd,19); return 0; } @@ -1359,7 +1489,7 @@ void intif_parse_GuildMemberInfoChanged(int fd) { 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_CLASS: g->member[idx].class = RFIFOW(fd,18); break; case GMI_LEVEL: g->member[idx].lv = RFIFOW(fd,18); break; } } @@ -2270,6 +2400,224 @@ void intif_parse_Itembound_ack(int fd) { gstor->lock = 0; //Unlock now that operation is completed #endif } + +/*========================================== +* RoDEX System +*==========================================*/ + +/*------------------------------------------ + * Mail List + *------------------------------------------*/ + +// Rodex Inbox Request +// char_id: char_id +// account_id: account_id (used by account mail) +// flag: 0 - Open/Refresh ; 1 = Next Page +int intif_rodex_requestinbox(int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd, 20); + WFIFOW(inter_fd, 0) = 0x3095; + WFIFOL(inter_fd, 2) = char_id; + WFIFOL(inter_fd, 6) = account_id; + WFIFOL(inter_fd, 10) = flag; + WFIFOB(inter_fd, 11) = opentype; + WFIFOQ(inter_fd, 12) = mail_id; + WFIFOSET(inter_fd, 20); + + return 0; +} + +void intif_parse_RequestRodexOpenInbox(int fd) +{ + struct map_session_data *sd; +#if PACKETVER < 20170419 + int8 opentype = RFIFOB(fd, 8); +#endif + int8 flag = RFIFOB(fd, 9); + int8 is_end = RFIFOB(fd, 10); + int count = RFIFOL(fd, 11); + int i, j; + + sd = map->charid2sd(RFIFOL(fd, 4)); + + if (sd == NULL) // user is not online anymore + return; + + sd->rodex.total = count; + if (RFIFOW(fd, 2) - 15 != sd->rodex.total * sizeof(struct rodex_message)) { + ShowError("intif_parse_RodexInboxOpenReceived: data size mismatch %d != %"PRIuS"\n", RFIFOW(fd, 2) - 15, sd->rodex.total * sizeof(struct rodex_message)); + return; + } + + if (flag == 0) + VECTOR_CLEAR(sd->rodex.messages); + + for (i = 0, j = 15; i < count; ++i, j += sizeof(struct rodex_message)) { + struct rodex_message msg = { 0 }; + VECTOR_ENSURE(sd->rodex.messages, 1, 1); + memcpy(&msg, RFIFOP(fd, j), sizeof(struct rodex_message)); + VECTOR_PUSH(sd->rodex.messages, msg); + } + + if (is_end == true) { +#if PACKETVER >= 20170419 + clif->rodex_send_mails_all(sd->fd, sd); +#else + if (flag == 0) + clif->rodex_send_maillist(sd->fd, sd, opentype, VECTOR_LENGTH(sd->rodex.messages) - 1); + else + clif->rodex_send_refresh(sd->fd, sd, opentype, count); +#endif + } +} + +/*------------------------------------------ + * Notifications + *------------------------------------------*/ +int intif_rodex_hasnew(struct map_session_data *sd) +{ + nullpo_retr(0, sd); + + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd, 10); + WFIFOW(inter_fd, 0) = 0x3096; + WFIFOL(inter_fd, 2) = sd->status.char_id; + WFIFOL(inter_fd, 6) = sd->status.account_id; + WFIFOSET(inter_fd, 10); + + return 0; +} + +void intif_parse_RodexNotifications(int fd) +{ + struct map_session_data *sd; + bool has_messages; + + sd = map->charid2sd(RFIFOL(fd, 2)); + has_messages = RFIFOB(fd, 6); + + if (sd == NULL) // user is not online anymore + return; + + clif->rodex_icon(sd->fd, has_messages); +} + +/*------------------------------------------ + * Update Mail + *------------------------------------------*/ + +/// Updates a mail +/// flag: +/// 0 - user Read +/// 1 - user got Zeny +/// 2 - user got Items +/// 3 - delete +int intif_rodex_updatemail(int64 mail_id, int8 flag) +{ + if (intif->CheckForCharServer()) + return 0; + + WFIFOHEAD(inter_fd, 11); + WFIFOW(inter_fd, 0) = 0x3097; + WFIFOQ(inter_fd, 2) = mail_id; + WFIFOB(inter_fd, 10) = flag; + WFIFOSET(inter_fd, 11); + + return 0; +} + +/*------------------------------------------ + * Send Mail + *------------------------------------------*/ +int intif_rodex_sendmail(struct rodex_message *msg) +{ + if (intif->CheckForCharServer()) + return 0; + + nullpo_retr(0, msg); + + WFIFOHEAD(inter_fd, 4 + sizeof(struct rodex_message)); + WFIFOW(inter_fd, 0) = 0x3098; + WFIFOW(inter_fd, 2) = 4 + sizeof(struct rodex_message); + memcpy(WFIFOP(inter_fd, 4), msg, sizeof(struct rodex_message)); + WFIFOSET(inter_fd, 4 + sizeof(struct rodex_message)); + + return 0; +} + +void intif_parse_RodexSendMail(int fd) +{ + struct map_session_data *ssd = NULL, *rsd = NULL; + int sender_id = RFIFOL(fd, 2); + int receiver_id = RFIFOL(fd, 6); + int receiver_accountid = RFIFOL(fd, 10); + + if (sender_id > 0) + ssd = map->charid2sd(sender_id); + + if (receiver_id > 0) + rsd = map->charid2sd(receiver_id); + else if (receiver_accountid > 0) + rsd = map->id2sd(receiver_accountid); + + rodex->send_mail_result(ssd, rsd, RFIFOL(fd, 14)); +} + +/*------------------------------------------ + * Check Player + *------------------------------------------*/ +int intif_rodex_checkname(struct map_session_data *sd, const char *name) +{ + if (intif->CheckForCharServer()) + return 0; + + nullpo_retr(0, sd); + nullpo_retr(0, name); + + WFIFOHEAD(inter_fd, 6 + NAME_LENGTH); + WFIFOW(inter_fd, 0) = 0x3099; + WFIFOL(inter_fd, 2) = sd->status.char_id; + safestrncpy(WFIFOP(inter_fd, 6), name, NAME_LENGTH); + WFIFOSET(inter_fd, 6 + NAME_LENGTH); + + return 0; +} + +void intif_parse_RodexCheckName(int fd) +{ + struct map_session_data *sd = NULL; + int reqchar_id = RFIFOL(fd, 2); + int target_char_id = RFIFOL(fd, 6); + short target_class = RFIFOW(fd, 10); + int target_level = RFIFOL(fd, 12); + char name[NAME_LENGTH]; + + safestrncpy(name, RFIFOP(inter_fd, 16), NAME_LENGTH); + + if (reqchar_id <= 0) + return; + + sd = map->charid2sd(reqchar_id); + + if (sd == NULL) // User is not online anymore + return; + + if (target_char_id == 0) { + clif->rodex_checkname_result(sd, 0, 0, 0, name); + return; + } + + sd->rodex.tmp.receiver_id = target_char_id; + safestrncpy(sd->rodex.tmp.receiver_name, name, NAME_LENGTH); + + clif->rodex_checkname_result(sd, target_char_id, target_class, target_level, name); +} + //----------------------------------------------------------------- // Communication from the inter server // Return a 0 (false) if there were any errors. @@ -2306,8 +2654,10 @@ int intif_parse(int fd) case 0x3802: intif->pWisEnd(fd); break; case 0x3803: intif->pWisToGM(fd); break; case 0x3804: intif->pRegisters(fd); break; + case 0x3805: intif->pAccountStorage(fd); break; case 0x3806: intif->pChangeNameOk(fd); break; case 0x3807: intif->pMessageToFD(fd); break; + case 0x3808: intif->pAccountStorageSaveAck(fd); break; case 0x3818: intif->pLoadGuildStorage(fd); break; case 0x3819: intif->pSaveGuildStorage(fd); break; case 0x3820: intif->pPartyCreated(fd); break; @@ -2378,6 +2728,12 @@ int intif_parse(int fd) case 0x3891: intif->pRecvHomunculusData(fd); break; case 0x3892: intif->pSaveHomunculusOk(fd); break; case 0x3893: intif->pDeleteHomunculusOk(fd); break; + + // RoDEX + case 0x3895: intif->pRequestRodexOpenInbox(fd); break; + case 0x3896: intif->pRodexHasNew(fd); break; + case 0x3897: intif->pRodexSendMail(fd); break; + case 0x3898: intif->pRodexCheckName(fd); break; default: ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0)); return 0; @@ -2394,7 +2750,7 @@ int intif_parse(int fd) *-------------------------------------*/ 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 + -1,-1,27,-1, -1,-1,37,-1, 7, 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 @@ -2403,7 +2759,7 @@ void intif_defaults(void) { -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] 12,-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] + -1,-1, 7, 3, 0,-1, 7, 15,16 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ] }; intif = &intif_s; @@ -2421,6 +2777,8 @@ void intif_defaults(void) { intif->wis_message_to_gm = intif_wis_message_to_gm; intif->saveregistry = intif_saveregistry; intif->request_registry = intif_request_registry; + intif->request_account_storage = intif_request_account_storage; + intif->send_account_storage = intif_send_account_storage; intif->request_guild_storage = intif_request_guild_storage; intif->send_guild_storage = intif_send_guild_storage; intif->create_party = intif_create_party; @@ -2483,6 +2841,12 @@ void intif_defaults(void) { intif->elemental_request = intif_elemental_request; intif->elemental_delete = intif_elemental_delete; intif->elemental_save = intif_elemental_save; + // RoDEX + intif->rodex_requestinbox = intif_rodex_requestinbox; + intif->rodex_checkhasnew = intif_rodex_hasnew; + intif->rodex_updatemail = intif_rodex_updatemail; + intif->rodex_sendmail = intif_rodex_sendmail; + intif->rodex_checkname = intif_rodex_checkname; /* @accinfo */ intif->request_accinfo = intif_request_accinfo; /* */ @@ -2497,6 +2861,8 @@ void intif_defaults(void) { intif->pRegisters = intif_parse_Registers; intif->pChangeNameOk = intif_parse_ChangeNameOk; intif->pMessageToFD = intif_parse_MessageToFD; + intif->pAccountStorage = intif_parse_account_storage; + intif->pAccountStorageSaveAck = intif_parse_account_storage_save_ack; intif->pLoadGuildStorage = intif_parse_LoadGuildStorage; intif->pSaveGuildStorage = intif_parse_SaveGuildStorage; intif->pPartyCreated = intif_parse_PartyCreated; @@ -2552,4 +2918,9 @@ void intif_defaults(void) { intif->pRecvHomunculusData = intif_parse_RecvHomunculusData; intif->pSaveHomunculusOk = intif_parse_SaveHomunculusOk; intif->pDeleteHomunculusOk = intif_parse_DeleteHomunculusOk; + /* RoDEX */ + intif->pRequestRodexOpenInbox = intif_parse_RequestRodexOpenInbox; + intif->pRodexHasNew = intif_parse_RodexNotifications; + intif->pRodexSendMail = intif_parse_RodexSendMail; + intif->pRodexCheckName = intif_parse_RodexCheckName; } diff --git a/src/map/intif.h b/src/map/intif.h index 5e7f86fc2..4bca5f167 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -37,6 +37,7 @@ struct s_elemental; struct s_homunculus; struct s_mercenary; struct s_pet; +struct rodex_message; /** * Defines @@ -66,6 +67,8 @@ struct intif_interface { int (*wis_message_to_gm) (char *Wisp_name, int permission, char *mes); int (*saveregistry) (struct map_session_data *sd); int (*request_registry) (struct map_session_data *sd, int flag); + void (*request_account_storage) (const struct map_session_data *sd); + void (*send_account_storage) (const struct map_session_data *sd); 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, const char *name, int item, int item2); @@ -81,7 +84,7 @@ struct intif_interface { int (*guild_request_info) (int guild_id); int (*guild_addmember) (int guild_id, struct guild_member *m); int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes); - int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class_); + int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class); int (*guild_break) (int guild_id); int (*guild_message) (int guild_id, int account_id, const char *mes, int len); int (*guild_change_gm) (int guild_id, const char *name, int len); @@ -129,6 +132,12 @@ struct intif_interface { int (*elemental_request) (int ele_id, int char_id); int (*elemental_delete) (int ele_id); int (*elemental_save) (struct s_elemental *ele); + // RoDEX + int(*rodex_requestinbox) (int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); + int(*rodex_checkhasnew) (struct map_session_data *sd); + int(*rodex_updatemail) (int64 mail_id, int8 flag); + int(*rodex_sendmail) (struct rodex_message *msg); + int(*rodex_checkname) (struct map_session_data *sd, const char *name); /* @accinfo */ void (*request_accinfo) (int u_fd, int aid, int group_lv, char* query); /* */ @@ -139,8 +148,10 @@ struct intif_interface { int (*pWisToGM_sub) (struct map_session_data* sd,va_list va); void (*pWisToGM) (int fd); void (*pRegisters) (int fd); + void (*pAccountStorage) (int fd); void (*pChangeNameOk) (int fd); void (*pMessageToFD) (int fd); + void (*pAccountStorageSaveAck) (int fd); void (*pLoadGuildStorage) (int fd); void (*pSaveGuildStorage) (int fd); void (*pPartyCreated) (int fd); @@ -196,6 +207,11 @@ struct intif_interface { void (*pRecvHomunculusData) (int fd); void (*pSaveHomunculusOk) (int fd); void (*pDeleteHomunculusOk) (int fd); + /* RoDEX */ + void(*pRequestRodexOpenInbox) (int fd); + void(*pRodexHasNew) (int fd); + void(*pRodexSendMail) (int fd); + void(*pRodexCheckName) (int fd); }; #ifdef HERCULES_CORE diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 2e44393fe..7fedb19ae 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -321,6 +321,16 @@ struct item_data* itemdb_exists(int nameid) return item; } +/** + * Searches for the item_option data. + * @param option_index as the index of the item option (client side). + * @return pointer to struct item_option data or NULL. + */ +struct item_option *itemdb_option_exists(int idx) +{ + return (struct item_option *)idb_get(itemdb->options, idx); +} + /// Returns human readable name for given item type. /// @param type Type id to retrieve name for ( IT_* ). const char* itemdb_typename(int type) @@ -352,14 +362,14 @@ const char* itemdb_typename(int type) * * @author Dastgir */ -void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) +void itemdb_jobid2mapid(uint64 *bclass, int job_class, bool enable) { uint64 mask[3] = { 0 }; int i; nullpo_retv(bclass); - switch(job_id) { + switch (job_class) { // Base Classes case JOB_NOVICE: case JOB_SUPER_NOVICE: @@ -367,12 +377,22 @@ void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) mask[1] = 1ULL << MAPID_NOVICE; break; case JOB_SWORDMAN: + mask[0] = 1ULL << MAPID_SWORDMAN; + break; case JOB_MAGE: + mask[0] = 1ULL << MAPID_MAGE; + break; case JOB_ARCHER: + mask[0] = 1ULL << MAPID_ARCHER; + break; case JOB_ACOLYTE: + mask[0] = 1ULL << MAPID_ACOLYTE; + break; case JOB_MERCHANT: + mask[0] = 1ULL << MAPID_MERCHANT; + break; case JOB_THIEF: - mask[0] = 1ULL << (MAPID_NOVICE+job_id); + mask[0] = 1ULL << MAPID_THIEF; break; // 2-1 Classes case JOB_KNIGHT: @@ -437,6 +457,9 @@ void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) case JOB_REBELLION: mask[1] = 1ULL << MAPID_GUNSLINGER; break; + case JOB_SUMMONER: + mask[0] = 1ULL << MAPID_SUMMONER; + break; // Other Classes case JOB_GANGSI: //Bongun/Munak mask[0] = 1ULL << MAPID_GANGSI; @@ -468,7 +491,6 @@ void itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) */ void itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { - int i; nullpo_retv(bclass); bclass[0] = bclass[1] = bclass[2] = 0; //Base classes @@ -477,10 +499,18 @@ void itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) bclass[0] |= 1ULL<<MAPID_NOVICE; bclass[1] |= 1ULL<<MAPID_NOVICE; } - for (i = JOB_NOVICE+1; i <= JOB_THIEF; i++) { - if (jobmask & 1ULL<<i) - bclass[0] |= 1ULL<<(MAPID_NOVICE+i); - } + if (jobmask & 1ULL<<JOB_SWORDMAN) + bclass[0] |= 1ULL<<MAPID_SWORDMAN; + if (jobmask & 1ULL<<JOB_MAGE) + bclass[0] |= 1ULL<<MAPID_MAGE; + if (jobmask & 1ULL<<JOB_ARCHER) + bclass[0] |= 1ULL<<MAPID_ARCHER; + if (jobmask & 1ULL<<JOB_ACOLYTE) + bclass[0] |= 1ULL<<MAPID_ACOLYTE; + if (jobmask & 1ULL<<JOB_MERCHANT) + bclass[0] |= 1ULL<<MAPID_MERCHANT; + if (jobmask & 1ULL<<JOB_THIEF) + bclass[0] |= 1ULL<<MAPID_THIEF; //2-1 classes if (jobmask & 1ULL<<JOB_KNIGHT) bclass[1] |= 1ULL<<MAPID_SWORDMAN; @@ -538,6 +568,8 @@ void itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) bclass[1] |= 1ULL<<MAPID_NINJA; if (jobmask & 1ULL<<30) //Rebellion bclass[1] |= 1ULL<<MAPID_GUNSLINGER; + if (jobmask & 1ULL<<31) //Summoner + bclass[0] |= 1ULL<<MAPID_SUMMONER; } void create_dummy_data(void) @@ -1277,6 +1309,125 @@ void itemdb_read_packages(void) { ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, config_filename); } +/** + * Processes any (plugin-defined) additional fields for a itemdb_options entry. + * + * @param[in,out] entry The destination ito entry, already initialized + * (item_opt.index, status.mode are expected to be already set). + * @param[in] t The libconfig entry. + * @param[in] source Source of the entry (file name), to be displayed in + * case of validation errors. + */ +void itemdb_readdb_options_additional_fields(struct item_option *ito, struct config_setting_t *t, const char *source) +{ + // do nothing. plugins can do their own work +} + +/** + * Reads the Item Options configuration file. + */ +void itemdb_read_options(void) +{ + struct config_t item_options_db; + struct config_setting_t *ito = NULL, *conf = NULL; + int index = 0, count = 0; + const char *filepath = "db/item_options.conf"; + VECTOR_DECL(int) duplicate_id; + + if (!libconfig->load_file(&item_options_db, filepath)) + return; + +#ifdef ENABLE_CASE_CHECK + script->parser_current_file = filepath; +#endif // ENABLE_CASE_CHECK + + if ((ito=libconfig->setting_get_member(item_options_db.root, "item_options_db")) == NULL) { + ShowError("itemdb_read_options: '%s' could not be loaded.\n", filepath); + libconfig->destroy(&item_options_db); + return; + } + + VECTOR_INIT(duplicate_id); + + VECTOR_ENSURE(duplicate_id, libconfig->setting_length(ito), 1); + + while ((conf = libconfig->setting_get_elem(ito, index++))) { + struct item_option t_opt = { 0 }, *s_opt = NULL; + const char *str = NULL; + int i = 0; + + /* Id Lookup */ + if (!libconfig->setting_lookup_int16(conf, "Id", &t_opt.index) || t_opt.index <= 0) { + ShowError("itemdb_read_options: Invalid Option Id provided for entry %d in '%s', skipping...\n", t_opt.index, filepath); + continue; + } + + /* Checking for duplicate entries. */ + ARR_FIND(0, VECTOR_LENGTH(duplicate_id), i, VECTOR_INDEX(duplicate_id, i) == t_opt.index); + + if (i != VECTOR_LENGTH(duplicate_id)) { + ShowError("itemdb_read_options: Duplicate entry for Option Id %d in '%s', skipping...\n", t_opt.index, filepath); + continue; + } + + VECTOR_PUSH(duplicate_id, t_opt.index); + + /* Name Lookup */ + if (!libconfig->setting_lookup_string(conf, "Name", &str)) { + ShowError("itemdb_read_options: Invalid Option Name '%s' provided for Id %d in '%s', skipping...\n", str, t_opt.index, filepath); + continue; + } + + /* check for illegal characters in the constant. */ + { + const char *c = str; + + while (ISALNUM(*c) || *c == '_') + ++c; + + if (*c != '\0') { + ShowError("itemdb_read_options: Invalid characters in Option Name '%s' for Id %d in '%s', skipping...\n", str, t_opt.index, filepath); + continue; + } + } + + /* Set name as a script constant with index as value. */ + script->set_constant2(str, t_opt.index, false, false); + + /* Script Code Lookup */ + if (!libconfig->setting_lookup_string(conf, "Script", &str)) { + ShowError("itemdb_read_options: Script code not found for entry %s (Id: %d) in '%s', skipping...\n", str, t_opt.index, filepath); + continue; + } + + /* Set Script */ + t_opt.script = *str ? script->parse(str, filepath, t_opt.index, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL; + + /* Additional fields through plugins */ + itemdb->readdb_options_additional_fields(&t_opt, ito, filepath); + + /* Allocate memory and copy contents */ + CREATE(s_opt, struct item_option, 1); + + *s_opt = t_opt; + + /* Store ptr in the database */ + idb_put(itemdb->options, t_opt.index, s_opt); + + count++; + } + +#ifdef ENABLE_CASE_CHECK + script->parser_current_file = NULL; +#endif // ENABLE_CASE_CHECK + + libconfig->destroy(&item_options_db); + + VECTOR_CLEAR(duplicate_id); + + ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath); +} + void itemdb_read_chains(void) { struct config_t item_chain_conf; struct config_setting_t *itc = NULL; @@ -1376,7 +1527,7 @@ void itemdb_read_combos(void) char filepath[256]; FILE* fp; - snprintf(filepath, 256, "%s/%s", map->db_path, DBPATH"item_combo_db.txt"); + safesnprintf(filepath, 256, "%s/%s", map->db_path, DBPATH"item_combo_db.txt"); if ((fp = fopen(filepath, "r")) == NULL) { ShowError("itemdb_read_combos: File not found \"%s\".\n", filepath); @@ -1487,9 +1638,9 @@ int itemdb_gendercheck(struct item_data *id) return 1; if (id->nameid == WEDDING_RING_F) //Bride Ring return 0; - if (id->look == W_MUSICAL && id->type == IT_WEAPON) //Musical instruments are always male-only + if (id->subtype == W_MUSICAL && id->type == IT_WEAPON) //Musical instruments are always male-only return 1; - if (id->look == W_WHIP && id->type == IT_WEAPON) //Whips are always female-only + if (id->subtype == W_WHIP && id->type == IT_WEAPON) //Whips are always female-only return 0; return (battle_config.ignore_items_gender) ? 2 : id->sex; @@ -1535,6 +1686,30 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) { return 0; } + { + const char *c = entry->name; + while (ISALNUM(*c) || *c == '_') + ++c; + + if (*c != '\0') { + ShowWarning("itemdb_validate_entry: Invalid characters in the AegisName '%s' for item %d in '%s'. Skipping.\n", + entry->name, entry->nameid, source); + if (entry->script) { + script->free_code(entry->script); + entry->script = NULL; + } + if (entry->equip_script) { + script->free_code(entry->equip_script); + entry->equip_script = NULL; + } + if (entry->unequip_script) { + script->free_code(entry->unequip_script); + entry->unequip_script = NULL; + } + return 0; + } + } + if( entry->type < 0 || entry->type == IT_UNKNOWN || entry->type == IT_UNKNOWN2 || (entry->type > IT_DELAYCONSUME && entry->type < IT_CASH ) || entry->type >= IT_MAX ) { @@ -1613,10 +1788,14 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) { memset(&entry->stack, '\0', sizeof(entry->stack)); } - if (entry->type == IT_WEAPON && (entry->look < 0 || entry->look >= MAX_SINGLE_WEAPON_TYPE)) { - ShowWarning("itemdb_validate_entry: Invalid View for weapon items. View value %d for item %d (%s) in '%s', defaulting to 1.\n", - entry->look, entry->nameid, entry->jname, source); - entry->look = 1; + if (entry->type == IT_WEAPON && (entry->subtype <= 0 || entry->subtype >= MAX_SINGLE_WEAPON_TYPE)) { + ShowWarning("itemdb_validate_entry: Invalid View for weapon items. View value %d for item %d (%s) in '%s', defaulting to W_DAGGER.\n", + entry->subtype, entry->nameid, entry->jname, source); + entry->subtype = W_DAGGER; + } else if (entry->type == IT_AMMO && (entry->subtype <= 0 || entry->subtype >= MAX_AMMO_TYPE)) { + ShowWarning("itemdb_validate_entry: Invalid View for ammunition items. View value %d for item %d (%s) in '%s', defaulting to A_ARROW.\n", + entry->subtype, entry->nameid, entry->jname, source); + entry->subtype = A_ARROW; } entry->wlv = cap_value(entry->wlv, REFINE_TYPE_ARMOR, REFINE_TYPE_MAX); @@ -1629,6 +1808,9 @@ int itemdb_validate_entry(struct item_data *entry, int n, const char *source) { if( entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_refine ) entry->flag.no_refine = 1; + if (entry->type != IT_ARMOR && entry->type != IT_WEAPON && !entry->flag.no_options) + entry->flag.no_options = 1; + if (entry->flag.available != 1) { entry->flag.available = 1; entry->view_id = 0; @@ -1808,6 +1990,14 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * else if( !inherit ) id.type = IT_ETC; + if (itemdb->lookup_const(it, "Subtype", &i32) && i32 >= 0) { + if (id.type == IT_WEAPON || id.type == IT_AMMO) + id.subtype = i32; + else + ShowWarning("itemdb_readdb_libconfig_sub: Field 'Subtype' is only allowed for IT_WEAPON or IT_AMMO (Item #%d: %s). Ignoring.\n", + id.nameid, id.name); + } + if( itemdb->lookup_const(it, "Buy", &i32) ) id.value_buy = i32; else if( !inherit ) @@ -1847,7 +2037,7 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * itemdb->jobmask2mapid(id.class_base, UINT64_MAX); } - if( itemdb->lookup_const(it, "Upper", &i32) && i32 >= 0 ) + if (itemdb->lookup_const_mask(it, "Upper", &i32) && i32 >= 0) id.class_upper = (unsigned int)i32; else if( !inherit ) id.class_upper = ITEMUPPER_ALL; @@ -1857,7 +2047,7 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * else if( !inherit ) id.sex = 2; - if( itemdb->lookup_const(it, "Loc", &i32) && i32 >= 0 ) + if (itemdb->lookup_const_mask(it, "Loc", &i32) && i32 >= 0) id.equip = i32; if( itemdb->lookup_const(it, "WeaponLv", &i32) && i32 >= 0 ) @@ -1877,8 +2067,26 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * if( (t = libconfig->setting_get_member(it, "Refine")) ) id.flag.no_refine = libconfig->setting_get_bool(t) ? 0 : 1; - if( itemdb->lookup_const(it, "View", &i32) && i32 >= 0 ) - id.look = i32; + if ((t = libconfig->setting_get_member(it, "DisableOptions"))) + id.flag.no_options = libconfig->setting_get_bool(t) ? 1 : 0; + + if (itemdb->lookup_const(it, "ViewSprite", &i32) && i32 >= 0) + id.view_sprite = i32; + + if (itemdb->lookup_const(it, "View", &i32) && i32 >= 0) { // TODO: Remove (Deprecated - 2016-09-04 [Haru]) + if ((id.type == IT_WEAPON || id.type == IT_AMMO) && id.subtype == 0) { + ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'Subtype' (or 'ViewSprite'). (Item #%d: %s)\n", + id.nameid, id.name); + id.subtype = i32; + } else if ((id.type != IT_WEAPON && id.type != IT_AMMO) && id.view_sprite == 0) { + ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'ViewSprite' (or 'Subtype'). (Item #%d: %s)\n", + id.nameid, id.name); + id.view_sprite = i32; + } else { + ShowWarning("itemdb_readdb_libconfig_sub: The 'View' field is deprecated. Please rename it to 'Subtype' or 'ViewSprite'. (Item #%d: %s)\n", + id.nameid, id.name); + } + } if( (t = libconfig->setting_get_member(it, "BindOnEquip")) ) id.flag.bindonequip = libconfig->setting_get_bool(t) ? 1 : 0; @@ -1892,6 +2100,9 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * if ((t = libconfig->setting_get_member(it, "KeepAfterUse"))) id.flag.keepafteruse = libconfig->setting_get_bool(t) ? 1 : 0; + if ((t = libconfig->setting_get_member(it, "DropAnnounce"))) + id.flag.drop_announce = libconfig->setting_get_bool(t) ? 1 : 0; + if (itemdb->lookup_const(it, "Delay", &i32) && i32 >= 0) id.delay = i32; @@ -2013,21 +2224,76 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * bool itemdb_lookup_const(const struct config_setting_t *it, const char *name, int *value) { + const char *str = NULL; + nullpo_retr(false, name); nullpo_retr(false, value); - if (libconfig->setting_lookup_int(it, name, value)) - { + + if (libconfig->setting_lookup_int(it, name, value)) { return true; } - else - { + + if (libconfig->setting_lookup_string(it, name, &str)) { + if (*str && script->get_constant(str, value)) + return true; + } + + return false; +} + +bool itemdb_lookup_const_mask(const struct config_setting_t *it, const char *name, int *value) +{ + const struct config_setting_t *t = NULL; + + nullpo_retr(false, it); + nullpo_retr(false, name); + nullpo_retr(false, value); + + if ((t = libconfig->setting_get_member(it, name)) == NULL) { + return false; + } + + if (config_setting_is_scalar(t)) { const char *str = NULL; - if (libconfig->setting_lookup_string(it, name, &str)) - { - if (*str && script->get_constant(str, value)) + + if (config_setting_is_number(t)) { + *value = libconfig->setting_get_int(t); + return true; + } + + if ((str = libconfig->setting_get_string(t)) != NULL) { + int i32 = -1; + if (script->get_constant(str, &i32) && i32 >= 0) { + *value = i32; return true; + } + } + + return false; + } + + if (config_setting_is_aggregate(t) && libconfig->setting_length(t) >= 1) { + const struct config_setting_t *elem = NULL; + int i = 0; + + *value = 0; + + while ((elem = libconfig->setting_get_elem(t, i++)) != NULL) { + const char *str = libconfig->setting_get_string(elem); + int i32 = -1; + + if (str == NULL) + return false; + + if (!script->get_constant(str, &i32) || i32 < 0) + return false; + + *value |= i32; } + + return true; } + return false; } @@ -2047,7 +2313,7 @@ int itemdb_readdb_libconfig(const char *filename) { nullpo_ret(filename); - sprintf(filepath, "%s/%s", map->db_path, filename); + safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename); if (!libconfig->load_file(&item_db_conf, filepath)) return 0; @@ -2119,6 +2385,7 @@ void itemdb_read(bool minimal) { itemdb->read_groups(); itemdb->read_chains(); itemdb->read_packages(); + itemdb->read_options(); } @@ -2180,6 +2447,17 @@ int itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) return 0; } + +int itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap) +{ + struct item_option *ito = DB->data2ptr(data); + + if (ito->script != NULL) + script->free_code(ito->script); + + return 0; +} + void itemdb_clear(bool total) { int i; // clear the previous itemdb data @@ -2243,6 +2521,7 @@ void itemdb_clear(bool total) { return; itemdb->other->clear(itemdb->other, itemdb->final_sub); + itemdb->options->clear(itemdb->options, itemdb->options_final_sub); memset(itemdb->array, 0, sizeof(itemdb->array)); @@ -2293,16 +2572,20 @@ void itemdb_reload(void) { for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { memset(sd->item_delay, 0, sizeof(sd->item_delay)); // reset item delays pc->setinventorydata(sd); - if( battle_config.item_check ) - sd->state.itemcheck = 1; + + if (battle->bc->item_check != PCCHECKITEM_NONE) // Check and flag items for inspection. + sd->itemcheck = (enum pc_checkitem_types) battle->bc->item_check; + /* clear combo bonuses */ - if( sd->combo_count ) { + if (sd->combo_count) { aFree(sd->combos); sd->combos = NULL; sd->combo_count = 0; if( pc->load_combo(sd) > 0 ) status_calc_pc(sd,SCO_FORCE); } + + // Check for and delete unavailable/disabled items. pc->checkitem(sd); } mapit->free(iter); @@ -2327,6 +2610,7 @@ void do_final_itemdb(void) { itemdb->clear(true); itemdb->other->destroy(itemdb->other, itemdb->final_sub); + itemdb->options->destroy(itemdb->options, itemdb->options_final_sub); itemdb->destroy_item_data(&itemdb->dummy, 0); db_destroy(itemdb->names); } @@ -2334,6 +2618,7 @@ void do_final_itemdb(void) { void do_init_itemdb(bool minimal) { memset(itemdb->array, 0, sizeof(itemdb->array)); itemdb->other = idb_alloc(DB_OPT_BASE); + itemdb->options = idb_alloc(DB_OPT_RELEASE_DATA); itemdb->names = strdb_alloc(DB_OPT_BASE,ITEM_NAME_LENGTH); itemdb->create_dummy_data(); //Dummy data item. itemdb->read(minimal); @@ -2376,6 +2661,7 @@ void itemdb_defaults(void) { itemdb->read_groups = itemdb_read_groups; itemdb->read_chains = itemdb_read_chains; itemdb->read_packages = itemdb_read_packages; + itemdb->read_options = itemdb_read_options; /* */ itemdb->write_cached_packages = itemdb_write_cached_packages; itemdb->read_cached_packages = itemdb_read_cached_packages; @@ -2386,6 +2672,7 @@ void itemdb_defaults(void) { itemdb->load = itemdb_load; itemdb->search = itemdb_search; itemdb->exists = itemdb_exists; + itemdb->option_exists = itemdb_option_exists; itemdb->in_group = itemdb_in_group; itemdb->group_item = itemdb_searchrandomid; itemdb->chain_item = itemdb_chain_item; @@ -2418,6 +2705,7 @@ void itemdb_defaults(void) { itemdb->read_combos = itemdb_read_combos; itemdb->gendercheck = itemdb_gendercheck; itemdb->validate_entry = itemdb_validate_entry; + itemdb->readdb_options_additional_fields = itemdb_readdb_options_additional_fields; itemdb->readdb_additional_fields = itemdb_readdb_additional_fields; itemdb->readdb_job_sub = itemdb_readdb_job_sub; itemdb->readdb_libconfig_sub = itemdb_readdb_libconfig_sub; @@ -2426,8 +2714,10 @@ void itemdb_defaults(void) { itemdb->read = itemdb_read; itemdb->destroy_item_data = destroy_item_data; itemdb->final_sub = itemdb_final_sub; + itemdb->options_final_sub = itemdb_options_final_sub; itemdb->clear = itemdb_clear; itemdb->id2combo = itemdb_id2combo; itemdb->is_item_usable = itemdb_is_item_usable; itemdb->lookup_const = itemdb_lookup_const; + itemdb->lookup_const_mask = itemdb_lookup_const_mask; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index d33805174..d2d3b6c73 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -54,6 +54,7 @@ enum item_itemid { ITEMID_WHITE_POTION = 504, ITEMID_BLUE_POTION = 505, ITEMID_APPLE = 512, + ITEMID_CARROT = 515, ITEMID_HOLY_WATER = 523, ITEMID_PUMPKIN = 535, ITEMID_RED_SLIM_POTION = 545, @@ -64,7 +65,7 @@ enum item_itemid { ITEMID_BRANCH_OF_DEAD_TREE = 604, ITEMID_ANODYNE = 605, ITEMID_ALOEBERA = 606, - ITEMID_MAGNIFIER = 611, + ITEMID_SPECTACLES = 611, ITEMID_POISON_BOTTLE = 678, ITEMID_EMPTY_BOTTLE = 713, ITEMID_EMPERIUM = 714, @@ -92,15 +93,15 @@ enum item_itemid { ITEMID_IRON_ORE = 1002, ITEMID_PHRACON = 1010, ITEMID_EMVERETARCON = 1011, - ITEMID_TRAP = 1065, + ITEMID_BOOBY_TRAP = 1065, ITEMID_PILEBUNCKER = 1549, ITEMID_ANGRA_MANYU = 1599, ITEMID_STRANGE_EMBRYO = 6415, ITEMID_FACE_PAINT = 6120, - ITEMID_SCARLET_POINT = 6360, - ITEMID_INDIGO_POINT = 6361, - ITEMID_YELLOW_WISH_POINT = 6362, - ITEMID_LIME_GREEN_POINT = 6363, + ITEMID_SCARLET_PTS = 6360, + ITEMID_INDIGO_PTS = 6361, + ITEMID_YELLOW_WISH_PTS = 6362, + ITEMID_LIME_GREEN_PTS = 6363, ITEMID_STONE = 7049, ITEMID_FIRE_BOTTLE = 7135, ITEMID_ACID_BOTTLE = 7136, @@ -110,9 +111,8 @@ enum item_itemid { ITEMID_FRAGMENT_OF_CRYSTAL = 7321, ITEMID_SKULL_ = 7420, ITEMID_TOKEN_OF_SIEGFRIED = 7621, - ITEMID_GOLD_KEY77 = 7782, - ITEMID_SILVER_KEY77 = 7783, - ITEMID_TRAP_ALLOY = 7940, + ITEMID_SPECIAL_ALLOY_TRAP = 7940, + ITEMID_CATNIP_FRUIT = 11602, ITEMID_RED_POUCH_OF_SURPRISE = 12024, ITEMID_BLOODY_DEAD_BRANCH = 12103, ITEMID_PORING_BOX = 12109, @@ -137,14 +137,31 @@ enum item_itemid { ITEMID_MAGIC_CASTLE = 12308, ITEMID_BULGING_HEAD = 12309, ITEMID_THICK_MANUAL50 = 12312, - ITEMID_NOVICE_MAGNIFIER = 12325, - ITEMID_ANCILLA = 12333, - ITEMID_REPAIR_A = 12392, - ITEMID_REPAIR_B = 12393, - ITEMID_REPAIR_C = 12394, + ITEMID_N_MAGNIFIER = 12325, + ITEMID_ANSILA = 12333, + ITEMID_REPAIRA = 12392, + ITEMID_REPAIRB = 12393, + ITEMID_REPAIRC = 12394, ITEMID_BLACK_THING = 12435, - ITEMID_REINS_OF_MOUNT = 12622, + ITEMID_BOARDING_HALTER = 12622, ITEMID_NOBLE_NAMEPLATE = 12705, + ITEMID_POISON_PARALYSIS = 12717, + ITEMID_POISON_LEECH = 12718, + ITEMID_POISON_OBLIVION = 12719, + ITEMID_POISON_CONTAMINATION = 12720, + ITEMID_POISON_NUMB = 12721, + ITEMID_POISON_FEVER = 12722, + ITEMID_POISON_LAUGHING = 12723, + ITEMID_POISON_FATIGUE = 12724, + ITEMID_NAUTHIZ = 12725, + ITEMID_RAIDO = 12726, + ITEMID_BERKANA = 12727, + ITEMID_ISA = 12728, + ITEMID_OTHILA = 12729, + ITEMID_URUZ = 12730, + ITEMID_THURISAZ = 12731, + ITEMID_WYRD = 12732, + ITEMID_HAGALAZ = 12733, ITEMID_DUN_TELE_SCROLL1 = 14527, ITEMID_BATTLE_MANUAL25 = 14532, ITEMID_BATTLE_MANUAL100 = 14533, @@ -159,6 +176,7 @@ enum item_itemid { ITEMID_PILEBUNCKER_S = 16030, ITEMID_PILEBUNCKER_P = 16031, ITEMID_PILEBUNCKER_T = 16032, + ITEMID_LUX_ANIMA = 22540, }; enum cards_item_list { @@ -248,49 +266,6 @@ enum mercenary_scroll_item_list { }; /** - * Cash Food - */ -enum cash_food_item_list { - ITEMID_STR_DISH10_ = 12202, - ITEMID_AGI_DISH10_, // 12203 - ITEMID_INT_DISH10_, // 12204 - ITEMID_DEX_DISH10_, // 12205 - ITEMID_LUK_DISH10_, // 12206 - ITEMID_VIT_DISH10_, // 12207 -}; - -/** - * GC Poison - */ -enum poison_item_list { - ITEMID_POISON_PARALYSIS = 12717, - ITEMID_POISON_LEECH, // 12718 - ITEMID_POISON_OBLIVION, // 12719 - ITEMID_POISON_CONTAMINATION, // 12720 - ITEMID_POISON_NUMB, // 12721 - ITEMID_POISON_FEVER, // 12722 - ITEMID_POISON_LAUGHING, // 12723 - ITEMID_POISON_FATIGUE, // 12724 -}; - - -/** - * Rune Knight - **/ -enum rune_item_list { - ITEMID_NAUTHIZ = 12725, - ITEMID_RAIDO, // 12726 - ITEMID_BERKANA, // 12727 - ITEMID_ISA, // 12728 - ITEMID_OTHILA, // 12729 - ITEMID_URUZ, // 12730 - ITEMID_THURISAZ, // 12731 - ITEMID_WYRD, // 12732 - ITEMID_HAGALAZ, // 12733 - ITEMID_LUX_ANIMA = 22540, -}; - -/** * Geneticist */ enum geneticist_item_list { @@ -362,7 +337,7 @@ enum item_class_upper { ITEMUPPER_UPPER = 0x02, ITEMUPPER_BABY = 0x04, ITEMUPPER_THIRD = 0x08, - ITEMUPPER_THURDUPPER = 0x10, + ITEMUPPER_THIRDUPPER = 0x10, ITEMUPPER_THIRDBABY = 0x20, ITEMUPPER_ALL = 0x3f, // Sum of all the above }; @@ -386,7 +361,7 @@ enum ItemTradeRestrictions { }; /** - * Iten No-use restrictions + * Item No-use restrictions */ enum ItemNouseRestrictions { INR_NONE = 0x0, ///< No restrictions @@ -395,6 +370,16 @@ enum ItemNouseRestrictions { INR_ALL = 0x1 ///< Sum of all the above values }; +/** + * Item Option Types + */ +enum ItemOptionTypes { + IT_OPT_INDEX = 0, + IT_OPT_VALUE, + IT_OPT_PARAM, + IT_OPT_MAX +}; + /** Convenience item list (entry) used in various functions */ struct itemlist_entry { int id; ///< Item ID or (inventory) index @@ -460,14 +445,19 @@ struct item_package { unsigned short must_qty; }; +struct item_option { + int16 index; + struct script_code *script; +}; + struct item_data { uint16 nameid; char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH]; - //Do not add stuff between value_buy and view_id (see how getiteminfo works) int value_buy; int value_sell; int type; + int subtype; int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus] int sex; int equip; @@ -476,7 +466,7 @@ struct item_data { int def; int range; int slot; - int look; + int view_sprite; int elv; int wlv; int view_id; @@ -484,8 +474,6 @@ struct item_data { int elvmax;/* maximum level for this item */ int delay; -//Lupus: I rearranged order of these fields due to compatibility with ITEMINFO script command -// some script commands should be revised as well... uint64 class_base[3]; ///< Specifies if the base can wear this item (split in 3 indexes per type: 1-1, 2-1, 2-2) unsigned class_upper : 6; ///< Specifies if the upper-type can equip it (bitfield, 0x01: normal, 0x02: upper, 0x04: baby normal, 0x08: third normal, 0x10: third upper, 0x20: third baby) struct { @@ -505,6 +493,8 @@ struct item_data { unsigned bindonequip : 1; unsigned keepafteruse : 1; unsigned force_serial : 1; + unsigned no_options: 1; // < disallows use of item options on the item. (non-equippable items are automatically flagged) [Smokexyz] + unsigned drop_announce : 1; // Official Drop Announce [Jedzkie] } flag; struct {// item stacking limitation unsigned short amount; @@ -532,7 +522,8 @@ struct item_data { #define itemdb_type(n) (itemdb->search(n)->type) #define itemdb_atk(n) (itemdb->search(n)->atk) #define itemdb_def(n) (itemdb->search(n)->def) -#define itemdb_look(n) (itemdb->search(n)->look) +#define itemdb_subtype(n) (itemdb->search(n)->subtype) +#define itemdb_sprite(n) (itemdb->search(n)->view_sprite) #define itemdb_weight(n) (itemdb->search(n)->weight) #define itemdb_equip(n) (itemdb->search(n)->equip) #define itemdb_usescript(n) (itemdb->search(n)->script) @@ -546,13 +537,12 @@ struct item_data { #define itemdb_value_buy(n) (itemdb->search(n)->value_buy) #define itemdb_value_sell(n) (itemdb->search(n)->value_sell) #define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) +#define itemdb_allowoption(n) (!itemdb->search(n)->flag.no_options) -#define itemdb_is_rune(n) (((n) >= ITEMID_NAUTHIZ && (n) <= ITEMID_HAGALAZ) || (n) == ITEMID_LUX_ANIMA) -#define itemdb_is_element(n) ((n) >= ITEMID_SCARLET_POINT && (n) <= ITEMID_LIME_GREEN_POINT) +#define itemdb_is_element(n) ((n) >= ITEMID_SCARLET_PTS && (n) <= ITEMID_LIME_GREEN_PTS) #define itemdb_is_spellbook(n) ((n) >= ITEMID_MAGIC_BOOK_FB && (n) <= ITEMID_MAGIC_BOOK_DL) #define itemdb_is_poison(n) ((n) >= ITEMID_POISON_PARALYSIS && (n) <= ITEMID_POISON_FATIGUE) #define itemid_isgemstone(n) ((n) >= ITEMID_YELLOW_GEMSTONE && (n) <= ITEMID_BLUE_GEMSTONE) -#define itemdb_iscashfood(n) ((n) >= ITEMID_STR_DISH10_ && (n) <= ITEMID_VIT_DISH10_) #define itemdb_is_GNbomb(n) ((n) >= ITEMID_APPLE_BOMB && (n) <= ITEMID_VERY_HARD_LUMP) #define itemdb_is_GNthrowable(n) ((n) >= ITEMID_MYSTERIOUS_POWDER && (n) <= ITEMID_BLACK_THING_TO_THROW) #define itemid_is_pilebunker(n) ((n) == ITEMID_PILEBUNCKER || (n) == ITEMID_PILEBUNCKER_P || (n) == ITEMID_PILEBUNCKER_S || (n) == ITEMID_PILEBUNCKER_T) @@ -593,11 +583,13 @@ struct itemdb_interface { /* */ struct item_data *array[MAX_ITEMDB]; struct DBMap *other;// int nameid -> struct item_data* + struct DBMap *options; // int opt_id -> struct item_option* struct item_data dummy; //This is the default dummy item used for non-existant items. [Skotlex] /* */ void (*read_groups) (void); void (*read_chains) (void); void (*read_packages) (void); + void (*read_options) (void); /* */ void (*write_cached_packages) (const char *config_filename); bool (*read_cached_packages) (const char *config_filename); @@ -608,6 +600,7 @@ struct itemdb_interface { struct item_data* (*load)(int nameid); struct item_data* (*search)(int nameid); struct item_data* (*exists) (int nameid); + struct item_option* (*option_exists) (int idx); bool (*in_group) (struct item_group *group, int nameid); int (*group_item) (struct item_group *group); int (*chain_item) (unsigned short chain_id, int *rate); @@ -617,7 +610,7 @@ struct itemdb_interface { int (*searchrandomid) (struct item_group *group); const char* (*typename) (int type); void (*jobmask2mapid) (uint64 *bclass, uint64 jobmask); - void (*jobid2mapid) (uint64 *bclass, int job_id, bool enable); + void (*jobid2mapid) (uint64 *bclass, int job_class, bool enable); void (*create_dummy_data) (void); struct item_data* (*create_item_data) (int nameid); int (*isequip) (int nameid); @@ -640,6 +633,7 @@ struct itemdb_interface { void (*read_combos) (void); int (*gendercheck) (struct item_data *id); int (*validate_entry) (struct item_data *entry, int n, const char *source); + void (*readdb_options_additional_fields) (struct item_option *ito, struct config_setting_t *t, const char *source); void (*readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); void (*readdb_job_sub) (struct item_data *id, struct config_setting_t *t); int (*readdb_libconfig_sub) (struct config_setting_t *it, int n, const char *source); @@ -648,10 +642,12 @@ struct itemdb_interface { void (*read) (bool minimal); void (*destroy_item_data) (struct item_data *self, int free_self); int (*final_sub) (union DBKey key, struct DBData *data, va_list ap); + int (*options_final_sub) (union DBKey key, struct DBData *data, va_list ap); void (*clear) (bool total); struct item_combo * (*id2combo) (unsigned short id); bool (*is_item_usable) (struct item_data *item); bool (*lookup_const) (const struct config_setting_t *it, const char *name, int *value); + bool (*lookup_const_mask) (const struct config_setting_t *it, const char *name, int *value); }; #ifdef HERCULES_CORE diff --git a/src/map/log.c b/src/map/log.c index 902d428a7..6419c4766 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -161,12 +161,15 @@ void log_branch(struct map_session_data* sd) { } void log_pick_sub_sql(int id, int16 m, e_log_pick_type type, int amount, struct item* itm, struct item_data *data) { nullpo_retv(itm); - 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"')", + if (SQL_ERROR == SQL->Query(logs->mysql_handle, + LOG_QUERY " INTO `%s` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, " + "`opt_idx0`, `opt_val0`, `opt_idx1`, `opt_val1`, `opt_idx2`, `opt_val2`, `opt_idx3`, `opt_val3`, `opt_idx4`, `opt_val4`, `map`, `unique_id`) " + "VALUES (NOW(), '%d', '%c', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%"PRIu64"')", 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, itm->unique_id) - ) { + itm->option[0].index, itm->option[0].value, itm->option[1].index, itm->option[1].value, itm->option[2].index, itm->option[2].value, + itm->option[3].index, itm->option[3].value, itm->option[4].index, itm->option[4].value, + map->list[m].name, itm->unique_id)) + { Sql_ShowDebug(logs->mysql_handle); return; } diff --git a/src/map/mail.c b/src/map/mail.c index e446a10d2..d8a354cc7 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/mail.h b/src/map/mail.h index 94100e608..0391f83c4 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/map.c b/src/map/map.c index 0a60a92b4..5a647625f 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -55,6 +55,7 @@ #include "map/skill.h" #include "map/status.h" #include "map/storage.h" +#include "map/rodex.h" #include "map/trade.h" #include "map/unit.h" #include "common/HPM.h" @@ -337,6 +338,7 @@ int map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { //status_change_end(bl, SC_BLADESTOP, INVALID_TIMER); //Won't stop when you are knocked away, go figure... status_change_end(bl, SC_NJ_TATAMIGAESHI, INVALID_TIMER); status_change_end(bl, SC_MAGICROD, INVALID_TIMER); + status_change_end(bl, SC_SU_STOOP, INVALID_TIMER); if (sc && sc->data[SC_PROPERTYWALK] && sc->data[SC_PROPERTYWALK]->val3 >= skill->get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) ) status_change_end(bl,SC_PROPERTYWALK,INVALID_TIMER); @@ -445,6 +447,11 @@ int map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { struct status_change *sc = status->get_sc(bl); if (sc && (sc->option&OPTION_INVISIBLE)) continue; + if (bl->type == BL_NPC) { + const struct npc_data *nd = BL_UCCAST(BL_NPC, bl); + if (nd->class_ == FAKE_NPC || nd->class_ == HIDDEN_WARP_CLASS) + continue; + } } if (flag&0x1) { struct unit_data *ud = unit->bl2ud(bl); @@ -1833,7 +1840,7 @@ void map_addiddb(struct block_list *bl) struct mob_data *md = BL_UCAST(BL_MOB, bl); idb_put(map->mobid_db,bl->id,bl); - if( md->state.boss ) + if (md->state.boss == BTYPE_MVP) idb_put(map->bossid_db, bl->id, bl); } @@ -1914,6 +1921,7 @@ int map_quit(struct map_session_data *sd) { } npc->script_event(sd, NPCE_LOGOUT); + rodex->clean(sd, 0); //Unit_free handles clearing the player related data, //map->quit handles extra specific data which is related to quitting normally @@ -3740,7 +3748,7 @@ int map_readallmaps (void) { ShowStatus("Loading maps (using GRF files)...\n"); else { char mapcachefilepath[256]; - snprintf(mapcachefilepath, 256, "%s/%s%s", map->db_path, DBPATH, "map_cache.dat"); + safesnprintf(mapcachefilepath, 256, "%s/%s%s", map->db_path, DBPATH, "map_cache.dat"); ShowStatus("Loading maps (using %s as map cache)...\n", mapcachefilepath); if( (fp = fopen(mapcachefilepath, "rb")) == NULL ) { ShowFatalError("Unable to open map cache file "CL_WHITE"%s"CL_RESET"\n", mapcachefilepath); @@ -4138,7 +4146,7 @@ bool map_read_npclist(const char *filename, bool imported) if (!libconfig->load_file(&config, filename)) return false; - deleted_npcs = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA, MAP_NAME_LENGTH); + deleted_npcs = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA, 0); // Remove NPCs if ((setting = libconfig->lookup(&config, "npc_removed_list")) != NULL) { @@ -4395,7 +4403,7 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone nullpo_retr(NULL, main); nullpo_retr(NULL, other); - snprintf(newzone, MAP_ZONE_NAME_LENGTH, "%s+%s", main->name, other->name); + safesnprintf(newzone, MAP_ZONE_NAME_LENGTH, "%s+%s", main->name, other->name); if( (zone = strdb_get(map->zone_db, newzone)) ) return zone;/* this zone has already been merged */ @@ -6011,6 +6019,7 @@ int do_final(void) { elemental->final(); map->list_final(); vending->final(); + rodex->final(); HPM_map_do_final(); @@ -6207,6 +6216,7 @@ void map_load_defaults(void) { path_defaults(); quest_defaults(); npc_chat_defaults(); + rodex_defaults(); } /** * --run-once handler @@ -6524,6 +6534,7 @@ int do_init(int argc, char *argv[]) bg->init(minimal); duel->init(minimal); vending->init(minimal); + rodex->init(minimal); if (map->scriptcheck) { bool failed = map->extra_scripts_count > 0 ? false : true; diff --git a/src/map/map.h b/src/map/map.h index 723691971..5835b5abc 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -47,6 +47,7 @@ enum E_MAPSERVER_ST { #define MAX_NPC_PER_MAP 512 #define AREA_SIZE (battle->bc->area_size) +#define CHAT_AREA_SIZE (battle->bc->chat_area_size) #define DAMAGELOG_SIZE 30 #define LOOTITEM_SIZE 10 #define MAX_MOBSKILL 50 @@ -74,7 +75,7 @@ enum E_MAPSERVER_ST { //Super Novices are considered the 2-1 version of the novice! Novices are considered a first class type. enum { //Novice And 1-1 Jobs - MAPID_NOVICE = 0x0, + MAPID_NOVICE = 0, MAPID_SWORDMAN, MAPID_MAGE, MAPID_ARCHER, @@ -88,118 +89,250 @@ enum { MAPID_XMAS, MAPID_SUMMER, MAPID_GANGSI, + MAPID_SUMMONER, + MAPID_1_1_MAX, + //2-1 Jobs - MAPID_SUPER_NOVICE = JOBL_2_1|0x0, - MAPID_KNIGHT, - MAPID_WIZARD, - MAPID_HUNTER, - MAPID_PRIEST, - 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, + MAPID_SUPER_NOVICE = JOBL_2_1 | MAPID_NOVICE, + MAPID_KNIGHT = JOBL_2_1 | MAPID_SWORDMAN, + MAPID_WIZARD = JOBL_2_1 | MAPID_MAGE, + MAPID_HUNTER = JOBL_2_1 | MAPID_ARCHER, + MAPID_PRIEST = JOBL_2_1 | MAPID_ACOLYTE, + MAPID_BLACKSMITH = JOBL_2_1 | MAPID_MERCHANT, + MAPID_ASSASSIN = JOBL_2_1 | MAPID_THIEF, + MAPID_STAR_GLADIATOR = JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_2_1 | MAPID_WEDDING, + MAPID_REBELLION = JOBL_2_1 | MAPID_GUNSLINGER, + MAPID_KAGEROUOBORO = JOBL_2_1 | MAPID_NINJA, + // = JOBL_2_1 | MAPID_XMAS, + // = JOBL_2_1 | MAPID_SUMMER, + MAPID_DEATH_KNIGHT = JOBL_2_1 | MAPID_GANGSI, + // = JOBL_2_1 | MAPID_SUMMONER, + //2-2 Jobs - MAPID_CRUSADER = JOBL_2_2|0x1, - MAPID_SAGE, - MAPID_BARDDANCER, - MAPID_MONK, - MAPID_ALCHEMIST, - MAPID_ROGUE, - MAPID_SOUL_LINKER, - MAPID_DARK_COLLECTOR = JOBL_2_2|0x0E, + // = JOBL_2_1 | MAPID_NOVICE, + MAPID_CRUSADER = JOBL_2_2 | MAPID_SWORDMAN, + MAPID_SAGE = JOBL_2_2 | MAPID_MAGE, + MAPID_BARDDANCER = JOBL_2_2 | MAPID_ARCHER, + MAPID_MONK = JOBL_2_2 | MAPID_ACOLYTE, + MAPID_ALCHEMIST = JOBL_2_2 | MAPID_MERCHANT, + MAPID_ROGUE = JOBL_2_2 | MAPID_THIEF, + MAPID_SOUL_LINKER = JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_2_2 | MAPID_WEDDING, + // = JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_2_2 | MAPID_NINJA, + // = JOBL_2_2 | MAPID_XMAS, + // = JOBL_2_2 | MAPID_SUMMER, + MAPID_DARK_COLLECTOR = JOBL_2_2 | MAPID_GANGSI, + // = JOBL_2_2 | MAPID_SUMMONER, + //Trans Novice And Trans 1-1 Jobs - MAPID_NOVICE_HIGH = JOBL_UPPER|0x0, - MAPID_SWORDMAN_HIGH, - MAPID_MAGE_HIGH, - MAPID_ARCHER_HIGH, - MAPID_ACOLYTE_HIGH, - MAPID_MERCHANT_HIGH, - MAPID_THIEF_HIGH, + MAPID_NOVICE_HIGH = JOBL_UPPER | MAPID_NOVICE, + MAPID_SWORDMAN_HIGH = JOBL_UPPER | MAPID_SWORDMAN, + MAPID_MAGE_HIGH = JOBL_UPPER | MAPID_MAGE, + MAPID_ARCHER_HIGH = JOBL_UPPER | MAPID_ARCHER, + MAPID_ACOLYTE_HIGH = JOBL_UPPER | MAPID_ACOLYTE, + MAPID_MERCHANT_HIGH = JOBL_UPPER | MAPID_MERCHANT, + MAPID_THIEF_HIGH = JOBL_UPPER | MAPID_THIEF, + // = JOBL_UPPER | MAPID_TAEKWON, + // = JOBL_UPPER | MAPID_WEDDING, + // = JOBL_UPPER | MAPID_GUNSLINGER, + // = JOBL_UPPER | MAPID_NINJA, + // = JOBL_UPPER | MAPID_XMAS, + // = JOBL_UPPER | MAPID_SUMMER, + // = JOBL_UPPER | MAPID_GANGSI, + // = JOBL_UPPER | MAPID_SUMMONER, + //Trans 2-1 Jobs - MAPID_LORD_KNIGHT = JOBL_UPPER|JOBL_2_1|0x1, - MAPID_HIGH_WIZARD, - MAPID_SNIPER, - MAPID_HIGH_PRIEST, - MAPID_WHITESMITH, - MAPID_ASSASSIN_CROSS, + // = JOBL_UPPER | JOBL_2_1 | MAPID_NOVICE, + MAPID_LORD_KNIGHT = JOBL_UPPER | JOBL_2_1 | MAPID_SWORDMAN, + MAPID_HIGH_WIZARD = JOBL_UPPER | JOBL_2_1 | MAPID_MAGE, + MAPID_SNIPER = JOBL_UPPER | JOBL_2_1 | MAPID_ARCHER, + MAPID_HIGH_PRIEST = JOBL_UPPER | JOBL_2_1 | MAPID_ACOLYTE, + MAPID_WHITESMITH = JOBL_UPPER | JOBL_2_1 | MAPID_MERCHANT, + MAPID_ASSASSIN_CROSS = JOBL_UPPER | JOBL_2_1 | MAPID_THIEF, + // = JOBL_UPPER | JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_UPPER | JOBL_2_1 | MAPID_WEDDING, + // = JOBL_UPPER | JOBL_2_1 | MAPID_GUNSLINGER, + // = JOBL_UPPER | JOBL_2_1 | MAPID_NINJA, + // = JOBL_UPPER | JOBL_2_1 | MAPID_XMAS, + // = JOBL_UPPER | JOBL_2_1 | MAPID_SUMMER, + // = JOBL_UPPER | JOBL_2_1 | MAPID_GANGSI, + // = JOBL_UPPER | JOBL_2_1 | MAPID_SUMMONER, + //Trans 2-2 Jobs - MAPID_PALADIN = JOBL_UPPER|JOBL_2_2|0x1, - MAPID_PROFESSOR, - MAPID_CLOWNGYPSY, - MAPID_CHAMPION, - MAPID_CREATOR, - MAPID_STALKER, + // = JOBL_UPPER | JOBL_2_2 | MAPID_NOVICE, + MAPID_PALADIN = JOBL_UPPER | JOBL_2_2 | MAPID_SWORDMAN, + MAPID_PROFESSOR = JOBL_UPPER | JOBL_2_2 | MAPID_MAGE, + MAPID_CLOWNGYPSY = JOBL_UPPER | JOBL_2_2 | MAPID_ARCHER, + MAPID_CHAMPION = JOBL_UPPER | JOBL_2_2 | MAPID_ACOLYTE, + MAPID_CREATOR = JOBL_UPPER | JOBL_2_2 | MAPID_MERCHANT, + MAPID_STALKER = JOBL_UPPER | JOBL_2_2 | MAPID_THIEF, + // = JOBL_UPPER | JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_UPPER | JOBL_2_2 | MAPID_WEDDING, + // = JOBL_UPPER | JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_UPPER | JOBL_2_2 | MAPID_NINJA, + // = JOBL_UPPER | JOBL_2_2 | MAPID_XMAS, + // = JOBL_UPPER | JOBL_2_2 | MAPID_SUMMER, + // = JOBL_UPPER | JOBL_2_2 | MAPID_GANGSI, + // = JOBL_UPPER | JOBL_2_2 | MAPID_SUMMONER, + //Baby Novice And Baby 1-1 Jobs - MAPID_BABY = JOBL_BABY|0x0, - MAPID_BABY_SWORDMAN, - MAPID_BABY_MAGE, - MAPID_BABY_ARCHER, - MAPID_BABY_ACOLYTE, - MAPID_BABY_MERCHANT, - MAPID_BABY_THIEF, + MAPID_BABY = JOBL_BABY | MAPID_NOVICE, + MAPID_BABY_SWORDMAN = JOBL_BABY | MAPID_SWORDMAN, + MAPID_BABY_MAGE = JOBL_BABY | MAPID_MAGE, + MAPID_BABY_ARCHER = JOBL_BABY | MAPID_ARCHER, + MAPID_BABY_ACOLYTE = JOBL_BABY | MAPID_ACOLYTE, + MAPID_BABY_MERCHANT = JOBL_BABY | MAPID_MERCHANT, + MAPID_BABY_THIEF = JOBL_BABY | MAPID_THIEF, + // = JOBL_BABY | MAPID_TAEKWON, + // = JOBL_BABY | MAPID_WEDDING, + // = JOBL_BABY | MAPID_GUNSLINGER, + // = JOBL_BABY | MAPID_NINJA, + // = JOBL_BABY | MAPID_XMAS, + // = JOBL_BABY | MAPID_SUMMER, + // = JOBL_BABY | MAPID_GANGSI, + // = JOBL_BABY | MAPID_SUMMONER, + //Baby 2-1 Jobs - MAPID_SUPER_BABY = JOBL_BABY|JOBL_2_1|0x0, - MAPID_BABY_KNIGHT, - MAPID_BABY_WIZARD, - MAPID_BABY_HUNTER, - MAPID_BABY_PRIEST, - MAPID_BABY_BLACKSMITH, - MAPID_BABY_ASSASSIN, + MAPID_SUPER_BABY = JOBL_BABY | JOBL_2_1 | MAPID_NOVICE, + MAPID_BABY_KNIGHT = JOBL_BABY | JOBL_2_1 | MAPID_SWORDMAN, + MAPID_BABY_WIZARD = JOBL_BABY | JOBL_2_1 | MAPID_MAGE, + MAPID_BABY_HUNTER = JOBL_BABY | JOBL_2_1 | MAPID_ARCHER, + MAPID_BABY_PRIEST = JOBL_BABY | JOBL_2_1 | MAPID_ACOLYTE, + MAPID_BABY_BLACKSMITH = JOBL_BABY | JOBL_2_1 | MAPID_MERCHANT, + MAPID_BABY_ASSASSIN = JOBL_BABY | JOBL_2_1 | MAPID_THIEF, + // = JOBL_BABY | JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_BABY | JOBL_2_1 | MAPID_WEDDING, + // = JOBL_BABY | JOBL_2_1 | MAPID_GUNSLINGER, + // = JOBL_BABY | JOBL_2_1 | MAPID_NINJA, + // = JOBL_BABY | JOBL_2_1 | MAPID_XMAS, + // = JOBL_BABY | JOBL_2_1 | MAPID_SUMMER, + // = JOBL_BABY | JOBL_2_1 | MAPID_GANGSI, + // = JOBL_BABY | JOBL_2_1 | MAPID_SUMMONER, + //Baby 2-2 Jobs - MAPID_BABY_CRUSADER = JOBL_BABY|JOBL_2_2|0x1, - MAPID_BABY_SAGE, - MAPID_BABY_BARDDANCER, - MAPID_BABY_MONK, - MAPID_BABY_ALCHEMIST, - MAPID_BABY_ROGUE, + // = JOBL_BABY | JOBL_2_2 | MAPID_NOVICE, + MAPID_BABY_CRUSADER = JOBL_BABY | JOBL_2_2 | MAPID_SWORDMAN, + MAPID_BABY_SAGE = JOBL_BABY | JOBL_2_2 | MAPID_MAGE, + MAPID_BABY_BARDDANCER = JOBL_BABY | JOBL_2_2 | MAPID_ARCHER, + MAPID_BABY_MONK = JOBL_BABY | JOBL_2_2 | MAPID_ACOLYTE, + MAPID_BABY_ALCHEMIST = JOBL_BABY | JOBL_2_2 | MAPID_MERCHANT, + MAPID_BABY_ROGUE = JOBL_BABY | JOBL_2_2 | MAPID_THIEF, + // = JOBL_BABY | JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_BABY | JOBL_2_2 | MAPID_WEDDING, + // = JOBL_BABY | JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_BABY | JOBL_2_2 | MAPID_NINJA, + // = JOBL_BABY | JOBL_2_2 | MAPID_XMAS, + // = JOBL_BABY | JOBL_2_2 | MAPID_SUMMER, + // = JOBL_BABY | JOBL_2_2 | MAPID_GANGSI, + // = JOBL_BABY | JOBL_2_2 | MAPID_SUMMONER, + //3-1 Jobs - MAPID_SUPER_NOVICE_E = JOBL_THIRD|JOBL_2_1|0x0, - MAPID_RUNE_KNIGHT, - MAPID_WARLOCK, - MAPID_RANGER, - MAPID_ARCH_BISHOP, - MAPID_MECHANIC, - MAPID_GUILLOTINE_CROSS, + MAPID_SUPER_NOVICE_E = JOBL_THIRD | JOBL_2_1 | MAPID_NOVICE, + MAPID_RUNE_KNIGHT = JOBL_THIRD | JOBL_2_1 | MAPID_SWORDMAN, + MAPID_WARLOCK = JOBL_THIRD | JOBL_2_1 | MAPID_MAGE, + MAPID_RANGER = JOBL_THIRD | JOBL_2_1 | MAPID_ARCHER, + MAPID_ARCH_BISHOP = JOBL_THIRD | JOBL_2_1 | MAPID_ACOLYTE, + MAPID_MECHANIC = JOBL_THIRD | JOBL_2_1 | MAPID_MERCHANT, + MAPID_GUILLOTINE_CROSS = JOBL_THIRD | JOBL_2_1 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_2_1 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_2_1 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_2_1 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_2_1 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_2_1 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_2_1 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_2_1 | MAPID_SUMMONER, + //3-2 Jobs - MAPID_ROYAL_GUARD = JOBL_THIRD|JOBL_2_2|0x1, - MAPID_SORCERER, - MAPID_MINSTRELWANDERER, - MAPID_SURA, - MAPID_GENETIC, - MAPID_SHADOW_CHASER, + // = JOBL_THIRD | JOBL_2_2 | MAPID_NOVICE, + MAPID_ROYAL_GUARD = JOBL_THIRD | JOBL_2_2 | MAPID_SWORDMAN, + MAPID_SORCERER = JOBL_THIRD | JOBL_2_2 | MAPID_MAGE, + MAPID_MINSTRELWANDERER = JOBL_THIRD | JOBL_2_2 | MAPID_ARCHER, + MAPID_SURA = JOBL_THIRD | JOBL_2_2 | MAPID_ACOLYTE, + MAPID_GENETIC = JOBL_THIRD | JOBL_2_2 | MAPID_MERCHANT, + MAPID_SHADOW_CHASER = JOBL_THIRD | JOBL_2_2 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_2_2 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_2_2 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_2_2 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_2_2 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_2_2 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_2_2 | MAPID_SUMMONER, + //Trans 3-1 Jobs - MAPID_RUNE_KNIGHT_T = JOBL_THIRD|JOBL_UPPER|JOBL_2_1|0x1, - MAPID_WARLOCK_T, - MAPID_RANGER_T, - MAPID_ARCH_BISHOP_T, - MAPID_MECHANIC_T, - MAPID_GUILLOTINE_CROSS_T, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_NOVICE, + MAPID_RUNE_KNIGHT_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_SWORDMAN, + MAPID_WARLOCK_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_MAGE, + MAPID_RANGER_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_ARCHER, + MAPID_ARCH_BISHOP_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_ACOLYTE, + MAPID_MECHANIC_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_MERCHANT, + MAPID_GUILLOTINE_CROSS_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_1 | MAPID_SUMMONER, + //Trans 3-2 Jobs - MAPID_ROYAL_GUARD_T = JOBL_THIRD|JOBL_UPPER|JOBL_2_2|0x1, - MAPID_SORCERER_T, - MAPID_MINSTRELWANDERER_T, - MAPID_SURA_T, - MAPID_GENETIC_T, - MAPID_SHADOW_CHASER_T, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_NOVICE, + MAPID_ROYAL_GUARD_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_SWORDMAN, + MAPID_SORCERER_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_MAGE, + MAPID_MINSTRELWANDERER_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_ARCHER, + MAPID_SURA_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_ACOLYTE, + MAPID_GENETIC_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_MERCHANT, + MAPID_SHADOW_CHASER_T = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_UPPER | JOBL_2_2 | MAPID_SUMMONER, + //Baby 3-1 Jobs - MAPID_SUPER_BABY_E = JOBL_THIRD|JOBL_BABY|JOBL_2_1|0x0, - MAPID_BABY_RUNE, - MAPID_BABY_WARLOCK, - MAPID_BABY_RANGER, - MAPID_BABY_BISHOP, - MAPID_BABY_MECHANIC, - MAPID_BABY_CROSS, + MAPID_SUPER_BABY_E = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_NOVICE, + MAPID_BABY_RUNE = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_SWORDMAN, + MAPID_BABY_WARLOCK = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_MAGE, + MAPID_BABY_RANGER = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_ARCHER, + MAPID_BABY_BISHOP = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_ACOLYTE, + MAPID_BABY_MECHANIC = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_MERCHANT, + MAPID_BABY_CROSS = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_1 | MAPID_SUMMONER, + //Baby 3-2 Jobs - MAPID_BABY_GUARD = JOBL_THIRD|JOBL_BABY|JOBL_2_2|0x1, - MAPID_BABY_SORCERER, - MAPID_BABY_MINSTRELWANDERER, - MAPID_BABY_SURA, - MAPID_BABY_GENETIC, - MAPID_BABY_CHASER, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_NOVICE, + MAPID_BABY_GUARD = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_SWORDMAN, + MAPID_BABY_SORCERER = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_MAGE, + MAPID_BABY_MINSTRELWANDERER = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_ARCHER, + MAPID_BABY_SURA = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_ACOLYTE, + MAPID_BABY_GENETIC = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_MERCHANT, + MAPID_BABY_CHASER = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_THIEF, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_TAEKWON, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_WEDDING, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_GUNSLINGER, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_NINJA, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_XMAS, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_SUMMER, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_GANGSI, + // = JOBL_THIRD | JOBL_BABY | JOBL_2_2 | MAPID_SUMMONER, }; +STATIC_ASSERT(((MAPID_1_1_MAX - 1) | MAPID_BASEMASK) == MAPID_BASEMASK, "First class map IDs do not fit into MAPID_BASEMASK"); + // Max size for inputs to Graffiti, Talkie Box and Vending text prompts #define MESSAGE_SIZE (79 + 1) // String length you can write in the 'talking box' @@ -386,7 +519,7 @@ struct spawn_data { //0: Normal mob | 1: Standard summon, attacks mobs //2: Alchemist Marine Sphere | 3: Alchemist Summon Flora | 4: Summon Zanzou unsigned int dynamic : 1; ///< Whether this data is indexed by a map's dynamic mob list - unsigned int boss : 1; ///< 0: Non-boss monster | 1: Boss monster + uint8 boss; ///< 0: Non-boss monster | 1: Boss monster | 2: MVP } state; char name[NAME_LENGTH], eventname[EVENT_NAME_LENGTH]; //Name/event }; @@ -420,6 +553,7 @@ enum status_point_types { //we better clean up this enum and change it name [Hem SP_MOD_EXP=125, SP_MOD_DROP=126, SP_MOD_DEATH=127, + SP_BANKVAULT=128, // Mercenaries SP_MERCFLEE=165, SP_MERCKILLS=189, SP_MERCFAITH=190, @@ -718,6 +852,7 @@ struct map_data { unsigned noknockback : 1; unsigned notomb : 1; unsigned nocashshop : 1; + unsigned noautoloot : 1; uint32 noviewid; ///< noviewid (bitmask - @see enum equip_pos) } flag; struct point save; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 0b055bedf..f5d3fe11c 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -444,7 +444,7 @@ bool read_mercenarydb_sub(char* str[], int columns, int current) { db->lv = atoi(str[3]); mstatus = &db->status; - db->vd.class_ = db->class_; + db->vd.class = db->class_; mstatus->max_hp = atoi(str[4]); mstatus->max_sp = atoi(str[5]); diff --git a/src/map/mercenary.h b/src/map/mercenary.h index 142460e2a..0af75e8a2 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/mob.c b/src/map/mob.c index 590cbf856..208617b5d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -1354,7 +1354,7 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) { md->ud.target_to = 0; unit->set_target(&md->ud, 0); } - if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8); } @@ -1652,7 +1652,7 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { memmove(&md->lootitem[0], &md->lootitem[1], (LOOTITEM_SIZE-1)*sizeof(md->lootitem[0])); memcpy (&md->lootitem[LOOTITEM_SIZE-1], &fitem->item_data, sizeof(md->lootitem[0])); } - if (pc->db_checkid(md->vd->class_)) { + if (pc->db_checkid(md->vd->class)) { //Give them walk act/delay to properly mimic players. [Skotlex] clif->takeitem(&md->bl,tbl); md->ud.canact_tick = tick + md->status.amotion; @@ -1904,6 +1904,7 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite if( sd && (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) + && (!map->list[sd->bl.m].flag.noautoloot) && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(sockt->last_tick, sd->idletime) < battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag) #ifdef AUTOLOOT_DISTANCE @@ -2151,6 +2152,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { struct map_session_data *sd = BL_CAST(BL_PC, src); struct map_session_data *tmpsd[DAMAGELOG_SIZE] = { NULL }; struct map_session_data *mvp_sd = sd, *second_sd = NULL, *third_sd = NULL; + struct item_data *id = NULL; struct { struct party_data *p; @@ -2439,23 +2441,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { ditem = mob->setdropitem(md->db->dropitem[i].nameid, 1, it); - //A Rare Drop Global Announce by Lupus - if( mvp_sd && drop_rate <= battle_config.rare_drop_announce ) { - char message[128]; - sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, it->jname, (float)drop_rate/100); - //MSG: "'%s' won %s's %s (chance: %0.02f%%)" - intif->broadcast(message, (int)strlen(message)+1, BC_DEFAULT); + // Official Drop Announce [Jedzkie] + if (mvp_sd != NULL) { + if ((id = itemdb->search(it->nameid)) != NULL && id->flag.drop_announce) { + clif->item_drop_announce(mvp_sd, it->nameid, md->name); + } } - /* heres the thing we got the feature set up however we're still discussing how to best define the ids, - * so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it, - * thus why we're unsure on how to best place the setting) */ - /* temp, will not be hardcoded for long thudu. */ - // TODO: This should be a field in the item db. - if (mvp_sd != NULL - && (it->nameid == ITEMID_GOLD_KEY77 || it->nameid == ITEMID_SILVER_KEY77)) /* for when not hardcoded: add a check on mvp bonus drop as well */ - clif->item_drop_announce(mvp_sd, it->nameid, md->name); - // Announce first, or else ditem will be freed. [Lance] // By popular demand, use base drop rate for autoloot code. [Skotlex] mob->item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly); @@ -2592,14 +2584,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { clif->mvp_item(mvp_sd, item.nameid); log_mvp[0] = item.nameid; - //A Rare MVP Drop Global Announce by Lupus - if (rate <= battle_config.rare_drop_announce) { - char message[128]; - sprintf(message, msg_txt(541), mvp_sd->status.name, md->name, data->jname, rate/100.); - //MSG: "'%s' won %s's %s (chance: %0.02f%%)" - intif->broadcast(message, (int)strlen(message)+1, BC_DEFAULT); - } - if((temp = pc->additem(mvp_sd,&item,1,LOG_TYPE_PICKDROP_PLAYER)) != 0) { clif->additem(mvp_sd,0,0,temp); map->addflooritem(&md->bl, &item, 1, mvp_sd->bl.m, mvp_sd->bl.x, mvp_sd->bl.y, mvp_sd->status.char_id, (second_sd?second_sd->status.char_id : 0), (third_sd ? third_sd->status.char_id : 0), 1); @@ -2635,7 +2619,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( sd ) { if( sd->mission_mobid == md->class_) { //TK_MISSION [Skotlex] if (++sd->mission_count >= 100 && (temp = mob->get_random_id(0, 0xE, sd->status.base_level)) != 0) { - pc->addfame(sd, 1); + pc->addfame(sd, RANKTYPE_TAEKWON, 1); sd->mission_mobid = temp; pc_setglobalreg(sd,script->add_str("TK_MISSION_ID"), temp); sd->mission_count = 0; @@ -2684,7 +2668,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { if( !rebirth ) { - if( pc->db_checkid(md->vd->class_) ) {//Player mobs are not removed automatically by the client. + if (pc->db_checkid(md->vd->class)) { + // Player mobs are not removed automatically by the client. /* first we set them dead, then we delay the out sight effect */ clif->clearunit_area(&md->bl,CLR_DEAD); clif->clearunit_delayed(&md->bl, CLR_OUTSIGHT,tick+3000); @@ -2701,7 +2686,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 && map->list[md->bl.m].flag.notomb != 1) + if (battle_config.mvp_tomb_enabled && md->spawn->state.boss == BTYPE_MVP && map->list[md->bl.m].flag.notomb != 1) mob->mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); if( !rebirth ) { @@ -2831,7 +2816,7 @@ int mob_class_change (struct mob_data *md, int class_) { mob_stop_walking(md, STOPWALKING_FLAG_NONE); unit->skillcastcancel(&md->bl, 0); status->set_viewdata(&md->bl, class_); - clif->class_change(&md->bl, md->vd->class_, 1); + clif->class_change(&md->bl, md->vd->class, 1, NULL); status_calc_mob(md, SCO_FIRST); md->ud.state.speed_changed = 1; //Speed change update. @@ -3366,7 +3351,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { char name[NAME_LENGTH]; snprintf(name, sizeof name,"%s", md->name); strtok(name, "#"); // discard extra name identifier if present [Daegaladh] - snprintf(temp, sizeof temp,"%s : %s", name, mc->msg); + safesnprintf(temp, sizeof temp,"%s : %s", name, mc->msg); clif->messagecolor(&md->bl, mc->color, temp); } if(!(battle_config.mob_ai&0x200)) { //pass on delay to same skill. @@ -3491,8 +3476,8 @@ 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 = pc->skill_tree[pc->class2idx(sd->status.class_)][j].idx; - int skill_id = pc->skill_tree[pc->class2idx(sd->status.class_)][j].id; + int idx = pc->skill_tree[pc->class2idx(sd->status.class)][j].idx; + int skill_id = pc->skill_tree[pc->class2idx(sd->status.class)][j].id; if (!skill_id || sd->status.skill[idx].lv < 1 || (skill->dbs->db[idx].inf2&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) ) @@ -4209,7 +4194,7 @@ int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *source) return 0; } md.mob_id = i32; - md.vd.class_ = md.mob_id; + md.vd.class = md.mob_id; if ((t = libconfig->setting_get_member(mobt, "Inherit")) && (inherit = libconfig->setting_get_bool(t))) { if (!mob->db_data[md.mob_id]) { @@ -4510,7 +4495,7 @@ int mob_read_libconfig(const char *filename, bool ignore_missing) int i = 0, count = 0; nullpo_ret(filename); - sprintf(filepath, "%s/%s", map->db_path, filename); + safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename); if (ignore_missing && !exists(filepath)) return 0; @@ -4563,7 +4548,7 @@ void mob_name_constants(void) { *------------------------------------------*/ bool mob_readdb_mobavail(char* str[], int columns, int current) { - int class_, k; + int class_, view_class; nullpo_retr(false, str); class_=atoi(str[0]); @@ -4574,13 +4559,13 @@ bool mob_readdb_mobavail(char* str[], int columns, int current) return false; } - k=atoi(str[1]); + view_class = atoi(str[1]); memset(&mob->db_data[class_]->vd, 0, sizeof(struct view_data)); - mob->db_data[class_]->vd.class_=k; + mob->db_data[class_]->vd.class = view_class; //Player sprites - if(pc->db_checkid(k) && columns==12) { + if (pc->db_checkid(view_class) && columns == 12) { mob->db_data[class_]->vd.sex=atoi(str[2]); mob->db_data[class_]->vd.hair_style=atoi(str[3]); mob->db_data[class_]->vd.hair_color=atoi(str[4]); @@ -4736,7 +4721,7 @@ void mob_readchatdb(void) { char line[1024], filepath[256]; int i, tmp=0; FILE *fp; - sprintf(filepath, "%s/%s", map->db_path, arc); + safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, arc); fp=fopen(filepath, "r"); if(fp == NULL) { ShowWarning("mob_readchatdb: File not found \"%s\", skipping.\n", filepath); @@ -5062,7 +5047,7 @@ void mob_readskilldb(void) { for( fi = 0; fi < ARRAYLENGTH(filename); ++fi ) { if(fi > 0) { char filepath[256]; - snprintf(filepath, 256, "%s/%s", map->db_path, filename[fi]); + safesnprintf(filepath, 256, "%s/%s", map->db_path, filename[fi]); if(!exists(filepath)) { continue; } diff --git a/src/map/mob.h b/src/map/mob.h index 60bc4b869..83e022899 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -69,6 +69,12 @@ struct hplugin_data_store; // Disable this to make monsters not do any path search when looking for a target (old behavior). #define ACTIVEPATHSEARCH +enum e_bosstype { + BTYPE_NONE = 0, + BTYPE_BOSS = 1, + BTYPE_MVP = 2, +}; + //Mob skill states. enum MobSkillState { MSS_ANY = -1, @@ -181,10 +187,10 @@ struct mob_data { unsigned int spotted: 1; unsigned int npc_killmonster: 1; //for new killmonster behavior unsigned int rebirth: 1; // NPC_Rebirth used - unsigned int boss : 1; enum MobSkillState skillstate; unsigned char steal_flag; //number of steal tries (to prevent steal exploit on mobs with few items) [Lupus] unsigned char attacked_count; //For rude attacked. + uint8 boss; int provoke_flag; // Celest } state; struct guardian_data* guardian_data; diff --git a/src/map/npc.c b/src/map/npc.c index 9791b66a5..0702b2525 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -114,6 +114,8 @@ bool npc_db_checkid(int id) return true; if (id >= MAX_NPC_CLASS2_START && id < MAX_NPC_CLASS2_END) // Second range return true; + if (pc->db_checkid(id)) + return true; // Anything else is invalid return false; } @@ -2089,6 +2091,8 @@ int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, st { char npc_ev[EVENT_NAME_LENGTH]; char card_slot[NAME_LENGTH]; + char opt_index_str[NAME_LENGTH]; + char opt_value_str[NAME_LENGTH]; int i, j; int key_nameid = 0; int key_amount = 0; @@ -2096,6 +2100,8 @@ int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, st int key_attribute = 0; int key_identify = 0; int key_card[MAX_SLOTS]; + int key_opt_idx[MAX_ITEM_OPTIONS]; + int key_opt_value[MAX_ITEM_OPTIONS]; nullpo_ret(sd); nullpo_ret(item_list); @@ -2115,6 +2121,17 @@ int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, st script->cleararray_pc(sd, card_slot, (void*)0); } + for (j = 0; j < MAX_ITEM_OPTIONS; j++) { // Clear Each item option entry + key_opt_idx[j] = 0; + key_opt_value[j] = 0; + + snprintf(opt_index_str, sizeof(opt_index_str), "@slot_opt_idx%d", j + 1); + script->cleararray_pc(sd, opt_index_str, (void*)0); + + snprintf(opt_value_str, sizeof(opt_value_str), "@slot_opt_val%d", j + 1); + script->cleararray_pc(sd, opt_value_str, (void*)0); + } + // save list of to be sold items for (i = 0; i < VECTOR_LENGTH(*item_list); i++) { struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); @@ -2140,6 +2157,17 @@ int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, st script->setarray_pc(sd, card_slot, i, (void*)card, &key_card[j]); } + for (j = 0; j < MAX_ITEM_OPTIONS; j++) { + intptr_t opt_idx = item->option[j].index; + intptr_t opt_value = item->option[j].value; + + snprintf(opt_index_str, sizeof(opt_index_str), "@slot_opt_idx%d", j + 1); + script->setarray_pc(sd, opt_index_str, i, (void*)opt_idx, &key_opt_idx[j]); + + snprintf(opt_value_str, sizeof(opt_value_str), "@slot_opt_val%d", j + 1); + script->setarray_pc(sd, opt_value_str, i, (void*)opt_value, &key_opt_value[j]); + } + } // invoke event @@ -2591,7 +2619,7 @@ void npc_parsename(struct npc_data* nd, const char* name, const char* start, con do { ++i; - snprintf(newname, ARRAYLENGTH(newname), "%d_%d_%d_%d", i, nd->bl.m, nd->bl.x, nd->bl.y); + safesnprintf(newname, ARRAYLENGTH(newname), "%d_%d_%d_%d", i, nd->bl.m, nd->bl.x, nd->bl.y); } while( npc->name2id(newname) != NULL ); strcpy(this_mapname, (nd->bl.m == -1 ? "(not on a map)" : mapindex_id2name(map_id2index(nd->bl.m)))); @@ -2680,6 +2708,7 @@ struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, u nd->area_size = AREA_SIZE + 1; nd->class_ = class_; nd->speed = 200; + nd->vd.class = 0; return nd; } @@ -2698,10 +2727,10 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short flag = 1; if (flag == 1) - snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp_%d_%d_%d", from_mapid, from_x, from_y); + safesnprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp_%d_%d_%d", from_mapid, from_x, from_y); for( i = 0; npc->name2id(nd->exname) != NULL; ++i ) - snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp%d_%d_%d_%d", i, from_mapid, from_x, from_y); + safesnprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp%d_%d_%d_%d", i, from_mapid, from_x, from_y); safestrncpy(nd->name, nd->exname, ARRAYLENGTH(nd->name)); nd->u.warp.mapindex = to_mapindex; @@ -3630,6 +3659,18 @@ void npc_setclass(struct npc_data* nd, short class_) { clif->spawn(&nd->bl);// fade in } +void npc_refresh(struct npc_data* nd) +{ + nullpo_retv(nd); + + if (map->list[nd->bl.m].users) { + // using here CLR_TRICKDEAD because other flags show effects. + // probably need use other flag or other way to refresh npc. + clif->clearunit_area(&nd->bl, CLR_TRICKDEAD); // fade out + clif->spawn(&nd->bl); // fade in + } +} + // @commands (script based) int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname) { @@ -3817,7 +3858,12 @@ const char *npc_parse_mob(const char *w1, const char *w2, const char *w3, const memset(&mobspawn, 0, sizeof(struct spawn_data)); - mobspawn.state.boss = (strcmp(w2,"boss_monster") == 0 ? 1 : 0); + if (strcmp(w2, "boss_monster") == 0) + mobspawn.state.boss = BTYPE_MVP; + else if (strcmp(w2, "miniboss_monster") == 0) + mobspawn.state.boss = BTYPE_BOSS; + else + mobspawn.state.boss = BTYPE_NONE; // w1=<map name>,<x>,<y>,<xs>,<ys> // w3=<mob name>{,<mob level>} @@ -4274,6 +4320,8 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co map->list[m].flag.reset=state; else if (!strcmpi(w3,"notomb")) map->list[m].flag.notomb=state; + else if (!strcmpi(w3, "noautoloot")) + map->list[m].flag.noautoloot = state; else if (!strcmpi(w3,"adjust_unit_duration")) { int skill_id, k; char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; @@ -4634,7 +4682,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) { { p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath, (runOnInit?NPO_ONINIT:NPO_NONE), &success); } - else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) ) + else if (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0 || strcmp(w2,"miniboss_monster") == 0) { p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath, &success); } @@ -4961,12 +5009,11 @@ int do_init_npc(bool minimal) { //Stock view data for normal npcs. memset(&npc_viewdb, 0, sizeof(npc_viewdb)); - npc_viewdb[0].class_ = INVISIBLE_CLASS; //Invisible class is stored here. + npc_viewdb[0].class = INVISIBLE_CLASS; //Invisible class is stored here. for( i = 1; i < MAX_NPC_CLASS; i++ ) - npc_viewdb[i].class_ = i; + npc_viewdb[i].class = i; for( i = MAX_NPC_CLASS2_START; i < MAX_NPC_CLASS2_END; i++ ) - npc_viewdb2[i - MAX_NPC_CLASS2_START].class_ = i; - + npc_viewdb2[i - MAX_NPC_CLASS2_START].class = i; npc->ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, EVENT_NAME_LENGTH); npc->ev_label_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, NAME_LENGTH); npc->name_db = strdb_alloc(DB_OPT_BASE, NAME_LENGTH); @@ -5161,4 +5208,5 @@ void npc_defaults(void) { npc->market_delfromsql = npc_market_delfromsql; npc->market_delfromsql_sub = npc_market_delfromsql_sub; npc->db_checkid = npc_db_checkid; + npc->refresh = npc_refresh; } diff --git a/src/map/npc.h b/src/map/npc.h index 24ea9ea59..8bb38f252 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -70,7 +70,7 @@ struct npc_parse; struct npc_data { struct block_list bl; struct unit_data *ud; - struct view_data *vd; + struct view_data vd; unsigned int option; struct npc_data *master_nd; short class_; @@ -125,7 +125,6 @@ struct npc_data { struct hplugin_data_store *hdata; ///< HPM Plugin Data Store }; - #define START_NPC_NUM 110000000 enum actor_classes { @@ -142,7 +141,7 @@ enum actor_classes { #define MAX_NPC_CLASS 1000 // New NPC range #define MAX_NPC_CLASS2_START 10001 -#define MAX_NPC_CLASS2_END 10203 +#define MAX_NPC_CLASS2_END 10248 //Script NPC events. enum npce_event { @@ -310,6 +309,7 @@ struct npc_interface { void (*market_delfromsql) (struct npc_data *nd, unsigned short index); void (*market_delfromsql_sub) (const char *npcname, unsigned short index); bool (*db_checkid) (const int id); + void (*refresh) (struct npc_data* nd); /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index 7eb317e49..b8caa5df3 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/packets.h b/src/map/packets.h index 8b0a733c7..3fcf1648a 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -//Included directly by clif.h in packet_loaddb() +//Included directly by clif.c in packet_loaddb() #ifndef MAP_PACKETS_H #define MAP_PACKETS_H @@ -27,10 +27,6 @@ #define packet(a,b,...) #endif -#ifndef packetKeys - #define packetKeys(a,b,c) -#endif - /* * packet syntax * - packet(packet_id,length) @@ -1868,15 +1864,111 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0859,-1); #endif +// 2010-12-21aRagexe +#if PACKETVER >= 20101221 +// shuffle packets not added +// new packets + packet(0x08b1,-1); // ZC_MCSTORE_NOTMOVEITEM_LIST +#endif + +// 2011-01-11aRagexe +#if PACKETVER >= 20110111 +// shuffle packets not added +// new packets + packet(0x08b3,-1); // ZC_SHOWSCRIPT +#endif + +// 2011-01-25aRagexe +#if PACKETVER >= 20110125 +// shuffle packets not added +// new packets + packet(0x08b4,2); // ZC_START_COLLECTION + packet(0x08b5,6,clif->pDull,2); // CZ_TRYCOLLECTION + packet(0x08b6,3); // ZC_TRYCOLLECTION +#endif + +// 2011-01-31aRagexe +#if PACKETVER >= 20110131 +// shuffle packets not added +// new packets + packet(0x02f3,-1,clif->pDull); // CZ_IRMAIL_SEND + packet(0x02f4,3); // ZC_IRMAIL_SEND_RES + packet(0x02f5,7); // ZC_IRMAIL_NOTIFY + packet(0x02f6,7,clif->pDull,2); // CZ_IRMAIL_LIST +#endif + +// 2011-02-22aRagexe +#if PACKETVER >= 20110222 +// shuffle packets not added +// new packets + packet(0x08c0,-1); // ZC_ACK_SE_CASH_ITEM_LIST2 + packet(0x08c1,2,clif->pDull); // CZ_MACRO_START + packet(0x08c2,2,clif->pDull); // CZ_MACRO_STOP +#endif + +// 2011-04-19aRagexe +#if PACKETVER >= 20110419 +// shuffle packets not added +// new packets + packet(0x08c7,-1); // ZC_SKILL_ENTRY3 +#endif + +// 2011-06-14aRagexe +#if PACKETVER >= 20110614 +// shuffle packets not added +// new packets + packet(0x08c8,34); // ZC_NOTIFY_ACT3 + packet(0x08c9,2,clif->pCashShopSchedule,0); + packet(0x08ca,-1); // ZC_ACK_SCHEDULER_CASHITEM +#endif + +// 2011-06-27aRagexe +#if PACKETVER >= 20110627 +// shuffle packets not added +// new packets + packet(0x08cb,-1); // ZC_PERSONAL_INFOMATION +#endif + //2011-07-18aRagexe (Thanks to Yommy!) #if PACKETVER >= 20110718 +// shuffle packets not added packet(0x0844,2,clif->pCashShopOpen,2);/* tell server cashshop window is being open */ packet(0x084a,2,clif->pCashShopClose,2);/* tell server cashshop window is being closed */ packet(0x0846,4,clif->pCashShopReqTab,2); - packet(0x08c9,2,clif->pCashShopSchedule,0); packet(0x0848,-1,clif->pCashShopBuy,2); #endif +// 2011-08-02aRagexe +#if PACKETVER >= 20110802 +// shuffle packets not added +// new packets + packet(0x09dc,2); // unknown +#endif + +// 2011-08-09aRagexe +#if PACKETVER >= 20110809 +// shuffle packets not added +// new packets + packet(0x08cf,10); // ZC_SPIRITS_ATTRIBUTE + packet(0x08d0,9); // ZC_REQ_WEAR_EQUIP_ACK2 + packet(0x08d1,7); // ZC_REQ_TAKEOFF_EQUIP_ACK2 + packet(0x08d2,10); // ZC_FASTMOVE +#endif + +// 2011-08-16aRagexe +#if PACKETVER >= 20110816 +// shuffle packets not added +// new packets + packet(0x08d3,10); // ZC_SE_CASHSHOP_UPDATE +#endif + +// 2011-09-28aRagexe +#if PACKETVER >= 20110928 +// shuffle packets not added +// new packets + packet(0x08d6,6); // ZC_CLEAR_DIALOG +#endif + //2011-10-05aRagexeRE #if PACKETVER >= 20111005 packet(0x0364,5,clif->pWalkToXY,2); @@ -1891,7 +1983,6 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x088a,6,clif->pGetCharNameRequest,2); packet(0x0838,6,clif->pSolveCharName,2); packet(0x0439,8,clif->pUseItem,2,4); - packet(0x08d2,10); packet(0x08d7,28,clif->pBGQueueRegister,2); packet(0x090a,26,clif->pBGQueueCheckState,2); packet(0x08da,26,clif->pBGQueueRevokeReq,2); @@ -1954,6 +2045,8 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); packet(0x0439,8,clif->pUseItem,2,4); +// changed packet sizes + packet(0x08e2,27); // ZC_NAVIGATION_ACTIVE #endif //2012-04-10aRagexeRE @@ -2021,7 +2114,6 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x08FB,6,clif->pDull,2); //bookingcanceljoinparty packet(0x0907,5,clif->pMoveItem,2,4); packet(0x0908,5); - packet(0x08CF,10);//Amulet spirits packet(0x0977,14);//Monster HP Bar #endif @@ -2042,18 +2134,28 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x096A,6,clif->pGetCharNameRequest,2); packet(0x0368,6,clif->pSolveCharName,2); packet(0x08E5,41,clif->pPartyRecruitRegisterReq,2,4); - packet(0x08d2,10); packet(0x0916,26,clif->pGuildInvite2,2); #endif +// 2012-05-02aRagexeRE +#if PACKETVER >= 20120502 +// shuffle packets not added + packet(0x097d,288); // ZC_ACK_RANKING + packet(0x097e,12); // ZC_UPDATE_RANKING_POINT + packet(0x097f,-1); // ZC_SELECTCART + packet(0x0980,7,clif->pSelectCart); // CZ_SELECTCART +#endif + #ifndef PACKETVER_RE #if PACKETVER >= 20120604 +// shuffle packets not added packet(0x0861,18,clif->pPartyRecruitRegisterReq,2,4,6); #endif #endif //2012-06-18aRagexeRE #if PACKETVER >= 20120618 +// shuffle packets not added packet(0x0983,29); #endif @@ -2112,6 +2214,46 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); packet(0x096A,6,clif->pGetCharNameRequest,2); packet(0x0368,6,clif->pSolveCharName,2); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK +#endif + +// 2012-09-25aRagexe +#if PACKETVER >= 20120925 +// new packets (not all) + packet(0x0998,8,clif->pEquipItem,2,4); +#endif + +// 2013-02-06aRagexe +#if PACKETVER >= 20130206 +// new packets + packet(0x09a4,18); // ZC_DISPATCH_TIMING_INFO_CHN +// changed packet sizes +#endif + +// 2013-03-06aRagexe +#if PACKETVER >= 20130306 +// new packets + packet(0x09a6,12); // ZC_BANKING_CHECK + packet(0x09a7,14,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_DEPOSIT + packet(0x09a8,4); // ZC_ACK_BANKING_DEPOSIT + packet(0x09a9,14,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_WITHDRAW + packet(0x09aa,4); // ZC_ACK_BANKING_WITHDRAW +// changed packet sizes +#endif + +// 2013-03-13aRagexe +#if PACKETVER >= 20130313 +// new packets + packet(0x09ab,-1,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_CHECK + packet(0x09ac,20,clif->pDull/*,XXX*/); // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ad,6); // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ae,-1,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM + packet(0x09af,-1); // ZC_ACK_APPLY_BARGAIN_SALE_ITEM + packet(0x09b0,8,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b1,6); // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b2,-1); // ZC_NOTIFY_BARGAIN_SALE_SELLING +// changed packet sizes #endif //2013-03-20Ragexe (Judas + Yommy) @@ -2142,23 +2284,46 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x086D,26,clif->pPartyInvite2,2); - //packet(0x0890,4); // unknown usage packet(0x086F,26,clif->pFriendsListAdd,2); packet(0x093F,5,clif->pHomMenu,2,4); packet(0x0947,36,clif->pStoragePassword,0); + packet(0x0890,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x095a,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD // Shuffle End - // New Packets - packet(0x0998,8,clif->pEquipItem,2,4); + // New Packets (wrong version or packet not exists) packet(0x0447,2); // PACKET_CZ_BLOCKING_PLAY_CANCEL packet(0x099f,24); // New Packets End #endif +#if PACKETVER >= 20130320 +// new packets +// changed packet sizes + packet(0x09a7,10,clif->pBankDeposit,2,4,6); // CZ_REQ_BANKING_DEPOSIT + packet(0x09a8,12); // ZC_ACK_BANKING_DEPOSIT + packet(0x09a9,10,clif->pBankWithdraw,2,4,6); // CZ_REQ_BANKING_WITHDRAW + packet(0x09aa,12); // ZC_ACK_BANKING_WITHDRAW + packet(0x09ab,6,clif->pBankCheck,2,4); // CZ_REQ_BANKING_CHECK +#endif + +// 2013-03-27bRagexe +#if PACKETVER >= 20130327 +// new packets + packet(0x09ac,-1,clif->pDull/*,XXX*/); // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ad,10); // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ae,17,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM + packet(0x09af,4); // ZC_ACK_APPLY_BARGAIN_SALE_ITEM + packet(0x09b0,8,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b1,4); // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b2,6); // ZC_NOTIFY_BARGAIN_SALE_SELLING + packet(0x09b3,6); // ZC_NOTIFY_BARGAIN_SALE_CLOSE +// changed packet sizes +#endif + //2013-05-15aRagexe (Shakto) #if PACKETVER >= 20130515 // Shuffle Start @@ -2187,14 +2352,14 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x0947,26,clif->pPartyInvite2,2); - //packet(0x0862,4); // CZ_GANGSI_RANK packet(0x0962,26,clif->pFriendsListAdd,2); packet(0x0931,5,clif->pHomMenu,2,4); packet(0x093E,36,clif->pStoragePassword,0); + packet(0x0862,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x08aa,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD // Shuffle End #endif @@ -2226,14 +2391,14 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x0950,26,clif->pPartyInvite2,2); - //packet(0x08AC,4); // CZ_GANGSI_RANK packet(0x0362,26,clif->pFriendsListAdd,2); packet(0x0926,5,clif->pHomMenu,2,4); packet(0x088E,36,clif->pStoragePassword,0); + packet(0x08ac,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x0965,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD // Shuffle End #endif @@ -2264,14 +2429,14 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x08A8,26,clif->pPartyInvite2,2); - // packet(0x0888,4); // CZ_GANGSI_RANK packet(0x0877,26,clif->pFriendsListAdd,2); packet(0x023B,5,clif->pHomMenu,2,4); packet(0x0956,36,clif->pStoragePassword,0); + packet(0x0888,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x088e,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD #endif //2013-06-05Ragexe (Shakto) @@ -2301,19 +2466,20 @@ packet(0x96e,-1,clif->ackmergeitems); #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(0x0883,36,clif->pStoragePassword,0); packet(0x097C,4,clif->pRanklist); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK #endif //2013-06-12Ragexe (Shakto) #if PACKETVER >= 20130612 +// most shuffle packets used from 20130605 packet(0x087E,5,clif->pChangeDir,2,4); packet(0x0919,19,clif->pWantToConnection,2,6,10,14,18); packet(0x0940,26,clif->pFriendsListAdd,2); @@ -2348,14 +2514,14 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x0887,26,clif->pPartyInvite2,2); - // packet(0x0878,4); // CZ_GANGSI_RANK packet(0x0953,26,clif->pFriendsListAdd,2); packet(0x02C4,5,clif->pHomMenu,2,4); packet(0x0864,36,clif->pStoragePassword,0); + packet(0x0878,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x087a,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD #endif //2013-06-26Ragexe (Shakto) @@ -2385,14 +2551,14 @@ packet(0x96e,-1,clif->ackmergeitems); #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); packet(0x0895,26,clif->pPartyInvite2,2); - // packet(0x088F,4); // CZ_GANGSI_RANK packet(0x08AB,26,clif->pFriendsListAdd,2); packet(0x0960,5,clif->pHomMenu,2,4); packet(0x0930,36,clif->pStoragePassword,0); + packet(0x0860,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x088f,4,clif->pDull); // CZ_GANGSI_RANK #endif //2013-07-03Ragexe (Shakto) @@ -2410,29 +2576,84 @@ packet(0x96e,-1,clif->ackmergeitems); #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(0x0360,26,clif->pFriendsListAdd,2); packet(0x094A,5,clif->pHomMenu,2,4); packet(0x0873,36,clif->pStoragePassword,0); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK +#endif + +// 2013-04-17aRagexe +#if PACKETVER >= 20130417 +// new packets + packet(0x09b4,6,clif->pDull/*,XXX*/); // CZ_OPEN_BARGAIN_SALE_TOOL + packet(0x09b5,2); // ZC_OPEN_BARGAIN_SALE_TOOL + packet(0x09b6,6,clif->pBankOpen,2,4); // CZ_REQ_OPEN_BANKING + packet(0x09b7,4); // ZC_ACK_OPEN_BANKING + packet(0x09b8,6,clif->pBankClose,2,4); // CZ_REQ_CLOSE_BANKING + packet(0x09b9,4); // ZC_ACK_CLOSE_BANKING +// changed packet sizes +#endif + +// 2013-04-24aRagexe +#if PACKETVER >= 20130424 +// new packets + packet(0x09ba,6,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_GUILD_STORAGE + packet(0x09bb,4); // ZC_ACK_OPEN_GUILD_STORAGE + packet(0x09bc,6,clif->pDull/*,XXX*/); // CZ_CLOSE_BARGAIN_SALE_TOOL + packet(0x09bd,2); // ZC_CLOSE_BARGAIN_SALE_TOOL +// changed packet sizes +#endif + +// 2013-05-02aRagexe +#if PACKETVER >= 20130502 +// new packets + packet(0x09be,6,clif->pDull/*,XXX*/); // CZ_REQ_CLOSE_GUILD_STORAGE + packet(0x09bf,4); // ZC_ACK_CLOSE_GUILD_STORAGE +// changed packet sizes + packet(0x09bb,6); // ZC_ACK_OPEN_GUILD_STORAGE +#endif + +// 2013-05-15aRagexe +#if PACKETVER >= 20130515 +// new packets + packet(0x09c0,11); // ZC_ACTION_MOVE + packet(0x09c1,11); // ZC_C_MARKERINFO +// changed packet sizes + packet(0x09a8,16); // ZC_ACK_BANKING_DEPOSIT + packet(0x09aa,16); // ZC_ACK_BANKING_WITHDRAW +#endif + +// 2013-05-29Ragexe +#if PACKETVER >= 20130529 +// new packets + packet(0x09c3,8,clif->pDull/*,XXX*/); // CZ_REQ_COUNT_BARGAIN_SALE_ITEM +// changed packet sizes +#endif + +// 2013-06-05Ragexe +#if PACKETVER >= 20130605 +// new packets + packet(0x09c4,8); // ZC_ACK_COUNT_BARGAIN_SALE_ITEM +#endif + +// 2013-06-18aRagexe +#if PACKETVER >= 20130618 +// new packets + packet(0x09ca,23); // ZC_SKILL_ENTRY5 +// changed packet sizes #endif -/* Bank System [Yommy/Hercules] */ -#if PACKETVER >= 20130724 - packet(0x09A6,12); // ZC_BANKING_CHECK - packet(0x09A7,10,clif->pBankDeposit,2,4,6); - packet(0x09A8,16); // ZC_ACK_BANKING_DEPOSIT - packet(0x09A9,10,clif->pBankWithdraw,2,4,6); - packet(0x09AA,16); // ZC_ACK_BANKING_WITHDRAW - packet(0x09AB,6,clif->pBankCheck,2,4); - //// - packet(0x09B6,6,clif->pBankOpen,2,4); - packet(0x09B7,4); // ZC_ACK_OPEN_BANKING - packet(0x09B8,6,clif->pBankClose,2,4); - packet(0x09B9,4); // ZC_ACK_CLOSE_BANKING +// 2013-07-17cRagexe +#if PACKETVER >= 20130717 +// new packets + packet(0x09cb,17); // ZC_USE_SKILL2 + packet(0x09cc,-1); // ZC_SECRETSCAN_DATA +// changed packet sizes + packet(0x09c1,10); // ZC_C_MARKERINFO #endif //2013-08-07Ragexe (Shakto) @@ -2462,14 +2683,21 @@ packet(0x96e,-1,clif->ackmergeitems); #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); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK +#endif + +// 2013-08-07aRagexe +#if PACKETVER >= 20130807 +// new packets + packet(0x09cd,8); // ZC_MSG_COLOR +// changed packet sizes #endif //2013-08-14aRagexe - Themon @@ -2499,14 +2727,137 @@ packet(0x96e,-1,clif->ackmergeitems); #else // not PACKETVER_RE packet(0x0959,18,clif->pPartyBookingRegisterReq,2,4); #endif // PACKETVER_RE - // packet(0x0896,8); // CZ_JOIN_BATTLE_FIELD packet(0x08A4,-1,clif->pItemListWindowSelected,2,4,8); packet(0x0368,19,clif->pWantToConnection,2,6,10,14,18); packet(0x0927,26,clif->pPartyInvite2,2); - // packet(0x0815,4); // CZ_GANGSI_RANK packet(0x0281,26,clif->pFriendsListAdd,2); packet(0x0958,5,clif->pHomMenu,2,4); packet(0x0885,36,clif->pStoragePassword,0); + packet(0x0815,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x0896,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD +#endif + +// 2013-08-14aRagexe +#if PACKETVER >= 20130814 +// new packets + packet(0x09ce,102,clif->pGM_Monster_Item,2); // CZ_ITEM_CREATE_EX + packet(0x09cf,-1); // ZC_NPROTECTGAMEGUARDCSAUTH + packet(0x09d0,-1,clif->pDull/*,XXX*/); // CZ_NPROTECTGAMEGUARDCSAUTH +// changed packet sizes +#endif + +// 2013-08-21bRagexe +#if PACKETVER >= 20130821 +// new packets + packet(0x09d1,14); // ZC_PROGRESS_ACTOR +// changed packet sizes +#endif + +// 2013-08-28bRagexe +#if PACKETVER >= 20130828 +// new packets + packet(0x09d2,-1); // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5 + packet(0x09d3,-1); // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5 +// changed packet sizes + packet(0x09ba,2,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_GUILD_STORAGE + packet(0x09be,2,clif->pDull/*,XXX*/); // CZ_REQ_CLOSE_GUILD_STORAGE +#endif + +// 2013-09-04aRagexe +#if PACKETVER >= 20130904 +// new packets +// changed packet sizes + packet(0x09ca,-1); // ZC_SKILL_ENTRY5 +#endif + +// 2013-09-11aRagexe +#if PACKETVER >= 20130911 +// new packets + packet(0x09d4,2,clif->pNPCShopClosed); // CZ_NPC_TRADE_QUIT + packet(0x09d5,-1); // ZC_NPC_MARKET_OPEN + packet(0x09d6,-1,clif->pNPCMarketPurchase); // CZ_NPC_MARKET_PURCHASE + packet(0x09d7,-1); // ZC_NPC_MARKET_PURCHASE_RESULT + packet(0x09d8,2,clif->pNPCMarketClosed); // CZ_NPC_MARKET_CLOSE + packet(0x09d9,2,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG + packet(0x09da,2); // ZC_ACK_GUILDSTORAGE_LOG +// changed packet sizes +#endif + +// 2013-09-25aRagexe +#if PACKETVER >= 20130925 +// new packets +// changed packet sizes + packet(0x09da,10); // ZC_ACK_GUILDSTORAGE_LOG +#endif + +// 2013-10-02aRagexe +#if PACKETVER >= 20131002 +// new packets +// changed packet sizes + packet(0x09d9,4,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG + packet(0x09da,-1); // ZC_ACK_GUILDSTORAGE_LOG +#endif + +// 2013-10-16aRagexe +#if PACKETVER >= 20131016 +// new packets +// changed packet sizes + packet(0x09d9,6,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG +#endif + +// 2013-10-23aRagexe +#if PACKETVER >= 20131023 +// new packets + packet(0x09db,-1); // ZC_NOTIFY_MOVEENTRY10 + packet(0x09dc,-1); // ZC_NOTIFY_NEWENTRY10 + packet(0x09dd,-1); // ZC_NOTIFY_STANDENTRY10 +// changed packet sizes + packet(0x09d9,4,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG +#endif + +// 2013-10-30aRagexe +#if PACKETVER >= 20131030 +// new packets + packet(0x09de,-1); // ZC_WHISPER02 + packet(0x09df,7); // ZC_ACK_WHISPER02 + packet(0x09e0,-1); // SC_LOGIN_ANSWER_WITH_ID +#endif + +// 2013-11-06aRagexe +#if PACKETVER >= 20131106 +// new packets + packet(0x09e1,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE + packet(0x09e2,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY + packet(0x09e3,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE + packet(0x09e4,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART +// changed packet sizes +#endif + +// 2013-11-20dRagexe +#if PACKETVER >= 20131120 +// new packets + packet(0x09e5,14); // ZC_DELETEITEM_FROM_MCSTORE2 + packet(0x09e6,18); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 +// changed packet sizes +#endif + +// 2013-11-27bRagexe +#if PACKETVER >= 20131127 +// new packets +// changed packet sizes + packet(0x09e5,18); // ZC_DELETEITEM_FROM_MCSTORE2 + packet(0x09e6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 +#endif + +// 2013-12-11dRagexe +#if PACKETVER >= 20131211 +// new packets + packet(0x09e7,2); // ZC_NOTIFY_UNREAD_RODEX + packet(0x09e8,18,clif->pDull/*,XXX*/); // CZ_OPEN_RODEXBOX + packet(0x09e9,2,clif->pRodexCloseMailbox); // CZ_CLOSE_RODEXBOX + packet(0x09ed,-1); // ZC_ACK_SEND_RODEX + packet(0x09ee,-1,clif->pDull/*,XXX*/); // CZ_REQ_NEXT_RODEX +// changed packet sizes #endif // 2013-12-18bRagexe - Yommy @@ -2532,20 +2883,28 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0817,2,clif->pReqCloseBuyingStore,0); packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); packet(0x092F,19,clif->pWantToConnection,2,6,10,14,18); packet(0x0802,26,clif->pPartyInvite2,2); - // packet(0x087B,4); // CZ_GANGSI_RANK packet(0x08AB,26,clif->pFriendsListAdd,2); packet(0x0811,5,clif->pHomMenu,2,4); packet(0x085C,36,clif->pStoragePassword,0); - /* New */ - packet(0x09d4,2,clif->pNPCShopClosed); - packet(0x09ce,102,clif->pGM_Monster_Item,2); - /* NPC Market */ - packet(0x09d8,2,clif->pNPCMarketClosed); - packet(0x09d6,-1,clif->pNPCMarketPurchase); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x087b,4,clif->pDull); // CZ_GANGSI_RANK +#endif + +// 2013-12-18bRagexe +#if PACKETVER >= 20131218 +// new packets + packet(0x09ea,10,clif->pDull/*,XXX*/); // CZ_REQ_READ_RODEX + packet(0x09eb,14); // ZC_ACK_READ_RODEX + packet(0x09ef,11,clif->pRodexRefreshMaillist); // CZ_REQ_REFRESH_RODEX + packet(0x09f0,-1); // ZC_ACK_RODEX_LIST + packet(0x09f5,11,clif->pRodexDeleteMail); // CZ_REQ_DELETE_RODEX + packet(0x09f6,11); // ZC_ACK_DELETE_RODEX +// changed packet sizes + packet(0x09e8,10,clif->pDull/*,XXX*/); // CZ_OPEN_RODEXBOX + packet(0x09ee,11,clif->pRodexNextMaillist); // CZ_REQ_NEXT_RODEX #endif // 2013-12-23cRagexe - Yommy @@ -2571,16 +2930,22 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0817,2,clif->pReqCloseBuyingStore,0); packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // 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(0x08A4,36,clif->pStoragePassword,0); - packet(0x09df,7); - packet(0x09cb,17); + packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD + packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK +#endif + +// 2013-12-23bRagexe +#if PACKETVER >= 20131223 +// new packets +// changed packet sizes + packet(0x09ea,11,clif->pRodexReadMail); // CZ_REQ_READ_RODEX + packet(0x09eb,24); // ZC_ACK_READ_RODEX #endif // 2013-12-30aRagexe - Yommy @@ -2606,577 +2971,7776 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x094C,2,clif->pReqCloseBuyingStore,0); packet(0x0365,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); packet(0x091F,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x093E,8); // CZ_JOIN_BATTLE_FIELD packet(0x022D,-1,clif->pItemListWindowSelected,2,4,8); packet(0x089C,19,clif->pWantToConnection,2,6,10,14,18); packet(0x08A9,26,clif->pPartyInvite2,2); - // packet(0x087E,4); // CZ_GANGSI_RANK packet(0x0943,26,clif->pFriendsListAdd,2); packet(0x0949,5,clif->pHomMenu,2,4); packet(0x091D,36,clif->pStoragePassword,0); + packet(0x087e,4,clif->pDull); // CZ_GANGSI_RANK + packet(0x093e,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD +#endif + +// 2013-12-30aRagexe +#if PACKETVER >= 20131230 +// new packets + packet(0x09ec,-1,clif->pRodexSendMail); // CZ_REQ_SEND_RODEX + packet(0x09ed,3); // ZC_ACK_SEND_RODEX + packet(0x09f7,75); // ZC_PROPERTY_HOMUN_2 +// changed packet sizes + packet(0x09eb,23); // ZC_ACK_READ_RODEX #endif // 2014 Packet Data -// 2014-01-15eRagexe - YomRawr +// 2014-01-08cRagexe +#if PACKETVER == 20140108 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0936,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-01-15eRagexe +#if PACKETVER == 20140115 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_MOVE2 + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQUEST_TIME2 + packet(0x0361,6,clif->pDropItem,2,4); // CZ_CHANGE_DIRECTION2 + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND2 + packet(0x0367,8,clif->pMoveFromKafra,2,4); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX2 + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME2 + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQNAME_BYGID2 + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_ACT2 + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL2 + packet(0x0802,6,clif->pGetCharNameRequest,2); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_SSILIST_ITEM_CLICK + packet(0x0865,36,clif->pStoragePassword,0); // ZC_REASSEMBLY_AUTH12 + packet(0x0887,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REASSEMBLY_AUTH04 + packet(0x088a,8,clif->pDull/*,XXX*/); // CZ_REASSEMBLY_AUTH07 + packet(0x088e,8,clif->pMoveToKafra,2,4); // CZ_REASSEMBLY_AUTH11 + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_REASSEMBLY_AUTH24 + packet(0x08a7,5,clif->pChangeDir,2,4); // CZ_REASSEMBLY_AUTH36 + packet(0x092d,5,clif->pHomMenu,2,4); // ZC_REASSEMBLY_AUTH65 + packet(0x0940,6,clif->pTakeItem,2); // ZC_REASSEMBLY_AUTH84 + packet(0x095b,4,clif->pDull/*,XXX*/); // CZ_REASSEMBLY_AUTH69 + packet(0x095d,26,clif->pPartyInvite2,2); // CZ_REASSEMBLY_AUTH71 + packet(0x0965,-1,clif->pItemListWindowSelected,2,4,8); // CZ_REASSEMBLY_AUTH79 + packet(0x0966,19,clif->pWantToConnection,2,6,10,14,18); // CZ_REASSEMBLY_AUTH80 + packet(0x096a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_REASSEMBLY_AUTH84 +#endif + +// 2014-01-15cRagexeRE #if PACKETVER >= 20140115 - 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(0x08A7,5,clif->pChangeDir,2,4); - packet(0x0940,6,clif->pTakeItem,2); - packet(0x0361,6,clif->pDropItem,2,4); - packet(0x088E,8,clif->pMoveToKafra,2,4); - packet(0x0367,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(0x0802,6,clif->pGetCharNameRequest,2); - packet(0x0368,6,clif->pSolveCharName,2); - packet(0x0360,12,clif->pSearchStoreInfoListItemClick,2,6,10); - packet(0x0817,2,clif->pSearchStoreInfoNextPage,0); - packet(0x0815,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); - packet(0x096A,-1,clif->pReqTradeBuyingStore,2,4,8,12); - packet(0x088A,6,clif->pReqClickBuyingStore,2); - packet(0x0965,2,clif->pReqCloseBuyingStore,0); - packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); - packet(0x096A,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x088A,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0965,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x0966,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x095D,26,clif->pPartyInvite2,2); - // packet(0x095B,4); // CZ_GANGSI_RANK - packet(0x089B,26,clif->pFriendsListAdd,2); - packet(0x092D,5,clif->pHomMenu,2,4); - packet(0x0865,36,clif->pStoragePassword,0); -#endif - -// 2014-02-05bRagexe - Themon -#if PACKETVER >= 20140205 - 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); - packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // 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(0x0938,36,clif->pStoragePassword,0); - packet(0x09DF,7); -#endif - -// 2014-03-05bRagexe - Themon +// new packets + packet(0x09f1,10,clif->pDull/*,XXX*/); // CZ_REQ_ZENY_FROM_RODEX + packet(0x09f2,3); // ZC_ACK_ZENY_FROM_RODEX + packet(0x09f3,15,clif->pDull/*,XXX*/); // CZ_REQ_ITEM_FROM_RODEX + packet(0x09f4,12); // ZC_ACK_ITEM_FROM_RODEX + packet(0x09f8,-1); // ZC_ALL_QUEST_LIST3 + packet(0x09f9,131); // ZC_ADD_QUEST_EX + packet(0x09fa,-1); // ZC_UPDATE_MISSION_HUNT_EX +// changed packet sizes + packet(0x09eb,-1); // ZC_ACK_READ_RODEX +#endif + +// 2014-01-22aRagexe +#if PACKETVER == 20140122 +// shuffle packets + packet(0x0360,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x07ec,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0811,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0863,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0870,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0871,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0872,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088c,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0890,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0893,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0899,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x089d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08a2,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08aa,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0917,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0925,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x092f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0940,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0941,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0942,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x094c,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0950,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0952,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0955,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0957,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x095d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x095f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE +#endif + +// 2014-01-22aRagexeRE +#if PACKETVER >= 20140122 +// new packets + packet(0x09fb,-1,clif->pDull/*,XXX*/); // CZ_PET_EVOLUTION + packet(0x09fc,6); // ZC_PET_EVOLUTION_RESULT + packet(0x09fd,-1); // ZC_NOTIFY_MOVEENTRY11 + packet(0x09fe,-1); // ZC_NOTIFY_NEWENTRY11 + packet(0x09ff,-1); // ZC_NOTIFY_STANDENTRY11 +// changed packet sizes + packet(0x09f9,143); // ZC_ADD_QUEST_EX +#endif + +// 2014-01-29aRagexe +#if PACKETVER == 20140129 +// shuffle packets + packet(0x0281,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0367,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0802,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0884,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0885,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0889,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0921,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0924,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x092c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0958,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0961,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-01-29bRagexeRE +#if PACKETVER >= 20140129 +// new packets + packet(0x0a00,269); // ZC_SHORTCUT_KEY_LIST_V3 + packet(0x0a01,3,clif->pHotkeyRowShift,2); // CZ_SHORTCUTKEYBAR_ROTATE +// Warning hercules using this packets for items manipulation. In RagexeRE from 20140129 and before 20140305, this actions broken. +#ifdef PACKETVER_RE +// changed packet sizes + packet(0x01c4,43); // ZC_ADD_ITEM_TO_STORE2 + packet(0x01c5,43); // ZC_ADD_ITEM_TO_CART2 + packet(0x080f,41); // ZC_ADD_EXCHANGE_ITEM2 + packet(0x0990,52); // ZC_ITEM_PICKUP_ACK_V5 +#endif // PACKETVER_RE +#endif + +// 2014-02-05bRagexe +#if PACKETVER == 20140205 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0938,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-02-12aRagexe +#if PACKETVER == 20140212 +// shuffle packets + packet(0x02c4,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0369,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0438,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x086e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0874,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0877,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0878,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x087e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0888,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x088c,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x08a0,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a1,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a7,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08ac,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08ad,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0919,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0928,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0930,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0934,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0936,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0944,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0952,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0953,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0960,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE +#endif + +// 2014-02-12aRagexeRE +#if PACKETVER >= 20140212 +// new packets + packet(0x0a02,4); // ZC_DRESSROOM_OPEN +// changed packet sizes + packet(0x09e8,11,clif->pRodexOpenMailbox); // CZ_OPEN_RODEXBOX +#endif + +// 2014-02-19aRagexe +#if PACKETVER == 20140219 +// shuffle packets + packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0360,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0364,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0802,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0838,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x085c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x085d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x085f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0860,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0868,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x086f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0889,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0897,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0898,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x089f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a6,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08aa,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08ac,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0921,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0927,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0939,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0946,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0949,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0953,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x095a,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0961,6,clif->pTickSend,2); // CZ_REQUEST_TIME +#endif + +// 2014-02-19aRagexeRE +#if PACKETVER >= 20140219 +// Warning hercules using this packets for items manipulation. In RagexeRE from 20140129 and before 20140305, this actions broken. +#ifdef PACKETVER_RE +// changed packet sizes + packet(0x01c4,53); // ZC_ADD_ITEM_TO_STORE2 + packet(0x01c5,53); // ZC_ADD_ITEM_TO_CART2 + packet(0x080f,51); // ZC_ADD_EXCHANGE_ITEM2 + packet(0x0990,62); // ZC_ITEM_PICKUP_ACK_V5 +#endif // PACKETVER_RE +#endif + +// 2014-02-26aRagexe +#if PACKETVER == 20140226 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0362,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0364,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0877,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0887,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0894,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0895,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x091a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0921,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0931,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0941,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0962,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0964,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0969,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-02-26aRagexeRE +#if PACKETVER >= 20140226 +// new packets + packet(0x0a03,14,clif->pDull/*,XXX*/); // CZ_REQ_CANCEL_WRITE_RODEX + packet(0x0a04,11,clif->pDull/*,XXX*/); // CZ_REQ_ADD_ITEM_RODEX + packet(0x0a05,6); // ZC_ACK_ADD_ITEM_RODEX + packet(0x0a06,5,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_RODEX_ITEM +// changed packet sizes +#endif + +// 2014-03-05aRagexe +#if PACKETVER == 20140305 +// shuffle packets + packet(0x0202,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x07e4,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0878,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0934,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095e,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-03-05aRagexeRE #if PACKETVER >= 20140305 - 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(0x0815,5,clif->pChangeDir,2,4); - packet(0x0202,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(0x0436,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(0x0361,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); - packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x0438,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x0802,26,clif->pPartyInvite2,2); - // packet(0x0878,4); // CZ_GANGSI_RANK - packet(0x07E4,26,clif->pFriendsListAdd,2); - packet(0x0934,5,clif->pHomMenu,2,4); - packet(0x095e,36,clif->pStoragePassword,0); - packet(0x09DF,7); -#endif - -// 2014-04-02gRagexe - Themon +// new packets + packet(0x0a07,4); // ZC_ACK_REMOVE_RODEX_ITEM + packet(0x0a08,5,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_WRITE_RODEX + packet(0x0a09,50); // ZC_ADD_EXCHANGE_ITEM3 + packet(0x0a0a,52); // ZC_ADD_ITEM_TO_STORE3 + packet(0x0a0b,52); // ZC_ADD_ITEM_TO_CART3 + packet(0x0a0c,61); // ZC_ITEM_PICKUP_ACK_V6 + packet(0x0a0d,4); // ZC_INVENTORY_ITEMLIST_EQUIP_V6 +// changed packet sizes +#ifdef PACKETVER_RE + packet(0x01c4,22); // ZC_ADD_ITEM_TO_STORE2 + packet(0x01c5,22); // ZC_ADD_ITEM_TO_CART2 + packet(0x080f,20); // ZC_ADD_EXCHANGE_ITEM2 + packet(0x0990,31); // ZC_ITEM_PICKUP_ACK_V5 +#endif // PACKETVER_RE + packet(0x09f3,10,clif->pDull/*,XXX*/); // CZ_REQ_ITEM_FROM_RODEX + packet(0x09f4,3); // ZC_ACK_ITEM_FROM_RODEX +#endif + +// 2014-03-12dRagexe +#if PACKETVER == 20140312 +// shuffle packets + packet(0x0202,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x023b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0366,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x086f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0889,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x088d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088e,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0891,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0894,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x089b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x089e,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a6,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a9,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08ad,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x091b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x091c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x091e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x092a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0948,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x094b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x094c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0957,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x095d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x095e,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0966,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2014-03-12bRagexeRE +#if PACKETVER >= 20140312 +// new packets + packet(0x0a0e,14); // ZC_BATTLEFIELD_NOTIFY_HP2 +// changed packet sizes + packet(0x0a09,45); // ZC_ADD_EXCHANGE_ITEM3 + packet(0x0a0a,47); // ZC_ADD_ITEM_TO_STORE3 + packet(0x0a0b,47); // ZC_ADD_ITEM_TO_CART3 + packet(0x0a0c,56); // ZC_ITEM_PICKUP_ACK_V6 + packet(0x0a0d,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6 +#endif + +// 2014-03-26aRagexe +#if PACKETVER == 20140326 +// shuffle packets + packet(0x0362,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0365,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x07ec,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x083c,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x085b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0865,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0867,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0869,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x086b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x087c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x087e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x087f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0887,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0898,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08aa,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ac,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08ad,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0918,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0928,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x092a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093d,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0942,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0945,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0946,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0956,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0959,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x095a,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x095c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0969,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL +#endif + +// 2014-03-26cRagexeRE +#if PACKETVER >= 20140326 +// changed packet sizes + packet(0x09f1,11,clif->pRodexRequestZeny); // CZ_REQ_ZENY_FROM_RODEX + packet(0x09f2,4); // ZC_ACK_ZENY_FROM_RODEX + packet(0x09f3,11,clif->pRodexRequestItems); // CZ_REQ_ITEM_FROM_RODEX + packet(0x09f4,4); // ZC_ACK_ITEM_FROM_RODEX + packet(0x0a03,2,clif->pRodexCancelWriteMail); // CZ_REQ_CANCEL_WRITE_RODEX + packet(0x0a07,6); // ZC_ACK_REMOVE_RODEX_ITEM + packet(0x0a08,7,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_WRITE_RODEX +#endif + +// 2014-04-02fRagexe +#if PACKETVER == 20140402 +// shuffle packets + packet(0x023b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0360,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0364,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x085b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x085d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0867,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0868,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0882,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0883,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x088c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0890,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0896,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x089a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08ac,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0920,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0926,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0933,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x093f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0944,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0946,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x094c,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0950,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0958,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0965,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK +#endif + +// 2014-04-02eRagexeRE #if PACKETVER >= 20140402 - packet(0x0946,7,clif->pActionRequest,2,6); - packet(0x0868,10,clif->pUseSkillToId,2,4,6); - packet(0x093F,5,clif->pWalkToXY,2); - packet(0x0950,6,clif->pTickSend,2); - packet(0x0360,5,clif->pChangeDir,2,4); - packet(0x0958,6,clif->pTakeItem,2); - packet(0x0882,6,clif->pDropItem,2,4); - packet(0x095C,8,clif->pMoveToKafra,2,4); - packet(0x085B,8,clif->pMoveFromKafra,2,4); - packet(0x0364,10,clif->pUseSkillToPos,2,4,6,8); - packet(0x092D,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); - packet(0x088A,6,clif->pGetCharNameRequest,2); - packet(0x07EC,6,clif->pSolveCharName,2); - packet(0x0965,12,clif->pSearchStoreInfoListItemClick,2,6,10); - packet(0x085D,2,clif->pSearchStoreInfoNextPage,0); - packet(0x0933,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); - packet(0x091F,-1,clif->pReqTradeBuyingStore,2,4,8,12); - packet(0x023B,6,clif->pReqClickBuyingStore,2); - packet(0x0867,2,clif->pReqCloseBuyingStore,0); - packet(0x0944,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); - packet(0x08AC,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x094C,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0883,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x0920,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x0890,26,clif->pPartyInvite2,2); - // packet(0x088C,4); // CZ_GANGSI_RANK - packet(0x089A,26,clif->pFriendsListAdd,2); - packet(0x0896,5,clif->pHomMenu,2,4); - packet(0x0926,36,clif->pStoragePassword,0); - packet(0x09DF,7); -#endif - -// 2014-04-16aRagexe - Themon +// new packets + packet(0x0a0f,-1); // ZC_CART_ITEMLIST_EQUIP_V6 + packet(0x0a10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6 + packet(0x0a11,-1); // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V6 +// changed packet sizes +#endif + +// 2014-04-09aRagexe +#if PACKETVER == 20140409 +// shuffle packets + packet(0x0819,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x085b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0868,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x086a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x086d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0873,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0875,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x087e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0883,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0884,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x088a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0890,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0893,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0896,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0897,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0899,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a2,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a4,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08a6,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x08a7,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a9,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0918,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x092e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0942,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0947,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x095a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x095e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER +#endif + +// 2014-04-09aRagexeRE +#if PACKETVER >= 20140409 +// changed packet sizes + packet(0x09f2,12); // ZC_ACK_ZENY_FROM_RODEX + packet(0x09f4,12); // ZC_ACK_ITEM_FROM_RODEX +#endif + +// 2014-04-16aRagexe +#if PACKETVER == 20140416 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x095c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-04-16aRagexeRE #if PACKETVER >= 20140416 - 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); - packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // 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(0x095C,36,clif->pStoragePassword,0); - packet(0x09DF,7); -#endif - -#if PACKETVER >= 20140613 - packet(0x0a0e,14); -#endif - -// 2014-10-16aRagexe - YomRawr -#if PACKETVER >= 20141016 - 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(0x0967,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(0x022D,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); - packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x0363,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x086E,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x0802,26,clif->pPartyInvite2,2); - // packet(0x0922,4); // CZ_GANGSI_RANK - packet(0x094B,26,clif->pFriendsListAdd,2); - packet(0x0364,5,clif->pHomMenu,2,4); - packet(0x0936,36,clif->pStoragePassword,0); - packet(0x09DF,7); - packet(0x0a00,269); - packet(0x09e5,18); // ZC_DELETEITEM_FROM_MCSTORE2 - packet(0x09e6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 +// new packets + packet(0x0a04,6,clif->pRodexAddItem); // CZ_REQ_ADD_ITEM_RODEX + packet(0x0a12,27); // ZC_ACK_OPEN_WRITE_RODEX + packet(0x0a13,2,clif->pRodexCheckName); // CZ_CHECK_RECEIVE_CHARACTER_NAME +// changed packet sizes + packet(0x0a05,48); // ZC_ACK_ADD_ITEM_RODEX + packet(0x0a06,6,clif->pRodexRemoveItem); // CZ_REQ_REMOVE_RODEX_ITEM + packet(0x0a07,7); // ZC_ACK_REMOVE_RODEX_ITEM + packet(0x0a08,26,clif->pRodexOpenWriteMail); // CZ_REQ_OPEN_WRITE_RODEX +#endif + +// 2014-04-23aRagexe +#if PACKETVER == 20140423 +// shuffle packets + packet(0x022d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0360,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0436,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0811,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x083c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x085a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x085b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0862,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0863,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0866,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x086b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x086f,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0873,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0890,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0895,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0896,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0897,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0898,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x089d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a8,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08ad,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x091a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0920,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x094f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x095e,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK +#endif + +// 2014-04-23aRagexeRE +#if PACKETVER >= 20140423 +// new packets + packet(0x0a14,6); // ZC_CHECK_RECEIVE_CHARACTER_NAME +// changed packet sizes + packet(0x0a13,26,clif->pRodexCheckName); // CZ_CHECK_RECEIVE_CHARACTER_NAME +#endif + +// 2014-04-30aRagexeRE +#if PACKETVER >= 20140430 +// new packets + packet(0x0a15,11); // ZC_GOLDPCCAFE_POINT + packet(0x0a16,26,clif->pDull/*,XXX*/); // CZ_DYNAMICNPC_CREATE_REQUEST + packet(0x0a17,6); // ZC_DYNAMICNPC_CREATE_RESULT +#endif + +// 2014-05-08aRagexe +#if PACKETVER == 20140508 +// shuffle packets + packet(0x0202,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x022d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x023b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0281,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x02c4,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x035f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0360,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0361,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0362,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0363,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0364,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0365,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0366,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0367,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0369,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0436,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0437,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0438,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x07e4,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x07ec,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0802,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0811,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0815,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0817,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0819,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0835,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0838,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x083c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK +#endif + +// 2014-05-08bRagexeRE +#if PACKETVER >= 20140508 +// changed packet sizes + packet(0x0a15,12); // ZC_GOLDPCCAFE_POINT +#endif + +// 2014-05-14bRagexe +#if PACKETVER == 20140514 +// shuffle packets + packet(0x0437,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0817,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0865,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0867,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0868,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0876,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0877,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0885,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0886,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x088a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x088b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0895,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089a,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x089c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a5,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0918,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0921,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0925,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x092c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x092f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x094d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0958,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0962,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0965,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x096a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW +#endif + +// 2014-05-21bRagexe +#if PACKETVER == 20140521 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x088b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x088d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x089c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08ac,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0968,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-05-21aRagexeRE +#if PACKETVER >= 20140521 +// changed packet sizes + packet(0x0a07,9); // ZC_ACK_REMOVE_RODEX_ITEM + packet(0x0a14,10); // ZC_CHECK_RECEIVE_CHARACTER_NAME +#endif + +// 2014-05-28aRagexe +#if PACKETVER == 20140528 +// shuffle packets + packet(0x0202,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0360,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x085f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0862,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0872,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0875,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0877,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0879,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x087e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x088a,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x088f,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0894,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0896,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a4,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08a8,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x08ab,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x091d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0929,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0930,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0938,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x093a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x093f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x094a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x094b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x095f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0963,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0964,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0966,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE +#endif + +// 2014-06-05aRagexe +#if PACKETVER == 20140605 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0369,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0921,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0931,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x094c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME #endif /* Roulette System [Yommy/Hercules] */ -#if PACKETVER >= 20141016 - packet(0x0A19,2,clif->pRouletteOpen,0); // HEADER_CZ_REQ_OPEN_ROULETTE - packet(0x0A1A,23); // HEADER_ZC_ACK_OPEN_ROULETTE +// 2014-06-05aRagexe +#if PACKETVER >= 20140605 +// new packets + packet(0x0a18,2); // ZC_ACCEPT_ENTER3 + packet(0x0a19,-1,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_ROULETTE + packet(0x0a1a,10); // ZC_ACK_OPEN_ROULETTE packet(0x0A1B,2,clif->pRouletteInfo,0); // HEADER_CZ_REQ_ROULETTE_INFO - packet(0x0A1C,-1); // HEADER_ZC_ACK_ROULEITTE_INFO - packet(0x0A1D,2,clif->pRouletteClose,0); // HEADER_CZ_REQ_CLOSE_ROULETTE - packet(0x0A1E,3); // HEADER_ZC_ACK_CLOSE_ROULETTE - packet(0x0A1F,2,clif->pRouletteGenerate,0); // HEADER_CZ_REQ_GENERATE_ROULETTE - packet(0x0A20,21); // HEADER_ZC_ACK_GENERATE_ROULETTE - packet(0x0A21,3,clif->pRouletteRecvItem,2); // HEADER_CZ_RECV_ROULETTE_ITEM - packet(0x0A22,5); // HEADER_ZC_RECV_ROULETTE_ITEM -#endif - -// 2014-10-22bRagexe - YomRawr -#if PACKETVER >= 20141022 - 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(0x08AD,5,clif->pChangeDir,2,4); - packet(0x094E,6,clif->pTakeItem,2); - packet(0x087D,6,clif->pDropItem,2,4); - packet(0x0878,8,clif->pMoveToKafra,2,4); - packet(0x08AA,8,clif->pMoveFromKafra,2,4); - packet(0x023B,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(0x0835,12,clif->pSearchStoreInfoListItemClick,2,6,10); - packet(0x0940,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); - packet(0x0955,18,clif->pPartyBookingRegisterReq,2,4); - // packet(0x092B,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x093B,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x0896,26,clif->pPartyInvite2,2); - // packet(0x08AB,4); // CZ_GANGSI_RANK - packet(0x091A,26,clif->pFriendsListAdd,2); - packet(0x0899,5,clif->pHomMenu,2,4); - packet(0x0438,36,clif->pStoragePassword,0); - packet(0x0A01,3,clif->pHotkeyRowShift,2); -#endif - -#if PACKETVER >= 20150226 - packet(0x0A09,45); - packet(0x0A0A,47); - packet(0x0A0B,47); - packet(0x0A0C,56); - packet(0x0A0D,-1); - packet(0x0A0F,-1); - packet(0x0A10,-1); + packet(0x0a1c,6); // ZC_ACK_ROULEITTE_INFO + packet(0x0a1d,14,clif->pDull/*,XXX*/); // CZ_REQ_CLOSE_ROULETTE +#endif + +// 2014-06-11cRagexe +#if PACKETVER == 20140611 +// shuffle packets + packet(0x0364,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0438,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0838,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0864,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0867,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x086c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0874,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0878,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x088c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0891,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0893,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0894,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a1,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a2,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0924,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0936,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0941,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x094f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0950,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0951,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0952,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0957,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0958,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0963,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0965,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE #endif -// 2015-05-13aRagexe -#if PACKETVER >= 20150513 - 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(0x0924,5,clif->pChangeDir,2,4); - packet(0x0958,6,clif->pTakeItem,2); - packet(0x0885,6,clif->pDropItem,2,4); - packet(0x0879,8,clif->pMoveToKafra,2,4); - packet(0x0864,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(0x022D,2,clif->pReqCloseBuyingStore,0); - packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); - packet(0x0883,18,clif->pPartyBookingRegisterReq,2,4); - packet(0x02C4,8); // CZ_JOIN_BATTLE_FIELD - packet(0x0960,-1,clif->pItemListWindowSelected,2,4,8); - packet(0x0363,19,clif->pWantToConnection,2,6,10,14,18); - packet(0x094A,26,clif->pPartyInvite2,2); - packet(0x0927,4); // CZ_GANGSI_RANK - packet(0x08A8,26,clif->pFriendsListAdd,2); - packet(0x0817,5,clif->pHomMenu,2,4); - packet(0x0923,36,clif->pStoragePassword,0); - packet(0x09E8,11,clif->pDull); // CZ_OPEN_MAILBOX - packet(0x0A2E,6,clif->pDull); // TITLE - packet(0x0A02,4); // ZC_DRESSROOM_OPEN - packet(0x0A35,4,clif->pOneClick_ItemIdentify,2); +/* Roulette System [Yommy/Hercules] */ +// 2014-06-11bRagexe / RE. moved by 4144 +#if PACKETVER >= 20140611 +// new packets + packet(0x0a1e,3); // ZC_ACK_CLOSE_ROULETTE + packet(0x0a1f,2,clif->pRouletteGenerate,0); // CZ_REQ_GENERATE_ROULETTE + packet(0x0a20,21); // ZC_ACK_GENERATE_ROULETTE + packet(0x0a21,6,clif->pDull/*,XXX*/); // CZ_RECV_ROULETTE_ITEM + packet(0x0a22,3); // ZC_RECV_ROULETTE_ITEM + packet(0x0a23,-1); // ZC_ALL_ACH_LIST + packet(0x0a24,35); // ZC_ACH_UPDATE + packet(0x0a25,6,clif->pDull/*,XXX*/); // CZ_REQ_ACH_REWARD + packet(0x0a26,7); // ZC_REQ_ACH_REWARD_ACK +// changed packet sizes + packet(0x0a18,14); // ZC_ACCEPT_ENTER3 + packet(0x0a19,2,clif->pRouletteOpen,0); // CZ_REQ_OPEN_ROULETTE + packet(0x0a1a,23); // ZC_ACK_OPEN_ROULETTE + packet(0x0a1c,-1); // ZC_ACK_ROULEITTE_INFO + packet(0x0a1d,2,clif->pRouletteClose,0); // CZ_REQ_CLOSE_ROULETTE +#endif + +// 2014-06-12aRagexe +#if PACKETVER == 20140612 +// shuffle packets + packet(0x0364,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0438,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0838,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0864,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0867,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x086c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0874,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0878,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x088c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0891,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0893,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0894,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a1,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a2,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0924,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0936,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0941,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x094f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0950,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0951,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0952,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0957,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0958,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0963,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0965,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +// 2014-06-13aRagexe +#if PACKETVER == 20140613 +// shuffle packets + packet(0x0364,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0438,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0838,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0864,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0867,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x086c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0874,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0878,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x088c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0891,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0893,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0894,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a1,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a2,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0924,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0936,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0941,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x094f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0950,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0951,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0952,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0957,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0958,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0963,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0965,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0969,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +// 2014-06-18aRagexe +#if PACKETVER == 20140618 +// shuffle packets + packet(0x085d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0860,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0861,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x086c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0878,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0884,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0885,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0886,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0890,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0892,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a6,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a7,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08ac,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0917,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x091f,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0929,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0935,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0938,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0939,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x093b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0945,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0954,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0957,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x095e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0962,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0967,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER +#endif + +// 2014-06-18cRagexeRE +#if PACKETVER >= 20140618 +// changed packet sizes + packet(0x0a21,3,clif->pRouletteRecvItem,2); // CZ_RECV_ROULETTE_ITEM + packet(0x0a22,5); // ZC_RECV_ROULETTE_ITEM +#endif + +// 2014-06-25aRagexe +#if PACKETVER == 20140625 +// shuffle packets + packet(0x0202,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x023b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0815,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0817,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0835,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x085a,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0861,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0875,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x087b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0885,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0886,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0888,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x088a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0897,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a1,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a2,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0923,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0928,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0940,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0946,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0959,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0960,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0968,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0969,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-06-25aRagexeRE +#if PACKETVER >= 20140625 +// new packets packet(0x0a27,8); // ZC_RECOVERY2 - packet(0x09f7,75); // ZC_PROPERTY_HOMUN_2 -#endif - -#if PACKETVER >= 20150805 // RagexeRE - packet(0x097f,-1); // ZC_SELECTCART - packet(0x0980,7,clif->pSelectCart); // CZ_SELECTCART -#endif - -/* PacketKeys: http://herc.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */ -#if PACKETVER >= 20110817 - packetKeys(0x053D5CED,0x3DED6DED,0x6DED6DED); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20110824 - packetKeys(0x35C91401,0x262A5556,0x28FA03AA); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20110831 - packetKeys(0x3AD67ED0,0x44703C69,0x6F876809); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20110906 - packetKeys(0x3AD67ED0,0x44703C69,0x6F876809); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111005 - packetKeys(0x291E6762,0x77CD391A,0x60AC2F16); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111012 - packetKeys(0x7F3C2D29,0x59B01DE6,0x1DBB44CA); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111021 - packetKeys(0x357D55DC,0x5A8D759F,0x245C30F5); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111025 - packetKeys(0x50AE1A63,0x3CE579B5,0x29C10406); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111102 - packetKeys(0x5324329D,0x5D545D52,0x06137269); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111109 - packetKeys(0x0B642BDA,0x6ECB1D1C,0x61C7454B); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111122 - packetKeys(0x3B550F07,0x1F666C7C,0x60304EF5); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111207 - packetKeys(0x2A610886,0x3E09165E,0x57C11888); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111214 - packetKeys(0x5151306B,0x7AE32886,0x53060628); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111220 - packetKeys(0x05D53871,0x7D0027B4,0x29975333); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20111228 - packetKeys(0x0FF87E93,0x6CFF7860,0x3A3D1DEC); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120104 - packetKeys(0x262034A1,0x674542A5,0x73A50BA5); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120111 - packetKeys(0x2B412AFC,0x4FF94487,0x6705339D); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120120 - packetKeys(0x504345D0,0x3D427B1B,0x794C2DCC); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120202 - packetKeys(0x2CFC0A71,0x2BA91D8D,0x087E39E0); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120207 - packetKeys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120214 - packetKeys(0x7A255EFA,0x30977276,0x2D4A0448); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120229 - packetKeys(0x520B4C64,0x2800407D,0x47651458); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120307 - packetKeys(0x382A6DEF,0x5CBE7202,0x61F46637); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120314 - packetKeys(0x689C1729,0x11812639,0x60F82967); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120321 - packetKeys(0x21F9683F,0x710C5CA5,0x1FD910E9); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120328 - packetKeys(0x75B8553B,0x37F20B12,0x385C2B40); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120404 - packetKeys(0x0036310C,0x2DCD0BED,0x1EE62A78); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120410 - packetKeys(0x01581359,0x452D6FFA,0x6AFB6E2E); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120418 - packetKeys(0x01540E48,0x13041224,0x31247924); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120424 - packetKeys(0x411D1DBB,0x4CBA4848,0x1A432FC4); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120509 - packetKeys(0x16CF3301,0x1F472B9B,0x0B4A3CD2); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120515 - packetKeys(0x4A715EF9,0x79103E4F,0x405C1238); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120525 - packetKeys(0x70EB4CCB,0x0487713C,0x398D4B08); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120605 - packetKeys(0x68CA3080,0x31B74BDD,0x505208F1); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120612 - packetKeys(0x32E45D64,0x35643564,0x35643564); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120618 - packetKeys(0x261F261F,0x261F261F,0x261F261F); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120702 - packetKeys(0x25733B31,0x53486CFD,0x398649BD); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20120716 - packetKeys(0x76052205,0x22052205,0x22052205); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130320 - packetKeys(0x3F094C49,0x55F86C1E,0x58AA359A); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130514 - packetKeys(0x75794A38,0x58A96BC1,0x296E6FB8); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130522 - packetKeys(0x6948050B,0x06511D9D,0x725D4DF1); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130529 - packetKeys(0x023A6C87,0x14BF1F1E,0x5CC70CC9); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130605 - packetKeys(0x646E08D9,0x5F153AB5,0x61B509B5); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130612 - packetKeys(0x6D166F66,0x3C000FCF,0x295B0FCB); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130618 - packetKeys(0x434115DE,0x34A10FE9,0x6791428E); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130626 - packetKeys(0x38F453EF,0x6A040FD8,0X65BD6668); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130703 - packetKeys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130807 - packetKeys(0x7E241DE0,0x5E805580,0x3D807D80); /* Thanks to Shakto */ -#endif - -#if PACKETVER >= 20130814 - packetKeys(0x23A23148,0x0C41420E,0x53785AD7); /* Themon */ -#endif - -#if PACKETVER >= 20131218 - packetKeys(0x6A596301,0x76866D0E,0x32294A45); -#endif - -#if PACKETVER >= 20131223 - packetKeys(0x631C511C,0x111C111C,0x111C111C); -#endif - -#if PACKETVER >= 20131230 - packetKeys(0x611B7097,0x01F957A1,0x768A0FCB); -#endif - -// 2014 Packet Keys - -#if PACKETVER >= 20140115 - packetKeys(0x63224335,0x0F3A1F27,0x6D217B24); /* Thanks to Yommy */ -#endif - -#if PACKETVER >= 20140205 - packetKeys(0x63DC7BDC,0x7BDC7BDC,0x7BDC7BDC); /* Themon */ -#endif - -#if PACKETVER >= 20140305 - packetKeys(0x116763F2,0x41117DAC,0x7FD13C45); /* Themon */ -#endif - -#if PACKETVER >= 20140402 - packetKeys(0x15D3271C,0x004D725B,0x111A3A37); /* Themon */ -#endif - -#if PACKETVER >= 20140416 - packetKeys(0x04810281,0x42814281,0x42814281); /* Themon */ -#endif - -#if PACKETVER >= 20141016 - packetKeys(0x2DFF467C,0x444B37EE,0x2C1B634F); /* YomRawr */ -#endif - -#if PACKETVER >= 20141022 - packetKeys(0x290551EA,0x2B952C75,0x2D67669B); /* YomRawr */ -#endif - -// 2015 Packet Keys - -#if PACKETVER >= 20150513 - packetKeys(0x62C86D09,0x75944F17,0x112C133D); /* Dastgir */ + packet(0x0a28,3); // ZC_ACK_OPENSTORE2 +// changed packet sizes + packet(0x0a24,36); // ZC_ACH_UPDATE +#endif + +// 2014-07-02aRagexe +#if PACKETVER == 20140702 +// shuffle packets + packet(0x022d,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x023b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0364,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0438,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x07e4,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0835,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x086c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0887,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0892,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0895,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08a0,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a2,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0925,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0933,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0940,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-07-02aRagexeRE +#if PACKETVER >= 20140702 +// new packets + packet(0x0a29,6); // ZC_REQ_AU_BOT + packet(0x0a2a,6,clif->pDull/*,XXX*/); // CZ_ACK_AU_BOT +#endif + +// 2014-07-09aRagexe +#if PACKETVER == 20140709 +// shuffle packets + packet(0x0364,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0437,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0860,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0866,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0869,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0875,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0877,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0879,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x087a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0887,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0888,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0894,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0897,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0898,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08ad,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0925,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x092f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0931,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0934,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0939,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x093f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0940,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x094d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x094f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0961,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP +#endif + +// 2014-07-16aRagexe +#if PACKETVER == 20140716 +// shuffle packets + packet(0x0362,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0811,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085c,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0868,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0871,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0881,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x088d,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0896,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x089a,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x089f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08a2,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a4,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x08ac,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0918,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x091f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0926,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x092c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0938,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0947,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0952,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0958,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0959,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0969,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES +#endif + +// 2014-07-16aRagexeRE +#if PACKETVER >= 20140716 +// changed packet sizes + packet(0x09e7,3); // ZC_NOTIFY_UNREAD_RODEX +#endif + +// 2014-07-23aRagexe +#if PACKETVER == 20140723 +// shuffle packets + packet(0x02c4,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0364,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0436,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0819,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0838,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x085f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0869,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086d,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x087d,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0888,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0891,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0896,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0898,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x089e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08a2,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08ad,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0927,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x092f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0934,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0935,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0939,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x093d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0945,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0947,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0948,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0960,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2014-07-23aRagexeRE +#if PACKETVER >= 20140723 +// new packets + packet(0x0a2b,14); // ZC_SE_CASHSHOP_OPEN2 + packet(0x0a2c,12); // ZC_SE_PC_BUY_TAIWANCASHITEM_RESULT +// changed packet sizes + packet(0x0a24,56); // ZC_ACH_UPDATE +#endif + +// 2014-07-30aRagexe +#if PACKETVER == 20140730 +// shuffle packets + packet(0x022d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0364,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0366,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0367,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0437,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x07ec,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0802,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0815,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0817,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x085f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x087d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x087e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x087f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0889,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x088b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x088d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0892,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a0,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a6,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a7,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a9,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08ad,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0924,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x092a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0934,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0940,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0946,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER +#endif + +// 2014-08-06aRagexe +#if PACKETVER == 20140806 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0948,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-08-13aRagexe +#if PACKETVER == 20140813 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0802,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0868,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0878,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0882,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0895,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0897,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0899,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a3,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a7,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ab,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0967,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-08-14aRagexe +#if PACKETVER == 20140814 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0802,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0868,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0878,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0882,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0895,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0897,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0899,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a3,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a7,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ab,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0967,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-08-20aRagexe +#if PACKETVER == 20140820 +// shuffle packets + packet(0x035f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0835,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0861,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0864,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0869,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x086c,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x086e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0872,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0876,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0891,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0899,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089a,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x089b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a3,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a7,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x091d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x092f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0936,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0937,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x093a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x094a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0951,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0952,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0956,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0958,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0961,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2014-08-20aRagexeRE +#if PACKETVER >= 20140820 +// new packets + packet(0x0a2d,-1); // ZC_EQUIPWIN_MICROSCOPE_V6 +#endif + +// 2014-08-27aRagexe +#if PACKETVER == 20140827 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0943,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-09-03aRagexe +#if PACKETVER == 20140903 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0931,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0941,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0943,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0945,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-09-03aRagexeRE +#if PACKETVER >= 20140903 +// new packets + packet(0x0a2e,6,clif->pDull/*,XXX*/); // CZ_REQ_CHANGE_TITLE + packet(0x0a2f,7); // ZC_ACK_CHANGE_TITLE +// changed packet sizes +#endif + +// 2014-09-17aRagexe +#if PACKETVER == 20140917 +// shuffle packets + packet(0x022d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0364,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0365,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0367,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0369,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0838,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0864,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086d,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0889,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0895,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0897,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0898,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089c,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a8,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0919,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x091e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x092a,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0930,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0949,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x094f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0951,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0955,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0956,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0957,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x095a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x095c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x095e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0966,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK +#endif + +// 2014-09-24cRagexe +#if PACKETVER == 20140924 +// shuffle packets + packet(0x0366,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0367,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x07e4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0802,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0815,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0862,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0864,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0865,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0867,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x086b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x086d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0886,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x088b,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0894,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0898,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x089c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a5,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a7,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0918,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x091b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0925,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0926,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0928,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x092d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0934,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0949,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0952,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS +#endif + +// 2014-09-24bRagexeRE +#if PACKETVER >= 20140924 +// new packets + packet(0x0a30,106); // ZC_ACK_REQNAMEALL2 + packet(0x0a31,-1); // ZC_RESULT_PACKAGE_ITEM_TEST + packet(0x0a32,2); // ZC_OPEN_RODEX_THROUGH_NPC_ONLY + packet(0x0a33,7); // ZC_UPDATE_ROULETTE_COIN + packet(0x0a34,6); // ZC_UPDATE_TAIWANCASH +#endif + +// 2014-10-01aRagexe +#if PACKETVER == 20141001 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0365,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0884,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0885,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x089d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08ad,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x092a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0937,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0939,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093f,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0952,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER +#endif + +// 2014-10-01bRagexeRE +#if PACKETVER >= 20141001 +// changed packet sizes + packet(0x0a24,66); // ZC_ACH_UPDATE +#endif + +// 2014-10-08aRagexe +#if PACKETVER == 20141008 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0942,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-10-08bRagexeRE +#if PACKETVER >= 20141008 +// changed packet sizes + packet(0x0a05,49); // ZC_ACK_ADD_ITEM_RODEX +#endif + +// 2014-10-15bRagexe +#if PACKETVER == 20141015 +// shuffle packets + packet(0x022d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0922,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0936,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0967,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-10-16aRagexe +#if PACKETVER == 20141016 +// shuffle packets + packet(0x022d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0922,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0936,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0967,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-10-22bRagexe +#if PACKETVER == 20141022 +// shuffle packets + packet(0x023b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0878,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x087d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0896,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0899,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08aa,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08ab,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08ad,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0940,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x094e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0955,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-10-29aRagexe +#if PACKETVER == 20141029 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0940,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-11-05aRagexe +#if PACKETVER == 20141105 +// shuffle packets + packet(0x022d,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x035f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0360,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x085c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0863,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0864,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0865,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0871,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0874,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0875,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0877,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0879,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0887,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0892,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0898,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a0,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08a5,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a7,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08ad,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x091e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x092b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x093e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0944,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0948,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0950,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0957,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x095f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0968,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2014-11-12cRagexe +#if PACKETVER == 20141112 +// shuffle packets + packet(0x0362,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0438,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x07e4,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0835,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0838,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x083c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085f,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0863,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0871,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0885,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0886,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0887,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088d,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08a0,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a1,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08ab,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0919,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0926,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0929,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0943,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0955,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x095d,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0960,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0962,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +// 2014-11-19dRagexe +#if PACKETVER == 20141119 +// shuffle packets + packet(0x0202,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0861,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0865,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0866,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0872,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0873,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0875,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x087c,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0885,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0887,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0888,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x088d,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0895,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a8,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08aa,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0918,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0920,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0921,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0929,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0933,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0938,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0940,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0941,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0942,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0948,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x094c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0963,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX +#endif + +// 2014-11-19bRagexeRE +#if PACKETVER >= 20141119 +// new packets + packet(0x0A35,4,clif->pOneClick_ItemIdentify,2); +// changed packet sizes + packet(0x0a05,53); // ZC_ACK_ADD_ITEM_RODEX +#endif + +// 2014-11-26aRagexe +#if PACKETVER == 20141126 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0367,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0802,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0871,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0884,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0896,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a4,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08ad,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0920,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0942,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0965,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-11-26aRagexeRE +#if PACKETVER >= 20141126 +// new packets + packet(0x0a36,7); // ZC_HP_INFO_TINY + packet(0x0a37,57); // ZC_ITEM_PICKUP_ACK_V7 +#endif + +// 2014-12-03aRagexe +#if PACKETVER == 20141203 +// shuffle packets + packet(0x0202,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0281,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0362,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0367,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0368,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0802,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0861,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x086d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x086e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x087b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x087e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0880,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0889,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0898,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08a5,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08aa,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0917,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x091c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0928,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x092a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0936,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0957,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x095c,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0962,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL +#endif + +// 2014-12-10bRagexe +#if PACKETVER == 20141210 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0885,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08ac,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0917,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0927,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x092b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0947,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0954,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0955,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0958,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0961,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0963,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0967,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2014-12-24aRagexe +#if PACKETVER == 20141224 +// shuffle packets + packet(0x0361,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0438,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0835,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x085a,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0865,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0867,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x086c,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0870,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x087b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x089b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a3,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a8,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08ac,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0930,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0932,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0945,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0946,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0949,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x094f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0950,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0953,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0956,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x095b,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x095f,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT +#endif + +// 2014-12-31aRagexe +#if PACKETVER == 20141231 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-01-07aRagexeRE +#if PACKETVER == 20150107 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0895,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0943,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0947,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-01-14aRagexe +#if PACKETVER == 20150114 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0868,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0899,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0946,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0955,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0957,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-01-21aRagexe +#if PACKETVER == 20150121 +// shuffle packets + packet(0x0281,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x088b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x089e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08ab,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0918,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0919,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0955,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0959,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0963,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0967,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-01-28aRagexe +#if PACKETVER == 20150128 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x023b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x035f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0368,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0838,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085a,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0864,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x086d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0870,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0874,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0875,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0876,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0888,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ab,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0927,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0929,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0938,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0944,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0963,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0968,6,clif->pDropItem,2,4); // CZ_ITEM_THROW +#endif + +// 2015-01-28aRagexeRE +#if PACKETVER >= 20150128 +// new packets + packet(0x0a38,3); +#endif + +// 2015-01-29aRagexe +#if PACKETVER == 20150129 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x023b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x035f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0368,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0838,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085a,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0864,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x086d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0870,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0874,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0875,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0876,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0888,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ab,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0927,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0929,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0938,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0944,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0963,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0968,6,clif->pDropItem,2,4); // CZ_ITEM_THROW +#endif + +// 2015-01-30aRagexe +#if PACKETVER == 20150130 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x023b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x035f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0368,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0838,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085a,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0864,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x086d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0870,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0874,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0875,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0876,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0888,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ab,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0927,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0929,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0938,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0944,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0963,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0968,6,clif->pDropItem,2,4); // CZ_ITEM_THROW +#endif + +// 2015-02-04aRagexe +#if PACKETVER == 20150204 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0966,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-02-11aRagexe +#if PACKETVER == 20150211 +// shuffle packets + packet(0x023b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0368,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0369,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0436,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0437,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x07e4,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0817,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0819,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0835,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0862,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0863,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0870,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0873,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x087b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x087f,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0882,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0883,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0885,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0886,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x089c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a0,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a4,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08aa,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0919,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0920,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0944,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0951,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0957,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0958,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2015-02-17aRagexe +#if PACKETVER == 20150217 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-02-25aRagexeRE +#if PACKETVER == 20150225 +// shuffle packets + packet(0x02c4,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0362,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0819,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0885,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0896,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x089c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0940,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0946,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0948,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0952,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0955,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER +#endif + +// 2015-02-26aRagexeRE +#if PACKETVER == 20150226 +// shuffle packets + packet(0x02c4,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0362,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0819,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0885,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0896,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x089c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0940,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0946,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0948,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0952,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0955,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER +#endif + +// 2015-03-04aRagexe +#if PACKETVER == 20150304 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0802,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0862,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x086d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0879,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0892,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x093a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0947,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x095d,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0960,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0961,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-03-11aRagexeRE +#if PACKETVER == 20150311 +// shuffle packets + packet(0x023b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0360,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0436,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0438,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0838,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x086a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x087b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0883,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0886,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0888,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0896,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a1,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a3,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a5,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08a6,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0928,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x092e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0943,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0946,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0957,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0958,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x095b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0963,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0964,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2015-03-11aRagexeRE +#if PACKETVER >= 20150311 +// new packets + packet(0x0a3a,12); +// changed packet sizes +#endif + +// 2015-03-18aRagexe +#if PACKETVER == 20150318 +// shuffle packets + packet(0x0202,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x023b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0281,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0367,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x07e4,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0802,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0811,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0862,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0863,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0873,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0885,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0889,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x088c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x089c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a4,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x091d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0920,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0927,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0928,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0936,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0937,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0938,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x093a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093c,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x094c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0951,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0958,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0959,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0960,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2015-03-25aRagexe +#if PACKETVER == 20150325 +// shuffle packets + packet(0x0202,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0363,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0365,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0438,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0802,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0819,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x085d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x086f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x087c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x087e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0883,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0885,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0891,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0893,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0897,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0899,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a1,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a7,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0919,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0931,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0932,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0938,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0947,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0950,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0954,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0969,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY +#endif + +// 2015-04-01aRagexe +#if PACKETVER == 20150401 +// shuffle packets + packet(0x0362,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0367,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0437,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x083c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x086f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0875,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x087e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x088f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0895,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0898,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x089c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a5,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x091c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0922,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0924,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0938,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0939,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x093a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x093b,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x093e,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0946,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0949,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094b,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0953,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0964,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2015-04-08aRagexe +#if PACKETVER == 20150408 +// shuffle packets + packet(0x0819,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x085a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0865,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0868,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x086b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x086e,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0878,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x087f,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0888,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0889,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0891,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0898,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a2,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a4,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x091e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0922,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0946,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0955,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0957,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0959,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0963,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +// 2015-04-15aRagexe +#if PACKETVER == 20150415 +// shuffle packets + packet(0x0361,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0364,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0366,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0368,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0802,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0817,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0835,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x085e,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0863,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0867,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0868,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0869,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x086c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0880,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0891,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0898,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a0,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0922,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092e,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x093c,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x093e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0941,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0946,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0953,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x095c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0960,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0961,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2015-04-15aRagexeRE +#if PACKETVER >= 20150415 +// changed packet sizes + packet(0x0a39,36); // CH_UNKNOWN_MAKE_CHAR // in char server used from 20151001. is this correct? +#endif + +// 2015-04-22aRagexeRE +#if PACKETVER == 20150422 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0955,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-04-22aRagexeRE +#if PACKETVER >= 20150422 +// new packets + packet(0x0a3b,-1); +// changed packet sizes +#endif + +// 2015-04-29aRagexe +#if PACKETVER == 20150429 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x086a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0886,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0894,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0899,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x089f,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a6,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08a8,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08ad,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0929,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0943,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-05-07bRagexe +#if PACKETVER == 20150507 +// shuffle packets + packet(0x023b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0864,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0887,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0889,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0924,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x092e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x093b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0941,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0942,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0953,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0955,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0958,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME #endif -#if defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3) - packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); +// 2015-05-13aRagexe +#if PACKETVER == 20150513 +// shuffle packets + packet(0x022d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x02c4,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0864,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0879,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0883,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0885,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a8,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0923,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0924,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0927,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x094a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0958,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0960,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-05-20aRagexe +#if PACKETVER == 20150520 +// shuffle packets + packet(0x0202,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0361,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0835,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x085e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0865,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0868,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x087d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0880,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0882,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x089c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089e,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a2,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08ad,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091d,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0924,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0931,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0936,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x093d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0940,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0945,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x094e,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x095b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0960,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0961,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2015-05-20aRagexeRE +#if PACKETVER >= 20150520 +// new packets + packet(0x0a3c,-1); + packet(0x0a3d,18,clif->pDull/*,XXX*/); +#endif + +// 2015-05-27aRagexe +#if PACKETVER == 20150527 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x083c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0940,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-06-03aRagexe +#if PACKETVER == 20150603 +// shuffle packets + packet(0x0361,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0437,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0811,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0819,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0860,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0864,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0867,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0873,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0877,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0881,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0884,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x088b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0897,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x089a,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x089d,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a1,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08ad,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x091b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0922,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x093b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x093f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0955,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0956,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0960,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0969,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x096a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE +#endif + +// 2015-06-03bRagexeRE +#if PACKETVER >= 20150603 +// new packets + packet(0x0a3e,-1); +#endif + +// 2015-06-10aRagexe +#if PACKETVER == 20150610 +// shuffle packets + packet(0x022d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0438,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x07e4,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0835,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0870,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0872,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0877,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x087e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0884,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0885,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0888,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x088d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x088f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0897,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a0,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08ac,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0925,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092b,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x092c,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x092e,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0932,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x093e,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0940,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0946,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0949,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0957,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x095d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0964,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2015-06-17aRagexeRE +#if PACKETVER == 20150617 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0362,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0365,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0811,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x086a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x086b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0870,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0886,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0894,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-06-18aRagexeRE +#if PACKETVER == 20150618 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0362,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0365,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0811,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x086a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x086b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0870,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0886,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0894,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-06-24aRagexe +#if PACKETVER == 20150624 +// shuffle packets + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0365,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0870,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0940,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0941,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0966,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-06-24aRagexeRE +#if PACKETVER >= 20150624 +// new packets + packet(0x0a3f,9); +#endif + +// 2015-07-02aRagexe +#if PACKETVER == 20150702 +// shuffle packets + packet(0x023b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0281,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x07e4,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0802,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x087d,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x087e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0883,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x088e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0893,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a0,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a4,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a5,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a6,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08ad,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0919,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0923,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0928,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x092c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093e,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x093f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0946,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094e,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0954,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0956,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0958,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x095f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0960,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0968,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2015-07-08cRagexe +#if PACKETVER == 20150708 +// shuffle packets + packet(0x022d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x02c4,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0368,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085e,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0872,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x087f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0884,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x089d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a5,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08ad,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x092a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0962,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-07-15aRagexe +#if PACKETVER == 20150715 +// shuffle packets + packet(0x023b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0362,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0364,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0436,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0437,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0438,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0835,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x083c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085c,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086f,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0873,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0879,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x087c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x087f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0886,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0895,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0896,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0897,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0899,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x089a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a4,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08ac,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0917,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x093e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0944,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0950,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0956,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0961,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0965,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2015-07-29aRagexe +#if PACKETVER == 20150729 +// shuffle packets + packet(0x0437,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0438,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x085b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0860,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x086e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x086f,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0870,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0880,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0881,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0886,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x089a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a3,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a4,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08ac,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08ad,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0920,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x092b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x092f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x093a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x093f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0955,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x095e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0961,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE +#endif + +// 2015-08-05aRagexe +#if PACKETVER == 20150805 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-08-12aRagexe +#if PACKETVER == 20150812 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087f,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-08-12aRagexeRE +#if PACKETVER >= 20150812 +// new packets + packet(0x0a40,11); +#endif + +// 2015-08-19aRagexeRE +#if PACKETVER == 20150819 +// shuffle packets + packet(0x0202,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x022d,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0281,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x085d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0862,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0865,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0871,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0888,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0919,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091e,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0927,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0961,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0967,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-08-26aRagexeRE +#if PACKETVER == 20150826 +// shuffle packets + packet(0x0362,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0436,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x07ec,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0819,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0861,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0865,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x086b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0870,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x087b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x088b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0890,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0891,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a0,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08a1,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a8,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0924,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0928,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x092e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x093b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0945,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094f,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0951,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0959,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0964,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0968,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0969,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO +#endif + +// 2015-09-02aRagexe +#if PACKETVER == 20150902 +// shuffle packets + packet(0x023b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0360,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0367,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0802,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x083c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0863,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x087b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x087f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0886,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0887,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0889,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x088d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0892,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0897,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0899,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08a9,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0923,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0928,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092a,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x092d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0941,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0947,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x094f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0953,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x095b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0960,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +// 2015-09-09aRagexe +#if PACKETVER == 20150909 +// shuffle packets + packet(0x023b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0361,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0365,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0437,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0861,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0871,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x087b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0883,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0886,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0895,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0928,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0940,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0941,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095e,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0962,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2015-09-09aRagexeRE +#if PACKETVER >= 20150909 +// new packets + packet(0x0a41,18); +#endif + +// 2015-09-16aRagexe +#if PACKETVER == 20150916 +// shuffle packets + packet(0x022d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0817,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0835,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x085e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0869,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0873,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0877,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x087f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0881,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x089b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x089c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08ac,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0920,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0924,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x092e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x092f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0934,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0936,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0938,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0941,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0942,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0948,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x095a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0960,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0961,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0969,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER +#endif + +// 2015-09-16aRagexeRE +#if PACKETVER >= 20150916 +// new packets + packet(0x0a42,43); +#endif + +// 2015-09-23bRagexe +#if PACKETVER == 20150923 +// shuffle packets + packet(0x0361,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0817,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x085c,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x085d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0864,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x086e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x086f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0870,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0879,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x087f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0886,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x088e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0892,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0895,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a0,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a2,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08a5,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08a6,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x092b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0930,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0936,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x093b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0951,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0961,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES +#endif + +// 2015-10-01aRagexe +#if PACKETVER == 20151001 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0960,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-10-07aRagexeRE +#if PACKETVER == 20151007 +// shuffle packets + packet(0x0202,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0862,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0961,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0967,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-10-07aRagexeRE +#if PACKETVER >= 20151007 +// new packets + packet(0x0a43,85); + packet(0x0a44,-1); +#endif + +// 2015-10-14bRagexeRE +#if PACKETVER == 20151014 +// shuffle packets + packet(0x0202,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0817,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0838,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x085a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0860,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0863,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0867,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0872,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0874,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0881,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0883,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0884,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0889,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x088e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x089a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x089f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08aa,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x091d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0930,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0934,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0944,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x094f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0956,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x095e,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0961,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0964,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER +#endif + +// 2015-10-21aRagexe +#if PACKETVER == 20151021 +// shuffle packets + packet(0x023b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x02c4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-10-22aRagexe +#if PACKETVER == 20151022 +// shuffle packets + packet(0x023b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x02c4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-10-28cRagexeRE +#if PACKETVER == 20151028 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0860,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-10-28cRagexeRE +#if PACKETVER >= 20151028 +// new packets + packet(0x0a45,-1); +#endif + +// 2015-10-29aRagexe +#if PACKETVER == 20151029 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0860,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-11-04aRagexe +#if PACKETVER == 20151104 +// shuffle packets + packet(0x023b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0360,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0363,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0437,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0811,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0815,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0886,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0887,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x088b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x088d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08a3,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a5,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0928,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0939,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093a,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x0940,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x0964,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP +#endif + +// 2015-11-11aRagexe +#if PACKETVER == 20151111 +// shuffle packets + packet(0x02c4,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0802,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085d,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x0862,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0871,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0885,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x089c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0942,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x094a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0958,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0966,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0967,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0969,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-11-18aRagexeRE +#if PACKETVER == 20151118 +// shuffle packets + packet(0x022d,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x035f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x088b,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x08ab,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0921,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0925,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x092e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0943,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0946,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x0957,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095c,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-11-18aRagexeRE +#if PACKETVER >= 20151118 +// new packets + packet(0x0a49,22); + packet(0x0a4a,6); + packet(0x0a4b,22); + packet(0x0a4c,28); +#endif + +// 2015-11-25bRagexe +#if PACKETVER == 20151125 +// shuffle packets + packet(0x0361,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0365,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0366,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0368,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x0438,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0802,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0838,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0863,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0883,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0884,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x0885,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x088c,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x088d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0899,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x089f,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x08a9,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08ad,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0920,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x092a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x092e,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0939,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x093e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0951,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0956,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0957,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0959,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX +#endif + +// 2015-12-02bRagexeRE +#if PACKETVER == 20151202 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0870,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2015-12-09aRagexe +#if PACKETVER == 20151209 +// shuffle packets + packet(0x0365,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0369,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x07e4,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x07ec,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0811,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0819,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x085b,36,clif->pStoragePassword,2,4,20); // CZ_ACK_STORE_PASSWORD + packet(0x085d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085e,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0861,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0866,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0875,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x087a,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x087f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x088e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0894,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08a1,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0920,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x092d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0930,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0932,-1,clif->pItemListWindowSelected,2,4,8,12); // CZ_ITEMLISTWIN_RES + packet(0x093b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0948,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094a,18,clif->pPartyBookingRegisterReq,2,4,6); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0956,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x095c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0961,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0964,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS +#endif + +// 2015-12-16aRagexe +#if PACKETVER == 20151216 +// shuffle packets + packet(0x022d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0361,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0364,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0436,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x085b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0864,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0865,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x086a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x086e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0870,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0874,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0885,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x088b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089d,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x089e,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a2,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a9,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08ac,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0944,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0947,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0949,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0954,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0960,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0966,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0968,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL +#endif + +// 2015-12-23bRagexeRE +#if PACKETVER == 20151223 +// shuffle packets + packet(0x02c4,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0362,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0802,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0815,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0864,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0866,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x086e,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0872,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0875,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0876,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0881,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0884,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0886,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x088d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0890,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0891,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0898,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08aa,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0918,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x091a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x091b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0920,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0923,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0924,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x095e,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x095f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0965,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0967,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK +#endif + +// 2015-12-30aRagexe +#if PACKETVER == 20151230 +// shuffle packets + packet(0x02c4,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x07ec,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085b,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0861,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0869,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0886,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x088e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0897,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0923,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0949,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-01-06aRagexeRE +#if PACKETVER == 20160106 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0861,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x086c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0878,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x087a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x087f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0885,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0889,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x088a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0891,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a0,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0940,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-01-13aRagexeRE +#if PACKETVER == 20160113 +// shuffle packets + packet(0x022d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x023b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x035f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0815,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x085b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0864,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x086d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0873,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0875,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0888,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088c,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0892,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0893,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0899,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a0,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a6,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08aa,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0919,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0924,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0930,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0932,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x093c,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0941,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x094d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0967,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE +#endif + +// 2016-01-20aRagexeRE +#if PACKETVER == 20160120 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0865,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-01-27aRagexeRE +#if PACKETVER == 20160127 +// shuffle packets + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0922,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0961,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-01-27aRagexeRE +#if PACKETVER >= 20160127 +// new packets + packet(0x0a4d,-1); +// changed packet sizes +#endif + +// 2016-02-03aRagexeRE +#if PACKETVER == 20160203 +// shuffle packets + packet(0x0202,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0437,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0811,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0835,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0872,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0873,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x088c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0918,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0940,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0947,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0954,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x095a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-02-11aRagexeRE +#if PACKETVER == 20160211 +// shuffle packets + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0870,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0886,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-02-17cRagexeRE +#if PACKETVER == 20160217 +// shuffle packets + packet(0x0202,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x023b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0362,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0365,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0864,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0870,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0873,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x087a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0888,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x088d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x088f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0899,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a0,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a9,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08ac,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ad,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x091d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0920,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0926,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x092e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x093b,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x093e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0941,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x095e,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0966,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0967,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0969,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE +#endif + +// 2016-02-24bRagexeRE +#if PACKETVER == 20160224 +// shuffle packets + packet(0x022d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0364,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0436,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0861,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x086b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0884,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0885,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0888,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a9,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0920,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0929,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092f,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0936,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0938,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0961,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-03-02bRagexeRE +#if PACKETVER == 20160302 +// shuffle packets + packet(0x022d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0367,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0802,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0819,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x085b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0864,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0865,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0867,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0868,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0873,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0875,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x087a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x087d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0883,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a6,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a9,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x091a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0927,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092d,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x092f,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0945,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x094e,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0950,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0957,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x095a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0960,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0961,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0967,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0968,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT +#endif + +// 2016-03-02bRagexeRE +#if PACKETVER >= 20160302 +// new packets + packet(0x0a4e,4); + packet(0x0a4f,-1,clif->pDull/*,XXX*/); + packet(0x0a50,6); + packet(0x0a51,34); +// changed packet sizes +#endif + +// 2016-03-09aRagexeRE +#if PACKETVER == 20160309 +// shuffle packets + packet(0x023b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0281,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0364,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0819,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0838,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x083c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x085a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0866,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086a,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0873,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x087e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x089b,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a7,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0920,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0922,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0929,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x092a,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x092e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0932,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x094f,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0956,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x095e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x096a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP +#endif + +// 2016-03-16aRagexeRE +#if PACKETVER == 20160316 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0922,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-03-16aRagexeRE +#if PACKETVER >= 20160316 +// new packets + packet(0x0a52,20,clif->pDull/*,XXX*/); + packet(0x0a53,10); + packet(0x0a54,-1); + packet(0x0a55,2); + packet(0x0a56,6,clif->pDull/*,XXX*/); + packet(0x0a57,6); + packet(0x0a58,8); + packet(0x0a59,-1); + packet(0x0a5a,2,clif->pDull/*,XXX*/); + packet(0x0a5b,7); + packet(0x0a5c,18,clif->pDull/*,XXX*/); + packet(0x0a5d,6); +// changed packet sizes +#endif + +// 2016-03-23aRagexeRE +#if PACKETVER == 20160323 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0869,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0872,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0878,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0883,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0896,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089a,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x091b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0926,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0927,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0933,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x093c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-03-23aRagexeRE +#if PACKETVER >= 20160323 +// new packets + packet(0x0a68,3); + packet(0x0a69,6); + packet(0x0a6a,12); + packet(0x0a6b,-1); +// changed packet sizes +#endif + +// 2016-03-30aRagexeRE +#if PACKETVER == 20160330 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0365,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x086d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0878,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087f,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0889,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x088d,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0918,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0925,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x092a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x092c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0930,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0939,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x093b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-03-30aRagexeRE +#if PACKETVER >= 20160330 +// new packets + packet(0x0a6c,7,clif->pDull/*,XXX*/); + packet(0x0a6d,-1); + packet(0x0a6e,-1,clif->pRodexSendMail); // CZ_RODEX_SEND_MAIL + packet(0x0a6f,-1); +// changed packet sizes +#endif + +// 2016-04-06aRagexeRE +#if PACKETVER == 20160406 +// shuffle packets + packet(0x0364,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x07e4,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0819,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x085a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0869,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0877,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0878,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0879,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0884,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0892,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0895,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0898,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a1,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a9,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08ac,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0927,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x092d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0933,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0934,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0940,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0949,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x094d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0953,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x095f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0962,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK +#endif + +// 2016-04-14bRagexeRE +#if PACKETVER == 20160414 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0363,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0862,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0880,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0885,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0918,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0922,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0927,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0931,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0934,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0945,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0953,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-04-20aRagexeRE +#if PACKETVER == 20160420 +// shuffle packets + packet(0x022d,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x02c4,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x035f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0864,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0870,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0872,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0874,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0884,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0888,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a5,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0935,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x095c,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-04-27aRagexeRE +#if PACKETVER == 20160427 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0835,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0940,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-04-27aRagexeRE +#if PACKETVER >= 20160427 +// new packets +// changed packet sizes + packet(0x0a50,4); +#endif + +// 2016-05-04aRagexeRE +#if PACKETVER == 20160504 +// shuffle packets + packet(0x0202,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0363,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0365,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x083c,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x085f,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x086b,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x087f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0884,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0886,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0887,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x088d,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088f,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0890,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0893,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0898,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x089d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08ad,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0918,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0921,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0922,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0924,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0940,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0941,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0948,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0952,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0969,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD +#endif + +// 2016-05-04aRagexeRE +#if PACKETVER >= 20160504 +// new packets + packet(0x0a70,2,clif->pDull/*,XXX*/); + packet(0x0a71,-1); + packet(0x0a72,61); +// changed packet sizes +#endif + +// 2016-05-11aRagexeRE +#if PACKETVER == 20160511 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0894,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0918,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0920,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0940,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-05-11aRagexeRE +#if PACKETVER >= 20160511 +// new packets + packet(0x0a73,6); + packet(0x0a74,8); +// changed packet sizes +#endif + +// 2016-05-18aRagexeRE +#if PACKETVER == 20160518 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0874,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a9,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0928,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-05-18aRagexeRE +#if PACKETVER >= 20160518 +// new packets + packet(0x0a76,80); +// changed packet sizes + packet(0x0a73,2); +#endif + +// 2016-05-25aRagexeRE +#if PACKETVER == 20160525 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x085e,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0867,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x086a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0899,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x092c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0937,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0945,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x094a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x094e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0951,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0956,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-05-25aRagexeRE +#if PACKETVER >= 20160525 +// new packets + packet(0x0a77,15); + packet(0x0a78,15); +// changed packet sizes +#endif + +// 2016-06-01aRagexeRE +#if PACKETVER == 20160601 +// shuffle packets + packet(0x0202,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x02c4,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0863,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0870,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x087d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x088f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0895,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08a7,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ac,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0924,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x095f,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0961,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-06-01aRagexeRE +#if PACKETVER >= 20160601 +// new packets + packet(0x0a79,-1); + packet(0x0a7b,-1); + packet(0x0a7c,-1); + packet(0x0a7d,-1); // ZC_RODEX_MAILLIST +// changed packet sizes +#endif + +// 2016-06-08aRagexeRE +#if PACKETVER == 20160608 +// shuffle packets + packet(0x022d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x02c4,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x035f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0437,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07ec,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0802,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085c,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0885,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0889,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0899,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08a6,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x094d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0958,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0969,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-06-15aRagexeRE +#if PACKETVER == 20160615 +// shuffle packets + packet(0x0281,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0363,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0364,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0369,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x083c,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0866,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0870,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x087e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x087f,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0884,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0887,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0888,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x088d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0891,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0898,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x092f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x093e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0947,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0948,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x094a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x094b,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0954,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0957,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0958,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x095c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x095e,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0961,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK +#endif + +// 2016-06-15aRagexeRE +#if PACKETVER >= 20160615 +// new packets + packet(0x0a7e,4); + packet(0x0a7f,-1); + packet(0x0a80,2); + packet(0x0a81,3); +// changed packet sizes +#endif + +// 2016-06-22aRagexeRE +#if PACKETVER == 20160622 +// shuffle packets + packet(0x023b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x035f,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0361,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x07e4,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0861,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0865,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0867,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0880,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0887,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0890,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0891,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0892,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x089a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x089e,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a2,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a8,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092d,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x092f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0936,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0937,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x093b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x093f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0946,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0959,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0965,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0969,6,clif->pDropItem,2,4); // CZ_ITEM_THROW +#endif + +// 2016-06-22aRagexeRE +#if PACKETVER >= 20160622 +// new packets + packet(0x0a82,46); + packet(0x0a83,46); + packet(0x0a84,94); + packet(0x0a85,82); + packet(0x0a86,-1); + packet(0x0a87,4); + packet(0x0a88,2); +// changed packet sizes +#endif + +// 2016-06-29aRagexeRE +#if PACKETVER == 20160629 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x022d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x035f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0363,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0368,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x085c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x085e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0860,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0861,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0863,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0867,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x086b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0881,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0885,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x088e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0893,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091e,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0922,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0925,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0926,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x093e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0946,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0948,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x094a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0957,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x095a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0968,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0969,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x096a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2016-06-29aRagexeRE +#if PACKETVER >= 20160629 +// new packets + packet(0x0a89,32); + packet(0x0a8a,6); + packet(0x0a8b,2); + packet(0x0a8c,2); + packet(0x0a8d,-1); +// changed packet sizes + packet(0x0a80,6); +#endif + +// 2016-06-30aRagexeRE +#if PACKETVER == 20160630 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x022d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x035f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0363,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0368,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x085c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x085e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0860,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0861,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0863,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0867,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x086b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0881,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0885,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x088e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0893,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091e,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0922,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0925,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0926,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x093e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0946,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0948,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x094a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0957,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x095a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0968,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0969,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x096a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2016-07-06cRagexeRE +#if PACKETVER == 20160706 +// shuffle packets + packet(0x0362,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0436,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x085f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0860,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0869,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x086b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0884,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0886,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0889,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0892,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0899,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a4,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a5,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08a8,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0918,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x091b,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0924,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0926,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0927,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0929,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0939,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x093d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0944,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0945,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x094c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0952,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0957,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0958,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP +#endif + +// 2016-07-06cRagexeRE +#if PACKETVER >= 20160706 +// new packets + packet(0x0a81,3); +// changed packet sizes + packet(0x0a7e,-1); + packet(0x0a89,57); +#endif + +// 2016-07-13bRagexeRE +#if PACKETVER == 20160713 +// shuffle packets + packet(0x022d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0363,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0364,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0838,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0860,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0865,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0869,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0875,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0877,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x087b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0883,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x088d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0892,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x089a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a2,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a4,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x091c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x091d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0921,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0922,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x092c,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0931,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0939,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0944,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0945,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0947,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0957,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x095b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD +#endif + +// 2016-07-13aRagexeRE +#if PACKETVER >= 20160713 +// new packets +// changed packet sizes + packet(0x0a87,-1); +#endif + +// 2016-07-20aRagexeRE +#if PACKETVER == 20160720 +// shuffle packets + packet(0x0362,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0363,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0365,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x07e4,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0819,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0838,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x085b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x086a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x087f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0883,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0887,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0897,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x089e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a0,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08aa,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0917,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x091c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x093b,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x093e,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0946,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x094d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0953,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x095b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0960,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0969,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ +#endif + +// 2016-07-20aRagexeRE +#if PACKETVER >= 20160720 +// new packets + packet(0x0a8e,2); + packet(0x0a8f,2); + packet(0x0a90,3); +// changed packet sizes +#endif + +// 2016-07-27bRagexeRE +#if PACKETVER == 20160727 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x023b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0362,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0363,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0436,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0438,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x07ec,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0866,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0868,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0869,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0874,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0877,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0883,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0887,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0891,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x089f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a4,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08a7,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0936,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0941,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0946,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0949,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0951,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x095f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0966,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0969,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES +#endif + +// 2016-07-27aRagexeRE +#if PACKETVER >= 20160727 +// new packets + packet(0x0a91,-1); + packet(0x0a92,-1); + packet(0x0a93,3); +// changed packet sizes +#endif + +// 2016-08-03bRagexeRE +#if PACKETVER == 20160803 +// shuffle packets + packet(0x0364,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x085d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0878,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0881,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0886,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0887,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0888,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0891,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0895,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089e,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x08a1,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x091b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0929,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0930,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0932,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0934,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0937,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x093a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x093e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x093f,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0952,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0955,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0956,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0959,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x095a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE +#endif + +// 2016-08-03bRagexeRE +#if PACKETVER >= 20160803 +// new packets + packet(0x0a94,2); +// changed packet sizes + packet(0x0a81,4); +#endif + +// 2016-08-10aRagexeRE +#if PACKETVER == 20160810 +// shuffle packets + packet(0x0361,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0819,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0838,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x085d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x085e,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x085f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0860,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x086f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0875,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0879,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x087a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0885,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0888,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0890,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x089d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x089f,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a9,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x091c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0926,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x092b,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x092d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0935,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0943,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x094b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0959,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x095b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0967,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD +#endif + +// 2016-08-31bRagexeRE +#if PACKETVER == 20160831 +// shuffle packets + packet(0x022d,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0366,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x07ec,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0835,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0865,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x086d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0870,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0874,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0876,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0878,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x087c,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08a8,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08a9,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0917,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x092c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0938,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x093a,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0946,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x094a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x094f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0950,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0954,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0957,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x095e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0960,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0964,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0967,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL +#endif + +// 2016-09-07aRagexeRE +#if PACKETVER == 20160907 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x091c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-09-07aRagexeRE +#if PACKETVER >= 20160907 +// new packets + packet(0x0a95,4); +// changed packet sizes +#endif + +// 2016-09-13aRagexeRE +#if PACKETVER == 20160913 +// shuffle packets + packet(0x0361,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0817,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085b,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0865,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0874,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0875,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0879,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0887,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0889,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x088e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0891,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0892,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x089b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a5,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0928,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0935,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x093a,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0949,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x094a,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0950,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0952,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0954,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0962,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0963,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0968,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE +#endif + +// 2016-09-21bRagexeRE +#if PACKETVER == 20160921 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x094a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-09-21bRagexeRE +#if PACKETVER >= 20160921 +// new packets + packet(0x0a96,51); +// changed packet sizes + packet(0x0a37,59); // ZC_ITEM_PICKUP_ACK_V7 +#endif + +// 2016-09-28dRagexeRE +#if PACKETVER == 20160928 +// shuffle packets + packet(0x0202,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0366,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0436,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0811,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0838,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0864,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0866,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0872,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0878,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x087f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0889,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x088e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0897,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x089a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a9,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0919,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x091e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0927,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x092d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0944,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x094d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094e,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0953,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0955,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0957,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK +#endif + +// 2016-09-28cRagexeRE +#if PACKETVER >= 20160928 +// new packets + packet(0x0a97,8); + packet(0x0a98,12); + packet(0x0a99,8); + packet(0x0a9a,10); + packet(0x0a9b,-1); + packet(0x0a9c,2); + packet(0x0a9d,4); + packet(0x0a9e,2); + packet(0x0a9f,2); +// changed packet sizes +#endif + +// 2016-10-05aRagexeRE +#if PACKETVER == 20161005 +// shuffle packets + packet(0x0202,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0838,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0863,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0886,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088e,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0891,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0892,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x089b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a0,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08ac,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08ad,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0918,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0919,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x091e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x092b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0931,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0932,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x093b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0942,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0944,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0945,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x094a,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x094d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0952,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x095b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0967,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL +#endif + +// 2016-10-05aRagexeRE +#if PACKETVER >= 20161005 +// new packets + packet(0x0aa0,2,clif->pDull/*,XXX*/); + packet(0x0aa1,4); + packet(0x0aa2,-1); + packet(0x0aa3,7); + packet(0x0aa4,2); +// changed packet sizes +#endif + +// 2016-10-12aRagexeRE +#if PACKETVER == 20161012 +// shuffle packets + packet(0x023b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0364,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0365,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0369,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x07ec,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0819,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x085b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x085e,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0863,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0868,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0872,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0875,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0880,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0893,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a0,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0936,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0937,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0939,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0943,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0944,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0951,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x095c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0962,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0966,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0967,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD +#endif + +// 2016-10-19aRagexeRE +#if PACKETVER == 20161019 +// shuffle packets + packet(0x022d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0361,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0889,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0892,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0946,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0963,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-10-26bRagexeRE +#if PACKETVER == 20161026 +// shuffle packets + packet(0x0363,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0438,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0802,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085f,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0861,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0862,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x086a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x086e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087a,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x087c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0886,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0891,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0894,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0898,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x091b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0926,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x092c,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x092e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x092f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0930,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x094b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0953,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x095c,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x095e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0962,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2016-10-26bRagexeRE +#if PACKETVER >= 20161026 +// new packets + packet(0x0aa5,-1); + packet(0x0aa6,36); +// changed packet sizes +#endif + +// 2016-11-02aRagexeRE +#if PACKETVER == 20161102 +// shuffle packets + packet(0x0361,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0367,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0436,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0802,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0838,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x083c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086c,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0874,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0886,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0890,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a2,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08aa,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x091b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0922,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0925,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0928,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0936,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0946,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0949,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x095e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0964,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0965,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0966,6,clif->pTickSend,2); // CZ_REQUEST_TIME +#endif + +// 2016-11-03aRagexeRE +#if PACKETVER == 20161103 +// shuffle packets + packet(0x0361,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0367,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0436,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0802,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0838,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x083c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0869,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086c,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0874,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0886,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0890,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a2,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x08aa,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x091b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0922,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0925,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0928,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0936,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0946,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0949,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x095e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0964,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0965,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0966,6,clif->pTickSend,2); // CZ_REQUEST_TIME +#endif + +// 2016-11-09bRagexeRE +#if PACKETVER == 20161109 +// shuffle packets + packet(0x02c4,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0361,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0362,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0366,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x085d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x085e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0865,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x086a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x086d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0870,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0876,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0881,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x088e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0891,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0898,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089d,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a7,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08ad,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0927,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0937,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x093c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0954,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0956,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2016-11-16cRagexeRE +#if PACKETVER == 20161116 +// shuffle packets + packet(0x0368,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0369,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0835,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x085f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0864,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x086f,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0885,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x088b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x088d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x088f,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0890,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0892,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0893,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a1,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a2,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08aa,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08ac,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0920,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0925,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x092a,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0931,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x093c,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x094a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0952,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0957,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x095b,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095d,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0967,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD +#endif + +// 2016-11-23aRagexeRE +#if PACKETVER == 20161123 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0362,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0437,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085c,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0861,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0862,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0866,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x086f,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0871,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0880,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0882,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x088b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089c,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a9,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x08aa,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0926,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x092a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x092f,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0930,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0941,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094d,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x094f,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x095a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x095b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0962,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x096a,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID +#endif + +// 2016-11-30bRagexeRE +#if PACKETVER == 20161130 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0931,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0943,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0954,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0959,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-11-30aRagexeRE +#if PACKETVER >= 20161130 +// new packets + packet(0x0aa7,6); + packet(0x0aa8,5); + packet(0x0aa9,-1); + packet(0x0aaa,-1); + packet(0x0aab,-1); +// changed packet sizes +#endif + +// 2016-12-07eRagexeRE +#if PACKETVER == 20161207 +// shuffle packets + packet(0x023b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0867,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0868,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0875,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x087e,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0886,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08a1,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a2,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08ad,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0918,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0943,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0965,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-12-07cRagexeRE +#if PACKETVER >= 20161207 +// new packets + packet(0x0aac,67); +// changed packet sizes +#endif + +// 2016-12-14bRagexeRE +#if PACKETVER == 20161214 +// shuffle packets + packet(0x022d,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0281,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x02c4,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0364,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0436,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0862,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x086d,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0887,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0895,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0899,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a6,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x092e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x093d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2016-12-21aRagexeRE +#if PACKETVER == 20161221 +// shuffle packets + packet(0x035f,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0366,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0438,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0817,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x085b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0866,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0876,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0881,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0884,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0885,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088c,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0890,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0899,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x08aa,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091e,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0926,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0928,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x092c,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x092e,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0930,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0943,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0946,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x094b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x095a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0964,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0965,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION +#endif + +// 2016-12-21aRagexeRE +#if PACKETVER >= 20161221 +// new packets + packet(0x0aad,47); + packet(0x0aae,2); + packet(0x0aaf,6); + packet(0x0ab0,6); + packet(0x0ab1,10); +// changed packet sizes +#endif + +// 2016-12-28aRagexeRE +#if PACKETVER == 20161228 +// shuffle packets + packet(0x0362,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x085a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0865,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x086a,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x086c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x086d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0870,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0871,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0875,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x087f,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0886,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0889,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0893,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a2,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a3,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a5,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ab,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08ac,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x08ad,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0929,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x092c,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0934,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0935,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0938,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x093d,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0944,6,clif->pTickSend,2); // CZ_REQUEST_TIME +#endif + +// 2016-12-28aRagexeRE +#if PACKETVER >= 20161228 +// new packets +// changed packet sizes + packet(0x0ab1,14); +#endif + +// 2017-01-04bRagexeRE +#if PACKETVER == 20170104 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x085a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x087f,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0896,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-01-04bRagexeRE +#if PACKETVER >= 20170104 +// new packets + packet(0x0ab2,7); + packet(0x0ab3,15); +// changed packet sizes +#endif + +// 2017-01-11aRagexeRE +#if PACKETVER == 20170111 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0877,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x087f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x088a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a1,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a3,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a6,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x091b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094c,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0961,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0969,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-01-11aRagexeRE +#if PACKETVER >= 20170111 +// new packets + packet(0x0ab4,4); + packet(0x0ab5,2); + packet(0x0ab6,6); + packet(0x0ab7,4); + packet(0x0ab8,2); + packet(0x0ab9,39); +// changed packet sizes +#endif + +// 2017-01-18aRagexeRE +#if PACKETVER == 20170118 +// shuffle packets + packet(0x022d,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0364,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0862,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0865,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x086f,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0873,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08ad,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x091f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0927,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0933,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0958,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0962,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x096a,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2017-01-18aRagexeRE +#if PACKETVER >= 20170118 +// new packets + packet(0x0aba,2); + packet(0x0abb,2); +// changed packet sizes + packet(0x0aad,51); + packet(0x0ab3,19); +#endif + +// 2017-01-25aRagexeRE +#if PACKETVER == 20170125 +// shuffle packets + packet(0x0438,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0811,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x086e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0876,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0877,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0879,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087b,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x087d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0881,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0884,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0893,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0894,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0895,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0898,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x089b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08a5,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x091b,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x091c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0920,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0929,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x092b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0930,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0943,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0944,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x095c,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0965,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0968,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +// 2017-02-01aRagexeRE +#if PACKETVER == 20170201 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0815,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x085e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0875,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0879,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0881,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0884,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0885,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0886,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x088b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a4,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0919,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0920,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0938,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0940,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x094c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0966,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0969,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-02-01aRagexeRE +#if PACKETVER >= 20170201 +// new packets + packet(0x0abc,-1); +// changed packet sizes +#endif + +// 2017-02-08aRagexeRE +#if PACKETVER == 20170208 +// shuffle packets + packet(0x02c4,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0367,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085c,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0860,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0892,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a1,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ac,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0921,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0923,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0932,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0937,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-02-15aRagexeRE +#if PACKETVER == 20170215 +// shuffle packets + packet(0x02c4,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x035f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0360,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0811,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x083c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0876,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x087c,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x087d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087e,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0883,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0884,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088a,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x088b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x088c,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0890,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0896,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a2,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x08a8,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091c,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0925,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092b,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x092d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0942,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x094e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x095f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0962,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0969,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE +#endif + +// 2017-02-15aRagexeRE +#if PACKETVER >= 20170215 +// new packets + packet(0x0abd,10); +// changed packet sizes +#endif + +// 2017-02-22aRagexeRE +#if PACKETVER == 20170222 +// shuffle packets + packet(0x0202,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0866,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0870,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0871,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0877,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0889,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0894,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08a3,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08a8,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0937,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0939,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0943,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0962,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-02-22aRagexeRE +#if PACKETVER >= 20170222 +// new packets + packet(0x0abe,116); + packet(0x0abf,114); +// changed packet sizes +#endif + +// 2017-02-28aRagexeRE +#if PACKETVER == 20170228 +// shuffle packets + packet(0x022d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0360,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0362,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0819,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x085e,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0863,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x086b,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0873,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0874,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0876,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0883,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0884,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0889,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0893,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x089e,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a0,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a6,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08a7,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x091f,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x092a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0937,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x093e,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0944,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0947,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0948,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0952,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0955,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER +#endif + +// 2017-02-28aRagexeRE +#if PACKETVER >= 20170228 +// new packets + packet(0x0ac0,26,clif->pRodexOpenMailbox); // CZ_OPEN_RODEXBOX + packet(0x0ac1,26,clif->pRodexRefreshMaillist); // CZ_REQ_REFRESH_RODEX + packet(0x0ac2,-1); + packet(0x0ac3,2); + packet(0x0ac4,-1); + packet(0x0ac5,156,clif->pDull/*,XXX*/); + packet(0x0ac6,156); + packet(0x0ac7,156); +// changed packet sizes + packet(0x0abe,-1); + packet(0x0abf,-1); +#endif + +// 2017-03-08bRagexeRE +#if PACKETVER == 20170308 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-03-08bRagexeRE +#if PACKETVER >= 20170308 +// new packets + packet(0x0ac8,2); + packet(0x0ac9,-1); +// changed packet sizes +#endif + +// 2017-03-15cRagexeRE +#if PACKETVER == 20170315 +// shuffle packets + packet(0x02c4,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x035f,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0360,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0366,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0367,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0436,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x07ec,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085c,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0863,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x086a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0872,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x087b,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0884,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x088b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x088d,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088f,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0892,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x089c,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08aa,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x091d,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0920,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0922,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0944,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x094a,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x094e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0950,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0952,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD +#endif + +// 2017-03-22aRagexeRE +#if PACKETVER == 20170322 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x091a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-03-22aRagexeRE +#if PACKETVER >= 20170322 +// new packets + packet(0x0aca,3); +// changed packet sizes +#endif + +// 2017-03-29dRagexeRE +#if PACKETVER == 20170329 +// shuffle packets + packet(0x0281,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0363,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x087a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0888,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x08a8,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0917,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0926,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0929,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x092e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0937,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0939,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0949,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x095f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-03-29cRagexeRE +#if PACKETVER >= 20170329 +// new packets +// changed packet sizes + packet(0x0aac,69); +#endif + +// 2017-04-05bRagexeRE +#if PACKETVER == 20170405 +// shuffle packets + packet(0x022d,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0281,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0363,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085f,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0860,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0864,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0865,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x086f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0893,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a5,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x094c,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0964,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-04-05bRagexeRE +#if PACKETVER >= 20170405 +// new packets + packet(0x0acb,12); + packet(0x0acc,18); +// changed packet sizes +#endif + +// 2017-04-12aRagexeRE +#if PACKETVER == 20170412 +// shuffle packets + packet(0x023b,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0365,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0863,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0869,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x086d,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0878,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0879,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087b,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x088b,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0890,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0893,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0898,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x089a,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x089c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x08a1,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x091a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x091e,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0929,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x092e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0938,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0942,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0945,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0949,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x094f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0952,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0959,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095b,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x095c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x095d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD +#endif + +// 2017-04-19bRagexeRE +#if PACKETVER == 20170419 +// shuffle packets + packet(0x0811,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0819,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0838,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085a,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0862,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0868,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x086a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0872,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0881,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x088d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0897,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0898,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x089d,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x08aa,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0920,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0922,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0930,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0931,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0935,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x093a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x093f,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0942,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x095c,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x095d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0963,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0965,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE +#endif + +// 2017-04-19bRagexeRE +#if PACKETVER >= 20170419 +// new packets + packet(0x0acd,23); +// changed packet sizes + packet(0x0a99,4); +#endif + +// 2017-04-26dRagexeRE +#if PACKETVER == 20170426 +// shuffle packets + packet(0x0281,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0866,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x086f,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087a,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0887,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0899,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08a2,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x08a4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0927,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0940,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0958,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0963,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-04-26dRagexeRE +#if PACKETVER >= 20170426 +// new packets +// changed packet sizes + packet(0x0a98,10); +#endif + +// 2017-05-02dRagexeRE +#if PACKETVER == 20170502 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0875,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0894,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x089c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x093c,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0950,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-05-02dRagexeRE +#if PACKETVER >= 20170502 +// new packets + packet(0x0ace,4); +// changed packet sizes +#endif + +// 2017-05-17aRagexeRE +#if PACKETVER == 20170517 +// shuffle packets + packet(0x0364,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0367,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0437,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0802,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0815,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0817,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0868,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0875,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x087b,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x087d,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x088c,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x088d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0894,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0896,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0899,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089e,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x089f,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a2,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a8,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08aa,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x091b,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0923,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x093b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0945,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0946,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0947,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0958,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0960,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0964,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP +#endif + +// 2017-05-24aRagexeRE +#if PACKETVER == 20170524 +// shuffle packets + packet(0x0364,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0368,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0802,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x085e,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085f,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0860,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0864,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0866,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0868,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x086d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0873,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0874,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x087d,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0882,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x088d,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0894,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089c,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a1,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0923,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0925,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0934,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0946,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0958,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x095b,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0964,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0967,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0968,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID +#endif + +// 2017-05-31aRagexeRE +#if PACKETVER == 20170531 +// shuffle packets + packet(0x0361,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0369,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x07e4,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x07ec,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0819,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085b,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x085f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0861,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0868,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0873,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0875,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0878,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0885,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x088b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x088d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0894,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x08a2,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x08ac,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x08ad,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x092d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0933,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0937,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0940,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0945,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0963,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0968,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO +#endif + +// 2017-06-07bRagexeRE +#if PACKETVER == 20170607 +// shuffle packets + packet(0x0361,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0364,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x07e4,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x085e,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0862,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0863,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0864,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0871,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0873,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0875,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0885,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x088a,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0897,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x089d,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a9,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08ab,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0917,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0918,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0919,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0925,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0927,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0931,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0934,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0938,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x093d,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0942,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0944,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0949,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE +#endif + +// 2017-06-14bRagexeRE +#if PACKETVER == 20170614 +// shuffle packets + packet(0x023b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0361,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0364,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0367,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0437,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0838,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x083c,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0860,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0865,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0866,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0867,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x086b,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x086c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0877,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0879,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x087d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x087e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0889,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0899,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089d,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a2,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x08ad,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091b,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0928,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x092f,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0936,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0944,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0957,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0963,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK +#endif + +// 2017-06-14bRagexeRE +#if PACKETVER >= 20170614 +// new packets + packet(0x0acf,52); + packet(0x0ad0,11); + packet(0x0ad1,-1); +#endif + +// 2017-06-21aRagexeRE +#if PACKETVER == 20170621 +// shuffle packets + packet(0x0202,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0365,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0366,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0802,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x085d,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x087d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0885,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0889,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a8,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0956,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0957,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x095b,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x095c,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0961,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-06-21aRagexeRE +#if PACKETVER >= 20170621 +// changed packet sizes + packet(0x0acf,57); +#endif + +// 2017-06-28bRagexeRE +#if PACKETVER == 20170628 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0863,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-07-05aRagexeRE +#if PACKETVER == 20170705 +// shuffle packets + packet(0x0202,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x02c4,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0879,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0886,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x088d,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x089d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091a,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x092f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0930,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0932,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0934,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x094c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-07-05aRagexeRE +#if PACKETVER >= 20170705 +// changed packet sizes + packet(0x0acf,64); +#endif + +// 2017-07-12bRagexeRE +#if PACKETVER == 20170712 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0944,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-07-19aRagexeRE +#if PACKETVER == 20170719 +// shuffle packets + packet(0x022d,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0367,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0368,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0369,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x07e4,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x085a,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x085e,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0863,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x086e,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x087d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0881,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0882,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0885,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0891,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0898,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089d,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x08a6,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a8,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x091b,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091f,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x092c,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x092e,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x092f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x093d,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0944,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0946,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0966,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE +#endif + +// 2017-07-19aRagexeRE +#if PACKETVER >= 20170719 +// new packets + packet(0x0ad2,30); + packet(0x0ad3,-1); + packet(0x0ad4,-1); + packet(0x0ad5,2); + packet(0x0ad6,2); + packet(0x0ad7,8); + packet(0x0ad8,8); + packet(0x0ad9,-1); +// changed packet sizes +#endif + +// 2017-07-26cRagexeRE +#if PACKETVER == 20170726 +// shuffle packets + packet(0x0363,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0364,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0369,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0438,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0838,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0873,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0874,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0878,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0881,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0888,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x088e,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08a3,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08a7,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08aa,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x08ab,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x08ac,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091d,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x091e,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091f,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0921,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0923,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0943,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x094f,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0950,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0952,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0954,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x095a,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0963,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO +#endif + +// 2017-07-26cRagexeRE +#if PACKETVER >= 20170726 +// new packets + packet(0x0ada,30); +#endif + +// 2017-08-01aRagexeRE +#if PACKETVER == 20170801 +// shuffle packets + packet(0x022d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0281,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0362,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a6,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x094f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095a,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-08-16cRagexeRE +#if PACKETVER == 20170816 +// shuffle packets + packet(0x022d,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x035f,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0361,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0362,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0438,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x085a,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0862,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0864,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x087e,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0881,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0882,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0884,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0888,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0889,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x08a3,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a7,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08a9,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x08ac,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x091c,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0921,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0925,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x092c,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x093a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x093d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0940,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0941,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0950,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0959,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0960,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO +#endif + +// 2017-08-23aRagexeRE +#if PACKETVER == 20170823 +// shuffle packets + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086c,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x086d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08ac,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x095b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-08-30bRagexeRE +#if PACKETVER == 20170830 +// shuffle packets + packet(0x0281,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x02c4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0363,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0364,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0860,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0865,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x086a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0875,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0884,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0885,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0888,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0897,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0899,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089a,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x089e,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a8,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x091e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0921,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0925,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x092e,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0939,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x093e,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0940,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0942,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0943,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0947,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0951,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0959,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +// 2017-08-30aRagexeRE +#if PACKETVER >= 20170830 +// new packets + packet(0x0adb,-1); +// changed packet sizes + packet(0x006d,157); // HC_ACCEPT_MAKECHAR + packet(0x08e3,157); // HC_UPDATE_CHARINFO + packet(0x0a49,20); +#endif + +// 2017-09-06cRagexeRE +#if PACKETVER == 20170906 +// shuffle packets + packet(0x0202,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0281,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x02c4,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0366,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0802,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0860,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0866,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x086c,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x08a2,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a3,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x08a7,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x091a,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x091e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0953,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-09-06cRagexeRE +#if PACKETVER >= 20170906 +// new packets + packet(0x0adc,6); +#endif + +// 2017-09-13bRagexeRE +#if PACKETVER == 20170913 +// shuffle packets + packet(0x0281,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x035f,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0437,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x07e4,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0817,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0835,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x085a,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0860,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0865,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0866,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x088c,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0890,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0891,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0892,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x08a6,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x08a7,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x08aa,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08ab,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08ac,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x08ad,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x091b,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x091d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x091e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0920,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0923,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0925,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0927,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x095a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x095c,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID +#endif + +// 2017-09-13bRagexeRE +#if PACKETVER >= 20170913 +// new packets + packet(0x0add,22); +#endif + +// 2017-09-20bRagexeRE +#if PACKETVER == 20170920 +// shuffle packets + packet(0x0369,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0436,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x07ec,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x085a,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0861,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0862,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0864,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0865,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x086a,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x086c,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0874,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0875,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0889,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x088e,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x089b,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0919,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x091e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0921,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0923,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0926,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x092e,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0937,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x0939,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0945,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x094c,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x095d,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0961,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0966,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x096a,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE +#endif + +#if PACKETVER >= 20170920 +// new packets + packet(0x0ade,6); + packet(0x0adf,58); +#endif + +// 2017-09-27bRagexeRE +#if PACKETVER == 20170927 +// shuffle packets + packet(0x02c4,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x035f,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x0361,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0362,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0366,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x085c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0873,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0875,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x087d,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x087e,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x088b,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0899,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x089a,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x089b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08a3,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x08a5,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08a6,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x08ad,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x091e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0922,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0923,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0927,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x093b,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0942,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0945,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x094b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0959,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x095a,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +#if PACKETVER >= 20170927 +// new packets + packet(0x0ae0,30); +// changed packet sizes +#endif + +// 2017-10-02cRagexeRE +#if PACKETVER == 20171002 +// shuffle packets + packet(0x022d,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0885,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0897,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0899,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x089d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0928,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x092d,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0934,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x093b,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x093d,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x093e,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0943,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x095f,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-11bRagexeRE +#if PACKETVER == 20171011 +// shuffle packets + packet(0x023b,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x087b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0882,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0950,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0954,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-18aRagexeRE +#if PACKETVER == 20171018 +// shuffle packets + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0363,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0364,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x086a,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x087a,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x087e,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0889,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x089a,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x089f,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x08a6,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0938,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x0944,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x094a,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x094f,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-10-25eRagexeRE +#if PACKETVER == 20171025 +// shuffle packets + packet(0x0202,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x022d,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x023b,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0281,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x035f,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0360,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0361,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0362,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x0363,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x0364,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x0365,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x0366,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0368,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0369,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x0436,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0437,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x0438,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND + packet(0x07e4,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x07ec,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0802,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x0811,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0815,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x0817,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x0819,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0835,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0838,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x083c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x08a2,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x096a,6,clif->pGetCharNameRequest,2); // CZ_REQNAME +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER == 20171101 +// shuffle packets + packet(0x022d,36,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD + packet(0x0368,19,clif->pWantToConnection,2,6,10,14,18); // CZ_ENTER + packet(0x0369,-1,clif->pSearchStoreInfo,2,4,5,9,13,14,15); // CZ_SEARCH_STORE_INFO + packet(0x0438,6,clif->pTickSend,2); // CZ_REQUEST_TIME + packet(0x0835,6,clif->pDropItem,2,4); // CZ_ITEM_THROW + packet(0x085b,5,clif->pHomMenu,2,4); // CZ_COMMAND_MER + packet(0x0860,6,clif->pGetCharNameRequest,2); // CZ_REQNAME + packet(0x086c,10,clif->pUseSkillToId,2,4,6); // CZ_USE_SKILL + packet(0x0872,26,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS + packet(0x0876,5,clif->pChangeDir,2,4); // CZ_CHANGE_DIRECTION + packet(0x0886,8,clif->pDull/*,XXX*/); // CZ_JOIN_BATTLE_FIELD + packet(0x088e,6,clif->pReqClickBuyingStore,2); // CZ_REQ_CLICK_TO_BUYING_STORE + packet(0x0890,2,clif->pSearchStoreInfoNextPage,0); // CZ_SEARCH_STORE_INFO_NEXT_PAGE + packet(0x0895,4,clif->pDull/*,XXX*/); // CZ_GANGSI_RANK + packet(0x0899,26,clif->pPartyInvite2,2); // CZ_PARTY_JOIN_REQ + packet(0x089b,-1,clif->pReqOpenBuyingStore,2,4,8,9,89); // CZ_REQ_OPEN_BUYING_STORE + packet(0x089c,18,clif->pPartyBookingRegisterReq,2,4); // CZ_PARTY_BOOKING_REQ_REGISTER + packet(0x08a0,8,clif->pMoveFromKafra,2,4); // CZ_MOVE_ITEM_FROM_STORE_TO_BODY + packet(0x08ab,-1,clif->pItemListWindowSelected,2,4,8); // CZ_ITEMLISTWIN_RES + packet(0x08ad,12,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK + packet(0x091b,8,clif->pMoveToKafra,2,4); // CZ_MOVE_ITEM_FROM_BODY_TO_STORE + packet(0x0939,5,clif->pWalkToXY,2); // CZ_REQUEST_MOVE + packet(0x094a,2,clif->pReqCloseBuyingStore,0); // CZ_REQ_CLOSE_BUYING_STORE + packet(0x094d,6,clif->pSolveCharName,2); // CZ_REQNAME_BYGID + packet(0x0952,90,clif->pUseSkillToPosMoreInfo,2,4,6,8,10); // CZ_USE_SKILL_TOGROUND_WITHTALKBOX + packet(0x0957,7,clif->pActionRequest,2,6); // CZ_REQUEST_ACT + packet(0x095a,-1,clif->pReqTradeBuyingStore,2,4,8,12); // CZ_REQ_TRADE_BUYING_STORE + packet(0x0962,6,clif->pTakeItem,2); // CZ_ITEM_PICKUP + packet(0x0966,10,clif->pUseSkillToPos,2,4,6,8); // CZ_USE_SKILL_TOGROUND +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER >= 20171101 +// new packets + packet(0x0ae1,28); #endif #endif /* MAP_PACKETS_H */ diff --git a/src/map/packets_keys.h b/src/map/packets_keys.h new file mode 100644 index 000000000..005c3790b --- /dev/null +++ b/src/map/packets_keys.h @@ -0,0 +1,2170 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2013-2017 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef MAP_PACKETS_KEYS_H +#define MAP_PACKETS_KEYS_H + +#ifndef packetKeys + #define packetKeys(a,b,c) +#endif + +/* PacketKeys: http://herc.ws/board/topic/1105-hercules-wpe-free-june-14th-patch/ */ + +// 2010-11-23aRagexe, 2010-11-23aRagexeRE +#if PACKETVER == 20101123 + packetKeys(0x49357D72,0x22C370A1,0x5F836591); +#endif + +// 2010-11-24aRagexe, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-24dRagexe, 2010-11-24eRagexe, 2010-11-24fRagexe +#if PACKETVER == 20101124 + packetKeys(0x49357D72,0x22C370A1,0x5F836591); +#endif + +// 2010-11-26aRagexe, 2010-11-26aRagexeRE +#if PACKETVER == 20101126 + packetKeys(0x49357D72,0x22C370A1,0x5F836591); +#endif + +// 2010-11-30aRagexe, 2010-11-30aRagexeRE +#if PACKETVER == 20101130 + packetKeys(0x3726593C,0x0EFD5EE8,0x79036DF9); +#endif + +// 2010-12-07aRagexeRE, 2010-12-07bRagexe +#if PACKETVER == 20101207 + packetKeys(0x66111112,0x2B7B53AA,0x04E76DF8); +#endif + +// 2010-12-14aRagexe, 2010-12-14aRagexeRE +#if PACKETVER == 20101214 + packetKeys(0x5E535D06,0x4E297F0E,0x400B6AD8); +#endif + +// 2010-12-21aRagexe, 2010-12-21aRagexeRE +#if PACKETVER == 20101221 + packetKeys(0x0448466A,0x41554AC9,0x5B4710B2); +#endif + +// 2010-12-28aRagexe, 2010-12-28aRagexeRE +#if PACKETVER == 20101228 + packetKeys(0x50C638A5,0x4BF86B20,0x480C3746); +#endif + +// 2011-01-04aRagexe, 2011-01-04aRagexeRE +#if PACKETVER == 20110104 + packetKeys(0x55DB401F,0x047D4E02,0x6D8F2EA3); +#endif + +// 2011-01-11aRagexe, 2011-01-11aRagexeRE +#if PACKETVER == 20110111 + packetKeys(0x2D5F6302,0x2A361CD6,0x39D661D6); +#endif + +// 2011-01-18aRagexe, 2011-01-18aRagexeRE +#if PACKETVER == 20110118 + packetKeys(0x3C777D2D,0x00541A1D,0x5E0053A2); +#endif + +// 2011-01-25aRagexe, 2011-01-25aRagexeRE +#if PACKETVER == 20110125 + packetKeys(0x6BB84BB0,0x4C004382,0x10AE3260); +#endif + +// 2011-01-26aRagexe, 2011-01-26aRagexeRE, 2011-01-26bRagexe, 2011-01-26bRagexeRE +#if PACKETVER == 20110126 + packetKeys(0x6BB84BB0,0x4C004382,0x10AE3260); +#endif + +// 2011-01-31aRagexe, 2011-01-31aRagexeRE, 2011-01-31bRagexe, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE +#if PACKETVER == 20110131 + packetKeys(0x6BB84BB0,0x4C004382,0x10AE3260); +#endif + +// 2011-02-01aRagexe +#if PACKETVER == 20110201 + packetKeys(0x68871E62,0x60D17266,0x74726DAA); +#endif + +// 2011-02-08aRagexe, 2011-02-08aRagexeRE +#if PACKETVER == 20110208 + packetKeys(0x72BA4E9D,0x281E1DF1,0x208255AA); +#endif + +// 2011-02-10aRagexe, 2011-02-10bRagexe +#if PACKETVER == 20110210 + packetKeys(0x72BA4E9D,0x281E1DF1,0x208255AA); +#endif + +// 2011-02-15aRagexe, 2011-02-15aRagexeRE +#if PACKETVER == 20110215 + packetKeys(0x1B174D76,0x32005014,0x7B8B72D5); +#endif + +// 2011-02-22aRagexe, 2011-02-22aRagexeRE +#if PACKETVER == 20110222 + packetKeys(0x48F73B56,0x155F7D66,0x44AB57CE); +#endif + +// 2011-02-23aRagexe, 2011-02-23aRagexeRE, 2011-02-23bRagexe, 2011-02-23bRagexeRE +#if PACKETVER == 20110223 + packetKeys(0x48F73B56,0x155F7D66,0x44AB57CE); +#endif + +// 2011-02-24aRagexe, 2011-02-24aRagexeRE +#if PACKETVER == 20110224 + packetKeys(0x48F73B56,0x155F7D66,0x44AB57CE); +#endif + +// 2011-02-25aRagexe, 2011-02-25aRagexeRE, 2011-02-25bRagexe +#if PACKETVER == 20110225 + packetKeys(0x48F73B56,0x155F7D66,0x44AB57CE); +#endif + +// 2011-02-28aRagexe, 2011-02-28aRagexeRE +#if PACKETVER == 20110228 + packetKeys(0x26385EBF,0x7A8C7534,0x60AE2C34); +#endif + +// 2011-03-08aRagexe, 2011-03-08aRagexeRE +#if PACKETVER == 20110308 + packetKeys(0x003F1B20,0x7A1E12A3,0x34994AAD); +#endif + +// 2011-03-09aRagexe, 2011-03-09aRagexeRE, 2011-03-09bRagexe, 2011-03-09bRagexeRE, 2011-03-09cRagexe, 2011-03-09cRagexeRE, 2011-03-09dRagexe, 2011-03-09dRagexeRE +#if PACKETVER == 20110309 + packetKeys(0x003F1B20,0x7A1E12A3,0x34994AAD); +#endif + +// 2011-03-15aRagexe, 2011-03-15aRagexeRE +#if PACKETVER == 20110315 + packetKeys(0x62967D7D,0x34833D1A,0x26D45ECA); +#endif + +// 2011-03-16aRagexe +#if PACKETVER == 20110316 + packetKeys(0x62967D7D,0x34833D1A,0x26D45ECA); +#endif + +// 2011-03-22aRagexe, 2011-03-22aRagexeRE +#if PACKETVER == 20110322 + packetKeys(0x5870617C,0x638D5376,0x739F4817); +#endif + +// 2011-03-29aRagexe, 2011-03-29aRagexeRE +#if PACKETVER == 20110329 + packetKeys(0x06900BB7,0x45DB687B,0x197B017B); +#endif + +// 2011-03-30aRagexe, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE +#if PACKETVER == 20110330 + packetKeys(0x06900BB7,0x45DB687B,0x197B017B); +#endif + +// 2011-04-05aRagexe, 2011-04-05aRagexeRE +#if PACKETVER == 20110405 + packetKeys(0x248D5C37,0x1C6A1B37,0x1F644FDB); +#endif + +// 2011-04-12aRagexeRE, 2011-04-12bRagexe +#if PACKETVER == 20110412 + packetKeys(0x3DE86BFC,0x0DD47F80,0x42481C9B); +#endif + +// 2011-04-19aRagexe, 2011-04-19aRagexeRE +#if PACKETVER == 20110419 + packetKeys(0x26073204,0x62013A51,0x22AC58E0); +#endif + +// 2011-04-26aRagexe, 2011-04-26aRagexeRE +#if PACKETVER == 20110426 + packetKeys(0x392813F9,0x09905054,0x40DB732E); +#endif + +// 2011-05-03aRagexe, 2011-05-03aRagexeRE +#if PACKETVER == 20110503 + packetKeys(0x28BE32EE,0x1D506FCB,0x63832421); +#endif + +// 2011-05-11aRagexe, 2011-05-11aRagexeRE +#if PACKETVER == 20110511 + packetKeys(0x6A715733,0x3C5C0D74,0x408A48EC); +#endif + +// 2011-05-17aRagexe, 2011-05-17bRagexeRE +#if PACKETVER == 20110517 + packetKeys(0x07FE0C72,0x46766BAD,0x5EB5126A); +#endif + +// 2011-05-23aRagexe +#if PACKETVER == 20110523 + packetKeys(0x69166916,0x69166916,0x69166916); +#endif + +// 2011-05-26aRagexeRE, 2011-05-26bRagexe +#if PACKETVER == 20110526 + packetKeys(0x69166916,0x69166916,0x69166916); +#endif + +// 2011-05-31aRagexe, 2011-05-31aRagexeRE +#if PACKETVER == 20110531 + packetKeys(0x5ABA2C7C,0x3CD22073,0x78953988); +#endif + +// 2011-06-07aRagexe, 2011-06-07aRagexeRE +#if PACKETVER == 20110607 + packetKeys(0x76B0426C,0x0DD74DEB,0x1F92228E); +#endif + +// 2011-06-08aRagexe, 2011-06-08aRagexeRE, 2011-06-08bRagexe, 2011-06-08bRagexeRE, 2011-06-08cRagexe, 2011-06-08cRagexeRE +#if PACKETVER == 20110608 + packetKeys(0x76B0426C,0x0DD74DEB,0x1F92228E); +#endif + +// 2011-06-09aRagexe, 2011-06-09aRagexeRE +#if PACKETVER == 20110609 + packetKeys(0x76B0426C,0x0DD74DEB,0x1F92228E); +#endif + +// 2011-06-14aRagexe, 2011-06-14bRagexeRE +#if PACKETVER == 20110614 + packetKeys(0x5749027B,0x71710972,0x5B096475); +#endif + +// 2011-06-20aRagexe +#if PACKETVER == 20110620 + packetKeys(0x3A1760D4,0x254E0DF9,0x440E2357); +#endif + +// 2011-06-27aRagexe +#if PACKETVER == 20110627 + packetKeys(0x3EFC29BD,0x699E4B11,0x7B900A13); +#endif + +// 2011-07-05aRagexe +#if PACKETVER == 20110705 + packetKeys(0x48801A5E,0x68FC7726,0x081D7F6E); +#endif + +// 2011-07-11bRagexe +#if PACKETVER == 20110711 + packetKeys(0x489C544B,0x33BA1C25,0x2DE66E4E); +#endif + +// 2011-07-13aRagexe, 2011-07-13aRagexeRE, 2011-07-13bRagexe, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE +#if PACKETVER == 20110713 + packetKeys(0x489C544B,0x33BA1C25,0x2DE66E4E); +#endif + +// 2011-07-18aRagexe +#if PACKETVER == 20110718 + packetKeys(0x08464674,0x1EEB3BD5,0x33395199); +#endif + +// 2011-07-26aRagexe, 2011-07-26aRagexeRE +#if PACKETVER == 20110726 + packetKeys(0x41E5730B,0x119C6C11,0x5356524A); +#endif + +// 2011-08-02aRagexe +#if PACKETVER == 20110802 + packetKeys(0x607C08A1,0x65B20528,0x360571E9); +#endif + +// 2011-08-09aRagexe +#if PACKETVER == 20110809 + packetKeys(0x742A559A,0x047F425D,0x5C8C2CA0); +#endif + +// 2011-08-16aRagexe, 2011-08-16aRagexeRE +#if PACKETVER == 20110816 + packetKeys(0x053D5CED,0x3DED6DED,0x6DED6DED); +#endif + +// 2011-08-17aRagexe, 2011-08-17aRagexeRE, 2011-08-17bRagexe, 2011-08-17bRagexeRE +#if PACKETVER == 20110817 + packetKeys(0x053D5CED,0x3DED6DED,0x6DED6DED); +#endif + +// 2011-08-23aRagexe, 2011-08-23aRagexeRE +#if PACKETVER == 20110823 + packetKeys(0x35C91401,0x262A5556,0x28FA03AA); +#endif + +// 2011-08-24aRagexe, 2011-08-24aRagexeRE, 2011-08-24bRagexeRE +#if PACKETVER == 20110824 + packetKeys(0x35C91401,0x262A5556,0x28FA03AA); +#endif + +// 2011-08-31aRagexe, 2011-08-31aRagexeRE, 2011-08-31bRagexe, 2011-08-31bRagexeRE, 2011-08-31cRagexe, 2011-08-31cRagexeRE, 2011-08-31dRagexeRE, 2011-08-31eRagexeRE +#if PACKETVER == 20110831 + packetKeys(0x3AD67ED0,0x44703C69,0x6F876809); +#endif + +// 2011-09-06aRagexe, 2011-09-06aRagexeRE +#if PACKETVER == 20110906 + packetKeys(0x350124EC,0x39A14595,0x0DE56125); +#endif + +// 2011-09-14aRagexe, 2011-09-14aRagexeRE +#if PACKETVER == 20110914 + packetKeys(0x350124EC,0x39A14595,0x0DE56125); +#endif + +// 2011-09-20aRagexe, 2011-09-20aRagexeRE, 2011-09-20aRagexeRE2 +#if PACKETVER == 20110920 + packetKeys(0x79C91A12,0x20450CC0,0x584B2A38); +#endif + +// 2011-09-28aRagexe, 2011-09-28aRagexe-retry, 2011-09-28aRagexeRE +#if PACKETVER == 20110928 + packetKeys(0x26567512,0x4B0732DF,0x57D266C6); +#endif + +// 2011-09-29aRagexe, 2011-09-29aRagexeRE +#if PACKETVER == 20110929 + packetKeys(0x26567512,0x4B0732DF,0x57D266C6); +#endif + +// 2011-10-04aRagexe, 2011-10-04aRagexeRE +#if PACKETVER == 20111004 + packetKeys(0x291E6762,0x77CD391A,0x60AC2F16); +#endif + +// 2011-10-05aRagexe, 2011-10-05aRagexeRE +#if PACKETVER == 20111005 + packetKeys(0x291E6762,0x77CD391A,0x60AC2F16); +#endif + +// 2011-10-10aRagexe, 2011-10-10bRagexeRE +#if PACKETVER == 20111010 + packetKeys(0x7F3C2D29,0x59B01DE6,0x1DBB44CA); +#endif + +// 2011-10-12aRagexeRE, 2011-10-12bRagexe +#if PACKETVER == 20111012 + packetKeys(0x7F3C2D29,0x59B01DE6,0x1DBB44CA); +#endif + +// 2011-10-17aRagexe, 2011-10-17aRagexeRE +#if PACKETVER == 20111017 + packetKeys(0x357D55DC,0x5A8D759F,0x245C30F5); +#endif + +// 2011-10-19aRagexeRE, 2011-10-19bRagexeRE +#if PACKETVER == 20111019 + packetKeys(0x357D55DC,0x5A8D759F,0x245C30F5); +#endif + +// 2011-10-21aRagexe, 2011-10-21aRagexeRE, 2011-10-21cRagexe +#if PACKETVER == 20111021 + packetKeys(0x357D55DC,0x5A8D759F,0x245C30F5); +#endif + +// 2011-10-25aRagexe, 2011-10-25aRagexeRE +#if PACKETVER == 20111025 + packetKeys(0x50AE1A63,0x3CE579B5,0x29C10406); +#endif + +// 2011-11-01cRagexe, 2011-11-01cRagexeRE +#if PACKETVER == 20111101 + packetKeys(0x5324329D,0x5D545D52,0x06137269); +#endif + +// 2011-11-02aRagexe, 2011-11-02aRagexeRE +#if PACKETVER == 20111102 + packetKeys(0x5324329D,0x5D545D52,0x06137269); +#endif + +// 2011-11-08aRagexe, 2011-11-08aRagexeRE +#if PACKETVER == 20111108 + packetKeys(0x0B642BDA,0x6ECB1D1C,0x61C7454B); +#endif + +// 2011-11-09aRagexe, 2011-11-09aRagexeRE, 2011-11-09bRagexe, 2011-11-09cRagexe, 2011-11-09dRagexe, 2011-11-09eRagexe +#if PACKETVER == 20111109 + packetKeys(0x0B642BDA,0x6ECB1D1C,0x61C7454B); +#endif + +// 2011-11-14aRagexe, 2011-11-14aRagexeRE +#if PACKETVER == 20111114 + packetKeys(0x419D0DB0,0x74916BF4,0x027371B4); +#endif + +// 2011-11-16aRagexe, 2011-11-16aRagexeRE +#if PACKETVER == 20111116 + packetKeys(0x419D0DB0,0x74916BF4,0x027371B4); +#endif + +// 2011-11-22aRagexe, 2011-11-22aRagexeRE +#if PACKETVER == 20111122 + packetKeys(0x3B550F07,0x1F666C7C,0x60304EF5); +#endif + +// 2011-11-23aRagexe +#if PACKETVER == 20111123 + packetKeys(0x3B550F07,0x1F666C7C,0x60304EF5); +#endif + +// 2011-12-07aRagexe, 2011-12-07aRagexeRE +#if PACKETVER == 20111207 + packetKeys(0x2A610886,0x3E09165E,0x57C11888); +#endif + +// 2011-12-13aRagexe, 2011-12-13aRagexeRE +#if PACKETVER == 20111213 + packetKeys(0x5151306B,0x7AE32886,0x53060628); +#endif + +// 2011-12-14aRagexe, 2011-12-14aRagexeRE, 2011-12-14bRagexeRE, 2011-12-14cRagexeRE +#if PACKETVER == 20111214 + packetKeys(0x5151306B,0x7AE32886,0x53060628); +#endif + +// 2011-12-20bRagexe, 2011-12-20bRagexeRE +#if PACKETVER == 20111220 + packetKeys(0x05D53871,0x7D0027B4,0x29975333); +#endif + +// 2011-12-27aRagexe, 2011-12-27aRagexeRE +#if PACKETVER == 20111227 + packetKeys(0x0FF87E93,0x6CFF7860,0x3A3D1DEC); +#endif + +// 2011-12-28aRagexe, 2011-12-28aRagexeRE +#if PACKETVER == 20111228 + packetKeys(0x0FF87E93,0x6CFF7860,0x3A3D1DEC); +#endif + +// 2012-01-03aRagexe, 2012-01-03bRagexeRE +#if PACKETVER == 20120103 + packetKeys(0x262034A1,0x674542A5,0x73A50BA5); +#endif + +// 2012-01-04aRagexe, 2012-01-04aRagexeRE, 2012-01-04bRagexe +#if PACKETVER == 20120104 + packetKeys(0x262034A1,0x674542A5,0x73A50BA5); +#endif + +// 2012-01-10aRagexeRE, 2012-01-10bRagexe +#if PACKETVER == 20120110 + packetKeys(0x2B412AFC,0x4FF94487,0x6705339D); +#endif + +// 2012-01-17aRagexe, 2012-01-17aRagexeRE +#if PACKETVER == 20120117 + packetKeys(0x24E32C2E,0x48DD17A5,0x64F8771A); +#endif + +// 2012-01-18aRagexe +#if PACKETVER == 20120118 + packetKeys(0x24E32C2E,0x48DD17A5,0x64F8771A); +#endif + +// 2012-01-20aRagexe, 2012-01-20aRagexeRE +#if PACKETVER == 20120120 + packetKeys(0x504345D0,0x3D427B1B,0x794C2DCC); +#endif + +// 2012-01-31aRagexe, 2012-01-31cRagexeRE +#if PACKETVER == 20120131 + packetKeys(0x2CFC0A71,0x2BA91D8D,0x087E39E0); +#endif + +// 2012-02-01aRagexeRE +#if PACKETVER == 20120201 + packetKeys(0x2CFC0A71,0x2BA91D8D,0x087E39E0); +#endif + +// 2012-02-02aRagexe, 2012-02-02aRagexeRE, 2012-02-02bRagexe, 2012-02-02bRagexeRE +#if PACKETVER == 20120202 + packetKeys(0x2CFC0A71,0x2BA91D8D,0x087E39E0); +#endif + +// 2012-02-07bRagexe, 2012-02-07bRagexeRE +#if PACKETVER == 20120207 + packetKeys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D); +#endif + +// 2012-02-08aRagexe +#if PACKETVER == 20120208 + packetKeys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D); +#endif + +// 2012-02-09aRagexe +#if PACKETVER == 20120209 + packetKeys(0x1D373F5D,0x5ACD604D,0x1C4D7C4D); +#endif + +// 2012-02-14bRagexe, 2012-02-14bRagexeRE +#if PACKETVER == 20120214 + packetKeys(0x7A255EFA,0x30977276,0x2D4A0448); +#endif + +// 2012-02-15aRagexe +#if PACKETVER == 20120215 + packetKeys(0x7A255EFA,0x30977276,0x2D4A0448); +#endif + +// 2012-02-21aRagexe, 2012-02-21aRagexeRE +#if PACKETVER == 20120221 + packetKeys(0x1CA5130F,0x43ED240A,0x7FEA3BE0); +#endif + +// 2012-02-22aRagexe, 2012-02-22aRagexeRE +#if PACKETVER == 20120222 + packetKeys(0x1CA5130F,0x43ED240A,0x7FEA3BE0); +#endif + +// 2012-02-28bRagexe, 2012-02-28bRagexeRE +#if PACKETVER == 20120228 + packetKeys(0x520B4C64,0x2800407D,0x47651458); +#endif + +// 2012-02-29aRagexe, 2012-02-29aRagexeRE +#if PACKETVER == 20120229 + packetKeys(0x520B4C64,0x2800407D,0x47651458); +#endif + +// 2012-03-07aRagexe, 2012-03-07aRagexeRE, 2012-03-07bRagexe, 2012-03-07bRagexeRE, 2012-03-07cRagexe, 2012-03-07cRagexeRE, 2012-03-07dRagexe, 2012-03-07dRagexeRE, 2012-03-07eRagexeRE, 2012-03-07fRagexeRE +#if PACKETVER == 20120307 + packetKeys(0x382A6DEF,0x5CBE7202,0x61F46637); +#endif + +// 2012-03-14aRagexe, 2012-03-14aRagexeRE, 2012-03-14bRagexe, 2012-03-14bRagexeRE, 2012-03-14cRagexe, 2012-03-14cRagexeRE +#if PACKETVER == 20120314 + packetKeys(0x689C1729,0x11812639,0x60F82967); +#endif + +// 2012-03-20aRagexe, 2012-03-20aRagexeRE +#if PACKETVER == 20120320 + packetKeys(0x21F9683F,0x710C5CA5,0x1FD910E9); +#endif + +// 2012-03-21aRagexeRE +#if PACKETVER == 20120321 + packetKeys(0x21F9683F,0x710C5CA5,0x1FD910E9); +#endif + +// 2012-03-28aRagexe, 2012-03-28aRagexeRE, 2012-03-28bRagexe, 2012-03-28bRagexeRE, 2012-03-28cRagexe, 2012-03-28cRagexeRE, 2012-03-28dRagexe, 2012-03-28dRagexeRE, 2012-03-28eRagexeRE, 2012-03-28fRagexeRE, 2012-03-28gRagexeRE +#if PACKETVER == 20120328 + packetKeys(0x75B8553B,0x37F20B12,0x385C2B40); +#endif + +// 2012-04-04aRagexe, 2012-04-04aRagexeRE +#if PACKETVER == 20120404 + packetKeys(0x0036310C,0x2DCD0BED,0x1EE62A78); +#endif + +// 2012-04-10aRagexe, 2012-04-10aRagexeRE +#if PACKETVER == 20120410 + packetKeys(0x01581359,0x452D6FFA,0x6AFB6E2E); +#endif + +// 2012-04-17aRagexe, 2012-04-17aRagexeRE +#if PACKETVER == 20120417 + packetKeys(0x01540E48,0x13041224,0x31247924); +#endif + +// 2012-04-18aRagexeRE +#if PACKETVER == 20120418 + packetKeys(0x01540E48,0x13041224,0x31247924); +#endif + +// 2012-04-24aRagexe, 2012-04-24aRagexeRE +#if PACKETVER == 20120424 + packetKeys(0x411D1DBB,0x4CBA4848,0x1A432FC4); +#endif + +// 2012-05-02aRagexeRE +#if PACKETVER == 20120502 + packetKeys(0x37A91D19,0x10190019,0x00190019); +#endif + +// 2012-05-03aRagexe, 2012-05-03aRagexeRE, 2012-05-03bRagexe +#if PACKETVER == 20120503 + packetKeys(0x37A91D19,0x10190019,0x00190019); +#endif + +// 2012-05-08aRagexe, 2012-05-08aRagexeRE +#if PACKETVER == 20120508 + packetKeys(0x16CF3301,0x1F472B9B,0x0B4A3CD2); +#endif + +// 2012-05-09aRagexeRE, 2012-05-09bRagexeRE +#if PACKETVER == 20120509 + packetKeys(0x16CF3301,0x1F472B9B,0x0B4A3CD2); +#endif + +// 2012-05-15aRagexe, 2012-05-15aRagexeRE +#if PACKETVER == 20120515 + packetKeys(0x4A715EF9,0x79103E4F,0x405C1238); +#endif + +// 2012-05-22aRagexe +#if PACKETVER == 20120522 + packetKeys(0x70EB4CCB,0x0487713C,0x398D4B08); +#endif + +// 2012-05-23aRagexe, 2012-05-23aRagexeRE, 2012-05-23bRagexeRE +#if PACKETVER == 20120523 + packetKeys(0x70EB4CCB,0x0487713C,0x398D4B08); +#endif + +// 2012-05-25aRagexeRE +#if PACKETVER == 20120525 + packetKeys(0x70EB4CCB,0x0487713C,0x398D4B08); +#endif + +// 2012-05-29bRagexe, 2012-05-29bRagexeRE, 2012-05-29bragexe +#if PACKETVER == 20120529 + packetKeys(0x53415DDE,0x34953E16,0x27623DF2); +#endif + +// 2012-06-01aRagexeRE +#if PACKETVER == 20120601 + packetKeys(0x68CA3080,0x31B74BDD,0x505208F1); +#endif + +// 2012-06-04aRagexe, 2012-06-04aragexe +#if PACKETVER == 20120604 + packetKeys(0x68CA3080,0x31B74BDD,0x505208F1); +#endif + +// 2012-06-05aRagexeRE +#if PACKETVER == 20120605 + packetKeys(0x68CA3080,0x31B74BDD,0x505208F1); +#endif + +// 2012-06-12aRagexe, 2012-06-12aRagexeRE, 2012-06-12aragexe +#if PACKETVER == 20120612 + packetKeys(0x32E45D64,0x35643564,0x35643564); +#endif + +// 2012-06-18aRagexe, 2012-06-18aRagexeRE, 2012-06-18aragexe +#if PACKETVER == 20120618 + packetKeys(0x261F261F,0x261F261F,0x261F261F); +#endif + +// 2012-06-26aRagexe, 2012-06-26aRagexeRE, 2012-06-26aragexe +#if PACKETVER == 20120626 + packetKeys(0x02277E66,0x045723F1,0x7107392C); +#endif + +// 2012-06-27aRagexe, 2012-06-27aRagexeRE, 2012-06-27aragexe +#if PACKETVER == 20120627 + packetKeys(0x02277E66,0x045723F1,0x7107392C); +#endif + +// 2012-07-02aRagexe, 2012-07-02aRagexeRE, 2012-07-02aragexe +#if PACKETVER == 20120702 + packetKeys(0x25733B31,0x53486CFD,0x398649BD); +#endif + +// 2012-07-10aRagexe, 2012-07-10aRagexeRE +#if PACKETVER == 20120710 + packetKeys(0x0E8B7AFB,0x6930362D,0x42D33A57); +#endif + +// 2012-07-12aRagexe, 2012-07-12aRagexeRE +#if PACKETVER == 20120712 + packetKeys(0x0E8B7AFB,0x6930362D,0x42D33A57); +#endif + +// 2012-07-16aRagexe, 2012-07-16aRagexeRE +#if PACKETVER == 20120716 + packetKeys(0x76052205,0x22052205,0x22052205); +#endif + +// 2012-07-24aRagexe, 2012-07-24aRagexeRE +#if PACKETVER == 20120724 + packetKeys(0x783D5BC6,0x3AAC2176,0x66616F02); +#endif + +// 2012-08-01aRagexe, 2012-08-01aRagexeRE, 2012-08-01bRagexe, 2012-08-01bRagexeRE +#if PACKETVER == 20120801 + packetKeys(0x71FB6768,0x5843166B,0x6CB445C6); +#endif + +// 2012-08-08aRagexe, 2012-08-08aRagexeRE, 2012-08-08bRagexe, 2012-08-08bRagexeRE, 2012-08-08cRagexe, 2012-08-08cRagexeRE, 2012-08-08dRagexeRE +#if PACKETVER == 20120808 + packetKeys(0x5D5068BB,0x36732065,0x47CF7367); +#endif + +// 2012-08-14aRagexe, 2012-08-14aRagexeRE, 2012-08-14bRagexe, 2012-08-14bRagexeRE +#if PACKETVER == 20120814 + packetKeys(0x203E21BD,0x047459FB,0x56AF5A97); +#endif + +// 2012-08-22aRagexe, 2012-08-22aRagexeRE, 2012-08-22bRagexe, 2012-08-22bRagexeRE, 2012-08-22cRagexe, 2012-08-22cRagexeRE +#if PACKETVER == 20120822 + packetKeys(0x06A92E7B,0x3D324F29,0x5FD63004); +#endif + +// 2012-08-30aRagexe, 2012-08-30aRagexeRE, 2012-08-30bRagexeRE +#if PACKETVER == 20120830 + packetKeys(0x0AF1363D,0x4AB33E3B,0x48421DBE); +#endif + +// 2012-09-05aRagexe, 2012-09-05aRagexeRE +#if PACKETVER == 20120905 + packetKeys(0x04F50D80,0x092F5C4D,0x29BF3DCF); +#endif + +// 2012-09-11aRagexe, 2012-09-11aRagexeRE +#if PACKETVER == 20120911 + packetKeys(0x1F3D1145,0x02DB3C32,0x4BE34C49); +#endif + +// 2012-09-19aRagexe, 2012-09-19aRagexeRE +#if PACKETVER == 20120919 + packetKeys(0x72E00F24,0x4EA02D80,0x7C803480); +#endif + +// 2012-09-25aRagexe, 2012-09-25aRagexeRE +#if PACKETVER == 20120925 + packetKeys(0x43A66E22,0x36C2229F,0x08172ECE); +#endif + +// 2012-09-26aRagexe, 2012-09-26aRagexeRE +#if PACKETVER == 20120926 + packetKeys(0x43A66E22,0x36C2229F,0x08172ECE); +#endif + +// 2012-10-10aRagexe, 2012-10-10aRagexeRE, 2012-10-10bRagexe, 2012-10-10bRagexeRE +#if PACKETVER == 20121010 + packetKeys(0x169733E2,0x4C4640DC,0x31636531); +#endif + +// 2012-10-11aRagexeRE +#if PACKETVER == 20121011 + packetKeys(0x169733E2,0x4C4640DC,0x31636531); +#endif + +// 2012-10-17aRagexe, 2012-10-17aRagexeRE, 2012-10-17bRagexe, 2012-10-17bRagexeRE +#if PACKETVER == 20121017 + packetKeys(0x340C0C31,0x33205EA8,0x55964BFF); +#endif + +// 2012-10-24aRagexe, 2012-10-24aRagexeRE +#if PACKETVER == 20121024 + packetKeys(0x6166335C,0x45393483,0x7EDC5478); +#endif + +// 2012-10-31aRagexe, 2012-10-31aRagexeRE +#if PACKETVER == 20121031 + packetKeys(0x66EB7ADB,0x242864BB,0x354A4CDE); +#endif + +// 2012-11-07aRagexe, 2012-11-07aRagexeRE +#if PACKETVER == 20121107 + packetKeys(0x49967892,0x48025276,0x1E192CA3); +#endif + +// 2012-11-14aRagexe, 2012-11-14aRagexeRE +#if PACKETVER == 20121114 + packetKeys(0x3473545C,0x2706445C,0x79647616); +#endif + +// 2012-11-21aRagexe, 2012-11-21aRagexeRE +#if PACKETVER == 20121121 + packetKeys(0x6EB54B0B,0x3F2A6BE5,0x0B2866E6); +#endif + +// 2012-11-28aRagexe, 2012-11-28aRagexeRE +#if PACKETVER == 20121128 + packetKeys(0x146D4D5E,0x5C3D161B,0x759250B8); +#endif + +// 2012-12-05aRagexe, 2012-12-05aRagexeRE, 2012-12-05bRagexe, 2012-12-05bRagexeRE +#if PACKETVER == 20121205 + packetKeys(0x218C64B6,0x4EFE17AE,0x27EA5E74); +#endif + +// 2012-12-12aRagexe, 2012-12-12aRagexeRE, 2012-12-12bRagexe, 2012-12-12bRagexeRE, 2012-12-12cRagexeRE +#if PACKETVER == 20121212 + packetKeys(0x7F8026F0,0x32EE2A4B,0x73746C0E); +#endif + +// 2012-12-18aRagexe, 2012-12-18aRagexeRE, 2012-12-18bRagexe, 2012-12-18bRagexeRE +#if PACKETVER == 20121218 + packetKeys(0x6A5450A2,0x4322498A,0x2C6574FB); +#endif + +// 2012-12-27aRagexe, 2012-12-27aRagexeRE +#if PACKETVER == 20121227 + packetKeys(0x71773018,0x36A14EEB,0x28CD5A20); +#endif + +// 2013-01-03aRagexe, 2013-01-03aRagexeRE +#if PACKETVER == 20130103 + packetKeys(0x1E1A559A,0x199A799A,0x799A799A); +#endif + +// 2013-01-07aRagexe +#if PACKETVER == 20130107 + packetKeys(0x1E1A559A,0x199A799A,0x799A799A); +#endif + +// 2013-01-09aRagexe, 2013-01-09aRagexeRE +#if PACKETVER == 20130109 + packetKeys(0x6435360F,0x0A283678,0x64A04AC7); +#endif + +// 2013-01-15aRagexeRE, 2013-01-15bRagexe +#if PACKETVER == 20130115 + packetKeys(0x273C25CD,0x06AA48AF,0x45A01BD4); +#endif + +// 2013-01-16aRagexe, 2013-01-16aRagexeRE, 2013-01-16bRagexe +#if PACKETVER == 20130116 + packetKeys(0x273C25CD,0x06AA48AF,0x45A01BD4); +#endif + +// 2013-01-21aRagexe, 2013-01-21aRagexeRE +#if PACKETVER == 20130121 + packetKeys(0x5DD874B0,0x7D98233F,0x28FF5566); +#endif + +// 2013-01-30aRagexe, 2013-01-30aRagexeRE +#if PACKETVER == 20130130 + packetKeys(0x1EA57961,0x27786856,0x30301FA0); +#endif + +// 2013-02-06aRagexe, 2013-02-06aRagexeRE +#if PACKETVER == 20130206 + packetKeys(0x1D8F4227,0x675812AA,0x29132929); +#endif + +// 2013-02-15aRagexe, 2013-02-15aRagexeRE, 2013-02-15bRagexe +#if PACKETVER == 20130215 + packetKeys(0x69FB1C38,0x7D386860,0x62805311); +#endif + +// 2013-02-20aRagexe, 2013-02-20bRagexeRE +#if PACKETVER == 20130220 + packetKeys(0x0D555256,0x28C26722,0x72220A22); +#endif + +// 2013-02-27aRagexe, 2013-02-27aRagexeRE +#if PACKETVER == 20130227 + packetKeys(0x44F86842,0x43786A7A,0x71654528); +#endif + +// 2013-03-06aRagexe, 2013-03-06aRagexeRE, 2013-03-06bRagexeRE +#if PACKETVER == 20130306 + packetKeys(0x7E274326,0x7D182DF2,0x4FC27DFA); +#endif + +// 2013-03-13aRagexe, 2013-03-13aRagexeRE, 2013-03-13bRagexeRE, 2013-03-13cRagexeRE +#if PACKETVER == 20130313 + packetKeys(0x560021C3,0x6A5D110F,0x52BD40A5); +#endif + +// 2013-03-20bRagexeRE, 2013-03-20cRagexeRE, 2013-03-20dRagexe, 2013-03-20eRagexe +#if PACKETVER == 20130320 + packetKeys(0x3F094C49,0x55F86C1E,0x58AA359A); +#endif + +// 2013-03-27bRagexe, 2013-03-27bRagexeRE +#if PACKETVER == 20130327 + packetKeys(0x114B1BA0,0x2C4F0AE2,0x5FA1183F); +#endif + +// 2013-04-03aRagexe, 2013-04-03aRagexeRE +#if PACKETVER == 20130403 + packetKeys(0x424A43AE,0x4A9D5EBE,0x4B3518A9); +#endif + +// 2013-04-10aRagexe, 2013-04-10aRagexeRE +#if PACKETVER == 20130410 + packetKeys(0x3AD52ACA,0x314D1AED,0x086E415E); +#endif + +// 2013-04-17aRagexe, 2013-04-17aRagexeRE +#if PACKETVER == 20130417 + packetKeys(0x7FB13B83,0x6E003749,0x07A02B94); +#endif + +// 2013-04-24aRagexe, 2013-04-24aRagexeRE +#if PACKETVER == 20130424 + packetKeys(0x79F679F6,0x79F679F6,0x79F679F6); +#endif + +// 2013-05-02aRagexe, 2013-05-02aRagexeRE, 2013-05-02bRagexe +#if PACKETVER == 20130502 + packetKeys(0x62E733B9,0x62204281,0x7F044DCA); +#endif + +// 2013-05-08bRagexe, 2013-05-08bRagexeRE, 2013-05-08cRagexe, 2013-05-08dRagexe, 2013-05-08eRagexe, 2013-05-08fRagexe +#if PACKETVER == 20130508 + packetKeys(0x25421E49,0x175200BA,0x6C0B5239); +#endif + +// 2013-05-15aRagexe, 2013-05-15aRagexeRE +#if PACKETVER == 20130515 + packetKeys(0x75794A38,0x58A96BC1,0x296E6FB8); +#endif + +// 2013-05-22Ragexe, 2013-05-22aRagexe, 2013-05-22aRagexeRE +#if PACKETVER == 20130522 + packetKeys(0x6948050B,0x06511D9D,0x725D4DF1); +#endif + +// 2013-05-29Ragexe, 2013-05-29aRagexe, 2013-05-29aRagexeRE +#if PACKETVER == 20130529 + packetKeys(0x023A6C87,0x14BF1F1E,0x5CC70CC9); +#endif + +// 2013-06-05Ragexe, 2013-06-05aRagexe, 2013-06-05bRagexe, 2013-06-05cRagexeRE +#if PACKETVER == 20130605 + packetKeys(0x646E08D9,0x5F153AB5,0x61B509B5); +#endif + +// 2013-06-12aRagexe, 2013-06-12bRagexe, 2013-06-12bRagexeRE, 2013-06-12cRagexe, 2013-06-12dRagexe, 2013-06-12eRagexe +#if PACKETVER == 20130612 + packetKeys(0x6D166F66,0x3C000FCF,0x295B0FCB); +#endif + +// 2013-06-18aRagexe, 2013-06-18aRagexeRE +#if PACKETVER == 20130618 + packetKeys(0x434115DE,0x34A10FE9,0x6791428E); +#endif + +// 2013-06-26aRagexeRE, 2013-06-26bRagexe, 2013-06-26bRagexeRE, 2013-06-26cRagexe +#if PACKETVER == 20130626 + packetKeys(0x38F453EF,0x6A040FD8,0x65BD6668); +#endif + +// 2013-07-03aRagexe, 2013-07-03bRagexeRE +#if PACKETVER == 20130703 + packetKeys(0x4FF90E23,0x0F1432F2,0x4CFA1EDA); +#endif + +// 2013-07-10aRagexeRE, 2013-07-10bRagexe, 2013-07-10bRagexeRE, 2013-07-10cRagexeRE, 2013-07-10dRagexeRE, 2013-07-10eRagexeRE +#if PACKETVER == 20130710 + packetKeys(0x4A9C4237,0x4CCF3F8F,0x458F758F); +#endif + +// 2013-07-17cRagexe, 2013-07-17cRagexeRE, 2013-07-17dRagexeRE, 2013-07-17eRagexeRE +#if PACKETVER == 20130717 + packetKeys(0x5EE5520C,0x5F9E00CF,0x2BED4F91); +#endif + +// 2013-07-24eRagexe, 2013-07-24eRagexeRE, 2013-07-24fRagexeRE +#if PACKETVER == 20130724 + packetKeys(0x3C243BF5,0x42CC4E2F,0x02106EC6); +#endif + +// 2013-07-31cRagexe, 2013-07-31cRagexeRE +#if PACKETVER == 20130731 + packetKeys(0x1E9D11A6,0x21A232B8,0x6A9E02B7); +#endif + +// 2013-08-07aRagexe, 2013-08-07aRagexeRE +#if PACKETVER == 20130807 + packetKeys(0x7E241DE0,0x5E805580,0x3D807D80); +#endif + +// 2013-08-14aRagexe, 2013-08-14aRagexeRE +#if PACKETVER == 20130814 + packetKeys(0x23A23148,0x0C41420E,0x53785AD7); +#endif + +// 2013-08-21bRagexe, 2013-08-21dRagexeRE +#if PACKETVER == 20130821 + packetKeys(0x51673F38,0x01663512,0x5CFF0B3D); +#endif + +// 2013-08-28bRagexe, 2013-08-28bRagexeRE, 2013-08-28cRagexe, 2013-08-28cRagexeRE +#if PACKETVER == 20130828 + packetKeys(0x02EF7A9A,0x4882042F,0x76796678); +#endif + +// 2013-09-04aRagexe, 2013-09-04bRagexeRE +#if PACKETVER == 20130904 + packetKeys(0x41AF20C5,0x0997799E,0x4AE803A0); +#endif + +// 2013-09-11aRagexe, 2013-09-11aRagexeRE, 2013-09-11bRagexe, 2013-09-11bRagexeRE +#if PACKETVER == 20130911 + packetKeys(0x232B3F47,0x0AD0515F,0x1CA31828); +#endif + +// 2013-09-17aRagexe, 2013-09-17aRagexeRE +#if PACKETVER == 20130917 + packetKeys(0x5C9164C5,0x32B62F83,0x52864548); +#endif + +// 2013-09-25aRagexe, 2013-09-25aRagexeRE, 2013-09-25bRagexe, 2013-09-25bRagexeRE, 2013-09-25cRagexe +#if PACKETVER == 20130925 + packetKeys(0x4B9C279A,0x0C7849C4,0x72A77646); +#endif + +// 2013-10-02aRagexe, 2013-10-02aRagexeRE +#if PACKETVER == 20131002 + packetKeys(0x63A466F7,0x635362F3,0x41F369F3); +#endif + +// 2013-10-08aRagexe, 2013-10-08bRagexeRE +#if PACKETVER == 20131008 + packetKeys(0x64924AAD,0x08CA0445,0x1CBC36DE); +#endif + +// 2013-10-16aRagexe, 2013-10-16aRagexeRE, 2013-10-16bRagexe, 2013-10-16bRagexeRE +#if PACKETVER == 20131016 + packetKeys(0x33AD7A93,0x720C7C49,0x12C4205A); +#endif + +// 2013-10-23aRagexe, 2013-10-23aRagexeRE +#if PACKETVER == 20131023 + packetKeys(0x02EF6163,0x2B774814,0x58EC3036); +#endif + +// 2013-10-30aRagexe, 2013-10-30aRagexeRE +#if PACKETVER == 20131030 + packetKeys(0x4A6A3EFF,0x7E2D5237,0x01CA019E); +#endif + +// 2013-11-06aRagexe, 2013-11-06aRagexeRE +#if PACKETVER == 20131106 + packetKeys(0x143E528F,0x5CA05899,0x44B85B23); +#endif + +// 2013-11-07aRagexe, 2013-11-07cRagexe +#if PACKETVER == 20131107 + packetKeys(0x143E528F,0x5CA05899,0x44B85B23); +#endif + +// 2013-11-08aRagexe +#if PACKETVER == 20131108 + packetKeys(0x143E528F,0x5CA05899,0x44B85B23); +#endif + +// 2013-11-13aRagexeRE, 2013-11-13bRagexe +#if PACKETVER == 20131113 + packetKeys(0x44EA14CD,0x49311C88,0x40C86C31); +#endif + +// 2013-11-20dRagexe, 2013-11-20eRagexeRE +#if PACKETVER == 20131120 + packetKeys(0x541E5172,0x1B1D30A0,0x28AA7CE5); +#endif + +// 2013-11-27aRagexeRE, 2013-11-27bRagexe, 2013-11-27bRagexeRE +#if PACKETVER == 20131127 + packetKeys(0x21426A48,0x5C505D6A,0x046D06AD); +#endif + +// 2013-12-04dRagexeRE, 2013-12-04eRagexe, 2013-12-04eRagexeRE +#if PACKETVER == 20131204 + packetKeys(0x792760B2,0x5AF45387,0x36165603); +#endif + +// 2013-12-11cRagexeRE, 2013-12-11dRagexe, 2013-12-11eRagexeRE +#if PACKETVER == 20131211 + packetKeys(0x55B0394E,0x4D341FF2,0x60BC1DC3); +#endif + +// 2013-12-18aRagexeRE, 2013-12-18bRagexe +#if PACKETVER == 20131218 + packetKeys(0x6A596301,0x76866D0E,0x32294A45); +#endif + +// 2013-12-23aRagexeRE, 2013-12-23bRagexe, 2013-12-23bRagexeRE, 2013-12-23cRagexe, 2013-12-23xRagexeRE +#if PACKETVER == 20131223 + packetKeys(0x631C511C,0x111C111C,0x111C111C); +#endif + +// 2013-12-30aRagexe, 2013-12-30aRagexeRE +#if PACKETVER == 20131230 + packetKeys(0x611B7097,0x01F957A1,0x768A0FCB); +#endif + +// 2014-01-08bRagexeRE, 2014-01-08cRagexe, 2014-01-08cRagexeRE, 2014-01-08dRagexe +#if PACKETVER == 20140108 + packetKeys(0x4A1E26F2,0x231E7EFE,0x61FE19FE); +#endif + +// 2014-01-15aRagexe, 2014-01-15bRagexe, 2014-01-15cRagexeRE, 2014-01-15dRagexeRE, 2014-01-15eRagexe, 2014-01-15eRagexeRE +#if PACKETVER == 20140115 + packetKeys(0x63224335,0x0F3A1F27,0x6D217B24); +#endif + +// 2014-01-22aRagexe, 2014-01-22aRagexeRE +#if PACKETVER == 20140122 + packetKeys(0x6123177B,0x05B42C99,0x71702594); +#endif + +// 2014-01-29aRagexe, 2014-01-29bRagexeRE, 2014-01-29cRagexe +#if PACKETVER == 20140129 + packetKeys(0x2E52163C,0x605E518B,0x3C7A62CB); +#endif + +// 2014-02-05bRagexe, 2014-02-05bRagexeRE +#if PACKETVER == 20140205 + packetKeys(0x63DC7BDC,0x7BDC7BDC,0x7BDC7BDC); +#endif + +// 2014-02-12aRagexe, 2014-02-12aRagexeRE +#if PACKETVER == 20140212 + packetKeys(0x46837074,0x65292E89,0x77237F9C); +#endif + +// 2014-02-19aRagexe, 2014-02-19aRagexeRE, 2014-02-19bRagexeRE +#if PACKETVER == 20140219 + packetKeys(0x4E3C5327,0x3A6B5469,0x2CE36AED); +#endif + +// 2014-02-26aRagexe, 2014-02-26aRagexeRE, 2014-02-26bRagexeRE +#if PACKETVER == 20140226 + packetKeys(0x36D71056,0x52122F5E,0x6FF76E99); +#endif + +// 2014-03-05aRagexe, 2014-03-05aRagexeRE, 2014-03-05bRagexe, 2014-03-05bRagexeRE +#if PACKETVER == 20140305 + packetKeys(0x116763F2,0x41117DAC,0x7FD13C45); +#endif + +// 2014-03-12bRagexeRE, 2014-03-12dRagexe +#if PACKETVER == 20140312 + packetKeys(0x48911E4E,0x58CB2EB3,0x05232619); +#endif + +// 2014-03-19aRagexeRE +#if PACKETVER == 20140319 + packetKeys(0x3DA44383,0x1ABB165F,0x5B6846B9); +#endif + +// 2014-03-26aRagexe, 2014-03-26cRagexeRE +#if PACKETVER == 20140326 + packetKeys(0x68E72AF6,0x27DB4C3D,0x348F2677); +#endif + +// 2014-04-02eRagexeRE, 2014-04-02fRagexe, 2014-04-02fRagexeRE, 2014-04-02gRagexe +#if PACKETVER == 20140402 + packetKeys(0x15D3271C,0x004D725B,0x111A3A37); +#endif + +// 2014-04-09aRagexe, 2014-04-09aRagexeRE, 2014-04-09bRagexe +#if PACKETVER == 20140409 + packetKeys(0x7F6C390F,0x139C254C,0x7F25708C); +#endif + +// 2014-04-16aRagexe, 2014-04-16aRagexeRE, 2014-04-16bRagexe +#if PACKETVER == 20140416 + packetKeys(0x04810281,0x42814281,0x42814281); +#endif + +// 2014-04-23aRagexe, 2014-04-23aRagexeRE +#if PACKETVER == 20140423 + packetKeys(0x7E0D6B56,0x74673CD3,0x2EBA4940); +#endif + +// 2014-04-30aRagexeRE +#if PACKETVER == 20140430 + packetKeys(0x400145D8,0x3FE50155,0x11624F70); +#endif + +// 2014-05-08aRagexe, 2014-05-08bRagexe, 2014-05-08bRagexeRE +#if PACKETVER == 20140508 + packetKeys(0x087E57EC,0x25224F4A,0x024F12C6); +#endif + +// 2014-05-14bRagexe, 2014-05-14bRagexeRE, 2014-05-14cRagexeRE +#if PACKETVER == 20140514 + packetKeys(0x4BE46730,0x047926E0,0x37773BBB); +#endif + +// 2014-05-21aRagexeRE, 2014-05-21bRagexe +#if PACKETVER == 20140521 + packetKeys(0x14ED2D86,0x17371C33,0x2D0473C8); +#endif + +// 2014-05-28aRagexe, 2014-05-28aRagexeRE +#if PACKETVER == 20140528 + packetKeys(0x579445EB,0x26734878,0x7C861628); +#endif + +// 2014-06-05aRagexe, 2014-06-05aRagexeRE, 2014-06-05bRagexe +#if PACKETVER == 20140605 + packetKeys(0x5ABC4223,0x04DD2636,0x0D5850E0); +#endif + +// 2014-06-11bRagexeRE, 2014-06-11cRagexe, 2014-06-11dRagexe, 2014-06-11eRagexe, 2014-06-11hRagexe +#if PACKETVER == 20140611 + packetKeys(0x4FC83479,0x3AB04D1F,0x477B4010); +#endif + +// 2014-06-12aRagexe +#if PACKETVER == 20140612 + packetKeys(0x4FC83479,0x3AB04D1F,0x477B4010); +#endif + +// 2014-06-13aRagexe +#if PACKETVER == 20140613 + packetKeys(0x4FC83479,0x3AB04D1F,0x477B4010); +#endif + +// 2014-06-18aRagexe, 2014-06-18cRagexeRE +#if PACKETVER == 20140618 + packetKeys(0x2DB507BB,0x11BA12E7,0x7F447760); +#endif + +// 2014-06-25aRagexe, 2014-06-25aRagexeRE, 2014-06-25bRagexe +#if PACKETVER == 20140625 + packetKeys(0x09987045,0x644B1051,0x1A091CB8); +#endif + +// 2014-07-02aRagexe, 2014-07-02aRagexeRE +#if PACKETVER == 20140702 + packetKeys(0x5C4574F4,0x5D446386,0x48BD24C9); +#endif + +// 2014-07-09aRagexe, 2014-07-09aRagexeRE +#if PACKETVER == 20140709 + packetKeys(0x2C7A6E92,0x324F1B85,0x29916FC2); +#endif + +// 2014-07-16aRagexe, 2014-07-16aRagexeRE, 2014-07-16bRagexe, 2014-07-16cRagexe +#if PACKETVER == 20140716 + packetKeys(0x0EB20408,0x6D6C4292,0x4F6E4CF3); +#endif + +// 2014-07-23aRagexe, 2014-07-23aRagexeRE, 2014-07-23bRagexe, 2014-07-23bRagexeRE +#if PACKETVER == 20140723 + packetKeys(0x42A21713,0x51CE6EAD,0x102F7B0B); +#endif + +// 2014-07-30aRagexe, 2014-07-30bRagexeRE +#if PACKETVER == 20140730 + packetKeys(0x63CE4E53,0x04F969A3,0x690954DB); +#endif + +// 2014-08-06aRagexe, 2014-08-06aRagexeRE, 2014-08-06bRagexe +#if PACKETVER == 20140806 + packetKeys(0x0D5B69AC,0x3C001F20,0x0C201420); +#endif + +// 2014-08-13aRagexe, 2014-08-13aRagexeRE, 2014-08-13bRagexe +#if PACKETVER == 20140813 + packetKeys(0x7AD51E0A,0x28C72C46,0x210205BD); +#endif + +// 2014-08-14aRagexe +#if PACKETVER == 20140814 + packetKeys(0x7AD51E0A,0x28C72C46,0x210205BD); +#endif + +// 2014-08-20aRagexe, 2014-08-20aRagexeRE +#if PACKETVER == 20140820 + packetKeys(0x374F15D0,0x64C87DEC,0x65CE2A41); +#endif + +// 2014-08-27aRagexe +#if PACKETVER == 20140827 + packetKeys(0x53814CA2,0x27DE193E,0x503E683E); +#endif + +// 2014-09-03aRagexe, 2014-09-03aRagexeRE +#if PACKETVER == 20140903 + packetKeys(0x2F386F34,0x0F935365,0x76A43888); +#endif + +// 2014-09-17aRagexe +#if PACKETVER == 20140917 + packetKeys(0x180118EA,0x440134CF,0x3A99179D); +#endif + +// 2014-09-24bRagexeRE, 2014-09-24cRagexe, 2014-09-24cRagexeRE +#if PACKETVER == 20140924 + packetKeys(0x6F5222D8,0x593B798C,0x4CBD655E); +#endif + +// 2014-10-01aRagexe, 2014-10-01bRagexeRE, 2014-10-01cRagexeRE +#if PACKETVER == 20141001 + packetKeys(0x6D882C11,0x7DF959E2,0x4F3F60E8); +#endif + +// 2014-10-08aRagexe, 2014-10-08bRagexe, 2014-10-08bRagexeRE, 2014-10-08cRagexe, 2014-10-08cRagexeRE, 2014-10-08dRagexe +#if PACKETVER == 20141008 + packetKeys(0x754365B3,0x36B326B3,0x26B326B3); +#endif + +// 2014-10-15bRagexe, 2014-10-15bRagexeRE, 2014-10-15cRagexe, 2014-10-15dRagexe +#if PACKETVER == 20141015 + packetKeys(0x2DFF467C,0x444B37EE,0x2C1B634F); +#endif + +// 2014-10-16aRagexe, 2014-10-16aRagexeRE +#if PACKETVER == 20141016 + packetKeys(0x2DFF467C,0x444B37EE,0x2C1B634F); +#endif + +// 2014-10-22aRagexeRE, 2014-10-22bRagexe +#if PACKETVER == 20141022 + packetKeys(0x290551EA,0x2B952C75,0x2D67669B); +#endif + +// 2014-10-29aRagexe, 2014-10-29aRagexeRE +#if PACKETVER == 20141029 + packetKeys(0x1AFD581D,0x2E1D4E1D,0x4E1D4E1D); +#endif + +// 2014-11-05aRagexe, 2014-11-05aRagexeRE, 2014-11-05bRagexe, 2014-11-05bRagexeRE +#if PACKETVER == 20141105 + packetKeys(0x7F310819,0x5FF45401,0x2D303DD9); +#endif + +// 2014-11-12aRagexeRE, 2014-11-12cRagexe, 2014-11-12dRagexe +#if PACKETVER == 20141112 + packetKeys(0x430C0C27,0x067153CF,0x5E5439A9); +#endif + +// 2014-11-19bRagexeRE, 2014-11-19dRagexe +#if PACKETVER == 20141119 + packetKeys(0x7A7E7EDE,0x24EB02E3,0x71603607); +#endif + +// 2014-11-26aRagexe, 2014-11-26aRagexeRE, 2014-11-26bRagexe, 2014-11-26bRagexeRE, 2014-11-26cRagexe, 2014-11-26cRagexeRE, 2014-11-26dRagexe, 2014-11-26dRagexeRE, 2014-11-26eRagexeRE +#if PACKETVER == 20141126 + packetKeys(0x01E14C42,0x56D73044,0x4B3278DF); +#endif + +// 2014-12-03aRagexe, 2014-12-03aRagexeRE +#if PACKETVER == 20141203 + packetKeys(0x66CB52E4,0x1EB84093,0x33563E18); +#endif + +// 2014-12-10bRagexe, 2014-12-10cRagexe, 2014-12-10cRagexeRE +#if PACKETVER == 20141210 + packetKeys(0x0B0B1DD3,0x26EF1797,0x4F40370B); +#endif + +// 2014-12-17aRagexeRE +#if PACKETVER == 20141217 + packetKeys(0x01AB478C,0x0FDE58F2,0x1DAC7303); +#endif + +// 2014-12-23cRagexeRE +#if PACKETVER == 20141223 + packetKeys(0x2E8936E6,0x34463C46,0x67CD3885); +#endif + +// 2014-12-24aRagexe +#if PACKETVER == 20141224 + packetKeys(0x2E8936E6,0x34463C46,0x67CD3885); +#endif + +// 2014-12-31aRagexe, 2014-12-31aRagexeRE +#if PACKETVER == 20141231 + packetKeys(0x154C347E,0x54B26512,0x52126A12); +#endif + +// 2015-01-07aRagexe, 2015-01-07aRagexeRE +#if PACKETVER == 20150107 + packetKeys(0x6C494A14,0x4DDB6427,0x3E6D7B65); +#endif + +// 2015-01-14aRagexe, 2015-01-14aRagexeRE, 2015-01-14bRagexe, 2015-01-14cRagexe, 2015-01-14dRagexe +#if PACKETVER == 20150114 + packetKeys(0x21C96102,0x13142934,0x1ABF4EA3); +#endif + +// 2015-01-21aRagexe, 2015-01-21aRagexeRE, 2015-01-21bRagexeRE +#if PACKETVER == 20150121 + packetKeys(0x0B9D2AF5,0x658A3346,0x379E3654); +#endif + +// 2015-01-28aRagexe, 2015-01-28aRagexeRE +#if PACKETVER == 20150128 + packetKeys(0x77CA2D55,0x28B608F0,0x75B47957); +#endif + +// 2015-01-29aRagexe +#if PACKETVER == 20150129 + packetKeys(0x77CA2D55,0x28B608F0,0x75B47957); +#endif + +// 2015-01-30aRagexe +#if PACKETVER == 20150130 + packetKeys(0x77CA2D55,0x28B608F0,0x75B47957); +#endif + +// 2015-02-04aRagexe, 2015-02-04cRagexeRE +#if PACKETVER == 20150204 + packetKeys(0x134529DB,0x5B4F6CEF,0x29EF11EF); +#endif + +// 2015-02-11aRagexe, 2015-02-11aRagexeRE +#if PACKETVER == 20150211 + packetKeys(0x33911A25,0x1E6945FD,0x7385623A); +#endif + +// 2015-02-17aRagexe, 2015-02-17aRagexeRE +#if PACKETVER == 20150217 + packetKeys(0x731B731B,0x731B731B,0x731B731B); +#endif + +// 2015-02-25aRagexeRE, 2015-02-25bRagexeRE, 2015-02-25cRagexeRE, 2015-02-25dRagexeRE, 2015-02-25eRagexe, 2015-02-25eRagexeRE, 2015-02-25fRagexe, 2015-02-25gRagexe, 2015-02-25hRagexe, 2015-02-25iRagexe, 2015-02-25jRagexe +#if PACKETVER == 20150225 + packetKeys(0x57FD4B7B,0x19CC16FB,0x0D255D72); +#endif + +// 2015-02-26aRagexe, 2015-02-26aRagexeRE +#if PACKETVER == 20150226 + packetKeys(0x57FD4B7B,0x19CC16FB,0x0D255D72); +#endif + +// 2015-03-04aRagexe, 2015-03-04aRagexeRE, 2015-03-04bRagexeRE +#if PACKETVER == 20150304 + packetKeys(0x1A657B1C,0x7E1806E7,0x55396A5C); +#endif + +// 2015-03-11aRagexe, 2015-03-11aRagexeRE, 2015-03-11bRagexe, 2015-03-11bRagexeRE +#if PACKETVER == 20150311 + packetKeys(0x48C45D97,0x06CE09B0,0x5836642F); +#endif + +// 2015-03-18aRagexe, 2015-03-18aRagexeRE, 2015-03-18bRagexe, 2015-03-18bRagexeRE, 2015-03-18cRagexeRE +#if PACKETVER == 20150318 + packetKeys(0x1B3738E7,0x0AD4238F,0x7D252A1F); +#endif + +// 2015-03-25aRagexe, 2015-03-25bRagexeRE, 2015-03-25cRagexeRE +#if PACKETVER == 20150325 + packetKeys(0x68F62B8C,0x337C3468,0x38FC0AC7); +#endif + +// 2015-04-01aRagexe, 2015-04-01bRagexeRE +#if PACKETVER == 20150401 + packetKeys(0x207F3A08,0x57E6160C,0x02A60382); +#endif + +// 2015-04-08aRagexe, 2015-04-08aRagexeRE +#if PACKETVER == 20150408 + packetKeys(0x39812C9D,0x23DA516E,0x59A33DD2); +#endif + +// 2015-04-15aRagexe, 2015-04-15aRagexeRE +#if PACKETVER == 20150415 + packetKeys(0x7EC44F6A,0x7DE57139,0x60DA5436); +#endif + +// 2015-04-22aRagexe, 2015-04-22aRagexeRE +#if PACKETVER == 20150422 + packetKeys(0x10D22CE2,0x69E279E2,0x79E279E2); +#endif + +// 2015-04-29aRagexe, 2015-04-29aRagexeRE +#if PACKETVER == 20150429 + packetKeys(0x2BF61A71,0x565D5DDF,0x0FB90019); +#endif + +// 2015-05-07bRagexe, 2015-05-07bRagexeRE, 2015-05-07cRagexe +#if PACKETVER == 20150507 + packetKeys(0x55B54373,0x58967821,0x67F41832); +#endif + +// 2015-05-13aRagexe, 2015-05-13aRagexeRE +#if PACKETVER == 20150513 + packetKeys(0x62C86D09,0x75944F17,0x112C133D); +#endif + +// 2015-05-20aRagexe, 2015-05-20aRagexeRE +#if PACKETVER == 20150520 + packetKeys(0x17430238,0x44DE585F,0x56A40616); +#endif + +// 2015-05-27aRagexe, 2015-05-27aRagexeRE +#if PACKETVER == 20150527 + packetKeys(0x35AE7BAE,0x3BAE3BAE,0x3BAE3BAE); +#endif + +// 2015-06-03aRagexe, 2015-06-03bRagexeRE +#if PACKETVER == 20150603 + packetKeys(0x1DDD245D,0x309446E0,0x58E53F1F); +#endif + +// 2015-06-10aRagexe, 2015-06-10aRagexeRE +#if PACKETVER == 20150610 + packetKeys(0x2FC406D3,0x7B3E32F5,0x02B80B47); +#endif + +// 2015-06-17aRagexe, 2015-06-17aRagexeRE +#if PACKETVER == 20150617 + packetKeys(0x250F7E09,0x25416076,0x029A780E); +#endif + +// 2015-06-18aRagexe, 2015-06-18aRagexeRE +#if PACKETVER == 20150618 + packetKeys(0x250F7E09,0x25416076,0x029A780E); +#endif + +// 2015-06-24aRagexe, 2015-06-24aRagexeRE +#if PACKETVER == 20150624 + packetKeys(0x440B0E24,0x1BEA7A4C,0x2C646784); +#endif + +// 2015-07-01bRagexeRE +#if PACKETVER == 20150701 + packetKeys(0x4DD55F9B,0x70C67B03,0x78C60DB6); +#endif + +// 2015-07-02aRagexe +#if PACKETVER == 20150702 + packetKeys(0x4DD55F9B,0x70C67B03,0x78C60DB6); +#endif + +// 2015-07-08bRagexeRE, 2015-07-08cRagexe, 2015-07-08cRagexeRE, 2015-07-08dRagexeRE +#if PACKETVER == 20150708 + packetKeys(0x451C5E19,0x5661750B,0x2F4644AC); +#endif + +// 2015-07-15aRagexe, 2015-07-15aRagexeRE +#if PACKETVER == 20150715 + packetKeys(0x1F805483,0x67745585,0x7FCE189C); +#endif + +// 2015-07-22bRagexeRE +#if PACKETVER == 20150722 + packetKeys(0x41FA53D4,0x2CF044E2,0x663A3F1D); +#endif + +// 2015-07-29aRagexe, 2015-07-29aRagexeRE +#if PACKETVER == 20150729 + packetKeys(0x08EE40A9,0x206F3D7F,0x0AE37339); +#endif + +// 2015-08-05aRagexe, 2015-08-05dRagexeRE +#if PACKETVER == 20150805 + packetKeys(0x1C3F243F,0x243F243F,0x243F243F); +#endif + +// 2015-08-12aRagexe, 2015-08-12aRagexeRE +#if PACKETVER == 20150812 + packetKeys(0x0B6F64A8,0x5BCC47EC,0x00EC08EC); +#endif + +// 2015-08-19aRagexe, 2015-08-19aRagexeRE, 2015-08-19bRagexeRE +#if PACKETVER == 20150819 + packetKeys(0x1A2400E0,0x736E5686,0x10F315D5); +#endif + +// 2015-08-26aRagexe, 2015-08-26aRagexeRE, 2015-08-26bRagexe, 2015-08-26bRagexeRE +#if PACKETVER == 20150826 + packetKeys(0x77883C56,0x1829359F,0x0DE635B6); +#endif + +// 2015-09-02aRagexe, 2015-09-02aRagexeRE +#if PACKETVER == 20150902 + packetKeys(0x4EDB18C1,0x6B9355BA,0x38AA6239); +#endif + +// 2015-09-09aRagexe, 2015-09-09aRagexeRE +#if PACKETVER == 20150909 + packetKeys(0x19AB2BF0,0x04754299,0x48770736); +#endif + +// 2015-09-16aRagexe, 2015-09-16aRagexeRE, 2015-09-16cRagexe, 2015-09-16cRagexeRE +#if PACKETVER == 20150916 + packetKeys(0x17F83A19,0x116944F4,0x1CC541E9); +#endif + +// 2015-09-23bRagexe, 2015-09-23bRagexeRE, 2015-09-23cRagexe, 2015-09-23eRagexe, 2015-09-23eRagexeRE, 2015-09-23fRagexe, 2015-09-23fRagexeRE +#if PACKETVER == 20150923 + packetKeys(0x765742B9,0x22D61C2F,0x7DA94FB2); +#endif + +// 2015-10-01aRagexe, 2015-10-01bRagexeRE +#if PACKETVER == 20151001 + packetKeys(0x5CFF4561,0x32514AD1,0x06D126D1); +#endif + +// 2015-10-07aRagexe, 2015-10-07aRagexeRE +#if PACKETVER == 20151007 + packetKeys(0x3C6447A8,0x032170D7,0x6490476C); +#endif + +// 2015-10-14bRagexe, 2015-10-14bRagexeRE +#if PACKETVER == 20151014 + packetKeys(0x402728A8,0x5D0E309F,0x240018FD); +#endif + +// 2015-10-21aRagexe +#if PACKETVER == 20151021 + packetKeys(0x0311104D,0x46C326D6,0x00E82720); +#endif + +// 2015-10-22aRagexe, 2015-10-22aRagexeRE +#if PACKETVER == 20151022 + packetKeys(0x0311104D,0x46C326D6,0x00E82720); +#endif + +// 2015-10-28cRagexe, 2015-10-28cRagexeRE, 2015-10-28dRagexe, 2015-10-28dRagexeRE +#if PACKETVER == 20151028 + packetKeys(0x45B945B9,0x45B945B9,0x45B945B9); +#endif + +// 2015-10-29aRagexe, 2015-10-29aRagexeRE +#if PACKETVER == 20151029 + packetKeys(0x45B945B9,0x45B945B9,0x45B945B9); +#endif + +// 2015-11-04aRagexe, 2015-11-04aRagexeRE +#if PACKETVER == 20151104 + packetKeys(0x4C17382A,0x7ED174C9,0x29961E4F); +#endif + +// 2015-11-11aRagexe, 2015-11-11aRagexeRE, 2015-11-11bRagexe +#if PACKETVER == 20151111 + packetKeys(0x46097C77,0x5F193871,0x29140A21); +#endif + +// 2015-11-18aRagexe, 2015-11-18aRagexeRE +#if PACKETVER == 20151118 + packetKeys(0x734C3241,0x6E846F34,0x731C06D6); +#endif + +// 2015-11-25bRagexe, 2015-11-25bRagexeRE, 2015-11-25cRagexeRE, 2015-11-25dRagexe, 2015-11-25dRagexeRE +#if PACKETVER == 20151125 + packetKeys(0x237446C0,0x5EFB343A,0x0EDF06C5); +#endif + +// 2015-12-02aRagexe, 2015-12-02bRagexeRE +#if PACKETVER == 20151202 + packetKeys(0x4EDE52DE,0x52DE52DE,0x52DE52DE); +#endif + +// 2015-12-09aRagexe, 2015-12-09aRagexeRE +#if PACKETVER == 20151209 + packetKeys(0x652C5898,0x7A351FB3,0x67EA2886); +#endif + +// 2015-12-16aRagexe, 2015-12-16aRagexeRE +#if PACKETVER == 20151216 + packetKeys(0x25DD643D,0x61AC39DE,0x77A8206D); +#endif + +// 2015-12-23bRagexe, 2015-12-23bRagexeRE +#if PACKETVER == 20151223 + packetKeys(0x347D68D0,0x2C705320,0x7B4A199D); +#endif + +// 2015-12-30aRagexe +#if PACKETVER == 20151230 + packetKeys(0x54C51241,0x33883499,0x3CDA35F0); +#endif + +// 2016-01-06aRagexe, 2016-01-06aRagexeRE +#if PACKETVER == 20160106 + packetKeys(0x40520265,0x33FE26FC,0x7136294F); +#endif + +// 2016-01-13aRagexe, 2016-01-13aRagexeRE, 2016-01-13bRagexe, 2016-01-13bRagexeRE, 2016-01-13cRagexeRE +#if PACKETVER == 20160113 + packetKeys(0x18005C4B,0x19A94A72,0x73F678EC); +#endif + +// 2016-01-20aRagexe, 2016-01-20aRagexeRE +#if PACKETVER == 20160120 + packetKeys(0x51495149,0x51495149,0x51495149); +#endif + +// 2016-01-27aRagexeRE, 2016-01-27bRagexeRE, 2016-01-27cRagexe, 2016-01-27dRagexe +#if PACKETVER == 20160127 + packetKeys(0x6B1E7146,0x612C47E6,0x274E56EE); +#endif + +// 2016-02-03aRagexe, 2016-02-03aRagexeRE +#if PACKETVER == 20160203 + packetKeys(0x3E1411AF,0x6C744497,0x7CFA1BDE); +#endif + +// 2016-02-11aRagexe, 2016-02-11aRagexeRE +#if PACKETVER == 20160211 + packetKeys(0x613813EA,0x05251DAB,0x1FD35E33); +#endif + +// 2016-02-17aRagexe, 2016-02-17aRagexeRE, 2016-02-17bRagexeRE, 2016-02-17cRagexeRE +#if PACKETVER == 20160217 + packetKeys(0x25895A8E,0x09421C19,0x763A2D7A); +#endif + +// 2016-02-24aRagexe, 2016-02-24aRagexeRE, 2016-02-24bRagexeRE +#if PACKETVER == 20160224 + packetKeys(0x7088019A,0x13471F02,0x42356A7D); +#endif + +// 2016-03-02bRagexe, 2016-03-02bRagexeRE +#if PACKETVER == 20160302 + packetKeys(0x7B4441B9,0x5BBC63AF,0x45DA0E71); +#endif + +// 2016-03-09aRagexeRE, 2016-03-09cRagexe +#if PACKETVER == 20160309 + packetKeys(0x21587520,0x353A7706,0x1B722B25); +#endif + +// 2016-03-16aRagexe, 2016-03-16aRagexeRE +#if PACKETVER == 20160316 + packetKeys(0x62363E36,0x3E363E36,0x3E363E36); +#endif + +// 2016-03-18aRagexe +#if PACKETVER == 20160318 + packetKeys(0x62363E36,0x3E363E36,0x3E363E36); +#endif + +// 2016-03-23aRagexe, 2016-03-23aRagexeRE, 2016-03-23bRagexe +#if PACKETVER == 20160323 + packetKeys(0x73E35A83,0x62142FA8,0x12BA36BD); +#endif + +// 2016-03-30aRagexe, 2016-03-30aRagexeRE, 2016-03-30bRagexe +#if PACKETVER == 20160330 + packetKeys(0x02050940,0x545336FF,0x7E7D4902); +#endif + +// 2016-04-06aRagexe, 2016-04-06aRagexeRE, 2016-04-06bRagexe +#if PACKETVER == 20160406 + packetKeys(0x568611EA,0x32457D8D,0x2B020477); +#endif + +// 2016-04-14aRagexe, 2016-04-14aRagexeRE, 2016-04-14bRagexe, 2016-04-14bRagexeRE, 2016-04-14cRagexe +#if PACKETVER == 20160414 + packetKeys(0x31BD479A,0x40C61398,0x397C1A80); +#endif + +// 2016-04-20aRagexeRE, 2016-04-20cRagexe +#if PACKETVER == 20160420 + packetKeys(0x67D2163A,0x3068215B,0x4835474D); +#endif + +// 2016-04-27aRagexeRE +#if PACKETVER == 20160427 + packetKeys(0x12DC378E,0x4E3E7EBE,0x0ABE2ABE); +#endif + +// 2016-05-04aRagexe, 2016-05-04aRagexeRE +#if PACKETVER == 20160504 + packetKeys(0x09E0544C,0x0231251D,0x2F4E195F); +#endif + +// 2016-05-11aRagexe, 2016-05-11aRagexeRE, 2016-05-11bRagexeRE +#if PACKETVER == 20160511 + packetKeys(0x3C666FE2,0x27E84E3E,0x53E11BA5); +#endif + +// 2016-05-18aRagexe, 2016-05-18aRagexeRE +#if PACKETVER == 20160518 + packetKeys(0x57DB7CA1,0x1FEA1629,0x26DD244D); +#endif + +// 2016-05-25aRagexe, 2016-05-25aRagexeRE +#if PACKETVER == 20160525 + packetKeys(0x485C45B6,0x47DC6192,0x76B34A36); +#endif + +// 2016-05-26aRagexe +#if PACKETVER == 20160526 + packetKeys(0x485C45B6,0x47DC6192,0x76B34A36); +#endif + +// 2016-06-01aRagexe, 2016-06-01aRagexeRE +#if PACKETVER == 20160601 + packetKeys(0x3DAD32C4,0x59F001BE,0x73F65E56); +#endif + +// 2016-06-08aRagexe, 2016-06-08aRagexeRE, 2016-06-08bRagexe, 2016-06-08bRagexeRE +#if PACKETVER == 20160608 + packetKeys(0x11D74609,0x77C43E8A,0x44290F53); +#endif + +// 2016-06-09aRagexe +#if PACKETVER == 20160609 + packetKeys(0x11D74609,0x77C43E8A,0x44290F53); +#endif + +// 2016-06-15aRagexe, 2016-06-15aRagexeRE +#if PACKETVER == 20160615 + packetKeys(0x062C5C26,0x6CF47E82,0x4DD53480); +#endif + +// 2016-06-22aRagexe, 2016-06-22aRagexeRE +#if PACKETVER == 20160622 + packetKeys(0x426548AB,0x5C0F5DD4,0x03022710); +#endif + +// 2016-06-29aRagexe, 2016-06-29aRagexeRE +#if PACKETVER == 20160629 + packetKeys(0x0DF31CCC,0x54281606,0x5C4C6855); +#endif + +// 2016-06-30aRagexe, 2016-06-30aRagexeRE +#if PACKETVER == 20160630 + packetKeys(0x0DF31CCC,0x54281606,0x5C4C6855); +#endif + +// 2016-07-06bRagexe, 2016-07-06cRagexeRE +#if PACKETVER == 20160706 + packetKeys(0x33A766D0,0x743F04F8,0x0FA0276C); +#endif + +// 2016-07-13aRagexe, 2016-07-13aRagexeRE, 2016-07-13bRagexeRE, 2016-07-13cRagexe, 2016-07-13dRagexe +#if PACKETVER == 20160713 + packetKeys(0x714F2495,0x7DDC6F32,0x3FD8533D); +#endif + +// 2016-07-20aRagexe, 2016-07-20aRagexeRE, 2016-07-20bRagexe, 2016-07-20bRagexeRE +#if PACKETVER == 20160720 + packetKeys(0x4F8A19C0,0x2D8E085C,0x37BB67D6); +#endif + +// 2016-07-27aRagexe, 2016-07-27aRagexeRE, 2016-07-27bRagexe, 2016-07-27bRagexeRE +#if PACKETVER == 20160727 + packetKeys(0x3C6952AB,0x26E4077F,0x37E25DF7); +#endif + +// 2016-08-03bRagexe, 2016-08-03bRagexeRE +#if PACKETVER == 20160803 + packetKeys(0x67F438C2,0x512A4EB7,0x2D353182); +#endif + +// 2016-08-10aRagexe, 2016-08-10aRagexeRE +#if PACKETVER == 20160810 + packetKeys(0x2F252886,0x242234A2,0x48BC5032); +#endif + +// 2016-08-17aRagexe +#if PACKETVER == 20160817 + packetKeys(0x675E6900,0x3F8E1D16,0x58D650E5); +#endif + +// 2016-08-31aRagexeRE, 2016-08-31bRagexeRE +#if PACKETVER == 20160831 + packetKeys(0x564E13B0,0x7F680549,0x382D273B); +#endif + +// 2016-09-07aRagexe, 2016-09-07aRagexeRE +#if PACKETVER == 20160907 + packetKeys(0x32E5237D,0x57BD4DBD,0x5DBD5DBD); +#endif + +// 2016-09-13aRagexe, 2016-09-13aRagexeRE +#if PACKETVER == 20160913 + packetKeys(0x7C79748F,0x1AA03B1D,0x6EAC4747); +#endif + +// 2016-09-21bRagexeRE +#if PACKETVER == 20160921 + packetKeys(0x11CD15CD,0x15CD15CD,0x15CD15CD); +#endif + +// 2016-09-28cRagexeRE, 2016-09-28dRagexeRE +#if PACKETVER == 20160928 + packetKeys(0x2F8C67F5,0x22D42C38,0x57513774); +#endif + +// 2016-10-05aRagexeRE +#if PACKETVER == 20161005 + packetKeys(0x5BAE21F8,0x021E2FFC,0x3BEB7C31); +#endif + +// 2016-10-12aRagexeRE +#if PACKETVER == 20161012 + packetKeys(0x5E2311F2,0x14FD012C,0x76EB64F6); +#endif + +// 2016-10-19aRagexeRE +#if PACKETVER == 20161019 + packetKeys(0x34882F11,0x7C870E70,0x7E61350D); +#endif + +// 2016-10-26bRagexeRE, 2016-10-26cRagexeRE +#if PACKETVER == 20161026 + packetKeys(0x2CB86AE6,0x7D12660E,0x1B004DEB); +#endif + +// 2016-11-02aRagexe, 2016-11-02aRagexeRE +#if PACKETVER == 20161102 + packetKeys(0x76725C17,0x72FE4EC1,0x07A91BFD); +#endif + +// 2016-11-03aRagexeRE +#if PACKETVER == 20161103 + packetKeys(0x76725C17,0x72FE4EC1,0x07A91BFD); +#endif + +// 2016-11-09aRagexe, 2016-11-09bRagexeRE, 2016-11-09cRagexeRE, 2016-11-09dRagexeRE +#if PACKETVER == 20161109 + packetKeys(0x0A5277C0,0x2DB17506,0x0E8F26DA); +#endif + +// 2016-11-16aRagexe, 2016-11-16bRagexeRE, 2016-11-16cRagexeRE +#if PACKETVER == 20161116 + packetKeys(0x780C5C3F,0x15E92272,0x2BA770C5); +#endif + +// 2016-11-23aRagexe, 2016-11-23aRagexeRE +#if PACKETVER == 20161123 + packetKeys(0x66FF559F,0x00D3535B,0x236246F7); +#endif + +// 2016-11-30aRagexeRE, 2016-11-30bRagexeRE +#if PACKETVER == 20161130 + packetKeys(0x2ED80296,0x0D837373,0x20266F9A); +#endif + +// 2016-12-07cRagexeRE, 2016-12-07dRagexeRE, 2016-12-07eRagexeRE +#if PACKETVER == 20161207 + packetKeys(0x52D267AA,0x4FE42156,0x1292153E); +#endif + +// 2016-12-14bRagexeRE, 2016-12-14cRagexe, 2016-12-14cRagexeRE +#if PACKETVER == 20161214 + packetKeys(0x4DDE217B,0x07863AE0,0x5B591656); +#endif + +// 2016-12-21aRagexeRE, 2016-12-21bRagexeRE, 2016-12-21cRagexeRE, 2016-12-21dRagexeRE +#if PACKETVER == 20161221 + packetKeys(0x69CB4F56,0x793C165E,0x673A2354); +#endif + +// 2016-12-28aRagexe, 2016-12-28aRagexeRE +#if PACKETVER == 20161228 + packetKeys(0x09366971,0x005672F1,0x6F3712AE); +#endif + +// 2017-01-04bRagexeRE +#if PACKETVER == 20170104 + packetKeys(0x44416BC3,0x6C8D1817,0x072D75D5); +#endif + +// 2017-01-11aRagexeRE +#if PACKETVER == 20170111 + packetKeys(0x19B637F9,0x0E9C378A,0x41673186); +#endif + +// 2017-01-18aRagexe, 2017-01-18aRagexeRE +#if PACKETVER == 20170118 + packetKeys(0x456B36EB,0x15EB34B0,0x18C42E43); +#endif + +// 2017-01-25aRagexe, 2017-01-25aRagexeRE +#if PACKETVER == 20170125 + packetKeys(0x066E04FE,0x3004224A,0x04FF0458); +#endif + +// 2017-02-01aRagexe, 2017-02-01aRagexeRE +#if PACKETVER == 20170201 + packetKeys(0x2011228E,0x00453005,0x628E7F0A); +#endif + +// 2017-02-08aRagexeRE, 2017-02-08bRagexeRE +#if PACKETVER == 20170208 + packetKeys(0x6A764E5F,0x0609570D,0x28AE07FA); +#endif + +// 2017-02-15aRagexeRE +#if PACKETVER == 20170215 + packetKeys(0x50C01315,0x51012A42,0x679E16C3); +#endif + +// 2017-02-22aRagexe, 2017-02-22aRagexeRE +#if PACKETVER == 20170222 + packetKeys(0x5A242F2F,0x6C556187,0x73C022CB); +#endif + +// 2017-02-28aRagexe, 2017-02-28aRagexeRE, 2017-02-28bRagexe +#if PACKETVER == 20170228 + packetKeys(0x771D4F2B,0x20EF1F4C,0x0D5135C8); +#endif + +// 2017-03-08bRagexeRE +#if PACKETVER == 20170308 + packetKeys(0x653470A9,0x6B316A71,0x5C712C71); +#endif + +// 2017-03-15cRagexe, 2017-03-15cRagexeRE +#if PACKETVER == 20170315 + packetKeys(0x399A0856,0x56642A94,0x7F77157D); +#endif + +// 2017-03-22aRagexeRE, 2017-03-22bRagexeRE +#if PACKETVER == 20170322 + packetKeys(0x2050167B,0x01731233,0x40337033); +#endif + +// 2017-03-29cRagexe, 2017-03-29cRagexeRE, 2017-03-29dRagexeRE +#if PACKETVER == 20170329 + packetKeys(0x18B31A80,0x1B0B1D56,0x16857D6A); +#endif + +// 2017-04-05bRagexe, 2017-04-05bRagexeRE, 2017-04-05cRagexe, 2017-04-05cRagexeRE +#if PACKETVER == 20170405 + packetKeys(0x1FDE7DAC,0x2F9F5B63,0x3F2062AF); +#endif + +// 2017-04-12aRagexe, 2017-04-12aRagexeRE +#if PACKETVER == 20170412 + packetKeys(0x39223393,0x5C847779,0x10217985); +#endif + +// 2017-04-19bRagexeRE +#if PACKETVER == 20170419 + packetKeys(0x1F8F4B3F,0x2E481F03,0x39ED4178); +#endif + +// 2017-04-26dRagexeRE +#if PACKETVER == 20170426 + packetKeys(0x167642A7,0x1DEC3D26,0x6D046D4C); +#endif + +// 2017-05-02dRagexeRE +#if PACKETVER == 20170502 + packetKeys(0x05224194,0x466D4204,0x31F02EE0); +#endif + +// 2017-05-17aRagexeRE, 2017-05-17bRagexeRE +#if PACKETVER == 20170517 + packetKeys(0x2CC4749A,0x1FA954DC,0x72276857); +#endif + +// 2017-05-24aRagexeRE +#if PACKETVER == 20170524 + packetKeys(0x0B4E03A6,0x2B93427C,0x583D4477); +#endif + +// 2017-05-31aRagexeRE +#if PACKETVER == 20170531 + packetKeys(0x03FA5A97,0x20B802D5,0x339F1977); +#endif + +// 2017-06-07bRagexeRE, 2017-06-07cRagexeRE +#if PACKETVER == 20170607 + packetKeys(0x50564ACD,0x79CA4E15,0x405F4894); +#endif + +// 2017-06-14bRagexeRE +#if PACKETVER == 20170614 + packetKeys(0x5ED10A48,0x667F4301,0x2E5D761F); +#endif + +// 2017-06-21aRagexeRE +#if PACKETVER == 20170621 + packetKeys(0x155F34EC,0x2D943FA9,0x3D9170EB); +#endif + +// 2017-06-28bRagexeRE +#if PACKETVER == 20170628 + packetKeys(0x04691C86,0x43C210E2,0x2FE277E2); +#endif + +// 2017-07-05aRagexeRE +#if PACKETVER == 20170705 + packetKeys(0x7EB000AE,0x02FB1DBC,0x5CB131E6); +#endif + +// 2017-07-12bRagexeRE +#if PACKETVER == 20170712 + packetKeys(0x2C3C202C,0x3F2C2F2C,0x2F2C2F2C); +#endif + +// 2017-07-19aRagexeRE +#if PACKETVER == 20170719 + packetKeys(0x46465C88,0x10116F66,0x200866F9); +#endif + +// 2017-07-26cRagexeRE +#if PACKETVER == 20170726 + packetKeys(0x102F23DB,0x7E767751,0x3BC172EF); +#endif + +// 2017-08-01aRagexeRE +#if PACKETVER == 20170801 + packetKeys(0x26B52A7F,0x5377619D,0x4F580AC4); +#endif + +// 2017-08-16cRagexeRE, 2017-08-16dRagexeRE +#if PACKETVER == 20170816 + packetKeys(0x78914673,0x3F8B7634,0x55B814BC); +#endif + +// 2017-08-23aRagexeRE +#if PACKETVER == 20170823 + packetKeys(0x22677205,0x393D1002,0x58DC6BB4); +#endif + +// 2017-08-30aRagexeRE, 2017-08-30bRagexeRE +#if PACKETVER == 20170830 + packetKeys(0x1D49592B,0x00970C17,0x1E640103); +#endif + +// 2017-09-06cRagexeRE +#if PACKETVER == 20170906 + packetKeys(0x7DEF7677,0x351F36E6,0x52303485); +#endif + +// 2017-09-13bRagexeRE +#if PACKETVER == 20170913 + packetKeys(0x7A645935,0x1DA05062,0x5A7A4C43); +#endif + +// 2017-09-20bRagexeRE +#if PACKETVER == 20170920 + packetKeys(0x53024DA5,0x04EC212D,0x0BF87CD4); +#endif + +// 2017-09-27bRagexeRE, 2017-09-27dRagexeRE +#if PACKETVER == 20170927 + packetKeys(0x15624100,0x0CE1463E,0x0E5D6534); +#endif + +// 2017-10-02cRagexeRE +#if PACKETVER == 20171002 + packetKeys(0x15E1716C,0x4E765B63,0x357D2370); +#endif + +// 2017-10-11aRagexeRE, 2017-10-11bRagexeRE +#if PACKETVER == 20171011 + packetKeys(0x4F121B3E,0x12670E17,0x19896C11); +#endif + +// 2017-10-18aRagexeRE +#if PACKETVER == 20171018 + packetKeys(0x2CAA109C,0x158C1EC2,0x7A5E58F3); +#endif + +// 2017-10-25bRagexeRE, 2017-10-25cRagexeRE, 2017-10-25dRagexeRE, 2017-10-25eRagexeRE +#if PACKETVER == 20171025 + packetKeys(0x165C565C,0x565C565C,0x565C565C); +#endif + +// 2017-11-01bRagexeRE +#if PACKETVER == 20171101 + packetKeys(0x7056317F,0x7EEE0589,0x02672373); +#endif + + +#if defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3) + packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3); +#endif + +#endif /* MAP_PACKETS_KEYS_H */ diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index e461eebe9..03b555e2b 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -76,8 +76,10 @@ enum packet_headers { additemType = 0x2d4, #elif PACKETVER < 20150226 additemType = 0x990, -#else +#elif PACKETVER < 20160921 additemType = 0xa0c, +#else + additemType = 0xa37, #endif #if PACKETVER < 4 idle_unitType = 0x78, @@ -141,8 +143,11 @@ enum packet_headers { authokType = 0x73, #elif PACKETVER < 20141022 authokType = 0x2eb, -#else +// Some clients smaller than 20160330 cant be tested [4144] +#elif PACKETVER < 20160330 authokType = 0xa18, +#else + authokType = 0x2eb, #endif script_clearType = 0x8d6, package_item_announceType = 0x7fd, @@ -286,7 +291,7 @@ enum packet_headers { maptypeproperty2Type = 0x99b, npcmarketresultackType = 0x9d7, npcmarketopenType = 0x9d5, -#if PACKETVER >= 20131223 +#if PACKETVER >= 20131223 // version probably can be 20131030 [4144] wisendType = 0x9df, #else wisendType = 0x98, @@ -302,6 +307,29 @@ enum packet_headers { #else // PACKETVER < 20141022 questListType = 0x2b1, ///< ZC_ALL_QUEST_LIST #endif // PACKETVER >= 20141022 + /* Rodex */ + rodexicon = 0x09E7, + rodexread = 0x09EB, + rodexwriteresult = 0x09ED, + rodexnextpage = 0x09F0, + rodexgetzeny = 0x09F2, + rodexgetitem = 0x09F4, + rodexdelete = 0x09F6, + rodexadditem = 0x0A05, + rodexremoveitem = 0x0A07, + rodexopenwrite = 0x0A12, +#if PACKETVER < 20160601 + rodexmailList = 0x09F0, +#elif PACKETVER < 20170419 + rodexmailList = 0x0A7D, +#else // PACKETVER >= 20170419 + rodexmailList = 0x0Ac2, +#endif +#if PACKETVER < 20160316 + rodexcheckplayer = 0x0A14, +#else // PACKETVER >= 20160316 + rodexcheckplayer = 0x0A51, +#endif }; #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute @@ -343,7 +371,7 @@ struct NORMALITEM_INFO { #endif } __attribute__((packed)); -struct RndOptions { +struct ItemOptions { int16 index; int16 value; uint8 param; @@ -379,7 +407,7 @@ struct EQUIPITEM_INFO { #endif #if PACKETVER >= 20150226 uint8 option_count; - struct RndOptions option_data[5]; + struct ItemOptions option_data[MAX_ITEM_OPTIONS]; #endif #if PACKETVER >= 20120925 struct { @@ -400,7 +428,8 @@ struct packet_authok { #if PACKETVER >= 20080102 int16 font; #endif -#if PACKETVER >= 20141022 +// Some clients smaller than 20160330 cant be tested [4144] +#if PACKETVER >= 20141022 && PACKETVER < 20160330 uint8 sex; #endif } __attribute__((packed)); @@ -442,7 +471,11 @@ struct packet_additem { uint16 bindOnEquipType; #endif #if PACKETVER >= 20150226 - struct RndOptions option_data[5]; + struct ItemOptions option_data[MAX_ITEM_OPTIONS]; +#endif +#if PACKETVER >= 20160921 + uint8 favorite; + uint16 look; #endif } __attribute__((packed)); @@ -589,6 +622,9 @@ struct packet_spawn_unit { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -598,7 +634,7 @@ struct packet_unit_walking { #if PACKETVER >= 20091103 int16 PacketLength; #endif -#if PACKETVER > 20071106 +#if PACKETVER >= 20071106 uint8 objecttype; #endif #if PACKETVER >= 20131223 @@ -657,6 +693,9 @@ struct packet_unit_walking { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -723,6 +762,9 @@ struct packet_idle_unit { #endif #if PACKETVER >= 20150513 int16 body; +#endif +/* Might be earlier, this is when the named item bug began */ +#if PACKETVER >= 20131223 char name[NAME_LENGTH]; #endif } __attribute__((packed)); @@ -1228,6 +1270,214 @@ struct packet_whisper_message { char message[]; } __attribute__((packed)); +/* RoDEX */ +struct PACKET_CZ_ADD_ITEM_TO_MAIL { + int16 PacketType; + int16 index; + int16 count; +} __attribute__((packed)); + +struct PACKET_ZC_ADD_ITEM_TO_MAIL { + int16 PacketType; + int8 result; + int16 index; + int16 count; + uint16 ITID; + int8 type; + int8 IsIdentified; + int8 IsDamaged; + int8 refiningLevel; + struct EQUIPSLOTINFO slot; + struct ItemOptions optionData[MAX_ITEM_OPTIONS]; + int16 weight; + int8 unknow[5]; +} __attribute__((packed)); + +struct mail_item { + int16 count; + uint16 ITID; + int8 IsIdentified; + int8 IsDamaged; + int8 refiningLevel; + struct EQUIPSLOTINFO slot; + int8 unknow1[4]; + int8 type; + int8 unknown[4]; + struct ItemOptions optionData[MAX_ITEM_OPTIONS]; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_OPEN_WRITE_MAIL { + int16 PacketType; + char receiveName[NAME_LENGTH]; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_OPEN_WRITE_MAIL { + int16 PacketType; + char receiveName[NAME_LENGTH]; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_REMOVE_ITEM_MAIL { + int16 PacketType; + int16 index; + uint16 cnt; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_REMOVE_ITEM_MAIL { + int16 PacketType; + int8 result; + int16 index; + uint16 cnt; + int16 weight; +} __attribute__((packed)); + +struct PACKET_CZ_SEND_MAIL { + int16 PacketType; + int16 PacketLength; + char receiveName[24]; + char senderName[24]; + int64 zeny; + int16 Titlelength; + int16 TextcontentsLength; +#if PACKETVER > 20160600 + int32 receiver_char_id; +#endif // PACKETVER > 20160600 + char string[]; +} __attribute__((packed)); + +struct PACKET_ZC_WRITE_MAIL_RESULT { + int16 PacketType; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_CHECKNAME { + int16 PacketType; + char Name[24]; +} __attribute__((packed)); + +struct PACKET_ZC_CHECKNAME { + int16 PacketType; + int32 CharId; + int16 Class; + int16 BaseLevel; +#if PACKETVER >= 20160316 + char Name[24]; +#endif +} __attribute__((packed)); + +struct PACKET_ZC_NOTIFY_UNREADMAIL { + int16 PacketType; + char result; +} __attribute__((packed)); + +struct maillistinfo { +#if PACKETVER >= 20170419 + uint8 openType; +#endif + int64 MailID; + int8 Isread; + uint8 type; + char SenderName[24]; +#if PACKETVER < 20170419 + int32 regDateTime; +#endif + int32 expireDateTime; + int16 Titlelength; + char title[]; +} __attribute__((packed)); + +struct PACKET_ZC_MAIL_LIST { + int16 PacketType; + int16 PacketLength; +#if PACKETVER < 20170419 + int8 opentype; + int8 cnt; +#endif + int8 IsEnd; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_NEXT_MAIL_LIST { + int16 PacketType; + int8 opentype; + int64 Lower_MailID; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_OPEN_MAIL { + int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else + int8 opentype; + int64 Upper_MailID; +#endif +} __attribute__((packed)); + +struct PACKET_CZ_REQ_READ_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_ZC_READ_MAIL { + int16 PacketType; + int16 PacketLength; + int8 opentype; + int64 MailID; + int16 TextcontentsLength; + int64 zeny; + int8 ItemCnt; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_DELETE_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_DELETE_MAIL { + int16 PacketType; + int8 opentype; + int64 MailID; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_REFRESH_MAIL_LIST { + int16 PacketType; +#if PACKETVER >= 20170419 + int64 Upper_MailID; + int8 unknown[16]; +#else + int8 opentype; + int64 Upper_MailID; +#endif +} __attribute__((packed)); + +struct PACKET_CZ_REQ_ZENY_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_ZENY_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; + int8 result; +} __attribute__((packed)); + +struct PACKET_CZ_REQ_ITEM_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; +} __attribute__((packed)); + +struct PACKET_ZC_ACK_ITEM_FROM_MAIL { + int16 PacketType; + int64 MailID; + int8 opentype; + int8 result; +} __attribute__((packed)); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris diff --git a/src/map/party.c b/src/map/party.c index c471cceb9..a4a7e6dca 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -64,7 +64,7 @@ void party_fill_member(struct party_member* member, struct map_session_data* sd, member->account_id = sd->status.account_id; member->char_id = sd->status.char_id; safestrncpy(member->name, sd->status.name, NAME_LENGTH); - member->class_ = sd->status.class_; + member->class = sd->status.class; member->map = sd->mapindex; member->lv = sd->status.base_level; member->online = 1; @@ -236,24 +236,29 @@ void party_check_state(struct party_data *p) { int i; nullpo_retv(p); 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 apart to skill usage and all that. - switch (p->party.member[i].class_) { + switch (p->party.member[i].class) { case JOB_MONK: case JOB_BABY_MONK: case JOB_CHAMPION: + case JOB_SURA: + case JOB_SURA_T: + case JOB_BABY_SURA: p->state.monk = 1; - break; + break; case JOB_STAR_GLADIATOR: p->state.sg = 1; - break; + break; case JOB_SUPER_NOVICE: case JOB_SUPER_BABY: + case JOB_SUPER_NOVICE_E: + case JOB_SUPER_BABY_E: p->state.snovice = 1; - break; + break; case JOB_TAEKWON: p->state.tk = 1; - break; + break; } } } @@ -269,6 +274,7 @@ int party_recv_info(const struct party *sp, int char_id) int added_count = 0; int j; int member_id; + int leader_account_id = 0, leader_char_id = 0; nullpo_ret(sp); @@ -282,8 +288,12 @@ int party_recv_info(const struct party *sp, int char_id) ARR_FIND(0, MAX_PARTY, i, sp->member[i].account_id == member->account_id && sp->member[i].char_id == member->char_id); - if (i == MAX_PARTY) + if (i == MAX_PARTY) { removed[removed_count++] = member_id; + } else if (member->leader != 0) { + leader_account_id = member->account_id; + leader_char_id = member->char_id; + } } for (member_id = 0; member_id < MAX_PARTY; ++member_id) { member = &sp->member[member_id]; @@ -311,6 +321,7 @@ int party_recv_info(const struct party *sp, int char_id) continue;// not online party->member_withdraw(sp->party_id, sd->status.account_id, sd->status.char_id); } + memcpy(&p->party, sp, sizeof(struct party)); memset(&p->state, 0, sizeof(p->state)); memset(&p->data, 0, sizeof(p->data)); @@ -319,6 +330,8 @@ int party_recv_info(const struct party *sp, int char_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); + if (member->account_id == leader_account_id && member->char_id == leader_char_id) + p->party.member[member_id].leader = 1; } party->check_state(p); while( added_count > 0 ) { // new in party @@ -586,11 +599,43 @@ int party_member_withdraw(int party_id, int account_id, int char_id) int i; ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id ); if( i < MAX_PARTY ) { + bool was_leader = false; + int prev_leader_accountId = 0; + if (p->party.member[i].leader != 0) { + was_leader = true; + prev_leader_accountId = p->party.member[i].account_id; + } + clif->party_withdraw(p,sd,account_id,p->party.member[i].name,0x0); 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); + + if (was_leader) { + int k; + // Member was party leader, try to pick a new leader from online members + ARR_FIND(0, MAX_PARTY, k, p->party.member[k].account_id != 0 && p->party.member[k].online == 1); + + if (k == MAX_PARTY) { + // No online members, get an offline one + ARR_FIND(0, MAX_PARTY, k, p->party.member[k].account_id != 0); + } + + if (k < MAX_PARTY) { + // Update party's leader + p->party.member[k].leader = 1; + + if (p->data[k].sd != NULL) { + /** update members **/ + clif->PartyLeaderChanged(p->data[k].sd, prev_leader_accountId, p->data[k].sd->status.account_id); + } + + //Update info. + intif->party_leaderchange(p->party.party_id, p->party.member[k].account_id, p->party.member[k].char_id); + clif->party_info(p, NULL); + } + } } } @@ -686,6 +731,11 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts return false; } + if (battle_config.party_change_leader_same_map && sd->bl.m != tsd->bl.m) { + clif->msgtable(sd, MSG_PARTY_LEADER_SAMEMAP); // It is only possible to change the party leader while on the same map. + return false; + } + if( map->list[sd->bl.m].flag.partylock ) { clif->message(sd->fd, msg_sd(sd,287)); // You cannot change party leaders in this map. return false; @@ -876,15 +926,14 @@ int party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id continue; switch(skill_id) { case TK_COUNTER: //Increase Triple Attack rate of Monks. - if((p_sd->class_&MAPID_UPPERMASK) == MAPID_MONK - && pc->checkskill(p_sd,MO_TRIPLEATTACK)) { + if ((p_sd->job & MAPID_UPPERMASK) == MAPID_MONK && pc->checkskill(p_sd, MO_TRIPLEATTACK)) { sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,MO_TRIPLEATTACK, 50+50*skill_lv, //+100/150/200% rate 0,0,skill->get_time(SG_FRIEND, 1)); } break; case MO_COMBOFINISH: //Increase Counter rate of Star Gladiators - if((p_sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR + if ((p_sd->job & MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && sd->sc.data[SC_COUNTERKICK_READY] && pc->checkskill(p_sd,SG_FRIEND)) { sc_start4(&p_sd->bl,&p_sd->bl,SC_SKILLRATE_UP,100,TK_COUNTER, @@ -1155,7 +1204,7 @@ int party_sub_count_chorus(struct block_list *bl, va_list ap) if (battle_config.idle_no_share && pc_isidle(sd)) return 0; - if ( (sd->class_&MAPID_THIRDMASK) != MAPID_MINSTRELWANDERER ) + if ((sd->job & MAPID_THIRDMASK) != MAPID_MINSTRELWANDERER) return 0; return 1; diff --git a/src/map/party.h b/src/map/party.h index 05037eb04..aa0977499 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/path.c b/src/map/path.c index f5e08d4df..509a82c7e 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -192,10 +192,8 @@ bool path_search_long(struct shootpath_data *spd,struct block_list *bl,int16 m,i /// Ensures there is enough space in array to store new element. static void heap_push_node(struct node_heap *heap, struct path_node *node) { -#ifndef __clang_analyzer__ // TODO: Figure out why clang's static analyzer doesn't like this BHEAP_ENSURE(*heap, 1, 256); BHEAP_PUSH2(*heap, node, NODE_MINTOPCMP, swap_ptr); -#endif // __clang_analyzer__ } /// Updates path_node in the binary node_heap. diff --git a/src/map/path.h b/src/map/path.h index c84b77eb0..1e67a8d97 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/pc.c b/src/map/pc.c index 0674f0137..0636ebafa 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -80,12 +80,13 @@ struct pc_interface *pc; //Converts a class to its array index for CLASS_COUNT defined arrays. //Note that it does not do a validity check for speed purposes, where parsing //player input make sure to use a pc->db_checkid first! -int pc_class2idx(int class_) { - if (class_ >= JOB_NOVICE_HIGH) { - class_ += - JOB_NOVICE_HIGH + JOB_MAX_BASIC; +int pc_class2idx(int class) +{ + if (class >= JOB_NOVICE_HIGH) { + class += - JOB_NOVICE_HIGH + JOB_MAX_BASIC; } - Assert_ret(class_ >= 0 && class_ < CLASS_COUNT); - return class_; + Assert_ret(class >= 0 && class < CLASS_COUNT); + return class; } /** @@ -247,7 +248,7 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max) memmove(sd->spirit_timer+i+1, sd->spirit_timer+i, (sd->spiritball-i)*sizeof(int)); sd->spirit_timer[i] = tid; sd->spiritball++; - if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD ) + if ((sd->job & MAPID_THIRDMASK) == MAPID_ROYAL_GUARD) clif->millenniumshield(&sd->bl,sd->spiritball); else clif->spiritball(&sd->bl); @@ -286,7 +287,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type) } if(!type) { - if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD ) + if ((sd->job & MAPID_THIRDMASK) == MAPID_ROYAL_GUARD) clif->millenniumshield(&sd->bl,sd->spiritball); else clif->spiritball(&sd->bl); @@ -386,52 +387,108 @@ int pc_banding(struct map_session_data *sd, uint16 skill_lv) { return c; } -// Increases a player's fame points and displays a notice to him -void pc_addfame(struct map_session_data *sd,int count) +/** + * Increases a player's fame points and displays a notice to them. + * + * If the character's job class doesn't allow the specified rank type, nothing + * happens and the request is ignored. + * + * @param sd The target character. + * @param type The fame list type (@see enum fame_list_type). + * @param count The amount of points to add. + */ +void pc_addfame(struct map_session_data *sd, int ranktype, int count) { - int ranktype = -1; nullpo_retv(sd); + + switch (ranktype) { + case RANKTYPE_BLACKSMITH: + if ((sd->job & MAPID_UPPERMASK) != MAPID_BLACKSMITH) + return; + break; + case RANKTYPE_ALCHEMIST: + if ((sd->job & MAPID_UPPERMASK) != MAPID_ALCHEMIST) + return; + break; + case RANKTYPE_TAEKWON: + if ((sd->job & MAPID_UPPERMASK) != MAPID_TAEKWON) + return; + break; + case RANKTYPE_PK: + // Not supported + FALLTHROUGH + default: + Assert_retv(0); + } + sd->status.fame += count; - if(sd->status.fame > MAX_FAME) + if (sd->status.fame > MAX_FAME) sd->status.fame = MAX_FAME; - switch(sd->class_&MAPID_UPPERMASK){ - case MAPID_BLACKSMITH: ranktype = RANKTYPE_BLACKSMITH; break; - case MAPID_ALCHEMIST: ranktype = RANKTYPE_ALCHEMIST; break; - case MAPID_TAEKWON: ranktype = RANKTYPE_TAEKWON; break; - } + clif->update_rankingpoint(sd, ranktype, count); chrif->updatefamelist(sd); } -// Check whether a player ID is in the fame rankers' list of its job, returns his/her position if so, 0 else -unsigned char pc_famerank(int char_id, int job) +/** + * Returns a character's rank in the specified fame list. + * + * @param char_id The character ID. + * @param ranktype The rank list type (@see enum fame_list_type). + * @return The rank position (1-based index) + * @retval 0 if the character isn't in the specified list. + */ +int pc_fame_rank(int char_id, int ranktype) { int i; - switch(job){ - case MAPID_BLACKSMITH: // Blacksmith - for(i = 0; i < MAX_FAME_LIST; i++){ - 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(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(pc->taekwon_fame_list[i].id == char_id) - return i + 1; - } - break; + switch (ranktype) { + case RANKTYPE_BLACKSMITH: + for (i = 0; i < MAX_FAME_LIST; i++) { + if (pc->smith_fame_list[i].id == char_id) + return i + 1; + } + break; + case RANKTYPE_ALCHEMIST: + for (i = 0; i < MAX_FAME_LIST; i++) { + if (pc->chemist_fame_list[i].id == char_id) + return i + 1; + } + break; + case RANKTYPE_TAEKWON: + for (i = 0; i < MAX_FAME_LIST; i++) { + if (pc->taekwon_fame_list[i].id == char_id) + return i + 1; + } + break; + case RANKTYPE_PK: // Not implemented + FALLTHROUGH + default: + Assert_ret(0); } return 0; } +/** + * Returns the appropriate fame list type for the given job. + * + * @param job_mapid The job (in MapID format) + * @return the appropriate fame list type (@see enum fame_list_type). + * @retval RANKTYPE_UNKNOWN if no appropriate type exists. + */ +int pc_famelist_type(uint16 job_mapid) { + switch (job_mapid & MAPID_UPPERMASK) { + case MAPID_BLACKSMITH: + return RANKTYPE_BLACKSMITH; + case MAPID_ALCHEMIST: + return RANKTYPE_ALCHEMIST; + case MAPID_TAEKWON: + return RANKTYPE_TAEKWON; + default: + return RANKTYPE_UNKNOWN; + } +} + int pc_setrestartvalue(struct map_session_data *sd,int type) { struct status_data *st, *bst; nullpo_ret(sd); @@ -490,7 +547,7 @@ void pc_rental_expire(struct map_session_data *sd, int i) { /* Soon to be dropped, we got plans to integrate it with item db */ switch( nameid ) { - case ITEMID_REINS_OF_MOUNT: + case ITEMID_BOARDING_HALTER: status_change_end(&sd->bl,SC_ALL_RIDING,INVALID_TIMER); break; case ITEMID_LOVE_ANGEL: @@ -684,7 +741,8 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->client_tick = client_tick; sd->state.active = 0; //to be set to 1 after player is fully authed and loaded. sd->bl.type = BL_PC; - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_LOGIN) + sd->canlog_tick = timer->gettick(); //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; sd->state.warp_clean = 1; @@ -692,6 +750,7 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo return 0; } +// [4144] probably pc_equippoint should be replaced to pc_item_equippoint int pc_equippoint(struct map_session_data *sd,int n) { int ep = 0; @@ -706,13 +765,13 @@ int pc_equippoint(struct map_session_data *sd,int n) return 0; //Not equippable by players. ep = sd->inventory_data[n]->equip; - if (sd->inventory_data[n]->look == W_DAGGER - || sd->inventory_data[n]->look == W_1HSWORD - || sd->inventory_data[n]->look == W_1HAXE + if (sd->inventory_data[n]->subtype == W_DAGGER + || sd->inventory_data[n]->subtype == W_1HSWORD + || sd->inventory_data[n]->subtype == W_1HAXE ) { if (pc->checkskill(sd,AS_LEFT) > 0 - || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN - || (sd->class_&MAPID_UPPERMASK) == MAPID_KAGEROUOBORO + || (sd->job & MAPID_UPPERMASK) == MAPID_ASSASSIN + || (sd->job & MAPID_UPPERMASK) == MAPID_KAGEROUOBORO ) { //Kagerou and Oboro can dual wield daggers. [Rytech] if( ep == EQP_HAND_R ) @@ -724,6 +783,33 @@ int pc_equippoint(struct map_session_data *sd,int n) return ep; } +int pc_item_equippoint(struct map_session_data *sd, struct item_data* id) +{ + int ep = 0; + + nullpo_ret(sd); + nullpo_ret(id); + + if (!itemdb->isequip2(id)) + return 0; //Not equippable by players. + + ep = id->equip; + if (id->subtype == W_DAGGER || + id->subtype == W_1HSWORD || + id->subtype == W_1HAXE) { + if (pc->checkskill(sd, AS_LEFT) > 0 || + (sd->job & MAPID_UPPERMASK) == MAPID_ASSASSIN || + (sd->job & MAPID_UPPERMASK) == MAPID_KAGEROUOBORO) { + // Kagerou and Oboro can dual wield daggers. [Rytech] + if (ep == EQP_HAND_R) + return EQP_ARMS; + if (ep == EQP_SHADOW_WEAPON) + return EQP_SHADOW_ARMS; + } + } + return ep; +} + int pc_setinventorydata(struct map_session_data *sd) { int i; @@ -743,40 +829,40 @@ int pc_calcweapontype(struct map_session_data *sd) // single-hand if(sd->weapontype2 == W_FIST) { - sd->status.weapon = sd->weapontype1; + sd->weapontype = sd->weapontype1; return 1; } if(sd->weapontype1 == W_FIST) { - sd->status.weapon = sd->weapontype2; + sd->weapontype = sd->weapontype2; return 1; } // dual-wield - sd->status.weapon = 0; + sd->weapontype = W_FIST; 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; + case W_DAGGER: sd->weapontype = W_DOUBLE_DD; break; + case W_1HSWORD: sd->weapontype = W_DOUBLE_DS; break; + case W_1HAXE: sd->weapontype = 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; + case W_DAGGER: sd->weapontype = W_DOUBLE_DS; break; + case W_1HSWORD: sd->weapontype = W_DOUBLE_SS; break; + case W_1HAXE: sd->weapontype = 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: sd->weapontype = W_DOUBLE_DA; break; + case W_1HSWORD: sd->weapontype = W_DOUBLE_SA; break; + case W_1HAXE: sd->weapontype = W_DOUBLE_AA; break; } } // unknown, default to right hand type - if (!sd->status.weapon) - sd->status.weapon = sd->weapontype1; + if (sd->weapontype == W_FIST) + sd->weapontype = sd->weapontype1; return 2; } @@ -798,20 +884,30 @@ int pc_setequipindex(struct map_session_data *sd) if(sd->status.inventory[i].equip & pc->equip_pos[j]) sd->equip_index[j] = i; - if(sd->status.inventory[i].equip & EQP_HAND_R) - { - if(sd->inventory_data[i]) - sd->weapontype1 = sd->inventory_data[i]->look; - else - sd->weapontype1 = 0; + if (sd->status.inventory[i].equip & EQP_HAND_R) { + if (sd->inventory_data[i]) { + sd->weapontype1 = sd->inventory_data[i]->subtype; + sd->status.look.weapon = sd->inventory_data[i]->view_sprite; + } else { + sd->weapontype1 = W_FIST; + sd->status.look.weapon = 0; + } } - if( sd->status.inventory[i].equip & EQP_HAND_L ) - { - if( sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON ) - sd->weapontype2 = sd->inventory_data[i]->look; - else - sd->weapontype2 = 0; + if (sd->status.inventory[i].equip & EQP_HAND_L) { + if (sd->inventory_data[i] != NULL) { + if (sd->inventory_data[i]->type == IT_WEAPON) + sd->weapontype2 = sd->inventory_data[i]->subtype; + else + sd->weapontype2 = W_FIST; + if (sd->inventory_data[i]->type == IT_ARMOR) + sd->has_shield = true; + else + sd->has_shield = false; + } else { + sd->weapontype2 = W_FIST; + sd->has_shield = false; + } } } } @@ -887,7 +983,7 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd return false; } - if( !( ( b_sd->status.class_ >= JOB_NOVICE && b_sd->status.class_ <= JOB_THIEF ) || b_sd->status.class_ == JOB_SUPER_NOVICE ) ) + if (!(b_sd->status.class >= JOB_NOVICE && b_sd->status.class <= JOB_THIEF) && b_sd->status.class != JOB_SUPER_NOVICE) return false; return true; @@ -898,8 +994,8 @@ bool pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2_sd *------------------------------------------*/ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd) { - int job, joblevel; - unsigned int jobexp; + int class, joblevel; + uint64 jobexp; if( !pc->can_Adopt(p1_sd, p2_sd, b_sd) ) return false; @@ -909,9 +1005,9 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd, joblevel = b_sd->status.job_level; jobexp = b_sd->status.job_exp; - job = pc->mapid2jobid(b_sd->class_|JOBL_BABY, b_sd->status.sex); - if( job != -1 && !pc->jobchange(b_sd, job, 0) ) - { // Success, proceed to configure parents and baby skills + class = pc->mapid2jobid(b_sd->job | JOBL_BABY, b_sd->status.sex); + if (class != -1 && !pc->jobchange(b_sd, class, 0)) { + // Success, proceed to configure parents and baby skills p1_sd->status.child = b_sd->status.char_id; p2_sd->status.child = b_sd->status.char_id; b_sd->status.father = p1_sd->status.char_id; @@ -972,12 +1068,11 @@ int pc_isequip(struct map_session_data *sd,int n) return 0; if ( item->equip & EQP_AMMO ) { - if ( (sd->state.active && !pc_iscarton(sd)) // check if sc data is already loaded. - && (sd->status.class_ == JOB_GENETIC_T || sd->status.class_ == JOB_GENETIC) ) { + if (sd->state.active && !pc_iscarton(sd) && (sd->job & MAPID_THIRDMASK) == MAPID_GENETIC) { // check if sc data is already loaded. clif->msgtable(sd, MSG_ITEM_NEED_CART); return 0; } - if ( !pc_ismadogear(sd) && (sd->status.class_ == JOB_MECHANIC_T || sd->status.class_ == JOB_MECHANIC) ) { + if (!pc_ismadogear(sd) && (sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { clif->msgtable(sd, MSG_ITEM_NEED_MADO); return 0; } @@ -1003,25 +1098,37 @@ int pc_isequip(struct map_session_data *sd,int n) return 1; //Can equip all helms if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON) - switch(item->look) { //In weapons, the look determines type of weapon. - case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess? - case W_1HSWORD: //All 1H swords - case W_1HAXE: //All 1H Axes - case W_MACE: //All 1H Maces - case W_STAFF: //All 1H Staves - return 1; + switch (item->subtype) { //In weapons, the look determines type of weapon. + case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess? + case W_1HSWORD: //All 1H swords + case W_1HAXE: //All 1H Axes + case W_MACE: //All 1H Maces + case W_STAFF: //All 1H Staves + return 1; } } } //Not equipable by class. [Skotlex] - if (!(1ULL<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)])) + if (((1ULL<<(sd->job & MAPID_BASEMASK)) & item->class_base[(sd->job & JOBL_2_1) != 0 ? 1 : ((sd->job & JOBL_2_2) != 0 ? 2 : 0)]) == 0) return 0; //Not usable by upper class. [Inkfish] while( 1 ) { - if( item->class_upper&ITEMUPPER_NORMAL && !(sd->class_&(JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) ) break; - if( item->class_upper&ITEMUPPER_UPPER && sd->class_&(JOBL_UPPER|JOBL_THIRD) ) break; - if( item->class_upper&ITEMUPPER_BABY && sd->class_&JOBL_BABY ) break; - if( item->class_upper&ITEMUPPER_THIRD && sd->class_&JOBL_THIRD ) break; + if ((item->class_upper & ITEMUPPER_NORMAL) != 0) { + if ((sd->job & (JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) == 0) + break; + } + if ((item->class_upper & ITEMUPPER_UPPER) != 0) { + if ((sd->job & (JOBL_UPPER|JOBL_THIRD)) != 0) + break; + } + if ((item->class_upper & ITEMUPPER_BABY) != 0) { + if ((sd->job & JOBL_BABY) != 0) + break; + } + if ((item->class_upper & ITEMUPPER_THIRD) != 0) { + if ((sd->job & JOBL_THIRD) != 0) + break; + } return 0; } @@ -1068,6 +1175,8 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim } memcpy(&sd->status, st, sizeof(*st)); + memset(&sd->rodex, 0x0, sizeof(sd->rodex)); + VECTOR_INIT(sd->rodex.messages); if (st->sex != sd->status.sex) { clif->authfail_fd(sd->fd, 0); @@ -1075,13 +1184,16 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim } //Set the map-server used job id. [Skotlex] - i = pc->jobid2mapid(sd->status.class_); - if (i == -1) { //Invalid class? - ShowError("pc_authok: Invalid class %d for player %s (%d:%d). Class was changed to novice.\n", sd->status.class_, sd->status.name, sd->status.account_id, sd->status.char_id); - sd->status.class_ = JOB_NOVICE; - sd->class_ = MAPID_NOVICE; - } else - sd->class_ = i; + { + int job = pc->jobid2mapid(sd->status.class); + if (job == -1) { + ShowError("pc_authok: Invalid class %d for player %s (%d:%d). Class was changed to novice.\n", sd->status.class, sd->status.name, sd->status.account_id, sd->status.char_id); + sd->status.class = JOB_NOVICE; + sd->job = MAPID_NOVICE; + } else { + sd->job = job; + } + } // Checks and fixes to character status data, that are required // in case of configuration change or stuff, which cannot be @@ -1162,7 +1274,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim sd->sc.option = sd->status.option; //This is the actual option used in battle. //Set here because we need the inventory data for weapon sprite parsing. - status->set_viewdata(&sd->bl, sd->status.class_); + status->set_viewdata(&sd->bl, sd->status.class); unit->dataset(&sd->bl); sd->guild_x = -1; @@ -1179,13 +1291,14 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim sd->bg_queue.type = 0; VECTOR_INIT(sd->script_queues); + VECTOR_INIT(sd->storage.item); // initialize storage item vector. sd->state.dialog = 0; sd->delayed_damage = 0; - if( battle_config.item_check ) - sd->state.itemcheck = 1; + if (battle->bc->item_check != PCCHECKITEM_NONE) // Check and flag items for inspection. + sd->itemcheck = (enum pc_checkitem_types) battle->bc->item_check; // Event Timers for( i = 0; i < MAX_EVENTTIMER; i++ ) @@ -1338,7 +1451,7 @@ int pc_reg_received(struct map_session_data *sd) // Cooking Exp sd->cook_mastery = pc_readglobalreg(sd,script->add_str("COOK_MASTERY")); - if( (sd->class_&MAPID_BASEMASK) == MAPID_TAEKWON ) { + if ((sd->job & MAPID_BASEMASK) == MAPID_TAEKWON) { // Better check for class rather than skill to prevent "skill resets" from unsetting this sd->mission_mobid = pc_readglobalreg(sd,script->add_str("TK_MISSION_ID")); sd->mission_count = pc_readglobalreg(sd,script->add_str("TK_MISSION_COUNT")); @@ -1411,8 +1524,12 @@ int pc_reg_received(struct map_session_data *sd) status_calc_pc(sd,SCO_FIRST|SCO_FORCE); chrif->scdata_request(sd->status.account_id, sd->status.char_id); + // Storage Request + intif->request_account_storage(sd); + intif->Mail_requestinbox(sd->status.char_id, 0); // MAIL SYSTEM - Request Mail Inbox intif->request_questlog(sd); + intif->rodex_checkhasnew(sd); if (sd->state.connect_new == 0 && sd->fd) { //Character already loaded map! Gotta trigger LoadEndAck manually. sd->state.connect_new = 1; @@ -1420,7 +1537,7 @@ int pc_reg_received(struct map_session_data *sd) } if (pc_isinvisible(sd)) { - sd->vd.class_ = INVISIBLE_CLASS; + sd->vd.class = INVISIBLE_CLASS; clif->message(sd->fd, msg_sd(sd,11)); // Invisible: On // decrement the number of pvp players on the map map->list[sd->bl.m].users_pvp--; @@ -1467,17 +1584,17 @@ int pc_calc_skillpoint(struct map_session_data* sd) { int pc_calc_skilltree(struct map_session_data *sd) { int i,id=0,flag; - int c=0; + int class = 0, classidx = 0; nullpo_ret(sd); i = pc->calc_skilltree_normalize_job(sd); - c = pc->mapid2jobid(i, sd->status.sex); - if( c == -1 ) - { //Unable to normalize job?? + class = pc->mapid2jobid(i, sd->status.sex); + if (class == -1) { + //Unable to normalize job?? ShowError("pc_calc_skilltree: Unable to normalize job %d for character %s (%d:%d)\n", i, sd->status.name, sd->status.account_id, sd->status.char_id); return 1; } - c = pc->class2idx(c); + classidx = pc->class2idx(class); for( i = 0; i < MAX_SKILL; i++ ) { if( sd->status.skill[i].flag != SKILL_FLAG_PLAGIARIZED && sd->status.skill[i].flag != SKILL_FLAG_PERM_GRANTED ) //Don't touch these @@ -1486,10 +1603,10 @@ int pc_calc_skilltree(struct map_session_data *sd) if( sd->status.skill[i].flag == SKILL_FLAG_PERMANENT ) { switch( skill->dbs->db[i].nameid ) { case NV_TRICKDEAD: - if( (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) { - sd->status.skill[i].id = 0; - sd->status.skill[i].lv = 0; - sd->status.skill[i].flag = 0; + if ((sd->job & MAPID_UPPERMASK) != MAPID_NOVICE) { + sd->status.skill[i].id = 0; + sd->status.skill[i].lv = 0; + sd->status.skill[i].flag = 0; } break; } @@ -1559,16 +1676,16 @@ int pc_calc_skilltree(struct map_session_data *sd) do { flag = 0; - for (i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[c][i].id) > 0; i++) { - int idx = pc->skill_tree[c][i].idx; + for (i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[classidx][i].id) > 0; i++) { + int idx = pc->skill_tree[classidx][i].idx; bool satisfied = true; if (sd->status.skill[idx].id > 0) continue; //Skill already known. if (!battle_config.skillfree) { int j; - for (j = 0; j < VECTOR_LENGTH(pc->skill_tree[c][i].need); j++) { - struct skill_tree_requirement *req = &VECTOR_INDEX(pc->skill_tree[c][i].need, j); + for (j = 0; j < VECTOR_LENGTH(pc->skill_tree[classidx][i].need); j++) { + struct skill_tree_requirement *req = &VECTOR_INDEX(pc->skill_tree[classidx][i].need, j); int level; if (sd->status.skill[req->idx].id == 0 || sd->status.skill[req->idx].flag == SKILL_FLAG_TEMPORARY @@ -1583,8 +1700,8 @@ int pc_calc_skilltree(struct map_session_data *sd) break; } } - if (sd->status.job_level < (int)pc->skill_tree[c][i].joblv) { - int jobid = pc->mapid2jobid(sd->class_, sd->status.sex); // need to get its own skilltree + if (sd->status.job_level < (int)pc->skill_tree[classidx][i].joblv) { + int jobid = pc->mapid2jobid(sd->job, sd->status.sex); // need to get its own skilltree if (jobid > -1) { if (!pc->skill_tree[pc->class2idx(jobid)][i].inherited) satisfied = false; // job level requirement wasn't satisfied @@ -1615,16 +1732,17 @@ int pc_calc_skilltree(struct map_session_data *sd) } while(flag); // - if( c > 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && sd->status.skill_point == 0 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) ) - { - /* Taekwon Ranger Bonus Skill Tree + if (classidx > 0 && (sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON + && sd->status.base_level >= 90 && sd->status.skill_point == 0 + && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0) { + /* Taekwon Ranker Bonus Skill Tree ============================================ - Grant All Taekwon Tree, but only as Bonus Skills in case they drop from ranking. - (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 = pc->skill_tree[c][i].id) > 0; i++ ) { - int idx = pc->skill_tree[c][i].idx; + for (i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[classidx][i].id) > 0; i++) { + int idx = pc->skill_tree[classidx][i].idx; if( (skill->dbs->db[idx].inf2&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) ) continue; //Do not include Quest/Wedding skills. @@ -1635,7 +1753,7 @@ int pc_calc_skilltree(struct map_session_data *sd) sd->status.skill[idx].flag = SKILL_FLAG_REPLACED_LV_0 + sd->status.skill[idx].lv; // Remember original level } - sd->status.skill[idx].lv = skill->tree_get_max(id, sd->status.class_); + sd->status.skill[idx].lv = skill->tree_get_max(id, sd->status.class); } } @@ -1688,7 +1806,7 @@ void pc_check_skilltree(struct map_session_data *sd, int skill_id) continue; if (sd->status.job_level < (int)pc->skill_tree[c][i].joblv) { - int jobid = pc->mapid2jobid(sd->class_, sd->status.sex); // need to get its own skilltree + int jobid = pc->mapid2jobid(sd->job, sd->status.sex); // need to get its own skilltree if (jobid > -1) { if (!pc->skill_tree[pc->class2idx(jobid)][i].inherited) continue; @@ -1735,12 +1853,12 @@ int pc_clean_skilltree(struct map_session_data *sd) int pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int skill_point, novice_skills; - int c; + uint16 job; nullpo_ret(sd); - c = sd->class_; + job = sd->job; if (!battle_config.skillup_limit || pc_has_permission(sd, PC_PERM_ALL_SKILL)) - return c; + return job; skill_point = pc->calc_skillpoint(sd); @@ -1748,19 +1866,17 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) sd->sktree.second = sd->sktree.third = 0; - // limit 1st class and above to novice job levels - if(skill_point < novice_skills) { - c = MAPID_NOVICE; - } - // limit 2nd class and above to first class job levels (super novices are exempt) - else if ((sd->class_&JOBL_2) && (sd->class_&MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) - { + if (skill_point < novice_skills && (sd->job & MAPID_BASEMASK) != MAPID_SUMMONER) { + // limit 1st class and above to novice job levels + job = MAPID_NOVICE; + } else if ((sd->job & JOBL_2) != 0 && (sd->job & MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) { + // limit 2nd class and above to first class job levels (super novices are exempt) // regenerate change_level_2nd if (sd->change_level_2nd == 0) { - if (sd->class_&JOBL_THIRD) { + if ((sd->job & JOBL_THIRD) != 0) { // if neither 2nd nor 3rd jobchange levels are known, we have to assume a default for 2nd if (sd->change_level_3rd == 0) { - sd->change_level_2nd = pc->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->job & MAPID_UPPERMASK, sd->status.sex))][1]; } else { sd->change_level_2nd = 1 + skill_point + sd->status.skill_point - (sd->status.job_level - 1) @@ -1778,9 +1894,9 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) } if (skill_point < novice_skills + (sd->change_level_2nd - 1)) { - c &= MAPID_BASEMASK; + job &= MAPID_BASEMASK; sd->sktree.second = ( novice_skills + (sd->change_level_2nd - 1) ) - skill_point; - } else if(sd->class_&JOBL_THIRD) { // limit 3rd class to 2nd class/trans job levels + } else if ((sd->job & JOBL_THIRD) != 0) { // limit 3rd class to 2nd class/trans job levels // regenerate change_level_3rd if (sd->change_level_3rd == 0) { sd->change_level_3rd = 1 + skill_point + sd->status.skill_point @@ -1791,16 +1907,16 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) } if (skill_point < novice_skills + (sd->change_level_2nd - 1) + (sd->change_level_3rd - 1)) { - c &= MAPID_UPPERMASK; + job &= MAPID_UPPERMASK; sd->sktree.third = (novice_skills + (sd->change_level_2nd - 1) + (sd->change_level_3rd - 1)) - skill_point; } } } // restore non-limiting flags - c |= sd->class_&(JOBL_UPPER|JOBL_BABY); + job |= sd->job & (JOBL_UPPER|JOBL_BABY); - return c; + return job; } /*========================================== @@ -1841,38 +1957,40 @@ int pc_updateweightstatus(struct map_session_data *sd) return 0; } -int pc_disguise(struct map_session_data *sd, int class_) { +int pc_disguise(struct map_session_data *sd, int class) +{ nullpo_ret(sd); - if (class_ == -1 && sd->disguise == -1) + if (class == -1 && sd->disguise == -1) return 0; - if (class_ >= 0 && sd->disguise == class_) + if (class >= 0 && sd->disguise == class) return 0; if (pc_isinvisible(sd)) { //Character is invisible. Stealth class-change. [Skotlex] - sd->disguise = class_; //viewdata is set on uncloaking. + sd->disguise = class; //viewdata is set on uncloaking. return 2; } if (sd->bl.prev != NULL) { - if( class_ == -1 && sd->disguise == sd->status.class_ ) { + if (class == -1 && sd->disguise == sd->status.class) { clif->clearunit_single(-sd->bl.id,CLR_OUTSIGHT,sd->fd); - } else if ( class_ != sd->status.class_ ) { + } else if (class != sd->status.class) { pc_stop_walking(sd, STOPWALKING_FLAG_NONE); clif->clearunit_area(&sd->bl, CLR_OUTSIGHT); } } - if (class_ == -1) { + if (class == -1) { sd->disguise = -1; - class_ = sd->status.class_; - } else - sd->disguise = class_; + class = sd->status.class; + } else { + sd->disguise = class; + } - status->set_viewdata(&sd->bl, class_); + status->set_viewdata(&sd->bl, class); clif->changeoption(&sd->bl); // We need to update the client so it knows that a costume is being used if( sd->sc.option&OPTION_COSTUME ) { - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); clif->changelook(&sd->bl,LOOK_WEAPON,0); clif->changelook(&sd->bl,LOOK_SHIELD,0); clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); @@ -1880,7 +1998,7 @@ int pc_disguise(struct map_session_data *sd, int class_) { if (sd->bl.prev != NULL) { clif->spawn(&sd->bl); - if (class_ == sd->status.class_ && pc_iscarton(sd)) { + if (class == sd->status.class && pc_iscarton(sd)) { //It seems the cart info is lost on undisguise. clif->cartlist(sd); clif->updatestatus(sd,SP_CARTINFO); @@ -2380,7 +2498,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val) { } switch (sd->state.lr_flag) { case 2: - switch (sd->status.weapon) { + switch (sd->weapontype) { case W_BOW: case W_REVOLVER: case W_RIFLE: @@ -2447,7 +2565,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val) { case SP_ATTACKRANGE: switch (sd->state.lr_flag) { case 2: - switch (sd->status.weapon) { + switch (sd->weapontype) { case W_BOW: case W_REVOLVER: case W_RIFLE: @@ -4768,17 +4886,43 @@ int pc_isUseitem(struct map_session_data *sd,int n) switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs? case ITEMID_ANODYNE: - if( map_flag_gvg2(sd->bl.m) ) - return 0; - /* Fall through */ - case ITEMID_ALOEBERA: - if( pc_issit(sd) ) + if (map_flag_gvg2(sd->bl.m)) return 0; break; + + case ITEMID_GIANT_FLY_WING: { + struct party_data *p; + + if (!sd->status.party_id) { + clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED); + break; + } + + if ((p = party->search(sd->status.party_id)) != NULL) { + int i; + int16 m; + + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd == sd); + + if (i == MAX_PARTY || !p->party.member[i].leader) { + clif->msgtable(sd, MSG_PARTY_MEMBER_NOT_SUMMONED); + break; + } + + m = sd->bl.m; + + ARR_FIND(0, MAX_PARTY, i, p->data[i].sd && p->data[i].sd != sd && p->data[i].sd->bl.m == m); + + if (i == MAX_PARTY || pc_isdead(p->data[i].sd)) { + clif->msgtable(sd, MSG_PARTY_NO_MEMBER_IN_MAP); + break; + } + } + } + FALLTHROUGH case ITEMID_WING_OF_FLY: - case ITEMID_GIANT_FLY_WING: - if( map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m) ) { - clif->skill_mapinfomessage(sd,0); + if (map->list[sd->bl.m].flag.noteleport || map_flag_gvg2(sd->bl.m)) { + clif->skill_mapinfomessage(sd, 0); return 0; } /* Fall through */ @@ -4804,25 +4948,6 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( map->list[sd->bl.m].flag.nobranch || map_flag_gvg2(sd->bl.m) ) return 0; break; - case ITEMID_BUBBLE_GUM: - case ITEMID_COMP_BUBBLE_GUM: - if( sd->sc.data[SC_CASH_RECEIVEITEM] ) - return 0; - break; - case ITEMID_BATTLE_MANUAL: - case ITEMID_COMP_BATTLE_MANUAL: - case ITEMID_THICK_MANUAL50: - case ITEMID_NOBLE_NAMEPLATE: - case ITEMID_BATTLE_MANUAL25: - case ITEMID_BATTLE_MANUAL100: - case ITEMID_BATTLE_MANUAL_X3: - if( sd->sc.data[SC_CASH_PLUSEXP] ) - return 0; - break; - case ITEMID_JOB_MANUAL50: - if( sd->sc.data[SC_CASH_PLUSONLYJOBEXP] ) - return 0; - break; // Mercenary Items case ITEMID_MERCENARY_RED_POTION: @@ -4849,17 +4974,6 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( nameid >= ITEMID_BOW_MERCENARY_SCROLL1 && nameid <= ITEMID_SPEARMERCENARY_SCROLL10 && sd->md != NULL ) // Mercenary Scrolls return 0; - /** - * Only Rune Knights may use runes - **/ - if( itemdb_is_rune(nameid) && (sd->class_&MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT ) - return 0; - /** - * Only GCross may use poisons - **/ - else if( itemdb_is_poison(nameid) && (sd->class_&MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS ) - return 0; - if( item->package || item->group ) { if (pc_is90overweight(sd)) { clif->msgtable(sd, MSG_ITEM_CANT_OBTAIN_WEIGHT); @@ -4886,31 +5000,47 @@ int pc_isUseitem(struct map_session_data *sd,int n) } //Not equipable by class. [Skotlex] - if (!( - (1ULL<<(sd->class_&MAPID_BASEMASK)) & - (item->class_base[(sd->class_&JOBL_2_1) ? 1 : ((sd->class_&JOBL_2_2) ? 2 : 0)]) - )) + if (((1ULL << (sd->job & MAPID_BASEMASK)) & (item->class_base[(sd->job & JOBL_2_1) ? 1 : ((sd->job & JOBL_2_2) ? 2 : 0)])) == 0) return 0; //Not usable by upper class. [Haru] while( 1 ) { // Normal classes (no upper, no baby, no third classes) - if( item->class_upper&ITEMUPPER_NORMAL && !(sd->class_&(JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) ) break; + if ((item->class_upper & ITEMUPPER_NORMAL) != 0) { + if ((sd->job & (JOBL_UPPER|JOBL_THIRD|JOBL_BABY)) == 0) + break; + } + if ((item->class_upper & ITEMUPPER_UPPER) != 0) { #ifdef RENEWAL - // Upper classes (no third classes) - if( item->class_upper&ITEMUPPER_UPPER && sd->class_&JOBL_UPPER && !(sd->class_&JOBL_THIRD) ) break; + // Upper classes (no third classes) + if ((sd->job & JOBL_UPPER) != 0 && (sd->job&JOBL_THIRD) == 0) + break; #else - //pre-re has no use for the extra, so we maintain the previous for backwards compatibility - if( item->class_upper&ITEMUPPER_UPPER && sd->class_&(JOBL_UPPER|JOBL_THIRD) ) break; + //pre-re has no use for the extra, so we maintain the previous for backwards compatibility + if ((sd->job & (JOBL_UPPER|JOBL_THIRD)) != 0) + break; #endif + } // Baby classes (no third classes) - if( item->class_upper&ITEMUPPER_BABY && sd->class_&JOBL_BABY && !(sd->class_&JOBL_THIRD) ) break; + if ((item->class_upper & ITEMUPPER_BABY) != 0) { + if ((sd->job & JOBL_BABY) != 0 && (sd->job&JOBL_THIRD) == 0) + break; + } // Third classes (no upper, no baby classes) - if( item->class_upper&ITEMUPPER_THIRD && sd->class_&JOBL_THIRD && !(sd->class_&(JOBL_UPPER|JOBL_BABY)) ) break; + if ((item->class_upper & ITEMUPPER_THIRD) != 0) { + if ((sd->job & JOBL_THIRD) != 0 && (sd->job & (JOBL_UPPER|JOBL_BABY)) == 0) + break; + } // Upper third classes - if( item->class_upper&ITEMUPPER_THURDUPPER && sd->class_&JOBL_THIRD && sd->class_&JOBL_UPPER ) break; + if ((item->class_upper & ITEMUPPER_THIRDUPPER) != 0) { + if ((sd->job & JOBL_THIRD) != 0 && (sd->job & JOBL_UPPER) != 0) + break; + } // Baby third classes - if( item->class_upper&ITEMUPPER_THIRDBABY && sd->class_&JOBL_THIRD && sd->class_&JOBL_BABY ) break; + if ((item->class_upper & ITEMUPPER_THIRDBABY) != 0) { + if ((sd->job & JOBL_THIRD) != 0 && (sd->job & JOBL_BABY) != 0) + break; + } return 0; } @@ -4931,10 +5061,11 @@ int pc_useitem(struct map_session_data *sd,int n) { nullpo_ret(sd); Assert_ret(n >= 0 && n < MAX_INVENTORY); - if( sd->npc_id || sd->state.workinprogress&1 ){ - /* TODO: add to clif->messages enum */ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(sd->fd, COLOR_WHITE, msg_sd(sd, 48)); #endif return 0; } @@ -4965,18 +5096,17 @@ int pc_useitem(struct map_session_data *sd,int n) { sd->sc.data[SC_DEEP_SLEEP] || sd->sc.data[SC_SATURDAY_NIGHT_FEVER] || sd->sc.data[SC_COLD] || + sd->sc.data[SC_SUHIDE] || pc_ismuted(&sd->sc, MANNER_NOITEM) )) return 0; - //Prevent mass item usage. [Skotlex] - if( DIFF_TICK(sd->canuseitem_tick, tick) > 0 || - (itemdb_iscashfood(nameid) && DIFF_TICK(sd->canusecashfood_tick, tick) > 0) - ) + // Prevent mass item usage. [Skotlex] + if (DIFF_TICK(sd->canuseitem_tick, tick) > 0) return 0; /* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */ - if( sd->inventory_data[n]->flag.delay_consume && nameid != ITEMID_REINS_OF_MOUNT ) { + if (sd->inventory_data[n]->flag.delay_consume && nameid != ITEMID_BOARDING_HALTER) { if( sd->sc.data[SC_ALL_RIDING] ) return 0; else if( pc_issit(sd) ) @@ -4989,21 +5119,27 @@ int pc_useitem(struct map_session_data *sd,int n) { if( sd->inventory_data[n]->flag.delay_consume && ( sd->ud.skilltimer != INVALID_TIMER /*|| !status->check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0)*/ ) ) return 0; - if( sd->inventory_data[n]->delay > 0 ) { - ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid ); - if( i == MAX_ITEMDELAYS ) /* item not found. try first empty now */ - ARR_FIND(0, MAX_ITEMDELAYS, i, !sd->item_delay[i].nameid ); - if( i < MAX_ITEMDELAYS ) { - if( sd->item_delay[i].nameid ) {// found - if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) { - int e_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick)/1000); - clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, e_tick + 1); // [%d] seconds left until you can use + if (sd->inventory_data[n]->delay > 0) { + ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid); + if (i == MAX_ITEMDELAYS) /* item not found. try first empty now */ + ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == 0); + if (i < MAX_ITEMDELAYS) { + if (sd->item_delay[i].nameid != 0) {// found + if (DIFF_TICK(sd->item_delay[i].tick, tick) > 0) { + int delay_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick) / 1000); +#if PACKETVER >= 20101123 + clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, delay_tick + 1); // [%d] seconds left until you can use +#else + char delay_msg[100]; + sprintf(delay_msg, msg_sd(sd, 26), delay_tick + 1); + clif->messagecolor_self(sd->fd, COLOR_YELLOW, delay_msg); // [%d] seconds left until you can use +#endif return 0; // Delay has not expired yet } } else {// not yet used item (all slots are initially empty) sd->item_delay[i].nameid = nameid; } - if (!(nameid == ITEMID_REINS_OF_MOUNT && pc_hasmount(sd))) + if (!(nameid == ITEMID_BOARDING_HALTER && pc_hasmount(sd))) sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay; } else {// should not happen ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id); @@ -5051,18 +5187,15 @@ int pc_useitem(struct map_session_data *sd,int n) { } } - if(sd->status.inventory[n].card[0]==CARD0_CREATE && - pc->famerank(MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3]), MAPID_ALCHEMIST)) - { + if (sd->status.inventory[n].card[0] == CARD0_CREATE + && pc->fame_rank(MakeDWord(sd->status.inventory[n].card[2], sd->status.inventory[n].card[3]), RANKTYPE_ALCHEMIST) > 0) { script->potion_flag = 2; // Famous player's potions have 50% more efficiency if (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ROGUE) script->potion_flag = 3; //Even more effective potions. } - //Update item use time. + // Update item use time. sd->canuseitem_tick = tick + battle_config.item_use_interval; - if( itemdb_iscashfood(nameid) ) - sd->canusecashfood_tick = tick + battle_config.cashfood_use_interval; script->run_use_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id); script->potion_flag = 0; @@ -5379,13 +5512,6 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, uint16 skil //Logs items, Stolen from mobs [Lupus] logs->pick_mob(md, LOG_TYPE_STEAL, -1, &tmp_item, data); - //A Rare Steal Global Announce by Lupus - if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) { - char message[128]; - sprintf (message, msg_txt(542), sd->status.name, md->db->jname, data->jname, (float)md->db->dropitem[i].p / 100); - //MSG: "'%s' stole %s's %s (chance: %0.02f%%)" - intif->broadcast(message, (int)strlen(message)+1, BC_DEFAULT); - } return 1; } @@ -5826,11 +5952,11 @@ int pc_checkallowskill(struct map_session_data *sd) status_change_end(&sd->bl, scw_list[i], INVALID_TIMER); } - if(sd->sc.data[SC_STRUP] && sd->status.weapon) + if(sd->sc.data[SC_STRUP] && sd->weapontype != W_FIST) // Spurt requires bare hands (feet, in fact xD) status_change_end(&sd->bl, SC_STRUP, INVALID_TIMER); - if(sd->status.shield <= 0) { // Skills requiring a shield + if (!sd->has_shield) { // Skills requiring a shield for (i = 0; i < ARRAYLENGTH(scs_list); i++) if(sd->sc.data[scs_list[i]]) status_change_end(&sd->bl, scs_list[i], INVALID_TIMER); @@ -5862,10 +5988,9 @@ int pc_checkequip(struct map_session_data *sd,int pos) * Convert's from the client's lame Job ID system * to the map server's 'makes sense' system. [Skotlex] *------------------------------------------*/ -int pc_jobid2mapid(unsigned short b_class) +int pc_jobid2mapid(int16 class) { - switch(b_class) - { + switch (class) { //Novice And 1-1 Jobs case JOB_NOVICE: return MAPID_NOVICE; case JOB_SWORDMAN: return MAPID_SWORDMAN; @@ -5881,6 +6006,7 @@ int pc_jobid2mapid(unsigned short b_class) case JOB_XMAS: return MAPID_XMAS; case JOB_SUMMER: return MAPID_SUMMER; case JOB_GANGSI: return MAPID_GANGSI; + case JOB_SUMMONER: return MAPID_SUMMONER; //2-1 Jobs case JOB_SUPER_NOVICE: return MAPID_SUPER_NOVICE; case JOB_KNIGHT: return MAPID_KNIGHT; @@ -6004,10 +6130,9 @@ int pc_jobid2mapid(unsigned short b_class) } //Reverts the map-style class id to the client-style one. -int pc_mapid2jobid(unsigned short class_, int sex) +int pc_mapid2jobid(uint16 job, int sex) { - switch(class_) - { + switch (job) { //Novice And 1-1 Jobs case MAPID_NOVICE: return JOB_NOVICE; case MAPID_SWORDMAN: return JOB_SWORDMAN; @@ -6023,6 +6148,7 @@ int pc_mapid2jobid(unsigned short class_, int sex) case MAPID_XMAS: return JOB_XMAS; case MAPID_SUMMER: return JOB_SUMMER; case MAPID_GANGSI: return JOB_GANGSI; + case MAPID_SUMMONER: return JOB_SUMMONER; //2-1 Jobs case MAPID_SUPER_NOVICE: return JOB_SUPER_NOVICE; case MAPID_KNIGHT: return JOB_KNIGHT; @@ -6141,9 +6267,9 @@ int pc_mapid2jobid(unsigned short class_, int sex) /*==================================================== * This function return the name of the job (by [Yor]) *----------------------------------------------------*/ -const char* job_name(int class_) +const char *job_name(int class) { - switch (class_) { + switch (class) { case JOB_NOVICE: // 550 case JOB_SWORDMAN: // 551 case JOB_MAGE: // 552 @@ -6151,7 +6277,7 @@ const char* job_name(int class_) case JOB_ACOLYTE: // 554 case JOB_MERCHANT: // 555 case JOB_THIEF: // 556 - return msg_txt(550 - JOB_NOVICE+class_); + return msg_txt(550 - JOB_NOVICE + class); case JOB_KNIGHT: // 557 case JOB_PRIEST: // 558 @@ -6159,7 +6285,7 @@ const char* job_name(int class_) case JOB_BLACKSMITH: // 560 case JOB_HUNTER: // 561 case JOB_ASSASSIN: // 562 - return msg_txt(557 - JOB_KNIGHT+class_); + return msg_txt(557 - JOB_KNIGHT + class); case JOB_KNIGHT2: return msg_txt(557); @@ -6171,7 +6297,7 @@ const char* job_name(int class_) case JOB_ALCHEMIST: // 567 case JOB_BARD: // 568 case JOB_DANCER: // 569 - return msg_txt(563 - JOB_CRUSADER+class_); + return msg_txt(563 - JOB_CRUSADER + class); case JOB_CRUSADER2: return msg_txt(563); @@ -6181,7 +6307,7 @@ const char* job_name(int class_) case JOB_GUNSLINGER: // 572 case JOB_NINJA: // 573 case JOB_XMAS: // 574 - return msg_txt(570 - JOB_WEDDING+class_); + return msg_txt(570 - JOB_WEDDING + class); case JOB_SUMMER: return msg_txt(621); @@ -6193,7 +6319,7 @@ const char* job_name(int class_) case JOB_ACOLYTE_HIGH: // 579 case JOB_MERCHANT_HIGH: // 580 case JOB_THIEF_HIGH: // 581 - return msg_txt(575 - JOB_NOVICE_HIGH+class_); + return msg_txt(575 - JOB_NOVICE_HIGH + class); case JOB_LORD_KNIGHT: // 582 case JOB_HIGH_PRIEST: // 583 @@ -6201,7 +6327,7 @@ const char* job_name(int class_) case JOB_WHITESMITH: // 585 case JOB_SNIPER: // 586 case JOB_ASSASSIN_CROSS: // 587 - return msg_txt(582 - JOB_LORD_KNIGHT+class_); + return msg_txt(582 - JOB_LORD_KNIGHT + class); case JOB_LORD_KNIGHT2: return msg_txt(582); @@ -6213,7 +6339,7 @@ const char* job_name(int class_) case JOB_CREATOR: // 592 case JOB_CLOWN: // 593 case JOB_GYPSY: // 594 - return msg_txt(588 - JOB_PALADIN + class_); + return msg_txt(588 - JOB_PALADIN + class); case JOB_PALADIN2: return msg_txt(588); @@ -6225,7 +6351,7 @@ const char* job_name(int class_) case JOB_BABY_ACOLYTE: // 599 case JOB_BABY_MERCHANT: // 600 case JOB_BABY_THIEF: // 601 - return msg_txt(595 - JOB_BABY + class_); + return msg_txt(595 - JOB_BABY + class); case JOB_BABY_KNIGHT: // 602 case JOB_BABY_PRIEST: // 603 @@ -6233,7 +6359,7 @@ const char* job_name(int class_) case JOB_BABY_BLACKSMITH: // 605 case JOB_BABY_HUNTER: // 606 case JOB_BABY_ASSASSIN: // 607 - return msg_txt(602 - JOB_BABY_KNIGHT + class_); + return msg_txt(602 - JOB_BABY_KNIGHT + class); case JOB_BABY_KNIGHT2: return msg_txt(602); @@ -6245,7 +6371,7 @@ const char* job_name(int class_) case JOB_BABY_ALCHEMIST: // 612 case JOB_BABY_BARD: // 613 case JOB_BABY_DANCER: // 614 - return msg_txt(608 - JOB_BABY_CRUSADER + class_); + return msg_txt(608 - JOB_BABY_CRUSADER + class); case JOB_BABY_CRUSADER2: return msg_txt(608); @@ -6264,7 +6390,7 @@ const char* job_name(int class_) case JOB_GANGSI: // 622 case JOB_DEATH_KNIGHT: // 623 case JOB_DARK_COLLECTOR: // 624 - return msg_txt(622 - JOB_GANGSI+class_); + return msg_txt(622 - JOB_GANGSI + class); case JOB_RUNE_KNIGHT: // 625 case JOB_WARLOCK: // 626 @@ -6272,7 +6398,7 @@ const char* job_name(int class_) case JOB_ARCH_BISHOP: // 628 case JOB_MECHANIC: // 629 case JOB_GUILLOTINE_CROSS: // 630 - return msg_txt(625 - JOB_RUNE_KNIGHT+class_); + return msg_txt(625 - JOB_RUNE_KNIGHT + class); case JOB_RUNE_KNIGHT_T: // 656 case JOB_WARLOCK_T: // 657 @@ -6280,7 +6406,7 @@ const char* job_name(int class_) case JOB_ARCH_BISHOP_T: // 659 case JOB_MECHANIC_T: // 660 case JOB_GUILLOTINE_CROSS_T: // 661 - return msg_txt(656 - JOB_RUNE_KNIGHT_T+class_); + return msg_txt(656 - JOB_RUNE_KNIGHT_T + class); case JOB_ROYAL_GUARD: // 631 case JOB_SORCERER: // 632 @@ -6289,7 +6415,7 @@ const char* job_name(int class_) case JOB_SURA: // 635 case JOB_GENETIC: // 636 case JOB_SHADOW_CHASER: // 637 - return msg_txt(631 - JOB_ROYAL_GUARD+class_); + return msg_txt(631 - JOB_ROYAL_GUARD + class); case JOB_ROYAL_GUARD_T: // 662 case JOB_SORCERER_T: // 663 @@ -6298,7 +6424,7 @@ const char* job_name(int class_) case JOB_SURA_T: // 666 case JOB_GENETIC_T: // 667 case JOB_SHADOW_CHASER_T: // 668 - return msg_txt(662 - JOB_ROYAL_GUARD_T+class_); + return msg_txt(662 - JOB_ROYAL_GUARD_T + class); case JOB_RUNE_KNIGHT2: return msg_txt(625); @@ -6337,7 +6463,7 @@ const char* job_name(int class_) case JOB_BABY_SURA: // 648 case JOB_BABY_GENETIC: // 649 case JOB_BABY_CHASER: // 650 - return msg_txt(638 - JOB_BABY_RUNE+class_); + return msg_txt(638 - JOB_BABY_RUNE + class); case JOB_BABY_RUNE2: return msg_txt(638); @@ -6353,15 +6479,18 @@ const char* job_name(int class_) case JOB_SUPER_NOVICE_E: // 651 case JOB_SUPER_BABY_E: // 652 - return msg_txt(651 - JOB_SUPER_NOVICE_E+class_); + return msg_txt(651 - JOB_SUPER_NOVICE_E + class); case JOB_KAGEROU: // 653 case JOB_OBORO: // 654 - return msg_txt(653 - JOB_KAGEROU+class_); + return msg_txt(653 - JOB_KAGEROU + class); case JOB_REBELLION: return msg_txt(655); + case JOB_SUMMONER: + return msg_txt(669); + default: return msg_txt(620); // "Unknown Job" } @@ -6487,6 +6616,7 @@ int pc_check_job_name(const char *name) { { "Kagerou", JOB_KAGEROU }, { "Oboro", JOB_OBORO }, { "Rebellion", JOB_REBELLION }, + { "Summoner", JOB_SUMMONER }, }; nullpo_retr(-1, name); @@ -6568,8 +6698,9 @@ int pc_follow(struct map_session_data *sd,int target_id) { return 0; } -int pc_checkbaselevelup(struct map_session_data *sd) { - unsigned int next = pc->nextbaseexp(sd); +int pc_checkbaselevelup(struct map_session_data *sd) +{ + uint64 next = pc->nextbaseexp(sd); nullpo_ret(sd); if (!next || sd->status.base_exp < next) @@ -6598,7 +6729,7 @@ int pc_checkbaselevelup(struct map_session_data *sd) { status_calc_pc(sd,SCO_FORCE); status_percent_heal(&sd->bl,100,100); - if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) { + if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) { sc_start(NULL,&sd->bl,status->skill2sc(PR_KYRIE),100,1,skill->get_time(PR_KYRIE,1)); sc_start(NULL,&sd->bl,status->skill2sc(PR_IMPOSITIO),100,1,skill->get_time(PR_IMPOSITIO,1)); sc_start(NULL,&sd->bl,status->skill2sc(PR_MAGNIFICAT),100,1,skill->get_time(PR_MAGNIFICAT,1)); @@ -6606,7 +6737,7 @@ int pc_checkbaselevelup(struct map_session_data *sd) { sc_start(NULL,&sd->bl,status->skill2sc(PR_SUFFRAGIUM),100,1,skill->get_time(PR_SUFFRAGIUM,1)); if (sd->state.snovice_dead_flag) sd->state.snovice_dead_flag = 0; //Reenable steelbody resurrection on dead. - } else if( (sd->class_&MAPID_BASEMASK) == MAPID_TAEKWON ) { + } else if ((sd->job & MAPID_BASEMASK) == MAPID_TAEKWON) { sc_start(NULL,&sd->bl,status->skill2sc(AL_INCAGI),100,10,600000); sc_start(NULL,&sd->bl,status->skill2sc(AL_BLESSING),100,10,600000); } @@ -6633,7 +6764,7 @@ void pc_baselevelchanged(struct map_session_data *sd) { int pc_checkjoblevelup(struct map_session_data *sd) { - unsigned int next = pc->nextjobexp(sd); + uint64 next = pc->nextjobexp(sd); nullpo_ret(sd); if(!next || sd->status.job_exp < next) @@ -6666,7 +6797,7 @@ int pc_checkjoblevelup(struct map_session_data *sd) /** * Alters EXP based on self bonuses that do not get shared with the party **/ -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, uint64 *base_exp, uint64 *job_exp, struct block_list *src) { int buff_ratio = 0, buff_job_ratio = 0, race_ratio = 0, pk_ratio = 0; int64 jexp, bexp; @@ -6731,8 +6862,8 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in bexp += apply_percentrate64(bexp, buff_ratio, 100); jexp += apply_percentrate64(jexp, buff_ratio + buff_job_ratio, 100); - *job_exp = (unsigned int)cap_value(jexp, 1, UINT_MAX); - *base_exp = (unsigned int)cap_value(bexp, 1, UINT_MAX); + *job_exp = cap_value(jexp, 1, UINT64_MAX); + *base_exp = cap_value(bexp, 1, UINT64_MAX); } /** @@ -6741,9 +6872,10 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in * @param is_quest Used to let client know that the EXP was from a quest (clif->displayexp) PACKETVER >= 20091027 * @retval true success **/ -bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool is_quest) { - float nextbp=0, nextjp=0; - unsigned int nextb=0, nextj=0; +bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) +{ + float nextbp = 0, nextjp = 0; + uint64 nextb = 0, nextj = 0; nullpo_ret(sd); if (sd->bl.prev == NULL || pc_isdead(sd)) @@ -6759,7 +6891,7 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in pc->calcexp(sd, &base_exp, &job_exp, src); if (sd->status.guild_id > 0) - base_exp -= guild->payexp(sd,base_exp); + base_exp -= guild->payexp(sd, base_exp); nextb = pc->nextbaseexp(sd); nextj = pc->nextjobexp(sd); @@ -6770,16 +6902,16 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in if (nextj > 0) nextjp = (float) job_exp / (float) nextj; - if(battle_config.max_exp_gain_rate) { + if (battle_config.max_exp_gain_rate) { if (nextbp > battle_config.max_exp_gain_rate/1000.) { //Note that this value should never be greater than the original //base_exp, therefore no overflow checks are needed. [Skotlex] - base_exp = (unsigned int)(battle_config.max_exp_gain_rate/1000.*nextb); + base_exp = (uint64)(battle_config.max_exp_gain_rate / 1000. * nextb); if (sd->state.showexp) nextbp = (float) base_exp / (float) nextb; } if (nextjp > battle_config.max_exp_gain_rate/1000.) { - job_exp = (unsigned int)(battle_config.max_exp_gain_rate/1000.*nextj); + job_exp = (uint64)(battle_config.max_exp_gain_rate / 1000. * nextj); if (sd->state.showexp) nextjp = (float) job_exp / (float) nextj; } @@ -6789,23 +6921,23 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in // Cap exp to the level up requirement of the previous level when you are at max level, // otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex] if (base_exp) { - nextb = nextb?UINT_MAX:pc->thisbaseexp(sd); - if(sd->status.base_exp > nextb - base_exp) + nextb = nextb ? UINT64_MAX : pc->thisbaseexp(sd); + if (sd->status.base_exp > nextb - base_exp) sd->status.base_exp = nextb; else sd->status.base_exp += base_exp; pc->checkbaselevelup(sd); - clif->updatestatus(sd,SP_BASEEXP); + clif->updatestatus(sd, SP_BASEEXP); } if (job_exp) { - nextj = nextj?UINT_MAX:pc->thisjobexp(sd); - if(sd->status.job_exp > nextj - job_exp) + nextj = nextj ? UINT64_MAX : pc->thisjobexp(sd); + if (sd->status.job_exp > nextj - job_exp) sd->status.job_exp = nextj; else sd->status.job_exp += job_exp; pc->checkjoblevelup(sd); - clif->updatestatus(sd,SP_JOBEXP); + clif->updatestatus(sd, SP_JOBEXP); } #if PACKETVER >= 20091027 @@ -6818,7 +6950,8 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in if(sd->state.showexp) { char output[256]; sprintf(output, - "Experience Gained Base:%u (%.2f%%) Job:%u (%.2f%%)",base_exp,nextbp*(float)100,job_exp,nextjp*(float)100); + "Experience Gained Base:%"PRIu64" (%.2f%%) Job:%"PRIu64" (%.2f%%)", + base_exp, nextbp * (float)100, job_exp, nextjp * (float)100); clif_disp_onlyself(sd, output); } @@ -6830,12 +6963,12 @@ bool pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned in *------------------------------------------*/ int pc_maxbaselv(const struct map_session_data *sd) { - return pc->max_level[pc->class2idx(sd->status.class_)][0]; + return pc->max_level[pc->class2idx(sd->status.class)][0]; } int pc_maxjoblv(const struct map_session_data *sd) { - return pc->max_level[pc->class2idx(sd->status.class_)][1]; + return pc->max_level[pc->class2idx(sd->status.class)][1]; } /*========================================== @@ -6843,23 +6976,23 @@ int pc_maxjoblv(const struct map_session_data *sd) *------------------------------------------*/ //Base exp needed for next level. -unsigned int pc_nextbaseexp(const struct map_session_data *sd) +uint64 pc_nextbaseexp(const struct map_session_data *sd) { nullpo_ret(sd); if (sd->status.base_level >= pc->maxbaselv(sd) || sd->status.base_level <= 0) return 0; - return pc->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. -unsigned int pc_thisbaseexp(const struct map_session_data *sd) +uint64 pc_thisbaseexp(const struct map_session_data *sd) { if (sd->status.base_level > pc->maxbaselv(sd) || sd->status.base_level <= 1) return 0; - return pc->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]; } /*========================================== @@ -6870,21 +7003,21 @@ unsigned int pc_thisbaseexp(const struct map_session_data *sd) *------------------------------------------*/ //Job exp needed for next level. -unsigned int pc_nextjobexp(const struct map_session_data *sd) +uint64 pc_nextjobexp(const struct map_session_data *sd) { nullpo_ret(sd); if (sd->status.job_level >= pc->maxjoblv(sd) || sd->status.job_level <= 0) return 0; - return pc->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. -unsigned int pc_thisjobexp(const struct map_session_data *sd) +uint64 pc_thisjobexp(const struct map_session_data *sd) { if (sd->status.job_level > pc->maxjoblv(sd) || sd->status.job_level <= 1) return 0; - return pc->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. @@ -7115,13 +7248,14 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) { if( sd->status.skill_point > 0 && sd->status.skill[index].id && sd->status.skill[index].flag == SKILL_FLAG_PERMANENT && //Don't allow raising while you have granted skills. [Skotlex] - sd->status.skill[index].lv < skill->tree_get_max(skill_id, sd->status.class_) ) + sd->status.skill[index].lv < skill->tree_get_max(skill_id, sd->status.class) ) { sd->status.skill[index].lv++; sd->status.skill_point--; if( !skill->dbs->db[index].inf ) status_calc_pc(sd,SCO_NONE); // Only recalculate for passive skills. - 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) ) + else if (sd->status.skill_point == 0 && (sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON + && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0) 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 @@ -7177,8 +7311,8 @@ int pc_allskillup(struct map_session_data *sd) } } else { int id; - 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; + 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; int inf2 = skill->dbs->db[idx].inf2; if ( (inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) || @@ -7188,7 +7322,7 @@ int pc_allskillup(struct map_session_data *sd) continue; //Cannot be learned normally. sd->status.skill[idx].id = id; - sd->status.skill[idx].lv = skill->tree_get_max(id, sd->status.class_); // celest + sd->status.skill[idx].lv = skill->tree_get_max(id, sd->status.class); // celest } } status_calc_pc(sd,SCO_NONE); @@ -7225,7 +7359,7 @@ int pc_resetlvl(struct map_session_data* sd,int type) sd->status.int_=1; sd->status.dex=1; sd->status.luk=1; - if(sd->status.class_ == JOB_NOVICE_HIGH) { + if (sd->status.class == JOB_NOVICE_HIGH) { sd->status.status_point=100; // not 88 [celest] // give platinum skills upon changing pc->skill(sd, NV_FIRSTAID, 1, SKILL_GRANT_PERMANENT); @@ -7302,7 +7436,7 @@ int pc_resetstate(struct map_session_data* sd) return 0; } - sd->status.status_point = pc->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->job & JOBL_UPPER) != 0 ? 52 : 0); // extra 52+48=100 stat points } else { @@ -7360,7 +7494,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) int i, inf2, skill_point=0; nullpo_ret(sd); - if( flag&PCRESETSKILL_CHSEX && (sd->class_&MAPID_UPPERMASK) != MAPID_BARDDANCER ) + if (flag&PCRESETSKILL_CHSEX && (sd->job & MAPID_UPPERMASK) != MAPID_BARDDANCER) return 0; if( !(flag&PCRESETSKILL_RECOUNT) ) { //Remove stuff lost when resetting skills. @@ -7368,7 +7502,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) /** * It has been confirmed on official server that when you reset skills with a ranked tweakwon your skills are not reset (because you have all of them anyway) **/ - if( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON)) return 0; if( pc->checkskill(sd, SG_DEVIL) && !pc->nextjobexp(sd) ) //Remove perma blindness due to skill-reset. [Skotlex] @@ -7384,7 +7518,7 @@ int pc_resetskill(struct map_session_data* sd, int flag) i &= ~OPTION_WUG; if( i&OPTION_WUGRIDER && pc->checkskill(sd, RA_WUGRIDER) ) i &= ~OPTION_WUGRIDER; - if( i&OPTION_MADOGEAR && ( sd->class_&MAPID_THIRDMASK ) == MAPID_MECHANIC ) + if (i&OPTION_MADOGEAR && (sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) i &= ~OPTION_MADOGEAR; #ifndef NEW_CARTS if( i&OPTION_CART && pc->checkskill(sd, MC_PUSHCART) ) @@ -7398,6 +7532,9 @@ int pc_resetskill(struct map_session_data* sd, int flag) if( homun_alive(sd->hd) && pc->checkskill(sd, AM_CALLHOMUN) ) homun->vaporize(sd, HOM_ST_REST); + + if ((sd->sc.data[SC_SPRITEMABLE] && pc->checkskill(sd, SU_SPRITEMABLE))) + status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER); } for( i = 1; i < MAX_SKILL; i++ ) { @@ -7415,14 +7552,16 @@ int pc_resetskill(struct map_session_data* sd, int flag) skill_id = skill->dbs->db[i].nameid; // Don't reset trick dead if not a novice/baby - if( skill_id == NV_TRICKDEAD && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) { + if (skill_id == NV_TRICKDEAD && (sd->job & MAPID_UPPERMASK) != MAPID_NOVICE) { sd->status.skill[i].lv = 0; sd->status.skill[i].flag = 0; continue; } // do not reset basic skill - if( skill_id == NV_BASIC && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) + if (skill_id == NV_BASIC && (sd->job & MAPID_UPPERMASK) != MAPID_NOVICE) + continue; + if (skill_id == SU_BASIC_SKILL && (sd->job & MAPID_BASEMASK) != MAPID_SUMMONER) continue; if( sd->status.skill[i].flag == SKILL_FLAG_PERM_GRANTED ) @@ -7521,22 +7660,42 @@ int pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) return bonus; } -int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { +int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) +{ int i, bonus = sd->bonus.add_heal_rate; - if( bonus ) { - switch( skill_id ) { - case AL_HEAL: if( !(battle_config.skill_add_heal_rate&1) ) bonus = 0; break; - case PR_SANCTUARY: if( !(battle_config.skill_add_heal_rate&2) ) bonus = 0; break; - case AM_POTIONPITCHER: if( !(battle_config.skill_add_heal_rate&4) ) bonus = 0; break; - case CR_SLIMPITCHER: if( !(battle_config.skill_add_heal_rate&8) ) bonus = 0; break; - case BA_APPLEIDUN: if( !(battle_config.skill_add_heal_rate&16)) bonus = 0; break; + if (bonus) { + switch (skill_id) { + case AL_HEAL: + if ((battle_config.skill_add_heal_rate & 1) == 0) + bonus = 0; + break; + case PR_SANCTUARY: + if ((battle_config.skill_add_heal_rate & 2) == 0) + bonus = 0; + break; + case AM_POTIONPITCHER: + if ((battle_config.skill_add_heal_rate & 4) == 0) + bonus = 0; + break; + case CR_SLIMPITCHER: + if ((battle_config.skill_add_heal_rate & 8) == 0) + bonus = 0; + break; + case BA_APPLEIDUN: + if ((battle_config.skill_add_heal_rate & 16) == 0) + bonus = 0; + break; + case AB_HIGHNESSHEAL: + if ((battle_config.skill_add_heal_rate & 32) == 0) + bonus = 0; + break; } } ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_id); - if( i < ARRAYLENGTH(sd->skillheal) ) + if (i < ARRAYLENGTH(sd->skillheal)) bonus += sd->skillheal[i].val; return bonus; @@ -7605,7 +7764,8 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h if( sd->status.ele_id > 0 ) elemental->set_target(sd,src); - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_DAMAGE) + sd->canlog_tick = timer->gettick(); } /*========================================== @@ -7800,10 +7960,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { } // activate Steel body if a super novice dies at 99+% exp [celest] - if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag) { - unsigned int next = pc->nextbaseexp(sd); + if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && !sd->state.snovice_dead_flag) { + uint64 next = pc->nextbaseexp(sd); if( next == 0 ) next = pc->thisbaseexp(sd); - if( get_percentage(sd->status.base_exp,next) >= 99 ) { + if (get_percentage64(sd->status.base_exp, next) >= 99) { sd->state.snovice_dead_flag = 1; pc->setstand(sd); status_percent_heal(&sd->bl, 100, 100); @@ -7819,7 +7979,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 + && (sd->job & MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty && !map->list[sd->bl.m].flag.noexppenalty && !map_flag_gvg2(sd->bl.m) && !sd->sc.data[SC_BABY] && !sd->sc.data[SC_CASH_DEATHPENALTY] ) { @@ -7988,9 +8148,9 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) { /*========================================== * script reading pc status registry *------------------------------------------*/ -int pc_readparam(const struct map_session_data *sd, int type) +int64 pc_readparam(const struct map_session_data *sd, int type) { - int val = 0; + int64 val = 0; nullpo_ret(sd); @@ -7998,12 +8158,13 @@ int pc_readparam(const struct map_session_data *sd, int type) case SP_SKILLPOINT: val = sd->status.skill_point; break; case SP_STATUSPOINT: val = sd->status.status_point; break; case SP_ZENY: val = sd->status.zeny; break; + case SP_BANKVAULT: val = sd->status.bank_vault; break; case SP_BASELEVEL: val = sd->status.base_level; break; case SP_JOBLEVEL: val = sd->status.job_level; break; - case SP_CLASS: val = sd->status.class_; break; - case SP_BASEJOB: val = pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type. - case SP_UPPER: val = (sd->class_&JOBL_UPPER) ? 1 : ((sd->class_&JOBL_BABY) ? 2 : 0); break; - case SP_BASECLASS: val = pc->mapid2jobid(sd->class_&MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex] + case SP_CLASS: val = sd->status.class; break; + case SP_BASEJOB: val = pc->mapid2jobid(sd->job & MAPID_UPPERMASK, sd->status.sex); break; //Base job, extracting upper type. + case SP_UPPER: val = (sd->job & JOBL_UPPER) != 0 ? 1 : ((sd->job & JOBL_BABY) != 0 ? 2 : 0); break; + case SP_BASECLASS: val = pc->mapid2jobid(sd->job & MAPID_BASEMASK, sd->status.sex); break; //Extract base class tree. [Skotlex] case SP_SEX: val = sd->status.sex; break; case SP_WEIGHT: val = sd->weight; break; case SP_MAXWEIGHT: val = sd->max_weight; break; @@ -8140,8 +8301,9 @@ int pc_readparam(const struct map_session_data *sd, int type) /*========================================== * script set pc status registry *------------------------------------------*/ -int pc_setparam(struct map_session_data *sd,int type,int val) +int pc_setparam(struct map_session_data *sd, int type, int64 val) { + int delta; nullpo_ret(sd); switch(type){ @@ -8154,7 +8316,7 @@ int pc_setparam(struct map_session_data *sd,int type,int val) stat += pc->gets_status_point(sd->status.base_level + i); sd->status.status_point += stat; } - sd->status.base_level = val; + sd->status.base_level = (int32)val; sd->status.base_exp = 0; // clif->updatestatus(sd, SP_BASELEVEL); // Gets updated at the bottom clif->updatestatus(sd, SP_NEXTBASEEXP); @@ -8170,10 +8332,10 @@ int pc_setparam(struct map_session_data *sd,int type,int val) if (val >= sd->status.job_level) { if (val > pc->maxjoblv(sd)) val = pc->maxjoblv(sd); - sd->status.skill_point += val - sd->status.job_level; + sd->status.skill_point += (int)val - sd->status.job_level; clif->updatestatus(sd, SP_SKILLPOINT); } - sd->status.job_level = val; + sd->status.job_level = (int32)val; sd->status.job_exp = 0; // clif->updatestatus(sd, SP_JOBLEVEL); // Gets updated at the bottom clif->updatestatus(sd, SP_NEXTJOBEXP); @@ -8181,17 +8343,30 @@ int pc_setparam(struct map_session_data *sd,int type,int val) status_calc_pc(sd, SCO_FORCE); break; case SP_SKILLPOINT: - sd->status.skill_point = val; + sd->status.skill_point = (int32)val; break; case SP_STATUSPOINT: - sd->status.status_point = val; + sd->status.status_point = (int32)val; break; case SP_ZENY: if( val < 0 ) return 0;// can't set negative zeny - logs->zeny(sd, LOG_TYPE_SCRIPT, sd, -(sd->status.zeny - cap_value(val, 0, MAX_ZENY))); - sd->status.zeny = cap_value(val, 0, MAX_ZENY); + logs->zeny(sd, LOG_TYPE_SCRIPT, sd, -(sd->status.zeny - cap_value((int32)val, 0, MAX_ZENY))); + sd->status.zeny = cap_value((int32)val, 0, MAX_ZENY); break; + case SP_BANKVAULT: + val = cap_value(val, 0, MAX_BANK_ZENY); + delta = ((int32)val - sd->status.bank_vault); + sd->status.bank_vault = (int32)val; + if (map->save_settings & 256) { + chrif->save(sd, 0); // send to char server + } + if (delta > 0) { + clif->bank_deposit(sd, BDA_SUCCESS); + } else if (delta < 0) { + clif->bank_withdraw(sd, BWA_SUCCESS); + } + return 1; // the vault uses a different packet case SP_BASEEXP: if(pc->nextbaseexp(sd) > 0) { sd->status.base_exp = val; @@ -8208,16 +8383,16 @@ int pc_setparam(struct map_session_data *sd,int type,int val) sd->status.sex = val ? SEX_MALE : SEX_FEMALE; break; case SP_WEIGHT: - sd->weight = val; + sd->weight = (int32)val; break; case SP_MAXWEIGHT: - sd->max_weight = val; + sd->max_weight = (int32)val; break; case SP_HP: - sd->battle_status.hp = cap_value(val, 1, (int)sd->battle_status.max_hp); + sd->battle_status.hp = cap_value((int32)val, 1, (int)sd->battle_status.max_hp); break; case SP_MAXHP: - sd->battle_status.max_hp = cap_value(val, 1, battle_config.max_hp); + sd->battle_status.max_hp = cap_value((int32)val, 1, battle_config.max_hp); if( sd->battle_status.max_hp < sd->battle_status.hp ) { @@ -8226,10 +8401,10 @@ int pc_setparam(struct map_session_data *sd,int type,int val) } break; case SP_SP: - sd->battle_status.sp = cap_value(val, 0, (int)sd->battle_status.max_sp); + sd->battle_status.sp = cap_value((int32)val, 0, (int)sd->battle_status.max_sp); break; case SP_MAXSP: - sd->battle_status.max_sp = cap_value(val, 1, battle_config.max_sp); + sd->battle_status.max_sp = cap_value((int32)val, 1, battle_config.max_sp); if( sd->battle_status.max_sp < sd->battle_status.sp ) { @@ -8238,28 +8413,28 @@ int pc_setparam(struct map_session_data *sd,int type,int val) } break; case SP_STR: - sd->status.str = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.str = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_AGI: - sd->status.agi = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.agi = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_VIT: - sd->status.vit = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.vit = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_INT: - sd->status.int_ = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.int_ = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_DEX: - sd->status.dex = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.dex = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_LUK: - sd->status.luk = cap_value(val, 1, pc_maxparameter(sd)); + sd->status.luk = cap_value((int)val, 1, pc_maxparameter(sd)); break; case SP_KARMA: - sd->status.karma = val; + sd->status.karma = (int)val; break; case SP_MANNER: - sd->status.manner = val; + sd->status.manner = (int)val; if( val < 0 ) sc_start(NULL, &sd->bl, SC_NOCHAT, 100, 0, 0); else { @@ -8268,28 +8443,28 @@ int pc_setparam(struct map_session_data *sd,int type,int val) } return 1; // status_change_start/status_change_end already sends packets warning the client case SP_FAME: - sd->status.fame = val; + sd->status.fame = (int32)val; break; case SP_KILLERRID: - sd->killerrid = val; + sd->killerrid = (int32)val; return 1; case SP_KILLEDRID: - sd->killedrid = val; + sd->killedrid = (int32)val; return 1; case SP_SLOTCHANGE: - sd->status.slotchange = val; + sd->status.slotchange = (int32)val; return 1; case SP_CHARRENAME: - sd->status.rename = val; + sd->status.rename = (int32)val; return 1; case SP_MOD_EXP: - sd->status.mod_exp = val; + sd->status.mod_exp = (int32)val; return 1; case SP_MOD_DROP: - sd->status.mod_drop = val; + sd->status.mod_drop = (int32)val; return 1; case SP_MOD_DEATH: - sd->status.mod_death = val; + sd->status.mod_death = (int32)val; return 1; default: ShowError("pc_setparam: Attempted to set unknown parameter '%d'.\n", type); @@ -8396,6 +8571,9 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) if( sd->sc.data[SC_EXTREMITYFIST2] ) sp = 0; #endif + if (sd->sc.data[SC_BITESCAR]) { + hp = 0; + } } return status->heal(&sd->bl, hp, sp, 1); @@ -8458,44 +8636,43 @@ int jobchange_killclone(struct block_list *bl, va_list ap) * Called when player changes job * Rewrote to make it tidider [Celest] *------------------------------------------*/ -int pc_jobchange(struct map_session_data *sd,int job, int upper) +int pc_jobchange(struct map_session_data *sd, int class, int upper) { int i, fame_flag=0; - int b_class, idx = 0; + int job, idx = 0; nullpo_ret(sd); - if (job < 0) + if (class < 0) return 1; //Normalize job. - b_class = pc->jobid2mapid(job); - if (b_class == -1) + job = pc->jobid2mapid(class); + if (job == -1) return 1; switch (upper) { case 1: - b_class|= JOBL_UPPER; + job |= JOBL_UPPER; break; case 2: - b_class|= JOBL_BABY; + job |= JOBL_BABY; break; } //This will automatically adjust bard/dancer classes to the correct gender //That is, if you try to jobchange into dancer, it will turn you to bard. - job = pc->mapid2jobid(b_class, sd->status.sex); - if (job == -1) + class = pc->mapid2jobid(job, sd->status.sex); + if (class == -1) return 1; - if ((unsigned short)b_class == sd->class_) + if ((uint16)job == sd->job) return 1; //Nothing to change. - // changing from 1st to 2nd job - if ((b_class&JOBL_2) && !(sd->class_&JOBL_2) && (b_class&MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) { + if ((job & JOBL_2) != 0 && (sd->job & JOBL_2) == 0 && (job & MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) { + // changing from 1st to 2nd job sd->change_level_2nd = sd->status.job_level; pc_setglobalreg(sd, script->add_str("jobchange_level"), sd->change_level_2nd); - } - // changing from 2nd to 3rd job - else if((b_class&JOBL_THIRD) && !(sd->class_&JOBL_THIRD)) { + } else if((job & JOBL_THIRD) != 0 && (sd->job & JOBL_THIRD) == 0) { + // changing from 2nd to 3rd job sd->change_level_3rd = sd->status.job_level; pc_setglobalreg(sd, script->add_str("jobchange_level_3rd"), sd->change_level_3rd); } @@ -8526,10 +8703,10 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) pc_setglobalreg(sd, script->add_str("REPRODUCE_SKILL_LV"),0); } - if ( (b_class&MAPID_UPPERMASK) != (sd->class_&MAPID_UPPERMASK) ) { //Things to remove when changing class tree. - const int class_ = pc->class2idx(sd->status.class_); + if ((job & MAPID_UPPERMASK) != (sd->job & MAPID_UPPERMASK)) { //Things to remove when changing class tree. + const int class_idx = pc->class2idx(sd->status.class); short id; - for(i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[class_][i].id) > 0; i++) { + for (i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[class_idx][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]) @@ -8537,14 +8714,18 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) } } - if( (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && (b_class&MAPID_UPPERMASK) != MAPID_STAR_GLADIATOR) { + if ((sd->job & MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && (job & MAPID_UPPERMASK) != MAPID_STAR_GLADIATOR) { /* going off star glad lineage, reset feel to not store no-longer-used vars in the database */ pc->resetfeel(sd); } - sd->status.class_ = job; - fame_flag = pc->famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK); - sd->class_ = (unsigned short)b_class; + sd->status.class = class; + { + int fame_list_type = pc->famelist_type(sd->job); + if (fame_list_type != RANKTYPE_UNKNOWN) + fame_flag = pc->fame_rank(sd->status.char_id, fame_list_type); + } + sd->job = (uint16)job; sd->status.job_level=1; sd->status.job_exp=0; @@ -8573,8 +8754,8 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) if (sd->disguise != -1) pc->disguise(sd, -1); - status->set_viewdata(&sd->bl, job); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); // move sprite update to prevent client crashes with incompatible equipment [Valaris] + status->set_viewdata(&sd->bl, class); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); // move sprite update to prevent client crashes with incompatible equipment [Valaris] if(sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); if (sd->vd.body_style) @@ -8593,7 +8774,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) //Remove peco/cart/falcon i = sd->sc.option; - if( i&OPTION_RIDING && (!pc->checkskill(sd, KN_RIDING) || (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) ) + if (i&OPTION_RIDING && (!pc->checkskill(sd, KN_RIDING) || (sd->job & MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT)) i&=~OPTION_RIDING; if( i&OPTION_FALCON && !pc->checkskill(sd, HT_FALCON) ) i&=~OPTION_FALCON; @@ -8618,20 +8799,24 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) if(homun_alive(sd->hd) && !pc->checkskill(sd, AM_CALLHOMUN)) homun->vaporize(sd, HOM_ST_REST); + if ((sd->sc.data[SC_SPRITEMABLE] && pc->checkskill(sd, SU_SPRITEMABLE))) + status_change_end(&sd->bl, SC_SPRITEMABLE, INVALID_TIMER); + if(sd->status.manner < 0) clif->changestatus(sd,SP_MANNER,sd->status.manner); status_calc_pc(sd,SCO_FORCE); pc->checkallowskill(sd); pc->equiplookall(sd); + pc->update_job_and_level(sd); //if you were previously famous, not anymore. - if (fame_flag) { + if (fame_flag != 0) { chrif->save(sd,0); chrif->buildfamelist(); } else if (sd->status.fame > 0) { //It may be that now they are famous? - switch (sd->class_&MAPID_UPPERMASK) { + switch (sd->job & MAPID_UPPERMASK) { case MAPID_BLACKSMITH: case MAPID_ALCHEMIST: case MAPID_TAEKWON: @@ -8653,10 +8838,10 @@ int pc_equiplookall(struct map_session_data *sd) clif->changelook(&sd->bl,LOOK_WEAPON,0); clif->changelook(&sd->bl,LOOK_SHOES,0); - clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); - clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); - clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); - clif->changelook(&sd->bl,LOOK_ROBE, sd->status.robe); + clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom); + clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top); + clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid); + clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe); return 0; } @@ -8671,8 +8856,8 @@ int pc_changelook(struct map_session_data *sd,int type,int val) switch(type){ case LOOK_BASE: status->set_viewdata(&sd->bl, val); - clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); - clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); + clif->changelook(&sd->bl, LOOK_BASE, sd->vd.class); + clif->changelook(&sd->bl, LOOK_WEAPON, sd->status.look.weapon); if (sd->vd.cloth_color) clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); if (sd->vd.body_style) @@ -8691,16 +8876,16 @@ int pc_changelook(struct map_session_data *sd,int type,int val) } break; case LOOK_WEAPON: - sd->status.weapon=val; + sd->status.look.weapon = val; break; case LOOK_HEAD_BOTTOM: - sd->status.head_bottom=val; + sd->status.look.head_bottom = val; break; case LOOK_HEAD_TOP: - sd->status.head_top=val; + sd->status.look.head_top = val; break; case LOOK_HEAD_MID: - sd->status.head_mid=val; + sd->status.look.head_mid = val; break; case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex] val = cap_value(val, MIN_HAIR_COLOR, MAX_HAIR_COLOR); @@ -8718,12 +8903,12 @@ int pc_changelook(struct map_session_data *sd,int type,int val) sd->status.clothes_color=val; break; case LOOK_SHIELD: - sd->status.shield=val; + sd->status.look.shield = val; break; case LOOK_SHOES: break; case LOOK_ROBE: - sd->status.robe = val; + sd->status.look.robe = val; break; case LOOK_BODY2: val = cap_value(val, MIN_BODY_STYLE, MAX_BODY_STYLE); @@ -8817,8 +9002,8 @@ int pc_setoption(struct map_session_data *sd,int type) return 0; //Disguises break sprite changes if (new_look < 0) { //Restore normal look. - status->set_viewdata(&sd->bl, sd->status.class_); - new_look = sd->vd.class_; + status->set_viewdata(&sd->bl, sd->status.class); + new_look = sd->vd.class; } pc_stop_attack(sd); //Stop attacking on new view change (to prevent wedding/santa attacks. @@ -8940,7 +9125,7 @@ void pc_setmadogear(struct map_session_data *sd, bool flag) { nullpo_retv(sd); if (flag) { - if ((sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC) + if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR); } else if (pc_ismadogear(sd)) { pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR); @@ -9186,7 +9371,7 @@ int pc_setregistry(struct map_session_data *sd, int64 reg, int val) { switch( regname[0] ) { default: //Char reg if( !strcmp(regname,"PC_DIE_COUNTER") && sd->die_counter != val ) { - int i = (!sd->die_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE); + int i = (!sd->die_counter && (sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE); sd->die_counter = val; if( i ) status_calc_pc(sd,SCO_NONE); // Lost the bonus. @@ -9585,83 +9770,91 @@ void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, nullpo_retv(sd); if ((!map_no_view(sd->bl.m,EQP_SHADOW_WEAPON) && pos & EQP_SHADOW_WEAPON) || (pos & EQP_HAND_R)) { - if(id) - sd->weapontype1 = id->look; - else - sd->weapontype1 = 0; + if (id != NULL) { + sd->weapontype1 = id->subtype; + sd->status.look.weapon = id->view_sprite; + } else { + sd->weapontype1 = W_FIST; + sd->status.look.weapon = 0; + } pc->calcweapontype(sd); - clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); + clif->changelook(&sd->bl, LOOK_WEAPON, sd->status.look.weapon); } if ((!map_no_view(sd->bl.m,EQP_SHADOW_SHIELD) && pos & EQP_SHADOW_SHIELD) || (pos & EQP_HAND_L)) { - if (id) { - if(id->type == IT_WEAPON) { - sd->status.shield = 0; - sd->weapontype2 = id->look; - } else if(id->type == IT_ARMOR) { - sd->status.shield = id->look; - sd->weapontype2 = 0; + if (id != NULL) { + if (id->type == IT_WEAPON) { + sd->has_shield = false; + sd->status.look.shield = 0; + sd->weapontype2 = id->subtype; + } else if (id->type == IT_ARMOR) { + sd->has_shield = true; + sd->status.look.shield = id->view_sprite; + sd->weapontype2 = W_FIST; } - } else - sd->status.shield = sd->weapontype2 = 0; + } else { + sd->has_shield = false; + sd->status.look.shield = 0; + sd->weapontype2 = W_FIST; + } pc->calcweapontype(sd); - clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield); + clif->changelook(&sd->bl, LOOK_SHIELD, sd->status.look.shield); } //Added check to prevent sending the same look on multiple slots -> //causes client to redraw item on top of itself. (suggested by Lupus) if (!map_no_view(sd->bl.m,EQP_HEAD_LOW) && pos & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) { if (id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID))) - sd->status.head_bottom = id->look; + sd->status.look.head_bottom = id->view_sprite; else - sd->status.head_bottom = 0; - clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); + sd->status.look.head_bottom = 0; + clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom); } if (!map_no_view(sd->bl.m,EQP_HEAD_TOP) && pos & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) { if (id) - sd->status.head_top = id->look; + sd->status.look.head_top = id->view_sprite; else - sd->status.head_top = 0; - clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); + sd->status.look.head_top = 0; + clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top); } if (!map_no_view(sd->bl.m,EQP_HEAD_MID) && pos & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) { if (id && !(pos&EQP_HEAD_TOP)) - sd->status.head_mid = id->look; + sd->status.look.head_mid = id->view_sprite; else - sd->status.head_mid = 0; - clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); + sd->status.look.head_mid = 0; + clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid); } if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_TOP) && pos & EQP_COSTUME_HEAD_TOP) { if (id){ - sd->status.head_top = id->look; + sd->status.look.head_top = id->view_sprite; } else - sd->status.head_top = 0; - clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); + sd->status.look.head_top = 0; + clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top); } if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_MID) && pos & EQP_COSTUME_HEAD_MID) { if(id && !(pos&EQP_HEAD_TOP)){ - sd->status.head_mid = id->look; + sd->status.look.head_mid = id->view_sprite; } else - sd->status.head_mid = 0; - clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); + sd->status.look.head_mid = 0; + clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid); } if (!map_no_view(sd->bl.m,EQP_COSTUME_HEAD_LOW) && pos & EQP_COSTUME_HEAD_LOW) { if (id && !(pos&(EQP_HEAD_TOP|EQP_HEAD_MID))){ - sd->status.head_bottom = id->look; + sd->status.look.head_bottom = id->view_sprite; } else - sd->status.head_bottom = 0; - clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); + sd->status.look.head_bottom = 0; + clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom); } if (!map_no_view(sd->bl.m,EQP_SHOES) && pos & EQP_SHOES) clif->changelook(&sd->bl,LOOK_SHOES,0); if (!map_no_view(sd->bl.m,EQP_GARMENT) && pos&EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1) { - sd->status.robe = id ? id->look : 0; - clif->changelook(&sd->bl, LOOK_ROBE, sd->status.robe); + sd->status.look.robe = id ? id->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe); } if (!map_no_view(sd->bl.m,EQP_COSTUME_GARMENT) && pos & EQP_COSTUME_GARMENT) { - sd->status.robe = id ? id->look : 0; - clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe); + sd->status.look.robe = id ? id->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe); } } @@ -9815,57 +10008,59 @@ void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { nullpo_retv(sd); if (pos & EQP_HAND_R) { - sd->weapontype1 = 0; - sd->status.weapon = sd->weapontype2; + sd->weapontype1 = W_FIST; pc->calcweapontype(sd); - clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon); + sd->status.look.weapon = 0; + clif->changelook(&sd->bl, LOOK_WEAPON, sd->status.look.weapon); if (!battle_config.dancing_weaponswitch_fix) status_change_end(&sd->bl, SC_DANCING, INVALID_TIMER); // Unequipping => stop dancing. } if (pos & EQP_HAND_L) { - sd->status.shield = sd->weapontype2 = 0; + sd->has_shield = false; + sd->status.look.shield = 0; + sd->weapontype2 = W_FIST; pc->calcweapontype(sd); - clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield); + clif->changelook(&sd->bl, LOOK_SHIELD, sd->status.look.shield); } if (pos & EQP_HEAD_LOW && pc->checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1) { - sd->status.head_bottom = 0; - clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); + sd->status.look.head_bottom = 0; + clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom); } if (pos & EQP_HEAD_TOP && pc->checkequip(sd,EQP_COSTUME_HEAD_TOP) == -1) { - sd->status.head_top = 0; - clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); + sd->status.look.head_top = 0; + clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top); } if (pos & EQP_HEAD_MID && pc->checkequip(sd,EQP_COSTUME_HEAD_MID) == -1) { - sd->status.head_mid = 0; - clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); + sd->status.look.head_mid = 0; + clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid); } if (pos & EQP_COSTUME_HEAD_TOP) { - sd->status.head_top = ( pc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_TOP)]->look : 0; - clif->changelook(&sd->bl,LOOK_HEAD_TOP,sd->status.head_top); + sd->status.look.head_top = ( pc->checkequip(sd,EQP_HEAD_TOP) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_TOP)]->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_HEAD_TOP, sd->status.look.head_top); } if (pos & EQP_COSTUME_HEAD_MID) { - sd->status.head_mid = ( pc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_MID)]->look : 0; - clif->changelook(&sd->bl,LOOK_HEAD_MID,sd->status.head_mid); + sd->status.look.head_mid = ( pc->checkequip(sd,EQP_HEAD_MID) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_MID)]->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_HEAD_MID, sd->status.look.head_mid); } if (pos & EQP_COSTUME_HEAD_LOW) { - sd->status.head_bottom = ( pc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_LOW)]->look : 0; - clif->changelook(&sd->bl,LOOK_HEAD_BOTTOM,sd->status.head_bottom); + sd->status.look.head_bottom = ( pc->checkequip(sd,EQP_HEAD_LOW) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_HEAD_LOW)]->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_HEAD_BOTTOM, sd->status.look.head_bottom); } if (pos & EQP_SHOES) clif->changelook(&sd->bl,LOOK_SHOES,0); if (pos & EQP_GARMENT && pc->checkequip(sd,EQP_COSTUME_GARMENT) == -1) { - sd->status.robe = 0; + sd->status.look.robe = 0; clif->changelook(&sd->bl, LOOK_ROBE, 0); } if (pos & EQP_COSTUME_GARMENT) { - sd->status.robe = ( pc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_GARMENT)]->look : 0; - clif->changelook(&sd->bl,LOOK_ROBE,sd->status.robe); + sd->status.look.robe = ( pc->checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc->checkequip(sd,EQP_GARMENT)]->view_sprite : 0; + clif->changelook(&sd->bl, LOOK_ROBE, sd->status.look.robe); } } @@ -9878,127 +10073,142 @@ void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) *------------------------------------------*/ int pc_unequipitem(struct map_session_data *sd,int n,int flag) { - int i,iflag; - bool status_cacl = false; + int i, iflag; + bool status_calc = false; int pos; + nullpo_ret(sd); - if( n < 0 || n >= MAX_INVENTORY ) { - clif->unequipitemack(sd,0,0,UIA_FAIL); + if (n < 0 || n >= MAX_INVENTORY) { + clif->unequipitemack(sd, 0, 0, UIA_FAIL); return 0; } // if player is berserk then cannot unequip - if (!(flag&PCUNEQUIPITEM_FORCE) && sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_NO_SWITCH_EQUIP]) ) - { - clif->unequipitemack(sd,n,0,UIA_FAIL); + if (!(flag & PCUNEQUIPITEM_FORCE) && sd->sc.count && (sd->sc.data[SC_BERSERK] || sd->sc.data[SC_NO_SWITCH_EQUIP])) { + clif->unequipitemack(sd, n, 0, UIA_FAIL); return 0; } - if( !(flag&PCUNEQUIPITEM_FORCE) && sd->sc.count && sd->sc.data[SC_KYOUGAKU] ) - { - clif->unequipitemack(sd,n,0,UIA_FAIL); + if (!(flag & PCUNEQUIPITEM_FORCE) && sd->sc.count && sd->sc.data[SC_KYOUGAKU]) { + clif->unequipitemack(sd, n, 0, UIA_FAIL); return 0; } - if(battle_config.battle_log) + if (battle_config.battle_log) ShowInfo("unequip %d %x:%x\n", n, (unsigned int)(pc->equippoint(sd, n)), sd->status.inventory[n].equip); - if(!sd->status.inventory[n].equip){ //Nothing to unequip - clif->unequipitemack(sd,n,0,UIA_FAIL); + if (sd->status.inventory[n].equip == 0) { //Nothing to unequip + clif->unequipitemack(sd, n, 0, UIA_FAIL); return 0; } - for(i=0;i<EQI_MAX;i++) { - if(sd->status.inventory[n].equip & pc->equip_pos[i]) + + for (i = 0; i < EQI_MAX; i++) { + if (sd->status.inventory[n].equip & pc->equip_pos[i]) sd->equip_index[i] = -1; } pos = sd->status.inventory[n].equip; pc->unequipitem_pos(sd, n, pos); - clif->unequipitemack(sd,n,pos,UIA_SUCCESS); + clif->unequipitemack(sd, n, pos, UIA_SUCCESS); - if((pos & EQP_ARMS) && - sd->weapontype1 == 0 && sd->weapontype2 == 0 && (!sd->sc.data[SC_TK_SEVENWIND] || sd->sc.data[SC_ASPERSIO])) //Check for seven wind (but not level seven!) - skill->enchant_elemental_end(&sd->bl,-1); + if ((pos & EQP_ARMS) && + sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST && (sd->sc.data[SC_TK_SEVENWIND] == NULL || sd->sc.data[SC_ASPERSIO] != NULL)) //Check for seven wind (but not level seven!) + skill->enchant_elemental_end(&sd->bl, -1); - if(pos & EQP_ARMOR) { + if (pos & EQP_ARMOR) { // On Armor Change... status_change_end(&sd->bl, SC_BENEDICTIO, INVALID_TIMER); status_change_end(&sd->bl, SC_ARMOR_RESIST, INVALID_TIMER); } +#ifdef RENEWAL + if (battle->bc->bow_unequip_arrow && pos&EQP_ARMS && sd->equip_index[EQI_AMMO] > 0) + pc->unequipitem(sd, sd->equip_index[EQI_AMMO], PCUNEQUIPITEM_FORCE); +#endif + if( sd->state.autobonus&pos ) sd->state.autobonus &= ~sd->status.inventory[n].equip; //Check for activated autobonus [Inkfish] - sd->status.inventory[n].equip=0; + sd->status.inventory[n].equip = 0; iflag = sd->npc_item_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]) ) - status_cacl = true; - } if(itemdb_isspecial(sd->status.inventory[n].card[0])) - ; //No cards - else { - for( i = 0; i < sd->inventory_data[n]->slot; i++ ) { + if (sd->inventory_data[n] != NULL) { + if (sd->inventory_data[n]->combos_count) { + if (pc->removecombo(sd, sd->inventory_data[n])) + status_calc = true; + } + if (itemdb_isspecial(sd->status.inventory[n].card[0]) == false) { + for (i = 0; i < sd->inventory_data[n]->slot; i++) { struct item_data *data; - if (!sd->status.inventory[n].card[i]) + if (sd->status.inventory[n].card[i] == 0) continue; - if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { - if( data->combos_count ) { - if( pc->removecombo(sd,data) ) - status_cacl = true; + if ((data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL) { + if (data->combos_count) { + if (pc->removecombo(sd, data)) + status_calc = true; } } } } + /* Item Options checking */ + for (i = 0; i < MAX_ITEM_OPTIONS; i++) { + struct item_option *ito = NULL; + int16 item_option = sd->status.inventory[n].option[i].index; + + if (item_option <= 0) + continue; + if ((ito = itemdb->option_exists(sd->status.inventory[n].option[i].index)) == NULL) + continue; + + status_calc = true; + } } - if(flag&PCUNEQUIPITEM_RECALC || status_cacl) { + if (flag & PCUNEQUIPITEM_RECALC || status_calc) { pc->checkallowskill(sd); - status_calc_pc(sd,SCO_NONE); + status_calc_pc(sd, SCO_NONE); } - if(sd->sc.data[SC_CRUCIS] && !battle->check_undead(sd->battle_status.race,sd->battle_status.def_ele)) + if (sd->sc.data[SC_CRUCIS] && battle->check_undead(sd->battle_status.race, sd->battle_status.def_ele) == false) status_change_end(&sd->bl, SC_CRUCIS, INVALID_TIMER); //OnUnEquip script [Skotlex] - if (sd->inventory_data[n]) { - if (sd->inventory_data[n]->unequip_script) { - if ( battle_config.unequip_restricted_equipment & 1 ) { - ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, i, map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].nameid); - if ( i == map->list[sd->bl.m].zone->disabled_items_count ) + if (sd->inventory_data[n] != NULL) { + if (sd->inventory_data[n]->unequip_script != NULL) { + if (battle_config.unequip_restricted_equipment & 1) { + ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, i, map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].nameid); + if (i == map->list[sd->bl.m].zone->disabled_items_count) script->run_item_unequip_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id); } else script->run_item_unequip_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id); } - if(itemdb_isspecial(sd->status.inventory[n].card[0])) - ; //No cards - else { - for( i = 0; i < sd->inventory_data[n]->slot; i++ ) { - struct item_data *data; - if (!sd->status.inventory[n].card[i]) + if (itemdb_isspecial(sd->status.inventory[n].card[0]) == false) { + for (i = 0; i < sd->inventory_data[n]->slot; i++) { + struct item_data *data = NULL; + if (sd->status.inventory[n].card[i] == 0) continue; - if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) { - if ( data->unequip_script ) { - if ( battle_config.unequip_restricted_equipment & 2 ) { + if ((data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL) { + if (data->unequip_script) { + if (battle_config.unequip_restricted_equipment & 2) { int j; - ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, j, map->list[sd->bl.m].zone->disabled_items[j] == sd->status.inventory[n].card[i]); - if ( j == map->list[sd->bl.m].zone->disabled_items_count ) + ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, j, map->list[sd->bl.m].zone->disabled_items[j] == sd->status.inventory[n].card[i]); + if (j == map->list[sd->bl.m].zone->disabled_items_count) script->run_item_unequip_script(sd, data, npc->fake_nd->bl.id); - } - else + } else { script->run_item_unequip_script(sd, data, npc->fake_nd->bl.id); + } } } } } } + sd->npc_item_flag = iflag; return 1; @@ -10014,99 +10224,108 @@ int pc_checkitem(struct map_session_data *sd) nullpo_ret(sd); - if (sd->state.vending) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam) + if (sd->state.vending == 1) // Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam) return 0; - if (sd->state.itemcheck) { // check for invalid(ated) items - int id; - for (i = 0; i < MAX_INVENTORY; i++) { - id = sd->status.inventory[i].nameid; + if (sd->itemcheck != PCCHECKITEM_NONE) { // check for invalid(ated) items + int id = 0; - if (!id) - continue; + if (sd->itemcheck & PCCHECKITEM_INVENTORY) { + for (i = 0; i < MAX_INVENTORY; i++) { + if ((id = sd->status.inventory[i].nameid) == 0) + continue; - if (!itemdb_available(id)) { - ShowWarning("Removed invalid/disabled item id %d from inventory (amount=%d, char_id=%d).\n", id, sd->status.inventory[i].amount, sd->status.char_id); - pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_NORMAL, LOG_TYPE_INV_INVALID); - continue; + if (!itemdb_available(id)) { + ShowWarning("pc_checkitem: Removed invalid/disabled item id %d from inventory (amount=%d, char_id=%d).\n", id, sd->status.inventory[i].amount, sd->status.char_id); + pc->delitem(sd, i, sd->status.inventory[i].amount, 0, DELITEM_NORMAL, LOG_TYPE_INV_INVALID); + continue; + } + + if (sd->status.inventory[i].unique_id == 0 && !itemdb->isstackable(id)) + sd->status.inventory[i].unique_id = itemdb->unique_id(sd); } - if (!sd->status.inventory[i].unique_id && !itemdb->isstackable(id)) - sd->status.inventory[i].unique_id = itemdb->unique_id(sd); + sd->itemcheck &= ~PCCHECKITEM_INVENTORY; } - for( i = 0; i < MAX_CART; i++ ) { - id = sd->status.cart[i].nameid; + if (sd->itemcheck & PCCHECKITEM_CART) { + for (i = 0; i < MAX_CART; i++) { + if ((id = sd->status.cart[i].nameid) == 0) + continue; - if (!id) - continue; + if( !itemdb_available(id) ) { + ShowWarning("pc_checkitem: Removed invalid/disabled item id %d from cart (amount=%d, char_id=%d).\n", id, sd->status.cart[i].amount, sd->status.char_id); + pc->cart_delitem(sd, i, sd->status.cart[i].amount, 0, LOG_TYPE_CART_INVALID); + continue; + } - if( !itemdb_available(id) ) { - ShowWarning("Removed invalid/disabled item id %d from cart (amount=%d, char_id=%d).\n", id, sd->status.cart[i].amount, sd->status.char_id); - pc->cart_delitem(sd, i, sd->status.cart[i].amount, 0, LOG_TYPE_CART_INVALID); - continue; + if (sd->status.cart[i].unique_id == 0 && !itemdb->isstackable(id)) + sd->status.cart[i].unique_id = itemdb->unique_id(sd); } - if ( !sd->status.cart[i].unique_id && !itemdb->isstackable(id) ) - sd->status.cart[i].unique_id = itemdb->unique_id(sd); + sd->itemcheck &= ~PCCHECKITEM_CART; } - for( i = 0; i < MAX_STORAGE; i++ ) { - id = sd->status.storage.items[i].nameid; + if (sd->itemcheck & PCCHECKITEM_STORAGE && sd->storage.received == true) { + for (i = 0; i < VECTOR_LENGTH(sd->storage.item); i++) { + struct item *it = &VECTOR_INDEX(sd->storage.item, i); - if (!id) - continue; + if ((id = it->nameid) == 0) + continue; - if( id && !itemdb_available(id) ) { - ShowWarning("Removed invalid/disabled item id %d from storage (amount=%d, char_id=%d).\n", id, sd->status.storage.items[i].amount, sd->status.char_id); - storage->delitem(sd, i, sd->status.storage.items[i].amount); - storage->close(sd); - continue; + if (!itemdb_available(id)) { + ShowWarning("pc_checkitem: Removed invalid/disabled item id %d from storage (amount=%d, char_id=%d).\n", id, it->amount, sd->status.char_id); + storage->delitem(sd, i, it->amount); + continue; + } + + if (it->unique_id == 0 && itemdb->isstackable(id) == 0) + it->unique_id = itemdb->unique_id(sd); } - if ( !sd->status.storage.items[i].unique_id && !itemdb->isstackable(id) ) - sd->status.storage.items[i].unique_id = itemdb->unique_id(sd); + storage->close(sd); + + sd->itemcheck &= ~PCCHECKITEM_STORAGE; } - if (sd->guild) { + if (sd->guild && sd->itemcheck & PCCHECKITEM_GSTORAGE) { struct guild_storage *guild_storage = idb_get(gstorage->db,sd->guild->guild_id); if (guild_storage) { - for( i = 0; i < MAX_GUILD_STORAGE; i++ ) { - id = guild_storage->items[i].nameid; - - if (!id) + for (i = 0; i < MAX_GUILD_STORAGE; i++) { + if ((id = guild_storage->items[i].nameid) == 0) continue; - if( !itemdb_available(id) ) { - ShowWarning("Removed invalid/disabled item id %d from guild storage (amount=%d, char_id=%d, guild_id=%d).\n", id, guild_storage->items[i].amount, sd->status.char_id, sd->guild->guild_id); + if (!itemdb_available(id)) { + ShowWarning("pc_checkitem: Removed invalid/disabled item id %d from guild storage (amount=%d, char_id=%d, guild_id=%d).\n", id, guild_storage->items[i].amount, sd->status.char_id, sd->guild->guild_id); gstorage->delitem(sd, guild_storage, i, guild_storage->items[i].amount); gstorage->close(sd); // force closing continue; } - if (!guild_storage->items[i].unique_id && !itemdb->isstackable(id)) + if (guild_storage->items[i].unique_id == 0 && !itemdb->isstackable(id)) guild_storage->items[i].unique_id = itemdb->unique_id(sd); } } + + sd->itemcheck &= ~PCCHECKITEM_GSTORAGE; } - sd->state.itemcheck = 0; } - for( i = 0; i < MAX_INVENTORY; i++) { + for (i = 0; i < MAX_INVENTORY; i++) { - if( sd->status.inventory[i].nameid == 0 ) + if (sd->status.inventory[i].nameid == 0) continue; - if( !sd->status.inventory[i].equip ) + if (sd->status.inventory[i].equip == 0) continue; - if( sd->status.inventory[i].equip&~pc->equippoint(sd,i) ) { + if (sd->status.inventory[i].equip & ~pc->equippoint(sd,i)) { pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); calc_flag = 1; continue; } - if (battle_config.unequip_restricted_equipment&1) { + if (battle_config.unequip_restricted_equipment & 1) { int j; for (j = 0; j < map->list[sd->bl.m].zone->disabled_items_count; j++) { if (map->list[sd->bl.m].zone->disabled_items[j] == sd->status.inventory[i].nameid) { @@ -10116,7 +10335,7 @@ int pc_checkitem(struct map_session_data *sd) } } - if (battle_config.unequip_restricted_equipment&2) { + if (battle_config.unequip_restricted_equipment & 2) { if (!itemdb_isspecial(sd->status.inventory[i].card[0])) { int j, slot; for (slot = 0; slot < MAX_SLOTS; slot++) { @@ -10132,9 +10351,9 @@ int pc_checkitem(struct map_session_data *sd) } - if( calc_flag && sd->state.active ) { + if (calc_flag != 0 && sd->state.active == 1) { pc->checkallowskill(sd); - status_calc_pc(sd,SCO_NONE); + status_calc_pc(sd, SCO_NONE); } return 0; @@ -10224,7 +10443,7 @@ int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd) { if(sd == NULL || dstsd == NULL || sd->status.partner_id > 0 || dstsd->status.partner_id > 0 || - (sd->class_&JOBL_BABY) || (dstsd->class_&JOBL_BABY)) + (sd->job & JOBL_BABY) != 0 || (dstsd->job & JOBL_BABY) != 0) return -1; sd->status.partner_id = dstsd->status.char_id; dstsd->status.partner_id = sd->status.char_id; @@ -10288,7 +10507,7 @@ struct map_session_data *pc_get_partner(struct map_session_data *sd) { * Get sd father charid. (Need to be baby) *------------------------------------------*/ struct map_session_data *pc_get_father(struct map_session_data *sd) { - if (sd && sd->class_&JOBL_BABY && sd->status.father > 0) + if (sd && (sd->job & JOBL_BABY) != 0 && sd->status.father > 0) // charid2sd returns NULL if not found return map->charid2sd(sd->status.father); @@ -10299,7 +10518,7 @@ struct map_session_data *pc_get_father(struct map_session_data *sd) { * Get sd mother charid. (Need to be baby) *------------------------------------------*/ struct map_session_data *pc_get_mother(struct map_session_data *sd) { - if (sd && sd->class_&JOBL_BABY && sd->status.mother > 0) + if (sd && (sd->job & JOBL_BABY) != 0 && sd->status.mother > 0) // charid2sd returns NULL if not found return map->charid2sd(sd->status.mother); @@ -10772,6 +10991,35 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max) return i; } +int pc_split_atoui64(char* str, uint64* val, char sep, int max) +{ + static int warning=0; + int i,j; + nullpo_ret(val); + for (i=0; i<max; i++) { + double f; + if (!str) break; + f = atof(str); + if (f < 0) + val[i] = 0; + else if (f > UINT64_MAX) { + val[i] = UINT64_MAX; + if (!warning) { + warning = 1; + ShowWarning("pc_readdb (exp.txt): Required exp per level is capped to %"PRIu64"\n", UINT64_MAX); + } + } else + val[i] = (uint64)f; + str = strchr(str,sep); + if (str) + *str++=0; + } + //Zero up the remaining. + for(j=i; j < max; j++) + val[j] = 0; + return i; +} + /** * Parses the skill tree config file. * @@ -11079,7 +11327,7 @@ 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. - pc->max_level[job][type] = pc_split_atoui(split[3], pc->exp_table[job][type],',',maxlv-1)+1; + pc->max_level[job][type] = pc_split_atoui64(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: @@ -11635,16 +11883,17 @@ void pc_update_idle_time(struct map_session_data* sd, enum e_battle_config_idlet } //Checks if the given class value corresponds to a player class. [Skotlex] -//JOB_NOVICE isn't checked for class_ is supposed to be unsigned -bool pc_db_checkid(unsigned int class_) +//JOB_NOVICE isn't checked for class is supposed to be unsigned +bool pc_db_checkid(int class) { - return class_ < JOB_MAX_BASIC - || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_DARK_COLLECTOR ) - || (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_OBORO ) - || (class_ >= JOB_REBELLION && class_ < JOB_MAX ); + return class < JOB_MAX_BASIC + || (class >= JOB_NOVICE_HIGH && class <= JOB_DARK_COLLECTOR ) + || (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_OBORO ) + || (class == JOB_REBELLION) + || (class >= JOB_SUMMONER && class < JOB_MAX ); } /** @@ -11655,13 +11904,25 @@ bool pc_db_checkid(unsigned int class_) int pc_have_magnifier(struct map_session_data *sd) { int n; - n = pc->search_inventory(sd, ITEMID_MAGNIFIER); + n = pc->search_inventory(sd, ITEMID_SPECTACLES); if (n == INDEX_NOT_FOUND) - n = pc->search_inventory(sd, ITEMID_NOVICE_MAGNIFIER); + n = pc->search_inventory(sd, ITEMID_N_MAGNIFIER); return n; } /** + * Checks if player have basic skills learned. + * @param sd Player Data + * @param level Required Level of Novice Skill + * @return bool true, if requirement is satisfied + */ +bool pc_check_basicskill(struct map_session_data *sd, int level) { + if (pc->checkskill(sd, NV_BASIC) >= level || pc->checkskill(sd, SU_BASIC_SKILL)) + return true; + return false; +} + +/** * Verifies a chat message, searching for atcommands, checking if the sender * character can chat, and updating the idle timer. * @@ -11703,12 +11964,12 @@ bool pc_process_chat_message(struct map_session_data *sd, const char *message) */ void pc_check_supernovice_call(struct map_session_data *sd, const char *message) { - unsigned int next = pc->nextbaseexp(sd); + uint64 next = pc->nextbaseexp(sd); int percent = 0; nullpo_retv(sd); nullpo_retv(message); - if ((sd->class_&MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) + if ((sd->job & MAPID_UPPERMASK) != MAPID_SUPER_NOVICE) return; if (next == 0) next = pc->thisbaseexp(sd); @@ -11745,6 +12006,24 @@ void pc_check_supernovice_call(struct map_session_data *sd, const char *message) } } +void pc_update_job_and_level(struct map_session_data *sd) +{ + nullpo_retv(sd); + + if (sd->status.party_id) { + struct party_data *p; + int i; + + if ((p = party->search(sd->status.party_id)) != NULL) { + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].char_id == sd->status.char_id); + if (i < MAX_PARTY) { + p->party.member[i].lv = sd->status.base_level; + clif->party_job_and_level(sd); + } + } + } +} + void do_final_pc(void) { db_destroy(pc->itemcd_db); pc->at_db->destroy(pc->at_db,pc->autotrade_final); @@ -11866,6 +12145,7 @@ void pc_defaults(void) { pc->isequip = pc_isequip; pc->equippoint = pc_equippoint; + pc->item_equippoint = pc_item_equippoint; pc->setinventorydata = pc_setinventorydata; pc->checkskill = pc_checkskill; @@ -12028,7 +12308,8 @@ void pc_defaults(void) { pc->addspiritball = pc_addspiritball; pc->delspiritball = pc_delspiritball; pc->addfame = pc_addfame; - pc->famerank = pc_famerank; + pc->fame_rank = pc_fame_rank; + pc->famelist_type = pc_famelist_type; pc->set_hate_mob = pc_set_hate_mob; pc->getmaxspiritball = pc_getmaxspiritball; @@ -12085,6 +12366,7 @@ void pc_defaults(void) { pc->checkcombo = pc_checkcombo; pc->calcweapontype = pc_calcweapontype; pc->removecombo = pc_removecombo; + pc->update_job_and_level = pc_update_job_and_level; pc->bank_withdraw = pc_bank_withdraw; pc->bank_deposit = pc_bank_deposit; @@ -12117,4 +12399,6 @@ void pc_defaults(void) { pc->update_idle_time = pc_update_idle_time; pc->have_magnifier = pc_have_magnifier; + + pc->check_basicskill = pc_check_basicskill; } diff --git a/src/map/pc.h b/src/map/pc.h index fd446813f..50cb1b68e 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -28,6 +28,7 @@ #include "map/log.h" // struct e_log_pick_type #include "map/map.h" // RC_MAX, ELE_MAX #include "map/pc_groups.h" // GroupSettings +#include "map/rodex.h" #include "map/script.h" // struct reg_db #include "map/searchstore.h" // struct s_search_store_info #include "map/status.h" // enum sc_type, OPTION_* @@ -73,6 +74,14 @@ enum equip_index { EQI_MAX }; +enum prevent_logout_trigger { + PLT_NONE = 0x0, + PLT_LOGIN = 0x1, + PLT_ATTACK = 0x2, + PLT_SKILL = 0x4, + PLT_DAMAGE = 0x8 +}; + enum pc_unequipitem_flag { PCUNEQUIPITEM_NONE = 0x0, ///< Just unequip PCUNEQUIPITEM_RECALC = 0x1, ///< Recalculate status after unequipping @@ -86,6 +95,14 @@ enum pc_resetskill_flag { PCRESETSKILL_CHSEX = 0x4, // just reset the skills if the player class is a bard/dancer type (for changesex.) }; +enum pc_checkitem_types { + PCCHECKITEM_NONE = 0x0, + PCCHECKITEM_INVENTORY = 0x1, + PCCHECKITEM_CART = 0x2, + PCCHECKITEM_STORAGE = 0x4, + PCCHECKITEM_GSTORAGE = 0x8 +}; + struct weapon_data { int atkmods[3]; BEGIN_ZEROED_BLOCK; // all the variables within this block get zero'ed in each call of status_calc_pc @@ -217,7 +234,6 @@ struct map_session_data { unsigned int hold_recalc : 1; unsigned int snovice_call_flag : 3; //Summon Angel (stage 1~3) unsigned int hpmeter_visible : 1; - unsigned int itemcheck : 1; unsigned int standalone : 1;/* [Ind/Hercules <3] */ unsigned int loggingout : 1; unsigned int warp_clean : 1; @@ -235,7 +251,7 @@ struct map_session_data { unsigned int bonus_coma : 1; } special_state; int login_id1, login_id2; - unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex] + uint16 job; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex] /// Groups & permissions int group_id; @@ -243,7 +259,9 @@ struct map_session_data { unsigned int extra_temp_permissions; /* permissions from @addperm */ struct mmo_charstatus status; - struct item_data* inventory_data[MAX_INVENTORY]; // direct pointers to itemdb entries (faster than doing item_id lookups) + struct item_data *inventory_data[MAX_INVENTORY]; // direct pointers to itemdb entries (faster than doing item_id lookups) + struct storage_data storage; ///< Account Storage + enum pc_checkitem_types itemcheck; short equip_index[EQI_MAX]; unsigned int weight,max_weight; int cart_weight,cart_num,cart_weight_max; @@ -290,7 +308,10 @@ struct map_session_data { short nameid; int64 tick; } item_delay[MAX_ITEMDELAYS]; // [Paradox924X] - short weapontype1,weapontype2; + bool has_shield; ///< Whether the character is wearing a shield. + int16 weapontype; ///< Weapon type considering both hands (@see enum weapon_type). + int16 weapontype1; ///< Weapon type in the right/primary hand (@see enum weapon_type). + int16 weapontype2; ///< Weapon type in the left/secondary hand (@see enum weapon_type). short disguise; // [Valaris] struct weapon_data right_weapon, left_weapon; @@ -482,6 +503,14 @@ END_ZEROED_BLOCK; bool changed; // if true, should sync with charserver on next mailbox request } mail; + // RoDEX + struct { + struct rodex_message tmp; + struct rodex_maillist messages; + int total; + bool new_mail; + } rodex; + // Quest log system int num_quests; ///< Number of entries in quest_log int avail_quests; ///< Number of Q_ACTIVE and Q_INACTIVE entries in quest log (index of the first Q_COMPLETE entry) @@ -635,12 +664,13 @@ END_ZEROED_BLOCK; #define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle->bc->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_&MAPID_UPPERMASK) == MAPID_REBELLION \ - || ((sd)->class_&MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E \ - ) ? battle->bc->max_extended_parameter : ((sd)->class_&JOBL_THIRD) ? \ - (((sd)->class_&JOBL_BABY) ? battle->bc->max_baby_third_parameter : battle->bc->max_third_parameter ) : \ - (((sd)->class_&JOBL_BABY) ? battle->bc->max_baby_parameter : battle->bc->max_parameter) \ + ((sd)->job & MAPID_BASEMASK) == MAPID_SUMMONER ? battle->bc->max_summoner_parameter : \ + ( ((sd)->job & MAPID_UPPERMASK) == MAPID_KAGEROUOBORO \ + || ((sd)->job & MAPID_UPPERMASK) == MAPID_REBELLION \ + || ((sd)->job & MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E \ + ) ? battle->bc->max_extended_parameter : ((sd)->job & JOBL_THIRD) ? \ + (((sd)->job & JOBL_BABY) ? battle->bc->max_baby_third_parameter : battle->bc->max_third_parameter ) : \ + (((sd)->job & JOBL_BABY) ? battle->bc->max_baby_parameter : battle->bc->max_parameter) \ ) /// Generic check for mounts #define pc_hasmount(sd) ( (sd)->sc.option&(OPTION_RIDING|OPTION_WUGRIDER|OPTION_DRAGON|OPTION_MADOGEAR) ) @@ -658,8 +688,13 @@ END_ZEROED_BLOCK; #define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl)) //Weapon check considering dual wielding. -#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_SINGLE_WEAPON_TYPE? \ - 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon))) +#define pc_check_weapontype(sd, type) ( \ + (type) & ( \ + (sd)->weapontype < MAX_SINGLE_WEAPON_TYPE ? \ + 1 << (sd)->weapontype : \ + (1 << (sd)->weapontype1) | (1 << (sd)->weapontype2) \ + ) \ + ) // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL @@ -794,7 +829,7 @@ struct pc_interface { /* */ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */ - unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; + uint64 exp_table[CLASS_COUNT][2][MAX_LEVEL]; int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; @@ -823,7 +858,7 @@ END_ZEROED_BLOCK; /* End */ void (*final) (void); struct map_session_data* (*get_dummy_sd) (void); - int (*class2idx) (int class_); + int (*class2idx) (int class); bool (*can_talk) (struct map_session_data *sd); bool (*can_attack) ( struct map_session_data *sd, int target_id ); @@ -841,6 +876,7 @@ END_ZEROED_BLOCK; /* End */ int (*isequip) (struct map_session_data *sd,int n); int (*equippoint) (struct map_session_data *sd,int n); + int (*item_equippoint) (struct map_session_data *sd, struct item_data* id); int (*setinventorydata) (struct map_session_data *sd); int (*checkskill) (struct map_session_data *sd,uint16 skill_id); @@ -913,11 +949,11 @@ END_ZEROED_BLOCK; /* End */ int (*maxjoblv) (const struct map_session_data *sd); int (*checkbaselevelup) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); - bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); - unsigned int (*nextbaseexp) (const struct map_session_data *sd); - unsigned int (*thisbaseexp) (const struct map_session_data *sd); - unsigned int (*nextjobexp) (const struct map_session_data *sd); - unsigned int (*thisjobexp) (const struct map_session_data *sd); + bool (*gainexp) (struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); + uint64 (*nextbaseexp) (const struct map_session_data *sd); + uint64 (*thisbaseexp) (const struct map_session_data *sd); + uint64 (*nextjobexp) (const struct map_session_data *sd); + uint64 (*thisjobexp) (const 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 (*maxparameterincrease) (struct map_session_data* sd, int type); @@ -947,7 +983,7 @@ END_ZEROED_BLOCK; /* End */ 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 hp,int sp); - int (*jobchange) (struct map_session_data *sd,int job, int upper); + int (*jobchange) (struct map_session_data *sd, int class, int upper); int (*setoption) (struct map_session_data *sd,int type); int (*setcart) (struct map_session_data* sd, int type); void (*setfalcon) (struct map_session_data *sd, bool flag); @@ -958,8 +994,8 @@ END_ZEROED_BLOCK; /* End */ int (*changelook) (struct map_session_data *sd,int type,int val); int (*equiplookall) (struct map_session_data *sd); - int (*readparam) (const struct map_session_data *sd, int type); - int (*setparam) (struct map_session_data *sd,int type,int val); + int64 (*readparam) (const struct map_session_data *sd, int type); + int (*setparam) (struct map_session_data *sd, int type, int64 val); int (*readreg) (struct map_session_data *sd, int64 reg); void (*setreg) (struct map_session_data *sd, int64 reg,int val); char * (*readregstr) (struct map_session_data *sd, int64 reg); @@ -991,10 +1027,10 @@ END_ZEROED_BLOCK; /* End */ void (*setstand) (struct map_session_data *sd); int (*candrop) (struct map_session_data *sd,struct item *item); - int (*jobid2mapid) (unsigned short b_class); // Skotlex + int (*jobid2mapid) (int16 class); // Skotlex int (*mapid2jobid) (unsigned short class_, int sex); // Skotlex - const char * (*job_name) (int class_); + const char * (*job_name) (int class); void (*setinvincibletimer) (struct map_session_data* sd, int val); void (*delinvincibletimer) (struct map_session_data* sd); @@ -1002,8 +1038,9 @@ END_ZEROED_BLOCK; /* End */ int (*addspiritball) (struct map_session_data *sd,int interval,int max); int (*delspiritball) (struct map_session_data *sd,int count,int type); int (*getmaxspiritball) (struct map_session_data *sd, int min); - void (*addfame) (struct map_session_data *sd,int count); - unsigned char (*famerank) (int char_id, int job); + void (*addfame) (struct map_session_data *sd, int ranktype, int count); + int (*fame_rank) (int char_id, int ranktype); + int (*famelist_type) (uint16 job_mapid); int (*set_hate_mob) (struct map_session_data *sd, int pos, struct block_list *bl); int (*readdb) (void); @@ -1014,7 +1051,7 @@ END_ZEROED_BLOCK; /* End */ int (*inventory_rental_clear) (struct map_session_data *sd); void (*inventory_rental_add) (struct map_session_data *sd, int seconds); - int (*disguise) (struct map_session_data *sd, int class_); + int (*disguise) (struct map_session_data *sd, int class); bool (*isautolooting) (struct map_session_data *sd, int nameid); void (*overheat) (struct map_session_data *sd, int val); @@ -1042,7 +1079,7 @@ END_ZEROED_BLOCK; /* End */ int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); 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); + void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); int (*respawn_timer) (int tid, int64 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); @@ -1073,9 +1110,10 @@ END_ZEROED_BLOCK; /* End */ int (*global_expiration_timer) (int tid, int64 tick, int id, intptr_t data); void (*expire_check) (struct map_session_data *sd); - bool (*db_checkid) (unsigned int class_); + bool (*db_checkid) (int class); void (*validate_levels) (void); + void (*update_job_and_level) (struct map_session_data *sd); /** * Autotrade persistency [Ind/Hercules <3] @@ -1094,6 +1132,7 @@ END_ZEROED_BLOCK; /* End */ bool (*process_chat_message) (struct map_session_data *sd, const char *message); void (*check_supernovice_call) (struct map_session_data *sd, const char *message); + bool (*check_basicskill) (struct map_session_data *sd, int level); }; #ifdef HERCULES_CORE diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index f0e3880b8..9645300ef 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 27eac7284..7c933f054 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/pet.c b/src/map/pet.c index 9d7264103..9ac496659 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/pet.h b/src/map/pet.h index 79cbeddae..9a0287b42 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/quest.c b/src/map/quest.c index 544ddf985..4c5dcb59f 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -103,22 +103,23 @@ int quest_pc_login(struct map_session_data *sd) * * New quest will be added as Q_ACTIVE. * - * @param sd Player's data - * @param quest_id ID of the quest to add. + * @param sd Player's data + * @param quest_id ID of the quest to add. + * @param time_limit Custom time, in UNIX epoch, for this quest * @return 0 in case of success, nonzero otherwise */ -int quest_add(struct map_session_data *sd, int quest_id) +int quest_add(struct map_session_data *sd, int quest_id, unsigned int time_limit) { int n; struct quest_db *qi = quest->db(quest_id); nullpo_retr(-1, sd); - if( qi == &quest->dummy ) { + if (qi == &quest->dummy) { ShowError("quest_add: quest %d not found in DB.\n", quest_id); return -1; } - if( quest->check(sd, quest_id, HAVEQUEST) >= 0 ) { + if (quest->check(sd, quest_id, HAVEQUEST) >= 0) { ShowError("quest_add: Character %d already has quest %d.\n", sd->status.char_id, quest_id); return -1; } @@ -130,7 +131,7 @@ int quest_add(struct map_session_data *sd, int quest_id) sd->avail_quests++; RECREATE(sd->quest_log, struct quest, sd->num_quests); - if( sd->avail_quests != sd->num_quests ) { + if (sd->avail_quests != sd->num_quests) { // The character has some completed quests, make room before them so that they will stay at the end of the array memmove(&sd->quest_log[n+1], &sd->quest_log[n], sizeof(struct quest)*(sd->num_quests-sd->avail_quests)); } @@ -138,7 +139,9 @@ int quest_add(struct map_session_data *sd, int quest_id) memset(&sd->quest_log[n], 0, sizeof(struct quest)); sd->quest_log[n].quest_id = qi->id; - if( qi->time ) + if (time_limit != 0) + sd->quest_log[n].time = time_limit; + else if (qi->time != 0) sd->quest_log[n].time = (unsigned int)(time(NULL) + qi->time); sd->quest_log[n].state = Q_ACTIVE; @@ -147,8 +150,8 @@ int quest_add(struct map_session_data *sd, int quest_id) clif->quest_add(sd, &sd->quest_log[n]); clif->quest_update_objective(sd, &sd->quest_log[n]); - if( map->save_settings&64 ) - chrif->save(sd,0); + if ((map->save_settings & 64) != 0) + chrif->save(sd, 0); return 0; } @@ -541,7 +544,7 @@ int quest_read_db(void) int i = 0, count = 0; const char *filename = "quest_db.conf"; - snprintf(filepath, 256, "%s/%s", map->db_path, filename); + safesnprintf(filepath, 256, "%s/%s", map->db_path, filename); if (!libconfig->load_file(&quest_db_conf, filepath)) return -1; diff --git a/src/map/quest.h b/src/map/quest.h index e0768ef40..dda7c2c0a 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -69,7 +69,7 @@ struct quest_interface { /* */ struct quest_db *(*db) (int quest_id); int (*pc_login) (struct map_session_data *sd); - int (*add) (struct map_session_data *sd, int quest_id); + int (*add) (struct map_session_data *sd, int quest_id, unsigned int time_limit); int (*change) (struct map_session_data *sd, int qid1, int qid2); int (*delete) (struct map_session_data *sd, int quest_id); int (*update_objective_sub) (struct block_list *bl, va_list ap); diff --git a/src/map/rodex.c b/src/map/rodex.c new file mode 100644 index 000000000..dcecb6b8f --- /dev/null +++ b/src/map/rodex.c @@ -0,0 +1,647 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2017 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#define HERCULES_CORE + +#include "rodex.h" + +#include "map/battle.h" +#include "map/date.h" +#include "map/intif.h" +#include "map/itemdb.h" +#include "map/pc.h" + +#include "common/nullpo.h" +#include "common/sql.h" +#include "common/memmgr.h" + + +// NOTE : These values are hardcoded into the client +// Cost of each Attached Item +#define ATTACHITEM_COST 2500 +// Percent of Attached Zeny that will be paid as Tax +#define ATTACHZENY_TAX 2 +// Maximun number of messages that can be sent in one day +#define DAILY_MAX_MAILS 100 + +struct rodex_interface rodex_s; +struct rodex_interface *rodex; + +/// Checks if RoDEX System is enabled in the server +/// Returns true if it's enabled, false otherwise +bool rodex_isenabled(void) +{ + if (battle_config.feature_rodex == 1) + return true; + + return false; +} + +/// Checks and refreshes the user daily number of Stamps +/// @param sd : The player who's being checked +void rodex_refresh_stamps(struct map_session_data *sd) +{ + int today = date_get_date(); + nullpo_retv(sd); + + // Note : Weirdly, iRO starts this with maximum messages of the day and decrements + // but our clients starts this at 0 and increments + if (sd->sc.data[SC_DAILYSENDMAILCNT] == NULL) { + sc_start2(NULL, &sd->bl, SC_DAILYSENDMAILCNT, 100, today, 0, INFINITE_DURATION); + } else { + int sc_date = sd->sc.data[SC_DAILYSENDMAILCNT]->val1; + if (sc_date != today) { + sc_start2(NULL, &sd->bl, SC_DAILYSENDMAILCNT, 100, today, 0, INFINITE_DURATION); + } + } +} + +/// Attaches an item to a message being written +/// @param sd : The player who's writting +/// @param idx : the inventory idx of the item +/// @param amount : Amount of the item to be attached +void rodex_add_item(struct map_session_data *sd, int16 idx, int16 amount) +{ + int i; + bool is_stack = false; + + nullpo_retv(sd); + + if (idx < 0 || idx >= MAX_INVENTORY) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_FATAL_ERROR); + return; + } + + if (amount < 0 || amount > sd->status.inventory[idx].amount) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_FATAL_ERROR); + return; + } + + if (!pc_can_give_items(sd) || sd->status.inventory[idx].expire_time || + !itemdb_canmail(&sd->status.inventory[idx], pc_get_group_level(sd)) || + (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd))) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_NOT_TRADEABLE); + return; + } + + if (itemdb->isstackable(sd->status.inventory[idx].nameid) == 1) { + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + if (sd->rodex.tmp.items[i].idx == idx) { + if (sd->status.inventory[idx].nameid == sd->rodex.tmp.items[i].item.nameid && + sd->status.inventory[idx].unique_id == sd->rodex.tmp.items[i].item.unique_id) { + is_stack = true; + break; + } + } + } + + if (i == RODEX_MAX_ITEM && sd->rodex.tmp.items_count < RODEX_MAX_ITEM) { + ARR_FIND(0, RODEX_MAX_ITEM, i, sd->rodex.tmp.items[i].idx == 0); + } + } else if (sd->rodex.tmp.items_count < RODEX_MAX_ITEM) { + ARR_FIND(0, RODEX_MAX_ITEM, i, sd->rodex.tmp.items[i].idx == 0); + } else { + i = RODEX_MAX_ITEM; + } + + if (i == RODEX_MAX_ITEM) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_NO_SPACE); + return; + } + + if (sd->rodex.tmp.items[i].item.amount + amount > sd->status.inventory[idx].amount) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_FATAL_ERROR); + return; + } + + if (sd->rodex.tmp.weight + sd->inventory_data[idx]->weight * amount > RODEX_WEIGHT_LIMIT) { + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_FATAL_ERROR); + return; + } + + sd->rodex.tmp.items[i].idx = idx; + sd->rodex.tmp.weight += sd->inventory_data[idx]->weight * amount; + if (is_stack == false) { + sd->rodex.tmp.items[i].item = sd->status.inventory[idx]; + sd->rodex.tmp.items[i].item.amount = amount; + sd->rodex.tmp.items_count++; + } else { + sd->rodex.tmp.items[i].item.amount += amount; + } + sd->rodex.tmp.type |= MAIL_TYPE_ITEM; + + clif->rodex_add_item_result(sd, idx, amount, RODEX_ADD_ITEM_SUCCESS); +} + +/// Removes an item attached to a message being writen +/// @param sd : The player who's writting the message +/// @param idx : The index of the item +/// @param amount : How much to remove +void rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount) +{ + int i; + struct item *it; + struct item_data *itd; + + nullpo_retv(sd); + Assert_retv(idx >= 0 && idx < MAX_INVENTORY); + + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + if (sd->rodex.tmp.items[i].idx == idx) + break; + } + + if (i == RODEX_MAX_ITEM) { + clif->rodex_remove_item_result(sd, idx, -1); + return; + } + + it = &sd->rodex.tmp.items[i].item; + + if (amount <= 0 || amount > it->amount) { + clif->rodex_remove_item_result(sd, idx, -1); + return; + } + + itd = itemdb->search(it->nameid); + + if (amount == it->amount) { + sd->rodex.tmp.weight -= itd->weight * amount; + sd->rodex.tmp.items_count--; + if (sd->rodex.tmp.items_count < 1) { + sd->rodex.tmp.type &= ~MAIL_TYPE_ITEM; + } + memset(&sd->rodex.tmp.items[i], 0x0, sizeof(sd->rodex.tmp.items[0])); + clif->rodex_remove_item_result(sd, idx, 0); + return; + } + + it->amount -= amount; + sd->rodex.tmp.weight -= itd->weight * amount; + + clif->rodex_remove_item_result(sd, idx, it->amount); +} + +/// Request if character with given name exists and returns information about him +/// @param sd : The player who's requesting +/// @param name : The name of the character to check +/// @param base_level : Reference to return the character base level, if he exists +/// @param char_id : Reference to return the character id, if he exists +/// @param class : Reference to return the character class id, if he exists +void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) +{ + intif->rodex_checkname(sd, name); +} + +/// Sends a Mail to an character +/// @param sd : The player who's sending +/// @param receiver_name : The name of the character who's receiving the message +/// @param body : Mail message +/// @param title : Mail Title +/// @param zeny : Amount of zeny attached +/// Returns result code: +/// RODEX_SEND_MAIL_SUCCESS = 0, +/// RODEX_SEND_MAIL_FATAL_ERROR = 1, +/// RODEX_SEND_MAIL_COUNT_ERROR = 2, +/// RODEX_SEND_MAIL_ITEM_ERROR = 3, +/// RODEX_SEND_MAIL_RECEIVER_ERROR = 4 +int rodex_send_mail(struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny) +{ + int i; + int64 total_zeny; + + nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, sd); + nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, receiver_name); + nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, body); + nullpo_retr(RODEX_SEND_MAIL_FATAL_ERROR, title); + + if (zeny < 0) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_FATAL_ERROR; + } + + total_zeny = zeny + sd->rodex.tmp.items_count * ATTACHITEM_COST + (2 * zeny)/100; + + if (strcmp(receiver_name, sd->rodex.tmp.receiver_name) != 0) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_RECEIVER_ERROR; + } + + if (total_zeny > sd->status.zeny || total_zeny < 0) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_FATAL_ERROR; + } + + rodex_refresh_stamps(sd); + + if (sd->sc.data[SC_DAILYSENDMAILCNT] != NULL) { + if (sd->sc.data[SC_DAILYSENDMAILCNT]->val2 >= DAILY_MAX_MAILS) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_COUNT_ERROR; + } + + sc_start2(NULL, &sd->bl, SC_DAILYSENDMAILCNT, 100, sd->sc.data[SC_DAILYSENDMAILCNT]->val1, sd->sc.data[SC_DAILYSENDMAILCNT]->val2 + 1, INFINITE_DURATION); + } else { + sc_start2(NULL, &sd->bl, SC_DAILYSENDMAILCNT, 100, date_get_date(), 1, INFINITE_DURATION); + } + + for (i = 0; i < RODEX_MAX_ITEM; i++) { + int16 idx = sd->rodex.tmp.items[i].idx; + int j; + struct item *tmpItem = &sd->rodex.tmp.items[i].item; + struct item *invItem = &sd->status.inventory[idx]; + + if (tmpItem->nameid == 0) + continue; + + if (tmpItem->nameid != invItem->nameid || + tmpItem->unique_id != invItem->unique_id || + tmpItem->refine != invItem->refine || + tmpItem->attribute != invItem->attribute || + tmpItem->expire_time != invItem->expire_time || + tmpItem->bound != invItem->bound || + tmpItem->amount > invItem->amount || + tmpItem->amount < 1) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_ITEM_ERROR; + } + for (j = 0; j < MAX_SLOTS; j++) { + if (tmpItem->card[j] != invItem->card[j]) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_ITEM_ERROR; + } + } + for (j = 0; j < MAX_ITEM_OPTIONS; j++) { + if (tmpItem->option[j].index != invItem->option[j].index || + tmpItem->option[j].value != invItem->option[j].value || + tmpItem->option[j].param != invItem->option[j].param) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_ITEM_ERROR; + } + } + } + + if (total_zeny > 0 && pc->payzeny(sd, (int)total_zeny, LOG_TYPE_MAIL, NULL) != 0) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_FATAL_ERROR; + } + + for (i = 0; i < RODEX_MAX_ITEM; i++) { + int16 idx = sd->rodex.tmp.items[i].idx; + + if (sd->rodex.tmp.items[i].item.nameid == 0) { + continue; + } + + if (pc->delitem(sd, idx, sd->rodex.tmp.items[i].item.amount, 0, DELITEM_NORMAL, LOG_TYPE_MAIL) != 0) { + rodex->clean(sd, 1); + return RODEX_SEND_MAIL_ITEM_ERROR; + } + } + + sd->rodex.tmp.zeny = zeny; + sd->rodex.tmp.is_read = false; + sd->rodex.tmp.is_deleted = false; + sd->rodex.tmp.send_date = (int)time(NULL); + sd->rodex.tmp.expire_date = (int)time(NULL) + RODEX_EXPIRE; + if (strlen(sd->rodex.tmp.body) > 0) + sd->rodex.tmp.type |= MAIL_TYPE_TEXT; + if (sd->rodex.tmp.zeny > 0) + sd->rodex.tmp.type |= MAIL_TYPE_ZENY; + sd->rodex.tmp.sender_id = sd->status.char_id; + safestrncpy(sd->rodex.tmp.sender_name, sd->status.name, NAME_LENGTH); + safestrncpy(sd->rodex.tmp.title, title, RODEX_TITLE_LENGTH); + safestrncpy(sd->rodex.tmp.body, body, RODEX_BODY_LENGTH); + + intif->rodex_sendmail(&sd->rodex.tmp); + return RODEX_SEND_MAIL_SUCCESS; // this will not inform client of the success yet. (see rodex_send_mail_result) +} + +/// The result of a message send, called by char-server +/// @param ssd : Sender's sd +/// @param rsd : Receiver's sd +/// @param result : Message sent (true) or failed (false) +void rodex_send_mail_result(struct map_session_data *ssd, struct map_session_data *rsd, bool result) +{ + if (ssd != NULL) { + rodex->clean(ssd, 1); + if (result == false) { + clif->rodex_send_mail_result(ssd->fd, ssd, RODEX_SEND_MAIL_FATAL_ERROR); + return; + } + + clif->rodex_send_mail_result(ssd->fd, ssd, RODEX_SEND_MAIL_SUCCESS); + } + + if (rsd != NULL) { + clif->rodex_icon(rsd->fd, true); + clif_disp_onlyself(rsd, "You've got a new mail!"); + } + return; +} + +/// Retrieves one message from character +/// @param sd : Character +/// @param mail_id : Mail ID that's being retrieved +/// Returns the message +struct rodex_message *rodex_get_mail(struct map_session_data *sd, int64 mail_id) +{ + int i; + struct rodex_message *msg; + + nullpo_retr(NULL, sd); + + ARR_FIND(0, VECTOR_LENGTH(sd->rodex.messages), i, VECTOR_INDEX(sd->rodex.messages, i).id == mail_id && VECTOR_INDEX(sd->rodex.messages, i).is_deleted != true); + if (i == VECTOR_LENGTH(sd->rodex.messages)) + return NULL; + + msg = &VECTOR_INDEX(sd->rodex.messages, i); + + return msg; +} + +/// Request to read a mail by its ID +/// @param sd : Who's reading +/// @param mail_id : Mail ID to be read +void rodex_read_mail(struct map_session_data *sd, int64 mail_id) +{ + struct rodex_message *msg; + + nullpo_retv(sd); + + msg = rodex->get_mail(sd, mail_id); + nullpo_retv(msg); + + if (msg->is_read == false) { + intif->rodex_updatemail(msg->id, 0); + msg->is_read = true; + } + + clif->rodex_read_mail(sd, msg->opentype, msg); +} + +/// Deletes a mail +/// @param sd : Who's deleting +/// @param mail_id : Mail ID to be deleted +void rodex_delete_mail(struct map_session_data *sd, int64 mail_id) +{ + struct rodex_message *msg; + + nullpo_retv(sd); + + msg = rodex->get_mail(sd, mail_id); + nullpo_retv(msg); + + msg->is_deleted = true; + intif->rodex_updatemail(msg->id, 3); + + clif->rodex_delete_mail(sd, msg->opentype, msg->id); +} + +/// Gets attached zeny +/// @param sd : Who's getting +/// @param mail_id : Mail ID that we're getting zeny from +void rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id) +{ + struct rodex_message *msg; + + nullpo_retv(sd); + + msg = rodex->get_mail(sd, mail_id); + + if (msg == NULL) { + clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR); + return; + } + + if ((int64)sd->status.zeny + msg->zeny > MAX_ZENY) { + clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_LIMIT_ERROR); + return; + } + + if (pc->getzeny(sd, (int)msg->zeny, LOG_TYPE_MAIL, NULL) != 0) { + clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_FATAL_ERROR); + return; + } + + msg->zeny = 0; + intif->rodex_updatemail(mail_id, 1); + + clif->rodex_request_zeny(sd, opentype, mail_id, RODEX_GET_ZENY_SUCCESS); +} + +/// Gets attached item +/// @param sd : Who's getting +/// @param mail_id : Mail ID that we're getting items from +void rodex_get_items(struct map_session_data *sd, int8 opentype, int64 mail_id) +{ + struct rodex_message *msg; + int weight = 0; + int empty_slots = 0, required_slots; + int i; + + nullpo_retv(sd); + + msg = rodex->get_mail(sd, mail_id); + + if (msg == NULL) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FATAL_ERROR); + return; + } + + if (msg->items_count < 1) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FATAL_ERROR); + return; + } + + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + if (msg->items[i].item.nameid != 0) { + weight += itemdb->search(msg->items[i].item.nameid)->weight * msg->items[i].item.amount; + } + } + + if ((sd->weight + weight > sd->max_weight)) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR); + return; + } + + required_slots = msg->items_count; + for (i = 0; i < MAX_INVENTORY; ++i) { + if (sd->status.inventory[i].nameid == 0) { + empty_slots++; + } else if (itemdb->isstackable(sd->status.inventory[i].nameid) == 1) { + int j; + ARR_FIND(0, msg->items_count, j, sd->status.inventory[i].nameid == msg->items[j].item.nameid); + if (j < msg->items_count) { + struct item_data *idata = itemdb->search(sd->status.inventory[i].nameid); + + if ((idata->stack.inventory && sd->status.inventory[i].amount + msg->items[j].item.amount > idata->stack.amount) || + sd->status.inventory[i].amount + msg->items[j].item.amount > MAX_AMOUNT) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR); + return; + } + + required_slots--; + } + } + } + + if (empty_slots < required_slots) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR); + return; + } + + for (i = 0; i < RODEX_MAX_ITEM; ++i) { + struct item *it = &msg->items[i].item; + + if (it->nameid == 0) { + continue; + } + + if (pc->additem(sd, it, it->amount, LOG_TYPE_MAIL) != 0) { + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEM_FULL_ERROR); + intif->rodex_updatemail(mail_id, 2); + return; + } else { + memset(it, 0x0, sizeof(*it)); + } + } + + intif->rodex_updatemail(mail_id, 2); + + clif->rodex_request_items(sd, opentype, mail_id, RODEX_GET_ITEMS_SUCCESS); +} + +/// Cleans user's RoDEX related data +/// - should be called everytime we're going to stop using rodex in this character +/// @param sd : Target to clean +/// @param flag : +/// 0 - clear everything +/// 1 - clear tmp only +void rodex_clean(struct map_session_data *sd, int8 flag) +{ + nullpo_retv(sd); + + if (flag == 0) + VECTOR_CLEAR(sd->rodex.messages); + + memset(&sd->rodex.tmp, 0x0, sizeof(sd->rodex.tmp)); +} + +/// User request to open rodex, load mails from char-server +/// @param sd : Who's requesting +/// @param open_type : Box Type (see RODEX_OPENTYPE) +void rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) +{ +#if PACKETVER >= 20170419 + const int type = 1; +#else + const int type = 0; +#endif + nullpo_retv(sd); + if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) + open_type = RODEX_OPENTYPE_MAIL; + + intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, type, open_type, first_mail_id); +} + +/// User request to read next page of mails +/// @param sd : Who's requesting +/// @param open_type : Box Type (see RODEX_OPENTYPE) +/// @param last_mail_id : The last mail from the current page +void rodex_next_page(struct map_session_data *sd, int8 open_type, int64 last_mail_id) +{ + int64 msg_count, page_start = 0; + nullpo_retv(sd); + + if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) { + // Should not happen + open_type = RODEX_OPENTYPE_MAIL; + rodex->open(sd, open_type, 0); + return; + } + + msg_count = VECTOR_LENGTH(sd->rodex.messages); + + if (last_mail_id > 0) { + // Find where the page starts + ARR_FIND(0, msg_count, page_start, VECTOR_INDEX(sd->rodex.messages, page_start).id == last_mail_id); + if (page_start > 0 && page_start < msg_count) { + --page_start; // Valid page, get first item of next page + } else { + page_start = msg_count - 1; // Should not happen, invalid lower_id given + } + clif->rodex_send_maillist(sd->fd, sd, open_type, page_start); + } +} + +/// User's request to refresh his mail box +/// @param sd : Who's requesting +/// @param open_type : Box Type (See RODEX_OPENTYPE) +/// @param first_mail_id : The first mail id known by client, currently unused +void rodex_refresh(struct map_session_data *sd, int8 open_type, int64 first_mail_id) +{ + nullpo_retv(sd); + if (open_type == RODEX_OPENTYPE_ACCOUNT && battle_config.feature_rodex_use_accountmail == false) + open_type = RODEX_OPENTYPE_MAIL; + + // Some clients sends the first mail id it currently has and expects to receive + // a list of newer mails, other clients sends first mail id as 0 and expects + // to receive the first page (as if opening the box) + if (first_mail_id > 0) { + intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, 1, open_type, first_mail_id); + } else { + intif->rodex_requestinbox(sd->status.char_id, sd->status.account_id, 0, open_type, first_mail_id); + } +} + +void do_init_rodex(bool minimal) +{ + if (minimal) + return; +} + +void do_final_rodex(void) +{ + +} + +void rodex_defaults(void) +{ + rodex = &rodex_s; + + rodex->init = do_init_rodex; + rodex->final = do_final_rodex; + + rodex->open = rodex_open; + rodex->next_page = rodex_next_page; + rodex->refresh = rodex_refresh; + rodex->isenabled = rodex_isenabled; + rodex->add_item = rodex_add_item; + rodex->remove_item = rodex_remove_item; + rodex->check_player = rodex_check_player; + rodex->send_mail = rodex_send_mail; + rodex->send_mail_result = rodex_send_mail_result; + rodex->get_mail = rodex_get_mail; + rodex->read_mail = rodex_read_mail; + rodex->delete_mail = rodex_delete_mail; + rodex->get_zeny = rodex_get_zeny; + rodex->get_items = rodex_get_items; + rodex->clean = rodex_clean; +} diff --git a/src/map/rodex.h b/src/map/rodex.h new file mode 100644 index 000000000..ddf7cb32b --- /dev/null +++ b/src/map/rodex.h @@ -0,0 +1,85 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2017 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef MAP_RODEX_H +#define MAP_RODEX_H + +#include "common/mmo.h" +#include "common/hercules.h" + +#define RODEX_WEIGHT_LIMIT (2000 * 10) + +struct rodex_message; + +enum rodex_add_item { + RODEX_ADD_ITEM_SUCCESS = 0, + RODEX_ADD_ITEM_WEIGHT_ERROR = 1, + RODEX_ADD_ITEM_FATAL_ERROR = 2, + RODEX_ADD_ITEM_NO_SPACE = 3, + RODEX_ADD_ITEM_NOT_TRADEABLE = 4, +}; + +enum rodex_send_mail { + RODEX_SEND_MAIL_SUCCESS = 0, + RODEX_SEND_MAIL_FATAL_ERROR = 1, + RODEX_SEND_MAIL_COUNT_ERROR = 2, + RODEX_SEND_MAIL_ITEM_ERROR = 3, + RODEX_SEND_MAIL_RECEIVER_ERROR = 4 +}; + +enum rodex_get_zeny { + RODEX_GET_ZENY_SUCCESS = 0, + RODEX_GET_ZENY_FATAL_ERROR = 1, + RODEX_GET_ZENY_LIMIT_ERROR = 2 +}; + +enum rodex_get_items { + RODEX_GET_ITEMS_SUCCESS = 0, + RODEX_GET_ITEM_FATAL_ERROR = 1, + RODEX_GET_ITEM_FULL_ERROR = 2, +}; + +struct rodex_interface { + void (*init) (bool minimal); + void (*final) (void); + + bool (*isenabled) (void); + void (*open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + void (*next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); + void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount); + void (*remove_item) (struct map_session_data *sd, int16 idx, int16 amount); + void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); + int (*send_mail) (struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); + void (*send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); + struct rodex_message *(*get_mail) (struct map_session_data *sd, int64 mail_id); + void (*read_mail) (struct map_session_data *sd, int64 mail_id); + void (*get_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id); + void (*get_items) (struct map_session_data *sd, int8 opentype, int64 mail_id); + void (*delete_mail) (struct map_session_data *sd, int64 mail_id); + void (*clean) (struct map_session_data *sd, int8 flag); +}; + +#ifdef HERCULES_CORE +void rodex_defaults(void); +#endif + +HPShared struct rodex_interface *rodex; + +#endif diff --git a/src/map/script.c b/src/map/script.c index de33df477..1dc02bf82 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -30,6 +30,7 @@ #include "map/chat.h" #include "map/chrif.h" #include "map/clif.h" +#include "map/date.h" #include "map/elemental.h" #include "map/guild.h" #include "map/homunculus.h" @@ -136,6 +137,7 @@ const char* script_op2name(int op) { RETURN_OP_NAME(C_ADD); RETURN_OP_NAME(C_SUB); RETURN_OP_NAME(C_MUL); + RETURN_OP_NAME(C_POW); RETURN_OP_NAME(C_DIV); RETURN_OP_NAME(C_MOD); RETURN_OP_NAME(C_NEG); @@ -771,7 +773,7 @@ const char* skip_word(const char* p) p += ( p[1] == '@' ? 2 : 1 ); break; } - while( ISALNUM(*p) || *p == '_' || *p == '\'' ) + while (ISALNUM(*p) || *p == '_') ++p; // postfix @@ -1035,6 +1037,7 @@ const char* parse_variable(const char* p) || ( p[0] == '|' && p[1] == '=' && (type = C_OR, true) ) // |= || ( p[0] == '&' && p[1] == '=' && (type = C_AND, true) ) // &= || ( p[0] == '*' && p[1] == '=' && (type = C_MUL, true) ) // *= + || ( p[0] == '*' && p[1] == '*' && p[2] == '=' && (type = C_POW, true) ) // **= || ( p[0] == '/' && p[1] == '=' && (type = C_DIV, true) ) // /= || ( p[0] == '%' && p[1] == '=' && (type = C_MOD, true) ) // %= || ( p[0] == '+' && p[1] == '+' && (type = C_ADD_POST, true) ) // post ++ @@ -1058,6 +1061,7 @@ const char* parse_variable(const char* p) case C_L_SHIFT: // <<= case C_R_SHIFT: // >>= + case C_POW: // **= p = script->skip_space( &p[3] ); break; @@ -1424,6 +1428,7 @@ const char* script_parse_subexpr(const char* p,int limit) (op=C_OP3, opl=0, len=1,*p=='?') // ?: || (op=C_ADD, opl=9, len=1,*p=='+') // + || (op=C_SUB, opl=9, len=1,*p=='-') // - + || (op=C_POW, opl=11,len=2,*p=='*' && p[1]=='*') // ** || (op=C_MUL, opl=10,len=1,*p=='*') // * || (op=C_DIV, opl=10,len=1,*p=='/') // / || (op=C_MOD, opl=10,len=1,*p=='%') // % @@ -2291,7 +2296,7 @@ void read_constdb(void) struct config_setting_t *t; int i = 0; - snprintf(filepath, 256, "%s/constants.conf", map->db_path); + safesnprintf(filepath, 256, "%s/constants.conf", map->db_path); if (!libconfig->load_file(&constants_conf, filepath)) return; @@ -2384,6 +2389,7 @@ void script_load_parameters(void) {"SkillPoint", SP_SKILLPOINT}, {"Class", SP_CLASS}, {"Zeny", SP_ZENY}, + {"BankVault", SP_BANKVAULT}, {"Sex", SP_SEX}, {"NextBaseExp", SP_NEXTBASEEXP}, {"NextJobExp", SP_NEXTJOBEXP}, @@ -2786,6 +2792,14 @@ char *get_val_npcscope_str(struct script_state* st, struct reg_db *n, struct scr return NULL; } +char *get_val_pc_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { + struct script_reg_str *p = NULL; + nullpo_retr(NULL, n); + + p = i64db_get(n->vars, reference_getuid(data)); + return p ? p->value : NULL; +} + char *get_val_instance_str(struct script_state* st, const char* name, struct script_data* data) { nullpo_retr(NULL, st); if (st->instance_id >= 0) { @@ -2803,6 +2817,14 @@ int get_val_npcscope_num(struct script_state* st, struct reg_db *n, struct scrip return 0; } +int get_val_pc_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { + struct script_reg_num *p = NULL; + nullpo_retr(0, n); + + p = i64db_get(n->vars, reference_getuid(data)); + return p ? p->value : 0; +} + int get_val_instance_num(struct script_state* st, const char* name, struct script_data* data) { if (st->instance_id >= 0) return (int)i64db_iget(instance->list[st->instance_id].regs.vars, reference_getuid(data)); @@ -2825,7 +2847,7 @@ struct script_data *get_val(struct script_state* st, struct script_data* data) { char postfix; struct map_session_data *sd = NULL; - if( !data_isreference(data) ) + if (!data_isreference(data)) return data;// not a variable/constant name = reference_getname(data); @@ -2840,10 +2862,10 @@ struct script_data *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) ) { + if (!reference_toconstant(data) && not_server_variable(prefix) && reference_getref(data) == NULL) { sd = script->rid2sd(st); - if( sd == NULL ) {// needs player attached - if( postfix == '$' ) {// string variable + if (sd == NULL) {// needs player attached + if (postfix == '$') {// string variable ShowWarning("script_get_val: cannot access player variable '%s', defaulting to \"\"\n", name); data->type = C_CONSTSTR; data->u.str = ""; @@ -2861,32 +2883,44 @@ struct script_data *get_val(struct script_state* st, struct script_data* data) { const char *str = NULL; switch (prefix) { - case '@': + case '@': + if (data->ref) { + str = script->get_val_ref_str(st, data->ref, data); + } else { str = pc->readregstr(sd, data->u.num); - break; - case '$': - str = mapreg->readregstr(data->u.num); - break; - case '#': - if (name[1] == '#') - str = pc_readaccountreg2str(sd, data->u.num);// global - else - str = pc_readaccountregstr(sd, data->u.num);// local - break; - case '.': - if (data->ref) - str = script->get_val_ref_str(st, data->ref, data); - else if (name[1] == '@') - str = script->get_val_scope_str(st, &st->stack->scope, data); - else - str = script->get_val_npc_str(st, &st->script->local, data); - break; - case '\'': - str = script->get_val_instance_str(st, name, data); - break; - default: + } + break; + case '$': + str = mapreg->readregstr(data->u.num); + break; + case '#': + if (data->ref) { + str = script->get_val_pc_ref_str(st, data->ref, data); + } else if (name[1] == '#') { + str = pc_readaccountreg2str(sd, data->u.num);// global + } else { + str = pc_readaccountregstr(sd, data->u.num);// local + } + break; + case '.': + if (data->ref) { + str = script->get_val_ref_str(st, data->ref, data); + } else if (name[1] == '@') { + str = script->get_val_scope_str(st, &st->stack->scope, data); + } else { + str = script->get_val_npc_str(st, &st->script->local, data); + } + break; + case '\'': + str = script->get_val_instance_str(st, name, data); + break; + default: + if (data->ref) { + str = script->get_val_pc_ref_str(st, data->ref, data); + } else { str = pc_readglobalreg_str(sd, data->u.num); - break; + } + break; } if (str == NULL || str[0] == '\0') { @@ -2906,36 +2940,48 @@ struct script_data *get_val(struct script_state* st, struct script_data* data) { data->u.num = reference_getconstant(data); } else if( reference_toparam(data) ) { data->u.num = pc->readparam(sd, reference_getparamtype(data)); - } else - switch( prefix ) { - case '@': + } else { + switch (prefix) { + case '@': + if (data->ref) { + data->u.num = script->get_val_ref_num(st, data->ref, data); + } else { data->u.num = pc->readreg(sd, data->u.num); - break; - case '$': - data->u.num = mapreg->readreg(data->u.num); - break; - case '#': - if( name[1] == '#' ) - data->u.num = pc_readaccountreg2(sd, data->u.num);// global - else - data->u.num = pc_readaccountreg(sd, data->u.num);// local - break; - case '.': - if (data->ref) - data->u.num = script->get_val_ref_num(st, data->ref, data); - else if (name[1] == '@') - data->u.num = script->get_val_scope_num(st, &st->stack->scope, data); - else - data->u.num = script->get_val_npc_num(st, &st->script->local, data); - break; - case '\'': - data->u.num = script->get_val_instance_num(st, name, data); - break; - default: + } + break; + case '$': + data->u.num = mapreg->readreg(data->u.num); + break; + case '#': + if (data->ref) { + data->u.num = script->get_val_pc_ref_num(st, data->ref, data); + } else if (name[1] == '#') { + data->u.num = pc_readaccountreg2(sd, data->u.num);// global + } else { + data->u.num = pc_readaccountreg(sd, data->u.num);// local + } + break; + case '.': + if (data->ref) { + data->u.num = script->get_val_ref_num(st, data->ref, data); + } else if (name[1] == '@') { + data->u.num = script->get_val_scope_num(st, &st->stack->scope, data); + } else { + data->u.num = script->get_val_npc_num(st, &st->script->local, data); + } + break; + case '\'': + data->u.num = script->get_val_instance_num(st, name, data); + break; + default: + if (data->ref) { + data->u.num = script->get_val_pc_ref_num(st, data->ref, data); + } else { data->u.num = pc_readglobalreg(sd, data->u.num); - break; + } + break; } - + } } data->ref = NULL; @@ -3108,38 +3154,43 @@ void script_array_add_member(struct script_array *sa, unsigned int idx) { **/ struct reg_db *script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { struct reg_db *src = NULL; - nullpo_retr(NULL, name); - switch( name[0] ) { + + switch (name[0]) { /* from player */ - default: /* char reg */ - case '@':/* temp char reg */ - case '#':/* account reg */ + default: /* char reg */ + case '@':/* temp char reg */ + case '#':/* account reg */ + if (ref != NULL) { + src = ref; + } else { nullpo_retr(NULL, sd); src = &sd->regs; - break; - case '$':/* map reg */ - src = &mapreg->regs; - break; - case '.':/* npc/script */ - if (ref != NULL) { - src = ref; - } else { - nullpo_retr(NULL, st); - src = (name[1] == '@') ? &st->stack->scope : &st->script->local; - } - break; - case '\'':/* instance */ + } + break; + case '$':/* map reg */ + src = &mapreg->regs; + break; + case '.':/* npc/script */ + if (ref != NULL) { + src = ref; + } else { nullpo_retr(NULL, st); - if( st->instance_id >= 0 ) { - src = &instance->list[st->instance_id].regs; - } - break; + src = (name[1] == '@') ? &st->stack->scope : &st->script->local; + } + break; + case '\'':/* instance */ + nullpo_retr(NULL, st); + if (st->instance_id >= 0) { + src = &instance->list[st->instance_id].regs; + } + break; } - if( src ) { - if( !src->arrays ) + if (src) { + if (!src->arrays) { src->arrays = idb_alloc(DB_OPT_BASE); + } return src; } return NULL; @@ -3210,6 +3261,99 @@ void set_reg_npcscope_str(struct script_state* st, struct reg_db *n, int64 num, } } +void set_reg_pc_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) +{ + struct script_reg_str *p = NULL; + unsigned int index = script_getvaridx(num); + + nullpo_retv(n); + + if ((p = i64db_get(n->vars, num)) != NULL) { + if (str[0]) { + if (p->value) { + aFree(p->value); + } else if (index) { + script->array_update(n, num, false); + } + p->value = aStrdup(str); + } else { + p->value = NULL; + if (index) { + script->array_update(n, num, true); + } + } + + if (!pc->reg_load) { + p->flag.update = 1; + } + } else if (str[0]) { + struct DBData prev; + if (index) { + script->array_update(n, num, false); + } + + p = ers_alloc(pc->str_reg_ers, struct script_reg_str); + p->value = aStrdup(str); + + if (!pc->reg_load) { + p->flag.update = 1; + } + p->flag.type = 1; + + if(n->vars->put(n->vars, DB->i642key(num), DB->ptr2data(p), &prev)) { + p = DB->data2ptr(&prev); + if (p->value) { + aFree(p->value); + } + ers_free(pc->str_reg_ers, p); + } + } +} + +void set_reg_pc_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) +{ + struct script_reg_num *p = NULL; + unsigned int index = script_getvaridx(num); + + nullpo_retv(n); + + if ((p = i64db_get(n->vars, num)) != NULL) { + if (val) { + if (!p->value && index) { + script->array_update(n, num, false); + } + p->value = val; + } else { + p->value = 0; + if (index) { + script->array_update(n, num, true); + } + } + + if (!pc->reg_load) { + p->flag.update = 1; + } + } else if (val) { + struct DBData prev; + if (index) { + script->array_update(n, num, false); + } + + p = ers_alloc(pc->num_reg_ers, struct script_reg_num); + p->value = val; + + if (!pc->reg_load) { + p->flag.update = 1; + } + p->flag.type = 1; + + if(n->vars->put(n->vars, DB->i642key(num), DB->ptr2data(p), &prev)) { + p = DB->data2ptr(&prev); + ers_free(pc->num_reg_ers, p); + } + } +} + void set_reg_npcscope_num(struct script_state* st, struct reg_db *n, int64 num, const char* name, int val) { if (n) { @@ -3292,48 +3436,65 @@ int set_reg(struct script_state *st, struct map_session_data *sd, int64 num, con return 0; } - if( is_string_variable(name) ) {// string variable + if (is_string_variable(name)) {// string variable const char *str = (const char*)value; switch (prefix) { - case '@': + case '@': + if (ref) { + script->set_reg_ref_str(st, ref, num, name, str); + } else { pc->setregstr(sd, num, str); - return 1; - case '$': - return mapreg->setregstr(num, str); - case '#': - return (name[1] == '#') ? - pc_setaccountreg2str(sd, num, str) : - pc_setaccountregstr(sd, num, str); - case '.': - if (ref) - script->set_reg_ref_str(st, ref, num, name, str); - else if (name[1] == '@') - script->set_reg_scope_str(st, &st->stack->scope, num, name, str); - else - script->set_reg_npc_str(st, &st->script->local, num, name, str); - return 1; - case '\'': - set_reg_instance_str(st, num, name, str); - return 1; - default: - return pc_setglobalreg_str(sd, num, str); + } + return 1; + case '$': + mapreg->setregstr(num, str); + return 1; + case '#': + if (ref) { + script->set_reg_pc_ref_str(st, ref, num, name, str); + } else if (name[1] == '#') { + pc_setaccountreg2str(sd, num, str); + } else { + pc_setaccountregstr(sd, num, str); + } + return 1; + case '.': + if (ref) { + script->set_reg_ref_str(st, ref, num, name, str); + } else if (name[1] == '@') { + script->set_reg_scope_str(st, &st->stack->scope, num, name, str); + } else { + script->set_reg_npc_str(st, &st->script->local, num, name, str); + } + return 1; + case '\'': + set_reg_instance_str(st, num, name, str); + return 1; + default: + if (ref) { + script->set_reg_pc_ref_str(st, ref, num, name, str); + } else { + pc_setglobalreg_str(sd, num, str); + } + return 1; } } else {// integer variable // FIXME: This isn't safe, in 32bits systems we're converting a 64bit pointer // to a 32bit int, this will lead to overflows! [Panikon] int val = (int)h64BPTRSIZE(value); - if(script->str_data[script_getvarid(num)].type == C_PARAM) { - if( pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0 ) { - if( st != NULL ) { + if (script->str_data[script_getvarid(num)].type == C_PARAM) { + if (pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0) { + if (st != NULL) { ShowError("script:set_reg: failed to set param '%s' to %d.\n", name, val); script->reportsrc(st); // Instead of just stop the script execution we let the character close // the window if it was open. st->state = (sd->state.dialog) ? CLOSE : END; - if( st->state == CLOSE ) + if(st->state == CLOSE) { clif->scriptclose(sd, st->oid); + } } return 0; } @@ -3341,28 +3502,44 @@ int set_reg(struct script_state *st, struct map_session_data *sd, int64 num, con } switch (prefix) { - case '@': + case '@': + if (ref) { + script->set_reg_ref_num(st, ref, num, name, val); + } else { pc->setreg(sd, num, val); - return 1; - case '$': - return mapreg->setreg(num, val); - case '#': - return (name[1] == '#') ? - pc_setaccountreg2(sd, num, val) : - pc_setaccountreg(sd, num, val); - case '.': - if (ref) - script->set_reg_ref_num(st, ref, num, name, val); - else if (name[1] == '@') - script->set_reg_scope_num(st, &st->stack->scope, num, name, val); - else - script->set_reg_npc_num(st, &st->script->local, num, name, val); - return 1; - case '\'': - set_reg_instance_num(st, num, name, val); - return 1; - default: - return pc_setglobalreg(sd, num, val); + } + return 1; + case '$': + mapreg->setreg(num, val); + return 1; + case '#': + if (ref) { + script->set_reg_pc_ref_num(st, ref, num, name, val); + } else if (name[1] == '#') { + pc_setaccountreg2(sd, num, val); + } else { + pc_setaccountreg(sd, num, val); + } + return 1; + case '.': + if (ref) { + script->set_reg_ref_num(st, ref, num, name, val); + } else if (name[1] == '@') { + script->set_reg_scope_num(st, &st->stack->scope, num, name, val); + } else { + script->set_reg_npc_num(st, &st->script->local, num, name, val); + } + return 1; + case '\'': + set_reg_instance_num(st, num, name, val); + return 1; + default: + if (ref) { + script->set_reg_pc_ref_num(st, ref, num, name, val); + } else { + pc_setglobalreg(sd, num, val); + } + return 1; } } } @@ -3974,6 +4151,7 @@ void op_2num(struct script_state* st, int op, int i1, int i2) case C_ADD: ret = i1 + i2; ret64 = (int64)i1 + i2; break; case C_SUB: ret = i1 - i2; ret64 = (int64)i1 - i2; break; case C_MUL: ret = i1 * i2; ret64 = (int64)i1 * i2; break; + case C_POW: ret = (int)pow((double)i1, (double)i2); ret64 = (int64)pow((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); @@ -4511,6 +4689,7 @@ void run_script_main(struct script_state *st) { case C_ADD: case C_SUB: case C_MUL: + case C_POW: case C_DIV: case C_MOD: case C_EQ: @@ -4855,6 +5034,8 @@ void do_final_script(void) aFree(script->str_buf); for( i = 0; i < atcommand->binding_count; i++ ) { + aFree(atcommand->binding[i]->at_groups); + aFree(atcommand->binding[i]->char_groups); aFree(atcommand->binding[i]); } @@ -5197,7 +5378,7 @@ int script_load_translation(const char *file, uint8 lang_id) VECTOR_TRUNCATE(msgstr); continue; } - + if (strncasecmp(line, "msgid \"", 7) == 0) { VECTOR_TRUNCATE(msgid); for (i = 7; i < len - 2; i++) { @@ -5389,6 +5570,8 @@ int script_reload(void) script->label_count = 0; for( i = 0; i < atcommand->binding_count; i++ ) { + aFree(atcommand->binding[i]->at_groups); + aFree(atcommand->binding[i]->char_groups); aFree(atcommand->binding[i]); } @@ -5482,8 +5665,6 @@ bool script_sprintf(struct script_state *st, int start, struct StringBuf *out) safestrncpy(buf, p, len); StrBuf->AppendStr(out, buf); } - - p = np; np++; // placeholder = "%%" ; (special case) @@ -6393,6 +6574,9 @@ int buildin_areawarp_sub(struct block_list *bl, va_list ap) pc->randomwarp(sd, CLR_TELEPORT); } else if (x3 != 0 && y3 != 0) { int max, tx, ty, j = 0; + int16 m; + + m = map->mapindex2mapid(index); // choose a suitable max number of attempts if( (max = (y3-y2+1)*(x3-x2+1)*3) > 1000 ) @@ -6403,7 +6587,7 @@ int buildin_areawarp_sub(struct block_list *bl, va_list ap) tx = rnd()%(x3-x2+1)+x2; ty = rnd()%(y3-y2+1)+y2; j++; - } while (map->getcell(index, bl, tx, ty, CELL_CHKNOPASS) && j < max); + } while (map->getcell(m, bl, tx, ty, CELL_CHKNOPASS) && j < max); pc->setpos(sd, index, tx, ty, CLR_OUTSIGHT); } else { @@ -6518,9 +6702,10 @@ BUILDIN(warpchar) { return true; } /*========================================== - * Warpparty - [Fredzilla] [Paradox924X] - * Syntax: warpparty "to_mapname",x,y,Party_ID,{"from_mapname"}; + * Warpparty - [Fredzilla] [Paradox924X] [Jedzkie] [Dastgir] + * Syntax: warpparty("<to_mapname>", <x>, <y>, <party_id>, "<from_mapname>", <include_leader>) * If 'from_mapname' is specified, only the party members on that map will be warped + * If 'include_leader' option is set to false, the leader will be warped too. *------------------------------------------*/ BUILDIN(warpparty) { @@ -6530,78 +6715,84 @@ BUILDIN(warpparty) int type; int map_index; int i; + bool include_leader = true; - const char* str = script_getstr(st,2); - int x = script_getnum(st,3); - int y = script_getnum(st,4); - int p_id = script_getnum(st,5); + const char* str = script_getstr(st, 2); + int x = script_getnum(st, 3); + int y = script_getnum(st, 4); + int p_id = script_getnum(st, 5); const char* str2 = NULL; - if ( script_hasdata(st,6) ) - str2 = script_getstr(st,6); + + if (script_hasdata(st, 6)) + str2 = script_getstr(st, 6); + if (script_hasdata(st, 7)) + include_leader = script_getnum(st, 7); p = party->search(p_id); - if(!p) + + if (p == NULL) return true; - type = ( strcmp(str,"Random")==0 ) ? 0 - : ( strcmp(str,"SavePointAll")==0 ) ? 1 - : ( strcmp(str,"SavePoint")==0 ) ? 2 - : ( strcmp(str,"Leader")==0 ) ? 3 + type = (strcmp(str, "Random") == 0) ? 0 + : (strcmp(str, "SavePointAll") == 0) ? 1 + : (strcmp(str, "SavePoint") == 0) ? 2 + : (strcmp(str, "Leader") == 0) ? 3 : 4; - switch (type) - { - case 3: - for(i = 0; i < MAX_PARTY && !p->party.member[i].leader; i++); - if (i == MAX_PARTY || !p->data[i].sd) //Leader not found / not online - return true; - pl_sd = p->data[i].sd; - map_index = pl_sd->mapindex; - x = pl_sd->bl.x; - y = pl_sd->bl.y; - break; - case 4: - map_index = script->mapindexname2id(st,str); - break; - case 2: - //"SavePoint" uses save point of the currently attached player - if (( sd = script->rid2sd(st) ) == NULL ) - return true; - /* Fall through */ - default: - map_index = 0; - break; + switch (type) { + case 3: + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].leader); + if (i == MAX_PARTY || !p->data[i].sd) // Leader not found / not online + return true; + pl_sd = p->data[i].sd; + map_index = pl_sd->mapindex; + x = pl_sd->bl.x; + y = pl_sd->bl.y; + break; + case 4: + map_index = script->mapindexname2id(st, str); + break; + case 2: + // "SavePoint" uses save point of the currently attached player + if ((sd = script->rid2sd(st)) == NULL) + return true; + /* Fall through */ + default: + map_index = 0; + break; } for (i = 0; i < MAX_PARTY; i++) { - if( !(pl_sd = p->data[i].sd) || pl_sd->status.party_id != p_id ) + if (!(pl_sd = p->data[i].sd) || pl_sd->status.party_id != p_id) continue; - if( str2 && strcmp(str2, map->list[pl_sd->bl.m].name) != 0 ) + if (str2 && strcmp(str2, map->list[pl_sd->bl.m].name) != 0) continue; - if( pc_isdead(pl_sd) ) + if (pc_isdead(pl_sd)) continue; - switch( type ) - { - case 0: // Random - if(!map->list[pl_sd->bl.m].flag.nowarp) - pc->randomwarp(pl_sd,CLR_TELEPORT); - break; - case 1: // SavePointAll - 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(!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(!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp) - pc->setpos(pl_sd,map_index,x,y,CLR_TELEPORT); - break; + if (include_leader == false && p->party.member[i].leader) + continue; + + switch( type ) { + case 0: // Random + if (!map->list[pl_sd->bl.m].flag.nowarp) + pc->randomwarp(pl_sd, CLR_TELEPORT); + break; + case 1: // SavePointAll + 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 (!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 (!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp) + pc->setpos(pl_sd, map_index, x, y, CLR_TELEPORT); + break; } } @@ -6609,61 +6800,67 @@ BUILDIN(warpparty) } /*========================================== * Warpguild - [Fredzilla] - * Syntax: warpguild "mapname",x,y,Guild_ID; + * Syntax: warpguild "mapname",x,y,Guild_ID,{"from_mapname"}; *------------------------------------------*/ BUILDIN(warpguild) { struct map_session_data *sd = NULL; - struct map_session_data *pl_sd; struct guild* g; - struct s_mapiterator* iter; int type; + int i; + int16 map_id = -1; - const char* str = script_getstr(st,2); - int x = script_getnum(st,3); - int y = script_getnum(st,4); - int gid = script_getnum(st,5); + const char *str = script_getstr(st, 2); + int x = script_getnum(st, 3); + int y = script_getnum(st, 4); + int gid = script_getnum(st, 5); + + if (script_hasdata(st, 6)) { + map_id = map->mapname2mapid(script_getstr(st, 6)); + } g = guild->search(gid); - if( g == NULL ) + if (g == NULL) return true; - type = ( strcmp(str,"Random")==0 ) ? 0 - : ( strcmp(str,"SavePointAll")==0 ) ? 1 - : ( strcmp(str,"SavePoint")==0 ) ? 2 + type = (strcmp(str, "Random") == 0) ? 0 + : (strcmp(str, "SavePointAll") == 0) ? 1 + : (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; } - iter = mapit_getallusers(); - for (pl_sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); pl_sd = BL_UCAST(BL_PC, mapit->next(iter))) { - if( pl_sd->status.guild_id != gid ) - continue; + for (i = 0; i < MAX_GUILD; i++) { + if (g->member[i].online && g->member[i].sd != NULL) { + struct map_session_data *pl_sd = g->member[i].sd; - switch( type ) - { + if (map_id >= 0 && map_id != pl_sd->bl.m) + continue; + + switch (type) + { case 0: // Random - if(!map->list[pl_sd->bl.m].flag.nowarp) - pc->randomwarp(pl_sd,CLR_TELEPORT); + if (!map->list[pl_sd->bl.m].flag.nowarp) + pc->randomwarp(pl_sd, CLR_TELEPORT); break; case 1: // SavePointAll - 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); + 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(!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); + 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(!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp) - pc->setpos(pl_sd,script->mapindexname2id(st,str),x,y,CLR_TELEPORT); + if (!map->list[pl_sd->bl.m].flag.noreturn && !map->list[pl_sd->bl.m].flag.nowarp) + pc->setpos(pl_sd, script->mapindexname2id(st, str), x, y, CLR_TELEPORT); break; + } } } - mapit->free(iter); return true; } @@ -6723,13 +6920,16 @@ BUILDIN(percentheal) } sd = script->rid2sd(st); - if( sd == NULL ) + if (sd == NULL) return true; #ifdef RENEWAL if( sd->sc.data[SC_EXTREMITYFIST2] ) sp = 0; #endif - pc->percentheal(sd,hp,sp); + if (sd->sc.data[SC_BITESCAR]) { + hp = 0; + } + pc->percentheal(sd, hp, sp); return true; } @@ -6738,18 +6938,18 @@ BUILDIN(percentheal) *------------------------------------------*/ BUILDIN(jobchange) { - int job, upper=-1; + int class, upper=-1; - job=script_getnum(st,2); + class = script_getnum(st,2); if( script_hasdata(st,3) ) upper=script_getnum(st,3); - if (pc->db_checkid(job)) { + if (pc->db_checkid(class)) { struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) return true; - pc->jobchange(sd, job, upper); + pc->jobchange(sd, class, upper); } return true; @@ -6760,8 +6960,8 @@ BUILDIN(jobchange) *------------------------------------------*/ BUILDIN(jobname) { - int class_=script_getnum(st,2); - script_pushconststr(st, pc->job_name(class_)); + int class = script_getnum(st,2); + script_pushconststr(st, pc->job_name(class)); return true; } @@ -6839,6 +7039,7 @@ BUILDIN(__setr) int64 num; const char* name; char prefix; + struct reg_db *ref; data = script_getdata(st,2); //datavalue = script_getdata(st,3); @@ -6851,11 +7052,11 @@ BUILDIN(__setr) num = reference_getuid(data); name = reference_getname(data); + ref = reference_getref(data); prefix = *name; if (not_server_variable(prefix)) { - sd = script->rid2sd(st); - if (sd == NULL) { + if (ref == NULL && (sd = script->rid2sd(st)) == NULL) { ShowError("script:set: no player attached for player variable '%s'\n", name); return true; } @@ -6903,9 +7104,9 @@ BUILDIN(__setr) } if (is_string_variable(name)) - script->set_reg(st, sd, num, name, script_getstr(st, 3), script_getref(st, 2)); + script->set_reg(st, sd, num, name, script_getstr(st, 3), ref); else - script->set_reg(st, sd, num, name, (const void *)h64BPTRSIZE(script_getnum(st, 3)), script_getref(st, 2)); + script->set_reg(st, sd, num, name, (const void *)h64BPTRSIZE(script_getnum(st, 3)), ref); return true; } @@ -7125,6 +7326,22 @@ int script_array_index_cmp(const void *a, const void *b) return (*(const unsigned int *)a - *(const unsigned int *)b); // FIXME: Is the unsigned difference really intended here? } +BUILDIN(getarrayindex) +{ + struct script_data *data = script_getdata(st, 2); + + if (!data_isreference(data) || reference_toconstant(data)) + { + ShowError("script:getarrayindex: not a variable\n"); + script->reportdata(data); + st->state = END; + return false;// not a variable + } + + script_pushint(st, reference_getindex(data)); + return true; +} + /// Deletes count or all the elements in an array, from the starting index. /// ex: deletearray arr[4],2; /// @@ -8012,6 +8229,90 @@ BUILDIN(makeitem) return true; } +/*========================================== +* makeitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,{"<map name>",<X>,<Y>,<range>}; +*------------------------------------------*/ +BUILDIN(makeitem2) +{ + struct map_session_data *sd = NULL; + struct item_data *i_data; + int nameid = 0, amount; + int16 x, y, m = -1, range; + struct item item_tmp; + + if (script_isstringtype(st, 2)) { + const char *name = script_getstr(st, 2); + struct item_data *item_data = itemdb->search_name(name); + if (item_data != NULL) + nameid = item_data->nameid; + } else { + nameid = script_getnum(st, 2); + } + + i_data = itemdb->exists(nameid); + if (i_data == NULL) { + ShowError("makeitem2: Unknown item %d requested.\n", nameid); + return true; + } + + if (script_hasdata(st, 11)) { + m = map->mapname2mapid(script_getstr(st, 11)); + } else { + sd = script->rid2sd(st); + if (sd == NULL) + return true; + m = sd->bl.m; + } + + if (m == -1) { + ShowError("makeitem2: Nonexistant map requested.\n"); + return true; + } + + x = (script_hasdata(st, 12) ? script_getnum(st, 12) : 0); + y = (script_hasdata(st, 13) ? script_getnum(st, 13) : 0); + + // pick random position on map + if (x <= 0 || x >= map->list[m].xs || y <= 0 || y >= map->list[m].ys) { + sd = map->id2sd(st->rid); + if ((x < 0 || y < 0) && sd == NULL) { + x = 0; + y = 0; + map->search_freecell(NULL, m, &x, &y, -1, -1, 1); + } else { + range = (script_hasdata(st, 14) ? cap_value(script_getnum(st, 14), 1, battle_config.area_size) : 3); + map->search_freecell(&sd->bl, sd->bl.m, &x, &y, range, range, 0); // Locate spot next to player. + } + } + + // if equip or weapon or egg type only drop one. + switch (i_data->type) { + case IT_ARMOR: + case IT_WEAPON: + case IT_PETARMOR: + case IT_PETEGG: + amount = 1; + break; + default: + amount = cap_value(script_getnum(st, 3), 1, MAX_AMOUNT); + break; + } + + memset(&item_tmp, 0, sizeof(item_tmp)); + item_tmp.nameid = nameid; + item_tmp.identify = script_getnum(st, 4); + item_tmp.refine = cap_value(script_getnum(st, 5), 0, MAX_REFINE); + item_tmp.attribute = script_getnum(st, 6); + item_tmp.card[0] = (short)script_getnum(st, 7); + item_tmp.card[1] = (short)script_getnum(st, 8); + item_tmp.card[2] = (short)script_getnum(st, 9); + item_tmp.card[3] = (short)script_getnum(st, 10); + + map->addflooritem(NULL, &item_tmp, amount, m, x, y, 0, 0, 0, 0); + + return true; +} + /// Counts / deletes the current item given by idx. /// Used by buildin_delitem_search /// Relies on all input data being already fully valid. @@ -8295,20 +8596,26 @@ BUILDIN(disableitemuse) BUILDIN(readparam) { int type; struct map_session_data *sd; + struct script_data *data = script_getdata(st, 2); - type=script_getnum(st,2); - if (script_hasdata(st,3)) - sd = script->nick2sd(st, script_getstr(st,3)); - else - sd=script->rid2sd(st); + if (reference_toparam(data)) { + type = reference_getparamtype(data); + } else { + type = script->conv_num(st, data); + } + + if (script_hasdata(st, 3)) { + sd = script->nick2sd(st, script_getstr(st, 3)); + } else { + sd = script->rid2sd(st); + } if (sd == NULL) { - script_pushint(st,-1); + script_pushint(st, -1); return true; } - script_pushint(st,pc->readparam(sd,type)); - + script_pushint(st, pc->readparam(sd, type)); return true; } @@ -8473,7 +8780,7 @@ BUILDIN(getpartyleader) switch (type) { case 1: script_pushint(st,p->party.member[i].account_id); break; case 2: script_pushint(st,p->party.member[i].char_id); break; - case 3: script_pushint(st,p->party.member[i].class_); break; + case 3: script_pushint(st,p->party.member[i].class); break; case 4: script_pushstrcopy(st,mapindex_id2name(p->party.member[i].map)); break; case 5: script_pushint(st,p->party.member[i].lv); break; default: script_pushstrcopy(st,p->party.member[i].name); break; @@ -8597,39 +8904,48 @@ BUILDIN(getguildmember) *------------------------------------------*/ BUILDIN(strcharinfo) { - int num; struct guild* g; struct party_data* p; - struct map_session_data *sd = script->rid2sd(st); - if (sd == NULL) //Avoid crashing.... + struct map_session_data *sd; + + if (script_hasdata(st, 4)) + sd = map->id2sd(script_getnum(st, 4)); + else + sd = script->rid2sd(st); + + if (sd == NULL) { + if(script_hasdata(st, 3)) { + script_pushcopy(st, 3); + } else { + script_pushconststr(st, ""); + } return true; + } - num=script_getnum(st,2); - switch(num) { - case 0: - script_pushstrcopy(st,sd->status.name); - break; - case 1: - if( ( p = party->search(sd->status.party_id) ) != NULL ) { - script_pushstrcopy(st,p->party.name); - } else { - script_pushconststr(st,""); - } - break; - case 2: - if( ( g = sd->guild ) != NULL ) { - script_pushstrcopy(st,g->name); - } else { - script_pushconststr(st,""); - } - break; - case 3: - script_pushconststr(st,map->list[sd->bl.m].name); - break; - default: - ShowWarning("buildin_strcharinfo: unknown parameter.\n"); - script_pushconststr(st,""); - break; + switch (script_getnum(st, 2)) { + case 0: + script_pushstrcopy(st, sd->status.name); + break; + case 1: + if ((p = party->search(sd->status.party_id)) != NULL) { + script_pushstrcopy(st, p->party.name); + } else { + script_pushconststr(st, ""); + } + break; + case 2: + if ((g = sd->guild) != NULL) { + script_pushstrcopy(st, g->name); + } else { + script_pushconststr(st, ""); + } + break; + case 3: + script_pushconststr(st, map->list[sd->bl.m].name); + break; + default: + ShowWarning("script:strcharinfo: unknown parameter.\n"); + script_pushconststr(st, ""); } return true; @@ -8646,41 +8962,51 @@ BUILDIN(strcharinfo) *------------------------------------------*/ BUILDIN(strnpcinfo) { - int num; char *buf,*name=NULL; - struct npc_data *nd = map->id2nd(st->oid); + struct npc_data *nd; + + if (script_hasdata(st, 4)) + nd = map->id2nd(script_getnum(st, 4)); + else + nd = map->id2nd(st->oid); + if (nd == NULL) { - script_pushconststr(st, ""); + if (script_hasdata(st, 3)) { + script_pushcopy(st, 3); + } else { + script_pushconststr(st, ""); + } return true; } - num = script_getnum(st,2); - switch(num) { - case 0: // display name + switch (script_getnum(st,2)) { + case 0: // display name + name = aStrdup(nd->name); + break; + case 1: // visible part of display name + if ((buf = strchr(nd->name,'#')) != NULL) { name = aStrdup(nd->name); - break; - case 1: // visible part of display name - if((buf = strchr(nd->name,'#')) != NULL) - { - name = aStrdup(nd->name); - name[buf - nd->name] = 0; - } else // Return the name, there is no '#' present - name = aStrdup(nd->name); - break; - case 2: // # fragment - if((buf = strchr(nd->name,'#')) != NULL) - name = aStrdup(buf+1); - break; - case 3: // unique name - name = aStrdup(nd->exname); - break; - case 4: // map name - if( nd->bl.m >= 0 ) // Only valid map indexes allowed (issue:8034) - name = aStrdup(map->list[nd->bl.m].name); - break; + name[buf - nd->name] = 0; + } else { // Return the name, there is no '#' present + name = aStrdup(nd->name); + } + break; + case 2: // # fragment + if ((buf = strchr(nd->name,'#')) != NULL) { + name = aStrdup(buf+1); + } + break; + case 3: // unique name + name = aStrdup(nd->exname); + break; + case 4: // map name + if (nd->bl.m >= 0) { // Only valid map indexes allowed (issue:8034) + name = aStrdup(map->list[nd->bl.m].name); + } + break; } - if(name) + if (name) script_pushstr(st, name); else script_pushconststr(st, ""); @@ -8931,6 +9257,35 @@ BUILDIN(getequipisenableref) return true; } +/** + * Checks if the equipped item allows options. + * *getequipisenableopt(<equipment_index>); + * + * @param equipment_index as the inventory index of the equipment. + * @return 1 on enabled 0 on disabled. + */ +BUILDIN(getequipisenableopt) +{ + int i = -1, index = script_getnum(st, 2); + struct map_session_data *sd = script->rid2sd(st); + + if (sd == NULL) { + script_pushint(st, -1); + ShowError("buildin_getequipisenableopt: player is not attached!"); + return false; + } + + if (index > 0 && index <= ARRAYLENGTH(script->equip)) + i = pc->checkequip(sd, script->equip[index - 1]); + + if (i >=0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_options && !sd->status.inventory[i].expire_time) + script_pushint(st, 1); + else + script_pushint(st, 0); + + return true; +} + /*========================================== * Chk if the item equiped at pos is identify (huh ?) * return (npc) @@ -9017,20 +9372,32 @@ BUILDIN(getequipweaponlv) * 0 : false (max refine level or unequip..) *------------------------------------------*/ BUILDIN(getequippercentrefinery) { - int i = -1,num; + int i = -1, num; struct map_session_data *sd; + int type = 0; + + num = script_getnum(st, 2); + type = (script_hasdata(st, 3)) ? script_getnum(st, 3) : REFINE_CHANCE_TYPE_NORMAL; - num = script_getnum(st,2); sd = script->rid2sd(st); - if( sd == NULL ) + if (sd == NULL) return true; + if (type < REFINE_CHANCE_TYPE_NORMAL || type >= REFINE_CHANCE_TYPE_MAX) { + ShowError("buildin_getequippercentrefinery: Invalid type (%d) provided!\n", type); + script_pushint(st, 0); + return false; + } + + 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)); + i = pc->checkequip(sd, script->equip[num - 1]); + + if (i >= 0 && sd->status.inventory[i].nameid != 0 && 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, (enum refine_chance_type) type)); else - script_pushint(st,0); + script_pushint(st, 0); return true; } @@ -9080,15 +9447,15 @@ BUILDIN(successrefitem) sd->status.char_id == (int)MakeDWord(sd->status.inventory[i].card[2],sd->status.inventory[i].card[3]) ) { // Fame point system [DracoRPG] switch (sd->inventory_data[i]->wlv) { - case 1: - pc->addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point - break; - case 2: - pc->addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point - break; - case 3: - pc->addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point - break; + case 1: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point + break; + case 2: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point + break; + case 3: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point + break; } } } @@ -9600,14 +9967,22 @@ BUILDIN(setgroupid) { /// Returns the group ID of the player. /// -/// getgroupid() -> <int> -BUILDIN(getgroupid) -{ - struct map_session_data *sd = script->rid2sd(st); - if (sd == NULL) +/// getgroupid({<account id>}) -> <int> +BUILDIN(getgroupid) { + struct map_session_data *sd = NULL; + + if (script_hasdata(st, 2)) { + sd = map->id2sd(script_getnum(st, 2)); + } else { + sd = script->rid2sd(st); + } + + if (sd == NULL) { + script_pushint(st, -1); return true; // no player attached, report source - script_pushint(st, pc_get_group_id(sd)); + } + script_pushint(st, pc_get_group_id(sd)); return true; } @@ -9637,7 +10012,13 @@ BUILDIN(end) { BUILDIN(checkoption) { int option; - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd; + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); + if (sd == NULL) return true;// no player attached, report source @@ -9656,7 +10037,13 @@ BUILDIN(checkoption) BUILDIN(checkoption1) { int opt1; - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd; + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); + if (sd == NULL) return true;// no player attached, report source @@ -9675,7 +10062,13 @@ BUILDIN(checkoption1) BUILDIN(checkoption2) { int opt2; - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd; + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); + if (sd == NULL) return true;// no player attached, report source @@ -9699,7 +10092,13 @@ BUILDIN(setoption) { int option; int flag = 1; - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd; + + if (script_hasdata(st, 4)) + sd = map->id2sd(script_getnum(st, 4)); + else + sd = script->rid2sd(st); + if (sd == NULL) return true;// no player attached, report source @@ -9889,7 +10288,7 @@ BUILDIN(setmount) flag = SETMOUNT_TYPE_AUTODETECT; } // Sanity checks and auto-detection - if ((sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { + if ((sd->job & MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { if (pc->checkskill(sd, RK_DRAGONTRAINING)) { // Rune Knight (Dragon) unsigned int option; @@ -9901,11 +10300,11 @@ BUILDIN(setmount) OPTION_DRAGON1); // default value pc->setridingdragon(sd, option); } - } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_RANGER) { + } else if ((sd->job & MAPID_THIRDMASK) == MAPID_RANGER) { // Ranger (Warg) if (pc->checkskill(sd, RA_WUGRIDER)) pc->setridingwug(sd, true); - } else if ((sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC) { + } else if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { // Mechanic (Mado Gear) if (pc->checkskill(sd, NC_MADOLICENCE)) pc->setmadogear(sd, true); @@ -10079,9 +10478,17 @@ BUILDIN(openstorage) { struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) - return true; + return false; + + if (sd->storage.received == false) { + script_pushint(st, 0); + ShowWarning("buildin_openstorage: Storage data for AID %d has not been loaded.\n", sd->bl.id); + return false; + } storage->open(sd); + + script_pushint(st, 1); // success flag. return true; } @@ -10238,7 +10645,7 @@ BUILDIN(guildchangegm) if (sd == NULL) script_pushint(st,0); else - script_pushint(st,guild->gm_change(guild_id, sd)); + script_pushint(st, guild->gm_change(guild_id, sd->status.char_id)); return true; } @@ -10616,19 +11023,29 @@ BUILDIN(donpcevent) *------------------------------------------*/ BUILDIN(addtimer) { - int tick = script_getnum(st,2); + int tick = script_getnum(st, 2); const char* event = script_getstr(st, 3); struct map_session_data *sd; script->check_event(st, event); - sd = script->rid2sd(st); - if( sd == NULL ) - return true; - if (!pc->addeventtimer(sd,tick,event)) { - ShowWarning("buildin_addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)\n",sd->status.char_id,event); + if (script_hasdata(st, 4)) + sd = map->id2sd(script_getnum(st, 4)); + else + sd = script->rid2sd(st); + + if (sd == NULL) { + script_pushint(st, 0); return false; } + + if (!pc->addeventtimer(sd, tick, event)) { + ShowWarning("script:addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)\n", sd->status.char_id, event); + script_pushint(st, 0); + return false; + } + + script_pushint(st, 1); return true; } /*========================================== @@ -10639,12 +11056,17 @@ BUILDIN(deltimer) struct map_session_data *sd; event=script_getstr(st, 2); - sd = script->rid2sd(st); - if( sd == NULL ) + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); + + if (sd == NULL) return true; script->check_event(st, event); - pc->deleventtimer(sd,event); + pc->deleventtimer(sd, event); return true; } /*========================================== @@ -10655,14 +11077,198 @@ BUILDIN(addtimercount) int tick; struct map_session_data *sd; - event=script_getstr(st, 2); - tick=script_getnum(st,3); - sd = script->rid2sd(st); - if( sd == NULL ) + event = script_getstr(st, 2); + tick = script_getnum(st, 3); + + if (script_hasdata(st, 4)) + sd = map->id2sd(script_getnum(st, 4)); + else + sd = script->rid2sd(st); + + if (sd == NULL) return true; script->check_event(st, event); - pc->addeventtimercount(sd,event,tick); + pc->addeventtimercount(sd, event, tick); + return true; +} + +enum gettimer_mode { + GETTIMER_COUNT = 0, + GETTIMER_TICK_NEXT = 1, + GETTIMER_TICK_LAST = 2, +}; + +BUILDIN(gettimer) +{ + struct map_session_data *sd; + const struct TimerData *td; + int i; + int tick; + const char *event = NULL; + int val = 0; + bool first = true; + short mode = script_getnum(st, 2); + + if (script_hasdata(st, 3)) + sd = map->id2sd(script_getnum(st, 3)); + else + sd = script->rid2sd(st); + + if (script_hasdata(st, 4)) { + event = script_getstr(st, 4); + script->check_event(st, event); + } + + if (sd == NULL) { + script_pushint(st, -1); + return true; + } + + switch (mode) { + case GETTIMER_COUNT: + // get number of timers + for (i = 0; i < MAX_EVENTTIMER; i++) { + if (sd->eventtimer[i] != INVALID_TIMER) { + if (event != NULL) { + td = timer->get(sd->eventtimer[i]); + Assert_retr(false, td != NULL); + + if (strcmp((char *)(td->data), event) == 0) { + val++; + } + } else { + val++; + } + } + } + break; + case GETTIMER_TICK_NEXT: + // get the number of tick before the next timer runs + for (i = 0; i < MAX_EVENTTIMER; i++) { + if (sd->eventtimer[i] != INVALID_TIMER) { + td = timer->get(sd->eventtimer[i]); + Assert_retr(false, td != NULL); + tick = max(0, DIFF_TICK32(td->tick, timer->gettick())); + + if (event != NULL) { + if ((first == true || tick < val) && strcmp((char *)(td->data), event) == 0) { + val = tick; + first = false; + } + } else if (first == true || tick < val) { + val = tick; + first = false; + } + } + } + break; + case GETTIMER_TICK_LAST: + // get the number of ticks before the last timer runs + for (i = MAX_EVENTTIMER - 1; i >= 0; i--) { + if (sd->eventtimer[i] != INVALID_TIMER) { + td = timer->get(sd->eventtimer[i]); + Assert_retr(false, td != NULL); + tick = max(0, DIFF_TICK32(td->tick, timer->gettick())); + + if (event != NULL) { + if (strcmp((char *)(td->data), event) == 0) { + val = max(val, tick); + } + } else { + val = max(val, tick); + } + } + } + break; + } + + script_pushint(st, val); + return true; +} + +int buildin_getunits_sub(struct block_list *bl, va_list ap) +{ + struct script_state *st = va_arg(ap, struct script_state *); + struct map_session_data *sd = va_arg(ap, struct map_session_data *); + int32 id = va_arg(ap, int32); + uint32 start = va_arg(ap, uint32); + uint32 *count = va_arg(ap, uint32 *); + uint32 limit = va_arg(ap, uint32); + const char *name = va_arg(ap, const char *); + struct reg_db *ref = va_arg(ap, struct reg_db *); + uint32 index = start + *count; + + if (index >= SCRIPT_MAX_ARRAYSIZE || *count > limit) { + return 1; + } + + script->set_reg(st, sd, reference_uid(id, index), name, + (const void *)h64BPTRSIZE(bl->id), ref); + + (*count)++; + return 0; +} + +BUILDIN(getunits) +{ + const char *mapname, *name; + int16 m, x1, y1, x2, y2; + int32 id; + uint32 start; + struct reg_db *ref; + enum bl_type type = script_getnum(st, 2); + struct script_data *data = script_getdata(st, 3); + uint32 count = 0, limit = script_getnum(st, 4); + struct map_session_data *sd = NULL; + + if (!data_isreference(data) || reference_toconstant(data)) { + ShowError("script:getunits: second argument must be a variable\n"); + script->reportdata(data); + st->state = END; + return false; + } + + id = reference_getid(data); + start = reference_getindex(data); + name = reference_getname(data); + ref = reference_getref(data); + + if (not_server_variable(*name)) { + sd = script->rid2sd(st); + if (sd == NULL) { + return true; // player variable but no player attached + } + } + + if (is_string_variable(name)) { + ShowError("script:getunits: second argument must be an integer variable\n"); + script->reportdata(data); + st->state = END; + return false; + } + + if (limit < 1 || limit > SCRIPT_MAX_ARRAYSIZE) { + limit = SCRIPT_MAX_ARRAYSIZE; + } + + mapname = script_getstr(st, 5); + m = map->mapname2mapid(mapname); + + if (script_hasdata(st, 9)) { + x1 = script_getnum(st, 6); + y1 = script_getnum(st, 7); + x2 = script_getnum(st, 8); + y2 = script_getnum(st, 9); + + map->foreachinarea(buildin_getunits_sub, m, x1, y1, x2, y2, type, + st, sd, id, start, &count, limit, name, ref); + } else { + map->foreachinmap(buildin_getunits_sub, m, type, + st, sd, id, start, &count, limit, name, ref); + } + + script_pushint(st, count); return true; } @@ -11503,14 +12109,16 @@ BUILDIN(getstatus) case 3: script_pushint(st, sd->sc.data[id]->val3); break; case 4: script_pushint(st, sd->sc.data[id]->val4); break; case 5: - { - const struct TimerData *td = timer->get(sd->sc.data[id]->timer); + if (sd->sc.data[id]->infinite_duration) { + script_pushint(st, INFINITE_DURATION); + } else { + const struct TimerData *td = timer->get(sd->sc.data[id]->timer); - if (td != NULL) { - // return the amount of time remaining - script_pushint(st, (int)(td->tick - timer->gettick())); // TODO: change this to int64 when we'll support 64 bit script values + if (td != NULL) { + // return the amount of time remaining + script_pushint(st, (int)(td->tick - timer->gettick())); // TODO: change this to int64 when we'll support 64 bit script values + } } - } break; default: script_pushint(st, 1); break; } @@ -11679,22 +12287,22 @@ BUILDIN(homunculus_shuffle) //These two functions bring the eA MAPID_* class functionality to scripts. BUILDIN(eaclass) { - int class_; + int class; if (script_hasdata(st,2)) { - class_ = script_getnum(st,2); + class = script_getnum(st,2); } else { struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) return true; - class_ = sd->status.class_; + class = sd->status.class; } - script_pushint(st,pc->jobid2mapid(class_)); + script_pushint(st,pc->jobid2mapid(class)); return true; } BUILDIN(roclass) { - int class_ =script_getnum(st,2); + int job = script_getnum(st,2); int sex; if (script_hasdata(st,3)) { sex = script_getnum(st,3); @@ -11705,7 +12313,7 @@ BUILDIN(roclass) else sex = 1; //Just use male when not found. } - script_pushint(st,pc->mapid2jobid(class_, sex)); + script_pushint(st,pc->mapid2jobid(job, sex)); return true; } @@ -11801,12 +12409,12 @@ BUILDIN(changebase) if(vclass == JOB_WEDDING) { if (!battle_config.wedding_modifydisplay || //Do not show the wedding sprites - sd->class_&JOBL_BABY //Baby classes screw up when showing wedding sprites. [Skotlex] They don't seem to anymore. + sd->job & JOBL_BABY //Baby classes screw up when showing wedding sprites. [Skotlex] They don't seem to anymore. ) return true; } - if(sd->disguise == -1 && vclass != sd->vd.class_) + if (sd->disguise == -1 && vclass != sd->vd.class) pc->changelook(sd,LOOK_BASE,vclass); //Updated client view. Base, Weapon and Cloth Colors. return true; @@ -12171,6 +12779,76 @@ BUILDIN(setmapflagnosave) { return true; } +enum mapinfo_info { + MAPINFO_NAME, + MAPINFO_ID, + MAPINFO_SIZE_X, + MAPINFO_SIZE_Y, + MAPINFO_ZONE +}; + +BUILDIN(getmapinfo) +{ + enum mapinfo_info mode = script_getnum(st, 2); + int16 m; + + if (script_hasdata(st, 3)) { + if (script_isstringtype(st, 3)) { + const char *str = script_getstr(st, 3); + m = map->mapname2mapid(str); + } else { + m = script_getnum(st, 3); + } + } else { + struct block_list *bl = NULL; + + if (st->oid) { + bl = map->id2bl(st->oid); + } else if (st->rid) { + bl = map->id2bl(st->rid); + } + + if (bl == NULL) { + ShowError("script:getmapinfo: map not supplied and NPC/PC not attached!\n"); + script_pushint(st, -3); + return false; + } + + m = bl->m; + } + + if (m < 0) { + // here we don't throw an error, so the command can be used + // to detect whether or not a map exists + script_pushint(st, -1); + return true; + } + + switch (mode) { + case MAPINFO_NAME: + script_pushconststr(st, map->list[m].name); + break; + case MAPINFO_ID: + script_pushint(st, m); + break; + case MAPINFO_SIZE_X: + script_pushint(st, map->list[m].xs); + break; + case MAPINFO_SIZE_Y: + script_pushint(st, map->list[m].ys); + break; + case MAPINFO_ZONE: + script_pushstrcopy(st, map->list[m].zone->name); + break; + default: + ShowError("script:getmapinfo: unknown option in second argument (%u).\n", mode); + script_pushint(st, -2); + return false; + } + + return true; +} + BUILDIN(getmapflag) { int16 m,i; @@ -12233,6 +12911,7 @@ BUILDIN(getmapflag) case MF_RESET: script_pushint(st,map->list[m].flag.reset); break; case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break; case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break; + case MF_NOAUTOLOOT: script_pushint(st, map->list[m].flag.noautoloot); break; case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break; } } @@ -12357,6 +13036,7 @@ BUILDIN(setmapflag) { case MF_RESET: map->list[m].flag.reset = 1; break; case MF_NOTOMB: map->list[m].flag.notomb = 1; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 1; break; case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break; } } @@ -12444,6 +13124,7 @@ BUILDIN(removemapflag) { case MF_RESET: map->list[m].flag.reset = 0; break; case MF_NOTOMB: map->list[m].flag.notomb = 0; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 0; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 0; break; case MF_NOVIEWID: map->list[m].flag.noviewid = EQP_NONE; break; } } @@ -12861,113 +13542,98 @@ BUILDIN(getequipcardcnt) /// Removes all cards from the item found in the specified equipment slot of the invoking character, /// and give them to the character. If any cards were removed in this manner, it will also show a success effect. -/// successremovecards <slot>; +/// successremovecards(<slot>); BUILDIN(successremovecards) { - int i=-1,c,cardflag=0; + int i = -1, c, cardflag = 0; struct map_session_data *sd = script->rid2sd(st); - int num = script_getnum(st,2); + int num = script_getnum(st, 2); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) - i=pc->checkequip(sd,script->equip[num-1]); + i = pc->checkequip(sd,script->equip[num - 1]); - if (i < 0 || !sd->inventory_data[i]) { + if (i < 0 || sd->inventory_data[i] == NULL) return true; - } - if(itemdb_isspecial(sd->status.inventory[i].card[0])) + if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; - for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) { - if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) {// extract this card from the item + for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { + if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { int flag; struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); + + memset(&item_tmp, 0, sizeof(item_tmp)); + cardflag = 1; - item_tmp.nameid = sd->status.inventory[i].card[c]; + item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; + sd->status.inventory[i].card[c] = 0; - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - // get back the cart in inventory - clif->additem(sd,0,0,flag); + if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } } if (cardflag == 1) { - //if card was remove replace item with no card - int flag, j; - struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); - - item_tmp.nameid = sd->status.inventory[i].nameid; - item_tmp.identify = 1; - item_tmp.refine = sd->status.inventory[i].refine; - item_tmp.attribute = sd->status.inventory[i].attribute; - item_tmp.expire_time = sd->status.inventory[i].expire_time; - item_tmp.bound = sd->status.inventory[i].bound; - - for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) - item_tmp.card[j]=sd->status.inventory[i].card[j]; - - pc->delitem(sd, i, 1, 0, DELITEM_MATERIALCHANGE, LOG_TYPE_SCRIPT); - if ((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - //chk if can be spawn in inventory otherwise put on floor - clif->additem(sd,0,0,flag); - map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); - } - + pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); + clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); + clif->additem(sd, i, 1, 0); + pc->equipitem(sd, i, sd->status.inventory[i].equip); clif->misceffect(&sd->bl,3); } return true; } /// Removes all cards from the item found in the specified equipment slot of the invoking character. -/// failedremovecards <slot>, <type>; +/// failedremovecards(<slot>, <type>); /// <type>=0 : will destroy both the item and the cards. /// <type>=1 : will keep the item, but destroy the cards. /// <type>=2 : will keep the cards, but destroy the item. -/// <type>=? : will just display the failure effect. +/// <type>=3 : will just display the failure effect. BUILDIN(failedremovecards) { - int i=-1,c,cardflag=0; + int i = -1, c, cardflag = 0; + int num = script_getnum(st, 2); + int typefail = script_getnum(st, 3); struct map_session_data *sd = script->rid2sd(st); - int num = script_getnum(st,2); - int typefail = script_getnum(st,3); if (sd == NULL) return true; if (num > 0 && num <= ARRAYLENGTH(script->equip)) - i=pc->checkequip(sd,script->equip[num-1]); + i = pc->checkequip(sd, script->equip[num - 1]); - if (i < 0 || !sd->inventory_data[i]) + if (i < 0 || sd->inventory_data[i] == NULL) return true; - if(itemdb_isspecial(sd->status.inventory[i].card[0])) + if (itemdb_isspecial(sd->status.inventory[i].card[0])) return true; - for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) { - if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) { + for (c = sd->inventory_data[i]->slot - 1; c >= 0; --c) { + if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { cardflag = 1; - if(typefail == 2) {// add cards to inventory, clear + sd->status.inventory[i].card[c] = 0; + + if (typefail == 2) { // add cards to inventory, clear int flag; struct item item_tmp; - memset(&item_tmp,0,sizeof(item_tmp)); + memset(&item_tmp, 0, sizeof(item_tmp)); - item_tmp.nameid = sd->status.inventory[i].card[c]; + item_tmp.nameid = sd->status.inventory[i].card[c]; item_tmp.identify = 1; - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - clif->additem(sd,0,0,flag); + if ((flag = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT))) { + clif->additem(sd, 0, 0, flag); map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); } } @@ -12975,35 +13641,16 @@ BUILDIN(failedremovecards) } if (cardflag == 1) { - if (typefail == 0 || typefail == 2) { - // destroy the item + if (typefail == 0 || typefail == 2) { // destroy the item pc->delitem(sd, i, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_SCRIPT); } else if (typefail == 1) { - // destroy the card - int flag, j; - struct item item_tmp; - - memset(&item_tmp,0,sizeof(item_tmp)); - - item_tmp.nameid = sd->status.inventory[i].nameid; - item_tmp.identify = 1; - item_tmp.refine = sd->status.inventory[i].refine; - item_tmp.attribute = sd->status.inventory[i].attribute; - item_tmp.expire_time = sd->status.inventory[i].expire_time; - item_tmp.bound = sd->status.inventory[i].bound; - - for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++) - item_tmp.card[j]=sd->status.inventory[i].card[j]; - - pc->delitem(sd, i, 1, 0, DELITEM_FAILREFINE, LOG_TYPE_SCRIPT); - - if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) { - clif->additem(sd,0,0,flag); - map->addflooritem(&sd->bl, &item_tmp, 1, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 0); - } + pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); + clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); + clif->additem(sd, i, 1, 0); + pc->equipitem(sd, i, sd->status.inventory[i].equip); } - clif->misceffect(&sd->bl,2); } + clif->misceffect(&sd->bl, 2); return true; } @@ -13416,88 +14063,332 @@ BUILDIN(getitemslots) return true; } -// TODO: add matk here if needed/once we get rid of RENEWAL +// TODO: add matk here if needed /*========================================== * Returns some values of an item [Lupus] * Price, Weight, etc... - * getiteminfo(itemID,n), where n - * 0 value_buy; - * 1 value_sell; - * 2 type; - * 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc.. - * if = 0, then monsters don't drop it at all (rare or a quest item) - * if = -1, then this item is sold in NPC shops only - * 4 sex; - * 5 equip; - * 6 weight; - * 7 atk; - * 8 def; - * 9 range; - * 10 slot; - * 11 look; - * 12 elv; - * 13 wlv; - * 14 view id *------------------------------------------*/ BUILDIN(getiteminfo) { - int item_id,n; - struct item_data *i_data; + int item_id = script_getnum(st, 2); + int n = script_getnum(st, 3); + struct item_data *it = itemdb->exists(item_id); - item_id = script_getnum(st,2); - n = script_getnum(st,3); - i_data = itemdb->exists(item_id); + if (it == NULL) { + script_pushint(st, -1); + return true; + } - if (i_data && n>=0 && n<=14) { - int *item_arr = (int*)&i_data->value_buy; - script_pushint(st,item_arr[n]); - } else { + switch (n) { + case 0: + script_pushint(st, it->value_buy); + break; + case 1: + script_pushint(st, it->value_sell); + break; + case 2: + script_pushint(st, it->type); + break; + case 3: + script_pushint(st, it->maxchance); + break; + case 4: + script_pushint(st, it->sex); + break; + case 5: + script_pushint(st, it->equip); + break; + case 6: + script_pushint(st, it->weight); + break; + case 7: + script_pushint(st, it->atk); + break; + case 8: + script_pushint(st, it->def); + break; + case 9: + script_pushint(st, it->range); + break; + case 10: + script_pushint(st, it->slot); + break; + case 11: + script_pushint(st, it->subtype); + break; + case 12: + script_pushint(st, it->elv); + break; + case 13: + script_pushint(st, it->wlv); + break; + case 14: + script_pushint(st, it->view_id); + break; + default: script_pushint(st,-1); } return true; } +/** + * Returns the value of the current equipment being parsed using static variables - + * current_equip_item_index and current_equip_option_index. + * !!Designed to be used with item_options.conf only!! + * *getequippedoptioninfo(<info_type>); + * + * @param (int) Types - + * IT_OPT_INDEX ID of the item option. + * IT_OPT_VALUE Amount of the bonus to be added. + * @return value of the type or -1. + */ +BUILDIN(getequippedoptioninfo) +{ + int val = 0, type = script_getnum(st, 2); + struct map_session_data *sd = NULL; + + if ((sd = script->rid2sd(st)) == NULL || status->current_equip_item_index == -1 || status->current_equip_option_index == -1 + || !sd->status.inventory[status->current_equip_item_index].option[status->current_equip_option_index].index) { + script_pushint(st, -1); + return false; + } + + switch (type) { + case IT_OPT_INDEX: + val = sd->status.inventory[status->current_equip_item_index].option[status->current_equip_option_index].index; + break; + case IT_OPT_VALUE: + val = sd->status.inventory[status->current_equip_item_index].option[status->current_equip_option_index].value; + break; + default: + ShowError("buildin_getequippedoptioninfo: Invalid option data type %d (Max %d).\n", type, IT_OPT_MAX-1); + script_pushint(st, -1); + return false; + } + + script_pushint(st, val); + + return true; +} + +/** + * Gets the option information of an equipment. + * *getequipoption(<equip_index>,<slot>,<type>); + * + * @param equip_index as the Index of the Equipment. + * @param slot as the slot# of the Item Option (1 to MAX_ITEM_OPTIONS) + * @param type IT_OPT_INDEX or IT_OPT_VALUE. + * @return (int) value or -1 on failure. + */ +BUILDIN(getequipoption) +{ + int val = 0, equip_index = script_getnum(st, 2); + int slot = script_getnum(st, 3); + int opt_type = script_getnum(st, 4); + int i = -1; + struct map_session_data *sd = script->rid2sd(st); + + if (sd == NULL) { + script_pushint(st, -1); + ShowError("buildin_getequipoption: Player not attached!\n"); + return false; + } + + if (slot <= 0 || slot > MAX_ITEM_OPTIONS) { + script_pushint(st, -1); + ShowError("buildin_getequipoption: Invalid option slot %d (Min: 1, Max: %d) provided.\n", slot, MAX_ITEM_OPTIONS); + return false; + } + + if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) { + if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) { + ShowError("buildin_getequipoption: No equipment is equipped in the given index %d.\n", equip_index); + script_pushint(st, -1); + return false; + } + } else { + ShowError("buildin_getequipoption: Invalid equipment index %d provided.\n", equip_index); + script_pushint(st, 0); + return false; + } + + if (sd->status.inventory[i].nameid != 0) { + switch (opt_type) { + case IT_OPT_INDEX: + val = sd->status.inventory[i].option[slot-1].index; + break; + case IT_OPT_VALUE: + val = sd->status.inventory[i].option[slot-1].value; + break; + default: + ShowError("buildin_getequipoption: Invalid option data type %d provided.\n", opt_type); + script_pushint(st, -1); + break; + } + } + + script_pushint(st, val); + + return true; +} + +/** + * Set an equipment's option value. + * *setequipoption(<equip_index>,<slot>,<opt_index>,<value>); + * + * @param equip_index as the inventory index of the equipment. + * @param slot as the slot of the item option (1 to MAX_ITEM_OPTIONS) + * @param opt_index as the index of the option available as "Id" in db/item_options.conf. + * @param value as the value of the option type. + * For IT_OPT_INDEX see "Name" in item_options.conf + * For IT_OPT_VALUE, the value of the script bonus. + * @return 0 on failure, 1 on success. + */ +BUILDIN(setequipoption) +{ + int equip_index = script_getnum(st, 2); + int slot = script_getnum(st, 3); + int opt_index = script_getnum(st, 4); + int value = script_getnum(st, 5); + int i = -1; + + struct map_session_data *sd = script->rid2sd(st); + struct item_option *ito = NULL; + + if (sd == NULL) { + script_pushint(st, 0); + ShowError("buildin_setequipoption: Player not attached!\n"); + return false; + } + + if (slot <= 0 || slot > MAX_ITEM_OPTIONS) { + script_pushint(st, 0); + ShowError("buildin_setequipoption: Invalid option index %d (Min: 1, Max: %d) provided.\n", slot, MAX_ITEM_OPTIONS); + return false; + } + + if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) { + if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) { + ShowError("buildin_setequipoption: No equipment is equipped in the given index %d.\n", equip_index); + script_pushint(st, 0); + return false; + } + } else { + ShowError("buildin_setequipoption: Invalid equipment index %d provided.\n", equip_index); + script_pushint(st, 0); + return false; + } + + if (sd->status.inventory[i].nameid != 0) { + if (opt_index == 0) { + // Remove the option + sd->status.inventory[i].option[slot-1].index = 0; + sd->status.inventory[i].option[slot-1].value = 0; + } else { + if ((ito = itemdb->option_exists(opt_index)) == NULL) { + script_pushint(st, 0); + ShowError("buildin_setequipotion: Option index %d does not exist!\n", opt_index); + return false; + } else if (value < -INT16_MAX || value > INT16_MAX) { + script_pushint(st, 0); + ShowError("buildin_setequipotion: Option value %d exceeds maximum limit (%d to %d) for type!\n", value, -INT16_MAX, INT16_MAX); + return false; + } + /* Add Option Index */ + sd->status.inventory[i].option[slot-1].index = ito->index; + /* Add Option Value */ + sd->status.inventory[i].option[slot-1].value = value; + } + + /* Unequip and simulate deletion of the item. */ + pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); // status calc will happen in pc->equipitem() below + clif->refine(sd->fd, 0, i, sd->status.inventory[i].refine); // notify client of a refine. + clif->delitem(sd, i, 1, DELITEM_MATERIALCHANGE); // notify client to simulate item deletion. + /* Log deletion of the item. */ + logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]); + /* Equip and simulate addition of the item. */ + clif->additem(sd, i, 1, 0); // notify client to simulate item addition. + /* Log addition of the item. */ + logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i], sd->inventory_data[i]); + pc->equipitem(sd, i, sd->status.inventory[i].equip); // force equip the item at the original position. + clif->misceffect(&sd->bl, 2); // show effect + } + + script_pushint(st, 1); + + return true; + +} + /*========================================== * Set some values of an item [Lupus] * Price, Weight, etc... - * setiteminfo(itemID,n,Value), where n - * 0 value_buy; - * 1 value_sell; - * 2 type; - * 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc.. - * if = 0, then monsters don't drop it at all (rare or a quest item) - * if = -1, then this item is sold in NPC shops only - * 4 sex; - * 5 equip; - * 6 weight; - * 7 atk; - * 8 def; - * 9 range; - * 10 slot; - * 11 look; - * 12 elv; - * 13 wlv; - * 14 view id - * Returns Value or -1 if the wrong field's been set *------------------------------------------*/ BUILDIN(setiteminfo) { - int item_id,n,value; - struct item_data *i_data; + // TODO: Validate data in a similar way as during database load + int item_id = script_getnum(st, 2); + int n = script_getnum(st, 3); + int value = script_getnum(st,4); + struct item_data *it = itemdb->exists(item_id); - item_id = script_getnum(st,2); - n = script_getnum(st,3); - value = script_getnum(st,4); - i_data = itemdb->exists(item_id); + if (it == NULL) { + script_pushint(st, -1); + return true; + } - if (i_data && n>=0 && n<=14) { - int *item_arr = (int*)&i_data->value_buy; - item_arr[n] = value; - script_pushint(st,value); - } else { + switch (n) { + case 0: + it->value_buy = value; + break; + case 1: + it->value_sell = value; + break; + case 2: + it->type = value; + break; + case 3: + it->maxchance = value; + break; + case 4: + it->sex = value; + break; + case 5: + it->equip = value; + break; + case 6: + it->weight = value; + break; + case 7: + it->atk = value; + break; + case 8: + it->def = value; + break; + case 9: + it->range = value; + break; + case 10: + it->slot = value; + break; + case 11: + it->subtype = value; + break; + case 12: + it->elv = value; + break; + case 13: + it->wlv = value; + break; + case 14: + it->view_id = value; + break; + default: script_pushint(st,-1); + return true; } + script_pushint(st,value); return true; } @@ -13618,7 +14509,7 @@ BUILDIN(petloot) BUILDIN(getinventorylist) { struct map_session_data *sd = script->rid2sd(st); - char card_var[NAME_LENGTH]; + char card_var[SCRIPT_VARNAME_LENGTH]; int i,j=0,k; if(!sd) return true; @@ -13639,6 +14530,14 @@ BUILDIN(getinventorylist) sprintf(card_var, "@inventorylist_card%d",k+1); pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.inventory[i].card[k]); } + for (k = 0; k < MAX_ITEM_OPTIONS; k++) { + sprintf(card_var, "@inventorylist_opt_id%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.inventory[i].option[k].index); + sprintf(card_var, "@inventorylist_opt_val%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.inventory[i].option[k].value); + sprintf(card_var, "@inventorylist_opt_param%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.inventory[i].option[k].param); + } pc->setreg(sd,reference_uid(script->add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time); pc->setreg(sd,reference_uid(script->add_str("@inventorylist_bound"), j),sd->status.inventory[i].bound); j++; @@ -13651,7 +14550,7 @@ BUILDIN(getinventorylist) BUILDIN(getcartinventorylist) { struct map_session_data *sd = script->rid2sd(st); - char card_var[26]; + char card_var[SCRIPT_VARNAME_LENGTH]; int i,j=0,k; if(!sd) return true; @@ -13668,6 +14567,14 @@ BUILDIN(getcartinventorylist) sprintf(card_var, "@cartinventorylist_card%d",k+1); pc->setreg(sd,reference_uid(script->add_str(card_var), j),sd->status.cart[i].card[k]); } + for (k = 0; k < MAX_ITEM_OPTIONS; k++) { + sprintf(card_var, "@cartinventorylist_opt_id%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.cart[i].option[k].index); + sprintf(card_var, "@cartinventorylist_opt_val%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.cart[i].option[k].value); + sprintf(card_var, "@cartinventorylist_opt_param%d", k + 1); + pc->setreg(sd, reference_uid(script->add_str(card_var), j), sd->status.cart[i].option[k].param); + } pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_expire"), j),sd->status.cart[i].expire_time); pc->setreg(sd,reference_uid(script->add_str("@cartinventorylist_bound"), j),sd->status.cart[i].bound); j++; @@ -13752,15 +14659,26 @@ BUILDIN(undisguise) * Transform a bl to another class, * @type unused *------------------------------------------*/ -BUILDIN(classchange) { - int class_,type; - struct block_list *bl=map->id2bl(st->oid); +BUILDIN(classchange) +{ + int class, type, target; + struct block_list *bl = map->id2bl(st->oid); - if(bl==NULL) return true; + if (bl == NULL) + return true; - class_=script_getnum(st,2); - type=script_getnum(st,3); - clif->class_change(bl,class_,type); + class = script_getnum(st, 2); + type = script_getnum(st, 3); + target = script_hasdata(st, 4) ? script_getnum(st, 4) : 0; + + if (target > 0) { + struct map_session_data *sd = script->charid2sd(st, target); + if (sd != NULL) { + clif->class_change(bl, class, type, sd); + } + } else { + clif->class_change(bl, class, type, NULL); + } return true; } @@ -14085,24 +15003,40 @@ BUILDIN(npcskilleffect) { *------------------------------------------*/ BUILDIN(specialeffect) { struct block_list *bl = NULL; - int type = script_getnum(st,2); - enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA; + int type = script_getnum(st, 2); + enum send_target target = AREA; - if (script_hasdata(st,4)) { - struct npc_data *nd = npc->name2id(script_getstr(st,4)); - if (nd != NULL) - bl = &nd->bl; + if (script_hasdata(st, 3)) { + target = script_getnum(st, 3); + } + + if (script_hasdata(st, 4)) { + if (script_isstringtype(st, 4)) { + struct npc_data *nd = npc->name2id(script_getstr(st, 4)); + if (nd != NULL) { + bl = &nd->bl; + } + } else { + bl = map->id2bl(script_getnum(st, 4)); + } } else { bl = map->id2bl(st->oid); } - if (bl == NULL) + if (bl == NULL) { return true; + } if (target == SELF) { - struct map_session_data *sd = script->rid2sd(st); - if (sd != NULL) + struct map_session_data *sd; + if (script_hasdata(st, 5)) { + sd = map->id2sd(script_getnum(st, 5)); + } else { + sd = script->rid2sd(st); + } + if (sd != NULL) { clif->specialeffect_single(bl, type, sd->fd); + } } else { clif->specialeffect(bl, type, target); } @@ -14218,22 +15152,62 @@ BUILDIN(dispbottom) * All The Players Full Recovery * (HP/SP full restore and resurrect if need) *------------------------------------------*/ +int buildin_recovery_sub(struct map_session_data *sd) +{ + nullpo_retr(0, sd); + + if (pc_isdead(sd)) { + status->revive(&sd->bl, 100, 100); + } else { + status_percent_heal(&sd->bl, 100, 100); + } + + return 0; +} + +int buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) +{ + return script->buildin_recovery_sub(sd); +} + +int buildin_recovery_bl_sub(struct block_list *bl, va_list ap) +{ + return script->buildin_recovery_sub(BL_CAST(BL_PC, bl)); +} + BUILDIN(recovery) { - struct map_session_data *sd; - struct s_mapiterator* iter; + if (script_hasdata(st, 2)) { + if (script_isstringtype(st, 2)) { + int16 m = map->mapname2mapid(script_getstr(st, 2)); - iter = mapit_getallusers(); - for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { - if(pc_isdead(sd)) - status->revive(&sd->bl, 100, 100); - else - status_percent_heal(&sd->bl, 100, 100); - clif->message(sd->fd,msg_sd(sd,880)); // "You have been recovered!" + if (m == -1) { + ShowWarning("script:recovery: invalid map!\n"); + return false; + } + + if (script_hasdata(st, 6)) { + int16 x1 = script_getnum(st, 3); + int16 y1 = script_getnum(st, 4); + int16 x2 = script_getnum(st, 5); + int16 y2 = script_getnum(st, 6); + map->foreachinarea(script->buildin_recovery_bl_sub, m, x1, y1, x2, y2, BL_PC); + } else { + map->foreachinmap(script->buildin_recovery_bl_sub, m, BL_PC); + } + } else { + struct map_session_data *sd = script->id2sd(st, script_getnum(st, 2)); + + if (sd != NULL) { + script->buildin_recovery_sub(sd); + } + } + } else { + map->foreachpc(script->buildin_recovery_pc_sub); } - mapit->free(iter); return true; } + /*========================================== * Get your pet info: getpetinfo(n) * n -> 0:pet_id 1:pet_class 2:pet_name @@ -14631,15 +15605,15 @@ BUILDIN(getlook) type=script_getnum(st,2); switch(type) { case LOOK_HAIR: val = sd->status.hair; break; //1 - case LOOK_WEAPON: val = sd->status.weapon; break; //2 - case LOOK_HEAD_BOTTOM: val = sd->status.head_bottom; break; //3 - case LOOK_HEAD_TOP: val = sd->status.head_top; break; //4 - case LOOK_HEAD_MID: val = sd->status.head_mid; break; //5 + case LOOK_WEAPON: val = sd->status.look.weapon; break; //2 + case LOOK_HEAD_BOTTOM: val = sd->status.look.head_bottom; break; //3 + case LOOK_HEAD_TOP: val = sd->status.look.head_top; break; //4 + case LOOK_HEAD_MID: val = sd->status.look.head_mid; break; //5 case LOOK_HAIR_COLOR: val = sd->status.hair_color; break; //6 case LOOK_CLOTHES_COLOR: val = sd->status.clothes_color; break; //7 - case LOOK_SHIELD: val = sd->status.shield; break; //8 + case LOOK_SHIELD: val = sd->status.look.shield; break; //8 case LOOK_SHOES: break; //9 - case LOOK_ROBE: val = sd->status.robe; break; //12 + case LOOK_ROBE: val = sd->status.look.robe; break; //12 case LOOK_BODY2: val=sd->status.body; break; //13 } @@ -14889,19 +15863,38 @@ BUILDIN(getmapxy) return true; } +enum logmes_type { + LOGMES_NPC, + LOGMES_ATCOMMAND +}; + /*========================================== - * Allows player to write NPC logs (i.e. Bank NPC, etc) [Lupus] + * Allows player to write logs (i.e. Bank NPC, etc) [Lupus] *------------------------------------------*/ BUILDIN(logmes) { - const char *str; + const char *str = script_getstr(st, 2); struct map_session_data *sd = script->rid2sd(st); + enum logmes_type type = LOGMES_NPC; + nullpo_retr(false, sd); - if (sd == NULL) - return true; + if (script_hasdata(st, 3)) { + type = script_getnum(st, 3); + } + + switch (type) { + case LOGMES_ATCOMMAND: + logs->atcommand(sd, str); + break; + case LOGMES_NPC: + logs->npc(sd, str); + break; + default: + ShowError("script:logmes: Unknown log type!\n"); + st->state = END; + return false; + } - str = script_getstr(st,2); - logs->npc(sd,str); return true; } @@ -15367,6 +16360,103 @@ BUILDIN(charat) { } //======================================================= +// isstr <argument> +// +// returns type: +// 0 - int +// 1 - string +// 2 - other +//------------------------------------------------------- +BUILDIN(isstr) +{ + if (script_isinttype(st, 2)) { + script_pushint(st, 0); + } else if (script_isstringtype(st, 2)) { + script_pushint(st, 1); + } else { + script_pushint(st, 2); + } + return true; +} + +enum datatype { + DATATYPE_NIL = 1 << 7, // we don't start at 1, to leave room for primitives + DATATYPE_STR = 1 << 8, + DATATYPE_INT = 1 << 9, + DATATYPE_CONST = 1 << 10, + DATATYPE_PARAM = 1 << 11, + DATATYPE_VAR = 1 << 12, + DATATYPE_LABEL = 1 << 13, +}; + +BUILDIN(getdatatype) { + int type; + + if (script_hasdata(st, 2)) { + struct script_data *data = script_getdata(st, 2); + + if (data_isstring(data)) { + type = DATATYPE_STR; + if (data->type == C_CONSTSTR) { + type |= DATATYPE_CONST; + } + } else if (data_isint(data)) { + type = DATATYPE_INT; + } else if (data_islabel(data)) { + type = DATATYPE_LABEL; + } else if (data_isreference(data)) { + if (reference_toconstant(data)) { + type = DATATYPE_CONST | DATATYPE_INT; + } else if (reference_toparam(data)) { + type = DATATYPE_PARAM | DATATYPE_INT; + } else if (reference_tovariable(data)) { + type = DATATYPE_VAR; + if (is_string_variable(reference_getname(data))) { + type |= DATATYPE_STR; + } else { + type |= DATATYPE_INT; + } + } else { + ShowError("script:getdatatype: Unknown reference type!\n"); + script->reportdata(data); + st->state = END; + return false; + } + } else { + type = data->type; // fallback to primitive type if unknown + } + } else { + type = DATATYPE_NIL; // nothing was passed + } + + script_pushint(st, type); + return true; +} + +//======================================================= +// chr <int> +//------------------------------------------------------- +BUILDIN(chr) +{ + char output[2]; + output[0] = script_getnum(st, 2); + output[1] = '\0'; + + script_pushstrcopy(st, output); + return true; +} + +//======================================================= +// ord <chr> +//------------------------------------------------------- +BUILDIN(ord) +{ + const char *chr = script_getstr(st, 2); + script_pushint(st, *chr); + return true; +} + +//======================================================= // setchar <string>, <char>, <index> //------------------------------------------------------- BUILDIN(setchar) @@ -16164,6 +17254,7 @@ BUILDIN(swap) { struct map_session_data *sd = NULL; struct script_data *data1, *data2; + struct reg_db *ref1, *ref2; const char *varname1, *varname2; int64 uid1, uid2; @@ -16204,6 +17295,8 @@ BUILDIN(swap) uid1 = reference_getuid(data1); uid2 = reference_getuid(data2); + ref1 = reference_getref(data1); + ref2 = reference_getref(data2); if (is_string_variable(varname1)) { const char *value1, *value2; @@ -16212,8 +17305,8 @@ BUILDIN(swap) value2 = script_getstr(st,3); if (strcmpi(value1, value2)) { - script->set_reg(st, sd, uid1, varname1, value2, script_getref(st,3)); - script->set_reg(st, sd, uid2, varname2, value1, script_getref(st,2)); + script->set_reg(st, sd, uid1, varname1, value2, ref1); + script->set_reg(st, sd, uid2, varname2, value1, ref2); } } else { @@ -16223,8 +17316,8 @@ BUILDIN(swap) value2 = script_getnum(st,3); if (value1 != value2) { - script->set_reg(st, sd, uid1, varname1, (const void *)h64BPTRSIZE(value2), script_getref(st,3)); - script->set_reg(st, sd, uid2, varname2, (const void *)h64BPTRSIZE(value1), script_getref(st,2)); + script->set_reg(st, sd, uid1, varname1, (const void *)h64BPTRSIZE(value2), ref1); + script->set_reg(st, sd, uid2, varname2, (const void *)h64BPTRSIZE(value1), ref2); } } return true; @@ -16996,6 +18089,1640 @@ BUILDIN(getunittype) { return true; } +/** + * Sets real-time unit data for a game object. + * Setunitdata <GUID>,<DataType>,<Val1>{,<Val2>,<Val3>} + * @param1 GUID GID of the unit. + * @param2 DataType Type of Data to be set for the unit. + * @param3 Value#1 Value to be passed as change in data. + * @param4 Value#2 Optional int value to be passed for certain data types. + * @param5 Value#3 Optional int value to be passed for certain data types. + * @return 1 on success, 0 on failure. + */ +BUILDIN(setunitdata) +{ + struct block_list *bl = NULL; + const char *mapname = NULL, *udtype = NULL; + int type = 0, val = 0, val2 = 0, val3 = 0; + struct map_session_data *tsd = NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_setunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + type = script_getnum(st, 3); + + /* type bounds */ + if (type < UDT_SIZE || type >= UDT_MAX) { // Note: UDT_TYPE is not valid here + ShowError("buildin_setunitdata: Invalid unit data type %d provided.\n", type); + script_pushint(st, 0); + return false; + } + + /* Mandatory Argument 3 */ + if (type == UDT_MAPIDXY) { + if (!script_isstringtype(st, 4)) { + ShowError("buildin_setunitdata: Invalid data type for argument #3.\n"); + script_pushint(st, 0); + return false; + } + mapname = script_getstr(st, 4); + } else { + if (script_isstringtype(st, 4)) { + ShowError("buildin_setunitdata: Invalid data type for argument #3.\n"); + script_pushint(st, 0); + return false; + } + val = script_getnum(st, 4); + } +/* checks if value is out of bounds. */ +#define setunitdata_check_bounds(arg, min, max) \ + do { \ + if (script_getnum(st, (arg)) < (min) || script_getnum(st, (arg)) > (max)) { \ + ShowError("buildin_setunitdata: Invalid value %d for argument #%d. (min: %d, max: %d)\n", script_getnum(st, (arg)), (arg)-1, (min), (max)); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if value is out of bounds. */ +#define setunitdata_check_min(arg, min) \ + do { \ + if (script_getnum(st, (arg)) < (min)) { \ + ShowError("buildin_setunitdata: Invalid value %d for argument #%d. (min: %d)\n", script_getnum(st, (arg)), (arg)-1, (min)); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if the argument doesn't exist, if required. + * also checks if the argument exists, if not required. */ +#define setunitdata_assert_arg(arg, required) \ + do { \ + if (required && !script_hasdata(st, (arg))) { \ + ShowError("buildin_setunitdata: Type %d reqires argument #%d.\n", type, (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } else if (!required && script_hasdata(st, arg)) { \ + ShowError("buildin_setunitdata: Argument %d is not required for type %d.\n", (arg)-1, type); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while (0); +/* checks if the data is an integer. */ +#define setunitdata_check_int(arg) \ + do { \ + setunitdata_assert_arg((arg), true); \ + if (script_isstringtype(st, (arg))) { \ + ShowError("buildin_setunitdata: Argument #%d expects integer, string given.\n", (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if the data is a string. */ +#define setunitdata_check_string(arg) \ + do { \ + setunitdata_assert_arg((arg), true); \ + if (script_isinttype(st, (arg))) { \ + ShowError("buildin_setunitdata: Argument #%d expects string, integer given.\n", (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); + + if (type != UDT_MAPIDXY && type != UDT_WALKTOXY) { + setunitdata_assert_arg(5, false); + setunitdata_assert_arg(6, false); + } + + switch (type) + { + case UDT_SIZE: + setunitdata_check_bounds(4, SZ_SMALL, SZ_BIG); + break; + case UDT_LEVEL: + case UDT_HP: + case UDT_MAXHP: + case UDT_SP: + case UDT_MAXSP: + case UDT_CLASS: + case UDT_HEADBOTTOM: + case UDT_HEADMIDDLE: + case UDT_HEADTOP: + case UDT_CLOTHCOLOR: + case UDT_SHIELD: + case UDT_WEAPON: + case UDT_INTIMACY: + case UDT_LIFETIME: + case UDT_MERC_KILLCOUNT: + case UDT_ROBE: + case UDT_BODY2: + setunitdata_check_min(4, 0); + break; + case UDT_MASTERAID: + setunitdata_check_min(4, 0); + tsd = map->id2sd(val); + if (tsd == NULL) { + ShowWarning("buildin_setunitdata: Account ID %d not found for master change!\n",val); + script_pushint(st, 0); + return false; + } + break; + case UDT_MASTERCID: + setunitdata_check_min(4, 0); + tsd = map->charid2sd(val); + if (tsd == NULL) { + ShowWarning("buildin_setunitdata: Character ID %d not found for master change!\n",val); + script_pushint(st, 0); + return false; + } + break; + case UDT_MAPIDXY: + if ((val = map->mapname2mapid(mapname)) == -1) { + ShowError("buildin_setunitdata: Non-existent map %s provided.\n", mapname); + return false; + } + setunitdata_check_int(5); + setunitdata_check_int(6); + setunitdata_check_bounds(5, 0, MAX_MAP_SIZE/2); + setunitdata_check_bounds(6, 0, MAX_MAP_SIZE/2); + val2 = script_getnum(st, 5); + val3 = script_getnum(st, 6); + break; + case UDT_WALKTOXY: + setunitdata_assert_arg(6, false); + setunitdata_check_int(5); + val2 = script_getnum(st, 5); + setunitdata_check_bounds(4, 0, MAX_MAP_SIZE/2); + setunitdata_check_bounds(5, 0, MAX_MAP_SIZE/2); + break; + case UDT_SPEED: + setunitdata_check_bounds(4, 0, MAX_WALK_SPEED); + break; + case UDT_MODE: + setunitdata_check_bounds(4, MD_NONE, MD_MASK); + break; + case UDT_AI: + setunitdata_check_bounds(4, AI_NONE, AI_MAX-1); + break; + case UDT_SCOPTION: + setunitdata_check_bounds(4, OPTION_NOTHING, OPTION_COSTUME); + break; + case UDT_SEX: + setunitdata_check_bounds(4, SEX_FEMALE, SEX_MALE); + break; + case UDT_HAIRSTYLE: + setunitdata_check_bounds(4, 0, battle->bc->max_hair_style); + break; + case UDT_HAIRCOLOR: + setunitdata_check_bounds(4, 0, battle->bc->max_hair_color); + break; + case UDT_LOOKDIR: + setunitdata_check_bounds(4, 0, 7); + break; + case UDT_CANMOVETICK: + setunitdata_check_min(4, 0); + break; + case UDT_STR: + case UDT_AGI: + case UDT_VIT: + case UDT_INT: + case UDT_DEX: + case UDT_LUK: + case UDT_STATPOINT: + case UDT_ATKRANGE: + case UDT_ATKMIN: + case UDT_ATKMAX: + case UDT_MATKMIN: + case UDT_MATKMAX: + case UDT_AMOTION: + case UDT_ADELAY: + case UDT_DMOTION: + setunitdata_check_bounds(4, 0, USHRT_MAX); + break; + case UDT_DEF: + case UDT_MDEF: + case UDT_HIT: + case UDT_FLEE: + case UDT_PDODGE: + case UDT_CRIT: + setunitdata_check_bounds(4, 0, SHRT_MAX); + break; + case UDT_HUNGER: + setunitdata_check_bounds(4, 0, 99); + break; + case UDT_RACE: + case UDT_ELETYPE: + case UDT_ELELEVEL: + setunitdata_check_bounds(4, 0, CHAR_MAX); + break; + default: + break; + } + +#undef setunitdata_check_bounds +#undef setunitdata_assert_arg +#undef setunitdata_check_int +#undef setunitdata_check_string + + /* Set the values */ + switch (bl->type) { + case BL_MOB: + { + struct mob_data *md = BL_UCAST(BL_MOB, bl); + nullpo_retr(false, md); + + switch (type) + { + case UDT_SIZE: + md->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + md->level = val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + clif->charnameack(0, &md->bl); + break; + case UDT_MAXHP: + md->status.max_hp = (unsigned int) val; + clif->charnameack(0, &md->bl); + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + md->status.max_sp = (unsigned int) val; + break; + case UDT_MASTERAID: + md->master_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + md->status.speed = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_MODE: + md->status.mode = (enum e_mode) val; + break; + case UDT_AI: + md->special_state.ai = (enum ai) val; + break; + case UDT_SCOPTION: + md->sc.option = (unsigned int) val; + break; + case UDT_SEX: + md->vd->sex = (char) val; + break; + case UDT_CLASS: + mob->class_change(md, val); + break; + case UDT_HAIRSTYLE: + clif->changelook(bl, LOOK_HAIR, val); + break; + case UDT_HAIRCOLOR: + clif->changelook(bl, LOOK_HAIR_COLOR, val); + break; + case UDT_HEADBOTTOM: + clif->changelook(bl, LOOK_HEAD_BOTTOM, val); + break; + case UDT_HEADMIDDLE: + clif->changelook(bl, LOOK_HEAD_MID, val); + break; + case UDT_HEADTOP: + clif->changelook(bl, LOOK_HEAD_TOP, val); + break; + case UDT_CLOTHCOLOR: + clif->changelook(bl, LOOK_CLOTHES_COLOR, val); + break; + case UDT_SHIELD: + clif->changelook(bl, LOOK_SHIELD, val); + break; + case UDT_WEAPON: + clif->changelook(bl, LOOK_WEAPON, val); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (uint8) val); + break; + case UDT_CANMOVETICK: + md->ud.canmove_tick = val; + break; + case UDT_STR: + md->status.str = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_AGI: + md->status.agi = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_VIT: + md->status.vit = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_INT: + md->status.int_ = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_DEX: + md->status.dex = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_LUK: + md->status.luk = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_ATKRANGE: + md->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + md->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + md->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + md->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + md->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + md->status.def = (defType) val; + break; + case UDT_MDEF: + md->status.mdef = (defType) val; + break; + case UDT_HIT: + md->status.hit = (short) val; + break; + case UDT_FLEE: + md->status.flee = (short) val; + break; + case UDT_PDODGE: + md->status.flee2 = (short) val; + break; + case UDT_CRIT: + md->status.cri = (short) val; + break; + case UDT_RACE: + md->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + md->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + md->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + md->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + md->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + md->status.dmotion = (unsigned short) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for mob unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_HOM: + { + struct homun_data *hd = BL_UCAST(BL_HOM, bl); + + nullpo_retr(false, hd); + + switch (type) + { + case UDT_SIZE: + hd->base_status.size = (unsigned char) val; + break; + case UDT_LEVEL: + hd->homunculus.level = (short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + hd->homunculus.max_hp = val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + hd->homunculus.max_sp = val; + break; + case UDT_MASTERCID: + hd->homunculus.char_id = val; + hd->master = tsd; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + hd->base_status.speed = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + hd->ud.canmove_tick = val; + break; + case UDT_STR: + hd->base_status.str = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_AGI: + hd->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_VIT: + hd->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_INT: + hd->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_DEX: + hd->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_LUK: + hd->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_ATKRANGE: + hd->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + hd->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + hd->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + hd->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + hd->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + hd->base_status.def = (defType) val; + break; + case UDT_MDEF: + hd->base_status.mdef = (defType) val; + break; + case UDT_HIT: + hd->base_status.hit = (short) val; + break; + case UDT_FLEE: + hd->base_status.flee = (short) val; + break; + case UDT_PDODGE: + hd->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + hd->base_status.cri = (short) val; + break; + case UDT_RACE: + hd->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + hd->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + hd->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + hd->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + hd->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + hd->base_status.dmotion = (unsigned short) val; + break; + case UDT_HUNGER: + hd->homunculus.hunger = (short) val; + clif->send_homdata(hd->master, SP_HUNGRY, hd->homunculus.hunger); + break; + case UDT_INTIMACY: + homun->add_intimacy(hd, (unsigned int) val); + clif->send_homdata(hd->master, SP_INTIMATE, hd->homunculus.intimacy / 100); + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for homunculus unit.\n", udtype); + script_pushint(st, 0); + return false; + } + + clif->send_homdata(hd->master, SP_ACK, 0); // send homun data + } + break; + case BL_PET: + { + struct pet_data *pd = BL_UCAST(BL_PET, bl); + + nullpo_retr(false, pd); + + switch (type) + { + case UDT_SIZE: + pd->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + pd->pet.level = (short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + pd->status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + pd->status.max_sp = (unsigned int) val; + break; + case UDT_MASTERAID: + pd->pet.account_id = val; + pd->msd = tsd; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + pd->status.speed = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + pd->ud.canmove_tick = val; + break; + case UDT_STR: + pd->status.str = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_AGI: + pd->status.agi = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_VIT: + pd->status.vit = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_INT: + pd->status.int_ = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_DEX: + pd->status.dex = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_LUK: + pd->status.luk = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_ATKRANGE: + pd->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + pd->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + pd->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + pd->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + pd->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + pd->status.def = (defType) val; + break; + case UDT_MDEF: + pd->status.mdef = (defType) val; + break; + case UDT_HIT: + pd->status.hit = (short) val; + break; + case UDT_FLEE: + pd->status.flee = (short) val; + break; + case UDT_PDODGE: + pd->status.flee2 = (short) val; + break; + case UDT_CRIT: + pd->status.cri = (short) val; + break; + case UDT_RACE: + pd->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + pd->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + pd->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + pd->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + pd->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + pd->status.dmotion = (unsigned short) val; + break; + case UDT_INTIMACY: + pet->set_intimate(pd, val); + clif->send_petdata(pd->msd, pd, 1, pd->pet.intimate); + break; + case UDT_HUNGER: + pd->pet.hungry = (short) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for pet unit.\n", udtype); + script_pushint(st, 0); + return false; + } + clif->send_petstatus(pd->msd); // send pet data + } + break; + case BL_MER: + { + struct mercenary_data *mc = BL_UCAST(BL_MER, bl); + + nullpo_retr(false, mc); + + switch (type) + { + case UDT_SIZE: + mc->base_status.size = (unsigned char) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + mc->base_status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + mc->base_status.max_sp = (unsigned int) val; + break; + case UDT_MASTERCID: + mc->mercenary.char_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + mc->base_status.size = (unsigned char) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + mc->ud.canmove_tick = val; + break; + case UDT_STR: + mc->base_status.str = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_AGI: + mc->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_VIT: + mc->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_INT: + mc->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_DEX: + mc->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_LUK: + mc->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_ATKRANGE: + mc->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + mc->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + mc->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + mc->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + mc->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + mc->base_status.def = (defType) val; + break; + case UDT_MDEF: + mc->base_status.mdef = (defType) val; + break; + case UDT_HIT: + mc->base_status.hit = (short) val; + break; + case UDT_FLEE: + mc->base_status.flee = (short) val; + break; + case UDT_PDODGE: + mc->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + mc->base_status.cri = (short) val; + break; + case UDT_RACE: + mc->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + mc->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + mc->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + mc->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + mc->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + mc->base_status.dmotion = (unsigned short) val; + break; + case UDT_MERC_KILLCOUNT: + mc->mercenary.kill_count = (unsigned int) val; + break; + case UDT_LIFETIME: + mc->mercenary.life_time = (unsigned int) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for mercenary unit.\n", udtype); + script_pushint(st, 0); + return false; + } + + clif->mercenary_info(map->charid2sd(mc->mercenary.char_id)); + clif->mercenary_skillblock(map->charid2sd(mc->mercenary.char_id)); + } + break; + case BL_ELEM: + { + struct elemental_data *ed = BL_UCAST(BL_ELEM, bl); + + nullpo_retr(false, ed); + + switch (type) + { + case UDT_SIZE: + ed->base_status.size = (unsigned char) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + ed->base_status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + ed->base_status.max_sp = (unsigned int) val; + break; + case UDT_MASTERCID: + ed->elemental.char_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + ed->base_status.speed = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + ed->ud.canmove_tick = val; + break; + case UDT_STR: + ed->base_status.str = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_AGI: + ed->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_VIT: + ed->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_INT: + ed->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_DEX: + ed->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_LUK: + ed->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_ATKRANGE: + ed->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + ed->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + ed->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + ed->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + ed->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + ed->base_status.def = (defType) val; + break; + case UDT_MDEF: + ed->base_status.mdef = (defType) val; + break; + case UDT_HIT: + ed->base_status.hit = (short) val; + break; + case UDT_FLEE: + ed->base_status.flee = (short) val; + break; + case UDT_PDODGE: + ed->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + ed->base_status.cri = (short) val; + break; + case UDT_RACE: + ed->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + ed->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + ed->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + ed->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + ed->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + ed->base_status.dmotion = (unsigned short) val; + break; + case UDT_LIFETIME: + ed->elemental.life_time = val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for elemental unit.\n", udtype); + script_pushint(st, 0); + return false; + } + clif->elemental_info(ed->master); + } + break; + case BL_NPC: + { + struct npc_data *nd = BL_UCAST(BL_NPC, bl); + + nullpo_retr(false, nd); + + switch (type) + { + case UDT_SIZE: + nd->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + nd->level = (unsigned short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + nd->status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + nd->status.max_sp = (unsigned int) val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_CLASS: + npc->setclass(nd, (short) val); + break; + case UDT_SPEED: + nd->speed = (short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_STR: + nd->status.str = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_AGI: + nd->status.agi = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_VIT: + nd->status.vit = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_INT: + nd->status.int_ = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_DEX: + nd->status.dex = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_LUK: + nd->status.luk = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_STATPOINT: + nd->stat_point = (unsigned short) val; + break; + case UDT_ATKRANGE: + nd->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + nd->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + nd->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + nd->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + nd->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + nd->status.def = (defType) val; + break; + case UDT_MDEF: + nd->status.mdef = (defType) val; + break; + case UDT_HIT: + nd->status.hit = (short) val; + break; + case UDT_FLEE: + nd->status.flee = (short) val; + break; + case UDT_PDODGE: + nd->status.flee2 = (short) val; + break; + case UDT_CRIT: + nd->status.cri = (short) val; + break; + case UDT_RACE: + nd->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + nd->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + nd->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + nd->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + nd->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + nd->status.dmotion = (unsigned short) val; + break; + case UDT_SEX: + nd->vd.sex = (char)val; + npc->refresh(nd); + break; + case UDT_HAIRSTYLE: + clif->changelook(bl, LOOK_HAIR, val); + break; + case UDT_HAIRCOLOR: + clif->changelook(bl, LOOK_HAIR_COLOR, val); + break; + case UDT_HEADBOTTOM: + clif->changelook(bl, LOOK_HEAD_BOTTOM, val); + break; + case UDT_HEADMIDDLE: + clif->changelook(bl, LOOK_HEAD_MID, val); + break; + case UDT_HEADTOP: + clif->changelook(bl, LOOK_HEAD_TOP, val); + break; + case UDT_CLOTHCOLOR: + clif->changelook(bl, LOOK_CLOTHES_COLOR, val); + break; + case UDT_SHIELD: + clif->changelook(bl, LOOK_SHIELD, val); + break; + case UDT_WEAPON: + clif->changelook(bl, LOOK_WEAPON, val); + break; + case UDT_ROBE: + clif->changelook(bl, LOOK_ROBE, val); + break; + case UDT_BODY2: + clif->changelook(bl, LOOK_BODY2, val); + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + default: + ShowError("buildin_setunitdata: Unknown object!\n"); + script_pushint(st, 0); + return false; + } // end of bl->type switch + + script_pushint(st, 1); + return true; +} + +/** + * Retrieves real-time data for a game object. + * Getunitdata <GUID>,<DataType>{,<Variable>} + * @param1 GUID Game object unique Id. + * @param2 DataType Type of Data to be set for the unit. + * @param3 Variable array reference to store data into. (used for UDT_MAPIDXY) + * @return 0 on failure, <value> on success + */ +BUILDIN(getunitdata) +{ + struct block_list *bl; + const char *udtype = NULL; + const struct map_session_data *sd = NULL; + int type = 0; + char* name = NULL; + struct script_data *data = script_hasdata(st,4)?script_getdata(st, 4):NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_getunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + type = script_getnum(st, 3); + + /* Type check */ + if (type < UDT_TYPE || type >= UDT_MAX) { + ShowError("buildin_getunitdata: Invalid unit data type %d provided.\n", type); + script_pushint(st, 0); + return false; + } + + /* Argument checks */ + if (type == UDT_MAPIDXY) { + if (data == NULL || !data_isreference(data)) { + ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n"); + script_pushint(st, 0); + return false; + } + + name = reference_getname(data); + + if (not_server_variable(*name)) { + sd = script->rid2sd(st); + if (sd == NULL) { + ShowWarning("buildin_getunitdata: Player not attached! Cannot use player variable %s.\n",name); + script_pushint(st, 0); + return true;// no player attached + } + } + } + +#define getunitdata_sub(idx__,var__) script->setd_sub(st,NULL,name,(idx__),(void *)h64BPTRSIZE((int)(var__)),data->ref); + + switch (bl->type) { + case BL_MOB: + { + const struct mob_data *md = BL_UCAST(BL_MOB, bl); + + nullpo_retr(false, md); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_MOB); break; + case UDT_SIZE: script_pushint(st, md->status.size); break; + case UDT_LEVEL: script_pushint(st, md->level); break; + case UDT_HP: script_pushint(st, md->status.hp); break; + case UDT_MAXHP: script_pushint(st, md->status.max_hp); break; + case UDT_SP: script_pushint(st, md->status.sp); break; + case UDT_MAXSP: script_pushint(st, md->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, md->bl.m); + getunitdata_sub(1, md->bl.x); + getunitdata_sub(2, md->bl.y); + break; + case UDT_SPEED: script_pushint(st, md->status.speed); break; + case UDT_MODE: script_pushint(st, md->status.mode); break; + case UDT_AI: script_pushint(st, md->special_state.ai); break; + case UDT_SCOPTION: script_pushint(st, md->sc.option); break; + case UDT_SEX: script_pushint(st, md->vd->sex); break; + case UDT_CLASS: script_pushint(st, md->vd->class); break; + case UDT_HAIRSTYLE: script_pushint(st, md->vd->hair_style); break; + case UDT_HAIRCOLOR: script_pushint(st, md->vd->hair_color); break; + case UDT_HEADBOTTOM: script_pushint(st, md->vd->head_bottom); break; + case UDT_HEADMIDDLE: script_pushint(st, md->vd->head_mid); break; + case UDT_HEADTOP: script_pushint(st, md->vd->head_top); break; + case UDT_CLOTHCOLOR: script_pushint(st, md->vd->cloth_color); break; + case UDT_SHIELD: script_pushint(st, md->vd->shield); break; + case UDT_WEAPON: script_pushint(st, md->vd->weapon); break; + case UDT_LOOKDIR: script_pushint(st, md->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, md->ud.canmove_tick); break; + case UDT_STR: script_pushint(st, md->status.str); break; + case UDT_AGI: script_pushint(st, md->status.agi); break; + case UDT_VIT: script_pushint(st, md->status.vit); break; + case UDT_INT: script_pushint(st, md->status.int_); break; + case UDT_DEX: script_pushint(st, md->status.dex); break; + case UDT_LUK: script_pushint(st, md->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, md->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, md->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, md->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, md->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, md->status.matk_max); break; + case UDT_DEF: script_pushint(st, md->status.def); break; + case UDT_MDEF: script_pushint(st, md->status.mdef); break; + case UDT_HIT: script_pushint(st, md->status.hit); break; + case UDT_FLEE: script_pushint(st, md->status.flee); break; + case UDT_PDODGE: script_pushint(st, md->status.flee2); break; + case UDT_CRIT: script_pushint(st, md->status.cri); break; + case UDT_RACE: script_pushint(st, md->status.race); break; + case UDT_ELETYPE: script_pushint(st, md->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, md->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, md->status.amotion); break; + case UDT_ADELAY: script_pushint(st, md->status.adelay); break; + case UDT_DMOTION: script_pushint(st, md->status.dmotion); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_HOM: + { + const struct homun_data *hd = BL_UCAST(BL_HOM, bl); + + nullpo_retr(false, hd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_HOM); break; + case UDT_SIZE: script_pushint(st, hd->base_status.size); break; + case UDT_LEVEL: script_pushint(st, hd->homunculus.level); break; + case UDT_HP: script_pushint(st, hd->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, hd->base_status.max_hp); break; + case UDT_SP: script_pushint(st, hd->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, hd->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, hd->bl.m); + getunitdata_sub(1, hd->bl.x); + getunitdata_sub(2, hd->bl.y); + break; + case UDT_SPEED: script_pushint(st, hd->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, hd->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, hd->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, hd->base_status.mode); break; + case UDT_STR: script_pushint(st, hd->base_status.str); break; + case UDT_AGI: script_pushint(st, hd->base_status.agi); break; + case UDT_VIT: script_pushint(st, hd->base_status.vit); break; + case UDT_INT: script_pushint(st, hd->base_status.int_); break; + case UDT_DEX: script_pushint(st, hd->base_status.dex); break; + case UDT_LUK: script_pushint(st, hd->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, hd->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, hd->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, hd->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, hd->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, hd->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, hd->base_status.def); break; + case UDT_MDEF: script_pushint(st, hd->base_status.mdef); break; + case UDT_HIT: script_pushint(st, hd->base_status.hit); break; + case UDT_FLEE: script_pushint(st, hd->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, hd->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, hd->base_status.cri); break; + case UDT_RACE: script_pushint(st, hd->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, hd->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, hd->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, hd->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, hd->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, hd->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, hd->homunculus.char_id); break; + case UDT_HUNGER: script_pushint(st, hd->homunculus.hunger); break; + case UDT_INTIMACY: script_pushint(st, hd->homunculus.intimacy); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Homunculus unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_PET: + { + const struct pet_data *pd = BL_UCAST(BL_PET, bl); + + nullpo_retr(false, pd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_PET); break; + case UDT_SIZE: script_pushint(st, pd->status.size); break; + case UDT_LEVEL: script_pushint(st, pd->pet.level); break; + case UDT_HP: script_pushint(st, pd->status.hp); break; + case UDT_MAXHP: script_pushint(st, pd->status.max_hp); break; + case UDT_SP: script_pushint(st, pd->status.sp); break; + case UDT_MAXSP: script_pushint(st, pd->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, pd->bl.m); + getunitdata_sub(1, pd->bl.x); + getunitdata_sub(2, pd->bl.y); + break; + case UDT_SPEED: script_pushint(st, pd->status.speed); break; + case UDT_LOOKDIR: script_pushint(st, pd->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, pd->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, pd->status.mode); break; + case UDT_STR: script_pushint(st, pd->status.str); break; + case UDT_AGI: script_pushint(st, pd->status.agi); break; + case UDT_VIT: script_pushint(st, pd->status.vit); break; + case UDT_INT: script_pushint(st, pd->status.int_); break; + case UDT_DEX: script_pushint(st, pd->status.dex); break; + case UDT_LUK: script_pushint(st, pd->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, pd->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, pd->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, pd->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, pd->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, pd->status.matk_max); break; + case UDT_DEF: script_pushint(st, pd->status.def); break; + case UDT_MDEF: script_pushint(st, pd->status.mdef); break; + case UDT_HIT: script_pushint(st, pd->status.hit); break; + case UDT_FLEE: script_pushint(st, pd->status.flee); break; + case UDT_PDODGE: script_pushint(st, pd->status.flee2); break; + case UDT_CRIT: script_pushint(st, pd->status.cri); break; + case UDT_RACE: script_pushint(st, pd->status.race); break; + case UDT_ELETYPE: script_pushint(st, pd->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, pd->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, pd->status.amotion); break; + case UDT_ADELAY: script_pushint(st, pd->status.adelay); break; + case UDT_DMOTION: script_pushint(st, pd->status.dmotion); break; + case UDT_MASTERAID: script_pushint(st, pd->pet.account_id); break; + case UDT_HUNGER: script_pushint(st, pd->pet.hungry); break; + case UDT_INTIMACY: script_pushint(st, pd->pet.intimate); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Pet unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_MER: + { + const struct mercenary_data *mc = BL_UCAST(BL_MER, bl); + + nullpo_retr(false, mc); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_MER); break; + case UDT_SIZE: script_pushint(st, mc->base_status.size); break; + case UDT_HP: script_pushint(st, mc->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, mc->base_status.max_hp); break; + case UDT_SP: script_pushint(st, mc->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, mc->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, mc->bl.m); + getunitdata_sub(1, mc->bl.x); + getunitdata_sub(2, mc->bl.y); + break; + case UDT_SPEED: script_pushint(st, mc->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, mc->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, mc->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, mc->base_status.mode); break; + case UDT_STR: script_pushint(st, mc->base_status.str); break; + case UDT_AGI: script_pushint(st, mc->base_status.agi); break; + case UDT_VIT: script_pushint(st, mc->base_status.vit); break; + case UDT_INT: script_pushint(st, mc->base_status.int_); break; + case UDT_DEX: script_pushint(st, mc->base_status.dex); break; + case UDT_LUK: script_pushint(st, mc->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, mc->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, mc->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, mc->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, mc->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, mc->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, mc->base_status.def); break; + case UDT_MDEF: script_pushint(st, mc->base_status.mdef); break; + case UDT_HIT: script_pushint(st, mc->base_status.hit); break; + case UDT_FLEE: script_pushint(st, mc->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, mc->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, mc->base_status.cri); break; + case UDT_RACE: script_pushint(st, mc->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, mc->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, mc->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, mc->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, mc->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, mc->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, mc->mercenary.char_id); break; + case UDT_MERC_KILLCOUNT: script_pushint(st, mc->mercenary.kill_count); break; + case UDT_LIFETIME: script_pushint(st, mc->mercenary.life_time); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mercenary unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_ELEM: + { + const struct elemental_data *ed = BL_UCAST(BL_ELEM, bl); + + nullpo_retr(false, ed); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_ELEM); break; + case UDT_SIZE: script_pushint(st, ed->base_status.size); break; + case UDT_HP: script_pushint(st, ed->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, ed->base_status.max_hp); break; + case UDT_SP: script_pushint(st, ed->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, ed->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, ed->bl.m); + getunitdata_sub(1, ed->bl.x); + getunitdata_sub(2, ed->bl.y); + break; + case UDT_SPEED: script_pushint(st, ed->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, ed->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, ed->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, ed->base_status.mode); break; + case UDT_STR: script_pushint(st, ed->base_status.str); break; + case UDT_AGI: script_pushint(st, ed->base_status.agi); break; + case UDT_VIT: script_pushint(st, ed->base_status.vit); break; + case UDT_INT: script_pushint(st, ed->base_status.int_); break; + case UDT_DEX: script_pushint(st, ed->base_status.dex); break; + case UDT_LUK: script_pushint(st, ed->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, ed->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, ed->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, ed->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, ed->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, ed->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, ed->base_status.def); break; + case UDT_MDEF: script_pushint(st, ed->base_status.mdef); break; + case UDT_HIT: script_pushint(st, ed->base_status.hit); break; + case UDT_FLEE: script_pushint(st, ed->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, ed->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, ed->base_status.cri); break; + case UDT_RACE: script_pushint(st, ed->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, ed->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, ed->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, ed->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, ed->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, ed->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, ed->elemental.char_id); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Elemental unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_NPC: + { + const struct npc_data *nd = BL_UCAST(BL_NPC, bl); + + nullpo_retr(false, nd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_NPC); break; + case UDT_SIZE: script_pushint(st, nd->status.size); break; + case UDT_HP: script_pushint(st, nd->status.hp); break; + case UDT_MAXHP: script_pushint(st, nd->status.max_hp); break; + case UDT_SP: script_pushint(st, nd->status.sp); break; + case UDT_MAXSP: script_pushint(st, nd->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, bl->m); + getunitdata_sub(1, bl->x); + getunitdata_sub(2, bl->y); + break; + case UDT_SPEED: script_pushint(st, nd->status.speed); break; + case UDT_LOOKDIR: script_pushint(st, nd->ud->dir); break; + case UDT_CANMOVETICK: script_pushint(st, nd->ud->canmove_tick); break; + case UDT_MODE: script_pushint(st, nd->status.mode); break; + case UDT_STR: script_pushint(st, nd->status.str); break; + case UDT_AGI: script_pushint(st, nd->status.agi); break; + case UDT_VIT: script_pushint(st, nd->status.vit); break; + case UDT_INT: script_pushint(st, nd->status.int_); break; + case UDT_DEX: script_pushint(st, nd->status.dex); break; + case UDT_LUK: script_pushint(st, nd->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, nd->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, nd->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, nd->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, nd->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, nd->status.matk_max); break; + case UDT_DEF: script_pushint(st, nd->status.def); break; + case UDT_MDEF: script_pushint(st, nd->status.mdef); break; + case UDT_HIT: script_pushint(st, nd->status.hit); break; + case UDT_FLEE: script_pushint(st, nd->status.flee); break; + case UDT_PDODGE: script_pushint(st, nd->status.flee2); break; + case UDT_CRIT: script_pushint(st, nd->status.cri); break; + case UDT_RACE: script_pushint(st, nd->status.race); break; + case UDT_ELETYPE: script_pushint(st, nd->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, nd->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, nd->status.amotion); break; + case UDT_ADELAY: script_pushint(st, nd->status.adelay); break; + case UDT_DMOTION: script_pushint(st, nd->status.dmotion); break; + case UDT_SEX: script_pushint(st, nd->vd.sex); break; + case UDT_CLASS: script_pushint(st, nd->vd.class); break; + case UDT_HAIRSTYLE: script_pushint(st, nd->vd.hair_style); break; + case UDT_HAIRCOLOR: script_pushint(st, nd->vd.hair_color); break; + case UDT_HEADBOTTOM: script_pushint(st, nd->vd.head_bottom); break; + case UDT_HEADMIDDLE: script_pushint(st, nd->vd.head_mid); break; + case UDT_HEADTOP: script_pushint(st, nd->vd.head_top); break; + case UDT_CLOTHCOLOR: script_pushint(st, nd->vd.cloth_color); break; + case UDT_SHIELD: script_pushint(st, nd->vd.shield); break; + case UDT_WEAPON: script_pushint(st, nd->vd.weapon); break; + case UDT_ROBE: script_pushint(st, nd->vd.robe); break; + case UDT_BODY2: script_pushint(st, nd->vd.body_style); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + default: + ShowError("buildin_getunitdata: Unknown object!\n"); + script_pushint(st, 0); + return false; + } // end of bl->type switch + +#undef getunitdata_sub + + return false; +} + +/** + * Gets the name of a Unit. + * Supported types are [MOB|HOM|PET|NPC]. + * MER and ELEM don't support custom names. + * + * @command getunitname <GUID>; + * @param GUID Game Object Unique ID. + * @return boolean or Name of the game object. + */ +BUILDIN(getunitname) +{ + const struct block_list* bl = NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_getunitname: Error in finding object with given game ID %d!\n", script_getnum(st, 2)); + script_pushconststr(st, "Unknown"); + return false; + } + + script_pushstrcopy(st, status->get_name(bl)); + + return true; +} + +/** + * Changes the name of a bl. + * Supported types are [MOB|HOM|PET]. + * For NPC see 'setnpcdisplay', MER and ELEM don't support custom names. + * + * @command setunitname <GUID>,<name>; + * @param GUID Game object unique ID. + * @param Name as string. + * @return boolean. + */ +BUILDIN(setunitname) +{ + struct block_list* bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_setunitname: Game object with ID %d was not found!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + switch (bl->type) { + case BL_MOB: + { + struct mob_data *md = BL_UCAST(BL_MOB, bl); + if (md == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_MOB!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(md->name, script_getstr(st, 3), NAME_LENGTH); + } + break; + case BL_HOM: + { + struct homun_data *hd = BL_UCAST(BL_HOM, bl); + if (hd == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_HOM!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(hd->homunculus.name, script_getstr(st, 3), NAME_LENGTH); + } + break; + case BL_PET: + { + struct pet_data *pd = BL_UCAST(BL_PET, bl); + if (pd == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_PET!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(pd->pet.name, script_getstr(st, 3), NAME_LENGTH); + } + break; + default: + script_pushint(st, 0); + ShowWarning("buildin_setunitname: Unknown object type!\n"); + return false; + } + + script_pushint(st, 1); + clif->charnameack(0, bl); // Send update to client. + + return true; +} + /// Makes the unit walk to target position or target id /// Returns if it was successfull /// @@ -17410,6 +20137,54 @@ BUILDIN(getvariableofnpc) return true; } +BUILDIN(getvariableofpc) +{ + const char* name; + struct script_data* data = script_getdata(st, 2); + struct map_session_data *sd = map->id2sd(script_getnum(st, 3)); + + if (!data_isreference(data)) { + ShowError("script:getvariableofpc: not a variable\n"); + script->reportdata(data); + script_pushnil(st); + st->state = END; + return false; + } + + name = reference_getname(data); + + switch (*name) + { + case '$': + case '.': + case '\'': + ShowError("script:getvariableofpc: illegal scope (not pc variable)\n"); + script->reportdata(data); + script_pushnil(st); + st->state = END; + return false; + } + + if (sd == NULL) + { + // player not found, return default value + if (script_hasdata(st, 4)) { + script_pushcopy(st, 4); + } else if (is_string_variable(name)) { + script_pushconststr(st, ""); + } else { + script_pushint(st, 0); + } + return true; + } + + if (!sd->regs.vars) + sd->regs.vars = i64db_alloc(DB_OPT_RELEASE_DATA); + + script->push_val(st->stack, C_NAME, reference_getuid(data), &sd->regs); + return true; +} + /// Opens a warp portal. /// Has no "portal opening" effect/sound, it opens the portal immediately. /// @@ -17725,15 +20500,18 @@ BUILDIN(questinfo) quest_id = script_getnum(st, 2); icon = script_getnum(st, 3); - #if PACKETVER >= 20120410 - if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7) - icon = 9999; // Default to nothing if icon id is invalid. - #else - if(icon < 0 || icon > 7) - icon = 0; - else - icon = icon + 1; - #endif +#if PACKETVER >= 20170315 + if (icon < 0 || (icon > 10 && icon != 9999)) + icon = 9999; +#elif PACKETVER >= 20120410 + if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7) + icon = 9999; // Default to nothing if icon id is invalid. +#else + if (icon < 0 || icon > 7) + icon = 0; + else + icon = icon + 1; +#endif qi.quest_id = quest_id; qi.icon = (unsigned char)icon; @@ -17771,19 +20549,21 @@ BUILDIN(setquest) { unsigned short i; int quest_id; + unsigned int time_limit; struct map_session_data *sd = script->rid2sd(st); if (sd == NULL) return true; quest_id = script_getnum(st, 2); + time_limit = script_hasdata(st, 3) ? script_getnum(st, 3) : 0; - quest->add(sd, quest_id); + quest->add(sd, quest_id, time_limit); // If questinfo is set, remove quest bubble once quest is set. - for(i = 0; i < map->list[sd->bl.m].qi_count; i++) { + for (i = 0; i < map->list[sd->bl.m].qi_count; i++) { struct questinfo *qi = &map->list[sd->bl.m].qi_data[i]; - if( qi->quest_id == quest_id ) { + if (qi->quest_id == quest_id) { #if PACKETVER >= 20120410 clif->quest_show_event(sd, &qi->nd->bl, 9999, 0); #else @@ -17925,15 +20705,18 @@ BUILDIN(showevent) } } - #if PACKETVER >= 20120410 - if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7) - icon = 9999; // Default to nothing if icon id is invalid. - #else - if(icon < 0 || icon > 7) - icon = 0; - else - icon = icon + 1; - #endif +#if PACKETVER >= 20170315 + if (icon < 0 || (icon > 10 && icon != 9999)) + icon = 9999; +#elif PACKETVER >= 20120410 + if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7) + icon = 9999; // Default to nothing if icon id is invalid. +#else + if (icon < 0 || icon > 7) + icon = 0; + else + icon = icon + 1; +#endif clif->quest_show_event(sd, &nd->bl, icon, color); return true; @@ -18904,12 +21687,16 @@ BUILDIN(makerune) BUILDIN(hascashmount) { struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; - if( sd->sc.data[SC_ALL_RIDING] ) - script_pushint(st,1); - else - script_pushint(st,0); + + if (sd->sc.data[SC_ALL_RIDING]) { + script_pushint(st, 1); + } else { + script_pushint(st, 0); + } + return true; } @@ -18923,18 +21710,22 @@ BUILDIN(hascashmount) BUILDIN(setcashmount) { struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; + if (pc_hasmount(sd)) { clif->msgtable(sd, MSG_REINS_CANT_USE_MOUNTED); - script_pushint(st,0);//can't mount with one of these + script_pushint(st, 0); // Can't mount with one of these } else { - if (sd->sc.data[SC_ALL_RIDING]) + if (sd->sc.data[SC_ALL_RIDING]) { status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); - else - sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, 25, INFINITE_DURATION); - script_pushint(st,1);//in both cases, return 1. + } else { + sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, battle_config.boarding_halter_speed, INFINITE_DURATION); + } + script_pushint(st, 1); // In both cases, return 1. } + return true; } @@ -19087,6 +21878,43 @@ BUILDIN(issit) return true; } +BUILDIN(add_group_command) +{ + AtCommandInfo *acmd_d; + struct atcmd_binding_data *bcmd_d; + GroupSettings *group; + int group_index; + const char *atcmd = script_getstr(st, 2); + int group_id = script_getnum(st, 3); + bool self_perm = (script_getnum(st, 4) == 1); + bool char_perm = (script_getnum(st, 5) == 1); + + if (!pcg->exists(group_id)) { + ShowWarning("script:add_group_command: group does not exist: %i\n", group_id); + script_pushint(st, 0); + return false; + } + + group = pcg->id2group(group_id); + group_index = pcg->get_idx(group); + + if ((bcmd_d = atcommand->get_bind_byname(atcmd)) != NULL) { + bcmd_d->at_groups[group_index] = self_perm; + bcmd_d->char_groups[group_index] = char_perm; + script_pushint(st, 1); + return true; + } else if ((acmd_d = atcommand->get_info_byname(atcmd)) != NULL) { + acmd_d->at_groups[group_index] = self_perm; + acmd_d->char_groups[group_index] = char_perm; + script_pushint(st, 1); + return true; + } + + ShowWarning("script:add_group_command: command does not exist: %s\n", atcmd); + script_pushint(st, 0); + return false; +} + /** * @commands (script based) **/ @@ -19136,6 +21964,8 @@ BUILDIN(bindatcmd) atcommand->binding[i]->group_lv = group_lv; atcommand->binding[i]->group_lv_char = group_lv_char; atcommand->binding[i]->log = log; + CREATE(atcommand->binding[i]->at_groups, char, db_size(pcg->db)); + CREATE(atcommand->binding[i]->char_groups, char, db_size(pcg->db)); } return true; @@ -19159,6 +21989,8 @@ BUILDIN(unbindatcmd) ARR_FIND(0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, atcmd) == 0); if( i < atcommand->binding_count ) { int cursor = 0; + aFree(atcommand->binding[i]->at_groups); + aFree(atcommand->binding[i]->char_groups); aFree(atcommand->binding[i]); atcommand->binding[i] = NULL; /* compact the list now that we freed a slot somewhere */ @@ -19221,6 +22053,67 @@ BUILDIN(useatcmd) return true; } +BUILDIN(has_permission) +{ + struct map_session_data *sd; + enum e_pc_permission perm; + + if (script_hasdata(st, 3)) { + sd = map->id2sd(script_getnum(st, 3)); + } else { + sd = script->rid2sd(st); + } + + if (sd == NULL) { + script_pushint(st, 0); + return false; + } + + if (script_isstringtype(st, 2)) { + // to check for plugin permissions + int i = 0, j = -1; + const char *name = script_getstr(st, 2); + for (; i < pcg->permission_count; ++i) { + if (strcmp(pcg->permissions[i].name, name) == 0) { + j = i; + break; + } + } + if (j < 0) { + ShowError("script:has_permission: unknown permission: %s\n", name); + script_pushint(st, 0); + return false; + } + script_pushint(st, pc_has_permission(sd, pcg->permissions[j].permission)); + return true; + } + + // to ckeck for built-in permission + perm = script_getnum(st, 2); + script_pushint(st, pc_has_permission(sd, perm)); + return true; +} + +BUILDIN(can_use_command) +{ + struct map_session_data *sd; + const char *cmd = script_getstr(st, 2); + + if (script_hasdata(st, 3)) { + sd = map->id2sd(script_getnum(st, 3)); + } else { + sd = script->rid2sd(st); + } + + if (sd == NULL) { + script_pushint(st, 0); + return false; + } + + script_pushint(st, pc->can_use_command(sd, cmd)); + return true; +} + /* getrandgroupitem <container_item_id>,<quantity> */ BUILDIN(getrandgroupitem) { @@ -20445,7 +23338,7 @@ BUILDIN(shopcount) */ BUILDIN(channelmes) { - struct map_session_data *sd = script->rid2sd(st); + struct map_session_data *sd = map->id2sd(st->rid); const char *channelname = script_getstr(st, 2); struct channel_data *chan = channel->search(channelname, sd); @@ -20460,6 +23353,57 @@ BUILDIN(channelmes) return true; } +BUILDIN(addchannelhandler) +{ + int i; + struct map_session_data *sd = map->id2sd(st->rid); + const char *channelname = script_getstr(st, 2); + const char *eventname = script_getstr(st, 3); + struct channel_data *chan = channel->search(channelname, sd); + + if (!chan) { + script_pushint(st, 0); + return true; + } + + ARR_FIND(0, MAX_EVENTQUEUE, i, chan->handlers[i][0] == '\0'); + + if (i < MAX_EVENTQUEUE) { + safestrncpy(chan->handlers[i], eventname, EVENT_NAME_LENGTH); //Event enqueued. + script_pushint(st, 1); + return true; + } + + ShowWarning("script:addchannelhandler: too many handlers for channel %s.\n", channelname); + script_pushint(st, 0); + return true; +} + +BUILDIN(removechannelhandler) +{ + int i; + struct map_session_data *sd = map->id2sd(st->rid); + const char *channelname = script_getstr(st, 2); + const char *eventname = script_getstr(st, 3); + struct channel_data *chan = channel->search(channelname, sd); + + if (!chan) { + script_pushint(st, 0); + return true; + } + + for (i = 0; i < MAX_EVENTQUEUE; i++) { + if (strcmp(chan->handlers[i], eventname) == 0) { + chan->handlers[i][0] = '\0'; + script_pushint(st, 1); + return true; + } + } + + script_pushint(st, 0); + return true; +} + /** By Cydh Display script message showscript "<message>"{,<GID>}; @@ -20503,6 +23447,100 @@ BUILDIN(mergeitem) return true; } +// getcalendartime(<day of month>, <day of week>{, <hour>{, <minute>}}); +// Returns the UNIX Timestamp of next ocurrency of given time +BUILDIN(getcalendartime) +{ + struct tm info = { 0 }; + int day_of_month = script_hasdata(st, 4) ? script_getnum(st, 4) : -1; + int day_of_week = script_hasdata(st, 5) ? script_getnum(st, 5) : -1; + int year = date_get_year(); + int month = date_get_month(); + int day = date_get_day(); + int cur_hour = date_get_hour(); + int cur_min = date_get_min(); + int hour = script_getnum(st, 2); + int minute = script_getnum(st, 3); + + info.tm_sec = 0; + info.tm_min = minute; + info.tm_hour = hour; + info.tm_mday = day; + info.tm_mon = month - 1; + info.tm_year = year - 1900; + + if (day_of_month > -1 && day_of_week > -1) { + ShowError("script:getcalendartime: You must only specify a day_of_week or a day_of_month, not both\n"); + script_pushint(st, -1); + return false; + } + if (day_of_month > -1 && (day_of_month < 1 || day_of_month > 31)) { + ShowError("script:getcalendartime: Day of Month in invalid range. Must be between 1 and 31.\n"); + script_pushint(st, -1); + return false; + } + if (day_of_week > -1 && (day_of_week < 0 || day_of_week > 6)) { + ShowError("script:getcalendartime: Day of Week in invalid range. Must be between 0 and 6.\n"); + script_pushint(st, -1); + return false; + } + if (hour > -1 && (hour > 23)) { + ShowError("script:getcalendartime: Hour in invalid range. Must be between 0 and 23.\n"); + script_pushint(st, -1); + return false; + } + if (minute > -1 && (minute > 59)) { + ShowError("script:getcalendartime: Minute in invalid range. Must be between 0 and 59.\n"); + script_pushint(st, -1); + return false; + } + if (hour == -1 || minute == -1) { + ShowError("script:getcalendartime: Minutes and Hours are required\n"); + script_pushint(st, -1); + return false; + } + + if (day_of_month > -1) { + if (day_of_month < day) { // Next Month + info.tm_mon++; + } else if (day_of_month == day) { // Today + if (hour < cur_hour || (hour == cur_hour && minute < cur_min)) { // But past time, next month + info.tm_mon++; + } + } + + // Loops until month has finding a month that has day_of_month + do { + time_t t; + struct tm *lt; + info.tm_mday = day_of_month; + t = mktime(&info); + lt = localtime(&t); + info = *lt; + } while (info.tm_mday != day_of_month); + } else if (day_of_week > -1) { + int cur_wday = date_get_dayofweek(); + + if (day_of_week > cur_wday) { // This week + info.tm_mday += (day_of_week - cur_wday); + } else if (day_of_week == cur_wday) { // Today + if (hour < cur_hour || (hour == cur_hour && minute <= cur_min)) { + info.tm_mday += 7; // Next week + } + } else if (day_of_week < cur_wday) { // Next week + info.tm_mday += (7 - cur_wday + day_of_week); + } + } else if (day_of_week == -1 && day_of_month == -1) { // Next occurence of hour/min + if (hour < cur_hour || (hour == cur_hour && minute < cur_min)) { + info.tm_mday++; + } + } + + script_pushint(st, mktime(&info)); + + return true; +} + /** place holder for the translation macro **/ BUILDIN(_) { @@ -20515,6 +23553,50 @@ BUILDIN(activatepset); BUILDIN(deactivatepset); BUILDIN(deletepset); +enum dressroom_mode { + DRESSROOM_CLOSE = 0, + DRESSROOM_OPEN = 1 +}; + +/** + * dressroom({<enum dressroom_mode>}); + */ +BUILDIN(dressroom) +{ +#if PACKETVER >= 20150513 + struct map_session_data *sd = script->rid2sd(st); + enum dressroom_mode mode = DRESSROOM_OPEN; + + if (sd == NULL) { + return false; + } + + if (script_hasdata(st, 2)) { + mode = script_getnum(st, 2); + } + + switch (mode) { + case DRESSROOM_OPEN: + clif->dressroom_open(sd, 1); + break; + case DRESSROOM_CLOSE: + clif->dressroom_open(sd, 0); + break; + default: + ShowWarning("script:dressroom: unknown mode (%u).\n", mode); + script_pushint(st, 0); + return false; + } + + script_pushint(st, 1); + return true; +#else + ShowError("The dressing room works only with packet version >= 20150513"); + script_pushint(st, 0); + return false; +#endif +} + BUILDIN(pcre_match) { const char *input = script_getstr(st, 2); @@ -20566,6 +23648,181 @@ BUILDIN(navigateto) #endif } +bool rodex_sendmail_sub(struct script_state* st, struct rodex_message *msg) +{ + const char *sender_name, *title, *body; + + if (!strcmp(script->getfuncname(st), "rodex_sendmail_acc2")) + msg->receiver_accountid = script_getnum(st, 2); + else + msg->receiver_id = script_getnum(st, 2); + + sender_name = script_getstr(st, 3); + if (strlen(sender_name) >= NAME_LENGTH) { + ShowError("script:rodex_sendmail: Sender name must not be bigger than %d!\n", NAME_LENGTH - 1); + return false; + } + safestrncpy(msg->sender_name, sender_name, NAME_LENGTH); + + title = script_getstr(st, 4); + if (strlen(title) >= RODEX_TITLE_LENGTH) { + ShowError("script:rodex_sendmail: Mail Title must not be bigger than %d!\n", RODEX_TITLE_LENGTH - 1); + return false; + } + safestrncpy(msg->title, title, RODEX_TITLE_LENGTH); + + body = script_getstr(st, 5); + if (strlen(body) >= MAIL_BODY_LENGTH) { + ShowError("script:rodex_sendmail: Mail Message must not be bigger than %d!\n", RODEX_BODY_LENGTH - 1); + return false; + } + safestrncpy(msg->body, body, MAIL_BODY_LENGTH); + + if (script_hasdata(st, 6)) { + msg->zeny = script_getnum(st, 6); + if (msg->zeny < 0 || msg->zeny > MAX_ZENY) { + ShowError("script:rodex_sendmail: Invalid Zeny value %"PRId64"!\n", msg->zeny); + return false; + } + } + + return true; +} + +BUILDIN(rodex_sendmail) +{ + struct rodex_message msg = { 0 }; + int item_count = 0, i = 0, param = 7; + + // Common parameters - sender/message/zeny + if (rodex_sendmail_sub(st, &msg) == false) + return false; + + // Item list + while (i < RODEX_MAX_ITEM && script_hasdata(st, param)) { + struct item_data *idata; + + if (!script_hasdata(st, param + 1)) { + ShowError("script:rodex_sendmail: Missing Item %d amount!\n", (i + 1)); + return false; + } + + ++item_count; + if (data_isstring(script_getdata(st, param)) == false) { + int itemid = script_getnum(st, param); + + if (itemdb->exists(itemid) == false) { + ShowError("script:rodex_sendmail: Unknown item ID %d.\n", itemid); + return false; + } + + idata = itemdb->search(itemid); + } + else { + ShowError("script:rodex_sendmail: Item %d must be passed as Number.\n", (i + 1)); + return false; + } + + msg.items[i].item.nameid = idata->nameid; + msg.items[i].item.amount = script_getnum(st, (param + 1)); + msg.items[i].item.identify = 1; + + ++i; + param += 2; + } + msg.items_count = item_count; + + msg.type = MAIL_TYPE_NPC; + if (msg.zeny > 0) + msg.type |= MAIL_TYPE_ZENY; + if (msg.items_count > 0) + msg.type |= MAIL_TYPE_ITEM; + msg.send_date = (int)time(NULL); + msg.expire_date = (int)time(NULL) + RODEX_EXPIRE; + + intif->rodex_sendmail(&msg); + + return true; +} + +BUILDIN(rodex_sendmail2) +{ + struct rodex_message msg = { 0 }; + int item_count = 0, i = 0, param = 7; + + // Common parameters - sender/message/zeny + if (rodex_sendmail_sub(st, &msg) == false) + return false; + + // Item list + while (i < RODEX_MAX_ITEM && script_hasdata(st, param)) { + struct item_data *idata; + int j; + + // Tests + if (!script_hasdata(st, param + 1)) { + ShowError("script:rodex_sendmail: Missing Item %d amount!\n", (i + 1)); + return false; + } + if (!script_hasdata(st, param + 2)) { + ShowError("script:rodex_sendmail: Missing Item %d refine!\n", (i + 1)); + return false; + } + if (!script_hasdata(st, param + 3)) { + ShowError("script:rodex_sendmail: Missing Item %d attribute!\n", (i + 1)); + return false; + } + for (j = 0; j < MAX_SLOTS; ++j) { + if (!script_hasdata(st, param + 4 + j)) { + ShowError("script:rodex_sendmail: Missing Item %d card %d!\n", (i + 1), j); + return false; + } + } + + // Set data to message + ++item_count; + if (data_isstring(script_getdata(st, param)) == false) { + int itemid = script_getnum(st, param); + + if (itemdb->exists(itemid) == false) { + ShowError("script:rodex_sendmail: Unknown item ID %d.\n", itemid); + return false; + } + + idata = itemdb->search(itemid); + } else { + ShowError("script:rodex_sendmail: Item %d must be passed as Number.\n", (i + 1)); + return false; + } + + msg.items[i].item.nameid = idata->nameid; + msg.items[i].item.amount = script_getnum(st, (param + 1)); + msg.items[i].item.refine = script_getnum(st, (param + 2)); + msg.items[i].item.attribute = script_getnum(st, (param + 3)); + msg.items[i].item.identify = 1; + + for (j = 0; j < MAX_SLOTS; ++j) { + msg.items[i].item.card[j] = script_getnum(st, param + 4 + j); + } + + ++i; + param += 4 + MAX_SLOTS; + } + msg.items_count = item_count; + + msg.type = MAIL_TYPE_NPC; + if (msg.zeny > 0) + msg.type |= MAIL_TYPE_ZENY; + if (msg.items_count > 0) + msg.type |= MAIL_TYPE_ITEM; + msg.send_date = (int)time(NULL); + msg.expire_date = (int)time(NULL) + RODEX_EXPIRE; + + intif->rodex_sendmail(&msg); + + return true; +} + /** * Adds a built-in script function. * @@ -20746,8 +24003,8 @@ void script_parse_builtin(void) { BUILDIN_DEF(warp,"sii?"), BUILDIN_DEF(areawarp,"siiiisii??"), BUILDIN_DEF(warpchar,"siii"), // [LuzZza] - BUILDIN_DEF(warpparty,"siii?"), // [Fredzilla] [Paradox924X] - BUILDIN_DEF(warpguild,"siii"), // [Fredzilla] + BUILDIN_DEF(warpparty,"siii??"), // [Fredzilla] [Paradox924X] [Jedzkie] [Dastgir] + BUILDIN_DEF(warpguild,"siii?"), // [Fredzilla] BUILDIN_DEF(setlook,"ii"), BUILDIN_DEF(changelook,"ii"), // Simulates but don't Store it BUILDIN_DEF2(__setr,"set","rv"), @@ -20755,6 +24012,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(cleararray,"rvi"), BUILDIN_DEF(copyarray,"rri"), BUILDIN_DEF(getarraysize,"r"), + BUILDIN_DEF(getarrayindex,"r"), BUILDIN_DEF(deletearray,"r?"), BUILDIN_DEF(getelementofarray,"ri"), BUILDIN_DEF(getitem,"vi?"), @@ -20763,6 +24021,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(getnameditem,"vv"), BUILDIN_DEF2(grouprandomitem,"groupranditem","i"), BUILDIN_DEF(makeitem,"visii"), + BUILDIN_DEF(makeitem2,"viiiiiiii????"), BUILDIN_DEF(delitem,"vi?"), BUILDIN_DEF(delitem2,"viiiiiiii?"), BUILDIN_DEF2(enableitemuse,"enable_items",""), @@ -20787,8 +24046,8 @@ void script_parse_builtin(void) { BUILDIN_DEF(getguildmaster,"i"), BUILDIN_DEF(getguildmasterid,"i"), BUILDIN_DEF(getguildmember,"i?"), - BUILDIN_DEF(strcharinfo,"i"), - BUILDIN_DEF(strnpcinfo,"i"), + BUILDIN_DEF(strcharinfo,"i??"), + BUILDIN_DEF(strnpcinfo,"i??"), BUILDIN_DEF(charid2rid,"i"), BUILDIN_DEF(getequipid,"i"), BUILDIN_DEF(getequipname,"i"), @@ -20801,7 +24060,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(getequipisidentify,"i"), BUILDIN_DEF(getequiprefinerycnt,"i"), BUILDIN_DEF(getequipweaponlv,"i"), - BUILDIN_DEF(getequippercentrefinery,"i"), + BUILDIN_DEF(getequippercentrefinery,"i?"), BUILDIN_DEF(successrefitem,"i?"), BUILDIN_DEF(failedrefitem,"i"), BUILDIN_DEF(downrefitem,"i?"), @@ -20823,10 +24082,10 @@ void script_parse_builtin(void) { BUILDIN_DEF(basicskillcheck,""), BUILDIN_DEF(getgmlevel,""), BUILDIN_DEF(setgroupid, "i?"), - BUILDIN_DEF(getgroupid,""), + BUILDIN_DEF(getgroupid,"?"), BUILDIN_DEF(end,""), - BUILDIN_DEF(checkoption,"i"), - BUILDIN_DEF(setoption,"i?"), + BUILDIN_DEF(checkoption,"i?"), + BUILDIN_DEF(setoption,"i??"), BUILDIN_DEF(setcart,"?"), BUILDIN_DEF(checkcart,""), BUILDIN_DEF(setfalcon,"?"), @@ -20851,9 +24110,11 @@ void script_parse_builtin(void) { BUILDIN_DEF(clone,"siisi????"), BUILDIN_DEF(doevent,"s"), BUILDIN_DEF(donpcevent,"s"), - BUILDIN_DEF(addtimer,"is"), - BUILDIN_DEF(deltimer,"s"), - BUILDIN_DEF(addtimercount,"si"), + BUILDIN_DEF(addtimer,"is?"), + BUILDIN_DEF(deltimer,"s?"), + BUILDIN_DEF(addtimercount,"si?"), + BUILDIN_DEF(gettimer,"i??"), + BUILDIN_DEF(getunits,"iris????"), BUILDIN_DEF(initnpctimer,"??"), BUILDIN_DEF(stopnpctimer,"??"), BUILDIN_DEF(startnpctimer,"??"), @@ -20902,6 +24163,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(isloggedin,"i?"), BUILDIN_DEF(setmapflagnosave,"ssii"), BUILDIN_DEF(getmapflag,"si"), + BUILDIN_DEF(getmapinfo,"i?"), BUILDIN_DEF(setmapflag,"si?"), BUILDIN_DEF(removemapflag,"si"), BUILDIN_DEF(pvpon,"s"), @@ -20938,8 +24200,8 @@ void script_parse_builtin(void) { BUILDIN_DEF(getcartinventorylist,""), BUILDIN_DEF(getskilllist,""), BUILDIN_DEF(clearitem,""), - BUILDIN_DEF(classchange,"ii"), - BUILDIN_DEF(misceffect,"i"), + BUILDIN_DEF(classchange,"ii?"), + BUILDIN_DEF_DEPRECATED(misceffect,"i"), BUILDIN_DEF(playbgm,"s"), BUILDIN_DEF(playbgmall,"s?????"), BUILDIN_DEF(soundeffect,"si"), @@ -20954,8 +24216,8 @@ void script_parse_builtin(void) { BUILDIN_DEF(petskillsupport,"viiii"), // [Skotlex] BUILDIN_DEF(skilleffect,"vi"), // skill effect [Celest] BUILDIN_DEF(npcskilleffect,"viii"), // npc skill effect [Valaris] - BUILDIN_DEF(specialeffect,"i??"), // npc skill effect [Valaris] - BUILDIN_DEF(specialeffect2,"i??"), // skill effect on players[Valaris] + BUILDIN_DEF(specialeffect,"i???"), // npc skill effect [Valaris] + BUILDIN_DEF_DEPRECATED(specialeffect2,"i??"), // skill effect on players[Valaris] BUILDIN_DEF(nude,""), // nude command [Valaris] BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT BUILDIN_DEF(atcommand,"s"), // [MouseJstr] @@ -20974,11 +24236,11 @@ void script_parse_builtin(void) { BUILDIN_DEF(setnpcdir,"*"), // [4144] BUILDIN_DEF(getnpcclass,"?"), // [4144] BUILDIN_DEF(getmapxy,"rrri?"), //by Lorky [Lupus] - BUILDIN_DEF(checkoption1,"i"), - BUILDIN_DEF(checkoption2,"i"), + BUILDIN_DEF(checkoption1,"i?"), + BUILDIN_DEF(checkoption2,"i?"), BUILDIN_DEF(guildgetexp,"i"), BUILDIN_DEF(guildchangegm,"is"), - BUILDIN_DEF(logmes,"s"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus] + BUILDIN_DEF(logmes,"s?"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus] BUILDIN_DEF(summon,"si??"), // summons a slave monster [Celest] BUILDIN_DEF(isnight,""), // check whether it is night time [Celest] BUILDIN_DEF(isequipped,"i*"), // check whether another item/card has been equipped [Celest] @@ -20991,10 +24253,11 @@ void script_parse_builtin(void) { BUILDIN_DEF(activatepset,"i"), // Activate a pattern set [MouseJstr] BUILDIN_DEF(deactivatepset,"i"), // Deactive a pattern set [MouseJstr] BUILDIN_DEF(deletepset,"i"), // Delete a pattern set [MouseJstr] + BUILDIN_DEF(dressroom,"?"), BUILDIN_DEF(pcre_match,"ss"), BUILDIN_DEF(dispbottom,"s?"), //added from jA [Lupus] BUILDIN_DEF(getusersname,""), - BUILDIN_DEF(recovery,""), + BUILDIN_DEF(recovery,"?????"), BUILDIN_DEF(getpetinfo,"i"), BUILDIN_DEF(gethominfo,"i"), BUILDIN_DEF(getmercinfo,"i?"), @@ -21004,6 +24267,10 @@ void script_parse_builtin(void) { BUILDIN_DEF(getstrlen,"s"), //strlen [Valaris] BUILDIN_DEF(charisalpha,"si"), //isalpha [Valaris] BUILDIN_DEF(charat,"si"), + BUILDIN_DEF(isstr,"v"), + BUILDIN_DEF(getdatatype, "?"), + BUILDIN_DEF(chr,"i"), + BUILDIN_DEF(ord,"s"), BUILDIN_DEF(setchar,"ssi"), BUILDIN_DEF(insertchar,"ssi"), BUILDIN_DEF(delchar,"si"), @@ -21025,10 +24292,14 @@ void script_parse_builtin(void) { BUILDIN_DEF(getiteminfo,"ii"), //[Lupus] returns Items Buy / sell Price, etc info BUILDIN_DEF(setiteminfo,"iii"), //[Lupus] set Items Buy / sell Price, etc info BUILDIN_DEF(getequipcardid,"ii"), //[Lupus] returns CARD ID or other info from CARD slot N of equipped item + BUILDIN_DEF(getequippedoptioninfo, "i"), + BUILDIN_DEF(getequipoption, "iii"), + BUILDIN_DEF(setequipoption, "iiii"), + BUILDIN_DEF(getequipisenableopt, "i"), // List of mathematics commands ---> BUILDIN_DEF(log10,"i"), BUILDIN_DEF(sqrt,"i"), //[zBuffer] - BUILDIN_DEF(pow,"ii"), //[zBuffer] + BUILDIN_DEF_DEPRECATED(pow,"ii"), //[zBuffer] BUILDIN_DEF(distance,"iiii"), //[zBuffer] // <--- List of mathematics commands BUILDIN_DEF(min, "i*"), @@ -21070,6 +24341,11 @@ void script_parse_builtin(void) { // <--- [zBuffer] List of player cont commands // [zBuffer] List of mob control commands ---> BUILDIN_DEF(getunittype,"i"), + /* Unit Data */ + BUILDIN_DEF(setunitdata,"iiv??"), + BUILDIN_DEF(getunitdata,"ii?"), + BUILDIN_DEF(getunitname,"i"), + BUILDIN_DEF(setunitname,"is"), BUILDIN_DEF(unitwalk,"ii?"), BUILDIN_DEF(unitkill,"i"), BUILDIN_DEF(unitwarp,"isii"), @@ -21084,6 +24360,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(sleep2,"i"), BUILDIN_DEF(awake,"s"), BUILDIN_DEF(getvariableofnpc,"rs"), + BUILDIN_DEF(getvariableofpc,"ri?"), BUILDIN_DEF(warpportal,"iisii"), BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn] BUILDIN_DEF2(homunculus_mutate,"hommutate","?"), @@ -21179,7 +24456,10 @@ void script_parse_builtin(void) { **/ BUILDIN_DEF(bindatcmd, "ss???"), BUILDIN_DEF(unbindatcmd, "s"), - BUILDIN_DEF(useatcmd, "s"), + BUILDIN_DEF_DEPRECATED(useatcmd, "s"), + BUILDIN_DEF(has_permission, "v?"), + BUILDIN_DEF(can_use_command, "s?"), + BUILDIN_DEF(add_group_command, "siii"), /** * Item bound [Xantara] [Akinari] [Mhalicot/Hercules] @@ -21191,7 +24471,7 @@ void script_parse_builtin(void) { //Quest Log System [Inkfish] BUILDIN_DEF(questinfo, "ii??"), - BUILDIN_DEF(setquest, "i"), + BUILDIN_DEF(setquest, "i?"), BUILDIN_DEF(erasequest, "i?"), BUILDIN_DEF(completequest, "i?"), BUILDIN_DEF(questprogress, "i?"), @@ -21239,8 +24519,17 @@ void script_parse_builtin(void) { BUILDIN_DEF(navigateto, "s??????"), BUILDIN_DEF(channelmes, "ss"), + BUILDIN_DEF(addchannelhandler, "ss"), + BUILDIN_DEF(removechannelhandler, "ss"), BUILDIN_DEF(showscript, "s?"), BUILDIN_DEF(mergeitem,""), + BUILDIN_DEF(getcalendartime, "ii??"), + + // -- RoDEX + BUILDIN_DEF(rodex_sendmail, "isss???????????"), + BUILDIN_DEF2(rodex_sendmail, "rodex_sendmail_acc", "isss???????????"), + BUILDIN_DEF(rodex_sendmail2, "isss?????????????????????????????????????????"), + BUILDIN_DEF2(rodex_sendmail2, "rodex_sendmail_acc2", "isss?????????????????????????????????????????"), BUILDIN_DEF(_,"s"), BUILDIN_DEF2(_, "_$", "s"), }; @@ -21285,6 +24574,7 @@ void script_hardcoded_constants(void) script->set_constant("MAX_CART",MAX_INVENTORY,false, false); script->set_constant("MAX_INVENTORY",MAX_INVENTORY,false, false); script->set_constant("MAX_ZENY",MAX_ZENY,false, false); + script->set_constant("MAX_BANK_ZENY", MAX_BANK_ZENY, false, false); script->set_constant("MAX_BG_MEMBERS",MAX_BG_MEMBERS,false, false); script->set_constant("MAX_CHAT_USERS",MAX_CHAT_USERS,false, false); script->set_constant("MAX_REFINE",MAX_REFINE,false, false); @@ -21314,6 +24604,7 @@ void script_hardcoded_constants(void) script->set_constant("Option_Dragon5",OPTION_DRAGON5,false, false); script->set_constant("Option_Hanbok",OPTION_HANBOK,false, false); script->set_constant("Option_Oktoberfest",OPTION_OKTOBERFEST,false, false); + script->set_constant("Option_Summer2", OPTION_SUMMER2, false, false); script->constdb_comment("status option compounds"); script->set_constant("Option_Dragon",OPTION_DRAGON,false, false); @@ -21391,6 +24682,23 @@ void script_hardcoded_constants(void) script->set_constant("EQP_SHADOW_SHOES", EQP_SHADOW_SHOES, false, false); script->set_constant("EQP_SHADOW_ACC_R", EQP_SHADOW_ACC_R, false, false); script->set_constant("EQP_SHADOW_ACC_L", EQP_SHADOW_ACC_L, false, false); + // Synonyms and combined values + script->set_constant("EQP_WEAPON", EQP_WEAPON, false, false); + script->set_constant("EQP_SHIELD", EQP_SHIELD, false, false); + script->set_constant("EQP_ARMS", EQP_ARMS, false, false); + script->set_constant("EQP_HELM", EQP_HELM, false, false); + script->set_constant("EQP_ACC", EQP_ACC, false, false); + script->set_constant("EQP_COSTUME", EQP_COSTUME, false, false); + script->set_constant("EQP_SHADOW_ACC", EQP_SHADOW_ACC, false, false); + script->set_constant("EQP_SHADOW_ARMS", EQP_SHADOW_ARMS, false, false); + + script->constdb_comment("Item Option Types"); + script->set_constant("IT_OPT_INDEX", IT_OPT_INDEX, false, false); + script->set_constant("IT_OPT_VALUE", IT_OPT_VALUE, false, false); + script->set_constant("IT_OPT_PARAM", IT_OPT_PARAM, false, false); + + script->constdb_comment("Maximum Item Options"); + script->set_constant("MAX_ITEM_OPTIONS", MAX_ITEM_OPTIONS, false, false); script->constdb_comment("Navigation constants, use with *navigateto*"); script->set_constant("NAV_NONE", NAV_NONE, false, false); @@ -21402,6 +24710,125 @@ void script_hardcoded_constants(void) script->set_constant("NAV_KAFRA_AND_SCROLL", NAV_KAFRA_AND_SCROLL, false, false); script->set_constant("NAV_ALL", NAV_ALL, false, false); + script->constdb_comment("BL types"); + script->set_constant("BL_PC",BL_PC,false, false); + script->set_constant("BL_MOB",BL_MOB,false, false); + script->set_constant("BL_PET",BL_PET,false, false); + script->set_constant("BL_HOM",BL_HOM,false, false); + script->set_constant("BL_MER",BL_MER,false, false); + script->set_constant("BL_ITEM",BL_ITEM,false, false); + script->set_constant("BL_SKILL",BL_SKILL,false, false); + script->set_constant("BL_NPC",BL_NPC,false, false); + script->set_constant("BL_CHAT",BL_CHAT,false, false); + script->set_constant("BL_ELEM",BL_ELEM,false, false); + script->set_constant("BL_CHAR",BL_CHAR,false, false); + script->set_constant("BL_ALL",BL_ALL,false, false); + + script->constdb_comment("Refine Chance Types"); + script->set_constant("REFINE_CHANCE_TYPE_NORMAL", REFINE_CHANCE_TYPE_NORMAL, false, false); + script->set_constant("REFINE_CHANCE_TYPE_ENRICHED", REFINE_CHANCE_TYPE_ENRICHED, false, false); + script->set_constant("REFINE_CHANCE_TYPE_E_NORMAL", REFINE_CHANCE_TYPE_E_NORMAL, false, false); + script->set_constant("REFINE_CHANCE_TYPE_E_ENRICHED", REFINE_CHANCE_TYPE_E_ENRICHED, false, false); + + script->constdb_comment("Player permissions"); + script->set_constant("PERM_TRADE", PC_PERM_TRADE, false, false); + script->set_constant("PERM_PARTY", PC_PERM_PARTY, false, false); + script->set_constant("PERM_ALL_SKILL", PC_PERM_ALL_SKILL, false, false); + script->set_constant("PERM_USE_ALL_EQUIPMENT", PC_PERM_USE_ALL_EQUIPMENT, false, false); + script->set_constant("PERM_SKILL_UNCONDITIONAL", PC_PERM_SKILL_UNCONDITIONAL, false, false); + script->set_constant("PERM_JOIN_ALL_CHAT", PC_PERM_JOIN_ALL_CHAT, false, false); + script->set_constant("PERM_NO_CHAT_KICK", PC_PERM_NO_CHAT_KICK, false, false); + script->set_constant("PERM_HIDE_SESSION", PC_PERM_HIDE_SESSION, false, false); + script->set_constant("PERM_RECEIVE_HACK_INFO", PC_PERM_RECEIVE_HACK_INFO, false, false); + script->set_constant("PERM_WARP_ANYWHERE", PC_PERM_WARP_ANYWHERE, false, false); + script->set_constant("PERM_VIEW_HPMETER", PC_PERM_VIEW_HPMETER, false, false); + script->set_constant("PERM_VIEW_EQUIPMENT", PC_PERM_VIEW_EQUIPMENT, false, false); + script->set_constant("PERM_USE_CHECK", PC_PERM_USE_CHECK, false, false); + script->set_constant("PERM_USE_CHANGEMAPTYPE", PC_PERM_USE_CHANGEMAPTYPE, false, false); + script->set_constant("PERM_USE_ALL_COMMANDS", PC_PERM_USE_ALL_COMMANDS, false, false); + script->set_constant("PERM_RECEIVE_REQUESTS", PC_PERM_RECEIVE_REQUESTS, false, false); + script->set_constant("PERM_SHOW_BOSS", PC_PERM_SHOW_BOSS, false, false); + script->set_constant("PERM_DISABLE_PVM", PC_PERM_DISABLE_PVM, false, false); + script->set_constant("PERM_DISABLE_PVP", PC_PERM_DISABLE_PVP, false, false); + script->set_constant("PERM_DISABLE_CMD_DEAD", PC_PERM_DISABLE_CMD_DEAD, false, false); + script->set_constant("PERM_HCHSYS_ADMIN", PC_PERM_HCHSYS_ADMIN, false, false); + script->set_constant("PERM_TRADE_BOUND", PC_PERM_TRADE_BOUND, false, false); + script->set_constant("PERM_DISABLE_PICK_UP", PC_PERM_DISABLE_PICK_UP, false, false); + script->set_constant("PERM_DISABLE_STORE", PC_PERM_DISABLE_STORE, false, false); + script->set_constant("PERM_DISABLE_EXP", PC_PERM_DISABLE_EXP, false, false); + script->set_constant("PERM_DISABLE_SKILL_USAGE", PC_PERM_DISABLE_SKILL_USAGE, false, false); + + script->constdb_comment("Data types"); + script->set_constant("DATATYPE_NIL", DATATYPE_NIL, false, false); + script->set_constant("DATATYPE_STR", DATATYPE_STR, false, false); + script->set_constant("DATATYPE_INT", DATATYPE_INT, false, false); + script->set_constant("DATATYPE_CONST", DATATYPE_CONST, false, false); + script->set_constant("DATATYPE_PARAM", DATATYPE_PARAM, false, false); + script->set_constant("DATATYPE_VAR", DATATYPE_VAR, false, false); + script->set_constant("DATATYPE_LABEL", DATATYPE_LABEL, false, false); + + script->constdb_comment("Logmes types"); + script->set_constant("LOGMES_NPC", LOGMES_NPC, false, false); + script->set_constant("LOGMES_ATCOMMAND", LOGMES_ATCOMMAND, false, false); + + script->constdb_comment("Item Subtypes (Weapon types)"); + script->set_constant("W_FIST", W_FIST, false, false); + script->set_constant("W_DAGGER", W_DAGGER, false, false); + script->set_constant("W_1HSWORD", W_1HSWORD, false, false); + script->set_constant("W_2HSWORD", W_2HSWORD, false, false); + script->set_constant("W_1HSPEAR", W_1HSPEAR, false, false); + script->set_constant("W_2HSPEAR", W_2HSPEAR, false, false); + script->set_constant("W_1HAXE", W_1HAXE, false, false); + script->set_constant("W_2HAXE", W_2HAXE, false, false); + script->set_constant("W_MACE", W_MACE, false, false); + script->set_constant("W_2HMACE", W_2HMACE, false, false); + script->set_constant("W_STAFF", W_STAFF, false, false); + script->set_constant("W_BOW", W_BOW, false, false); + script->set_constant("W_KNUCKLE", W_KNUCKLE, false, false); + script->set_constant("W_MUSICAL", W_MUSICAL, false, false); + script->set_constant("W_WHIP", W_WHIP, false, false); + script->set_constant("W_BOOK", W_BOOK, false, false); + script->set_constant("W_KATAR", W_KATAR, false, false); + script->set_constant("W_REVOLVER", W_REVOLVER, false, false); + script->set_constant("W_RIFLE", W_RIFLE, false, false); + script->set_constant("W_GATLING", W_GATLING, false, false); + script->set_constant("W_SHOTGUN", W_SHOTGUN, false, false); + script->set_constant("W_GRENADE", W_GRENADE, false, false); + script->set_constant("W_HUUMA", W_HUUMA, false, false); + script->set_constant("W_2HSTAFF", W_2HSTAFF, false, false); + + script->constdb_comment("Item Subtypes (Ammunition types)"); + script->set_constant("A_ARROW", A_ARROW, false, false); + script->set_constant("A_DAGGER", A_DAGGER, false, false); + script->set_constant("A_BULLET", A_BULLET, false, false); + script->set_constant("A_SHELL", A_SHELL, false, false); + script->set_constant("A_GRENADE", A_GRENADE, false, false); + script->set_constant("A_SHURIKEN", A_SHURIKEN, false, false); + script->set_constant("A_KUNAI", A_KUNAI, false, false); + script->set_constant("A_CANNONBALL", A_CANNONBALL, false, false); + script->set_constant("A_THROWWEAPON", A_THROWWEAPON, false, false); + + script->constdb_comment("Item Upper Masks"); + script->set_constant("ITEMUPPER_NONE", ITEMUPPER_NONE, false, false); + script->set_constant("ITEMUPPER_NORMAL", ITEMUPPER_NORMAL, false, false); + script->set_constant("ITEMUPPER_UPPER", ITEMUPPER_UPPER, false, false); + script->set_constant("ITEMUPPER_BABY", ITEMUPPER_BABY, false, false); + script->set_constant("ITEMUPPER_THIRD", ITEMUPPER_THIRD, false, false); + script->set_constant("ITEMUPPER_THIRDUPPER", ITEMUPPER_THIRDUPPER, false, false); + script->set_constant("ITEMUPPER_THIRDBABY", ITEMUPPER_THIRDBABY, false, false); + script->set_constant("ITEMUPPER_ALL", ITEMUPPER_ALL, false, false); + + script->constdb_comment("dressroom modes"); + script->set_constant("DRESSROOM_OPEN", DRESSROOM_OPEN, false, false); + script->set_constant("DRESSROOM_CLOSE", DRESSROOM_CLOSE, false, false); + + script->constdb_comment("getmapinfo options"); + script->set_constant("MAPINFO_NAME", MAPINFO_NAME, false, false); + script->set_constant("MAPINFO_ID", MAPINFO_ID, false, false); + script->set_constant("MAPINFO_SIZE_X", MAPINFO_SIZE_X, false, false); + script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false); + script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false); + script->constdb_comment("Renewal"); #ifdef RENEWAL script->set_constant("RENEWAL", 1, false, false); @@ -21548,10 +24975,12 @@ void script_defaults(void) script->get_val = get_val; script->get_val2 = get_val2; script->get_val_ref_str = get_val_npcscope_str; + script->get_val_pc_ref_str = get_val_pc_ref_str; script->get_val_scope_str = get_val_npcscope_str; script->get_val_npc_str = get_val_npcscope_str; script->get_val_instance_str = get_val_instance_str; script->get_val_ref_num = get_val_npcscope_num; + script->get_val_pc_ref_num = get_val_pc_ref_num; script->get_val_scope_num = get_val_npcscope_num; script->get_val_npc_num = get_val_npcscope_num; script->get_val_instance_num = get_val_instance_num; @@ -21630,10 +25059,12 @@ void script_defaults(void) script->errorwarning_sub = script_errorwarning_sub; script->set_reg = set_reg; script->set_reg_ref_str = set_reg_npcscope_str; + script->set_reg_pc_ref_str = set_reg_pc_ref_str; script->set_reg_scope_str = set_reg_npcscope_str; script->set_reg_npc_str = set_reg_npcscope_str; script->set_reg_instance_str = set_reg_instance_str; script->set_reg_ref_num = set_reg_npcscope_num; + script->set_reg_pc_ref_num = set_reg_pc_ref_num; script->set_reg_scope_num = set_reg_npcscope_num; script->set_reg_npc_num = set_reg_npcscope_num; script->set_reg_instance_num = set_reg_instance_num; @@ -21650,6 +25081,9 @@ void script_defaults(void) script->db_free_code_sub = db_script_free_code_sub; script->add_autobonus = script_add_autobonus; script->menu_countoptions = menu_countoptions; + script->buildin_recovery_sub = buildin_recovery_sub; + script->buildin_recovery_pc_sub = buildin_recovery_pc_sub; + script->buildin_recovery_bl_sub = buildin_recovery_bl_sub; script->buildin_areawarp_sub = buildin_areawarp_sub; script->buildin_areapercentheal_sub = buildin_areapercentheal_sub; script->buildin_delitem_delete = buildin_delitem_delete; diff --git a/src/map/script.h b/src/map/script.h index a69000991..b2ab7510c 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -235,6 +235,7 @@ typedef enum c_op { C_SUB_PRE, // --a C_RE_EQ, // ~= C_RE_NE, // ~! + C_POW, // ** } c_op; /// Script queue options @@ -335,6 +336,7 @@ enum { MF_RESET, MF_NOTOMB, MF_NOCASHSHOP, + MF_NOAUTOLOOT, MF_NOVIEWID }; @@ -350,6 +352,83 @@ enum navigation_service { }; /** + * Unit Types for script handling. + */ +enum script_unit_types { + UNIT_PC = 0, + UNIT_NPC, + UNIT_PET, + UNIT_MOB, + UNIT_HOM, + UNIT_MER, + UNIT_ELEM, +}; + +/** + * Unit Data Types for script handling. + */ +enum script_unit_data_types { + UDT_TYPE = 0, + UDT_SIZE, + UDT_LEVEL, + UDT_HP, + UDT_MAXHP, + UDT_SP, + UDT_MAXSP, + UDT_MASTERAID, + UDT_MASTERCID, + UDT_MAPIDXY, + UDT_WALKTOXY, + UDT_SPEED, + UDT_MODE, + UDT_AI, + UDT_SCOPTION, + UDT_SEX, + UDT_CLASS, + UDT_HAIRSTYLE, + UDT_HAIRCOLOR, + UDT_HEADBOTTOM, + UDT_HEADMIDDLE, + UDT_HEADTOP, + UDT_CLOTHCOLOR, + UDT_SHIELD, + UDT_WEAPON, + UDT_LOOKDIR, + UDT_CANMOVETICK, + UDT_STR, + UDT_AGI, + UDT_VIT, + UDT_INT, + UDT_DEX, + UDT_LUK, + UDT_ATKRANGE, + UDT_ATKMIN, + UDT_ATKMAX, + UDT_MATKMIN, + UDT_MATKMAX, + UDT_DEF, + UDT_MDEF, + UDT_HIT, + UDT_FLEE, + UDT_PDODGE, + UDT_CRIT, + UDT_RACE, + UDT_ELETYPE, + UDT_ELELEVEL, + UDT_AMOTION, + UDT_ADELAY, + UDT_DMOTION, + UDT_HUNGER, + UDT_INTIMACY, + UDT_LIFETIME, + UDT_MERC_KILLCOUNT, + UDT_STATPOINT, + UDT_ROBE, + UDT_BODY2, + UDT_MAX +}; + +/** * Structures **/ @@ -672,10 +751,12 @@ struct script_interface { struct script_data* (*push_val)(struct script_stack* stack, enum c_op type, int64 val, struct reg_db *ref); struct script_data *(*get_val) (struct script_state* st, struct script_data* data); char* (*get_val_ref_str) (struct script_state* st, struct reg_db *n, struct script_data* data); + char* (*get_val_pc_ref_str) (struct script_state* st, struct reg_db *n, struct script_data* data); char* (*get_val_scope_str) (struct script_state* st, struct reg_db *n, struct script_data* data); char* (*get_val_npc_str) (struct script_state* st, struct reg_db *n, struct script_data* data); char* (*get_val_instance_str) (struct script_state* st, const char* name, struct script_data* data); int (*get_val_ref_num) (struct script_state* st, struct reg_db *n, struct script_data* data); + int (*get_val_pc_ref_num) (struct script_state* st, struct reg_db *n, struct script_data* data); int (*get_val_scope_num) (struct script_state* st, struct reg_db *n, struct script_data* data); int (*get_val_npc_num) (struct script_state* st, struct reg_db *n, struct script_data* data); int (*get_val_instance_num) (struct script_state* st, const char* name, struct script_data* data); @@ -755,10 +836,12 @@ struct script_interface { 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, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); void (*set_reg_ref_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); + void (*set_reg_pc_ref_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); void (*set_reg_scope_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); void (*set_reg_npc_str) (struct script_state* st, struct reg_db *n, int64 num, const char* name, const char *str); void (*set_reg_instance_str) (struct script_state* st, int64 num, const char* name, const char *str); void (*set_reg_ref_num) (struct script_state* st, struct reg_db *n, int64 num, const char* name, int val); + void (*set_reg_pc_ref_num) (struct script_state* st, struct reg_db *n, int64 num, const char* name, int val); void (*set_reg_scope_num) (struct script_state* st, struct reg_db *n, int64 num, const char* name, int val); void (*set_reg_npc_num) (struct script_state* st, struct reg_db *n, int64 num, const char* name, int val); void (*set_reg_instance_num) (struct script_state* st, int64 num, const char* name, int val); @@ -774,6 +857,9 @@ struct script_interface { int (*db_free_code_sub) (union DBKey key, struct DBData *data, va_list ap); void (*add_autobonus) (const char *autobonus); int (*menu_countoptions) (const char *str, int max_count, int *total); + int (*buildin_recovery_sub) (struct map_session_data *sd); + int (*buildin_recovery_pc_sub) (struct map_session_data *sd, va_list ap); + int (*buildin_recovery_bl_sub) (struct block_list *bl, va_list ap); int (*buildin_areawarp_sub) (struct block_list *bl, va_list ap); int (*buildin_areapercentheal_sub) (struct block_list *bl, va_list ap); void (*buildin_delitem_delete) (struct map_session_data *sd, int idx, int *amount, bool delete_items); diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 1782112f1..16d8ce130 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/searchstore.h b/src/map/searchstore.h index 8edfcd2a8..2d1de7e55 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/skill.c b/src/map/skill.c index 2559a7a5b..726deaa9a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2017 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -131,7 +131,7 @@ int skill_get_index (uint16 skill_id) skill_id = (1077) + skill_id - 2201; else if ( skill_id < 3036 ) // 2549 - 3000 are empty - 1020+57+348 skill_id = (1425) + skill_id - 3001; - else if ( skill_id < 5019 ) // 3036 - 5000 are empty - 1020+57+348+35 + else if ( skill_id < 5044 ) // 3036 - 5000 are empty - 1020+57+348+35 skill_id = (1460) + skill_id - 5001; else ShowWarning("skill_get_index: skill id '%d' is not being handled!\n",skill_id); @@ -219,14 +219,14 @@ int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) { #endif } -int skill_tree_get_max(uint16 skill_id, int b_class) +int skill_tree_get_max(uint16 skill_id, int class) { int i; - b_class = pc->class2idx(b_class); + int class_idx = pc->class2idx(class); - 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; + ARR_FIND( 0, MAX_SKILL_TREE, i, pc->skill_tree[class_idx][i].id == 0 || pc->skill_tree[class_idx][i].id == skill_id ); + if( i < MAX_SKILL_TREE && pc->skill_tree[class_idx][i].id == skill_id ) + return pc->skill_tree[class_idx][i].max; else return skill->get_max(skill_id); } @@ -303,7 +303,7 @@ int skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) if (sd != NULL) range += pc->checkskill(sd, AC_VULTURE); else - range += 10; //Assume level 10? + range += battle->bc->mob_eye_range_bonus; break; // added to allow GS skills to be effected by the range of Snake Eyes [Reddozen] case GS_RAPIDSHOWER: @@ -314,7 +314,7 @@ int skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) if (sd != NULL) range += pc->checkskill(sd, GS_SNAKEEYE); else - range += 10; //Assume level 10? + range += battle->bc->mob_eye_range_bonus; break; case NJ_KIRIKAGE: if (sd != NULL) @@ -365,7 +365,10 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk nullpo_ret(src); - switch( skill_id ) { + switch (skill_id) { + case SU_TUNABELLY: + hp = status_get_max_hp(target) * ((20 * skill_lv) - 10) / 100; + break; case BA_APPLEIDUN: #ifdef RENEWAL hp = 100+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery @@ -397,6 +400,11 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk hp += hp * skill2_lv * 2 / 100; else if (src->type == BL_HOM && (skill2_lv = homun->checkskill(BL_UCAST(BL_HOM, src), HLIF_BRAIN)) > 0) hp += hp * skill2_lv * 2 / 100; + if (sd != NULL && ((skill2_lv = pc->checkskill(sd, SU_POWEROFSEA)) > 0)) { + hp += hp * 10 / 100; + if (pc->checkskill(sd, SU_TUNABELLY) == 5 && pc->checkskill(sd, SU_TUNAPARTY) == 5 && pc->checkskill(sd, SU_BUNCHOFSHRIMP) == 5 && pc->checkskill(sd, SU_FRESHSHRIMP) == 5) + hp += hp * 20 / 100; + } break; } @@ -451,13 +459,14 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b if (skill->get_inf2(skill_id)&(INF2_NPC_SKILL|INF2_WEDDING_SKILL)) return 0; - // High-class skills - if((skill_id >= LK_AURABLADE && skill_id <= ASC_CDP) || (skill_id >= ST_PRESERVE && skill_id <= CR_CULTIVATION)) - { - if(battle_config.copyskill_restrict == 2) + // Transcendent-class skills + if((skill_id >= LK_AURABLADE && skill_id <= ASC_CDP) || (skill_id >= ST_PRESERVE && skill_id <= CR_CULTIVATION)) { + if (battle_config.copyskill_restrict == 2) { return 0; - else if(battle_config.copyskill_restrict) - return (sd->status.class_ == JOB_STALKER); + } else if (battle_config.copyskill_restrict == 1) { + if ((sd->job & (MAPID_UPPERMASK | JOBL_UPPER)) != MAPID_STALKER) + return 0; + } } //Added so plagarize can't copy agi/bless if you're undead since it damages you @@ -466,8 +475,11 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b skill_id == MER_INCAGI || skill_id == MER_BLESSING)) return 0; - // Couldn't preserve 3rd Class skills except only when using Reproduce skill. [Jobbie] - if( !(sd->sc.data[SC__REPRODUCE]) && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || (skill_id >= GC_DARKCROW && skill_id <= NC_MAGMA_ERUPTION_DOTDAMAGE))) + // Couldn't preserve 3rd Class/Summoner skills except only when using Reproduce skill. [Jobbie] + if (!(sd->sc.data[SC__REPRODUCE]) && + ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || + (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || + (skill_id >= GC_DARKCROW && skill_id <= SU_FRESHSHRIMP))) return 0; // Reproduce will only copy skills according on the list. [Jobbie] else if( sd->sc.data[SC__REPRODUCE] && !skill->dbs->reproduce_db[skill->get_index(skill_id)] ) @@ -794,7 +806,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; // If a normal attack is a skill, it's splash damage. [Inkfish] if(sd) { // Automatic trigger of Blitz Beat - if (pc_isfalcon(sd) && sd->status.weapon == W_BOW && (temp=pc->checkskill(sd,HT_BLITZBEAT))>0 && + if (pc_isfalcon(sd) && sd->weapontype == W_BOW && (temp=pc->checkskill(sd,HT_BLITZBEAT))>0 && rnd()%1000 <= sstatus->luk*3 ) { rate = sd->status.job_level / 10 + 1; skill->castend_damage_id(src,bl,HT_BLITZBEAT,(temp<rate)?temp:rate,tick,SD_LEVEL); @@ -803,7 +815,7 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 if( pc_iswug(sd) && (temp=pc->checkskill(sd,RA_WUGSTRIKE)) > 0 && rnd()%1000 <= sstatus->luk*3 ) skill->castend_damage_id(src,bl,RA_WUGSTRIKE,temp,tick,0); // Gank - if(dstmd && sd->status.weapon != W_BOW && + if(dstmd && sd->weapontype != W_BOW && (temp=pc->checkskill(sd,RG_SNATCHER)) > 0 && (temp*15 + 55) + pc->checkskill(sd,TF_STEAL)*10 > rnd()%1000) { if(pc->steal_item(sd,bl,pc->checkskill(sd,TF_STEAL))) @@ -902,6 +914,10 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; #endif + case WZ_HEAVENDRIVE: + status_change_end(bl, SC_SV_ROOTTWIST, INVALID_TIMER); + break; + case WZ_STORMGUST: /** * Storm Gust counter was dropped in renewal @@ -1135,8 +1151,8 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 break; case TK_JUMPKICK: - if( dstsd && dstsd->class_ != MAPID_SOUL_LINKER && !tsc->data[SC_PRESERVE] ) - {// debuff the following statuses + if (dstsd != NULL && (dstsd->job & MAPID_UPPERMASK) != MAPID_SOUL_LINKER && tsc->data[SC_PRESERVE] == NULL) { + // debuff the following statuses status_change_end(bl, SC_SOULLINK, INVALID_TIMER); status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER); status_change_end(bl, SC_KAITE, INVALID_TIMER); @@ -1415,6 +1431,25 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 case MH_XENO_SLASHER: sc_start2(src, bl, SC_BLOODING, 10 * skill_lv, skill_lv, src->id, skill->get_time(skill_id,skill_lv)); break; + /** + * Summoner + */ + case SU_SCRATCH: + sc_start2(src, bl, SC_BLOODING, (skill_lv * 3), skill_lv, src->id, skill->get_time(skill_id, skill_lv)); // TODO: What's the chance/time? + break; + case SU_SV_STEMSPEAR: + sc_start2(src, bl, SC_BLOODING, 10, skill_lv, src->id, skill->get_time(skill_id, skill_lv)); + break; + case SU_CN_METEOR: + sc_start(src, bl, SC_CURSE, 10, skill_lv, skill->get_time2(skill_id, skill_lv)); // TODO: What's the chance/time? + break; + case SU_SCAROFTAROU: + sc_start(src, bl, SC_STUN, 10, skill_lv, skill->get_time2(skill_id, skill_lv)); // TODO: What's the chance/time? + break; + case SU_LUNATICCARROTBEAT: + if (skill->area_temp[3] == 1) + sc_start(src, bl, SC_STUN, 10, skill_lv, skill_get_time(skill_id, skill_lv)); // TODO: What's the chance/time? + break; default: skill->additional_effect_unknown(src, bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); break; @@ -1808,7 +1843,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b break; } - if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR + if (sd != NULL && (sd->job & MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR && rnd()%10000 < battle_config.sg_miracle_skill_ratio) // SG_MIRACLE [Komurka] sc_start(src,src,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration); @@ -1977,7 +2012,7 @@ int skill_break_equip (struct block_list *bl, unsigned short where, int rate, in if (sd->bonus.unbreakable) rate -= rate*sd->bonus.unbreakable/100; if (where&EQP_WEAPON) { - switch (sd->status.weapon) { + switch (sd->weapontype) { case W_FIST: //Bare fists should not break :P case W_1HAXE: case W_2HAXE: @@ -2088,6 +2123,7 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int int skill_blown(struct block_list* src, struct block_list* target, int count, int8 dir, int flag) { int dx = 0, dy = 0; + struct status_change *tsc = status->get_sc(target); nullpo_ret(src); @@ -2135,6 +2171,9 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in dy = -diry[dir]; } + if (tsc != NULL && tsc->data[SC_SU_STOOP]) // Any knockback will cancel it. + status_change_end(target, SC_SU_STOOP, INVALID_TIMER); + return unit->blown(target, dx, dy, count, flag); // send over the proper flag } @@ -2391,7 +2430,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr case TK_STORMKICK: case TK_DOWNKICK: case TK_COUNTER: - if (pc->famerank(sd->status.char_id,MAPID_TAEKWON)) {//Extend combo time. + if (pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0) { //Extend combo time. sce->val1 = skill_id; //Update combo-skill sce->val3 = skill_id; if( sce->timer != INVALID_TIMER ) @@ -2516,7 +2555,7 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,dmg.div_,skill_id,skill_lv,BDT_MULTIHIT); break; case WL_CHAINLIGHTNING_ATK: - dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,WL_CHAINLIGHTNING,-2,BDT_SKILL); + dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,WL_CHAINLIGHTNING_ATK,-2,BDT_SKILL); break; case LG_OVERBRAND_BRANDISH: case LG_OVERBRAND: @@ -3442,7 +3481,8 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) { break; switch( skl->skill_id ) { case WZ_METEOR: - if( skl->type >= 0 ) { + case SU_CN_METEOR: + if (skl->type >= 0) { int x = skl->type>>16, y = skl->type&0xFFFF; if( path->search_long(NULL, src, src->m, src->x, src->y, x, y, CELL_CHKWALL) ) skill->unitsetting(src,skl->skill_id,skl->skill_lv,x,y,skl->flag); @@ -3961,7 +4001,17 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); break; - //Splash attack skills. + case SU_BITE: + skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); + if (status->get_lv(src) >= 30 && (rnd() % 100 < (int)(status->get_lv(src) / 30) + 10)) // TODO: Need activation chance. + skill->addtimerskill(src, tick + skill->get_delay(skill_id, skill_lv), bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag); + break; + + case SU_PICKYPECK: + clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); + break; + + // Splash attack skills. case AS_GRIMTOOTH: case MC_CARTREVOLUTION: case NPC_SPLASHATTACK: @@ -4014,7 +4064,9 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 case KO_BAKURETSU: case GN_ILLUSIONDOPING: case MH_XENO_SLASHER: - if( flag&1 ) {//Recursive invocation + case SU_SCRATCH: + case SU_LUNATICCARROTBEAT: + if (flag&1) { //Recursive invocation // skill->area_temp[0] holds number of targets in area // skill->area_temp[1] holds the id of the original target // skill->area_temp[2] counts how many targets have already been processed @@ -4029,15 +4081,19 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 break; heal = skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, sflag); - if( skill_id == NPC_VAMPIRE_GIFT && heal > 0 ) { + if (skill_id == NPC_VAMPIRE_GIFT && heal > 0) { clif->skill_nodamage(NULL, src, AL_HEAL, heal, 1); status->heal(src,heal,0,0); } + if (skill_id == SU_SCRATCH && status->get_lv(src) >= 30 && (rnd() % 100 < (int)(status->get_lv(src) / 30) + 10)) // TODO: Need activation chance. + skill->addtimerskill(src, tick + skill->get_delay(skill_id, skill_lv), bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag); } else { switch ( skill_id ) { case NJ_BAKUENRYU: case LG_EARTHDRIVE: case GN_CARTCANNON: + case SU_SCRATCH: + case SU_LUNATICCARROTBEAT: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); break; case SR_TIGERCANNON: @@ -4056,13 +4112,19 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->area_temp[0] = 0; skill->area_temp[1] = bl->id; skill->area_temp[2] = 0; - if( skill_id == WL_CRIMSONROCK ) { + if (skill_id == WL_CRIMSONROCK) { skill->area_temp[4] = bl->x; skill->area_temp[5] = bl->y; } + if (skill_id == SU_LUNATICCARROTBEAT) { + skill->area_temp[3] = 0; + } - if( skill_id == NC_VULCANARM ) - if (sd) pc->overheat(sd,1); + if (skill_id == NC_VULCANARM) { + if (sd != NULL) { + pc->overheat(sd,1); + } + } // if skill damage should be split among targets, count them //SD_LEVEL -> Forced splash damage for Auto Blitz-Beat -> count targets @@ -4072,6 +4134,15 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 // recursive invocation of skill->castend_damage_id() with flag|1 map->foreachinrange(skill->area_sub, bl, skill->get_splash(skill_id, skill_lv), skill->splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill->castend_damage_id); + + if (sd && skill_id == SU_LUNATICCARROTBEAT) { + short item_idx = pc->search_inventory(sd, ITEMID_CARROT); + + if (item_idx >= 0) { + pc->delitem(sd, item_idx, 1, 0, 1, LOG_TYPE_CONSUME); + skill->area_temp[3] = 1; + } + } } break; @@ -4629,7 +4700,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 if( !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) ) { struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); - item_tmp.nameid = sg->item_id?sg->item_id:ITEMID_TRAP; + item_tmp.nameid = sg->item_id ? sg->item_id : ITEMID_BOOBY_TRAP; item_tmp.identify = 1; if( item_tmp.nameid ) map->addflooritem(bl, &item_tmp, 1, bl->m, bl->x, bl->y, 0, 0, 0, 0); @@ -4881,6 +4952,15 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1 skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); break; + case SU_SV_STEMSPEAR: + skill->attack(skill->get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag); + if (status->get_lv(src) >= 30 && (rnd() % 100 < (int)(status->get_lv(src) / 30) + 10)) // TODO: Need activation chance. + skill->addtimerskill(src, tick + skill->get_delay(skill_id, skill_lv), bl->id, 0, 0, skill_id, skill_lv, (skill_id == SU_SV_STEMSPEAR) ? BF_MAGIC : BF_WEAPON, flag); + break; + case SU_SCAROFTAROU: + sc_start(src, bl, status->skill2sc(skill_id), 10, skill_lv, skill->get_time(skill_id, skill_lv)); // TODO: What's the activation chance for the effect? + break; + case 0:/* no skill - basic/normal attack */ if(sd) { if (flag & 3){ @@ -5018,6 +5098,8 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) ud->skilltimer=tid; return skill->castend_pos(tid,tick,id,data); case GN_WALLOFTHORN: + case SU_CN_POWDERING: + case SU_SV_ROOTTWIST: ud->skillx = target->x; ud->skilly = target->y; ud->skilltimer = tid; @@ -5480,6 +5562,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin * Arch Bishop **/ case AB_HIGHNESSHEAL: + /** + * Summoner + */ + case SU_TUNABELLY: { int heal = skill->calc_heal(src, bl, (skill_id == AB_HIGHNESSHEAL)?AL_HEAL:skill_id, (skill_id == AB_HIGHNESSHEAL)?10:skill_lv, true); int heal_get_jobexp; @@ -5490,7 +5576,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (status->isimmune(bl) || (dstmd != NULL && (dstmd->class_ == MOBID_EMPELIUM || mob_is_battleground(dstmd)))) heal = 0; - if (sd && dstsd && sd->status.partner_id == dstsd->status.char_id && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0) + if (sd != NULL && dstsd != NULL && sd->status.partner_id == dstsd->status.char_id && (sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.sex == 0) heal = heal * 2; if (tsc && tsc->count) @@ -5509,6 +5595,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin else if (tsc->data[SC_BERSERK]) heal = 0; //Needed so that it actually displays 0 when healing. } + if (skill_id == AL_HEAL) { + status_change_end(bl, SC_BITESCAR, INVALID_TIMER); + } clif->skill_nodamage (src, bl, skill_id, heal, 1); if( tsc && tsc->data[SC_AKAITSUKI] && heal && skill_id != HLIF_HEAL ) heal = ~heal + 1; @@ -5778,7 +5867,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case CR_PROVIDENCE: if(sd && dstsd){ //Check they are not another crusader [Skotlex] - if ((dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) { + if ((dstsd->job & MAPID_UPPERMASK) == MAPID_CRUSADER) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); map->freeblock_unlock(); return 1; @@ -5792,7 +5881,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin { struct status_change* sc = status->get_sc(src); - if( sd && dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER && dstsd->status.sex == sd->status.sex ) { + if (sd != NULL && dstsd != NULL && (dstsd->job & MAPID_UPPERMASK) == MAPID_BARDDANCER && dstsd->status.sex == sd->status.sex) { // Cannot cast on another bard/dancer-type class of the same gender as caster clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); map->freeblock_unlock(); @@ -5828,7 +5917,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case SA_LIGHTNINGLOADER: case SA_SEISMICWEAPON: if (dstsd) { - if(dstsd->status.weapon == W_FIST || + if (dstsd->weapontype == W_FIST || (dstsd->sc.count && !dstsd->sc.data[type] && ( //Allow re-enchanting to lengthen time. [Skotlex] dstsd->sc.data[SC_PROPERTYFIRE] || @@ -5888,6 +5977,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case PR_KYRIE: case MER_KYRIE: + case SU_TUNAPARTY: clif->skill_nodamage(bl, bl, skill_id, -1, sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv))); break; @@ -6004,9 +6094,18 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case RK_ABUNDANCE: case RK_CRUSHSTRIKE: case ALL_ODINS_POWER: + case SU_FRESHSHRIMP: + case SU_ARCLOUSEDASH: clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); break; + // Works just like the above list of skills, except animation caused by + // status must trigger AFTER the skill cast animation or it will cancel + // out the status's animation. + case SU_STOOP: + clif->skill_nodamage(src,bl,skill_id,skill_lv,1); + sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); + break; case KN_AUTOCOUNTER: sc_start(src,bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)); skill->addtimerskill(src, tick + 100, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag); @@ -6204,7 +6303,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if( lv > battle_config.devotion_level_difference || // Level difference requeriments (dstsd->sc.data[type] && dstsd->sc.data[type]->val1 != src->id) || // Cannot Devote a player devoted from another source (skill_id == ML_DEVOTION && (!mer || mer != dstsd->md)) || // Mercenary only can devote owner - (dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER || // Crusader Cannot be devoted + (dstsd->job & MAPID_UPPERMASK) == MAPID_CRUSADER || // Crusader Cannot be devoted (dstsd->sc.data[SC_HELLPOWER])) // Players affected by SC_HELLPOWERR cannot be devoted. { if( sd ) @@ -6257,7 +6356,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin break; case MO_KITRANSLATION: - if(dstsd && ((dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK)!=MAPID_REBELLION)) { + if (dstsd != NULL && (dstsd->job & MAPID_BASEMASK) != MAPID_GUNSLINGER) { pc->addspiritball(dstsd,skill->get_time(skill_id,skill_lv),5); } break; @@ -6273,10 +6372,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case MO_ABSORBSPIRITS: { int sp = 0; - if ( dstsd && dstsd->spiritball - && (sd == dstsd || map_flag_vs(src->m) || (sd && sd->duel_group && sd->duel_group == dstsd->duel_group)) - && ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION) - ) { + if (dstsd != NULL && dstsd->spiritball != 0 + && (sd == dstsd || map_flag_vs(src->m) || (sd && sd->duel_group && sd->duel_group == dstsd->duel_group)) + && (dstsd->job & MAPID_BASEMASK) != MAPID_GUNSLINGER + ) { // split the if for readability, and included gunslingers in the check so that their coins cannot be removed [Reddozen] sp = dstsd->spiritball * 7; pc->delspiritball(dstsd, dstsd->spiritball, 0); @@ -6477,7 +6576,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (sd) { if (!dstsd || !( (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_SOULLINKER) - || (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER + || (dstsd->job & MAPID_UPPERMASK) == MAPID_SOUL_LINKER || dstsd->status.char_id == sd->status.char_id || dstsd->status.char_id == sd->status.partner_id || dstsd->status.char_id == sd->status.child @@ -6661,7 +6760,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin status_change_end(bl, SC_SILENCE, INVALID_TIMER); status_change_end(bl, SC_BLIND, INVALID_TIMER); status_change_end(bl, SC_CONFUSION, INVALID_TIMER); - clif->skill_nodamage(src,bl,skill_id,skill_lv,1); + status_change_end(bl, SC_BITESCAR, INVALID_TIMER); + clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); break; case TF_DETOXIFY: @@ -7111,7 +7211,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin break; } clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) + if ((dstsd != NULL && (dstsd->job & MAPID_UPPERMASK) == MAPID_SOUL_LINKER) || (tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_ROGUE) //Rogue's spirit defends against dispel. || (dstsd && pc_ismadogear(dstsd)) || rnd()%100 >= 50+10*skill_lv ) @@ -7370,8 +7470,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case NPC_LICK: status_zap(bl, 0, 100); - clif->skill_nodamage(src,bl,skill_id,skill_lv, - sc_start(src,bl,type,(skill_lv*5),skill_lv,skill->get_time2(skill_id,skill_lv))); + clif->skill_nodamage(src, bl, skill_id, skill_lv, + sc_start(src, bl, type, (skill_lv * 20), skill_lv, skill->get_time2(skill_id, skill_lv))); break; case NPC_SUICIDE: @@ -7578,7 +7678,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // get back 1 trap struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); - item_tmp.nameid = su->group->item_id?su->group->item_id:ITEMID_TRAP; + item_tmp.nameid = su->group->item_id ? su->group->item_id : ITEMID_BOOBY_TRAP; item_tmp.identify = 1; if (item_tmp.nameid && (flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SKILL)) != 0) { clif->additem(sd,0,0,flag); @@ -7904,7 +8004,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case SL_SUPERNOVICE: case SL_WIZARD: //NOTE: here, 'type' has the value of the associated MAPID, not of the SC_SOULLINK constant. - if (sd && !(dstsd && (dstsd->class_&MAPID_UPPERMASK) == type)) { + if (sd != NULL && !(dstsd != NULL && (dstsd->job & MAPID_UPPERMASK) == type)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } @@ -7920,7 +8020,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin sc_start(src,src,SC_SMA_READY,100,skill_lv,skill->get_time(SL_SMA,skill_lv)); break; case SL_HIGH: - if (sd && !(dstsd && (dstsd->class_&JOBL_UPPER) && !(dstsd->class_&JOBL_2) && dstsd->status.base_level < 70)) { + if (sd != NULL && !(dstsd != NULL && (dstsd->job & JOBL_UPPER) != 0 && (dstsd->job & JOBL_2) == 0 && dstsd->status.base_level < 70)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } @@ -8081,8 +8181,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin int x,y; x = src->x; y = src->y; - if (hd) - skill->blockhomun_start(hd, skill_id, skill->get_time2(skill_id,skill_lv)); + if (hd) { +#ifdef RENEWAL + skill->blockhomun_start(hd, skill_id, skill->get_cooldown(skill_id, skill_lv)); +#else + skill->blockhomun_start(hd, skill_id, skill->get_time2(skill_id, skill_lv)); +#endif + } + if (unit->movepos(src,bl->x,bl->y,0,0)) { clif->skill_nodamage(src,src,skill_id,skill_lv,1); // Homun @@ -8455,7 +8561,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case AB_ANCILLA: if( sd ) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - skill->produce_mix(sd, skill_id, ITEMID_ANCILLA, 0, 0, 0, 1); + skill->produce_mix(sd, skill_id, ITEMID_ANSILA, 0, 0, 0, 1); } break; @@ -8573,7 +8679,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - if((dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) || rnd()%100 >= 60 + 8 * skill_lv) { + if ((dstsd != NULL && (dstsd->job & MAPID_UPPERMASK) == MAPID_SOUL_LINKER) || rnd()%100 >= 60 + 8 * skill_lv) { if (sd) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; @@ -8923,6 +9029,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case LG_TRAMPLE: clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, -30000, 1, skill_id, skill_lv, BDT_SKILL); map->foreachinrange(skill->destroy_trap,bl,skill->get_splash(skill_id,skill_lv),BL_SKILL,tick); + status_change_end(bl, SC_SV_ROOTTWIST, INVALID_TIMER); break; case LG_REFLECTDAMAGE: @@ -9129,8 +9236,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case SR_ASSIMILATEPOWER: if( flag&1 ) { int sp = 0; - if( dstsd && dstsd->spiritball && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER ) - { + if (dstsd != NULL && dstsd->spiritball != 0 && (sd == dstsd || map_flag_vs(src->m)) && (dstsd->job & MAPID_BASEMASK) != MAPID_GUNSLINGER) { sp = dstsd->spiritball; //1%sp per spiritball. pc->delspiritball(dstsd, dstsd->spiritball, 0); status_percent_heal(src, 0, sp); @@ -9148,7 +9254,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin case SR_POWERVELOCITY: if( !dstsd ) break; - if ( sd && (dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER ) { + if (sd != NULL && (dstsd->job & MAPID_BASEMASK) != MAPID_GUNSLINGER) { int i, max = pc->getmaxspiritball(dstsd, 5); for ( i = 0; i < max; i++ ) { pc->addspiritball(dstsd, skill->get_time(MO_CALLSPIRITS, 1), max); @@ -9452,6 +9558,25 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin clif->skill_damage(src,bl,tick, status_get_amotion(src), 0, 0, 1, skill_id, -2, BDT_SKILL); break; + case SU_HIDE: + if (tsce != NULL) { + clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); + status_change_end(bl, type, INVALID_TIMER); + map->freeblock_unlock(); + return 0; + } + clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); + sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)); + break; + + case SU_BUNCHOFSHRIMP: + if (sd == NULL || sd->status.party_id == 0 || flag&1) { + clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv))); + } else if (sd != NULL) { + 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 GM_SANDMAN: if( tsc ) { if( tsc->opt1 == OPT1_SLEEP ) @@ -10352,6 +10477,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case HW_GANBANTEIN: case LG_EARTHDRIVE: case SC_ESCAPE: + case SU_CN_METEOR: break; //Effect is displayed on respective switch case. default: skill->castend_pos2_effect_unknown(src, &x, &y, &skill_id, &skill_lv, &tick, &flag); @@ -10540,7 +10666,9 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui case SO_ELEMENTAL_SHIELD: case RL_B_TRAP: case MH_XENO_SLASHER: - flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete). + case SU_CN_POWDERING: + case SU_SV_ROOTTWIST: + flag |= 1; // Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete). FALLTHROUGH case GS_GROUNDDRIFT: //Ammo should be deleted right away. if ( skill_id == WM_SEVERE_RAINSTORM ) @@ -10593,11 +10721,24 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui break; case WZ_METEOR: + case SU_CN_METEOR: { int area = skill->get_splash(skill_id, skill_lv); short tmpx = 0, tmpy = 0, x1 = 0, y1 = 0; int i; +#if 0 + // The Meteor should inflict curse if Catnip fruit is consumed. + // Currently Catnip fruit is added as requirement. + if (sd && skill_id == SU_CN_METEOR) { + short item_idx = pc->search_inventory(sd, ITEMID_CATNIP_FRUIT); + if (item_idx >= 0) { + pc->delitem(sd, item_idx, 1, 0, 1, LOG_TYPE_SKILL); + flag |= 1; + } + } +#endif + for( i = 0; i < 2 + (skill_lv>>1); i++ ) { // Creates a random Cell in the Splash Area tmpx = x - area + rnd()%(area * 2 + 1); @@ -10649,6 +10790,19 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui } status_change_end(src, SC_HIDING, INVALID_TIMER); break; + case SU_LOPE: + { + if (map->list[src->m].flag.noteleport && !(map->list[src->m].flag.battleground || map_flag_gvg2(src->m))) { + x = src->x; + y = src->y; + } + clif->skill_nodamage(src, src, SU_LOPE, skill_lv, 1); + if(!map->count_oncell(src->m, x, y, BL_PC | BL_NPC | BL_MOB, 0) && map->getcell(src->m, src, x, y, CELL_CHKREACH)) { + clif->slide(src, x, y); + unit->movepos(src, x, y, 1, 0); + } + } + break; case AM_SPHEREMINE: case AM_CANNIBALIZE: { @@ -11232,7 +11386,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ nullpo_retr(NULL, st); sc = status->get_sc(src); // for traps, firewall and fogwall - celest - switch( skill_id ) { + switch (skill_id) { case SO_ELEMENTAL_SHIELD: val2 = 300 * skill_lv + 65 * (st->int_ + status->get_lv(src)) + st->max_sp; break; @@ -11329,7 +11483,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_ case RA_ICEBOUNDTRAP: { struct skill_condition req = skill->get_requirement(sd,skill_id,skill_lv); - ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY)); + ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_BOOBY_TRAP || req.itemid[i] == ITEMID_SPECIAL_ALLOY_TRAP)); if( i != MAX_SKILL_ITEM_REQUIRE && req.itemid[i] ) req_item = req.itemid[i]; if( map_flag_gvg2(src->m) || map->list[src->m].flag.battleground ) @@ -11969,6 +12123,13 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick sc_start(ss, bl, SC_VOLCANIC_ASH, 100, sg->skill_lv, skill->get_time(MH_VOLCANIC_ASH, sg->skill_lv)); break; + case UNT_CATNIPPOWDER: + if (sg->src_id == bl->id || (status_get_mode(bl)&MD_BOSS)) + break; // Does not affect the caster or Boss. + if (sce == NULL && battle->check_target(&src->bl, bl, BCT_ENEMY) > 0) + sc_start(ss, bl, type, 100, sg->skill_lv, skill->get_time(sg->skill_id, sg->skill_lv)); + break; + case UNT_GD_LEADERSHIP: case UNT_GD_GLORYWOUNDS: case UNT_GD_SOULCOLD: @@ -11995,7 +12156,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 struct skill_unit_group *sg; struct block_list *ss; struct map_session_data *tsd; - struct status_data *tstatus, *bst; + struct status_data *tstatus; struct status_change *tsc, *ssc; struct skill_unit_group_tickset *ts; enum sc_type type; @@ -12020,8 +12181,6 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 tstatus = status->get_status_data(bl); nullpo_ret(tstatus); - bst = status->get_base_status(bl); - nullpo_ret(bst); type = status->skill2sc(sg->skill_id); skill_id = sg->skill_id; @@ -12178,12 +12337,12 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 tsc->sg_counter++; //SG hit counter. if (skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0) <= 0 && tsc) tsc->sg_counter=0; //Attack absorbed. - break; + break; #endif case GS_DESPERADO: if (rnd()%100 < src->val1) skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); - break; + break; default: skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); } @@ -12697,6 +12856,8 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 if (tsc && (tsc->data[SC_HALLUCINATIONWALK] || tsc->data[SC_VACUUM_EXTREME])) { return 0; } else { + struct status_data *bst = status->get_base_status(bl); + nullpo_ret(bst); sg->limit -= 1000 * bst->str/20; sc_start(ss, bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->limit); @@ -12753,6 +12914,30 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 status->change_start(ss, bl, SC_BLIND, rnd() % 100 > sg->skill_lv * 10, sg->skill_lv, sg->skill_id, 0, 0, skill->get_time2(sg->skill_id, sg->skill_lv), SCFLAG_FIXEDTICK|SCFLAG_FIXEDRATE); break; + case UNT_SV_ROOTTWIST: + if (status_get_mode(bl)&MD_BOSS) { + break; + } + if (tsc) { + if (!sg->val2) { + int sec = skill->get_time(sg->skill_id, sg->skill_lv); + + if (sc_start2(ss, bl, type, 100, sg->skill_lv, sg->group_id, sec)) { + const struct TimerData* td = ((tsc->data[type])? timer->get(tsc->data[type]->timer) : NULL); + + if (td != NULL) + sec = DIFF_TICK32(td->tick, tick); + clif->fixpos(bl); + sg->val2 = bl->id; + } else { // Couldn't trap it? + sec = 7000; + } + sg->limit = DIFF_TICK32(tick, sg->tick) + sec; + } else if (tsc->data[type] && bl->id == sg->val2) { + skill->attack(skill->get_type(SU_SV_ROOTTWIST_ATK), ss, &src->bl, bl, SU_SV_ROOTTWIST_ATK, sg->skill_lv, tick, SD_LEVEL|SD_ANIMATION); + } + } + break; default: skill->unit_onplace_timer_unknown(src, bl, &tick); break; @@ -13060,7 +13245,7 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap) return 0; if( skill->get_inf2(skill_id)&INF2_CHORUS_SKILL ) { - if( tsd->status.party_id == sd->status.party_id && (tsd->class_&MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER ) + if (tsd->status.party_id == sd->status.party_id && (tsd->job & MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER) p_sd[(*c)++] = tsd->bl.id; return 1; } else { @@ -13069,24 +13254,23 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap) case PR_BENEDICTIO: { uint8 dir = map->calc_dir(&sd->bl,tsd->bl.x,tsd->bl.y); dir = (unit->getdir(&sd->bl) + dir)%8; //This adjusts dir to account for the direction the sd is facing. - if ((tsd->class_&MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == 2 || dir == 6) //Must be standing to the left/right of Priest. + if ((tsd->job & MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == 2 || dir == 6) //Must be standing to the left/right of Priest. && sd->status.sp >= 10) p_sd[(*c)++]=tsd->bl.id; return 1; } case AB_ADORAMUS: // Adoramus does not consume Blue Gemstone when there is at least 1 Priest class next to the caster - if( (tsd->class_&MAPID_UPPERMASK) == MAPID_PRIEST ) + if ((tsd->job & MAPID_UPPERMASK) == MAPID_PRIEST) p_sd[(*c)++] = tsd->bl.id; return 1; case WL_COMET: // Comet does not consume Red Gemstones when there is at least 1 Warlock class next to the caster - if( ( tsd->class_&MAPID_THIRDMASK ) == MAPID_WARLOCK ) + if ((tsd->job & MAPID_THIRDMASK) == MAPID_WARLOCK) p_sd[(*c)++] = tsd->bl.id; return 1; case LG_RAYOFGENESIS: - if( tsd->status.party_id == sd->status.party_id && (tsd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD && - tsd->sc.data[SC_BANDING] ) + if (tsd->status.party_id == sd->status.party_id && (tsd->job & MAPID_THIRDMASK) == MAPID_ROYAL_GUARD && tsd->sc.data[SC_BANDING]) p_sd[(*c)++] = tsd->bl.id; return 1; default: //Warning: Assuming Ensemble Dance/Songs for code speed. [Skotlex] @@ -13095,7 +13279,7 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap) if(pc_issit(tsd) || !unit->can_move(&tsd->bl)) return 0; if (sd->status.sex != tsd->status.sex && - (tsd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER && + (tsd->job & MAPID_UPPERMASK) == MAPID_BARDDANCER && (skill_lv = pc->checkskill(tsd, skill_id)) > 0 && (tsd->weapontype1==W_MUSICAL || tsd->weapontype1==W_WHIP) && sd->status.party_id && tsd->status.party_id && @@ -13207,7 +13391,7 @@ int skill_isammotype (struct map_session_data *sd, int skill_id) nullpo_ret(sd); return ( battle_config.arrow_decrement==2 && - (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) && + (sd->weapontype == W_BOW || (sd->weapontype >= W_REVOLVER && sd->weapontype <= W_GRENADE)) && skill_id != HT_PHANTASMIC && skill->get_type(skill_id) == BF_WEAPON && !(skill->get_nk(skill_id)&NK_NO_DAMAGE) && @@ -13342,7 +13526,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case SG_FUSION: case RA_WUGDASH: case KO_YAMIKUMO: - if( sc && sc->data[status->skill2sc(skill_id)] ) + case SU_HIDE: + if (sc && sc->data[status->skill2sc(skill_id)]) return 1; FALLTHROUGH default: @@ -13544,7 +13729,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case TK_MISSION: - if( (sd->class_&MAPID_UPPERMASK) != MAPID_TAEKWON ) { + if ((sd->job & MAPID_UPPERMASK) != MAPID_TAEKWON) { // Cannot be used by Non-Taekwon classes clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; @@ -13556,7 +13741,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case TK_READYSTORM: case TK_READYTURN: case TK_JUMPKICK: - if( (sd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER ) { + if ((sd->job & MAPID_UPPERMASK) == MAPID_SOUL_LINKER) { // Soul Linkers cannot use this skill clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; @@ -13567,7 +13752,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case TK_STORMKICK: case TK_DOWNKICK: case TK_COUNTER: - if ((sd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) + if ((sd->job & MAPID_UPPERMASK) == MAPID_SOUL_LINKER) return 0; //Anti-Soul Linker check in case you job-changed with Stances active. if(!(sc && sc->data[SC_COMBOATTACK]) || sc->data[SC_COMBOATTACK]->val1 == TK_JUMPKICK) return 0; //Combo needs to be ready @@ -13579,7 +13764,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id status_change_end(&sd->bl, SC_COMBOATTACK, INVALID_TIMER); return 0; } - if(sc->data[SC_COMBOATTACK]->val1 != skill_id && !( sd && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )) { + if (sc->data[SC_COMBOATTACK]->val1 != skill_id + && !(sd != NULL && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0)) { //Cancel combo wait. unit->cancel_combo(&sd->bl); return 0; @@ -13646,9 +13832,9 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id break; case PR_REDEMPTIO: { - int exp; - if( ((exp = pc->nextbaseexp(sd)) > 0 && get_percentage(sd->status.base_exp, exp) < 1) || - ((exp = pc->nextjobexp(sd)) > 0 && get_percentage(sd->status.job_exp, exp) < 1)) { + int64 exp; + if (((exp = pc->nextbaseexp(sd)) > 0 && get_percentage64(sd->status.base_exp, exp) < 1) || + ((exp = pc->nextjobexp(sd)) > 0 && get_percentage64(sd->status.job_exp, exp) < 1)) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); //Not enough exp. return 0; } @@ -13763,7 +13949,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id { int count = 0, i; for( i = 0; i < MAX_INVENTORY; i ++ ) - if( sd->status.inventory[i].nameid == ITEMID_ANCILLA ) + if (sd->status.inventory[i].nameid == ITEMID_ANSILA) count += sd->status.inventory[i].amount; if( count >= 3 ) { clif->skill_fail(sd, skill_id, USESKILL_FAIL_ANCILLA_NUMOVER, 0); @@ -14059,7 +14245,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id } break; case ST_SHIELD: - if(sd->status.shield <= 0) { + if (!sd->has_shield) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); return 0; } @@ -14369,7 +14555,7 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, clif->messagecolor_self(sd->fd, COLOR_RED, e_msg); return 0; } - if (!(require.ammo&1<<sd->inventory_data[i]->look)) { //Ammo type check. Send the "wrong weapon type" message + if (!(require.ammo&1<<sd->inventory_data[i]->subtype)) { //Ammo type check. Send the "wrong weapon type" message //which is the closest we have to wrong ammo type. [Skotlex] clif->arrow_fail(sd,0); //Haplo suggested we just send the equip-arrows message instead. [Skotlex] //clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); @@ -14396,7 +14582,7 @@ int skill_check_condition_castend(struct map_session_data* sd, uint16 skill_id, cause = USESKILL_FAIL_BLUEJAMSTONE; break; case ITEMID_HOLY_WATER: cause = USESKILL_FAIL_HOLYWATER; break; - case ITEMID_ANCILLA: + case ITEMID_ANSILA: cause = USESKILL_FAIL_ANCILLA; break; case ITEMID_ACCELERATOR: case ITEMID_HOVERING_BOOSTER: @@ -14554,7 +14740,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 case TK_READYTURN: case SG_FUSION: case KO_YAMIKUMO: - if( sc && sc->data[status->skill2sc(skill_id)] ) + case SU_HIDE: + if (sc && sc->data[status->skill2sc(skill_id)]) return req; /* Fall through */ default: @@ -14710,7 +14897,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 if ((item_index = pc->search_inventory(sd, req.itemid[i])) == INDEX_NOT_FOUND || sd->status.inventory[item_index].amount < req.amount[i] ) { - req.itemid[i] = ITEMID_TRAP_ALLOY; + req.itemid[i] = ITEMID_SPECIAL_ALLOY_TRAP; req.amount[i] = 1; } break; @@ -14737,14 +14924,14 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16 switch(skill_lv) { case 1: case 2: - req.itemid[1] = ITEMID_REPAIR_A; + req.itemid[1] = ITEMID_REPAIRA; break; case 3: case 4: - req.itemid[1] = ITEMID_REPAIR_B; + req.itemid[1] = ITEMID_REPAIRB; break; case 5: - req.itemid[1] = ITEMID_REPAIR_C; + req.itemid[1] = ITEMID_REPAIRC; break; } req.amount[1] = 1; @@ -15465,10 +15652,10 @@ void skill_weaponrefine (struct map_session_data *sd, int idx) return; } - per = status->get_refine_chance(ditem->wlv, (int)item->refine) * 10; + per = status->get_refine_chance(ditem->wlv, (int)item->refine, REFINE_CHANCE_TYPE_NORMAL) * 10; // Aegis leaked formula. [malufett] - if( sd->status.class_ == JOB_MECHANIC_T ) + if (sd->status.class == JOB_MECHANIC_T) per += 100; else per += 5 * (sd->status.job_level - 50); @@ -15494,16 +15681,16 @@ void skill_weaponrefine (struct map_session_data *sd, int idx) item->card[0] == CARD0_FORGE && (int)MakeDWord(item->card[2],item->card[3]) == sd->status.char_id) { // Fame point system [DracoRPG] - switch(ditem->wlv){ - case 1: - pc->addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point - break; - case 2: - pc->addfame(sd,25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point - break; - case 3: - pc->addfame(sd,1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point - break; + switch (ditem->wlv) { + case 1: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point + break; + case 2: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 25); // Success to refine to +10 a lv2 weapon you forged = +25 fame point + break; + case 3: + pc->addfame(sd, RANKTYPE_BLACKSMITH, 1000); // Success to refine to +10 a lv3 weapon you forged = +1000 fame point + break; } } } else { @@ -16802,7 +16989,7 @@ int skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) // revert unit back into a trap struct item item_tmp; memset(&item_tmp,0,sizeof(item_tmp)); - item_tmp.nameid = group->item_id?group->item_id:ITEMID_TRAP; + item_tmp.nameid = group->item_id ? group->item_id : ITEMID_BOOBY_TRAP; item_tmp.identify = 1; map->addflooritem(bl, &item_tmp, 1, bl->m, bl->x, bl->y, 0, 0, 0, 0); } @@ -17611,7 +17798,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, make_per = make_per * battle_config.wp_rate / 100; } - if (sd->class_&JOBL_BABY) //if it's a Baby Class + if ((sd->job & JOBL_BABY) != 0) //if it's a Baby Class make_per = (make_per * 50) / 100; //Baby penalty is 50% (bugreport:4847) if(make_per < 1) make_per = 1; @@ -17675,8 +17862,8 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, if(equip){ clif->produce_effect(sd,0,nameid); clif->misceffect(&sd->bl,3); - if(itemdb_wlv(nameid) >= 3 && ((ele? 1 : 0) + sc) >= 3) // Fame point system [DracoRPG] - pc->addfame(sd,10); // Success to forge a lv3 weapon with 3 additional ingredients = +10 fame point + if (itemdb_wlv(nameid) >= 3 && ((ele? 1 : 0) + sc) >= 3) // Fame point system [DracoRPG] + pc->addfame(sd, RANKTYPE_BLACKSMITH, 10); // Success to forge a lv3 weapon with 3 additional ingredients = +10 fame point } else { int fame = 0; tmp_item.amount = 0; @@ -17716,8 +17903,9 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid, sd->potion_success_counter = 0; } - if (fame) - pc->addfame(sd,fame); + if (fame != 0 && (skill_id == AM_PHARMACY || skill_id == AM_TWILIGHT1 || skill_id == AM_TWILIGHT2 || skill_id == AM_TWILIGHT3)) { + pc->addfame(sd, RANKTYPE_ALCHEMIST, fame); + } //Visual effects and the like. switch (skill_id) { case AM_PHARMACY: @@ -17976,16 +18164,16 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) sd->menuskill_val = 0; switch (nameid) { - case ITEMID_SCARLET_POINT: + case ITEMID_SCARLET_PTS: class_ = MOBID_MAGICDECOY_FIRE; break; - case ITEMID_INDIGO_POINT: + case ITEMID_INDIGO_PTS: class_ = MOBID_MAGICDECOY_WATER; break; - case ITEMID_LIME_GREEN_POINT: + case ITEMID_LIME_GREEN_PTS: class_ = MOBID_MAGICDECOY_WIND; break; - case ITEMID_YELLOW_WISH_POINT: + case ITEMID_YELLOW_WISH_PTS: class_ = MOBID_MAGICDECOY_EARTH; break; } @@ -18796,7 +18984,8 @@ void skill_init_unit_layout (void) void skill_init_unit_layout_unknown(int skill_idx) { - ShowError("unknown unit layout at skill %d\n", skill_idx); + Assert_retv(skill_idx >= 0 && skill_idx < MAX_SKILL_DB); + ShowError("unknown unit layout at skill %d\n", skill->dbs->db[skill_idx].nameid); } int skill_block_check(struct block_list *bl, sc_type type , uint16 skill_id) @@ -19342,7 +19531,7 @@ void skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_db * } } } - + /** * Validates "SkillInfo" when reading skill_db.conf * @param conf struct, pointer to skill configuration @@ -20254,7 +20443,7 @@ void skill_validate_additional_fields(struct config_setting_t *conf, struct s_sk bool skill_validate_skilldb(struct s_skill_db *sk, const char *source) { int idx; - + nullpo_retr(false, sk); idx = skill->get_index(sk->nameid); if (idx == 0) { @@ -20272,10 +20461,10 @@ bool skill_validate_skilldb(struct s_skill_db *sk, const char *source) strdb_iput(skill->name2id_db, skill->dbs->db[idx].name, skill->dbs->db[idx].nameid); /* Set Name to Id script constants */ script->set_constant2(skill->dbs->db[idx].name, (int)skill->dbs->db[idx].nameid, false, false); - + return true; } - + /** * Reads skill_db.conf from relative filepath and processes [ Smokexyz/Hercules ] * entries into the skill database. @@ -20289,11 +20478,11 @@ bool skill_read_skilldb(const char *filename) char filepath[256]; int count=0, index=0; bool duplicate[MAX_SKILL] = {0}; - + nullpo_retr(false, filename); sprintf(filepath,"db/%s",filename); - + if (!libconfig->load_file(&skilldb, filepath)) { return false; // Libconfig error report. } @@ -20315,9 +20504,9 @@ bool skill_read_skilldb(const char *filename) ShowError("skill_read_skilldb: Skill Id not specified for entry %d in '%s', skipping...\n", index, filepath ); continue; } - + tmp_db.nameid = skill_id; - + if((idx = skill->get_index(skill_id)) == 0) { ShowError("skill_read_skilldb: Skill Id %d is out of range, or within a reserved range (for guild, homunculus, mercenary or elemental skills). skipping...\n", idx); continue; @@ -20327,7 +20516,7 @@ bool skill_read_skilldb(const char *filename) ShowWarning("skill_read_skilldb: Duplicate Skill Id %d in entry %d in '%s', skipping...\n", skill_id, index, filepath); continue; } - + /* Skill Name Constant */ if (!libconfig->setting_lookup_mutable_string(conf, "Name", tmp_db.name, sizeof(tmp_db.name))) { ShowError("skill_read_skilldb: Name not specified for skill Id %d in '%s', skipping...\n", skill_id, filepath); @@ -20517,12 +20706,12 @@ bool skill_read_skilldb(const char *filename) /* Additional Fields for Plugins */ skill->validate_additional_fields(conf, &tmp_db); - + // Validate the skill entry, add it to the duplicate array and increment count on success. if ((duplicate[idx] = skill->validate_skilldb(&tmp_db, filepath))) count++; } - + libconfig->destroy(&skilldb); ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filepath); @@ -20554,7 +20743,7 @@ void skill_readdb(bool minimal) safestrncpy(skill->dbs->db[0].desc, "Unknown Skill", sizeof(skill->dbs->db[0].desc)); itemdb->name_constants(); // refresh ItemDB constants before loading of skills - + #ifdef ENABLE_CASE_CHECK script->parser_current_file = DBPATH"skill_db.conf"; #endif // ENABLE_CASE_CHECK @@ -20565,7 +20754,7 @@ void skill_readdb(bool minimal) if (minimal) return; - + skill->init_unit_layout(); sv->readdb(map->db_path, "produce_db.txt", ',', 4, 4+2*MAX_PRODUCE_RESOURCE, MAX_SKILL_PRODUCE_DB, skill->parse_row_producedb); sv->readdb(map->db_path, "create_arrow_db.txt", ',', 1+2, 1+2*MAX_ARROW_RESOURCE, MAX_SKILL_ARROW_DB, skill->parse_row_createarrowdb); diff --git a/src/map/skill.h b/src/map/skill.h index c7761b082..bba440107 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -1365,6 +1365,10 @@ enum e_skill { ITEM_OPTION_SPLASH_ATTACK, GM_FORCE_TRANSFER, GM_WIDE_RESURRECTION, + ALL_NIFLHEIM_RECALL, + ALL_PRONTERA_RECALL, + ALL_GLASTHEIM_RECALL, + ALL_THANATOS_RECALL, GC_DARKCROW = 5001, RA_UNLIMIT, @@ -1382,6 +1386,47 @@ enum e_skill { ALL_FULL_THROTTLE, NC_MAGMA_ERUPTION_DOTDAMAGE, + /** Summoner */ + SU_BASIC_SKILL = 5018, + SU_BITE, + SU_HIDE, + SU_SCRATCH, + SU_STOOP, + SU_LOPE, + SU_SPRITEMABLE, + SU_POWEROFLAND, + SU_SV_STEMSPEAR, + SU_CN_POWDERING, + SU_CN_METEOR, + SU_SV_ROOTTWIST, + SU_SV_ROOTTWIST_ATK, + SU_POWEROFLIFE, + SU_SCAROFTAROU, + SU_PICKYPECK, + SU_PICKYPECK_DOUBLE_ATK, + SU_ARCLOUSEDASH, + SU_LUNATICCARROTBEAT, + SU_POWEROFSEA, + SU_TUNABELLY, + SU_TUNAPARTY, + SU_BUNCHOFSHRIMP, + SU_FRESHSHRIMP, + SU_CN_METEOR2, + SU_LUNATICCARROTBEAT2, + SU_SOULATTACK, + SU_POWEROFFLOCK, + SU_SVG_SPIRIT, + SU_HISS, + SU_NYANGGRASS, + SU_GROOMING, + SU_PURRING, + SU_SHRIMPARTY, + SU_SPIRITOFLIFE, + SU_MEOWMEOW, + SU_SPIRITOFLAND, + SU_CHATTERING, + SU_SPIRITOFSEA, + HLIF_HEAL = 8001, HLIF_AVOID, HLIF_BRAIN, @@ -1651,6 +1696,9 @@ enum { UNT_B_TRAP, UNT_FIRE_RAIN, + UNT_CATNIPPOWDER, + UNT_SV_ROOTTWIST, + /** * Guild Auras **/ @@ -1922,7 +1970,7 @@ struct skill_interface { int (*get_unit_layout_type) ( uint16 skill_id ,uint16 skill_lv ); int (*get_unit_range) ( uint16 skill_id, uint16 skill_lv ); int (*get_cooldown) ( uint16 skill_id, uint16 skill_lv ); - int (*tree_get_max) ( uint16 skill_id, int b_class ); + int (*tree_get_max) (uint16 skill_id, int class); const char *(*get_name) ( uint16 skill_id ); const char *(*get_desc) ( uint16 skill_id ); /* check */ diff --git a/src/map/status.c b/src/map/status.c index 5e65244ef..ccd1e6b11 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -719,6 +719,24 @@ void initChangeTables(void) status->set_sc( GN_FIRE_EXPANSION_TEAR_GAS , SC_FIRE_EXPANSION_TEAR_GAS , SI_FIRE_EXPANSION_TEAR_GAS , SCB_NONE ); status->set_sc( GN_MANDRAGORA , SC_MANDRAGORA , SI_MANDRAGORA , SCB_INT ); + /** + * Summoner + */ + status->set_sc(SU_HIDE, SC_SUHIDE, SI_SUHIDE, SCB_SPEED); + add_sc(SU_SCRATCH, SC_BLOODING); + status->set_sc(SU_STOOP, SC_SU_STOOP, SI_SU_STOOP, SCB_NONE); + status->set_sc(SU_FRESHSHRIMP, SC_FRESHSHRIMP, SI_FRESHSHRIMP, SCB_NONE); + add_sc(SU_SV_STEMSPEAR, SC_BLOODING); + status->set_sc(SU_CN_POWDERING, SC_CATNIPPOWDER, SI_CATNIPPOWDER, SCB_WATK | SCB_SPEED | SCB_REGEN); + add_sc(SU_CN_METEOR, SC_CURSE); + set_sc_with_vfx(SU_SV_ROOTTWIST, SC_SV_ROOTTWIST, SI_SV_ROOTTWIST, SCB_NONE); + add_sc(SU_SCAROFTAROU, SC_STUN ); + status->set_sc(SU_SCAROFTAROU, SC_BITESCAR, SI_BITESCAR, SCB_NONE); + status->set_sc(SU_ARCLOUSEDASH, SC_ARCLOUSEDASH, SI_ARCLOUSEDASH, SCB_AGI | SCB_SPEED); + add_sc(SU_LUNATICCARROTBEAT, SC_STUN); + status->set_sc(SU_TUNAPARTY, SC_TUNAPARTY, SI_TUNAPARTY, SCB_NONE); + status->set_sc(SU_BUNCHOFSHRIMP, SC_SHRIMP, SI_SHRIMP, SCB_BATK | SCB_MATK); + // Elemental Spirit summoner's 'side' status changes. status->set_sc( EL_CIRCLE_OF_FIRE , SC_CIRCLE_OF_FIRE_OPTION, SI_CIRCLE_OF_FIRE_OPTION, SCB_NONE ); status->set_sc( EL_FIRE_CLOAK , SC_FIRE_CLOAK_OPTION , SI_FIRE_CLOAK_OPTION , SCB_ALL ); @@ -982,6 +1000,7 @@ void initChangeTables(void) status->dbs->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM; // Costumes + status->dbs->IconChangeTable[SC_DRESS_UP] = SI_DRESS_UP; status->dbs->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR; status->dbs->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR; status->dbs->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS; @@ -997,6 +1016,12 @@ void initChangeTables(void) status->dbs->IconChangeTable[SC_MAGICAL_FEATHER] = SI_MAGICAL_FEATHER; status->dbs->IconChangeTable[SC_BLOSSOM_FLUTTERING] = SI_BLOSSOM_FLUTTERING; + // Summoner + status->dbs->IconChangeTable[SC_SPRITEMABLE] = SI_SPRITEMABLE; + + // RoDEX + status->dbs->IconChangeTable[SC_DAILYSENDMAILCNT] = SI_DAILYSENDMAILCNT; + // Other SC which are not necessarily associated to skills. status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] |= SCB_ASPD; status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] |= SCB_ASPD; @@ -1157,6 +1182,7 @@ void initChangeTables(void) status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL; // Costumes + status->dbs->ChangeFlagTable[SC_DRESS_UP] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE; @@ -1347,6 +1373,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, status_change_end(target, SC_CLOAKING, INVALID_TIMER); status_change_end(target, SC_CHASEWALK, INVALID_TIMER); status_change_end(target, SC_CAMOUFLAGE, INVALID_TIMER); + status_change_end(target, SC_SUHIDE, INVALID_TIMER); 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] @@ -1802,6 +1829,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin (sc->data[SC_TRICKDEAD] && skill_id != NV_TRICKDEAD) || (sc->data[SC_AUTOCOUNTER] && !flag && skill_id) || (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF && skill_id != PA_GOSPEL) + || (sc->data[SC_SUHIDE] && skill_id != SU_HIDE) ) return 0; @@ -2246,14 +2274,14 @@ unsigned int status_get_base_maxsp(const struct map_session_data *sd, const stru nullpo_ret(sd); nullpo_ret(st); - val = pc->class2idx(sd->status.class_); + val = pc->class2idx(sd->status.class); val = status->dbs->SP_table[val][sd->status.base_level]; - if ( sd->class_&JOBL_UPPER ) + if ((sd->job & JOBL_UPPER) != 0) val += val * 25 / 100; - else if ( sd->class_&JOBL_BABY ) + else if ((sd->job & JOBL_BABY) != 0) val = val * 70 / 100; - if ( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON) > 0) val *= 3; //Triple max SP for top ranking Taekwons over level 90. val += val * st->int_ / 100; @@ -2267,20 +2295,20 @@ unsigned int status_get_base_maxhp(const struct map_session_data *sd, const stru nullpo_ret(sd); nullpo_ret(st); - val = pc->class2idx(sd->status.class_); + val = pc->class2idx(sd->status.class); val = status->dbs->HP_table[val][sd->status.base_level]; - if ( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99 ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99) val += 2000; //Supernovice lvl99 hp bonus. - if ( (sd->class_&MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E && sd->status.base_level >= 150 ) + if ((sd->job & MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E && sd->status.base_level >= 150) val += 2000; //Extented Supernovice lvl150 hp bonus. - if ( sd->class_&JOBL_UPPER ) + if ((sd->job & JOBL_UPPER) != 0) val += val * 25 / 100; //Trans classes get a 25% hp bonus - else if ( sd->class_&JOBL_BABY ) + else if ((sd->job & JOBL_BABY) != 0) val = val * 70 / 100; //Baby classes get a 30% hp penalty - if ( (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) ) + if ((sd->job & MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->fame_rank(sd->status.char_id, RANKTYPE_TAEKWON)) val *= 3; //Triple max HP for top ranking Taekwons over level 90. val += val * st->vit / 100; // +1% per each point of VIT @@ -2319,7 +2347,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) pc->calc_skilltree(sd); // SkillTree calculation - sd->max_weight = status->dbs->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300; + sd->max_weight = status->dbs->max_weight_base[pc->class2idx(sd->status.class)]+sd->status.str*300; if(opt&SCO_FIRST) { //Load Hp/SP from char-received data. @@ -2377,13 +2405,13 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->speed = pSpeed; } - //FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex] - //Give them all modes except these (useful for clones) + // FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex] + // Give them all modes except these (useful for clones) bstatus->mode = MD_MASK&~(MD_BOSS|MD_PLANT|MD_DETECTOR|MD_ANGRY|MD_TARGETWEAK); - bstatus->size = (sd->class_&JOBL_BABY)?SZ_SMALL:SZ_MEDIUM; + bstatus->size = ((sd->job & JOBL_BABY) != 0 || (sd->job & MAPID_BASEMASK) == MAPID_SUMMONER)?SZ_SMALL:SZ_MEDIUM; if (battle_config.character_size && (pc_isridingpeco(sd) || pc_isridingdragon(sd))) { //[Lupus] - if (sd->class_&JOBL_BABY) { + if ((sd->job & JOBL_BABY) != 0) { if (battle_config.character_size&SZ_BIG) bstatus->size++; } else { @@ -2393,7 +2421,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) } bstatus->aspd_rate = 1000; bstatus->ele_lv = 1; - bstatus->race = RC_PLAYER; + bstatus->race = ((sd->job & MAPID_BASEMASK) == MAPID_SUMMONER)?RC_BRUTE:RC_PLAYER; // Autobonus pc->delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),true); @@ -2487,8 +2515,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) if (sd->status.inventory[index].card[0]==CARD0_FORGE) { // Forged weapon wd->star += (sd->status.inventory[index].card[1]>>8); - if(wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg - if(pc->famerank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]) ,MAPID_BLACKSMITH)) + if (wd->star >= 15) + wd->star = 40; // 3 Star Crumbs now give +40 dmg + if (pc->fame_rank(MakeDWord(sd->status.inventory[index].card[2],sd->status.inventory[index].card[3]), RANKTYPE_BLACKSMITH) > 0) wd->star += 10; if (!wa->ele) //Do not overwrite element from previous bonuses. @@ -2623,6 +2652,39 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) } } + /* parse item options [Smokexyz] */ + for (i = 0; i < EQI_MAX; i++) { + status->current_equip_item_index = index = sd->equip_index[i]; + status->current_equip_option_index = -1; + + if (i == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) + continue; + else if (i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) + continue; + else if (i == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) + continue; + + if (index >= 0 && sd->inventory_data[index]) { + int j = 0; + for (j = 0; j < MAX_ITEM_OPTIONS; j++) { + int16 option_index = sd->status.inventory[index].option[j].index; + struct item_option *ito = NULL; + + if (option_index == 0 || (ito = itemdb->option_exists(option_index)) == NULL || ito->script == NULL) + continue; + + status->current_equip_option_index = j; + script->run(ito->script, 0, sd->bl.id, 0); + + if (calculating == 0) //Abort, script->run his function. [Skotlex] + return 1; + } + } + } + + status->current_equip_option_index = -1; + status->current_equip_item_index = -1; + status->calc_pc_additional(sd, opt); if( sd->pd ) { // Pet Bonus @@ -2651,9 +2713,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) sd->left_weapon.atkmods[1] = status->dbs->atkmods[1][sd->weapontype2]; sd->left_weapon.atkmods[2] = status->dbs->atkmods[2][sd->weapontype2]; - if ((pc_isridingpeco(sd) || pc_isridingdragon(sd)) - && (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR) - ) { + if ((pc_isridingpeco(sd) || pc_isridingdragon(sd)) && (sd->weapontype == W_1HSPEAR || sd->weapontype == W_2HSPEAR)) { //When Riding with spear, damage modifier to mid-class becomes //same as versus large size. sd->right_weapon.atkmods[1] = sd->right_weapon.atkmods[2]; @@ -2663,7 +2723,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) // ----- STATS CALCULATION ----- // Job bonuses - index = pc->class2idx(sd->status.class_); + index = pc->class2idx(sd->status.class); for (i = 0; i < sd->status.job_level && i < MAX_LEVEL; i++) { if(!status->dbs->job_bonus[index][i]) continue; @@ -2678,7 +2738,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) } // If a Super Novice has never died and is at least joblv 70, he gets all stats +10 - if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->die_counter == 0 && sd->status.job_level >= 70) { + if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->die_counter == 0 && sd->status.job_level >= 70) { bstatus->str += 10; bstatus->agi += 10; bstatus->vit += 10; @@ -2696,6 +2756,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->dex += skill_lv; if((skill_lv = pc->checkskill(sd,RA_RESEARCHTRAP))>0) bstatus->int_ += skill_lv; + if ((pc->checkskill(sd,SU_POWEROFLAND)) > 0) + bstatus->int_ += 20; // Bonuses from cards and equipment as well as base stat, remember to avoid overflows. i = bstatus->str + sd->status.str + sd->param_bonus[0] + sd->param_equip[0]; @@ -2715,8 +2777,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) // Base batk value is set on status->calc_misc // weapon-type bonus (FIXME: Why is the weapon_atk bonus applied to base attack?) - if (sd->status.weapon < MAX_SINGLE_WEAPON_TYPE && sd->weapon_atk[sd->status.weapon]) - bstatus->batk += sd->weapon_atk[sd->status.weapon]; + if (sd->weapontype < MAX_SINGLE_WEAPON_TYPE && sd->weapon_atk[sd->weapontype]) + bstatus->batk += sd->weapon_atk[sd->weapontype]; // Absolute modifiers from passive skills #ifndef RENEWAL if((skill_lv=pc->checkskill(sd,BS_HILTBINDING))>0) // it doesn't work in RE. @@ -2733,9 +2795,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->max_hp = (unsigned int)cap_value(i64, 0, INT_MAX); // Absolute modifiers from passive skills - if((skill_lv=pc->checkskill(sd,CR_TRUST))>0) + if ((skill_lv=pc->checkskill(sd,CR_TRUST)) > 0) bstatus->max_hp += skill_lv*200; + if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0) + bstatus->max_hp += 1000; + // Apply relative modifiers from equipment if(sd->hprate < 0) sd->hprate = 0; @@ -2768,6 +2833,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->max_sp += 200 + 20 * skill_lv; if( (skill_lv = pc->checkskill(sd,WM_LESSON)) > 0 ) bstatus->max_sp += 30 * skill_lv; + if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0) + bstatus->max_sp += 100; // Apply relative modifiers from equipment if(sd->sprate < 0) @@ -2790,7 +2857,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->hp = bstatus->max_hp; bstatus->sp = bstatus->max_sp; } else { - if((sd->class_&MAPID_BASEMASK) == MAPID_NOVICE && !(sd->class_&JOBL_2) + if ((sd->job & MAPID_BASEMASK) == MAPID_NOVICE && (sd->job & JOBL_2) == 0 && battle_config.restart_hp_rate < 50) bstatus->hp = bstatus->max_hp>>1; else @@ -2840,6 +2907,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) sd->critical_rate = 0; if(sd->critical_rate != 100) bstatus->cri = bstatus->cri * sd->critical_rate/100; + if (pc->checkskill(sd, SU_POWEROFLIFE) > 0) + bstatus->cri += 20; if(sd->flee2_rate < 0) sd->flee2_rate = 0; @@ -2857,10 +2926,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) #ifndef RENEWAL bstatus->hit += skill_lv; #endif - if(sd->status.weapon == W_BOW) + if (sd->weapontype == W_BOW) bstatus->rhw.range += skill_lv; } - if(sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE) { + if (sd->weapontype >= W_REVOLVER && sd->weapontype <= W_GRENADE) { if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0) bstatus->hit += 2*skill_lv; if((skill_lv=pc->checkskill(sd,GS_SNAKEEYE))>0) { @@ -2868,18 +2937,22 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) bstatus->rhw.range += skill_lv; } } - if( (sd->status.weapon == W_1HAXE || sd->status.weapon == W_2HAXE) && (skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0 ) + if ((sd->weapontype == W_1HAXE || sd->weapontype == W_2HAXE) && (skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0) bstatus->hit += 3*skill_lv; - if((sd->status.weapon == W_MACE || sd->status.weapon == W_2HMACE) && (skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0) + if ((sd->weapontype == W_MACE || sd->weapontype == W_2HMACE) && (skill_lv = pc->checkskill(sd,NC_TRAININGAXE)) > 0) bstatus->hit += 2*skill_lv; + if (pc->checkskill(sd, SU_POWEROFLIFE) > 0) + bstatus->hit += 20; // ----- FLEE CALCULATION ----- // Absolute modifiers from passive skills if((skill_lv=pc->checkskill(sd,TF_MISS))>0) - bstatus->flee += skill_lv*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3); + bstatus->flee += skill_lv*((sd->job & JOBL_2) != 0 && (sd->job & MAPID_BASEMASK) == MAPID_THIEF? 4 : 3); if((skill_lv=pc->checkskill(sd,MO_DODGE))>0) bstatus->flee += (skill_lv*3)>>1; + if (pc->checkskill(sd, SU_POWEROFLIFE) > 0) + bstatus->flee += 20; // ----- EQUIPMENT-DEF CALCULATION ----- // Apply relative modifiers from equipment @@ -2922,16 +2995,15 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) // Basic ASPD value 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); + bstatus->amotion = cap_value(i,((sd->job & JOBL_THIRD) != 0 ? battle_config.max_third_aspd : battle_config.max_aspd),2000); // Relative modifiers from passive skills #ifndef RENEWAL_ASPD - if((skill_lv=pc->checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) + if (sd->weapontype == W_BOOK && (skill_lv=pc->checkskill(sd,SA_ADVANCEDBOOK)) > 0) bstatus->aspd_rate -= 5*skill_lv; if((skill_lv = pc->checkskill(sd,SG_DEVIL)) > 0 && !pc->nextjobexp(sd)) bstatus->aspd_rate -= 30*skill_lv; - if((skill_lv=pc->checkskill(sd,GS_SINGLEACTION))>0 && - (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) + if (sd->weapontype >= W_REVOLVER && sd->weapontype <= W_GRENADE && (skill_lv=pc->checkskill(sd,GS_SINGLEACTION)) > 0) bstatus->aspd_rate -= ((skill_lv+1)/2) * 10; if (pc_isridingpeco(sd)) bstatus->aspd_rate += 500-100*pc->checkskill(sd,KN_CAVALIERMASTERY); @@ -3175,6 +3247,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) clif->updatestatus(sd,SP_CARTINFO); } + // Spirit Marble status activates automatically for a infinite + // amount of time when the skill is learned. Felt this was the + // best place to put this. [Rytech] + if (pc->checkskill(sd, SU_SPRITEMABLE)) + sc_start(&sd->bl, &sd->bl, SC_SPRITEMABLE, 100, 1, INFINITE_DURATION); + calculating = 0; return 0; @@ -3520,7 +3598,7 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str || sc->data[SC_OBLIVIONCURSE] != NULL || sc->data[SC_MAXIMIZEPOWER] != NULL || sc->data[SC_REBOUND] != NULL - || (bl->type == BL_PC && (BL_UCAST(BL_PC, bl)->class_&MAPID_UPPERMASK) == MAPID_MONK + || (bl->type == BL_PC && (BL_UCAST(BL_PC, bl)->job & MAPID_UPPERMASK) == MAPID_MONK && (sc->data[SC_EXTREMITYFIST] != NULL || (sc->data[SC_EXPLOSIONSPIRITS] != NULL && (sc->data[SC_SOULLINK] == NULL || sc->data[SC_SOULLINK]->val2 != SL_MONK) @@ -3584,6 +3662,10 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str regen->rate.hp += regen->rate.hp * sc->data[SC_BUCHEDENOEL]->val1 / 100; regen->rate.sp += regen->rate.sp * sc->data[SC_BUCHEDENOEL]->val2 / 100; } + if (sc->data[SC_CATNIPPOWDER]) { + regen->rate.hp *= 2; + regen->rate.sp *= 2; + } } #define status_get_homstr(st, hd) ((st)->str + (hd)->homunculus.str_value) @@ -3806,13 +3888,15 @@ 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) + if (st->luk == bst->luk) { st->cri = status->calc_critical(bl, sc, bst->cri, true); - else + } else { st->cri = status->calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true); + } + if (battle_config.show_katar_crit_bonus && bl->type == BL_PC && BL_UCAST(BL_PC, bl)->weapontype == W_KATAR) { + st->cri *= 2; + } } - if (battle_config.show_katar_crit_bonus && bl->type == BL_PC && BL_UCAST(BL_PC, bl)->status.weapon == W_KATAR) - st->cri <<= 1; if(flag&SCB_FLEE2 && bst->flee2) { if (st->luk == bst->luk) @@ -3960,7 +4044,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) #endif amotion = status->calc_fix_aspd(bl, sc, amotion); if (sd != NULL) { - st->amotion = cap_value(amotion, ((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd), 2000); + st->amotion = cap_value(amotion, ((sd->job & JOBL_THIRD) != 0 ? battle_config.max_third_aspd : battle_config.max_aspd), 2000); } else { st->amotion = cap_value(amotion, battle_config.max_aspd, 2000); } @@ -4239,12 +4323,12 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) nullpo_ret(sd); nullpo_ret(st); - amotion = status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1]; - if ( sd->status.weapon > MAX_SINGLE_WEAPON_TYPE) - amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4; - if ( sd->status.shield ) - amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_SINGLE_WEAPON_TYPE]; - switch ( sd->status.weapon ) { + amotion = status->dbs->aspd_base[pc->class2idx(sd->status.class)][sd->weapontype1]; + if (sd->weapontype > MAX_SINGLE_WEAPON_TYPE) + amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class)][sd->weapontype2] / 4; + if (sd->has_shield) + amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class)][MAX_SINGLE_WEAPON_TYPE]; + switch (sd->weapontype) { case W_BOW: case W_MUSICAL: case W_WHIP: @@ -4259,16 +4343,16 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) temp = st->dex * st->dex / 5.0f + st->agi * st->agi * 0.5f; } temp = (float)(sqrt(temp) * 0.25f) + 0xc4; - if ( (skill_lv = pc->checkskill(sd, SA_ADVANCEDBOOK)) > 0 && sd->status.weapon == W_BOOK ) + if (sd->weapontype == W_BOOK && (skill_lv = pc->checkskill(sd, SA_ADVANCEDBOOK)) > 0) val += (skill_lv - 1) / 2 + 1; if ( (skill_lv = pc->checkskill(sd, GS_SINGLEACTION)) > 0 ) val += ((skill_lv + 1) / 2); amotion = ((int)(temp + ((float)(status->calc_aspd(&sd->bl, &sd->sc, 1) + val) * st->agi / 200)) - min(amotion, 200)); #else // base weapon delay - amotion = (sd->status.weapon < MAX_SINGLE_WEAPON_TYPE) - ? (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon - : (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield + amotion = (sd->weapontype < MAX_SINGLE_WEAPON_TYPE) + ? (status->dbs->aspd_base[pc->class2idx(sd->status.class)][sd->weapontype]) // single weapon + : (status->dbs->aspd_base[pc->class2idx(sd->status.class)][sd->weapontype1] + status->dbs->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; @@ -4294,7 +4378,7 @@ unsigned short status_base_atk(const struct block_list *bl, const struct status_ return 0; if (bl->type == BL_PC) { - switch (BL_UCCAST(BL_PC, bl)->status.weapon) { + switch (BL_UCCAST(BL_PC, bl)->weapontype) { case W_BOW: case W_MUSICAL: case W_WHIP: @@ -4579,9 +4663,12 @@ unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc, if (sc->data[SC_2011RWC]) agi += sc->data[SC_2011RWC]->val1; - if(sc->data[SC_MARSHOFABYSS]) + if (sc->data[SC_MARSHOFABYSS]) agi -= agi * sc->data[SC_MARSHOFABYSS]->val2 / 100; + if (sc->data[SC_ARCLOUSEDASH]) + agi += sc->data[SC_ARCLOUSEDASH]->val2; + return (unsigned short)cap_value(agi,0,USHRT_MAX); } @@ -4914,6 +5001,9 @@ unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, if (sc->data[SC_STEAMPACK]) batk += sc->data[SC_STEAMPACK]->val1; + if (sc->data[SC_SHRIMP]) + batk += batk * sc->data[SC_SHRIMP]->val2 / 100; + return (unsigned short)cap_value(batk,0,USHRT_MAX); } @@ -5006,6 +5096,8 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, watk += watk * sc->data[SC_ANGRIFFS_MODUS]->val2/100; if( sc->data[SC_FLASHCOMBO] ) watk += sc->data[SC_FLASHCOMBO]->val2; + if (sc->data[SC_CATNIPPOWDER]) + watk -= watk * sc->data[SC_CATNIPPOWDER]->val2 / 100; return (unsigned short)cap_value(watk,0,USHRT_MAX); } @@ -5033,6 +5125,8 @@ unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc matk += 40 + 30 * sc->data[SC_ODINS_POWER]->val1; //70 lvl1, 100lvl2 if(sc->data[SC_IZAYOI]) matk += 25 * sc->data[SC_IZAYOI]->val1; + if (sc->data[SC_SHRIMP]) + matk += matk * sc->data[SC_SHRIMP]->val2 / 100; return (unsigned short)cap_value(matk,0,USHRT_MAX); #else return 0; @@ -5719,6 +5813,8 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc if (sc->data[SC_DEC_AGI] || sc->data[SC_QUAGMIRE] || sc->data[SC_DONTFORGETME]) return 0; } + if (sc->data[SC_CATNIPPOWDER]) + val = max(val, sc->data[SC_CATNIPPOWDER]->val3); if( sd && sd->bonus.speed_rate + sd->bonus.speed_add_rate > 0 ) // permanent item-based speedup val = max( val, sd->bonus.speed_rate + sd->bonus.speed_add_rate ); @@ -5741,7 +5837,7 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc val = max( val, 2 * sc->data[SC_WINDWALK]->val1 ); if( sc->data[SC_CARTBOOST] ) val = max( val, 20 ); - if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN && pc->checkskill(sd,TF_MISS) > 0 ) + if (sd != NULL && (sd->job & MAPID_UPPERMASK) == MAPID_ASSASSIN && pc->checkskill(sd,TF_MISS) > 0) val = max( val, 1 * pc->checkskill(sd,TF_MISS) ); if( sc->data[SC_CLOAKING] && (sc->data[SC_CLOAKING]->val4&1) == 1 ) val = max( val, sc->data[SC_CLOAKING]->val1 >= 10 ? 25 : 3 * sc->data[SC_CLOAKING]->val1 - 3 ); @@ -5769,6 +5865,8 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc val = max(val, sc->data[SC_MOVHASTE_HORSE]->val1); if( sd && sd->bonus.speed_rate + sd->bonus.speed_add_rate < 0 ) // permanent item-based speedup val = max( val, -(sd->bonus.speed_rate + sd->bonus.speed_add_rate) ); + if (sc->data[SC_ARCLOUSEDASH]) + val = max(val, sc->data[SC_ARCLOUSEDASH]->val3); speed_rate -= val; } @@ -5841,7 +5939,7 @@ short status_calc_aspd(struct block_list *bl, struct status_change *sc, short fl if (bl->type != BL_PC) { bonus = sc->data[SC_ASSNCROS]->val2; } else { - switch (BL_UCCAST(BL_PC, bl)->status.weapon) { + switch (BL_UCCAST(BL_PC, bl)->weapontype) { case W_BOW: case W_REVOLVER: case W_RIFLE: @@ -6002,7 +6100,7 @@ short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int if (bl->type != BL_PC) { max = sc->data[SC_ASSNCROS]->val2; } else { - switch (BL_UCCAST(BL_PC, bl)->status.weapon) { + switch (BL_UCCAST(BL_PC, bl)->weapontype) { case W_BOW: case W_REVOLVER: case W_RIFLE: @@ -6368,8 +6466,8 @@ int status_get_class(const struct block_list *bl) { nullpo_ret(bl); switch (bl->type) { - case BL_PC: return BL_UCCAST(BL_PC, bl)->status.class_; - case BL_MOB: return BL_UCCAST(BL_MOB, bl)->vd->class_; //Class used on all code should be the view class of the mob. + case BL_PC: return BL_UCCAST(BL_PC, bl)->status.class; + case BL_MOB: return BL_UCCAST(BL_MOB, bl)->vd->class; //Class used on all code should be the view class of the mob. case BL_PET: return BL_UCCAST(BL_PET, bl)->pet.class_; case BL_HOM: return BL_UCCAST(BL_HOM, bl)->homunculus.class_; case BL_MER: return BL_UCCAST(BL_MER, bl)->mercenary.class_; @@ -6711,7 +6809,7 @@ struct view_data *status_get_viewdata(struct block_list *bl) case BL_PC: return &BL_UCAST(BL_PC, bl)->vd; case BL_MOB: return BL_UCAST(BL_MOB, bl)->vd; case BL_PET: return &BL_UCAST(BL_PET, bl)->vd; - case BL_NPC: return BL_UCAST(BL_NPC, bl)->vd; + case BL_NPC: return &BL_UCAST(BL_NPC, bl)->vd; case BL_HOM: return BL_UCAST(BL_HOM, bl)->vd; case BL_MER: return BL_UCAST(BL_MER, bl)->vd; case BL_ELEM: return BL_UCAST(BL_ELEM, bl)->vd; @@ -6764,36 +6862,33 @@ void status_set_viewdata(struct block_list *bl, int class_) break; } } - sd->vd.class_ = class_; + sd->vd.class = class_; clif->get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield); - sd->vd.head_top = sd->status.head_top; - sd->vd.head_mid = sd->status.head_mid; - sd->vd.head_bottom = sd->status.head_bottom; + sd->vd.head_top = sd->status.look.head_top; + sd->vd.head_mid = sd->status.look.head_mid; + sd->vd.head_bottom = sd->status.look.head_bottom; sd->vd.hair_style = cap_value(sd->status.hair,0,battle_config.max_hair_style); sd->vd.hair_color = cap_value(sd->status.hair_color,0,battle_config.max_hair_color); sd->vd.cloth_color = cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color); - sd->vd.robe = sd->status.robe; + sd->vd.robe = sd->status.look.robe; sd->vd.body_style = sd->status.body; sd->vd.sex = sd->status.sex; if (sd->vd.cloth_color) { - if (sd->sc.option&OPTION_WEDDING && battle_config.wedding_ignorepalette) - sd->vd.cloth_color = 0; - if (sd->sc.option&OPTION_XMAS && battle_config.xmas_ignorepalette) - sd->vd.cloth_color = 0; - if (sd->sc.option&OPTION_SUMMER && battle_config.summer_ignorepalette) - sd->vd.cloth_color = 0; - if (sd->sc.option&OPTION_HANBOK && battle_config.hanbok_ignorepalette) - sd->vd.cloth_color = 0; - if (sd->sc.option&OPTION_OKTOBERFEST /* TODO: config? */) + if ((sd->sc.option & OPTION_WEDDING) != 0 && battle_config.wedding_ignorepalette == true) + sd->vd.cloth_color = 0; + if ((sd->sc.option & OPTION_XMAS) != 0 && battle_config.xmas_ignorepalette == true) + sd->vd.cloth_color = 0; + if ((sd->sc.option & OPTION_SUMMER) != 0 && battle_config.summer_ignorepalette == true) + sd->vd.cloth_color = 0; + if ((sd->sc.option & OPTION_HANBOK) != 0 && battle_config.hanbok_ignorepalette == true) + sd->vd.cloth_color = 0; + if ((sd->sc.option & OPTION_OKTOBERFEST) != 0 && battle_config.oktoberfest_ignorepalette == true) + sd->vd.cloth_color = 0; + if ((sd->sc.option & OPTION_SUMMER2) != 0 && battle_config.summer2_ignorepalette == true) sd->vd.cloth_color = 0; } - if (sd->vd.body_style - && (sd->sc.option&OPTION_WEDDING - || sd->sc.option&OPTION_XMAS - || sd->sc.option&OPTION_SUMMER - || sd->sc.option&OPTION_HANBOK - || sd->sc.option&OPTION_OKTOBERFEST)) + if (sd->vd.body_style != 0 && (sd->sc.option & OPTION_COSTUME) != 0) sd->vd.body_style = 0; } else if (vd != NULL) { memcpy(&sd->vd, vd, sizeof(struct view_data)); @@ -6816,7 +6911,7 @@ void status_set_viewdata(struct block_list *bl, int class_) struct pet_data *pd = BL_UCAST(BL_PET, bl); if (vd != NULL) { memcpy(&pd->vd, vd, sizeof(struct view_data)); - if (!pc->db_checkid(vd->class_)) { + if (!pc->db_checkid(vd->class)) { pd->vd.hair_style = battle_config.pet_hair_style; if(pd->pet.equip) { pd->vd.head_bottom = itemdb_viewid(pd->pet.equip); @@ -6832,10 +6927,14 @@ void status_set_viewdata(struct block_list *bl, int class_) case BL_NPC: { struct npc_data *nd = BL_UCAST(BL_NPC, bl); - if (vd != NULL) - nd->vd = vd; - else + if (vd != NULL) { + memcpy(&nd->vd, vd, sizeof(struct view_data)); + } else if (pc->db_checkid(class_)) { + memset(&nd->vd, 0, sizeof(struct view_data)); + nd->vd.class = class_; + } else { ShowError("status_set_viewdata (NPC): No view data for class %d (name=%s)\n", class_, nd->name); + } } break; case BL_HOM: //[blackhole89] @@ -7321,6 +7420,7 @@ void status_display_remove(struct map_session_data *sd, enum sc_type type) } } } + /** * Starts a status change. * @@ -7372,73 +7472,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t #endif // 0 } - if( sc->data[SC_REFRESH] ) { - if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed. - return 0; // Immune to status ailements - switch( type ) { - case SC_DEEP_SLEEP: - case SC__CHAOS: - case SC_BURNING: - case SC_STUN: - case SC_SLEEP: - case SC_CURSE: - case SC_STONE: - case SC_POISON: - case SC_BLIND: - case SC_SILENCE: - case SC_BLOODING: - case SC_FREEZE: - case SC_FROSTMISTY: - case SC_COLD: - case SC_TOXIN: - case SC_PARALYSE: - case SC_VENOMBLEED: - case SC_MAGICMUSHROOM: - case SC_DEATHHURT: - case SC_PYREXIA: - case SC_OBLIVIONCURSE: - case SC_MARSHOFABYSS: - case SC_MANDRAGORA: - return 0; - } - } else if( sc->data[SC_INSPIRATION] ) { - if( type >= SC_COMMON_MIN && type <= SC_COMMON_MAX ) - return 0; // Immune to status ailements - switch( type ) { - case SC_POISON: - case SC_BLIND: - case SC_STUN: - case SC_SILENCE: - case SC__CHAOS: - case SC_STONE: - case SC_SLEEP: - case SC_BLOODING: - case SC_CURSE: - case SC_BURNING: - case SC_FROSTMISTY: - case SC_FREEZE: - case SC_COLD: - case SC_FEAR: - case SC_TOXIN: - case SC_PARALYSE: - case SC_VENOMBLEED: - case SC_MAGICMUSHROOM: - case SC_DEATHHURT: - case SC_PYREXIA: - case SC_OBLIVIONCURSE: - case SC_LEECHESEND: - case SC_DEEP_SLEEP: - case SC_SATURDAY_NIGHT_FEVER: - case SC__BODYPAINT: - case SC__ENERVATION: - case SC__GROOMY: - case SC__IGNORANCE: - case SC__LAZINESS: - case SC__UNLUCKY: - case SC__WEAKNESS: - return 0; - } - } + if (status->is_immune_to_status(sc, type)) + return 0; sd = BL_CAST(BL_PC, bl); @@ -7448,8 +7483,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if( !tick ) return 0; } - undead_flag = battle->check_undead(st->race,st->def_ele); - //Check for inmunities / sc fails + undead_flag = battle->check_undead(st->race, st->def_ele); + // Check for inmunities / sc fails switch (type) { case SC_DRUMBATTLE: case SC_NIBELUNGEN: @@ -7505,6 +7540,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t return 0; break; case SC_KYRIE: + case SC_TUNAPARTY: if (bl->type == BL_MOB) return 0; break; @@ -7670,30 +7706,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1) return 0; break; - case SC_FOOD_STR_CASH: - if (sc->data[SC_FOOD_STR] && sc->data[SC_FOOD_STR]->val1 > val1) - return 0; - break; - case SC_FOOD_AGI_CASH: - if (sc->data[SC_FOOD_AGI] && sc->data[SC_FOOD_AGI]->val1 > val1) - return 0; - break; - case SC_FOOD_VIT_CASH: - if (sc->data[SC_FOOD_VIT] && sc->data[SC_FOOD_VIT]->val1 > val1) - return 0; - break; - case SC_FOOD_INT_CASH: - if (sc->data[SC_FOOD_INT] && sc->data[SC_FOOD_INT]->val1 > val1) - return 0; - break; - case SC_FOOD_DEX_CASH: - if (sc->data[SC_FOOD_DEX] && sc->data[SC_FOOD_DEX]->val1 > val1) - return 0; - break; - case SC_FOOD_LUK_CASH: - if (sc->data[SC_FOOD_LUK] && sc->data[SC_FOOD_LUK]->val1 > val1) - return 0; - break; case SC_CAMOUFLAGE: if( sd && pc->checkskill(sd, RA_CAMOUFLAGE) < 3 && !skill->check_camouflage(bl,NULL) ) return 0; @@ -7737,308 +7749,14 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t } //Check for BOSS resistances - if(st->mode&MD_BOSS && !(flag&SCFLAG_NOAVOID)) { - if (type>=SC_COMMON_MIN && type <= SC_COMMON_MAX) + if (st->mode & MD_BOSS && !(flag & SCFLAG_NOAVOID)) { + if (status->is_boss_resist_sc(type)) return 0; - switch (type) { - case SC_BLESSING: - case SC_DEC_AGI: - case SC_PROVOKE: - case SC_COMA: - case SC_GRAVITATION: - case SC_NJ_SUITON: - case SC_RICHMANKIM: - case SC_ROKISWEIL: - case SC_FOGWALL: - case SC_FROSTMISTY: - case SC_BURNING: - case SC_MARSHOFABYSS: - case SC_ADORAMUS: - case SC_NEEDLE_OF_PARALYZE: - case SC_DEEP_SLEEP: - case SC_COLD: - - // Exploit prevention - kRO Fix - case SC_PYREXIA: - case SC_DEATHHURT: - case SC_TOXIN: - case SC_PARALYSE: - case SC_VENOMBLEED: - case SC_MAGICMUSHROOM: - case SC_OBLIVIONCURSE: - case SC_LEECHESEND: - - // Ranger Effects - case SC_WUGBITE: - case SC_ELECTRICSHOCKER: - case SC_MAGNETICFIELD: - - // Masquerades - case SC__ENERVATION: - case SC__GROOMY: - case SC__LAZINESS: - case SC__UNLUCKY: - case SC__WEAKNESS: - case SC__IGNORANCE: - - // Other Effects - case SC_VACUUM_EXTREME: - case SC_NETHERWORLD: - - return 0; - } } //Before overlapping fail, one must check for status cured. - switch (type) { - case SC_BLESSING: - //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM - //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] - if ((!undead_flag && st->race!=RC_DEMON) || bl->type == BL_PC) { - status_change_end(bl, SC_CURSE, INVALID_TIMER); - if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) - status_change_end(bl, SC_STONE, INVALID_TIMER); - } - if(sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) - status_change_end(bl, SC_SOULLINK, INVALID_TIMER); - break; - case SC_INC_AGI: - status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); - if(sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) - status_change_end(bl, SC_SOULLINK, INVALID_TIMER); - break; - case SC_QUAGMIRE: - status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER); - status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER); - status_change_end(bl, SC_WINDWALK, INVALID_TIMER); - FALLTHROUGH - //Also blocks the ones below... - case SC_DEC_AGI: - case SC_ADORAMUS: - status_change_end(bl, SC_CARTBOOST, INVALID_TIMER); - //Also blocks the ones below... - FALLTHROUGH - case SC_DONTFORGETME: - status_change_end(bl, SC_INC_AGI, INVALID_TIMER); - status_change_end(bl, SC_ADRENALINE, INVALID_TIMER); - status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER); - status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); - status_change_end(bl, SC_ACCELERATION, INVALID_TIMER); - break; - case SC_ONEHANDQUICKEN: - //Removes the Aspd potion effect, as reported by Vicious. [Skotlex] - status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); - break; - case SC_OVERTHRUSTMAX: - //Cancels Normal Overthrust. [Skotlex] - status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER); - break; - case SC_KYRIE: - //Cancels Assumptio - status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); - break; - case SC_MAGNIFICAT: - //Cancels Offertorium - status_change_end(bl, SC_OFFERTORIUM, INVALID_TIMER); - break; - case SC_OFFERTORIUM: - //Cancels Magnificat - status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); - break; - case SC_DELUGE: - if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND]) - status_change_end(bl, SC_BLIND, INVALID_TIMER); - break; - case SC_SILENCE: - if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) - status_change_end(bl, SC_GOSPEL, INVALID_TIMER); - break; - case SC_HIDING: - status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER); - status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); - break; - case SC_BERSERK: - if( val3 == SC__BLOODYLUST ) - break; - if(battle_config.berserk_cancels_buffs) { - status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); - status_change_end(bl, SC_PARRYING, INVALID_TIMER); - status_change_end(bl, SC_AURABLADE, INVALID_TIMER); - status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); - } - #ifdef RENEWAL - else { - status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); - } - #endif - break; - case SC_ASSUMPTIO: - status_change_end(bl, SC_KYRIE, INVALID_TIMER); - status_change_end(bl, SC_KAITE, INVALID_TIMER); - break; - case SC_KAITE: - status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); - break; - case SC_CARTBOOST: - if (sc->data[SC_DEC_AGI] || sc->data[SC_ADORAMUS]) { - //Cancel Decrease Agi, but take no further effect [Skotlex] - status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); - status_change_end(bl, SC_ADORAMUS, INVALID_TIMER); - return 0; - } - break; - case SC_FUSION: - status_change_end(bl, SC_SOULLINK, INVALID_TIMER); - break; - case SC_GS_ADJUSTMENT: - status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER); - break; - case SC_GS_MADNESSCANCEL: - status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER); - break; - //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up - case SC_PROPERTYUNDEAD: - status_change_end(bl, SC_BLESSING, INVALID_TIMER); - status_change_end(bl, SC_INC_AGI, INVALID_TIMER); - break; - case SC_FOOD_STR: - status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER); - break; - case SC_FOOD_AGI: - status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER); - break; - case SC_FOOD_VIT: - status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER); - break; - case SC_FOOD_INT: - status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER); - break; - case SC_FOOD_DEX: - status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER); - break; - case SC_FOOD_LUK: - status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER); - break; - case SC_FOOD_STR_CASH: - status_change_end(bl, SC_FOOD_STR, INVALID_TIMER); - break; - case SC_FOOD_AGI_CASH: - status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER); - break; - case SC_FOOD_VIT_CASH: - status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER); - break; - case SC_FOOD_INT_CASH: - status_change_end(bl, SC_FOOD_INT, INVALID_TIMER); - break; - case SC_FOOD_DEX_CASH: - status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER); - break; - case SC_FOOD_LUK_CASH: - status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER); - break; - case SC_GM_BATTLE: - status_change_end(bl, SC_GM_BATTLE2, INVALID_TIMER); - break; - case SC_GM_BATTLE2: - status_change_end(bl, SC_GM_BATTLE, INVALID_TIMER); - break; - case SC_ENDURE: - if( val4 == 1 ) - status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); - break; - case SC_FIGHTINGSPIRIT: - case SC_OVERED_BOOST: - status_change_end(bl, type, INVALID_TIMER); // Remove previous one. - break; - case SC_MARSHOFABYSS: - status_change_end(bl, SC_INCAGI, INVALID_TIMER); - status_change_end(bl, SC_WINDWALK, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); - status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); - break; - //Group A Status (doesn't overlap) - case SC_SWING: - case SC_SYMPHONY_LOVE: - case SC_MOONLIT_SERENADE: - case SC_RUSH_WINDMILL: - case SC_ECHOSONG: - case SC_HARMONIZE: - case SC_FRIGG_SONG: - if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER); - if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER); - if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER); - if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER); - if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER); - if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER); - if (type != SC_FRIGG_SONG) status_change_end(bl, SC_FRIGG_SONG, INVALID_TIMER); - break; - //Group B Status - case SC_SIREN: - case SC_DEEP_SLEEP: - case SC_SIRCLEOFNATURE: - case SC_LERADS_DEW: - case SC_MELODYOFSINK: - case SC_BEYOND_OF_WARCRY: - case SC_UNLIMITED_HUMMING_VOICE: - case SC_GLOOMYDAY: - case SC_SONG_OF_MANA: - case SC_DANCE_WITH_WUG: - if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER); - if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER); - if (type != SC_SIRCLEOFNATURE) status_change_end(bl, SC_SIRCLEOFNATURE, INVALID_TIMER); - if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER); - if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER); - if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER); - if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER); - if (type != SC_GLOOMYDAY) status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER); - if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER); - if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER); - break; - case SC_REFLECTSHIELD: - status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER); - break; - case SC_LG_REFLECTDAMAGE: - status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER); - break; - case SC_SHIELDSPELL_DEF: - case SC_SHIELDSPELL_MDEF: - case SC_SHIELDSPELL_REF: - status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); - status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER); - status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER); - status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER); - break; - case SC_GENTLETOUCH_ENERGYGAIN: - case SC_GENTLETOUCH_CHANGE: - case SC_GENTLETOUCH_REVITALIZE: - if( type != SC_GENTLETOUCH_REVITALIZE ) - status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER); - if( type != SC_GENTLETOUCH_ENERGYGAIN ) - status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER); - if( type != SC_GENTLETOUCH_CHANGE ) - status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER); - break; - case SC_INVINCIBLE: - status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER); - break; - case SC_INVINCIBLEOFF: - status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER); - break; - case SC_MAGICPOWER: - status_change_end(bl, type, INVALID_TIMER); - break; - } + if (status->end_sc_before_start(bl, st, sc, type, undead_flag, val1, val2, val3, val4)) + return 0; //Check for overlapping fails if( (sce = sc->data[type]) ) { @@ -8178,12 +7896,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t int i; for( i = 0; i < MAX_PC_DEVOTION; i++ ) { if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) != NULL) - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, val3, val4, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, val3, val4, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } else if (bl->type == BL_MER) { struct mercenary_data *mc = BL_UCAST(BL_MER, bl); if (mc->devotion_flag && (tsd = mc->master) != NULL) { - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, val3, val4, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, val3, val4, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } } @@ -8282,12 +8000,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t int i; for( i = 0; i < MAX_PC_DEVOTION; i++ ) { if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) != NULL) - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } else if (bl->type == BL_MER) { struct mercenary_data *mc = BL_UCAST(BL_MER, bl); if (mc->devotion_flag && (tsd = mc->master) != NULL) { - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } } @@ -8336,7 +8054,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t #endif break; case SC_NJ_SUITON: - if (!val2 || (sd && (sd->class_&MAPID_BASEMASK) == MAPID_NINJA)) { + if (val2 == 0 || (sd != NULL && (sd->job & MAPID_BASEMASK) == MAPID_NINJA)) { //No penalties. val2 = 0; //Agi penalty val3 = 0; //Walk speed penalty @@ -8394,8 +8112,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_SUMMER: case SC_HANBOK: case SC_OKTOBERFEST: - if (!vd) return 0; - //Store previous values as they could be removed. + case SC_DRESS_UP: + if (vd == NULL) + return 0; + // Store previous values as they could be removed. unit->stop_attack(bl); break; case SC_NOCHAT: @@ -8530,6 +8250,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_TURNKICK_READY: case SC_DODGE_READY: case SC_PUSH_CART: + case SC_DAILYSENDMAILCNT: tick = INFINITE_DURATION; break; @@ -8546,12 +8267,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if( sd ) { for( i = 0; i < MAX_PC_DEVOTION; i++ ) { if (sd->devotion[i] && (tsd = map->id2sd(sd->devotion[i])) != NULL) - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } else if (bl->type == BL_MER) { struct mercenary_data *mc = BL_UCAST(BL_MER, bl); if (mc->devotion_flag && (tsd = mc->master) != NULL) { - status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_ALL); + status->change_start(bl, &tsd->bl, type, 10000, val1, val2, 0, 0, tick, SCFLAG_NOAVOID|SCFLAG_NOICON); } } } @@ -9742,6 +9463,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if (!mob->db_checkid(val1)) val1 = MOBID_PORING; break; + case SC_SPRITEMABLE: case SC_ALL_RIDING: tick = INFINITE_DURATION; break; @@ -9752,26 +9474,56 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t **/ val2 = 20+(20*val1); break; + /** + * Summoner + */ + case SC_FRESHSHRIMP: + val4 = tick / (10000 - ((val1 - 1) * 1000)); + tick_time = 10000 - ((val1 - 1) * 1000); + if (val4 <= 0) // Prevents a negeative value from happening + val4 = 0; + break; + case SC_ARCLOUSEDASH: + val2 = 15 + 5 * val1; // AGI + val3 = 25; // Move speed increase + if (sd != NULL && (sd->job & MAPID_BASEMASK) == MAPID_SUMMONER) + val4 = 10; // Ranged ATK increase + break; + case SC_TUNAPARTY: + val2 = (st->max_hp * (val1 * 10) / 100); // %Max HP to absorb + break; + case SC_BITESCAR: + val2 = 2 * val1; // MHP% damage + val4 = tick / 1000; + tick_time = 1000; + break; + case SC_SHRIMP: + val2 = 10; // BATK%, MATK% + break; + case SC_CATNIPPOWDER: + val2 = 50; // WATK%, MATK% + val3 = 25 * val1; // Move speed reduction + break; default: - if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) { - //Status change with no calc, no icon, and no skill associated...? - ShowError("UnknownStatusChange [%d]\n", type); + if (status->change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag)) { return 0; } } - } else { //Special considerations when loading SC data. - switch( type ) { + } else { // Special considerations when loading SC data. + switch (type) { case SC_WEDDING: case SC_XMAS: case SC_SUMMER: case SC_HANBOK: case SC_OKTOBERFEST: - if( !vd ) break; - clif->changelook(bl,LOOK_BASE,vd->class_); - clif->changelook(bl,LOOK_WEAPON,0); - clif->changelook(bl,LOOK_SHIELD,0); - clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color); - clif->changelook(bl,LOOK_BODY2,0); + case SC_DRESS_UP: + if (vd == NULL) + break; + clif->changelook(bl, LOOK_BASE, vd->class); + clif->changelook(bl, LOOK_WEAPON, 0); + clif->changelook(bl, LOOK_SHIELD, 0); + clif->changelook(bl, LOOK_CLOTHES_COLOR, vd->cloth_color); + clif->changelook(bl, LOOK_BODY2, 0); break; case SC_KAAHI: val4 = INVALID_TIMER; @@ -9780,27 +9532,239 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t } /* values that must be set regardless of SCFLAG_LOADED e.g. val_flag */ - switch(type) { + val_flag = status->get_val_flag(type); + + /* [Ind/Hercules] */ + status->change_start_display(sd, type, val1, val2, val3, val4); + + //Those that make you stop attacking/walking.... + status->change_start_stop_action(bl, type); + + // Set option as needed. + opt_flag = status->change_start_set_option(bl, sc, type, val1, val2, val3, val4); + + //On Aegis, when turning on a status change, first goes the option packet, then the sc packet. + if(opt_flag) { + clif->changeoption(bl); + if( sd && opt_flag&0x4 ) { + if (vd) + clif->changelook(bl, LOOK_BASE, vd->class); + clif->changelook(bl,LOOK_WEAPON,0); + clif->changelook(bl,LOOK_SHIELD,0); + if (vd) + clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color); + } + } + if (calc_flag&SCB_DYE) { + //Reset DYE color + if (vd && vd->cloth_color) { + val4 = vd->cloth_color; + clif->changelook(bl,LOOK_CLOTHES_COLOR,0); + } + calc_flag&=~SCB_DYE; + } + +#if 0 //Currently No SC's use this + if (calc_flag&SCB_BODY) { + //Reset Body Style + if (vd && vd->body_style) { + val4 = vd->body_style; + clif->changelook(bl,LOOK_BODY2,0); + } + calc_flag&=~SCB_BODY; + } +#endif + + if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->dbs->DisplayType[type])) + clif->status_change(bl,status->dbs->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. + **/ + if( tick_time ) + tick = tick_time; + + //Don't trust the previous sce assignment, in case the SC ended somewhere between there and here. + if((sce=sc->data[type])) {// reuse old sc + if( sce->timer != INVALID_TIMER ) + timer->delete(sce->timer, status->change_timer); + } else {// new sc + ++(sc->count); + sce = sc->data[type] = ers_alloc(status->data_ers, struct status_change_entry); + } + + sce->val1 = val1; + sce->val2 = val2; + sce->val3 = val3; + sce->val4 = val4; + + if (tick >= 0) { + sce->timer = timer->add(timer->gettick() + tick, status->change_timer, bl->id, type); + sce->infinite_duration = false; + } else { + sce->timer = INVALID_TIMER; //Infinite duration + sce->infinite_duration = true; + if( sd ) + chrif->save_scdata_single(sd->status.account_id,sd->status.char_id,type,sce); + } + + if (calc_flag) + status_calc_bl(bl,calc_flag); + + if(sd && sd->pd) + pet->sc_check(sd, type); //Skotlex: Pet Status Effect Healing + + switch (type) { + case SC_BERSERK: + if (!(sce->val2)) { //don't heal if already set + status->heal(bl, st->max_hp, 0, 1); //Do not use percent_heal as this healing must override BERSERK's block. + status->set_sp(bl, 0, 0); //Damage all SP + } + sce->val2 = 5 * st->max_hp / 100; + break; + case SC_HLIF_CHANGE: + status_percent_heal(bl, 100, 100); + break; + case SC_RUN: + { + struct unit_data *ud = unit->bl2ud(bl); + if( ud ) + ud->state.running = unit->run(bl, NULL, SC_RUN); + } + break; + case SC_CASH_BOSS_ALARM: + if( sd ) + clif->bossmapinfo(sd->fd, map->id2boss(sce->val1), 0); // First Message + break; + case SC_MER_HP: + status_percent_heal(bl, 100, 0); // Recover Full HP + break; + case SC_MER_SP: + status_percent_heal(bl, 0, 100); // Recover Full SP + break; + case SC_PROMOTE_HEALTH_RESERCH: + status_percent_heal(bl, sce->val4, 0); + break; + case SC_ENERGY_DRINK_RESERCH: + status_percent_heal(bl, 0, sce->val4); + break; + /** + * Ranger + **/ + case SC_WUGDASH: + { + struct unit_data *ud = unit->bl2ud(bl); + if( ud ) + ud->state.running = unit->run(bl, sd, SC_WUGDASH); + } + break; + case SC_COMBOATTACK: + switch (sce->val1) { + case TK_STORMKICK: + clif->skill_nodamage(bl,bl,TK_READYSTORM,1,1); + break; + case TK_DOWNKICK: + clif->skill_nodamage(bl,bl,TK_READYDOWN,1,1); + break; + case TK_TURNKICK: + clif->skill_nodamage(bl,bl,TK_READYTURN,1,1); + break; + case TK_COUNTER: + clif->skill_nodamage(bl,bl,TK_READYCOUNTER,1,1); + break; + case MO_COMBOFINISH: + case CH_TIGERFIST: + case CH_CHAINCRUSH: + if (sd) + clif->skillinfo(sd,MO_EXTREMITYFIST, INF_SELF_SKILL); + break; + case TK_JUMPKICK: + if (sd) + clif->skillinfo(sd,TK_JUMPKICK, INF_SELF_SKILL); + break; + case MO_TRIPLEATTACK: + if (sd && pc->checkskill(sd, SR_DRAGONCOMBO) > 0) + clif->skillinfo(sd,SR_DRAGONCOMBO, INF_SELF_SKILL); + break; + case SR_FALLENEMPIRE: + if (sd){ + clif->skillinfo(sd,SR_GATEOFHELL, INF_SELF_SKILL); + clif->skillinfo(sd,SR_TIGERCANNON, INF_SELF_SKILL); + } + break; + } + break; + case SC_RAISINGDRAGON: + sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie] + break; + } + + if( opt_flag&2 && sd && sd->touching_id ) + npc->touchnext_areanpc(sd,false); // run OnTouch_ on next char in range + + return 1; +} + +bool status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag) +{ + Assert_retr(false, type >= SC_NONE && type < SC_MAX); + if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) { + //Status change with no calc, no icon, and no skill associated...? + ShowError("UnknownStatusChange [%d]\n", type); + return true; + } + return false; +} + +void status_change_start_display(struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4) +{ + Assert_retv(type >= SC_NONE && type < SC_MAX); + + if (sd && status->dbs->DisplayType[type]) { + int dval1 = 0, dval2 = 0, dval3 = 0; + switch (type) { + case SC_ALL_RIDING: + dval1 = 1; + break; + default: /* all others: just copy val1 */ + dval1 = val1; + break; + } + status->display_add(sd, type, dval1, dval2, dval3); + } +} + +/** + * Return val_flag based on sc type. + * + * @param type Status change type. + * + * @retval val_flag. + */ +int status_get_val_flag(enum sc_type type) +{ + int val_flag = 0; + switch (type) { case SC_FIGHTINGSPIRIT: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_VENOMIMPRESS: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_POISONINGWEAPON: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_WEAPONBLOCKING: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_ROLLINGCUTTER: val_flag |= 1; break; case SC_CLOAKINGEXCEED: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_HALLUCINATIONWALK: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_SUMMON1: case SC_SUMMON2: @@ -9810,34 +9774,34 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t val_flag |= 1; break; case SC__SHADOWFORM: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC__INVISIBILITY: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC__ENERVATION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC__GROOMY: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC__LAZINESS: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC__UNLUCKY: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC__WEAKNESS: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_PROPERTYWALK: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_FORCEOFVANGUARD: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_PRESTIGE: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_BANDING: val_flag |= 1; @@ -9845,56 +9809,56 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_SHIELDSPELL_DEF: case SC_SHIELDSPELL_MDEF: case SC_SHIELDSPELL_REF: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_SPELLFIST: case SC_CURSEDCIRCLE_ATKER: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_CRESCENTELBOW: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_LIGHTNINGWALK: val_flag |= 1; break; case SC_PYROTECHNIC_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_HEATER_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_AQUAPLAY_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_COOLER_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_CHILLY_AIR_OPTION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_GUST_OPTION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_BLAST_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_WILD_STORM_OPTION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_PETROLOGY_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_CURSED_SOIL_OPTION: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_UPHEAVAL_OPTION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_CIRCLE_OF_FIRE_OPTION: - val_flag |= 1|2; + val_flag |= 1 | 2; break; case SC_WATER_BARRIER: - val_flag |= 1|2|4; + val_flag |= 1 | 2 | 4; break; case SC_KYOUGAKU: val_flag |= 1; @@ -9906,89 +9870,33 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_OVERLAPEXPUP: val_flag |= 1; break; + case SC_DAILYSENDMAILCNT: + val_flag |= 1 | 2; + break; } + return val_flag; +} - /* [Ind/Hercules] */ - if( sd && status->dbs->DisplayType[type] ) { - int dval1 = 0, dval2 = 0, dval3 = 0; - switch( type ) { - case SC_ALL_RIDING: - dval1 = 1; - break; - default: /* all others: just copy val1 */ - dval1 = val1; - break; - } - status->display_add(sd,type,dval1,dval2,dval3); - } +/** + * Set new status values. + * + * @param bl Status change target bl. + * @param sc Current statuses. + * @param type Status change type. + * @param val1 Additional value (meaning depends on type). + * @param val2 Additional value (meaning depends on type). + * @param val3 Additional value (meaning depends on type). + * @param val4 Additional value (meaning depends on type). + * + * @retval option flag. + */ +int status_change_start_set_option(struct block_list *bl, struct status_change* sc, enum sc_type type, int val1, int val2, int val3, int val4) +{ + int opt_flag = 1; - //Those that make you stop attacking/walking.... + nullpo_retr(true, bl); + nullpo_retr(true, sc); switch (type) { - case SC_VACUUM_EXTREME: - if(!map_flag_gvg(bl->m)) - unit->stop_walking(bl,1); - break; - case SC_FREEZE: - case SC_STUN: - case SC_SLEEP: - case SC_STONE: - case SC_DEEP_SLEEP: - if (sd && pc_issit(sd)) //Avoid sprite sync problems. - pc->setstand(sd); - FALLTHROUGH - case SC_TRICKDEAD: - status_change_end(bl, SC_DANCING, INVALID_TIMER); - // Cancel cast when get status [LuzZza] - if (battle_config.sc_castcancel&bl->type) - unit->skillcastcancel(bl, 0); - FALLTHROUGH - case SC_FALLENEMPIRE: - case SC_WHITEIMPRISON: - unit->stop_attack(bl); - FALLTHROUGH - case SC_STOP: - case SC_CONFUSION: - case SC_RG_CCONFINE_M: - case SC_RG_CCONFINE_S: - case SC_SPIDERWEB: - case SC_ELECTRICSHOCKER: - case SC_WUGBITE: - case SC_THORNS_TRAP: - case SC__MANHOLE: - case SC__CHAOS: - case SC_COLD: - case SC_CURSEDCIRCLE_ATKER: - case SC_CURSEDCIRCLE_TARGET: - case SC_FEAR: - case SC_MEIKYOUSISUI: - case SC_NEEDLE_OF_PARALYZE: - case SC_DEATHBOUND: - case SC_NETHERWORLD: - unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); - break; - case SC_ANKLESNARE: - if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) ) - unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); - break; - case SC_HIDING: - case SC_CLOAKING: - case SC_CLOAKINGEXCEED: - case SC_CHASEWALK: - case SC_WEIGHTOVER90: - case SC_CAMOUFLAGE: - case SC_SIREN: - case SC_ALL_RIDING: - unit->stop_attack(bl); - break; - case SC_SILENCE: - if (battle_config.sc_castcancel&bl->type) - unit->skillcastcancel(bl, 0); - break; - } - - // Set option as needed. - opt_flag = 1; - switch(type) { //OPT1 case SC_STONE: sc->opt1 = OPT1_STONEWAIT; break; case SC_FREEZE: sc->opt1 = OPT1_FREEZE; break; @@ -10066,7 +9974,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t break; #endif // 0 case SC_DANCING: - if ((val1&0xFFFF) == CG_MOONLIT) + if ((val1 & 0xFFFF) == CG_MOONLIT) sc->opt3 |= OPT3_MOONLIT; opt_flag = 0; break; @@ -10152,6 +10060,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t sc->option |= OPTION_OKTOBERFEST; opt_flag |= 0x4; break; + case SC_DRESS_UP: + sc->option |= OPTION_SUMMER2; + opt_flag |= 0x4; + break; case SC__FEINTBOMB_MASTER: sc->option |= OPTION_INVISIBLE; opt_flag |= 0x4; @@ -10159,167 +10071,511 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t default: opt_flag = 0; } + return opt_flag; +} - //On Aegis, when turning on a status change, first goes the option packet, then the sc packet. - if(opt_flag) { - clif->changeoption(bl); - if( sd && opt_flag&0x4 ) { - if (vd) - clif->changelook(bl,LOOK_BASE,vd->class_); - clif->changelook(bl,LOOK_WEAPON,0); - clif->changelook(bl,LOOK_SHIELD,0); - if (vd) - clif->changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color); - } - } - if (calc_flag&SCB_DYE) { - //Reset DYE color - if (vd && vd->cloth_color) { - val4 = vd->cloth_color; - clif->changelook(bl,LOOK_CLOTHES_COLOR,0); - } - calc_flag&=~SCB_DYE; - } - -#if 0 //Currently No SC's use this - if (calc_flag&SCB_BODY) { - //Reset Body Style - if (vd && vd->body_style) { - val4 = vd->body_style; - clif->changelook(bl,LOOK_BODY2,0); +/** + * Stop actions before start new sc. + * + * @param bl Status change target bl. + * @param type Status change type. + */ +void status_change_start_stop_action(struct block_list *bl, enum sc_type type) +{ + nullpo_retv(bl); + switch (type) { + case SC_VACUUM_EXTREME: + if (!map_flag_gvg(bl->m)) + unit->stop_walking(bl,1); + break; + case SC_FREEZE: + case SC_STUN: + case SC_SLEEP: + case SC_STONE: + case SC_DEEP_SLEEP: { + struct map_session_data *sd = BL_CAST(BL_PC, bl); + if (sd && pc_issit(sd)) //Avoid sprite sync problems. + pc->setstand(sd); + FALLTHROUGH } - calc_flag&=~SCB_BODY; - } -#endif - - if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->dbs->DisplayType[type])) - clif->status_change(bl,status->dbs->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. - **/ - if( tick_time ) - tick = tick_time; - - //Don't trust the previous sce assignment, in case the SC ended somewhere between there and here. - if((sce=sc->data[type])) {// reuse old sc - if( sce->timer != INVALID_TIMER ) - timer->delete(sce->timer, status->change_timer); - } else {// new sc - ++(sc->count); - sce = sc->data[type] = ers_alloc(status->data_ers, struct status_change_entry); - } - - sce->val1 = val1; - sce->val2 = val2; - sce->val3 = val3; - sce->val4 = val4; - - if (tick >= 0) { - sce->timer = timer->add(timer->gettick() + tick, status->change_timer, bl->id, type); - sce->infinite_duration = false; - } else { - sce->timer = INVALID_TIMER; //Infinite duration - sce->infinite_duration = true; - if( sd ) - chrif->save_scdata_single(sd->status.account_id,sd->status.char_id,type,sce); + case SC_TRICKDEAD: + status_change_end(bl, SC_DANCING, INVALID_TIMER); + // Cancel cast when get status [LuzZza] + if (battle_config.sc_castcancel&bl->type) + unit->skillcastcancel(bl, 0); + FALLTHROUGH + case SC_FALLENEMPIRE: + case SC_WHITEIMPRISON: + unit->stop_attack(bl); + FALLTHROUGH + case SC_STOP: + case SC_CONFUSION: + case SC_RG_CCONFINE_M: + case SC_RG_CCONFINE_S: + case SC_SPIDERWEB: + case SC_ELECTRICSHOCKER: + case SC_WUGBITE: + case SC_THORNS_TRAP: + case SC__MANHOLE: + case SC__CHAOS: + case SC_COLD: + case SC_CURSEDCIRCLE_ATKER: + case SC_CURSEDCIRCLE_TARGET: + case SC_FEAR: + case SC_MEIKYOUSISUI: + case SC_NEEDLE_OF_PARALYZE: + case SC_DEATHBOUND: + case SC_NETHERWORLD: + case SC_SV_ROOTTWIST: + unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); + break; + case SC_ANKLESNARE: + if (battle_config.skill_trap_type || !map_flag_gvg(bl->m)) + unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); + break; + case SC_HIDING: + case SC_CLOAKING: + case SC_CLOAKINGEXCEED: + case SC_CHASEWALK: + case SC_WEIGHTOVER90: + case SC_CAMOUFLAGE: + case SC_SIREN: + case SC_ALL_RIDING: + case SC_SUHIDE: + unit->stop_attack(bl); + break; + case SC_SILENCE: + if (battle_config.sc_castcancel & bl->type) + unit->skillcastcancel(bl, 0); + break; } +} - if (calc_flag) - status_calc_bl(bl,calc_flag); - - if(sd && sd->pd) - pet->sc_check(sd, type); //Skotlex: Pet Status Effect Healing +/** + * End sc before starting other sc. + * + * @param bl Status change target bl. + * @param st Status change data. + * @param sc Current statuses. + * @param type Status change type. + * @param undead_flag is bl undead. + * @param val1 Additional value (meaning depends on type). + * @param val2 Additional value (meaning depends on type). + * @param val3 Additional value (meaning depends on type). + * @param val4 Additional value (meaning depends on type). + * + * @retval 0 if no status change happened. + * @retval 1 if the status change was successfully applied. + */ +bool status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change* sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4) +{ + nullpo_retr(true, bl); + nullpo_retr(true, st); + nullpo_retr(true, sc); switch (type) { - case SC_BERSERK: - if (!(sce->val2)) { //don't heal if already set - status->heal(bl, st->max_hp, 0, 1); //Do not use percent_heal as this healing must override BERSERK's block. - status->set_sp(bl, 0, 0); //Damage all SP + case SC_BLESSING: + //TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM + //but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm] + if ((!undead_flag && st->race != RC_DEMON) || bl->type == BL_PC) { + status_change_end(bl, SC_CURSE, INVALID_TIMER); + if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE) + status_change_end(bl, SC_STONE, INVALID_TIMER); } - sce->val2 = 5 * st->max_hp / 100; + if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) + status_change_end(bl, SC_SOULLINK, INVALID_TIMER); break; - case SC_HLIF_CHANGE: - status_percent_heal(bl, 100, 100); + case SC_INC_AGI: + status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); + if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) + status_change_end(bl, SC_SOULLINK, INVALID_TIMER); break; - case SC_RUN: - { - struct unit_data *ud = unit->bl2ud(bl); - if( ud ) - ud->state.running = unit->run(bl, NULL, SC_RUN); - } + case SC_QUAGMIRE: + status_change_end(bl, SC_CONCENTRATION, INVALID_TIMER); + status_change_end(bl, SC_TRUESIGHT, INVALID_TIMER); + status_change_end(bl, SC_WINDWALK, INVALID_TIMER); + FALLTHROUGH + //Also blocks the ones below... + case SC_DEC_AGI: + case SC_ADORAMUS: + status_change_end(bl, SC_CARTBOOST, INVALID_TIMER); + //Also blocks the ones below... + FALLTHROUGH + case SC_DONTFORGETME: + status_change_end(bl, SC_INC_AGI, INVALID_TIMER); + status_change_end(bl, SC_ADRENALINE, INVALID_TIMER); + status_change_end(bl, SC_ADRENALINE2, INVALID_TIMER); + status_change_end(bl, SC_SPEARQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); + status_change_end(bl, SC_ACCELERATION, INVALID_TIMER); break; - case SC_CASH_BOSS_ALARM: - if( sd ) - clif->bossmapinfo(sd->fd, map->id2boss(sce->val1), 0); // First Message + case SC_ONEHANDQUICKEN: + //Removes the Aspd potion effect, as reported by Vicious. [Skotlex] + status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); break; - case SC_MER_HP: - status_percent_heal(bl, 100, 0); // Recover Full HP + case SC_OVERTHRUSTMAX: + //Cancels Normal Overthrust. [Skotlex] + status_change_end(bl, SC_OVERTHRUST, INVALID_TIMER); break; - case SC_MER_SP: - status_percent_heal(bl, 0, 100); // Recover Full SP + case SC_KYRIE: + //Cancels Assumptio + status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); break; - case SC_PROMOTE_HEALTH_RESERCH: - status_percent_heal(bl, sce->val4, 0); + case SC_MAGNIFICAT: + //Cancels Offertorium + status_change_end(bl, SC_OFFERTORIUM, INVALID_TIMER); break; - case SC_ENERGY_DRINK_RESERCH: - status_percent_heal(bl, 0, sce->val4); + case SC_OFFERTORIUM: + //Cancels Magnificat + status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); break; - /** - * Ranger - **/ - case SC_WUGDASH: - { - struct unit_data *ud = unit->bl2ud(bl); - if( ud ) - ud->state.running = unit->run(bl, sd, SC_WUGDASH); - } + case SC_DELUGE: + if (sc->data[SC_FOGWALL] && sc->data[SC_BLIND]) + status_change_end(bl, SC_BLIND, INVALID_TIMER); break; - case SC_COMBOATTACK: - switch (sce->val1) { - case TK_STORMKICK: - clif->skill_nodamage(bl,bl,TK_READYSTORM,1,1); - break; - case TK_DOWNKICK: - clif->skill_nodamage(bl,bl,TK_READYDOWN,1,1); - break; - case TK_TURNKICK: - clif->skill_nodamage(bl,bl,TK_READYTURN,1,1); - break; - case TK_COUNTER: - clif->skill_nodamage(bl,bl,TK_READYCOUNTER,1,1); - break; - case MO_COMBOFINISH: - case CH_TIGERFIST: - case CH_CHAINCRUSH: - if (sd) - clif->skillinfo(sd,MO_EXTREMITYFIST, INF_SELF_SKILL); - break; - case TK_JUMPKICK: - if (sd) - clif->skillinfo(sd,TK_JUMPKICK, INF_SELF_SKILL); - break; - case MO_TRIPLEATTACK: - if (sd && pc->checkskill(sd, SR_DRAGONCOMBO) > 0) - clif->skillinfo(sd,SR_DRAGONCOMBO, INF_SELF_SKILL); - break; - case SR_FALLENEMPIRE: - if (sd){ - clif->skillinfo(sd,SR_GATEOFHELL, INF_SELF_SKILL); - clif->skillinfo(sd,SR_TIGERCANNON, INF_SELF_SKILL); - } + case SC_SILENCE: + if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF) + status_change_end(bl, SC_GOSPEL, INVALID_TIMER); + break; + case SC_HIDING: + status_change_end(bl, SC_RG_CCONFINE_M, INVALID_TIMER); + status_change_end(bl, SC_RG_CCONFINE_S, INVALID_TIMER); + break; + case SC_BERSERK: + if (val3 == SC__BLOODYLUST) break; + if (battle_config.berserk_cancels_buffs) { + status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); + status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); + status_change_end(bl, SC_PARRYING, INVALID_TIMER); + status_change_end(bl, SC_AURABLADE, INVALID_TIMER); + status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); } + #ifdef RENEWAL + else { + status_change_end(bl, SC_TWOHANDQUICKEN, INVALID_TIMER); + } + #endif break; - case SC_RAISINGDRAGON: - sce->val2 = st->max_hp / 100;// Officially tested its 1%hp drain. [Jobbie] + case SC_ASSUMPTIO: + status_change_end(bl, SC_KYRIE, INVALID_TIMER); + status_change_end(bl, SC_KAITE, INVALID_TIMER); + break; + case SC_KAITE: + status_change_end(bl, SC_ASSUMPTIO, INVALID_TIMER); + break; + case SC_CARTBOOST: + if (sc->data[SC_DEC_AGI] || sc->data[SC_ADORAMUS]) { + //Cancel Decrease Agi, but take no further effect [Skotlex] + status_change_end(bl, SC_DEC_AGI, INVALID_TIMER); + status_change_end(bl, SC_ADORAMUS, INVALID_TIMER); + return true; + } + break; + case SC_FUSION: + status_change_end(bl, SC_SOULLINK, INVALID_TIMER); + break; + case SC_GS_ADJUSTMENT: + status_change_end(bl, SC_GS_MADNESSCANCEL, INVALID_TIMER); + break; + case SC_GS_MADNESSCANCEL: + status_change_end(bl, SC_GS_ADJUSTMENT, INVALID_TIMER); + break; + //NPC_CHANGEUNDEAD will debuff Blessing and Agi Up + case SC_PROPERTYUNDEAD: + status_change_end(bl, SC_BLESSING, INVALID_TIMER); + status_change_end(bl, SC_INC_AGI, INVALID_TIMER); + break; + case SC_FOOD_STR: + status_change_end(bl, SC_FOOD_STR, INVALID_TIMER); + break; + case SC_FOOD_AGI: + status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER); + break; + case SC_FOOD_VIT: + status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER); + break; + case SC_FOOD_INT: + status_change_end(bl, SC_FOOD_INT, INVALID_TIMER); + break; + case SC_FOOD_DEX: + status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER); + break; + case SC_FOOD_LUK: + status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER); + break; + case SC_FOOD_STR_CASH: + status_change_end(bl, SC_FOOD_STR, INVALID_TIMER); + status_change_end(bl, SC_FOOD_STR_CASH, INVALID_TIMER); + break; + case SC_FOOD_AGI_CASH: + status_change_end(bl, SC_FOOD_AGI, INVALID_TIMER); + status_change_end(bl, SC_FOOD_AGI_CASH, INVALID_TIMER); + break; + case SC_FOOD_VIT_CASH: + status_change_end(bl, SC_FOOD_VIT, INVALID_TIMER); + status_change_end(bl, SC_FOOD_VIT_CASH, INVALID_TIMER); + break; + case SC_FOOD_INT_CASH: + status_change_end(bl, SC_FOOD_INT, INVALID_TIMER); + status_change_end(bl, SC_FOOD_INT_CASH, INVALID_TIMER); + break; + case SC_FOOD_DEX_CASH: + status_change_end(bl, SC_FOOD_DEX, INVALID_TIMER); + status_change_end(bl, SC_FOOD_DEX_CASH, INVALID_TIMER); + break; + case SC_FOOD_LUK_CASH: + status_change_end(bl, SC_FOOD_LUK, INVALID_TIMER); + status_change_end(bl, SC_FOOD_LUK_CASH, INVALID_TIMER); + break; + case SC_GM_BATTLE: + status_change_end(bl, SC_GM_BATTLE2, INVALID_TIMER); + break; + case SC_GM_BATTLE2: + status_change_end(bl, SC_GM_BATTLE, INVALID_TIMER); + break; + case SC_ENDURE: + if (val4 == 1) + status_change_end(bl, SC_LKCONCENTRATION, INVALID_TIMER); + break; + case SC_FIGHTINGSPIRIT: + case SC_OVERED_BOOST: + status_change_end(bl, type, INVALID_TIMER); // Remove previous one. + break; + case SC_MARSHOFABYSS: + status_change_end(bl, SC_INCAGI, INVALID_TIMER); + status_change_end(bl, SC_WINDWALK, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION1, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION2, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); + status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); + break; + //Group A Status (doesn't overlap) + case SC_SWING: + case SC_SYMPHONY_LOVE: + case SC_MOONLIT_SERENADE: + case SC_RUSH_WINDMILL: + case SC_ECHOSONG: + case SC_HARMONIZE: + case SC_FRIGG_SONG: + if (type != SC_SWING) status_change_end(bl, SC_SWING, INVALID_TIMER); + if (type != SC_SYMPHONY_LOVE) status_change_end(bl, SC_SYMPHONY_LOVE, INVALID_TIMER); + if (type != SC_MOONLIT_SERENADE) status_change_end(bl, SC_MOONLIT_SERENADE, INVALID_TIMER); + if (type != SC_RUSH_WINDMILL) status_change_end(bl, SC_RUSH_WINDMILL, INVALID_TIMER); + if (type != SC_ECHOSONG) status_change_end(bl, SC_ECHOSONG, INVALID_TIMER); + if (type != SC_HARMONIZE) status_change_end(bl, SC_HARMONIZE, INVALID_TIMER); + if (type != SC_FRIGG_SONG) status_change_end(bl, SC_FRIGG_SONG, INVALID_TIMER); + break; + //Group B Status + case SC_SIREN: + case SC_DEEP_SLEEP: + case SC_SIRCLEOFNATURE: + case SC_LERADS_DEW: + case SC_MELODYOFSINK: + case SC_BEYOND_OF_WARCRY: + case SC_UNLIMITED_HUMMING_VOICE: + case SC_GLOOMYDAY: + case SC_SONG_OF_MANA: + case SC_DANCE_WITH_WUG: + if (type != SC_SIREN) status_change_end(bl, SC_SIREN, INVALID_TIMER); + if (type != SC_DEEP_SLEEP) status_change_end(bl, SC_DEEP_SLEEP, INVALID_TIMER); + if (type != SC_SIRCLEOFNATURE) status_change_end(bl, SC_SIRCLEOFNATURE, INVALID_TIMER); + if (type != SC_LERADS_DEW) status_change_end(bl, SC_LERADS_DEW, INVALID_TIMER); + if (type != SC_MELODYOFSINK) status_change_end(bl, SC_MELODYOFSINK, INVALID_TIMER); + if (type != SC_BEYOND_OF_WARCRY) status_change_end(bl, SC_BEYOND_OF_WARCRY, INVALID_TIMER); + if (type != SC_UNLIMITED_HUMMING_VOICE) status_change_end(bl, SC_UNLIMITED_HUMMING_VOICE, INVALID_TIMER); + if (type != SC_GLOOMYDAY) status_change_end(bl, SC_GLOOMYDAY, INVALID_TIMER); + if (type != SC_SONG_OF_MANA) status_change_end(bl, SC_SONG_OF_MANA, INVALID_TIMER); + if (type != SC_DANCE_WITH_WUG) status_change_end(bl, SC_DANCE_WITH_WUG, INVALID_TIMER); + break; + case SC_REFLECTSHIELD: + status_change_end(bl, SC_LG_REFLECTDAMAGE, INVALID_TIMER); + break; + case SC_LG_REFLECTDAMAGE: + status_change_end(bl, SC_REFLECTSHIELD, INVALID_TIMER); + break; + case SC_SHIELDSPELL_DEF: + case SC_SHIELDSPELL_MDEF: + case SC_SHIELDSPELL_REF: + status_change_end(bl, SC_MAGNIFICAT, INVALID_TIMER); + status_change_end(bl, SC_SHIELDSPELL_DEF, INVALID_TIMER); + status_change_end(bl, SC_SHIELDSPELL_MDEF, INVALID_TIMER); + status_change_end(bl, SC_SHIELDSPELL_REF, INVALID_TIMER); + break; + case SC_GENTLETOUCH_ENERGYGAIN: + case SC_GENTLETOUCH_CHANGE: + case SC_GENTLETOUCH_REVITALIZE: + if (type != SC_GENTLETOUCH_REVITALIZE) + status_change_end(bl, SC_GENTLETOUCH_REVITALIZE, INVALID_TIMER); + if (type != SC_GENTLETOUCH_ENERGYGAIN) + status_change_end(bl, SC_GENTLETOUCH_ENERGYGAIN, INVALID_TIMER); + if (type != SC_GENTLETOUCH_CHANGE) + status_change_end(bl, SC_GENTLETOUCH_CHANGE, INVALID_TIMER); + break; + case SC_INVINCIBLE: + status_change_end(bl, SC_INVINCIBLEOFF, INVALID_TIMER); + break; + case SC_INVINCIBLEOFF: + status_change_end(bl, SC_INVINCIBLE, INVALID_TIMER); + break; + case SC_MAGICPOWER: + status_change_end(bl, type, INVALID_TIMER); break; } - if( opt_flag&2 && sd && sd->touching_id ) - npc->touchnext_areanpc(sd,false); // run OnTouch_ on next char in range + return false; +} - return 1; +/** + * Check is boss resist to given sc. + * + * @param type Status change type. + * + * @retval true if boss resist. + * @retval false if boss not resist. + */ +bool status_is_boss_resist_sc(enum sc_type type) +{ + if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) + return true; + switch (type) { + case SC_BLESSING: + case SC_DEC_AGI: + case SC_PROVOKE: + case SC_COMA: + case SC_GRAVITATION: + case SC_NJ_SUITON: + case SC_RICHMANKIM: + case SC_ROKISWEIL: + case SC_FOGWALL: + case SC_FROSTMISTY: + case SC_BURNING: + case SC_MARSHOFABYSS: + case SC_ADORAMUS: + case SC_NEEDLE_OF_PARALYZE: + case SC_DEEP_SLEEP: + case SC_COLD: + + // Exploit prevention - kRO Fix + case SC_PYREXIA: + case SC_DEATHHURT: + case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_OBLIVIONCURSE: + case SC_LEECHESEND: + + // Ranger Effects + case SC_WUGBITE: + case SC_ELECTRICSHOCKER: + case SC_MAGNETICFIELD: + + // Masquerades + case SC__ENERVATION: + case SC__GROOMY: + case SC__LAZINESS: + case SC__UNLUCKY: + case SC__WEAKNESS: + case SC__IGNORANCE: + + // Other Effects + case SC_VACUUM_EXTREME: + case SC_NETHERWORLD: + case SC_FRESHSHRIMP: + case SC_SV_ROOTTWIST: + case SC_BITESCAR: + return true; + } + return false; +} + +/** + * Initial check for current statuses immune to given sc. + * + * @param sc Current statuses. + * @param type Status change type. + * + * @retval true if immune resist. + * @retval false if not immune resist. + */ +bool status_is_immune_to_status(struct status_change* sc, enum sc_type type) +{ + nullpo_retr(true, sc); + if (sc->data[SC_REFRESH]) { + if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) // Confirmed. + return true; // Immune to status ailements + switch (type) { + case SC_DEEP_SLEEP: + case SC__CHAOS: + case SC_BURNING: + case SC_STUN: + case SC_SLEEP: + case SC_CURSE: + case SC_STONE: + case SC_POISON: + case SC_BLIND: + case SC_SILENCE: + case SC_BLOODING: + case SC_FREEZE: + case SC_FROSTMISTY: + case SC_COLD: + case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_DEATHHURT: + case SC_PYREXIA: + case SC_OBLIVIONCURSE: + case SC_MARSHOFABYSS: + case SC_MANDRAGORA: + return true; + } + } else if (sc->data[SC_INSPIRATION]) { + if (type >= SC_COMMON_MIN && type <= SC_COMMON_MAX) + return true; // Immune to status ailements + switch (type) { + case SC_POISON: + case SC_BLIND: + case SC_STUN: + case SC_SILENCE: + case SC__CHAOS: + case SC_STONE: + case SC_SLEEP: + case SC_BLOODING: + case SC_CURSE: + case SC_BURNING: + case SC_FROSTMISTY: + case SC_FREEZE: + case SC_COLD: + case SC_FEAR: + case SC_TOXIN: + case SC_PARALYSE: + case SC_VENOMBLEED: + case SC_MAGICMUSHROOM: + case SC_DEATHHURT: + case SC_PYREXIA: + case SC_OBLIVIONCURSE: + case SC_LEECHESEND: + case SC_DEEP_SLEEP: + case SC_SATURDAY_NIGHT_FEVER: + case SC__BODYPAINT: + case SC__ENERVATION: + case SC__GROOMY: + case SC__IGNORANCE: + case SC__LAZINESS: + case SC__UNLUCKY: + case SC__WEAKNESS: + return true; + } + } + return false; } /*========================================== @@ -10492,7 +10748,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const } if (begin_spurt && sce->val1 >= 7 && DIFF_TICK(timer->gettick(), starttick) <= 1000 - && (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0)) + && (!sd || (sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST)) ) sc_start(bl, bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1)); } @@ -10821,10 +11077,11 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const break; case SC_NEUTRALBARRIER_MASTER: case SC_STEALTHFIELD_MASTER: - if( sce->val2 ) { + case SC_SV_ROOTTWIST: + if (sce->val2) { struct skill_unit_group* group = skill->id2group(sce->val2); sce->val2 = 0; - if( group ) /* might have been cleared before status ended, e.g. land protector */ + if (group) /* might have been cleared before status ended, e.g. land protector */ skill->del_unitgroup(group,ALC_MARK); } break; @@ -10959,6 +11216,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const sc->option &= ~OPTION_OKTOBERFEST; opt_flag |= 0x4; break; + case SC_DRESS_UP: + sc->option &= ~OPTION_SUMMER2; + opt_flag |= 0x4; + break; case SC__FEINTBOMB_MASTER: sc->option &= ~OPTION_INVISIBLE; opt_flag |= 0x4; @@ -11102,7 +11363,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const else if(opt_flag) { clif->changeoption(bl); if( sd && opt_flag&0x4 ) { - clif->changelook(bl,LOOK_BASE,sd->vd.class_); + clif->changelook(bl, LOOK_BASE, sd->vd.class); clif->get_weapon_view(sd, &sd->vd.weapon, &sd->vd.shield); clif->changelook(bl,LOOK_WEAPON,sd->vd.weapon); clif->changelook(bl,LOOK_SHIELD,sd->vd.shield); @@ -12016,6 +12277,19 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) return 0; } break; + case SC_FRESHSHRIMP: + if (--(sce->val4) >= 0) { + status_heal(bl, st->max_hp / 100, 0, 2); + sc_timer_next((10000 - ((sce->val1 - 1) * 1000)) + tick, status->change_timer, bl->id, data); + } + break; + case SC_BITESCAR: + if (--(sce->val4) >= 0) { + status_percent_damage(bl, bl, -(sce->val2), 0, 0); + sc_timer_next(1000 + tick, status->change_timer, bl->id, data); + return 0; + } + break; } // default for all non-handled control paths is to end the status @@ -12202,6 +12476,10 @@ void status_get_matk_sub(struct block_list *bl, int flag, unsigned short *matk_m // Any +MATK you get from skills and cards, including cards in weapon, is added here. if ( sd && sd->bonus.ematk > 0 && flag != 3 ) *matk_min += sd->bonus.ematk; + if (sd && pc->checkskill(sd, SU_POWEROFLAND) > 0) { + if (pc->checkskill(sd, SU_SV_STEMSPEAR) == 5 && pc->checkskill(sd, SU_CN_POWDERING) == 5 && pc->checkskill(sd, SU_CN_METEOR) == 5 && pc->checkskill(sd, SU_SV_ROOTTWIST) == 5) + *matk_min += *matk_min * 20 / 100; + } if ( flag != 3 ) *matk_min = status->calc_ematk(bl, sc, *matk_min); @@ -12213,6 +12491,8 @@ void status_get_matk_sub(struct block_list *bl, int flag, unsigned short *matk_m if ( (st->rhw.matk + st->lhw.matk) > 0 ) { int wMatk = st->rhw.matk + st->lhw.matk; // Left and right matk stacks int variance = wMatk * st->rhw.wlv / 10; // Only use right hand weapon level + if (sc != NULL && sc->data[SC_CATNIPPOWDER]) + wMatk -= wMatk * sc->data[SC_CATNIPPOWDER]->val2 / 100; *matk_min += wMatk - variance; *matk_max += wMatk + variance; } @@ -12682,7 +12962,7 @@ int status_natural_heal(struct block_list* bl, va_list args) if ((rate = pc->checkskill(sd,TK_SPTIME))) sc_start(bl,bl,status->skill2sc(TK_SPTIME), 100,rate,skill->get_time(TK_SPTIME, rate)); - if ((sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR + if ((sd->job & MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&rnd()%10000 < battle_config.sg_angel_skill_ratio ) { //Angel of the Sun/Moon/Star @@ -12715,13 +12995,17 @@ int status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) * @param refine The target refine level * @return The chance to refine the item, in percent (0~100) **/ -int status_get_refine_chance(enum refine_type wlv, int refine) +int status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) { Assert_ret((int)wlv >= REFINE_TYPE_ARMOR && wlv < REFINE_TYPE_MAX); - if ( refine < 0 || refine >= MAX_REFINE) - return 0; - return status->dbs->refine_info[wlv].chance[refine]; + if (refine < 0 || refine >= MAX_REFINE) + return 0; + + if (type >= REFINE_CHANCE_TYPE_MAX) + return 0; + + return status->dbs->refine_info[wlv].chance[type][refine]; } int status_get_sc_type(sc_type type) @@ -12952,15 +13236,15 @@ void status_read_job_db(void) /* [malufett/Hercules] */ return; while ( (jdb = libconfig->setting_get_elem(job_db_conf.root, i++)) ) { - int class_, idx; + int class, idx; const char *name = config_setting_name(jdb); - if ( (class_ = pc->check_job_name(name)) == -1 ) { + if ((class = pc->check_job_name(name)) == -1) { ShowWarning("pc_read_job_db: '%s' unknown job name!\n", name); continue; } - idx = pc->class2idx(class_); + idx = pc->class2idx(class); status->read_job_db_sub(idx, name, jdb); } ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", i, config_filename); @@ -12969,17 +13253,16 @@ void status_read_job_db(void) /* [malufett/Hercules] */ bool status_readdb_job2(char* fields[], int columns, int current) { - int idx, class_, i; + int idx, class, i; nullpo_retr(false, fields); - class_ = atoi(fields[0]); + class = atoi(fields[0]); - if(!pc->db_checkid(class_)) - { - ShowWarning("status_readdb_job2: Invalid job class %d specified.\n", class_); + if (!pc->db_checkid(class)) { + ShowWarning("status_readdb_job2: Invalid job class %d specified.\n", class); return false; } - idx = pc->class2idx(class_); + idx = pc->class2idx(class); for(i = 1; i < columns; i++) { @@ -13047,54 +13330,84 @@ int status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *n if ((rate=libconfig->setting_get_member(r, "Rates")) != NULL && config_setting_is_group(rate)) { struct config_setting_t *t = NULL; bool duplicate[MAX_REFINE]; - int bonus[MAX_REFINE], rnd_bonus[MAX_REFINE], chance[MAX_REFINE]; - int i; + int bonus[MAX_REFINE], rnd_bonus[MAX_REFINE]; + int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE]; + int i, j; + memset(&duplicate, 0, sizeof(duplicate)); memset(&bonus, 0, sizeof(bonus)); memset(&rnd_bonus, 0, sizeof(rnd_bonus)); - for (i = 0; i < MAX_REFINE; i++) { - chance[i] = 100; - } + for (i = 0; i < REFINE_CHANCE_TYPE_MAX; i++) + for (j = 0; j < MAX_REFINE; j++) + chance[i][j] = 100; // default value for all rates. + i = 0; + j = 0; while ((t = libconfig->setting_get_elem(rate,i++)) != NULL && config_setting_is_group(t)) { int level = 0, i32; char *rlvl = config_setting_name(t); memset(&lv, 0, sizeof(lv)); - if (!strspn(&rlvl[strlen(rlvl)-1], "0123456789") || (level = atoi(strncpy(lv, rlvl+2, 3))) <= 0) { + + if (!strspn(&rlvl[strlen(rlvl) - 1], "0123456789") || (level = atoi(strncpy(lv, rlvl + 2, 3))) <= 0) { ShowError("status_readdb_refine_libconfig_sub: Invalid refine level format '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source); continue; } + if (level <= 0 || level > MAX_REFINE) { ShowError("status_readdb_refine_libconfig_sub: Out of range refine level '%s' for entry %s in \"%s\"... skipping.\n", rlvl, name, source); continue; } + level--; + if (duplicate[level]) { ShowWarning("status_readdb_refine_libconfig_sub: duplicate rate '%s' for entry %s in \"%s\", overwriting previous entry...\n", rlvl, name, source); } else { duplicate[level] = true; } - if (libconfig->setting_lookup_int(t, "Chance", &i32)) - chance[level] = i32; + + if (libconfig->setting_lookup_int(t, "NormalChance", &i32) != 0) + chance[REFINE_CHANCE_TYPE_NORMAL][level] = i32; + else + chance[REFINE_CHANCE_TYPE_NORMAL][level] = 100; + + if (libconfig->setting_lookup_int(t, "EnrichedChance", &i32) != 0) + chance[REFINE_CHANCE_TYPE_ENRICHED][level] = i32; else - chance[level] = 100; - if (libconfig->setting_lookup_int(t, "Bonus", &i32)) + chance[REFINE_CHANCE_TYPE_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only. + + if (libconfig->setting_lookup_int(t, "EventNormalChance", &i32) != 0) + chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = i32; + else + chance[REFINE_CHANCE_TYPE_E_NORMAL][level] = 100; + + if (libconfig->setting_lookup_int(t, "EventEnrichedChance", &i32) != 0) + chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = i32; + else + chance[REFINE_CHANCE_TYPE_E_ENRICHED][level] = level > 10 ? 0 : 100; // enriched ores up to +10 only. + + if (libconfig->setting_lookup_int(t, "Bonus", &i32) != 0) bonus[level] += i32; + if (level >= rnd_bonus_lv - 1) rnd_bonus[level] = rnd_bonus_v * (level - rnd_bonus_lv + 2); } for (i = 0; i < MAX_REFINE; i++) { - status->dbs->refine_info[type].chance[i] = chance[i]; + status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_NORMAL][i] = chance[REFINE_CHANCE_TYPE_NORMAL][i]; + status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_NORMAL][i] = chance[REFINE_CHANCE_TYPE_E_NORMAL][i]; + status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_ENRICHED][i]; + status->dbs->refine_info[type].chance[REFINE_CHANCE_TYPE_E_ENRICHED][i] = chance[REFINE_CHANCE_TYPE_E_ENRICHED][i]; status->dbs->refine_info[type].randombonus_max[i] = rnd_bonus[i]; - bonus[i] += bonus_per_level + (i > 0 ? bonus[i-1] : 0); + bonus[i] += bonus_per_level + (i > 0 ? bonus[i - 1] : 0); status->dbs->refine_info[type].bonus[i] = bonus[i]; } } else { ShowWarning("status_readdb_refine_libconfig_sub: Missing refine rates for entry '%s' in \"%s\", skipping.\n", name, source); return 0; } - return type+1; + + return type + 1; } /** @@ -13111,7 +13424,7 @@ int status_readdb_refine_libconfig(const char *filename) char filepath[256]; int i = 0, count = 0; - sprintf(filepath, "%s/%s", map->db_path, filename); + safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename); if (!libconfig->load_file(&refine_db_conf, filepath)) return 0; @@ -13188,15 +13501,6 @@ int status_readdb(void) for(j = 0; j < MAX_SINGLE_WEAPON_TYPE; j++) status->dbs->atkmods[i][j] = 100; - // refine_db.txt - for(i=0;i<ARRAYLENGTH(status->dbs->refine_info);i++) { - for(j=0;j<MAX_REFINE; j++) { - status->dbs->refine_info[i].chance[j] = 100; - status->dbs->refine_info[i].bonus[j] = 0; - status->dbs->refine_info[i].randombonus_max[j] = 0; - } - } - // read databases // sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2); @@ -13308,6 +13612,12 @@ void status_defaults(void) status->change_clear = status_change_clear; status->change_clear_buffs = status_change_clear_buffs; + status->is_immune_to_status = status_is_immune_to_status; + status->is_boss_resist_sc = status_is_boss_resist_sc; + status->end_sc_before_start = status_end_sc_before_start; + status->change_start_stop_action = status_change_start_stop_action; + status->change_start_set_option = status_change_start_set_option; + status->get_val_flag = status_get_val_flag; status->calc_bl_ = status_calc_bl_; status->calc_mob_ = status_calc_mob_; status->calc_pet_ = status_calc_pet_; @@ -13375,6 +13685,8 @@ void status_defaults(void) status->calc_ematk = status_calc_ematk; status->calc_bl_main = status_calc_bl_main; status->display_add = status_display_add; + status->change_start_display = status_change_start_display; + status->change_start_unknown_sc = status_change_start_unknown_sc; status->display_remove = status_display_remove; status->natural_heal = status_natural_heal; status->natural_heal_timer = status_natural_heal_timer; diff --git a/src/map/status.h b/src/map/status.h index e4a326e88..a104c66ab 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -828,6 +828,23 @@ typedef enum sc_type { SC_M_LIFEPOTION, SC_G_LIFEPOTION, // 640 SC_MYSTICPOWDER, + + // Summoner + SC_SUHIDE, + SC_SU_STOOP, + SC_SPRITEMABLE, + SC_CATNIPPOWDER, + SC_SV_ROOTTWIST, + SC_BITESCAR, + SC_ARCLOUSEDASH, + SC_TUNAPARTY, + SC_SHRIMP, // 650 + SC_FRESHSHRIMP, + + SC_DRESS_UP, + + // Rodex + SC_DAILYSENDMAILCNT, #ifndef SC_MAX SC_MAX, //Automatically updated max, used in for's to check we are within bounds. #endif @@ -1677,7 +1694,7 @@ enum si_type { //SI_SHOW_NPCHPBAR = 821, SI_FLOWERSMOKE = 822, SI_FSTONE = 823, - //SI_DAILYSENDMAILCNT = 824, + SI_DAILYSENDMAILCNT = 824, //SI_QSCARABA = 825, SI_LJOSALFAR = 826, //SI_PAD_READER_KNIGHT = 827, @@ -1710,7 +1727,7 @@ enum si_type { //SI_SUMMEREVENT04 = 853, //SI_SUMMEREVENT05 = 854, //SI_MINIGAME_ROULETTE_BONUS_ITEM = 855, - //SI_DRESS_UP = 856, + SI_DRESS_UP = 856, SI_MAPLE_FALLS = 857, //SI_ALL_NIFLHEIM_RECALL = 858, //SI_ = 859, @@ -1747,10 +1764,10 @@ enum si_type { //SI_HEALTHSTATE_HEAVYPOISON = 890, //SI_HEALTHSTATE_FEAR = 891, //SI_CHERRY_BLOSSOM_CAKE = 892, - //SI_SU_STOOP = 893, - //SI_CATNIPPOWDER = 894, + SI_SU_STOOP = 893, + SI_CATNIPPOWDER = 894, SI_BLOSSOM_FLUTTERING = 895, - //SI_SV_ROOTTWIST = 896, + SI_SV_ROOTTWIST = 896, //SI_ATTACK_PROPERTY_NOTHING = 897, //SI_ATTACK_PROPERTY_WATER = 898, //SI_ATTACK_PROPERTY_GROUND = 899, @@ -1772,11 +1789,11 @@ enum si_type { //SI_RESIST_PROPERTY_DARKNESS = 914, //SI_RESIST_PROPERTY_TELEKINESIS = 915, //SI_RESIST_PROPERTY_UNDEAD = 916, - //SI_BITESCAR = 917, - //SI_ARCLOUSEDASH = 918, - //SI_TUNAPARTY = 919, - //SI_SHRIMP = 920, - //SI_FRESHSHRIMP = 921, + SI_BITESCAR = 917, + SI_ARCLOUSEDASH = 918, + SI_TUNAPARTY = 919, + SI_SHRIMP = 920, + SI_FRESHSHRIMP = 921, //SI_PERIOD_RECEIVEITEM = 922, //SI_PERIOD_PLUSEXP = 923, //SI_PERIOD_PLUSJOBEXP = 924, @@ -1788,14 +1805,78 @@ enum si_type { //SI_HELM_ISIA = 930, //SI_HELM_ASIR = 931, //SI_HELM_URJ = 932, - //SI_SUHIDE = 933, + SI_SUHIDE = 933, //SI_ = 934, //SI_DORAM_BUF_01 = 935, //SI_DORAM_BUF_02 = 936, - //SI_SPRITEMABLE = 937, + SI_SPRITEMABLE = 937, + //SI_AID_PERIOD_RECEIVEITEM = 938, + //SI_AID_PERIOD_PLUSEXP = 939, + //SI_AID_PERIOD_PLUSJOBEXP = 940, + //SI_AID_PERIOD_DEADPENALTY = 941, + //SI_AID_PERIOD_ADDSTOREITEMCOUNT = 942, + //SI_ = 943, + //SI_ = 944, + //SI_ = 945, + //SI_ = 946, + //SI_ = 947, + //SI_ = 948, + //SI_ = 949, + //SI_HISS = 950, + //SI_ = 951, + //SI_NYANGGRASS = 952, + //SI_CHATTERING = 953, + //SI_ = 954, + //SI_ = 955, + //SI_ = 956, + //SI_ = 957, + //SI_ = 958, + //SI_ = 959, + //SI_ = 960, + //SI_GROOMING = 961, + //SI_PROTECTIONOFSHRIMP = 962, //SI_EP16_2_BUFF_SS = 963, //SI_EP16_2_BUFF_SC = 964, //SI_EP16_2_BUFF_AC = 965, + //SI_GS_MAGICAL_BULLET = 966, + //SI_ = 967, + //SI_ = 968, + //SI_ = 969, + //SI_ = 970, + //SI_ = 971, + //SI_ = 972, + //SI_ = 973, + //SI_ = 974, + //SI_ = 975, + //SI_FALLEN_ANGEL = 976, + //SI_ = 977, + //SI_ = 978, + //SI_BLAZE_BEAD = 979, + //SI_FROZEN_BEAD = 980, + //SI_BREEZE_BEAD = 981, + //SI_ = 982, + //SI_AID_PERIOD_RECEIVEITEM_2ND = 983, + //SI_AID_PERIOD_PLUSEXP_2ND = 984, + //SI_AID_PERIOD_PLUSJOBEXP_2ND = 985, + //SI_PRONTERA_JP = 986, + //SI_ = 987, + //SI_GLOOM_CARD = 988, + //SI_PHARAOH_CARD = 989, + //SI_KIEL_CARD = 990, + //SI_ = 991, + //SI_CHEERUP = 992, + //SI_ = 993, + //SI_ = 994, + //SI_S_MANAPOTION = 995, + //SI_M_DEFSCROLL = 996, + //SI_ = 997, + //SI_ = 998, + //SI_ = 999, + //SI_AS_RAGGED_GOLEM_CARD = 1000, + //SI_LHZ_DUN_N1 = 1001, + //SI_LHZ_DUN_N2 = 1002, + //SI_LHZ_DUN_N3 = 1003, + //SI_LHZ_DUN_N4 = 1004, #ifndef SI_MAX SI_MAX, #endif @@ -1846,7 +1927,7 @@ enum e_mode //who were not on your field of sight when it happened) //opt1: Non stackable status changes. -enum { +enum e_opt1 { OPT1_STONE = 1, //Petrified OPT1_FREEZE, OPT1_STUN, @@ -1859,7 +1940,7 @@ enum { }; //opt2: Stackable status changes. -enum { +enum e_opt2 { OPT2_POISON = 0x0001, OPT2_CURSE = 0x0002, OPT2_SILENCE = 0x0004, @@ -1872,7 +1953,7 @@ enum { }; //opt3: (SHOW_EFST_*) -enum { +enum e_opt3 { OPT3_NORMAL = 0x00000000, OPT3_QUICKEN = 0x00000001, OPT3_OVERTHRUST = 0x00000002, @@ -2155,9 +2236,17 @@ struct status_change { #define status_calc_elemental(ed, opt) (status->calc_bl_(&(ed)->bl, SCB_ALL, (opt))) #define status_calc_npc(nd, opt) (status->calc_bl_(&(nd)->bl, SCB_ALL, (opt))) +enum refine_chance_type { + REFINE_CHANCE_TYPE_NORMAL = 0, // Normal Chance + REFINE_CHANCE_TYPE_ENRICHED = 1, // Enriched Ore Chance + REFINE_CHANCE_TYPE_E_NORMAL = 2, // Event Normal Ore Chance + REFINE_CHANCE_TYPE_E_ENRICHED = 3, // Event Enriched Ore Chance + REFINE_CHANCE_TYPE_MAX +}; + // bonus values and upgrade chances for refining equipment struct s_refine_info { - int chance[MAX_REFINE]; // success chance + int chance[REFINE_CHANCE_TYPE_MAX][MAX_REFINE]; // success chance int bonus[MAX_REFINE]; // cumulative fixed bonus damage int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage }; @@ -2193,6 +2282,7 @@ struct status_interface { /* vars */ int current_equip_item_index; int current_equip_card_id; + int current_equip_option_index; struct s_status_dbs *dbs; @@ -2204,7 +2294,7 @@ struct status_interface { int (*init) (bool minimal); void (*final) (void); /* funcs */ - int (*get_refine_chance) (enum refine_type wlv, int refine); + int (*get_refine_chance) (enum refine_type wlv, int refine, enum refine_chance_type type); // for looking up associated data sc_type (*skill2sc) (int skill_id); int (*sc2skill) (sc_type sc); @@ -2244,6 +2334,14 @@ struct status_interface { int (*get_sc_def) (struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag); int (*change_start) (struct block_list *src, 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); + bool (*is_immune_to_status) (struct status_change* sc, enum sc_type type); + bool (*is_boss_resist_sc) (enum sc_type type); + bool (*end_sc_before_start) (struct block_list *bl, struct status_data *st, struct status_change* sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4); + void (*change_start_stop_action) (struct block_list *bl, enum sc_type type); + int (*change_start_set_option) (struct block_list *bl, struct status_change* sc, enum sc_type type, int val1, int val2, int val3, int val4); + int (*get_val_flag) (enum sc_type type); + void (*change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); + bool (*change_start_unknown_sc) (struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag); int (*kaahi_heal_timer) (int tid, int64 tick, int id, intptr_t data); int (*change_timer) (int tid, int64 tick, int id, intptr_t data); int (*change_timer_sub) (struct block_list* bl, va_list ap); diff --git a/src/map/storage.c b/src/map/storage.c index da76a0d30..716abd623 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -107,6 +107,11 @@ int storage_storageopen(struct map_session_data *sd) if (sd->state.storage_flag != STORAGE_FLAG_CLOSED) return 1; //Already open? + if (sd->storage.received == false) { + clif->message(sd->fd, msg_sd(sd, 27)); // Storage has not been loaded yet. + return 1; + } + if( !pc_can_give_items(sd) ) { //check is this GM level is allowed to put items to storage clif->message(sd->fd, msg_sd(sd,246)); // Your GM level doesn't authorize you to perform this action. @@ -114,9 +119,13 @@ int storage_storageopen(struct map_session_data *sd) } sd->state.storage_flag = STORAGE_FLAG_NORMAL; - 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); + + if (sd->storage.aggregate > 0) { + storage->sortitem(VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); + clif->storagelist(sd, VECTOR_DATA(sd->storage.item), VECTOR_LENGTH(sd->storage.item)); + } + + clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); return 0; } @@ -133,9 +142,12 @@ int compare_item(struct item *a, struct item *b) a->bound == b->bound && a->unique_id == b->unique_id) { - int i; - for (i = 0; i < MAX_SLOTS && (a->card[i] == b->card[i]); i++); - return (i == MAX_SLOTS); + int i = 0, k = 0; + ARR_FIND(0, MAX_SLOTS, i, a->card[i] != b->card[i]); + ARR_FIND(0, MAX_ITEM_OPTIONS, k, a->option[k].index != b->option[k].index || a->option[k].value != b->option[k].value); + + if (i == MAX_SLOTS && k == MAX_ITEM_OPTIONS) + return 1; } return 0; } @@ -145,61 +157,80 @@ int compare_item(struct item *a, struct item *b) *------------------------------------------*/ int storage_additem(struct map_session_data* sd, struct item* item_data, int amount) { - struct storage_data* stor; - struct item_data *data; + struct item_data *data = NULL; + struct item *it = NULL; int i; nullpo_retr(1, sd); + Assert_retr(1, sd->storage.received == true); + nullpo_retr(1, item_data); - stor = &sd->status.storage; - if( item_data->nameid <= 0 || amount <= 0 ) - return 1; + Assert_retr(1, item_data->nameid > 0); + + Assert_retr(1, amount > 0); data = itemdb->search(item_data->nameid); - if( data->stack.storage && amount > data->stack.amount ) - {// item stack limitation + if (data->stack.storage && amount > data->stack.amount) // item stack limitation return 1; - } if (!itemdb_canstore(item_data, pc_get_group_level(sd))) { //Check if item is storable. [Skotlex] - clif->message (sd->fd, msg_sd(sd,264)); // This item cannot be stored. + clif->message (sd->fd, msg_sd(sd, 264)); // This item cannot be stored. return 1; } - if( item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd) ) { - clif->message(sd->fd, msg_sd(sd,294)); // This bound item cannot be stored there. + if (item_data->bound > IBT_ACCOUNT && !pc_can_give_bound_items(sd)) { + clif->message(sd->fd, msg_sd(sd, 294)); // This bound item cannot be stored there. return 1; } - if( itemdb->isstackable2(data) ) - {//Stackable - for( i = 0; i < MAX_STORAGE; i++ ) - { - if( compare_item(&stor->items[i], item_data) ) - {// existing items found, stack them - if( amount > MAX_AMOUNT - stor->items[i].amount || ( data->stack.storage && amount > data->stack.amount - stor->items[i].amount ) ) + if (itemdb->isstackable2(data)) {//Stackable + for (i = 0; i < VECTOR_LENGTH(sd->storage.item); i++) { + it = &VECTOR_INDEX(sd->storage.item, i); + + if (it->nameid == 0) + continue; + + if (compare_item(it, item_data)) { // existing items found, stack them + if (amount > MAX_AMOUNT - it->amount || (data->stack.storage && amount > data->stack.amount - it->amount)) return 1; - stor->items[i].amount += amount; - clif->storageitemadded(sd,&stor->items[i],i,amount); + it->amount += amount; + + clif->storageitemadded(sd, it, i, amount); + + sd->storage.save = true; // set a save flag. + return 0; } } } - // find free slot - ARR_FIND( 0, MAX_STORAGE, i, stor->items[i].nameid == 0 ); - if( i >= MAX_STORAGE ) + // Check if storage exceeds limit. + if (sd->storage.aggregate >= MAX_STORAGE) return 1; - // add item to slot - memcpy(&stor->items[i],item_data,sizeof(stor->items[0])); - stor->storage_amount++; - stor->items[i].amount = amount; - clif->storageitemadded(sd,&stor->items[i],i,amount); - clif->updatestorageamount(sd, stor->storage_amount, MAX_STORAGE); + ARR_FIND(0, VECTOR_LENGTH(sd->storage.item), i, VECTOR_INDEX(sd->storage.item, i).nameid == 0); + + if (i == VECTOR_LENGTH(sd->storage.item)) { + VECTOR_ENSURE(sd->storage.item, 1, 1); + VECTOR_PUSH(sd->storage.item, *item_data); + it = &VECTOR_LAST(sd->storage.item); + } else { + it = &VECTOR_INDEX(sd->storage.item, i); + *it = *item_data; + } + + it->amount = amount; + + sd->storage.aggregate++; + + clif->storageitemadded(sd, it, i, amount); + + clif->updatestorageamount(sd, sd->storage.aggregate, MAX_STORAGE); + + sd->storage.save = true; // set a save flag. return 0; } @@ -209,21 +240,32 @@ int storage_additem(struct map_session_data* sd, struct item* item_data, int amo *------------------------------------------*/ int storage_delitem(struct map_session_data* sd, int n, int amount) { + struct item *it = NULL; + nullpo_retr(1, sd); - Assert_retr(1, n >= 0 && n < MAX_STORAGE); - if( sd->status.storage.items[n].nameid == 0 || sd->status.storage.items[n].amount < amount ) - return 1; - sd->status.storage.items[n].amount -= amount; - if( sd->status.storage.items[n].amount == 0 ) - { - memset(&sd->status.storage.items[n],0,sizeof(sd->status.storage.items[0])); - sd->status.storage.storage_amount--; - if( sd->state.storage_flag == STORAGE_FLAG_NORMAL ) - clif->updatestorageamount(sd, sd->status.storage.storage_amount, MAX_STORAGE); + Assert_retr(1, sd->storage.received == true); + + Assert_retr(1, n >= 0 && n < VECTOR_LENGTH(sd->storage.item)); + + it = &VECTOR_INDEX(sd->storage.item, n); + + Assert_retr(1, amount <= it->amount); + + Assert_retr(1, it->nameid > 0); + + it->amount -= amount; + + if (it->amount == 0) { + memset(it, 0, sizeof(struct item)); + clif->updatestorageamount(sd, --sd->storage.aggregate, MAX_STORAGE); } - if( sd->state.storage_flag == STORAGE_FLAG_NORMAL ) - clif->storageitemremoved(sd,n,amount); + + sd->storage.save = true; + + if (sd->state.storage_flag == STORAGE_FLAG_NORMAL) + clif->storageitemremoved(sd, n, amount); + return 0; } @@ -234,23 +276,25 @@ 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_add_from_inventory(struct map_session_data* sd, int index, int amount) { nullpo_ret(sd); - if( sd->status.storage.storage_amount > MAX_STORAGE ) + Assert_ret(sd->storage.received == true); + + if (sd->storage.aggregate > MAX_STORAGE) return 0; // storage full - if( index < 0 || index >= MAX_INVENTORY ) + if (index < 0 || index >= MAX_INVENTORY) return 0; - if( sd->status.inventory[index].nameid <= 0 ) + if (sd->status.inventory[index].nameid <= 0) return 0; // No item on that spot - if( amount < 1 || amount > sd->status.inventory[index].amount ) + if (amount < 1 || amount > sd->status.inventory[index].amount) return 0; - if( storage->additem(sd,&sd->status.inventory[index],amount) == 0 ) + if (storage->additem(sd, &sd->status.inventory[index], amount) == 0) pc->delitem(sd, index, amount, 0, DELITEM_TOSTORAGE, LOG_TYPE_STORAGE); else clif->dropitem(sd, index, 0); @@ -265,24 +309,30 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount) * 0 : fail * 1 : success *------------------------------------------*/ -int storage_storageget(struct map_session_data* sd, int index, int amount) +int storage_add_to_inventory(struct map_session_data* sd, int index, int amount) { int flag; + struct item *it = NULL; nullpo_ret(sd); - if( index < 0 || index >= MAX_STORAGE ) + + Assert_ret(sd->storage.received == true); + + if (index < 0 || index >= VECTOR_LENGTH(sd->storage.item)) return 0; - if( sd->status.storage.items[index].nameid <= 0 ) + it = &VECTOR_INDEX(sd->storage.item, index); + + if (it->nameid <= 0) return 0; //Nothing there - if( amount < 1 || amount > sd->status.storage.items[index].amount ) + if (amount < 1 || amount > it->amount) return 0; - if( (flag = pc->additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 ) - storage->delitem(sd,index,amount); + if ((flag = pc->additem(sd, it, amount, LOG_TYPE_STORAGE)) == 0) + storage->delitem(sd, index, amount); else - clif->additem(sd,0,0,flag); + clif->additem(sd, 0, 0, flag); return 1; } @@ -298,19 +348,21 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun { nullpo_ret(sd); - if( sd->status.storage.storage_amount > MAX_STORAGE ) + Assert_ret(sd->storage.received == true); + + if (sd->storage.aggregate > MAX_STORAGE) return 0; // storage full / storage closed - if( index < 0 || index >= MAX_CART ) + if (index < 0 || index >= MAX_CART) return 0; if( sd->status.cart[index].nameid <= 0 ) return 0; //No item there. - if( amount < 1 || amount > sd->status.cart[index].amount ) + if (amount < 1 || amount > sd->status.cart[index].amount) return 0; - if( storage->additem(sd,&sd->status.cart[index],amount) == 0 ) + if (storage->additem(sd,&sd->status.cart[index],amount) == 0) pc->cart_delitem(sd,index,amount,0,LOG_TYPE_STORAGE); return 1; @@ -326,22 +378,28 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun int storage_storagegettocart(struct map_session_data* sd, int index, int amount) { int flag = 0; + struct item *it = NULL; + nullpo_ret(sd); - if( index < 0 || index >= MAX_STORAGE ) + Assert_ret(sd->storage.received == true); + + if (index < 0 || index >= VECTOR_LENGTH(sd->storage.item)) return 0; - if( sd->status.storage.items[index].nameid <= 0 ) + it = &VECTOR_INDEX(sd->storage.item, index); + + if (it->nameid <= 0) return 0; //Nothing there. - if( amount < 1 || amount > sd->status.storage.items[index].amount ) + if (amount < 1 || amount > it->amount) return 0; - if( (flag = pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 ) - storage->delitem(sd,index,amount); + if ((flag = pc->cart_additem(sd, it, amount, LOG_TYPE_STORAGE)) == 0) + storage->delitem(sd, index, amount); else { clif->dropitem(sd, index,0); - clif->cart_additem_ack(sd,flag == 1?0x0:0x1); + clif->cart_additem_ack(sd, flag == 1?0x0:0x1); } return 1; @@ -353,12 +411,26 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount) *------------------------------------------*/ void storage_storageclose(struct map_session_data* sd) { + int i = 0; + nullpo_retv(sd); + Assert_retv(sd->storage.received == true); + clif->storageclose(sd); - if( map->save_settings&4 ) - chrif->save(sd,0); //Invokes the storage saving as well. + if (map->save_settings & 4) + chrif->save(sd, 0); //Invokes the storage saving as well. + + /* Erase deleted account storage items from memory + * and resize the vector. */ + while (i < VECTOR_LENGTH(sd->storage.item)) { + if (VECTOR_INDEX(sd->storage.item, i).nameid == 0) { + VECTOR_ERASE(sd->storage.item, i); + } else { + i++; + } + } sd->state.storage_flag = STORAGE_FLAG_CLOSED; } @@ -788,8 +860,8 @@ void storage_defaults(void) /* */ storage->delitem = storage_delitem; storage->open = storage_storageopen; - storage->add = storage_storageadd; - storage->get = storage_storageget; + storage->add = storage_add_from_inventory; + storage->get = storage_add_to_inventory; storage->additem = storage_additem; storage->addfromcart = storage_storageaddfromcart; storage->gettocart = storage_storagegettocart; diff --git a/src/map/storage.h b/src/map/storage.h index 94512c456..509862db7 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/trade.c b/src/map/trade.c index 6ada188c9..252dff709 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/trade.h b/src/map/trade.h index eba91a1d9..55ff31ed2 100644 --- a/src/map/trade.h +++ b/src/map/trade.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/unit.c b/src/map/unit.c index 5364a9547..0b5b21caf 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -474,7 +474,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) ud->to_x = bl->x; ud->to_y = bl->y; - if(battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + if (battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { //Walked on occupied cell, call unit_walktoxy again if(ud->steptimer != INVALID_TIMER) { //Execute step timer on next step instead @@ -668,11 +668,12 @@ void unit_run_hit(struct block_list *bl, struct status_change *sc, struct map_se ud->state.running = 0; status_change_end(bl, type, INVALID_TIMER); - if( type == SC_RUN ) { - skill->blown(bl,bl,skill->get_blewcount(TK_RUN,lv),unit->getdir(bl),0); + if (type == SC_RUN) { + if (lv > 0) + skill->blown(bl, bl, skill->get_blewcount(TK_RUN, lv), unit->getdir(bl), 0); clif->fixpos(bl); //Why is a clif->slide (skill->blown) AND a fixpos needed? Ask Aegis. - clif->sc_end(bl,bl->id,AREA,SI_TING); - } else if( sd ) { + clif->sc_end(bl, bl->id, AREA, SI_TING); + } else if (sd) { clif->fixpos(bl); skill->castend_damage_id(bl, &sd->bl, RA_WUGDASH, lv, timer->gettick(), SD_LEVEL); } @@ -1127,6 +1128,7 @@ int unit_can_move(struct block_list *bl) || sc->data[SC_VACUUM_EXTREME] || (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0) || sc->data[SC_NETHERWORLD] + || sc->data[SC_SUHIDE] || (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1) || (sc->data[SC_CLOAKING] && sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1)) //Need wall at level 1-2 || ( @@ -1460,7 +1462,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } else if( src->type == BL_MER && skill_id == MA_REMOVETRAP ) { if( !battle->check_range(battle->get_master(src), target, range + 1) ) return 0; // Aegis calc remove trap based on Master position, ignoring mercenary O.O - } else if( !battle->check_range(src, target, range + (skill_id == RG_CLOSECONFINE?0:2)) ) { + } else if (!battle->check_range(src, target, range)) { return 0; // Arrow-path check failed. } } @@ -1543,7 +1545,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } break; case GD_EMERGENCYCALL: //Emergency Call double cast when the user has learned Leap [Daegaladh] - if( sd && pc->checkskill(sd,TK_HIGHJUMP) ) + if (sd && (pc->checkskill(sd,TK_HIGHJUMP) || pc->checkskill(sd,SU_LOPE) >= 3)) casttime *= 2; break; case RA_WUGDASH: @@ -1665,6 +1667,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } else skill->castend_id(ud->skilltimer,tick,src->id,0); + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -1811,6 +1816,10 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui ud->skilltimer = INVALID_TIMER; skill->castend_pos(ud->skilltimer,tick,src->id,0); } + + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -2251,6 +2260,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_ATTACK) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -2464,6 +2476,8 @@ int unit_remove_map(struct block_list *bl, clr_type clrtype, const char* file, i status_change_end(bl, SC_VACUUM_EXTREME, INVALID_TIMER); status_change_end(bl, SC_CURSEDCIRCLE_ATKER, INVALID_TIMER); //callme before warp status_change_end(bl, SC_NETHERWORLD, INVALID_TIMER); + status_change_end(bl, SC_SUHIDE, INVALID_TIMER); + status_change_end(bl, SC_SV_ROOTTWIST, INVALID_TIMER); } if (bl->type&(BL_CHAR|BL_PET)) { @@ -2743,6 +2757,8 @@ int unit_free(struct block_list *bl, clr_type clrtype) sd->instance = NULL; } VECTOR_CLEAR(sd->script_queues); + VECTOR_CLEAR(sd->storage.item); + sd->storage.received = false; if( sd->quest_log != NULL ) { aFree(sd->quest_log); sd->quest_log = NULL; diff --git a/src/map/unit.h b/src/map/unit.h index 8c4c34696..d065b3d57 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -80,11 +80,7 @@ struct unit_data { }; struct view_data { -#ifdef __64BIT__ - uint32 class_; // FIXME: This shouldn't really depend on the architecture. -#else // not __64BIT__ - uint16 class_; -#endif // __64BIT__ + int16 class; uint16 weapon, shield, //Or left-hand weapon. robe, diff --git a/src/map/vending.c b/src/map/vending.c index 80f57b9aa..9a9585d2f 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/map/vending.h b/src/map/vending.h index 1d2135076..9a236f75b 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index 0b98ea99f..6d6184402 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -26,6 +26,8 @@ #include "common/mmo.h" #include "common/socket.h" +PRAGMA_GCC5(GCC diagnostic push) +PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #if defined (HPMHOOKING_LOGIN) #define HPM_SERVER_TYPE SERVER_TYPE_LOGIN #define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_login.HPMHooksCore.inc" @@ -52,6 +54,7 @@ #include "char/int_party.h" #include "char/int_pet.h" #include "char/int_quest.h" +#include "char/int_rodex.h" #include "char/int_storage.h" #include "char/inter.h" #include "char/loginif.h" @@ -91,6 +94,7 @@ #include "map/pc.h" #include "map/pet.h" #include "map/quest.h" +#include "map/rodex.h" #include "map/script.h" #include "map/skill.h" #include "map/status.h" @@ -107,6 +111,7 @@ #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking.sources.inc" #error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date. #endif +PRAGMA_GCC5(GCC diagnostic pop) #include "common/conf.h" #include "common/console.h" #include "common/db.h" @@ -210,7 +215,10 @@ HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, return false; } +PRAGMA_GCC5(GCC diagnostic push) +PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #include HPM_HOOKS_INCLUDE +PRAGMA_GCC5(GCC diagnostic pop) void HPM_HP_final(void) { int i, len = HPMHooks.data.total * 2; diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 6b88ddf43..9482e6c15 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -380,8 +380,10 @@ typedef struct DBData (*HPMHOOK_pre_chr_create_charstatus) (union DBKey *key, va typedef struct DBData (*HPMHOOK_post_chr_create_charstatus) (struct DBData retVal___, union DBKey key, va_list args); typedef int (*HPMHOOK_pre_chr_mmo_char_tosql) (int *char_id, struct mmo_charstatus **p); typedef int (*HPMHOOK_post_chr_mmo_char_tosql) (int retVal___, int char_id, struct mmo_charstatus *p); -typedef int (*HPMHOOK_pre_chr_memitemdata_to_sql) (const struct item *items[], int *max, int *id, int *tableswitch); -typedef int (*HPMHOOK_post_chr_memitemdata_to_sql) (int retVal___, const struct item items[], int max, int id, int tableswitch); +typedef int (*HPMHOOK_pre_chr_getitemdata_from_sql) (struct item **items, int *max, int *guid, enum inventory_table_type *table); +typedef int (*HPMHOOK_post_chr_getitemdata_from_sql) (int retVal___, struct item *items, int max, int guid, enum inventory_table_type table); +typedef int (*HPMHOOK_pre_chr_memitemdata_to_sql) (const struct item *items[], int *id, enum inventory_table_type *table); +typedef int (*HPMHOOK_post_chr_memitemdata_to_sql) (int retVal___, const struct item items[], int id, enum inventory_table_type table); typedef int (*HPMHOOK_pre_chr_mmo_gender) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex); typedef int (*HPMHOOK_post_chr_mmo_gender) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf); @@ -396,8 +398,8 @@ typedef int (*HPMHOOK_pre_chr_rename_char_sql) (struct char_session_data **sd, i typedef int (*HPMHOOK_post_chr_rename_char_sql) (int retVal___, struct char_session_data *sd, int char_id); typedef int (*HPMHOOK_pre_chr_check_char_name) (char **name, char **esc_name); typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, char *name, char *esc_name); -typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style); -typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style); +typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); +typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2); typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2); typedef int (*HPMHOOK_pre_chr_count_users) (void); @@ -974,8 +976,8 @@ typedef void (*HPMHOOK_pre_clif_refreshlook) (struct block_list **bl, int *id, i typedef void (*HPMHOOK_post_clif_refreshlook) (struct block_list *bl, int id, int type, int val, enum send_target target); typedef void (*HPMHOOK_pre_clif_sendlook) (struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target); typedef void (*HPMHOOK_post_clif_sendlook) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); -typedef void (*HPMHOOK_pre_clif_class_change) (struct block_list **bl, int *class_, int *type); -typedef void (*HPMHOOK_post_clif_class_change) (struct block_list *bl, int class_, int type); +typedef void (*HPMHOOK_pre_clif_class_change) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_class_change) (struct block_list *bl, int class_, int type, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_skill_delunit) (struct skill_unit **su); typedef void (*HPMHOOK_post_clif_skill_delunit) (struct skill_unit *su); typedef void (*HPMHOOK_pre_clif_skillunit_update) (struct block_list **bl); @@ -1178,8 +1180,8 @@ typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, st typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd); typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_equpcheckbox) (struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, unsigned int *exp, char *type, bool *is_quest); -typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, unsigned int exp, char type, bool is_quest); +typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); +typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); typedef void (*HPMHOOK_pre_clif_font) (struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_font) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsigned int *color, unsigned int *second); @@ -1424,6 +1426,8 @@ typedef void (*HPMHOOK_pre_clif_party_member_info) (struct party_data **p, struc typedef void (*HPMHOOK_post_clif_party_member_info) (struct party_data *p, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_party_info) (struct party_data **p, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_party_info) (struct party_data *p, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_job_and_level) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_party_invite) (struct map_session_data **sd, struct map_session_data **tsd); typedef void (*HPMHOOK_post_clif_party_invite) (struct map_session_data *sd, struct map_session_data *tsd); typedef void (*HPMHOOK_pre_clif_party_inviteack) (struct map_session_data **sd, const char **nick, int *result); @@ -2222,8 +2226,8 @@ typedef void (*HPMHOOK_pre_clif_pNPCMarketClosed) (int *fd, struct map_session_d typedef void (*HPMHOOK_post_clif_pNPCMarketClosed) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pNPCMarketPurchase) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pNPCMarketPurchase) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_add_random_options) (unsigned char **buf, struct item **item); -typedef void (*HPMHOOK_post_clif_add_random_options) (unsigned char *buf, struct item *item); +typedef int (*HPMHOOK_pre_clif_add_item_options) (struct ItemOptions **buf, const struct item **it); +typedef int (*HPMHOOK_post_clif_add_item_options) (int retVal___, struct ItemOptions *buf, const struct item *it); typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pHotkeyRowShift) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_dressroom_open) (struct map_session_data **sd, int *view); @@ -2236,6 +2240,60 @@ typedef void (*HPMHOOK_pre_clif_pSelectCart) (int *fd, struct map_session_data * typedef void (*HPMHOOK_post_clif_pSelectCart) (int fd, struct map_session_data *sd); typedef const char* (*HPMHOOK_pre_clif_get_bl_name) (const struct block_list **bl); typedef const char* (*HPMHOOK_post_clif_get_bl_name) (const char* retVal___, const struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_pRodexOpenWriteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexOpenWriteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_open_write_mail) (int *fd, const char **receiver_name, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_open_write_mail) (int fd, const char *receiver_name, int8 result); +typedef void (*HPMHOOK_pre_clif_pRodexAddItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexAddItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, int8 result); +typedef void (*HPMHOOK_pre_clif_pRodexRemoveItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRemoveItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_remove_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_clif_rodex_remove_item_result) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_clif_pRodexSendMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexSendMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_send_mail_result) (int *fd, struct map_session_data **sd, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_send_mail_result) (int fd, struct map_session_data *sd, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_send_maillist) (int *fd, struct map_session_data **sd, int8 *open_type, int64 *page_start); +typedef void (*HPMHOOK_post_clif_rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); +typedef void (*HPMHOOK_pre_clif_rodex_send_refresh) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); +typedef void (*HPMHOOK_post_clif_rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); +typedef void (*HPMHOOK_pre_clif_rodex_send_mails_all) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_rodex_send_mails_all) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexReadMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexReadMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_read_mail) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); +typedef void (*HPMHOOK_post_clif_rodex_read_mail) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); +typedef void (*HPMHOOK_pre_clif_pRodexNextMaillist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexNextMaillist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCloseMailbox) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCloseMailbox) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCancelWriteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCancelWriteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); +typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); +typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_clif_rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_clif_pRodexRefreshMaillist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRefreshMaillist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexRequestZeny) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRequestZeny) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); +typedef void (*HPMHOOK_pre_clif_pRodexRequestItems) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRequestItems) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show); +typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show); #endif // MAP_CLIF_H #ifdef COMMON_CORE_H /* cmdline */ typedef void (*HPMHOOK_pre_cmdline_init) (void); @@ -2452,8 +2510,8 @@ typedef int (*HPMHOOK_pre_guild_getindex) (const struct guild **g, int *account_ typedef int (*HPMHOOK_post_guild_getindex) (int retVal___, const struct guild *g, int account_id, int char_id); typedef int (*HPMHOOK_pre_guild_getposition) (struct guild **g, struct map_session_data **sd); typedef int (*HPMHOOK_post_guild_getposition) (int retVal___, struct guild *g, struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, unsigned int *exp); -typedef unsigned int (*HPMHOOK_post_guild_payexp) (unsigned int retVal___, struct map_session_data *sd, unsigned int exp); +typedef uint64 (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, uint64 *exp); +typedef uint64 (*HPMHOOK_post_guild_payexp) (uint64 retVal___, struct map_session_data *sd, uint64 exp); typedef int (*HPMHOOK_pre_guild_getexp) (struct map_session_data **sd, int *exp); typedef int (*HPMHOOK_post_guild_getexp) (int retVal___, struct map_session_data *sd, int exp); typedef int (*HPMHOOK_pre_guild_create) (struct map_session_data **sd, const char **name); @@ -2500,8 +2558,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); -typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); @@ -2530,8 +2588,8 @@ typedef int (*HPMHOOK_pre_guild_dobreak) (struct map_session_data **sd, const ch typedef int (*HPMHOOK_post_guild_dobreak) (int retVal___, struct map_session_data *sd, const char *name); typedef int (*HPMHOOK_pre_guild_broken) (int *guild_id, int *flag); typedef int (*HPMHOOK_post_guild_broken) (int retVal___, int guild_id, int flag); -typedef int (*HPMHOOK_pre_guild_gm_change) (int *guild_id, struct map_session_data **sd); -typedef int (*HPMHOOK_post_guild_gm_change) (int retVal___, int guild_id, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_guild_gm_change) (int *guild_id, int *char_id); +typedef int (*HPMHOOK_post_guild_gm_change) (int retVal___, int guild_id, int char_id); typedef int (*HPMHOOK_pre_guild_gm_changed) (int *guild_id, int *account_id, int *char_id); typedef int (*HPMHOOK_post_guild_gm_changed) (int retVal___, int guild_id, int account_id, int char_id); typedef void (*HPMHOOK_pre_guild_castle_map_init) (void); @@ -2852,8 +2910,8 @@ typedef bool (*HPMHOOK_pre_inter_msg_config_read) (const char **cfg_name, bool * typedef bool (*HPMHOOK_post_inter_msg_config_read) (bool retVal___, const char *cfg_name, bool allow_override); typedef void (*HPMHOOK_pre_inter_do_final_msg) (void); typedef void (*HPMHOOK_post_inter_do_final_msg) (void); -typedef const char* (*HPMHOOK_pre_inter_job_name) (int *class_); -typedef const char* (*HPMHOOK_post_inter_job_name) (const char* retVal___, int class_); +typedef const char* (*HPMHOOK_pre_inter_job_name) (int *class); +typedef const char* (*HPMHOOK_post_inter_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_inter_vmsg_to_fd) (int *fd, int *u_fd, int *aid, char **msg, va_list ap); typedef void (*HPMHOOK_post_inter_vmsg_to_fd) (int fd, int u_fd, int aid, char *msg, va_list ap); typedef void (*HPMHOOK_pre_inter_savereg) (int *account_id, int *char_id, const char **key, unsigned int *index, intptr_t *val, bool *is_string); @@ -2961,9 +3019,25 @@ typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd); typedef int (*HPMHOOK_pre_inter_quest_parse_frommap) (int *fd); typedef int (*HPMHOOK_post_inter_quest_parse_frommap) (int retVal___, int fd); #endif // CHAR_INT_QUEST_H +#ifdef CHAR_INT_RODEX_H /* inter_rodex */ +typedef int (*HPMHOOK_pre_inter_rodex_sql_init) (void); +typedef int (*HPMHOOK_post_inter_rodex_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_rodex_sql_final) (void); +typedef void (*HPMHOOK_post_inter_rodex_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_rodex_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_rodex_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, int8 *opentype, int64 *mail_id, struct rodex_maillist **mails); +typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); +typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id); +typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id); +typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level); +typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); +typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg); +typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg); +#endif // CHAR_INT_RODEX_H #ifdef CHAR_INT_STORAGE_H /* inter_storage */ -typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, struct storage_data **p); -typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, struct storage_data *p); +typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p); +typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, const struct storage_data *p); typedef int (*HPMHOOK_pre_inter_storage_fromsql) (int *account_id, struct storage_data **p); typedef int (*HPMHOOK_post_inter_storage_fromsql) (int retVal___, int account_id, struct storage_data *p); typedef int (*HPMHOOK_pre_inter_storage_guild_storage_tosql) (int *guild_id, const struct guild_storage **p); @@ -3000,6 +3074,10 @@ typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd); typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag); typedef int (*HPMHOOK_post_intif_request_registry) (int retVal___, struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_intif_request_account_storage) (const struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_request_account_storage) (const struct map_session_data *sd); +typedef void (*HPMHOOK_pre_intif_send_account_storage) (const struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_send_account_storage) (const struct map_session_data *sd); typedef int (*HPMHOOK_pre_intif_request_guild_storage) (int *account_id, int *guild_id); typedef int (*HPMHOOK_post_intif_request_guild_storage) (int retVal___, int account_id, int guild_id); typedef int (*HPMHOOK_pre_intif_send_guild_storage) (int *account_id, struct guild_storage **gstor); @@ -3030,8 +3108,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m); typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id); typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id); typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len); @@ -3116,6 +3194,16 @@ typedef int (*HPMHOOK_pre_intif_elemental_delete) (int *ele_id); typedef int (*HPMHOOK_post_intif_elemental_delete) (int retVal___, int ele_id); typedef int (*HPMHOOK_pre_intif_elemental_save) (struct s_elemental **ele); typedef int (*HPMHOOK_post_intif_elemental_save) (int retVal___, struct s_elemental *ele); +typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_id, int8 *flag, int8 *opentype, int64 *mail_id); +typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); +typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (int64 *mail_id, int8 *flag); +typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, int64 mail_id, int8 flag); +typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg); +typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg); +typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name); typedef void (*HPMHOOK_pre_intif_request_accinfo) (int *u_fd, int *aid, int *group_lv, char **query); typedef void (*HPMHOOK_post_intif_request_accinfo) (int u_fd, int aid, int group_lv, char *query); typedef int (*HPMHOOK_pre_intif_CheckForCharServer) (void); @@ -3130,10 +3218,14 @@ typedef void (*HPMHOOK_pre_intif_pWisToGM) (int *fd); typedef void (*HPMHOOK_post_intif_pWisToGM) (int fd); typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd); typedef void (*HPMHOOK_post_intif_pRegisters) (int fd); +typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd); +typedef void (*HPMHOOK_post_intif_pAccountStorage) (int fd); typedef void (*HPMHOOK_pre_intif_pChangeNameOk) (int *fd); typedef void (*HPMHOOK_post_intif_pChangeNameOk) (int fd); typedef void (*HPMHOOK_pre_intif_pMessageToFD) (int *fd); typedef void (*HPMHOOK_post_intif_pMessageToFD) (int fd); +typedef void (*HPMHOOK_pre_intif_pAccountStorageSaveAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pAccountStorageSaveAck) (int fd); typedef void (*HPMHOOK_pre_intif_pLoadGuildStorage) (int *fd); typedef void (*HPMHOOK_post_intif_pLoadGuildStorage) (int fd); typedef void (*HPMHOOK_pre_intif_pSaveGuildStorage) (int *fd); @@ -3244,6 +3336,14 @@ typedef void (*HPMHOOK_pre_intif_pSaveHomunculusOk) (int *fd); typedef void (*HPMHOOK_post_intif_pSaveHomunculusOk) (int fd); typedef void (*HPMHOOK_pre_intif_pDeleteHomunculusOk) (int *fd); typedef void (*HPMHOOK_post_intif_pDeleteHomunculusOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pRequestRodexOpenInbox) (int *fd); +typedef void (*HPMHOOK_post_intif_pRequestRodexOpenInbox) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexHasNew) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexHasNew) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexSendMail) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexSendMail) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexCheckName) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexCheckName) (int fd); #endif // MAP_INTIF_H #ifdef MAP_IRC_BOT_H /* ircbot */ typedef void (*HPMHOOK_pre_ircbot_init) (bool *minimal); @@ -3300,6 +3400,8 @@ typedef void (*HPMHOOK_pre_itemdb_read_chains) (void); typedef void (*HPMHOOK_post_itemdb_read_chains) (void); typedef void (*HPMHOOK_pre_itemdb_read_packages) (void); typedef void (*HPMHOOK_post_itemdb_read_packages) (void); +typedef void (*HPMHOOK_pre_itemdb_read_options) (void); +typedef void (*HPMHOOK_post_itemdb_read_options) (void); typedef void (*HPMHOOK_pre_itemdb_write_cached_packages) (const char **config_filename); typedef void (*HPMHOOK_post_itemdb_write_cached_packages) (const char *config_filename); typedef bool (*HPMHOOK_pre_itemdb_read_cached_packages) (const char **config_filename); @@ -3316,6 +3418,8 @@ typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_search) (struct item_data* retVal___, int nameid); typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid); typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid); +typedef struct item_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); +typedef struct item_option* (*HPMHOOK_post_itemdb_option_exists) (struct item_option* retVal___, int idx); typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid); typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid); typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group); @@ -3334,8 +3438,8 @@ typedef const char* (*HPMHOOK_pre_itemdb_typename) (int *type); typedef const char* (*HPMHOOK_post_itemdb_typename) (const char* retVal___, int type); typedef void (*HPMHOOK_pre_itemdb_jobmask2mapid) (uint64 **bclass, uint64 *jobmask); typedef void (*HPMHOOK_post_itemdb_jobmask2mapid) (uint64 *bclass, uint64 jobmask); -typedef void (*HPMHOOK_pre_itemdb_jobid2mapid) (uint64 **bclass, int *job_id, bool *enable); -typedef void (*HPMHOOK_post_itemdb_jobid2mapid) (uint64 *bclass, int job_id, bool enable); +typedef void (*HPMHOOK_pre_itemdb_jobid2mapid) (uint64 **bclass, int *job_class, bool *enable); +typedef void (*HPMHOOK_post_itemdb_jobid2mapid) (uint64 *bclass, int job_class, bool enable); typedef void (*HPMHOOK_pre_itemdb_create_dummy_data) (void); typedef void (*HPMHOOK_post_itemdb_create_dummy_data) (void); typedef struct item_data* (*HPMHOOK_pre_itemdb_create_item_data) (int *nameid); @@ -3380,6 +3484,8 @@ typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id); typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id); typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source); typedef int (*HPMHOOK_post_itemdb_validate_entry) (int retVal___, struct item_data *entry, int n, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct item_option **ito, struct config_setting_t **t, const char **source); +typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct item_option *ito, struct config_setting_t *t, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_additional_fields) (int *itemid, struct config_setting_t **it, int *n, const char **source); typedef void (*HPMHOOK_post_itemdb_readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); typedef void (*HPMHOOK_pre_itemdb_readdb_job_sub) (struct item_data **id, struct config_setting_t **t); @@ -3396,6 +3502,8 @@ typedef void (*HPMHOOK_pre_itemdb_destroy_item_data) (struct item_data **self, i typedef void (*HPMHOOK_post_itemdb_destroy_item_data) (struct item_data *self, int free_self); typedef int (*HPMHOOK_pre_itemdb_final_sub) (union DBKey *key, struct DBData **data, va_list ap); typedef int (*HPMHOOK_post_itemdb_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_options_final_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_options_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef void (*HPMHOOK_pre_itemdb_clear) (bool *total); typedef void (*HPMHOOK_post_itemdb_clear) (bool total); typedef struct item_combo* (*HPMHOOK_pre_itemdb_id2combo) (unsigned short *id); @@ -3404,6 +3512,8 @@ typedef bool (*HPMHOOK_pre_itemdb_is_item_usable) (struct item_data **item); typedef bool (*HPMHOOK_post_itemdb_is_item_usable) (bool retVal___, struct item_data *item); typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t **it, const char **name, int **value); typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value); +typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); #endif // MAP_ITEMDB_H #ifdef LOGIN_LCLIF_H /* lclif */ typedef void (*HPMHOOK_pre_lclif_init) (void); @@ -3480,8 +3590,8 @@ typedef void (*HPMHOOK_pre_libconfig_destroy) (struct config_t **config); typedef void (*HPMHOOK_post_libconfig_destroy) (struct config_t *config); typedef int (*HPMHOOK_pre_libconfig_setting_get_int) (const struct config_setting_t **setting); typedef int (*HPMHOOK_post_libconfig_setting_get_int) (int retVal___, const struct config_setting_t *setting); -typedef long long (*HPMHOOK_pre_libconfig_setting_get_int64) (const struct config_setting_t **setting); -typedef long long (*HPMHOOK_post_libconfig_setting_get_int64) (long long retVal___, const struct config_setting_t *setting); +typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64) (const struct config_setting_t **setting); +typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64) (int64 retVal___, const struct config_setting_t *setting); typedef double (*HPMHOOK_pre_libconfig_setting_get_float) (const struct config_setting_t **setting); typedef double (*HPMHOOK_post_libconfig_setting_get_float) (double retVal___, const struct config_setting_t *setting); typedef int (*HPMHOOK_pre_libconfig_setting_get_bool) (const struct config_setting_t **setting); @@ -3492,8 +3602,8 @@ typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_lookup) (struct typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_lookup) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int) (const struct config_setting_t **setting, const char **name, int **value); typedef int (*HPMHOOK_post_libconfig_setting_lookup_int) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); -typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int64) (const struct config_setting_t **setting, const char **name, long long **value); -typedef int (*HPMHOOK_post_libconfig_setting_lookup_int64) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int64) (const struct config_setting_t **setting, const char **name, int64 **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_int64) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); typedef int (*HPMHOOK_pre_libconfig_setting_lookup_float) (const struct config_setting_t **setting, const char **name, double **value); typedef int (*HPMHOOK_post_libconfig_setting_lookup_float) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); typedef int (*HPMHOOK_pre_libconfig_setting_lookup_bool) (const struct config_setting_t **setting, const char **name, int **value); @@ -3502,8 +3612,8 @@ typedef int (*HPMHOOK_pre_libconfig_setting_lookup_string) (const struct config_ typedef int (*HPMHOOK_post_libconfig_setting_lookup_string) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); typedef int (*HPMHOOK_pre_libconfig_setting_set_int) (struct config_setting_t **setting, int *value); typedef int (*HPMHOOK_post_libconfig_setting_set_int) (int retVal___, struct config_setting_t *setting, int value); -typedef int (*HPMHOOK_pre_libconfig_setting_set_int64) (struct config_setting_t **setting, long long *value); -typedef int (*HPMHOOK_post_libconfig_setting_set_int64) (int retVal___, struct config_setting_t *setting, long long value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_int64) (struct config_setting_t **setting, int64 *value); +typedef int (*HPMHOOK_post_libconfig_setting_set_int64) (int retVal___, struct config_setting_t *setting, int64 value); typedef int (*HPMHOOK_pre_libconfig_setting_set_float) (struct config_setting_t **setting, double *value); typedef int (*HPMHOOK_post_libconfig_setting_set_float) (int retVal___, struct config_setting_t *setting, double value); typedef int (*HPMHOOK_pre_libconfig_setting_set_bool) (struct config_setting_t **setting, int *value); @@ -3516,8 +3626,8 @@ typedef short (*HPMHOOK_pre_libconfig_setting_get_format) (const struct config_s typedef short (*HPMHOOK_post_libconfig_setting_get_format) (short retVal___, const struct config_setting_t *setting); typedef int (*HPMHOOK_pre_libconfig_setting_get_int_elem) (const struct config_setting_t **setting, int *idx); typedef int (*HPMHOOK_post_libconfig_setting_get_int_elem) (int retVal___, const struct config_setting_t *setting, int idx); -typedef long long (*HPMHOOK_pre_libconfig_setting_get_int64_elem) (const struct config_setting_t **setting, int *idx); -typedef long long (*HPMHOOK_post_libconfig_setting_get_int64_elem) (long long retVal___, const struct config_setting_t *setting, int idx); +typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64_elem) (const struct config_setting_t **setting, int *idx); +typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64_elem) (int64 retVal___, const struct config_setting_t *setting, int idx); typedef double (*HPMHOOK_pre_libconfig_setting_get_float_elem) (const struct config_setting_t **setting, int *idx); typedef double (*HPMHOOK_post_libconfig_setting_get_float_elem) (double retVal___, const struct config_setting_t *setting, int idx); typedef int (*HPMHOOK_pre_libconfig_setting_get_bool_elem) (const struct config_setting_t **setting, int *idx); @@ -3526,8 +3636,8 @@ typedef const char* (*HPMHOOK_pre_libconfig_setting_get_string_elem) (const stru typedef const char* (*HPMHOOK_post_libconfig_setting_get_string_elem) (const char* retVal___, const struct config_setting_t *setting, int idx); typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int_elem) (struct config_setting_t **setting, int *idx, int *value); typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); -typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int64_elem) (struct config_setting_t **setting, int *idx, long long *value); -typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int64_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int64_elem) (struct config_setting_t **setting, int *idx, int64 *value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int64_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_float_elem) (struct config_setting_t **setting, int *idx, double *value); typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_float_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_bool_elem) (struct config_setting_t **setting, int *idx, int *value); @@ -3554,8 +3664,8 @@ typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_lookup) (const struct c typedef struct config_setting_t* (*HPMHOOK_post_libconfig_lookup) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); typedef int (*HPMHOOK_pre_libconfig_lookup_int) (const struct config_t **config, const char **filepath, int **value); typedef int (*HPMHOOK_post_libconfig_lookup_int) (int retVal___, const struct config_t *config, const char *filepath, int *value); -typedef int (*HPMHOOK_pre_libconfig_lookup_int64) (const struct config_t **config, const char **filepath, long long **value); -typedef int (*HPMHOOK_post_libconfig_lookup_int64) (int retVal___, const struct config_t *config, const char *filepath, long long *value); +typedef int (*HPMHOOK_pre_libconfig_lookup_int64) (const struct config_t **config, const char **filepath, int64 **value); +typedef int (*HPMHOOK_post_libconfig_lookup_int64) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); typedef int (*HPMHOOK_pre_libconfig_lookup_float) (const struct config_t **config, const char **filepath, double **value); typedef int (*HPMHOOK_post_libconfig_lookup_float) (int retVal___, const struct config_t *config, const char *filepath, double *value); typedef int (*HPMHOOK_pre_libconfig_lookup_bool) (const struct config_t **config, const char **filepath, int **value); @@ -3738,6 +3848,32 @@ typedef void (*HPMHOOK_pre_login_config_set_defaults) (void); typedef void (*HPMHOOK_post_login_config_set_defaults) (void); typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included); typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included); +typedef bool (*HPMHOOK_pre_login_config_read_inter) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_inter) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_console) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_console) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_log) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_account) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_account) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_hash) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_hash) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_blacklist) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_blacklist) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_users) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_users) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_post_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_pre_login_config_set_dnsbl_servers) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_dnsbl_servers) (struct config_setting_t *setting); +typedef void (*HPMHOOK_pre_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_post_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_pre_login_config_set_md5hash) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_md5hash) (struct config_setting_t *setting); +typedef uint16 (*HPMHOOK_pre_login_convert_users_to_colors) (uint16 *users); +typedef uint16 (*HPMHOOK_post_login_convert_users_to_colors) (uint16 retVal___, uint16 users); #endif // LOGIN_LOGIN_H #ifdef CHAR_LOGINIF_H /* loginif */ typedef void (*HPMHOOK_pre_loginif_init) (void); @@ -3787,36 +3923,6 @@ typedef void (*HPMHOOK_post_mail_deliveryfail) (struct map_session_data *sd, str typedef bool (*HPMHOOK_pre_mail_invalid_operation) (struct map_session_data **sd); typedef bool (*HPMHOOK_post_mail_invalid_operation) (bool retVal___, struct map_session_data *sd); #endif // MAP_MAIL_H -#ifdef COMMON_MEMMGR_H /* iMalloc */ -typedef void (*HPMHOOK_pre_iMalloc_init) (void); -typedef void (*HPMHOOK_post_iMalloc_init) (void); -typedef void (*HPMHOOK_pre_iMalloc_final) (void); -typedef void (*HPMHOOK_post_iMalloc_final) (void); -typedef void* (*HPMHOOK_pre_iMalloc_malloc) (size_t *size, const char **file, int *line, const char **func); -typedef void* (*HPMHOOK_post_iMalloc_malloc) (void* retVal___, size_t size, const char *file, int line, const char *func); -typedef void* (*HPMHOOK_pre_iMalloc_calloc) (size_t *num, size_t *size, const char **file, int *line, const char **func); -typedef void* (*HPMHOOK_post_iMalloc_calloc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func); -typedef void* (*HPMHOOK_pre_iMalloc_realloc) (void **p, size_t *size, const char **file, int *line, const char **func); -typedef void* (*HPMHOOK_post_iMalloc_realloc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); -typedef void* (*HPMHOOK_pre_iMalloc_reallocz) (void **p, size_t *size, const char **file, int *line, const char **func); -typedef void* (*HPMHOOK_post_iMalloc_reallocz) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); -typedef char* (*HPMHOOK_pre_iMalloc_astrdup) (const char **p, const char **file, int *line, const char **func); -typedef char* (*HPMHOOK_post_iMalloc_astrdup) (char* retVal___, const char *p, const char *file, int line, const char *func); -typedef char* (*HPMHOOK_pre_iMalloc_astrndup) (const char **p, size_t *size, const char **file, int *line, const char **func); -typedef char* (*HPMHOOK_post_iMalloc_astrndup) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func); -typedef void (*HPMHOOK_pre_iMalloc_free) (void **p, const char **file, int *line, const char **func); -typedef void (*HPMHOOK_post_iMalloc_free) (void *p, const char *file, int line, const char *func); -typedef void (*HPMHOOK_pre_iMalloc_memory_check) (void); -typedef void (*HPMHOOK_post_iMalloc_memory_check) (void); -typedef bool (*HPMHOOK_pre_iMalloc_verify_ptr) (void **ptr); -typedef bool (*HPMHOOK_post_iMalloc_verify_ptr) (bool retVal___, void *ptr); -typedef size_t (*HPMHOOK_pre_iMalloc_usage) (void); -typedef size_t (*HPMHOOK_post_iMalloc_usage) (size_t retVal___); -typedef void (*HPMHOOK_pre_iMalloc_post_shutdown) (void); -typedef void (*HPMHOOK_post_iMalloc_post_shutdown) (void); -typedef void (*HPMHOOK_pre_iMalloc_init_messages) (void); -typedef void (*HPMHOOK_post_iMalloc_init_messages) (void); -#endif // COMMON_MEMMGR_H #ifdef MAP_MAP_H /* map */ typedef void (*HPMHOOK_pre_map_zone_init) (void); typedef void (*HPMHOOK_post_map_zone_init) (void); @@ -4196,8 +4302,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m); typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); -typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); +typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); +typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id); typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id); typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); @@ -4380,6 +4486,24 @@ typedef void (*HPMHOOK_pre_mapif_send_quests) (int *fd, int *char_id, struct que typedef void (*HPMHOOK_post_mapif_send_quests) (int fd, int char_id, struct quest *tmp_questlog, int num_quests); typedef int (*HPMHOOK_pre_mapif_parse_quest_load) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_quest_load) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_rodex_requestinbox) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_rodex_requestinbox) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_sendinbox) (int *fd, int *char_id, int8 *opentype, int8 *flag, int *count, struct rodex_maillist **mails); +typedef void (*HPMHOOK_post_mapif_rodex_sendinbox) (int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails); +typedef int (*HPMHOOK_pre_mapif_parse_rodex_checkhasnew) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_rodex_checkhasnew) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_sendhasnew) (int *fd, int *char_id, bool *has_new); +typedef void (*HPMHOOK_post_mapif_rodex_sendhasnew) (int fd, int char_id, bool has_new); +typedef int (*HPMHOOK_pre_mapif_parse_rodex_updatemail) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_rodex_updatemail) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_rodex_send) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_rodex_send) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *receiver_id, int *receiver_accountid, bool *result); +typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); +typedef int (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_rodex_checkname) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); +typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); @@ -4388,6 +4512,14 @@ typedef int (*HPMHOOK_pre_mapif_parse_LoadGuildStorage) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_LoadGuildStorage) (int retVal___, int fd); typedef int (*HPMHOOK_pre_mapif_parse_SaveGuildStorage) (int *fd); typedef int (*HPMHOOK_post_mapif_parse_SaveGuildStorage) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_account_storage_load) (int *fd, int *account_id); +typedef int (*HPMHOOK_post_mapif_account_storage_load) (int retVal___, int fd, int account_id); +typedef int (*HPMHOOK_pre_mapif_pAccountStorageLoad) (int *fd); +typedef int (*HPMHOOK_post_mapif_pAccountStorageLoad) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_pAccountStorageSave) (int *fd); +typedef int (*HPMHOOK_post_mapif_pAccountStorageSave) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_sAccountStorageSaveAck) (int *fd, int *account_id, bool *save); +typedef void (*HPMHOOK_post_mapif_sAccountStorageSaveAck) (int fd, int account_id, bool save); typedef int (*HPMHOOK_pre_mapif_itembound_ack) (int *fd, int *aid, int *guild_id); typedef int (*HPMHOOK_post_mapif_itembound_ack) (int retVal___, int fd, int aid, int guild_id); typedef int (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve_sub) (int *fd); @@ -4492,8 +4624,8 @@ typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *fil #ifdef COMMON_MD5CALC_H /* md5 */ typedef void (*HPMHOOK_pre_md5_string) (const char **string, char **output); typedef void (*HPMHOOK_post_md5_string) (const char *string, char *output); -typedef void (*HPMHOOK_pre_md5_binary) (const char **string, unsigned char **output); -typedef void (*HPMHOOK_post_md5_binary) (const char *string, unsigned char *output); +typedef void (*HPMHOOK_pre_md5_binary) (const uint8 **buf, const int *buf_size, uint8 **output); +typedef void (*HPMHOOK_post_md5_binary) (const uint8 *buf, const int buf_size, uint8 *output); typedef void (*HPMHOOK_pre_md5_salt) (int *len, char **output); typedef void (*HPMHOOK_post_md5_salt) (int len, char *output); #endif // COMMON_MD5CALC_H @@ -5018,6 +5150,8 @@ typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, uns typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, unsigned short index); typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); +typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd); typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); #endif // MAP_NPC_H @@ -5172,8 +5306,8 @@ typedef void (*HPMHOOK_pre_pc_final) (void); typedef void (*HPMHOOK_post_pc_final) (void); typedef struct map_session_data* (*HPMHOOK_pre_pc_get_dummy_sd) (void); typedef struct map_session_data* (*HPMHOOK_post_pc_get_dummy_sd) (struct map_session_data* retVal___); -typedef int (*HPMHOOK_pre_pc_class2idx) (int *class_); -typedef int (*HPMHOOK_post_pc_class2idx) (int retVal___, int class_); +typedef int (*HPMHOOK_pre_pc_class2idx) (int *class); +typedef int (*HPMHOOK_post_pc_class2idx) (int retVal___, int class); typedef bool (*HPMHOOK_pre_pc_can_talk) (struct map_session_data **sd); typedef bool (*HPMHOOK_post_pc_can_talk) (bool retVal___, struct map_session_data *sd); typedef bool (*HPMHOOK_pre_pc_can_attack) (struct map_session_data **sd, int *target_id); @@ -5202,6 +5336,8 @@ typedef int (*HPMHOOK_pre_pc_isequip) (struct map_session_data **sd, int *n); typedef int (*HPMHOOK_post_pc_isequip) (int retVal___, struct map_session_data *sd, int n); typedef int (*HPMHOOK_pre_pc_equippoint) (struct map_session_data **sd, int *n); typedef int (*HPMHOOK_post_pc_equippoint) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_item_equippoint) (struct map_session_data **sd, struct item_data **id); +typedef int (*HPMHOOK_post_pc_item_equippoint) (int retVal___, struct map_session_data *sd, struct item_data *id); typedef int (*HPMHOOK_pre_pc_setinventorydata) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_setinventorydata) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkskill) (struct map_session_data **sd, uint16 *skill_id); @@ -5312,16 +5448,16 @@ typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); -typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); -typedef unsigned int (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisbaseexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_nextjobexp) (unsigned int retVal___, const struct map_session_data *sd); -typedef unsigned int (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); -typedef unsigned int (*HPMHOOK_post_pc_thisjobexp) (unsigned int retVal___, const struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); +typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); +typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextjobexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisjobexp) (uint64 retVal___, const struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_gets_status_point) (int *level); typedef int (*HPMHOOK_post_pc_gets_status_point) (int retVal___, int level); typedef int (*HPMHOOK_pre_pc_need_status_point) (struct map_session_data **sd, int *type, int *val); @@ -5376,8 +5512,8 @@ typedef int (*HPMHOOK_pre_pc_itemheal) (struct map_session_data **sd, int *itemi typedef int (*HPMHOOK_post_pc_itemheal) (int retVal___, struct map_session_data *sd, int itemid, int hp, int sp); typedef int (*HPMHOOK_pre_pc_percentheal) (struct map_session_data **sd, int *hp, int *sp); typedef int (*HPMHOOK_post_pc_percentheal) (int retVal___, struct map_session_data *sd, int hp, int sp); -typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *job, int *upper); -typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int job, int upper); +typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *class, int *upper); +typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int class, int upper); typedef int (*HPMHOOK_pre_pc_setoption) (struct map_session_data **sd, int *type); typedef int (*HPMHOOK_post_pc_setoption) (int retVal___, struct map_session_data *sd, int type); typedef int (*HPMHOOK_pre_pc_setcart) (struct map_session_data **sd, int *type); @@ -5396,10 +5532,10 @@ typedef int (*HPMHOOK_pre_pc_changelook) (struct map_session_data **sd, int *typ typedef int (*HPMHOOK_post_pc_changelook) (int retVal___, struct map_session_data *sd, int type, int val); typedef int (*HPMHOOK_pre_pc_equiplookall) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_equiplookall) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_pc_readparam) (const struct map_session_data **sd, int *type); -typedef int (*HPMHOOK_post_pc_readparam) (int retVal___, const struct map_session_data *sd, int type); -typedef int (*HPMHOOK_pre_pc_setparam) (struct map_session_data **sd, int *type, int *val); -typedef int (*HPMHOOK_post_pc_setparam) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int64 (*HPMHOOK_pre_pc_readparam) (const struct map_session_data **sd, int *type); +typedef int64 (*HPMHOOK_post_pc_readparam) (int64 retVal___, const struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_setparam) (struct map_session_data **sd, int *type, int64 *val); +typedef int (*HPMHOOK_post_pc_setparam) (int retVal___, struct map_session_data *sd, int type, int64 val); typedef int (*HPMHOOK_pre_pc_readreg) (struct map_session_data **sd, int64 *reg); typedef int (*HPMHOOK_post_pc_readreg) (int retVal___, struct map_session_data *sd, int64 reg); typedef void (*HPMHOOK_pre_pc_setreg) (struct map_session_data **sd, int64 *reg, int *val); @@ -5450,12 +5586,12 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item); typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item); -typedef int (*HPMHOOK_pre_pc_jobid2mapid) (unsigned short *b_class); -typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, unsigned short b_class); +typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class); +typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class); typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex); typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex); -typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class_); -typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class_); +typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class); +typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val); typedef void (*HPMHOOK_post_pc_setinvincibletimer) (struct map_session_data *sd, int val); typedef void (*HPMHOOK_pre_pc_delinvincibletimer) (struct map_session_data **sd); @@ -5466,10 +5602,12 @@ typedef int (*HPMHOOK_pre_pc_delspiritball) (struct map_session_data **sd, int * typedef int (*HPMHOOK_post_pc_delspiritball) (int retVal___, struct map_session_data *sd, int count, int type); typedef int (*HPMHOOK_pre_pc_getmaxspiritball) (struct map_session_data **sd, int *min); typedef int (*HPMHOOK_post_pc_getmaxspiritball) (int retVal___, struct map_session_data *sd, int min); -typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *count); -typedef void (*HPMHOOK_post_pc_addfame) (struct map_session_data *sd, int count); -typedef unsigned char (*HPMHOOK_pre_pc_famerank) (int *char_id, int *job); -typedef unsigned char (*HPMHOOK_post_pc_famerank) (unsigned char retVal___, int char_id, int job); +typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *ranktype, int *count); +typedef void (*HPMHOOK_post_pc_addfame) (struct map_session_data *sd, int ranktype, int count); +typedef int (*HPMHOOK_pre_pc_fame_rank) (int *char_id, int *ranktype); +typedef int (*HPMHOOK_post_pc_fame_rank) (int retVal___, int char_id, int ranktype); +typedef int (*HPMHOOK_pre_pc_famelist_type) (uint16 *job_mapid); +typedef int (*HPMHOOK_post_pc_famelist_type) (int retVal___, uint16 job_mapid); typedef int (*HPMHOOK_pre_pc_set_hate_mob) (struct map_session_data **sd, int *pos, struct block_list **bl); typedef int (*HPMHOOK_post_pc_set_hate_mob) (int retVal___, struct map_session_data *sd, int pos, struct block_list *bl); typedef int (*HPMHOOK_pre_pc_readdb) (void); @@ -5484,8 +5622,8 @@ typedef int (*HPMHOOK_pre_pc_inventory_rental_clear) (struct map_session_data ** typedef int (*HPMHOOK_post_pc_inventory_rental_clear) (int retVal___, struct map_session_data *sd); typedef void (*HPMHOOK_pre_pc_inventory_rental_add) (struct map_session_data **sd, int *seconds); typedef void (*HPMHOOK_post_pc_inventory_rental_add) (struct map_session_data *sd, int seconds); -typedef int (*HPMHOOK_pre_pc_disguise) (struct map_session_data **sd, int *class_); -typedef int (*HPMHOOK_post_pc_disguise) (int retVal___, struct map_session_data *sd, int class_); +typedef int (*HPMHOOK_pre_pc_disguise) (struct map_session_data **sd, int *class); +typedef int (*HPMHOOK_post_pc_disguise) (int retVal___, struct map_session_data *sd, int class); typedef bool (*HPMHOOK_pre_pc_isautolooting) (struct map_session_data **sd, int *nameid); typedef bool (*HPMHOOK_post_pc_isautolooting) (bool retVal___, struct map_session_data *sd, int nameid); typedef void (*HPMHOOK_pre_pc_overheat) (struct map_session_data **sd, int *val); @@ -5526,8 +5664,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill ** typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate); typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, short id, short group, int race, int rate); -typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, unsigned int **base_exp, unsigned int **job_exp, struct block_list **src); -typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); +typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); +typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap); @@ -5578,10 +5716,12 @@ typedef int (*HPMHOOK_pre_pc_global_expiration_timer) (int *tid, int64 *tick, in typedef int (*HPMHOOK_post_pc_global_expiration_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_pc_expire_check) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_expire_check) (struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_db_checkid) (unsigned int *class_); -typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, unsigned int class_); +typedef bool (*HPMHOOK_pre_pc_db_checkid) (int *class); +typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, int class); typedef void (*HPMHOOK_pre_pc_validate_levels) (void); typedef void (*HPMHOOK_post_pc_validate_levels) (void); +typedef void (*HPMHOOK_pre_pc_update_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_update_job_and_level) (struct map_session_data *sd); typedef void (*HPMHOOK_pre_pc_autotrade_load) (void); typedef void (*HPMHOOK_post_pc_autotrade_load) (void); typedef void (*HPMHOOK_pre_pc_autotrade_update) (struct map_session_data **sd, enum e_pc_autotrade_update_action *action); @@ -5604,6 +5744,8 @@ typedef bool (*HPMHOOK_pre_pc_process_chat_message) (struct map_session_data **s typedef bool (*HPMHOOK_post_pc_process_chat_message) (bool retVal___, struct map_session_data *sd, const char *message); typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data **sd, const char **message); typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message); +typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level); +typedef bool (*HPMHOOK_post_pc_check_basicskill) (bool retVal___, struct map_session_data *sd, int level); #endif // MAP_PC_H #ifdef MAP_NPC_H /* libpcre */ typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); @@ -5734,8 +5876,8 @@ typedef struct quest_db* (*HPMHOOK_pre_quest_db) (int *quest_id); typedef struct quest_db* (*HPMHOOK_post_quest_db) (struct quest_db* retVal___, int quest_id); typedef int (*HPMHOOK_pre_quest_pc_login) (struct map_session_data **sd); typedef int (*HPMHOOK_post_quest_pc_login) (int retVal___, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_quest_add) (struct map_session_data **sd, int *quest_id); -typedef int (*HPMHOOK_post_quest_add) (int retVal___, struct map_session_data *sd, int quest_id); +typedef int (*HPMHOOK_pre_quest_add) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); +typedef int (*HPMHOOK_post_quest_add) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); typedef int (*HPMHOOK_pre_quest_change) (struct map_session_data **sd, int *qid1, int *qid2); typedef int (*HPMHOOK_post_quest_change) (int retVal___, struct map_session_data *sd, int qid1, int qid2); typedef int (*HPMHOOK_pre_quest_delete) (struct map_session_data **sd, int *quest_id); @@ -5773,6 +5915,42 @@ typedef double (*HPMHOOK_post_rnd_uniform) (double retVal___); typedef double (*HPMHOOK_pre_rnd_uniform53) (void); typedef double (*HPMHOOK_post_rnd_uniform53) (double retVal___); #endif // COMMON_RANDOM_H +#ifdef MAP_RODEX_H /* rodex */ +typedef void (*HPMHOOK_pre_rodex_init) (bool *minimal); +typedef void (*HPMHOOK_post_rodex_init) (bool minimal); +typedef void (*HPMHOOK_pre_rodex_final) (void); +typedef void (*HPMHOOK_post_rodex_final) (void); +typedef bool (*HPMHOOK_pre_rodex_isenabled) (void); +typedef bool (*HPMHOOK_post_rodex_isenabled) (bool retVal___); +typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); +typedef void (*HPMHOOK_pre_rodex_next_page) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); +typedef void (*HPMHOOK_post_rodex_next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); +typedef void (*HPMHOOK_pre_rodex_refresh) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); +typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); +typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); +typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); +typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); +typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); +typedef void (*HPMHOOK_post_rodex_send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); +typedef struct rodex_message* (*HPMHOOK_pre_rodex_get_mail) (struct map_session_data **sd, int64 *mail_id); +typedef struct rodex_message* (*HPMHOOK_post_rodex_get_mail) (struct rodex_message* retVal___, struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_read_mail) (struct map_session_data **sd, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_read_mail) (struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_get_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_get_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_get_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_get_items) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag); +typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag); +#endif // MAP_RODEX_H #ifdef MAP_SCRIPT_H /* script */ typedef void (*HPMHOOK_pre_script_init) (bool *minimal); typedef void (*HPMHOOK_post_script_init) (bool minimal); @@ -5816,6 +5994,8 @@ typedef struct script_data* (*HPMHOOK_pre_script_get_val) (struct script_state * typedef struct script_data* (*HPMHOOK_post_script_get_val) (struct script_data* retVal___, struct script_state *st, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef char* (*HPMHOOK_post_script_get_val_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_pc_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_pc_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_scope_str) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef char* (*HPMHOOK_post_script_get_val_scope_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef char* (*HPMHOOK_pre_script_get_val_npc_str) (struct script_state **st, struct reg_db **n, struct script_data **data); @@ -5824,6 +6004,8 @@ typedef char* (*HPMHOOK_pre_script_get_val_instance_str) (struct script_state ** typedef char* (*HPMHOOK_post_script_get_val_instance_str) (char* retVal___, struct script_state *st, const char *name, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef int (*HPMHOOK_post_script_get_val_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_pc_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_pc_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_scope_num) (struct script_state **st, struct reg_db **n, struct script_data **data); typedef int (*HPMHOOK_post_script_get_val_scope_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); typedef int (*HPMHOOK_pre_script_get_val_npc_num) (struct script_state **st, struct reg_db **n, struct script_data **data); @@ -5978,6 +6160,8 @@ typedef int (*HPMHOOK_pre_script_set_reg) (struct script_state **st, struct map_ typedef int (*HPMHOOK_post_script_set_reg) (int retVal___, struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); typedef void (*HPMHOOK_pre_script_set_reg_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); typedef void (*HPMHOOK_post_script_set_reg_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_scope_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); typedef void (*HPMHOOK_post_script_set_reg_scope_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_npc_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); @@ -5986,6 +6170,8 @@ typedef void (*HPMHOOK_pre_script_set_reg_instance_str) (struct script_state **s typedef void (*HPMHOOK_post_script_set_reg_instance_str) (struct script_state *st, int64 num, const char *name, const char *str); typedef void (*HPMHOOK_pre_script_set_reg_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); typedef void (*HPMHOOK_post_script_set_reg_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); typedef void (*HPMHOOK_pre_script_set_reg_scope_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); typedef void (*HPMHOOK_post_script_set_reg_scope_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); typedef void (*HPMHOOK_pre_script_set_reg_npc_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); @@ -6016,6 +6202,12 @@ typedef void (*HPMHOOK_pre_script_add_autobonus) (const char **autobonus); typedef void (*HPMHOOK_post_script_add_autobonus) (const char *autobonus); typedef int (*HPMHOOK_pre_script_menu_countoptions) (const char **str, int *max_count, int **total); typedef int (*HPMHOOK_post_script_menu_countoptions) (int retVal___, const char *str, int max_count, int *total); +typedef int (*HPMHOOK_pre_script_buildin_recovery_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_script_buildin_recovery_sub) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_script_buildin_recovery_pc_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_pc_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_recovery_bl_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_bl_sub) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_script_buildin_areawarp_sub) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_script_buildin_areawarp_sub) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_script_buildin_areapercentheal_sub) (struct block_list **bl, va_list ap); @@ -6246,8 +6438,8 @@ typedef int (*HPMHOOK_pre_skill_get_unit_range) (uint16 *skill_id, uint16 *skill typedef int (*HPMHOOK_post_skill_get_unit_range) (int retVal___, uint16 skill_id, uint16 skill_lv); typedef int (*HPMHOOK_pre_skill_get_cooldown) (uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_skill_get_cooldown) (int retVal___, uint16 skill_id, uint16 skill_lv); -typedef int (*HPMHOOK_pre_skill_tree_get_max) (uint16 *skill_id, int *b_class); -typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, uint16 skill_id, int b_class); +typedef int (*HPMHOOK_pre_skill_tree_get_max) (uint16 *skill_id, int *class); +typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, uint16 skill_id, int class); typedef const char* (*HPMHOOK_pre_skill_get_name) (uint16 *skill_id); typedef const char* (*HPMHOOK_post_skill_get_name) (const char* retVal___, uint16 skill_id); typedef const char* (*HPMHOOK_pre_skill_get_desc) (uint16 *skill_id); @@ -6770,8 +6962,8 @@ typedef int (*HPMHOOK_pre_status_init) (bool *minimal); typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal); typedef void (*HPMHOOK_pre_status_final) (void); typedef void (*HPMHOOK_post_status_final) (void); -typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine); -typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine); +typedef int (*HPMHOOK_pre_status_get_refine_chance) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); +typedef int (*HPMHOOK_post_status_get_refine_chance) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id); typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id); typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc); @@ -6844,6 +7036,22 @@ typedef int (*HPMHOOK_pre_status_change_start) (struct block_list **src, struct typedef int (*HPMHOOK_post_status_change_start) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag); typedef int (*HPMHOOK_pre_status_change_end_) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line); typedef int (*HPMHOOK_post_status_change_end_) (int retVal___, struct block_list *bl, enum sc_type type, int tid, const char *file, int line); +typedef bool (*HPMHOOK_pre_status_is_immune_to_status) (struct status_change **sc, enum sc_type *type); +typedef bool (*HPMHOOK_post_status_is_immune_to_status) (bool retVal___, struct status_change *sc, enum sc_type type); +typedef bool (*HPMHOOK_pre_status_is_boss_resist_sc) (enum sc_type *type); +typedef bool (*HPMHOOK_post_status_is_boss_resist_sc) (bool retVal___, enum sc_type type); +typedef bool (*HPMHOOK_pre_status_end_sc_before_start) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4); +typedef bool (*HPMHOOK_post_status_end_sc_before_start) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4); +typedef void (*HPMHOOK_pre_status_change_start_stop_action) (struct block_list **bl, enum sc_type *type); +typedef void (*HPMHOOK_post_status_change_start_stop_action) (struct block_list *bl, enum sc_type type); +typedef int (*HPMHOOK_pre_status_change_start_set_option) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); +typedef int (*HPMHOOK_post_status_change_start_set_option) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4); +typedef int (*HPMHOOK_pre_status_get_val_flag) (enum sc_type *type); +typedef int (*HPMHOOK_post_status_get_val_flag) (int retVal___, enum sc_type type); +typedef void (*HPMHOOK_pre_status_change_start_display) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); +typedef void (*HPMHOOK_post_status_change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); +typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); +typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag); typedef int (*HPMHOOK_pre_status_kaahi_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_status_kaahi_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_status_change_timer) (int *tid, int64 *tick, int *id, intptr_t *data); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index 836e51f3f..3eeb7fd91 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,6 +62,8 @@ struct { struct HPMHookPoint *HP_chr_create_charstatus_post; struct HPMHookPoint *HP_chr_mmo_char_tosql_pre; struct HPMHookPoint *HP_chr_mmo_char_tosql_post; + struct HPMHookPoint *HP_chr_getitemdata_from_sql_pre; + struct HPMHookPoint *HP_chr_getitemdata_from_sql_post; struct HPMHookPoint *HP_chr_memitemdata_to_sql_pre; struct HPMHookPoint *HP_chr_memitemdata_to_sql_post; struct HPMHookPoint *HP_chr_mmo_gender_pre; @@ -624,6 +626,20 @@ struct { struct HPMHookPoint *HP_inter_pet_parse_frommap_post; struct HPMHookPoint *HP_inter_quest_parse_frommap_pre; struct HPMHookPoint *HP_inter_quest_parse_frommap_post; + struct HPMHookPoint *HP_inter_rodex_sql_init_pre; + struct HPMHookPoint *HP_inter_rodex_sql_init_post; + struct HPMHookPoint *HP_inter_rodex_sql_final_pre; + struct HPMHookPoint *HP_inter_rodex_sql_final_post; + struct HPMHookPoint *HP_inter_rodex_parse_frommap_pre; + struct HPMHookPoint *HP_inter_rodex_parse_frommap_post; + struct HPMHookPoint *HP_inter_rodex_fromsql_pre; + struct HPMHookPoint *HP_inter_rodex_fromsql_post; + struct HPMHookPoint *HP_inter_rodex_hasnew_pre; + struct HPMHookPoint *HP_inter_rodex_hasnew_post; + struct HPMHookPoint *HP_inter_rodex_checkname_pre; + struct HPMHookPoint *HP_inter_rodex_checkname_post; + struct HPMHookPoint *HP_inter_rodex_savemessage_pre; + struct HPMHookPoint *HP_inter_rodex_savemessage_post; struct HPMHookPoint *HP_inter_storage_tosql_pre; struct HPMHookPoint *HP_inter_storage_tosql_post; struct HPMHookPoint *HP_inter_storage_fromsql_pre; @@ -804,34 +820,6 @@ struct { struct HPMHookPoint *HP_loginif_send_users_count_post; struct HPMHookPoint *HP_loginif_connect_to_server_pre; struct HPMHookPoint *HP_loginif_connect_to_server_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_post; struct HPMHookPoint *HP_mapif_ban_pre; struct HPMHookPoint *HP_mapif_ban_post; struct HPMHookPoint *HP_mapif_server_init_pre; @@ -1124,6 +1112,24 @@ struct { struct HPMHookPoint *HP_mapif_send_quests_post; struct HPMHookPoint *HP_mapif_parse_quest_load_pre; struct HPMHookPoint *HP_mapif_parse_quest_load_post; + struct HPMHookPoint *HP_mapif_parse_rodex_requestinbox_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_requestinbox_post; + struct HPMHookPoint *HP_mapif_rodex_sendinbox_pre; + struct HPMHookPoint *HP_mapif_rodex_sendinbox_post; + struct HPMHookPoint *HP_mapif_parse_rodex_checkhasnew_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_checkhasnew_post; + struct HPMHookPoint *HP_mapif_rodex_sendhasnew_pre; + struct HPMHookPoint *HP_mapif_rodex_sendhasnew_post; + struct HPMHookPoint *HP_mapif_parse_rodex_updatemail_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_updatemail_post; + struct HPMHookPoint *HP_mapif_parse_rodex_send_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_send_post; + struct HPMHookPoint *HP_mapif_rodex_send_pre; + struct HPMHookPoint *HP_mapif_rodex_send_post; + struct HPMHookPoint *HP_mapif_parse_rodex_checkname_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post; + struct HPMHookPoint *HP_mapif_rodex_checkname_pre; + struct HPMHookPoint *HP_mapif_rodex_checkname_post; struct HPMHookPoint *HP_mapif_load_guild_storage_pre; struct HPMHookPoint *HP_mapif_load_guild_storage_post; struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre; @@ -1132,6 +1138,14 @@ struct { struct HPMHookPoint *HP_mapif_parse_LoadGuildStorage_post; struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_pre; struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_post; + struct HPMHookPoint *HP_mapif_account_storage_load_pre; + struct HPMHookPoint *HP_mapif_account_storage_load_post; + struct HPMHookPoint *HP_mapif_pAccountStorageLoad_pre; + struct HPMHookPoint *HP_mapif_pAccountStorageLoad_post; + struct HPMHookPoint *HP_mapif_pAccountStorageSave_pre; + struct HPMHookPoint *HP_mapif_pAccountStorageSave_post; + struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_pre; + struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_post; struct HPMHookPoint *HP_mapif_itembound_ack_pre; struct HPMHookPoint *HP_mapif_itembound_ack_post; struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_sub_pre; @@ -1567,6 +1581,8 @@ struct { int HP_chr_create_charstatus_post; int HP_chr_mmo_char_tosql_pre; int HP_chr_mmo_char_tosql_post; + int HP_chr_getitemdata_from_sql_pre; + int HP_chr_getitemdata_from_sql_post; int HP_chr_memitemdata_to_sql_pre; int HP_chr_memitemdata_to_sql_post; int HP_chr_mmo_gender_pre; @@ -2129,6 +2145,20 @@ struct { int HP_inter_pet_parse_frommap_post; int HP_inter_quest_parse_frommap_pre; int HP_inter_quest_parse_frommap_post; + int HP_inter_rodex_sql_init_pre; + int HP_inter_rodex_sql_init_post; + int HP_inter_rodex_sql_final_pre; + int HP_inter_rodex_sql_final_post; + int HP_inter_rodex_parse_frommap_pre; + int HP_inter_rodex_parse_frommap_post; + int HP_inter_rodex_fromsql_pre; + int HP_inter_rodex_fromsql_post; + int HP_inter_rodex_hasnew_pre; + int HP_inter_rodex_hasnew_post; + int HP_inter_rodex_checkname_pre; + int HP_inter_rodex_checkname_post; + int HP_inter_rodex_savemessage_pre; + int HP_inter_rodex_savemessage_post; int HP_inter_storage_tosql_pre; int HP_inter_storage_tosql_post; int HP_inter_storage_fromsql_pre; @@ -2309,34 +2339,6 @@ struct { int HP_loginif_send_users_count_post; int HP_loginif_connect_to_server_pre; int HP_loginif_connect_to_server_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_post; int HP_mapif_ban_pre; int HP_mapif_ban_post; int HP_mapif_server_init_pre; @@ -2629,6 +2631,24 @@ struct { int HP_mapif_send_quests_post; int HP_mapif_parse_quest_load_pre; int HP_mapif_parse_quest_load_post; + int HP_mapif_parse_rodex_requestinbox_pre; + int HP_mapif_parse_rodex_requestinbox_post; + int HP_mapif_rodex_sendinbox_pre; + int HP_mapif_rodex_sendinbox_post; + int HP_mapif_parse_rodex_checkhasnew_pre; + int HP_mapif_parse_rodex_checkhasnew_post; + int HP_mapif_rodex_sendhasnew_pre; + int HP_mapif_rodex_sendhasnew_post; + int HP_mapif_parse_rodex_updatemail_pre; + int HP_mapif_parse_rodex_updatemail_post; + int HP_mapif_parse_rodex_send_pre; + int HP_mapif_parse_rodex_send_post; + int HP_mapif_rodex_send_pre; + int HP_mapif_rodex_send_post; + int HP_mapif_parse_rodex_checkname_pre; + int HP_mapif_parse_rodex_checkname_post; + int HP_mapif_rodex_checkname_pre; + int HP_mapif_rodex_checkname_post; int HP_mapif_load_guild_storage_pre; int HP_mapif_load_guild_storage_post; int HP_mapif_save_guild_storage_ack_pre; @@ -2637,6 +2657,14 @@ struct { int HP_mapif_parse_LoadGuildStorage_post; int HP_mapif_parse_SaveGuildStorage_pre; int HP_mapif_parse_SaveGuildStorage_post; + int HP_mapif_account_storage_load_pre; + int HP_mapif_account_storage_load_post; + int HP_mapif_pAccountStorageLoad_pre; + int HP_mapif_pAccountStorageLoad_post; + int HP_mapif_pAccountStorageSave_pre; + int HP_mapif_pAccountStorageSave_post; + int HP_mapif_sAccountStorageSaveAck_pre; + int HP_mapif_sAccountStorageSaveAck_post; int HP_mapif_itembound_ack_pre; int HP_mapif_itembound_ack_post; int HP_mapif_parse_ItemBoundRetrieve_sub_pre; @@ -3054,10 +3082,10 @@ struct { struct inter_party_interface inter_party; struct inter_pet_interface inter_pet; struct inter_quest_interface inter_quest; + struct inter_rodex_interface inter_rodex; struct inter_storage_interface inter_storage; struct libconfig_interface libconfig; struct loginif_interface loginif; - struct malloc_interface iMalloc; struct mapif_interface mapif; struct mapindex_interface mapindex; struct md5_interface md5; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 047373f77..bbd484fe1 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,6 +46,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->set_all_offline_sql, HP_chr_set_all_offline_sql) }, { HP_POP(chr->create_charstatus, HP_chr_create_charstatus) }, { HP_POP(chr->mmo_char_tosql, HP_chr_mmo_char_tosql) }, + { HP_POP(chr->getitemdata_from_sql, HP_chr_getitemdata_from_sql) }, { HP_POP(chr->memitemdata_to_sql, HP_chr_memitemdata_to_sql) }, { HP_POP(chr->mmo_gender, HP_chr_mmo_gender) }, { HP_POP(chr->mmo_chars_fromsql, HP_chr_mmo_chars_fromsql) }, @@ -343,6 +344,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_pet->parse_frommap, HP_inter_pet_parse_frommap) }, /* inter_quest_interface */ { HP_POP(inter_quest->parse_frommap, HP_inter_quest_parse_frommap) }, +/* inter_rodex_interface */ + { HP_POP(inter_rodex->sql_init, HP_inter_rodex_sql_init) }, + { HP_POP(inter_rodex->sql_final, HP_inter_rodex_sql_final) }, + { HP_POP(inter_rodex->parse_frommap, HP_inter_rodex_parse_frommap) }, + { HP_POP(inter_rodex->fromsql, HP_inter_rodex_fromsql) }, + { HP_POP(inter_rodex->hasnew, HP_inter_rodex_hasnew) }, + { HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) }, + { HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) }, /* inter_storage_interface */ { HP_POP(inter_storage->tosql, HP_inter_storage_tosql) }, { HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) }, @@ -436,21 +445,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(loginif->auth, HP_loginif_auth) }, { HP_POP(loginif->send_users_count, HP_loginif_send_users_count) }, { HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) }, -/* malloc_interface */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, /* mapif_interface */ { HP_POP(mapif->ban, HP_mapif_ban) }, { HP_POP(mapif->server_init, HP_mapif_server_init) }, @@ -598,10 +592,23 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_quest_save, HP_mapif_parse_quest_save) }, { HP_POP(mapif->send_quests, HP_mapif_send_quests) }, { HP_POP(mapif->parse_quest_load, HP_mapif_parse_quest_load) }, + { HP_POP(mapif->parse_rodex_requestinbox, HP_mapif_parse_rodex_requestinbox) }, + { HP_POP(mapif->rodex_sendinbox, HP_mapif_rodex_sendinbox) }, + { HP_POP(mapif->parse_rodex_checkhasnew, HP_mapif_parse_rodex_checkhasnew) }, + { HP_POP(mapif->rodex_sendhasnew, HP_mapif_rodex_sendhasnew) }, + { HP_POP(mapif->parse_rodex_updatemail, HP_mapif_parse_rodex_updatemail) }, + { HP_POP(mapif->parse_rodex_send, HP_mapif_parse_rodex_send) }, + { HP_POP(mapif->rodex_send, HP_mapif_rodex_send) }, + { HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) }, + { HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) }, { HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) }, { HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) }, { HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) }, { HP_POP(mapif->parse_SaveGuildStorage, HP_mapif_parse_SaveGuildStorage) }, + { HP_POP(mapif->account_storage_load, HP_mapif_account_storage_load) }, + { HP_POP(mapif->pAccountStorageLoad, HP_mapif_pAccountStorageLoad) }, + { HP_POP(mapif->pAccountStorageSave, HP_mapif_pAccountStorageSave) }, + { HP_POP(mapif->sAccountStorageSaveAck, HP_mapif_sAccountStorageSaveAck) }, { HP_POP(mapif->itembound_ack, HP_mapif_itembound_ack) }, { HP_POP(mapif->parse_ItemBoundRetrieve_sub, HP_mapif_parse_ItemBoundRetrieve_sub) }, { HP_POP(mapif->parse_ItemBoundRetrieve, HP_mapif_parse_ItemBoundRetrieve) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index 63afcab3c..a372f83b3 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,14 +28,14 @@ /* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -55,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { + if (HPMHooks.count.HP_HCache_check_pre > 0) { bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -82,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { + if (HPMHooks.count.HP_HCache_open_pre > 0) { FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -97,9 +97,9 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } @@ -110,14 +110,14 @@ FILE* HP_HCache_open(const char *file, const char *opt) { int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_waiting_disconnect_pre ) { + if (HPMHooks.count.HP_chr_waiting_disconnect_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_waiting_disconnect_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -125,9 +125,9 @@ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.waiting_disconnect(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_waiting_disconnect_post ) { + if (HPMHooks.count.HP_chr_waiting_disconnect_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_waiting_disconnect_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -137,14 +137,14 @@ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int HP_chr_delete_char_sql(int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_delete_char_sql_pre ) { + if (HPMHooks.count.HP_chr_delete_char_sql_pre > 0) { int (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_sql_pre[hIndex].func; retVal___ = preHookFunc(&char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -152,9 +152,9 @@ int HP_chr_delete_char_sql(int char_id) { { retVal___ = HPMHooks.source.chr.delete_char_sql(char_id); } - if( HPMHooks.count.HP_chr_delete_char_sql_post ) { + if (HPMHooks.count.HP_chr_delete_char_sql_post > 0) { int (*postHookFunc) (int retVal___, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id); } @@ -164,16 +164,16 @@ int HP_chr_delete_char_sql(int char_id) { struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_chr_create_online_char_data_pre ) { + if (HPMHooks.count.HP_chr_create_online_char_data_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_chr_create_online_char_data_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -183,9 +183,9 @@ struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { retVal___ = HPMHooks.source.chr.create_online_char_data(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_chr_create_online_char_data_post ) { + if (HPMHooks.count.HP_chr_create_online_char_data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_chr_create_online_char_data_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, args___copy); @@ -196,14 +196,14 @@ struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { } void HP_chr_set_account_online(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_account_online_pre ) { + if (HPMHooks.count.HP_chr_set_account_online_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_account_online_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -211,9 +211,9 @@ void HP_chr_set_account_online(int account_id) { { HPMHooks.source.chr.set_account_online(account_id); } - if( HPMHooks.count.HP_chr_set_account_online_post ) { + if (HPMHooks.count.HP_chr_set_account_online_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_account_online_post[hIndex].func; postHookFunc(account_id); } @@ -222,14 +222,14 @@ void HP_chr_set_account_online(int account_id) { } void HP_chr_set_account_offline(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_account_offline_pre ) { + if (HPMHooks.count.HP_chr_set_account_offline_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_account_offline_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -237,9 +237,9 @@ void HP_chr_set_account_offline(int account_id) { { HPMHooks.source.chr.set_account_offline(account_id); } - if( HPMHooks.count.HP_chr_set_account_offline_post ) { + if (HPMHooks.count.HP_chr_set_account_offline_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_account_offline_post[hIndex].func; postHookFunc(account_id); } @@ -248,14 +248,14 @@ void HP_chr_set_account_offline(int account_id) { } void HP_chr_set_char_charselect(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_charselect_pre ) { + if (HPMHooks.count.HP_chr_set_char_charselect_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_charselect_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -263,9 +263,9 @@ void HP_chr_set_char_charselect(int account_id) { { HPMHooks.source.chr.set_char_charselect(account_id); } - if( HPMHooks.count.HP_chr_set_char_charselect_post ) { + if (HPMHooks.count.HP_chr_set_char_charselect_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_charselect_post[hIndex].func; postHookFunc(account_id); } @@ -274,14 +274,14 @@ void HP_chr_set_char_charselect(int account_id) { } void HP_chr_set_char_online(int map_id, int char_id, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_online_pre ) { + if (HPMHooks.count.HP_chr_set_char_online_pre > 0) { void (*preHookFunc) (int *map_id, int *char_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_online_pre[hIndex].func; preHookFunc(&map_id, &char_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -289,9 +289,9 @@ void HP_chr_set_char_online(int map_id, int char_id, int account_id) { { HPMHooks.source.chr.set_char_online(map_id, char_id, account_id); } - if( HPMHooks.count.HP_chr_set_char_online_post ) { + if (HPMHooks.count.HP_chr_set_char_online_post > 0) { void (*postHookFunc) (int map_id, int char_id, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_online_post[hIndex].func; postHookFunc(map_id, char_id, account_id); } @@ -300,14 +300,14 @@ void HP_chr_set_char_online(int map_id, int char_id, int account_id) { } void HP_chr_set_char_offline(int char_id, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_offline_pre ) { + if (HPMHooks.count.HP_chr_set_char_offline_pre > 0) { void (*preHookFunc) (int *char_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_offline_pre[hIndex].func; preHookFunc(&char_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -315,9 +315,9 @@ void HP_chr_set_char_offline(int char_id, int account_id) { { HPMHooks.source.chr.set_char_offline(char_id, account_id); } - if( HPMHooks.count.HP_chr_set_char_offline_post ) { + if (HPMHooks.count.HP_chr_set_char_offline_post > 0) { void (*postHookFunc) (int char_id, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_offline_post[hIndex].func; postHookFunc(char_id, account_id); } @@ -327,16 +327,16 @@ void HP_chr_set_char_offline(int char_id, int account_id) { int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_db_setoffline_pre ) { + if (HPMHooks.count.HP_chr_db_setoffline_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_db_setoffline_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -346,9 +346,9 @@ int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.chr.db_setoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_db_setoffline_post ) { + if (HPMHooks.count.HP_chr_db_setoffline_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_db_setoffline_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -360,16 +360,16 @@ int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_db_kickoffline_pre ) { + if (HPMHooks.count.HP_chr_db_kickoffline_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_db_kickoffline_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -379,9 +379,9 @@ int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.chr.db_kickoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_db_kickoffline_post ) { + if (HPMHooks.count.HP_chr_db_kickoffline_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_db_kickoffline_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -392,14 +392,14 @@ int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { } void HP_chr_set_login_all_offline(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_login_all_offline_pre ) { + if (HPMHooks.count.HP_chr_set_login_all_offline_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_login_all_offline_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -407,9 +407,9 @@ void HP_chr_set_login_all_offline(void) { { HPMHooks.source.chr.set_login_all_offline(); } - if( HPMHooks.count.HP_chr_set_login_all_offline_post ) { + if (HPMHooks.count.HP_chr_set_login_all_offline_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_login_all_offline_post[hIndex].func; postHookFunc(); } @@ -418,14 +418,14 @@ void HP_chr_set_login_all_offline(void) { } void HP_chr_set_all_offline(int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_all_offline_pre ) { + if (HPMHooks.count.HP_chr_set_all_offline_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_all_offline_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -433,9 +433,9 @@ void HP_chr_set_all_offline(int id) { { HPMHooks.source.chr.set_all_offline(id); } - if( HPMHooks.count.HP_chr_set_all_offline_post ) { + if (HPMHooks.count.HP_chr_set_all_offline_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_all_offline_post[hIndex].func; postHookFunc(id); } @@ -444,14 +444,14 @@ void HP_chr_set_all_offline(int id) { } void HP_chr_set_all_offline_sql(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_all_offline_sql_pre ) { + if (HPMHooks.count.HP_chr_set_all_offline_sql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_all_offline_sql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -459,9 +459,9 @@ void HP_chr_set_all_offline_sql(void) { { HPMHooks.source.chr.set_all_offline_sql(); } - if( HPMHooks.count.HP_chr_set_all_offline_sql_post ) { + if (HPMHooks.count.HP_chr_set_all_offline_sql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_all_offline_sql_post[hIndex].func; postHookFunc(); } @@ -471,16 +471,16 @@ void HP_chr_set_all_offline_sql(void) { struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_chr_create_charstatus_pre ) { + if (HPMHooks.count.HP_chr_create_charstatus_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_chr_create_charstatus_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -490,9 +490,9 @@ struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { retVal___ = HPMHooks.source.chr.create_charstatus(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_chr_create_charstatus_post ) { + if (HPMHooks.count.HP_chr_create_charstatus_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_chr_create_charstatus_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, args___copy); @@ -504,14 +504,14 @@ struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { int HP_chr_mmo_char_tosql(int char_id, struct mmo_charstatus *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_tosql_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_tosql_pre > 0) { int (*preHookFunc) (int *char_id, struct mmo_charstatus **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_tosql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -519,38 +519,65 @@ int HP_chr_mmo_char_tosql(int char_id, struct mmo_charstatus *p) { { retVal___ = HPMHooks.source.chr.mmo_char_tosql(char_id, p); } - if( HPMHooks.count.HP_chr_mmo_char_tosql_post ) { + if (HPMHooks.count.HP_chr_mmo_char_tosql_post > 0) { int (*postHookFunc) (int retVal___, int char_id, struct mmo_charstatus *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, p); } } return retVal___; } -int HP_chr_memitemdata_to_sql(const struct item items[], int max, int id, int tableswitch) { +int HP_chr_getitemdata_from_sql(struct item *items, int max, int guid, enum inventory_table_type table) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_memitemdata_to_sql_pre ) { - int (*preHookFunc) (const struct item *items[], int *max, int *id, int *tableswitch); + if (HPMHooks.count.HP_chr_getitemdata_from_sql_pre > 0) { + int (*preHookFunc) (struct item **items, int *max, int *guid, enum inventory_table_type *table); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_getitemdata_from_sql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_getitemdata_from_sql_pre[hIndex].func; + retVal___ = preHookFunc(&items, &max, &guid, &table); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.getitemdata_from_sql(items, max, guid, table); + } + if (HPMHooks.count.HP_chr_getitemdata_from_sql_post > 0) { + int (*postHookFunc) (int retVal___, struct item *items, int max, int guid, enum inventory_table_type table); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_getitemdata_from_sql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_getitemdata_from_sql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, items, max, guid, table); + } + } + return retVal___; +} +int HP_chr_memitemdata_to_sql(const struct item items[], int id, enum inventory_table_type table) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_chr_memitemdata_to_sql_pre > 0) { + int (*preHookFunc) (const struct item *items[], int *id, enum inventory_table_type *table); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_memitemdata_to_sql_pre[hIndex].func; - retVal___ = preHookFunc(&items, &max, &id, &tableswitch); + retVal___ = preHookFunc(&items, &id, &table); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.memitemdata_to_sql(items, max, id, tableswitch); + retVal___ = HPMHooks.source.chr.memitemdata_to_sql(items, id, table); } - if( HPMHooks.count.HP_chr_memitemdata_to_sql_post ) { - int (*postHookFunc) (int retVal___, const struct item items[], int max, int id, int tableswitch); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_memitemdata_to_sql_post > 0) { + int (*postHookFunc) (int retVal___, const struct item items[], int id, enum inventory_table_type table); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_memitemdata_to_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, items, max, id, tableswitch); + retVal___ = postHookFunc(retVal___, items, id, table); } } return retVal___; @@ -558,14 +585,14 @@ int HP_chr_memitemdata_to_sql(const struct item items[], int max, int id, int ta int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_charstatus *p, char sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_gender_pre ) { + if (HPMHooks.count.HP_chr_mmo_gender_pre > 0) { int (*preHookFunc) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_gender_pre[hIndex].func; retVal___ = preHookFunc(&sd, &p, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -573,9 +600,9 @@ int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_chars { retVal___ = HPMHooks.source.chr.mmo_gender(sd, p, sex); } - if( HPMHooks.count.HP_chr_mmo_gender_post ) { + if (HPMHooks.count.HP_chr_mmo_gender_post > 0) { int (*postHookFunc) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_gender_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, p, sex); } @@ -585,14 +612,14 @@ int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_chars int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_chars_fromsql_pre ) { + if (HPMHooks.count.HP_chr_mmo_chars_fromsql_pre > 0) { int (*preHookFunc) (struct char_session_data **sd, uint8 **buf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&sd, &buf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -600,9 +627,9 @@ int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { { retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf); } - if( HPMHooks.count.HP_chr_mmo_chars_fromsql_post ) { + if (HPMHooks.count.HP_chr_mmo_chars_fromsql_post > 0) { int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, buf); } @@ -612,14 +639,14 @@ int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_everything) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_fromsql_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_fromsql_pre > 0) { int (*preHookFunc) (int *char_id, struct mmo_charstatus **p, bool *load_everything); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &p, &load_everything); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -627,9 +654,9 @@ int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_eve { retVal___ = HPMHooks.source.chr.mmo_char_fromsql(char_id, p, load_everything); } - if( HPMHooks.count.HP_chr_mmo_char_fromsql_post ) { + if (HPMHooks.count.HP_chr_mmo_char_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int char_id, struct mmo_charstatus *p, bool load_everything); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, p, load_everything); } @@ -639,14 +666,14 @@ int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_eve int HP_chr_mmo_char_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_sql_init_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -654,9 +681,9 @@ int HP_chr_mmo_char_sql_init(void) { { retVal___ = HPMHooks.source.chr.mmo_char_sql_init(); } - if( HPMHooks.count.HP_chr_mmo_char_sql_init_post ) { + if (HPMHooks.count.HP_chr_mmo_char_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -666,14 +693,14 @@ int HP_chr_mmo_char_sql_init(void) { bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short from, unsigned short to) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_char_slotchange_pre ) { + if (HPMHooks.count.HP_chr_char_slotchange_pre > 0) { bool (*preHookFunc) (struct char_session_data **sd, int *fd, unsigned short *from, unsigned short *to); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_slotchange_pre[hIndex].func; retVal___ = preHookFunc(&sd, &fd, &from, &to); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -681,9 +708,9 @@ bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short { retVal___ = HPMHooks.source.chr.char_slotchange(sd, fd, from, to); } - if( HPMHooks.count.HP_chr_char_slotchange_post ) { + if (HPMHooks.count.HP_chr_char_slotchange_post > 0) { bool (*postHookFunc) (bool retVal___, struct char_session_data *sd, int fd, unsigned short from, unsigned short to); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_slotchange_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, fd, from, to); } @@ -693,14 +720,14 @@ bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short int HP_chr_rename_char_sql(struct char_session_data *sd, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_rename_char_sql_pre ) { + if (HPMHooks.count.HP_chr_rename_char_sql_pre > 0) { int (*preHookFunc) (struct char_session_data **sd, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_rename_char_sql_pre[hIndex].func; retVal___ = preHookFunc(&sd, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -708,9 +735,9 @@ int HP_chr_rename_char_sql(struct char_session_data *sd, int char_id) { { retVal___ = HPMHooks.source.chr.rename_char_sql(sd, char_id); } - if( HPMHooks.count.HP_chr_rename_char_sql_post ) { + if (HPMHooks.count.HP_chr_rename_char_sql_post > 0) { int (*postHookFunc) (int retVal___, struct char_session_data *sd, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_rename_char_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, char_id); } @@ -720,14 +747,14 @@ int HP_chr_rename_char_sql(struct char_session_data *sd, int char_id) { int HP_chr_check_char_name(char *name, char *esc_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_check_char_name_pre ) { + if (HPMHooks.count.HP_chr_check_char_name_pre > 0) { int (*preHookFunc) (char **name, char **esc_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_check_char_name_pre[hIndex].func; retVal___ = preHookFunc(&name, &esc_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -735,38 +762,38 @@ int HP_chr_check_char_name(char *name, char *esc_name) { { retVal___ = HPMHooks.source.chr.check_char_name(name, esc_name); } - if( HPMHooks.count.HP_chr_check_char_name_post ) { + if (HPMHooks.count.HP_chr_check_char_name_post > 0) { int (*postHookFunc) (int retVal___, char *name, char *esc_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_check_char_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, esc_name); } } return retVal___; } -int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style) { +int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_make_new_char_sql_pre ) { - int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style); + if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) { + int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, short *starting_job, uint8 *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style); + retVal___ = preHookFunc(&sd, &name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style, &starting_job, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style); + retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } - if( HPMHooks.count.HP_chr_make_new_char_sql_post ) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) { + int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job, uint8 sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style); + retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } } return retVal___; @@ -774,14 +801,14 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_divorce_char_sql_pre ) { + if (HPMHooks.count.HP_chr_divorce_char_sql_pre > 0) { int (*preHookFunc) (int *partner_id1, int *partner_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_divorce_char_sql_pre[hIndex].func; retVal___ = preHookFunc(&partner_id1, &partner_id2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -789,9 +816,9 @@ int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { { retVal___ = HPMHooks.source.chr.divorce_char_sql(partner_id1, partner_id2); } - if( HPMHooks.count.HP_chr_divorce_char_sql_post ) { + if (HPMHooks.count.HP_chr_divorce_char_sql_post > 0) { int (*postHookFunc) (int retVal___, int partner_id1, int partner_id2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_divorce_char_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, partner_id1, partner_id2); } @@ -801,14 +828,14 @@ int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { int HP_chr_count_users(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_count_users_pre ) { + if (HPMHooks.count.HP_chr_count_users_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_count_users_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -816,9 +843,9 @@ int HP_chr_count_users(void) { { retVal___ = HPMHooks.source.chr.count_users(); } - if( HPMHooks.count.HP_chr_count_users_post ) { + if (HPMHooks.count.HP_chr_count_users_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_count_users_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -828,14 +855,14 @@ int HP_chr_count_users(void) { int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_tobuf_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_tobuf_pre > 0) { int (*preHookFunc) (uint8 **buffer, struct mmo_charstatus **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_tobuf_pre[hIndex].func; retVal___ = preHookFunc(&buffer, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -843,9 +870,9 @@ int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { { retVal___ = HPMHooks.source.chr.mmo_char_tobuf(buffer, p); } - if( HPMHooks.count.HP_chr_mmo_char_tobuf_post ) { + if (HPMHooks.count.HP_chr_mmo_char_tobuf_post > 0) { int (*postHookFunc) (int retVal___, uint8 *buffer, struct mmo_charstatus *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_tobuf_post[hIndex].func; retVal___ = postHookFunc(retVal___, buffer, p); } @@ -854,14 +881,14 @@ int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { } void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send099d_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_send099d_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -869,9 +896,9 @@ void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.mmo_char_send099d(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send099d_post ) { + if (HPMHooks.count.HP_chr_mmo_char_send099d_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_post[hIndex].func; postHookFunc(fd, sd); } @@ -880,14 +907,14 @@ void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { } void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_ban_list_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -895,9 +922,9 @@ void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.mmo_char_send_ban_list(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_ban_list_post ) { + if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_ban_list_post[hIndex].func; postHookFunc(fd, sd); } @@ -906,14 +933,14 @@ void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { } void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_slots_info_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -921,9 +948,9 @@ void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.mmo_char_send_slots_info(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_slots_info_post ) { + if (HPMHooks.count.HP_chr_mmo_char_send_slots_info_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_slots_info_post[hIndex].func; postHookFunc(fd, sd); } @@ -933,14 +960,14 @@ void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_characters_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_send_characters_pre > 0) { int (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_characters_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -948,9 +975,9 @@ int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { { retVal___ = HPMHooks.source.chr.mmo_char_send_characters(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_characters_post ) { + if (HPMHooks.count.HP_chr_mmo_char_send_characters_post > 0) { int (*postHookFunc) (int retVal___, int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_characters_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -960,14 +987,14 @@ int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { int HP_chr_char_married(int pl1, int pl2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_married_pre ) { + if (HPMHooks.count.HP_chr_char_married_pre > 0) { int (*preHookFunc) (int *pl1, int *pl2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_married_pre[hIndex].func; retVal___ = preHookFunc(&pl1, &pl2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -975,9 +1002,9 @@ int HP_chr_char_married(int pl1, int pl2) { { retVal___ = HPMHooks.source.chr.char_married(pl1, pl2); } - if( HPMHooks.count.HP_chr_char_married_post ) { + if (HPMHooks.count.HP_chr_char_married_post > 0) { int (*postHookFunc) (int retVal___, int pl1, int pl2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_married_post[hIndex].func; retVal___ = postHookFunc(retVal___, pl1, pl2); } @@ -987,14 +1014,14 @@ int HP_chr_char_married(int pl1, int pl2) { int HP_chr_char_child(int parent_id, int child_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_child_pre ) { + if (HPMHooks.count.HP_chr_char_child_pre > 0) { int (*preHookFunc) (int *parent_id, int *child_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_child_pre[hIndex].func; retVal___ = preHookFunc(&parent_id, &child_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1002,9 +1029,9 @@ int HP_chr_char_child(int parent_id, int child_id) { { retVal___ = HPMHooks.source.chr.char_child(parent_id, child_id); } - if( HPMHooks.count.HP_chr_char_child_post ) { + if (HPMHooks.count.HP_chr_char_child_post > 0) { int (*postHookFunc) (int retVal___, int parent_id, int child_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_child_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent_id, child_id); } @@ -1014,14 +1041,14 @@ int HP_chr_char_child(int parent_id, int child_id) { int HP_chr_char_family(int cid1, int cid2, int cid3) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_family_pre ) { + if (HPMHooks.count.HP_chr_char_family_pre > 0) { int (*preHookFunc) (int *cid1, int *cid2, int *cid3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_family_pre[hIndex].func; retVal___ = preHookFunc(&cid1, &cid2, &cid3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1029,9 +1056,9 @@ int HP_chr_char_family(int cid1, int cid2, int cid3) { { retVal___ = HPMHooks.source.chr.char_family(cid1, cid2, cid3); } - if( HPMHooks.count.HP_chr_char_family_post ) { + if (HPMHooks.count.HP_chr_char_family_post > 0) { int (*postHookFunc) (int retVal___, int cid1, int cid2, int cid3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_family_post[hIndex].func; retVal___ = postHookFunc(retVal___, cid1, cid2, cid3); } @@ -1040,14 +1067,14 @@ int HP_chr_char_family(int cid1, int cid2, int cid3) { } void HP_chr_disconnect_player(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_disconnect_player_pre ) { + if (HPMHooks.count.HP_chr_disconnect_player_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_disconnect_player_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1055,9 +1082,9 @@ void HP_chr_disconnect_player(int account_id) { { HPMHooks.source.chr.disconnect_player(account_id); } - if( HPMHooks.count.HP_chr_disconnect_player_post ) { + if (HPMHooks.count.HP_chr_disconnect_player_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_disconnect_player_post[hIndex].func; postHookFunc(account_id); } @@ -1066,14 +1093,14 @@ void HP_chr_disconnect_player(int account_id) { } void HP_chr_authfail_fd(int fd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_chr_authfail_fd_pre ) { + if (HPMHooks.count.HP_chr_authfail_fd_pre > 0) { void (*preHookFunc) (int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_authfail_fd_pre[hIndex].func; preHookFunc(&fd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1081,9 +1108,9 @@ void HP_chr_authfail_fd(int fd, int type) { { HPMHooks.source.chr.authfail_fd(fd, type); } - if( HPMHooks.count.HP_chr_authfail_fd_post ) { + if (HPMHooks.count.HP_chr_authfail_fd_post > 0) { void (*postHookFunc) (int fd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_authfail_fd_post[hIndex].func; postHookFunc(fd, type); } @@ -1092,14 +1119,14 @@ void HP_chr_authfail_fd(int fd, int type) { } void HP_chr_request_account_data(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_request_account_data_pre ) { + if (HPMHooks.count.HP_chr_request_account_data_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_request_account_data_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1107,9 +1134,9 @@ void HP_chr_request_account_data(int account_id) { { HPMHooks.source.chr.request_account_data(account_id); } - if( HPMHooks.count.HP_chr_request_account_data_post ) { + if (HPMHooks.count.HP_chr_request_account_data_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_request_account_data_post[hIndex].func; postHookFunc(account_id); } @@ -1118,14 +1145,14 @@ void HP_chr_request_account_data(int account_id) { } void HP_chr_auth_ok(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_auth_ok_pre ) { + if (HPMHooks.count.HP_chr_auth_ok_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_auth_ok_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1133,9 +1160,9 @@ void HP_chr_auth_ok(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.auth_ok(fd, sd); } - if( HPMHooks.count.HP_chr_auth_ok_post ) { + if (HPMHooks.count.HP_chr_auth_ok_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_auth_ok_post[hIndex].func; postHookFunc(fd, sd); } @@ -1144,14 +1171,14 @@ void HP_chr_auth_ok(int fd, struct char_session_data *sd) { } void HP_chr_ping_login_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ping_login_server_pre ) { + if (HPMHooks.count.HP_chr_ping_login_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ping_login_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1159,9 +1186,9 @@ void HP_chr_ping_login_server(int fd) { { HPMHooks.source.chr.ping_login_server(fd); } - if( HPMHooks.count.HP_chr_ping_login_server_post ) { + if (HPMHooks.count.HP_chr_ping_login_server_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ping_login_server_post[hIndex].func; postHookFunc(fd); } @@ -1171,14 +1198,14 @@ void HP_chr_ping_login_server(int fd) { int HP_chr_parse_fromlogin_connection_state(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_connection_state_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1186,9 +1213,9 @@ int HP_chr_parse_fromlogin_connection_state(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin_connection_state(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_connection_state_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -1197,14 +1224,14 @@ int HP_chr_parse_fromlogin_connection_state(int fd) { } void HP_chr_auth_error(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_auth_error_pre ) { + if (HPMHooks.count.HP_chr_auth_error_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_auth_error_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1212,9 +1239,9 @@ void HP_chr_auth_error(int fd, unsigned char flag) { { HPMHooks.source.chr.auth_error(fd, flag); } - if( HPMHooks.count.HP_chr_auth_error_post ) { + if (HPMHooks.count.HP_chr_auth_error_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_auth_error_post[hIndex].func; postHookFunc(fd, flag); } @@ -1223,14 +1250,14 @@ void HP_chr_auth_error(int fd, unsigned char flag) { } void HP_chr_parse_fromlogin_auth_state(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_auth_state_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1238,9 +1265,9 @@ void HP_chr_parse_fromlogin_auth_state(int fd) { { HPMHooks.source.chr.parse_fromlogin_auth_state(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_auth_state_post[hIndex].func; postHookFunc(fd); } @@ -1249,14 +1276,14 @@ void HP_chr_parse_fromlogin_auth_state(int fd) { } void HP_chr_parse_fromlogin_account_data(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_data_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1264,9 +1291,9 @@ void HP_chr_parse_fromlogin_account_data(int fd) { { HPMHooks.source.chr.parse_fromlogin_account_data(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_account_data_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_data_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_data_post[hIndex].func; postHookFunc(fd); } @@ -1275,14 +1302,14 @@ void HP_chr_parse_fromlogin_account_data(int fd) { } void HP_chr_parse_fromlogin_login_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_login_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1290,9 +1317,9 @@ void HP_chr_parse_fromlogin_login_pong(int fd) { { HPMHooks.source.chr.parse_fromlogin_login_pong(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_login_pong_post[hIndex].func; postHookFunc(fd); } @@ -1301,14 +1328,14 @@ void HP_chr_parse_fromlogin_login_pong(int fd) { } void HP_chr_changesex(int account_id, int sex) { int hIndex = 0; - if( HPMHooks.count.HP_chr_changesex_pre ) { + if (HPMHooks.count.HP_chr_changesex_pre > 0) { void (*preHookFunc) (int *account_id, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_changesex_pre[hIndex].func; preHookFunc(&account_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1316,9 +1343,9 @@ void HP_chr_changesex(int account_id, int sex) { { HPMHooks.source.chr.changesex(account_id, sex); } - if( HPMHooks.count.HP_chr_changesex_post ) { + if (HPMHooks.count.HP_chr_changesex_post > 0) { void (*postHookFunc) (int account_id, int sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_changesex_post[hIndex].func; postHookFunc(account_id, sex); } @@ -1328,14 +1355,14 @@ void HP_chr_changesex(int account_id, int sex) { int HP_chr_parse_fromlogin_changesex_reply(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_changesex_reply_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1343,9 +1370,9 @@ int HP_chr_parse_fromlogin_changesex_reply(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin_changesex_reply(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_changesex_reply_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -1354,14 +1381,14 @@ int HP_chr_parse_fromlogin_changesex_reply(int fd) { } void HP_chr_parse_fromlogin_account_reg2(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_reg2_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1369,9 +1396,9 @@ void HP_chr_parse_fromlogin_account_reg2(int fd) { { HPMHooks.source.chr.parse_fromlogin_account_reg2(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_reg2_post[hIndex].func; postHookFunc(fd); } @@ -1380,14 +1407,14 @@ void HP_chr_parse_fromlogin_account_reg2(int fd) { } void HP_chr_parse_fromlogin_ban(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_ban_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_ban_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_ban_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1395,9 +1422,9 @@ void HP_chr_parse_fromlogin_ban(int fd) { { HPMHooks.source.chr.parse_fromlogin_ban(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_ban_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_ban_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_ban_post[hIndex].func; postHookFunc(fd); } @@ -1406,14 +1433,14 @@ void HP_chr_parse_fromlogin_ban(int fd) { } void HP_chr_parse_fromlogin_kick(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_kick_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_kick_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_kick_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1421,9 +1448,9 @@ void HP_chr_parse_fromlogin_kick(int fd) { { HPMHooks.source.chr.parse_fromlogin_kick(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_kick_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_kick_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_kick_post[hIndex].func; postHookFunc(fd); } @@ -1432,14 +1459,14 @@ void HP_chr_parse_fromlogin_kick(int fd) { } void HP_chr_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_update_ip_pre ) { + if (HPMHooks.count.HP_chr_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_update_ip_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1447,9 +1474,9 @@ void HP_chr_update_ip(int fd) { { HPMHooks.source.chr.update_ip(fd); } - if( HPMHooks.count.HP_chr_update_ip_post ) { + if (HPMHooks.count.HP_chr_update_ip_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_update_ip_post[hIndex].func; postHookFunc(fd); } @@ -1458,14 +1485,14 @@ void HP_chr_update_ip(int fd) { } void HP_chr_parse_fromlogin_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_update_ip_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1473,9 +1500,9 @@ void HP_chr_parse_fromlogin_update_ip(int fd) { { HPMHooks.source.chr.parse_fromlogin_update_ip(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_update_ip_post[hIndex].func; postHookFunc(fd); } @@ -1484,14 +1511,14 @@ void HP_chr_parse_fromlogin_update_ip(int fd) { } void HP_chr_parse_fromlogin_accinfo2_failed(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_failed_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1499,9 +1526,9 @@ void HP_chr_parse_fromlogin_accinfo2_failed(int fd) { { HPMHooks.source.chr.parse_fromlogin_accinfo2_failed(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_failed_post[hIndex].func; postHookFunc(fd); } @@ -1510,14 +1537,14 @@ void HP_chr_parse_fromlogin_accinfo2_failed(int fd) { } void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1525,9 +1552,9 @@ void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { { HPMHooks.source.chr.parse_fromlogin_accinfo2_ok(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_ok_post[hIndex].func; postHookFunc(fd); } @@ -1537,14 +1564,14 @@ void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { int HP_chr_parse_fromlogin(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1552,9 +1579,9 @@ int HP_chr_parse_fromlogin(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_post ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -1564,14 +1591,14 @@ int HP_chr_parse_fromlogin(int fd) { int HP_chr_request_accreg2(int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_request_accreg2_pre ) { + if (HPMHooks.count.HP_chr_request_accreg2_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_request_accreg2_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1579,9 +1606,9 @@ int HP_chr_request_accreg2(int account_id, int char_id) { { retVal___ = HPMHooks.source.chr.request_accreg2(account_id, char_id); } - if( HPMHooks.count.HP_chr_request_accreg2_post ) { + if (HPMHooks.count.HP_chr_request_accreg2_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_request_accreg2_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id); } @@ -1590,14 +1617,14 @@ int HP_chr_request_accreg2(int account_id, int char_id) { } void HP_chr_global_accreg_to_login_start(int account_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_start_pre ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_start_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_start_pre[hIndex].func; preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1605,9 +1632,9 @@ void HP_chr_global_accreg_to_login_start(int account_id, int char_id) { { HPMHooks.source.chr.global_accreg_to_login_start(account_id, char_id); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_start_post ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_start_post > 0) { void (*postHookFunc) (int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_start_post[hIndex].func; postHookFunc(account_id, char_id); } @@ -1616,14 +1643,14 @@ void HP_chr_global_accreg_to_login_start(int account_id, int char_id) { } void HP_chr_global_accreg_to_login_send(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_send_pre ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_send_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_send_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1631,9 +1658,9 @@ void HP_chr_global_accreg_to_login_send(void) { { HPMHooks.source.chr.global_accreg_to_login_send(); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_send_post ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_send_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_send_post[hIndex].func; postHookFunc(); } @@ -1642,14 +1669,14 @@ void HP_chr_global_accreg_to_login_send(void) { } void HP_chr_global_accreg_to_login_add(const char *key, unsigned int index, intptr_t val, bool is_string) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_add_pre ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_add_pre > 0) { void (*preHookFunc) (const char **key, unsigned int *index, intptr_t *val, bool *is_string); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_add_pre[hIndex].func; preHookFunc(&key, &index, &val, &is_string); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1657,9 +1684,9 @@ void HP_chr_global_accreg_to_login_add(const char *key, unsigned int index, intp { HPMHooks.source.chr.global_accreg_to_login_add(key, index, val, is_string); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_add_post ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_add_post > 0) { void (*postHookFunc) (const char *key, unsigned int index, intptr_t val, bool is_string); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_add_post[hIndex].func; postHookFunc(key, index, val, is_string); } @@ -1668,14 +1695,14 @@ void HP_chr_global_accreg_to_login_add(const char *key, unsigned int index, intp } void HP_chr_read_fame_list(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_read_fame_list_pre ) { + if (HPMHooks.count.HP_chr_read_fame_list_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_read_fame_list_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1683,9 +1710,9 @@ void HP_chr_read_fame_list(void) { { HPMHooks.source.chr.read_fame_list(); } - if( HPMHooks.count.HP_chr_read_fame_list_post ) { + if (HPMHooks.count.HP_chr_read_fame_list_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_read_fame_list_post[hIndex].func; postHookFunc(); } @@ -1695,14 +1722,14 @@ void HP_chr_read_fame_list(void) { int HP_chr_send_fame_list(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_fame_list_pre ) { + if (HPMHooks.count.HP_chr_send_fame_list_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_fame_list_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1710,9 +1737,9 @@ int HP_chr_send_fame_list(int fd) { { retVal___ = HPMHooks.source.chr.send_fame_list(fd); } - if( HPMHooks.count.HP_chr_send_fame_list_post ) { + if (HPMHooks.count.HP_chr_send_fame_list_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_fame_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -1721,14 +1748,14 @@ int HP_chr_send_fame_list(int fd) { } void HP_chr_update_fame_list(int type, int index, int fame) { int hIndex = 0; - if( HPMHooks.count.HP_chr_update_fame_list_pre ) { + if (HPMHooks.count.HP_chr_update_fame_list_pre > 0) { void (*preHookFunc) (int *type, int *index, int *fame); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_update_fame_list_pre[hIndex].func; preHookFunc(&type, &index, &fame); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1736,9 +1763,9 @@ void HP_chr_update_fame_list(int type, int index, int fame) { { HPMHooks.source.chr.update_fame_list(type, index, fame); } - if( HPMHooks.count.HP_chr_update_fame_list_post ) { + if (HPMHooks.count.HP_chr_update_fame_list_post > 0) { void (*postHookFunc) (int type, int index, int fame); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_update_fame_list_post[hIndex].func; postHookFunc(type, index, fame); } @@ -1748,14 +1775,14 @@ void HP_chr_update_fame_list(int type, int index, int fame) { int HP_chr_loadName(int char_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_loadName_pre ) { + if (HPMHooks.count.HP_chr_loadName_pre > 0) { int (*preHookFunc) (int *char_id, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_loadName_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1763,9 +1790,9 @@ int HP_chr_loadName(int char_id, char *name) { { retVal___ = HPMHooks.source.chr.loadName(char_id, name); } - if( HPMHooks.count.HP_chr_loadName_post ) { + if (HPMHooks.count.HP_chr_loadName_post > 0) { int (*postHookFunc) (int retVal___, int char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_loadName_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, name); } @@ -1774,14 +1801,14 @@ int HP_chr_loadName(int char_id, char *name) { } void HP_chr_parse_frommap_datasync(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_datasync_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_datasync_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_datasync_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1789,9 +1816,9 @@ void HP_chr_parse_frommap_datasync(int fd) { { HPMHooks.source.chr.parse_frommap_datasync(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_datasync_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_datasync_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_datasync_post[hIndex].func; postHookFunc(fd); } @@ -1800,14 +1827,14 @@ void HP_chr_parse_frommap_datasync(int fd) { } void HP_chr_parse_frommap_skillid2idx(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_skillid2idx_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1815,9 +1842,9 @@ void HP_chr_parse_frommap_skillid2idx(int fd) { { HPMHooks.source.chr.parse_frommap_skillid2idx(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_skillid2idx_post[hIndex].func; postHookFunc(fd); } @@ -1826,14 +1853,14 @@ void HP_chr_parse_frommap_skillid2idx(int fd) { } void HP_chr_map_received_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_received_ok_pre ) { + if (HPMHooks.count.HP_chr_map_received_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_received_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1841,9 +1868,9 @@ void HP_chr_map_received_ok(int fd) { { HPMHooks.source.chr.map_received_ok(fd); } - if( HPMHooks.count.HP_chr_map_received_ok_post ) { + if (HPMHooks.count.HP_chr_map_received_ok_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_received_ok_post[hIndex].func; postHookFunc(fd); } @@ -1852,14 +1879,14 @@ void HP_chr_map_received_ok(int fd) { } void HP_chr_send_maps(int fd, int id, int j) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_maps_pre ) { + if (HPMHooks.count.HP_chr_send_maps_pre > 0) { void (*preHookFunc) (int *fd, int *id, int *j); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_maps_pre[hIndex].func; preHookFunc(&fd, &id, &j); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1867,9 +1894,9 @@ void HP_chr_send_maps(int fd, int id, int j) { { HPMHooks.source.chr.send_maps(fd, id, j); } - if( HPMHooks.count.HP_chr_send_maps_post ) { + if (HPMHooks.count.HP_chr_send_maps_post > 0) { void (*postHookFunc) (int fd, int id, int j); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_maps_post[hIndex].func; postHookFunc(fd, id, j); } @@ -1878,14 +1905,14 @@ void HP_chr_send_maps(int fd, int id, int j) { } void HP_chr_parse_frommap_map_names(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_map_names_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_map_names_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_map_names_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1893,9 +1920,9 @@ void HP_chr_parse_frommap_map_names(int fd, int id) { { HPMHooks.source.chr.parse_frommap_map_names(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_map_names_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_map_names_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_map_names_post[hIndex].func; postHookFunc(fd, id); } @@ -1904,14 +1931,14 @@ void HP_chr_parse_frommap_map_names(int fd, int id) { } void HP_chr_send_scdata(int fd, int aid, int cid) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_scdata_pre ) { + if (HPMHooks.count.HP_chr_send_scdata_pre > 0) { void (*preHookFunc) (int *fd, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_scdata_pre[hIndex].func; preHookFunc(&fd, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1919,9 +1946,9 @@ void HP_chr_send_scdata(int fd, int aid, int cid) { { HPMHooks.source.chr.send_scdata(fd, aid, cid); } - if( HPMHooks.count.HP_chr_send_scdata_post ) { + if (HPMHooks.count.HP_chr_send_scdata_post > 0) { void (*postHookFunc) (int fd, int aid, int cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_scdata_post[hIndex].func; postHookFunc(fd, aid, cid); } @@ -1930,14 +1957,14 @@ void HP_chr_send_scdata(int fd, int aid, int cid) { } void HP_chr_parse_frommap_request_scdata(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_scdata_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1945,9 +1972,9 @@ void HP_chr_parse_frommap_request_scdata(int fd) { { HPMHooks.source.chr.parse_frommap_request_scdata(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_request_scdata_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_scdata_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_scdata_post[hIndex].func; postHookFunc(fd); } @@ -1956,14 +1983,14 @@ void HP_chr_parse_frommap_request_scdata(int fd) { } void HP_chr_parse_frommap_set_users_count(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_count_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1971,9 +1998,9 @@ void HP_chr_parse_frommap_set_users_count(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_users_count(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_users_count_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_count_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_count_post[hIndex].func; postHookFunc(fd, id); } @@ -1982,14 +2009,14 @@ void HP_chr_parse_frommap_set_users_count(int fd, int id) { } void HP_chr_parse_frommap_set_users(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_users_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1997,9 +2024,9 @@ void HP_chr_parse_frommap_set_users(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_users(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_users_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_post[hIndex].func; postHookFunc(fd, id); } @@ -2008,14 +2035,14 @@ void HP_chr_parse_frommap_set_users(int fd, int id) { } void HP_chr_save_character_ack(int fd, int aid, int cid) { int hIndex = 0; - if( HPMHooks.count.HP_chr_save_character_ack_pre ) { + if (HPMHooks.count.HP_chr_save_character_ack_pre > 0) { void (*preHookFunc) (int *fd, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_save_character_ack_pre[hIndex].func; preHookFunc(&fd, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2023,9 +2050,9 @@ void HP_chr_save_character_ack(int fd, int aid, int cid) { { HPMHooks.source.chr.save_character_ack(fd, aid, cid); } - if( HPMHooks.count.HP_chr_save_character_ack_post ) { + if (HPMHooks.count.HP_chr_save_character_ack_post > 0) { void (*postHookFunc) (int fd, int aid, int cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_save_character_ack_post[hIndex].func; postHookFunc(fd, aid, cid); } @@ -2034,14 +2061,14 @@ void HP_chr_save_character_ack(int fd, int aid, int cid) { } void HP_chr_parse_frommap_save_character(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_save_character_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_character_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_character_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2049,9 +2076,9 @@ void HP_chr_parse_frommap_save_character(int fd, int id) { { HPMHooks.source.chr.parse_frommap_save_character(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_save_character_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_character_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_character_post[hIndex].func; postHookFunc(fd, id); } @@ -2060,14 +2087,14 @@ void HP_chr_parse_frommap_save_character(int fd, int id) { } void HP_chr_select_ack(int fd, int account_id, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_select_ack_pre ) { + if (HPMHooks.count.HP_chr_select_ack_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_select_ack_pre[hIndex].func; preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2075,9 +2102,9 @@ void HP_chr_select_ack(int fd, int account_id, uint8 flag) { { HPMHooks.source.chr.select_ack(fd, account_id, flag); } - if( HPMHooks.count.HP_chr_select_ack_post ) { + if (HPMHooks.count.HP_chr_select_ack_post > 0) { void (*postHookFunc) (int fd, int account_id, uint8 flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_select_ack_post[hIndex].func; postHookFunc(fd, account_id, flag); } @@ -2086,14 +2113,14 @@ void HP_chr_select_ack(int fd, int account_id, uint8 flag) { } void HP_chr_parse_frommap_char_select_req(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_select_req_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2101,9 +2128,9 @@ void HP_chr_parse_frommap_char_select_req(int fd) { { HPMHooks.source.chr.parse_frommap_char_select_req(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_char_select_req_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_select_req_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_select_req_post[hIndex].func; postHookFunc(fd); } @@ -2112,14 +2139,14 @@ void HP_chr_parse_frommap_char_select_req(int fd) { } void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) { int hIndex = 0; - if( HPMHooks.count.HP_chr_change_map_server_ack_pre ) { + if (HPMHooks.count.HP_chr_change_map_server_ack_pre > 0) { void (*preHookFunc) (int *fd, const uint8 **data, bool *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_pre[hIndex].func; preHookFunc(&fd, &data, &ok); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2127,9 +2154,9 @@ void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) { { HPMHooks.source.chr.change_map_server_ack(fd, data, ok); } - if( HPMHooks.count.HP_chr_change_map_server_ack_post ) { + if (HPMHooks.count.HP_chr_change_map_server_ack_post > 0) { void (*postHookFunc) (int fd, const uint8 *data, bool ok); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_post[hIndex].func; postHookFunc(fd, data, ok); } @@ -2138,14 +2165,14 @@ void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) { } void HP_chr_parse_frommap_change_map_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_map_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2153,9 +2180,9 @@ void HP_chr_parse_frommap_change_map_server(int fd) { { HPMHooks.source.chr.parse_frommap_change_map_server(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_map_server_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_map_server_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_map_server_post[hIndex].func; postHookFunc(fd); } @@ -2164,14 +2191,14 @@ void HP_chr_parse_frommap_change_map_server(int fd) { } void HP_chr_parse_frommap_remove_friend(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_remove_friend_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2179,9 +2206,9 @@ void HP_chr_parse_frommap_remove_friend(int fd) { { HPMHooks.source.chr.parse_frommap_remove_friend(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_remove_friend_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_remove_friend_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_remove_friend_post[hIndex].func; postHookFunc(fd); } @@ -2190,14 +2217,14 @@ void HP_chr_parse_frommap_remove_friend(int fd) { } void HP_chr_char_name_ack(int fd, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_char_name_ack_pre ) { + if (HPMHooks.count.HP_chr_char_name_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_name_ack_pre[hIndex].func; preHookFunc(&fd, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2205,9 +2232,9 @@ void HP_chr_char_name_ack(int fd, int char_id) { { HPMHooks.source.chr.char_name_ack(fd, char_id); } - if( HPMHooks.count.HP_chr_char_name_ack_post ) { + if (HPMHooks.count.HP_chr_char_name_ack_post > 0) { void (*postHookFunc) (int fd, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_name_ack_post[hIndex].func; postHookFunc(fd, char_id); } @@ -2216,14 +2243,14 @@ void HP_chr_char_name_ack(int fd, int char_id) { } void HP_chr_parse_frommap_char_name_request(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_name_request_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2231,9 +2258,9 @@ void HP_chr_parse_frommap_char_name_request(int fd) { { HPMHooks.source.chr.parse_frommap_char_name_request(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_char_name_request_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_name_request_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_name_request_post[hIndex].func; postHookFunc(fd); } @@ -2242,14 +2269,14 @@ void HP_chr_parse_frommap_char_name_request(int fd) { } void HP_chr_parse_frommap_change_email(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_email_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_email_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_email_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2257,9 +2284,9 @@ void HP_chr_parse_frommap_change_email(int fd) { { HPMHooks.source.chr.parse_frommap_change_email(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_email_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_email_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_email_post[hIndex].func; postHookFunc(fd); } @@ -2268,14 +2295,14 @@ void HP_chr_parse_frommap_change_email(int fd) { } void HP_chr_ban(int account_id, int char_id, time_t *unban_time, short year, short month, short day, short hour, short minute, short second) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ban_pre ) { + if (HPMHooks.count.HP_chr_ban_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, time_t **unban_time, short *year, short *month, short *day, short *hour, short *minute, short *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ban_pre[hIndex].func; preHookFunc(&account_id, &char_id, &unban_time, &year, &month, &day, &hour, &minute, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2283,9 +2310,9 @@ void HP_chr_ban(int account_id, int char_id, time_t *unban_time, short year, sho { HPMHooks.source.chr.ban(account_id, char_id, unban_time, year, month, day, hour, minute, second); } - if( HPMHooks.count.HP_chr_ban_post ) { + if (HPMHooks.count.HP_chr_ban_post > 0) { void (*postHookFunc) (int account_id, int char_id, time_t *unban_time, short year, short month, short day, short hour, short minute, short second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ban_post[hIndex].func; postHookFunc(account_id, char_id, unban_time, year, month, day, hour, minute, second); } @@ -2294,14 +2321,14 @@ void HP_chr_ban(int account_id, int char_id, time_t *unban_time, short year, sho } void HP_chr_unban(int char_id, int *result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_unban_pre ) { + if (HPMHooks.count.HP_chr_unban_pre > 0) { void (*preHookFunc) (int *char_id, int **result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_unban_pre[hIndex].func; preHookFunc(&char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2309,9 +2336,9 @@ void HP_chr_unban(int char_id, int *result) { { HPMHooks.source.chr.unban(char_id, result); } - if( HPMHooks.count.HP_chr_unban_post ) { + if (HPMHooks.count.HP_chr_unban_post > 0) { void (*postHookFunc) (int char_id, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_unban_post[hIndex].func; postHookFunc(char_id, result); } @@ -2320,14 +2347,14 @@ void HP_chr_unban(int char_id, int *result) { } void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ask_name_ack_pre ) { + if (HPMHooks.count.HP_chr_ask_name_ack_pre > 0) { void (*preHookFunc) (int *fd, int *acc, const char **name, int *type, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ask_name_ack_pre[hIndex].func; preHookFunc(&fd, &acc, &name, &type, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2335,9 +2362,9 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result { HPMHooks.source.chr.ask_name_ack(fd, acc, name, type, result); } - if( HPMHooks.count.HP_chr_ask_name_ack_post ) { + if (HPMHooks.count.HP_chr_ask_name_ack_post > 0) { void (*postHookFunc) (int fd, int acc, const char *name, int type, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ask_name_ack_post[hIndex].func; postHookFunc(fd, acc, name, type, result); } @@ -2347,14 +2374,14 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result int HP_chr_changecharsex(int char_id, int sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_changecharsex_pre ) { + if (HPMHooks.count.HP_chr_changecharsex_pre > 0) { int (*preHookFunc) (int *char_id, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_changecharsex_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2362,9 +2389,9 @@ int HP_chr_changecharsex(int char_id, int sex) { { retVal___ = HPMHooks.source.chr.changecharsex(char_id, sex); } - if( HPMHooks.count.HP_chr_changecharsex_post ) { + if (HPMHooks.count.HP_chr_changecharsex_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_changecharsex_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, sex); } @@ -2373,14 +2400,14 @@ int HP_chr_changecharsex(int char_id, int sex) { } void HP_chr_parse_frommap_change_account(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_account_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_account_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_account_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2388,9 +2415,9 @@ void HP_chr_parse_frommap_change_account(int fd) { { HPMHooks.source.chr.parse_frommap_change_account(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_account_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_account_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_account_post[hIndex].func; postHookFunc(fd); } @@ -2399,14 +2426,14 @@ void HP_chr_parse_frommap_change_account(int fd) { } void HP_chr_parse_frommap_fame_list(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_fame_list_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_fame_list_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_fame_list_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2414,9 +2441,9 @@ void HP_chr_parse_frommap_fame_list(int fd) { { HPMHooks.source.chr.parse_frommap_fame_list(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_fame_list_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_fame_list_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_fame_list_post[hIndex].func; postHookFunc(fd); } @@ -2425,14 +2452,14 @@ void HP_chr_parse_frommap_fame_list(int fd) { } void HP_chr_parse_frommap_divorce_char(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_divorce_char_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2440,9 +2467,9 @@ void HP_chr_parse_frommap_divorce_char(int fd) { { HPMHooks.source.chr.parse_frommap_divorce_char(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_divorce_char_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_divorce_char_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_divorce_char_post[hIndex].func; postHookFunc(fd); } @@ -2451,14 +2478,14 @@ void HP_chr_parse_frommap_divorce_char(int fd) { } void HP_chr_parse_frommap_ragsrvinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_ragsrvinfo_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2466,9 +2493,9 @@ void HP_chr_parse_frommap_ragsrvinfo(int fd) { { HPMHooks.source.chr.parse_frommap_ragsrvinfo(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_ragsrvinfo_post[hIndex].func; postHookFunc(fd); } @@ -2477,14 +2504,14 @@ void HP_chr_parse_frommap_ragsrvinfo(int fd) { } void HP_chr_parse_frommap_set_char_offline(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_offline_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2492,9 +2519,9 @@ void HP_chr_parse_frommap_set_char_offline(int fd) { { HPMHooks.source.chr.parse_frommap_set_char_offline(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_offline_post[hIndex].func; postHookFunc(fd); } @@ -2503,14 +2530,14 @@ void HP_chr_parse_frommap_set_char_offline(int fd) { } void HP_chr_parse_frommap_set_all_offline(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_all_offline_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2518,9 +2545,9 @@ void HP_chr_parse_frommap_set_all_offline(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_all_offline(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_all_offline_post[hIndex].func; postHookFunc(fd, id); } @@ -2529,14 +2556,14 @@ void HP_chr_parse_frommap_set_all_offline(int fd, int id) { } void HP_chr_parse_frommap_set_char_online(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_online_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2544,9 +2571,9 @@ void HP_chr_parse_frommap_set_char_online(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_char_online(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_char_online_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_online_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_online_post[hIndex].func; postHookFunc(fd, id); } @@ -2555,14 +2582,14 @@ void HP_chr_parse_frommap_set_char_online(int fd, int id) { } void HP_chr_parse_frommap_build_fame_list(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_build_fame_list_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2570,9 +2597,9 @@ void HP_chr_parse_frommap_build_fame_list(int fd) { { HPMHooks.source.chr.parse_frommap_build_fame_list(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_build_fame_list_post[hIndex].func; postHookFunc(fd); } @@ -2581,14 +2608,14 @@ void HP_chr_parse_frommap_build_fame_list(int fd) { } void HP_chr_parse_frommap_save_status_change_data(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_status_change_data_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2596,9 +2623,9 @@ void HP_chr_parse_frommap_save_status_change_data(int fd) { { HPMHooks.source.chr.parse_frommap_save_status_change_data(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_status_change_data_post[hIndex].func; postHookFunc(fd); } @@ -2607,14 +2634,14 @@ void HP_chr_parse_frommap_save_status_change_data(int fd) { } void HP_chr_send_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_pong_pre ) { + if (HPMHooks.count.HP_chr_send_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2622,9 +2649,9 @@ void HP_chr_send_pong(int fd) { { HPMHooks.source.chr.send_pong(fd); } - if( HPMHooks.count.HP_chr_send_pong_post ) { + if (HPMHooks.count.HP_chr_send_pong_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_pong_post[hIndex].func; postHookFunc(fd); } @@ -2633,14 +2660,14 @@ void HP_chr_send_pong(int fd) { } void HP_chr_parse_frommap_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_ping_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2648,9 +2675,9 @@ void HP_chr_parse_frommap_ping(int fd) { { HPMHooks.source.chr.parse_frommap_ping(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_ping_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_ping_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_ping_post[hIndex].func; postHookFunc(fd); } @@ -2659,14 +2686,14 @@ void HP_chr_parse_frommap_ping(int fd) { } void HP_chr_map_auth_ok(int fd, int account_id, struct char_auth_node *node, struct mmo_charstatus *cd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_auth_ok_pre ) { + if (HPMHooks.count.HP_chr_map_auth_ok_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, struct char_auth_node **node, struct mmo_charstatus **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_auth_ok_pre[hIndex].func; preHookFunc(&fd, &account_id, &node, &cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2674,9 +2701,9 @@ void HP_chr_map_auth_ok(int fd, int account_id, struct char_auth_node *node, str { HPMHooks.source.chr.map_auth_ok(fd, account_id, node, cd); } - if( HPMHooks.count.HP_chr_map_auth_ok_post ) { + if (HPMHooks.count.HP_chr_map_auth_ok_post > 0) { void (*postHookFunc) (int fd, int account_id, struct char_auth_node *node, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_auth_ok_post[hIndex].func; postHookFunc(fd, account_id, node, cd); } @@ -2685,14 +2712,14 @@ void HP_chr_map_auth_ok(int fd, int account_id, struct char_auth_node *node, str } void HP_chr_map_auth_failed(int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_auth_failed_pre ) { + if (HPMHooks.count.HP_chr_map_auth_failed_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *login_id1, char *sex, uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_auth_failed_pre[hIndex].func; preHookFunc(&fd, &account_id, &char_id, &login_id1, &sex, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2700,9 +2727,9 @@ void HP_chr_map_auth_failed(int fd, int account_id, int char_id, int login_id1, { HPMHooks.source.chr.map_auth_failed(fd, account_id, char_id, login_id1, sex, ip); } - if( HPMHooks.count.HP_chr_map_auth_failed_post ) { + if (HPMHooks.count.HP_chr_map_auth_failed_post > 0) { void (*postHookFunc) (int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_auth_failed_post[hIndex].func; postHookFunc(fd, account_id, char_id, login_id1, sex, ip); } @@ -2711,14 +2738,14 @@ void HP_chr_map_auth_failed(int fd, int account_id, int char_id, int login_id1, } void HP_chr_parse_frommap_auth_request(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_auth_request_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_auth_request_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_auth_request_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2726,9 +2753,9 @@ void HP_chr_parse_frommap_auth_request(int fd, int id) { { HPMHooks.source.chr.parse_frommap_auth_request(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_auth_request_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_auth_request_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_auth_request_post[hIndex].func; postHookFunc(fd, id); } @@ -2737,14 +2764,14 @@ void HP_chr_parse_frommap_auth_request(int fd, int id) { } void HP_chr_parse_frommap_update_ip(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_update_ip_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_update_ip_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_update_ip_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2752,9 +2779,9 @@ void HP_chr_parse_frommap_update_ip(int fd, int id) { { HPMHooks.source.chr.parse_frommap_update_ip(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_update_ip_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_update_ip_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_update_ip_post[hIndex].func; postHookFunc(fd, id); } @@ -2763,14 +2790,14 @@ void HP_chr_parse_frommap_update_ip(int fd, int id) { } void HP_chr_parse_frommap_request_stats_report(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2778,9 +2805,9 @@ void HP_chr_parse_frommap_request_stats_report(int fd) { { HPMHooks.source.chr.parse_frommap_request_stats_report(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_post[hIndex].func; postHookFunc(fd); } @@ -2789,14 +2816,14 @@ void HP_chr_parse_frommap_request_stats_report(int fd) { } void HP_chr_parse_frommap_scdata_update(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_update_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2804,9 +2831,9 @@ void HP_chr_parse_frommap_scdata_update(int fd) { { HPMHooks.source.chr.parse_frommap_scdata_update(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_scdata_update_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_update_post[hIndex].func; postHookFunc(fd); } @@ -2815,14 +2842,14 @@ void HP_chr_parse_frommap_scdata_update(int fd) { } void HP_chr_parse_frommap_scdata_delete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_delete_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2830,9 +2857,9 @@ void HP_chr_parse_frommap_scdata_delete(int fd) { { HPMHooks.source.chr.parse_frommap_scdata_delete(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_delete_post[hIndex].func; postHookFunc(fd); } @@ -2842,14 +2869,14 @@ void HP_chr_parse_frommap_scdata_delete(int fd) { int HP_chr_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_frommap_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2857,9 +2884,9 @@ int HP_chr_parse_frommap(int fd) { { retVal___ = HPMHooks.source.chr.parse_frommap(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_post ) { + if (HPMHooks.count.HP_chr_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -2869,14 +2896,14 @@ int HP_chr_parse_frommap(int fd) { int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_search_mapserver_pre ) { + if (HPMHooks.count.HP_chr_search_mapserver_pre > 0) { int (*preHookFunc) (unsigned short *map, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_search_mapserver_pre[hIndex].func; retVal___ = preHookFunc(&map, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2884,9 +2911,9 @@ int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.chr.search_mapserver(map, ip, port); } - if( HPMHooks.count.HP_chr_search_mapserver_post ) { + if (HPMHooks.count.HP_chr_search_mapserver_post > 0) { int (*postHookFunc) (int retVal___, unsigned short map, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_search_mapserver_post[hIndex].func; retVal___ = postHookFunc(retVal___, map, ip, port); } @@ -2896,14 +2923,14 @@ int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { int HP_chr_mapif_init(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mapif_init_pre ) { + if (HPMHooks.count.HP_chr_mapif_init_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mapif_init_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2911,9 +2938,9 @@ int HP_chr_mapif_init(int fd) { { retVal___ = HPMHooks.source.chr.mapif_init(fd); } - if( HPMHooks.count.HP_chr_mapif_init_post ) { + if (HPMHooks.count.HP_chr_mapif_init_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mapif_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -2923,14 +2950,14 @@ int HP_chr_mapif_init(int fd) { uint32 HP_chr_lan_subnet_check(uint32 ip) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_chr_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_chr_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2938,9 +2965,9 @@ uint32 HP_chr_lan_subnet_check(uint32 ip) { { retVal___ = HPMHooks.source.chr.lan_subnet_check(ip); } - if( HPMHooks.count.HP_chr_lan_subnet_check_post ) { + if (HPMHooks.count.HP_chr_lan_subnet_check_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -2949,14 +2976,14 @@ uint32 HP_chr_lan_subnet_check(uint32 ip) { } void HP_chr_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result, time_t *delete_date); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result, &delete_date); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2964,9 +2991,9 @@ void HP_chr_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date) { HPMHooks.source.chr.delete2_ack(fd, char_id, result, delete_date); } - if( HPMHooks.count.HP_chr_delete2_ack_post ) { + if (HPMHooks.count.HP_chr_delete2_ack_post > 0) { void (*postHookFunc) (int fd, int char_id, uint32 result, time_t delete_date); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_ack_post[hIndex].func; postHookFunc(fd, char_id, result, delete_date); } @@ -2975,14 +3002,14 @@ void HP_chr_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date) } void HP_chr_delete2_accept_actual_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_actual_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2990,9 +3017,9 @@ void HP_chr_delete2_accept_actual_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_accept_actual_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_accept_actual_ack_post ) { + if (HPMHooks.count.HP_chr_delete2_accept_actual_ack_post > 0) { void (*postHookFunc) (int fd, int char_id, uint32 result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_actual_ack_post[hIndex].func; postHookFunc(fd, char_id, result); } @@ -3001,14 +3028,14 @@ void HP_chr_delete2_accept_actual_ack(int fd, int char_id, uint32 result) { } void HP_chr_delete2_accept_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_accept_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3016,9 +3043,9 @@ void HP_chr_delete2_accept_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_accept_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_accept_ack_post ) { + if (HPMHooks.count.HP_chr_delete2_accept_ack_post > 0) { void (*postHookFunc) (int fd, int char_id, uint32 result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_ack_post[hIndex].func; postHookFunc(fd, char_id, result); } @@ -3027,14 +3054,14 @@ void HP_chr_delete2_accept_ack(int fd, int char_id, uint32 result) { } void HP_chr_delete2_cancel_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_cancel_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_cancel_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_cancel_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3042,9 +3069,9 @@ void HP_chr_delete2_cancel_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_cancel_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_cancel_ack_post ) { + if (HPMHooks.count.HP_chr_delete2_cancel_ack_post > 0) { void (*postHookFunc) (int fd, int char_id, uint32 result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_cancel_ack_post[hIndex].func; postHookFunc(fd, char_id, result); } @@ -3053,14 +3080,14 @@ void HP_chr_delete2_cancel_ack(int fd, int char_id, uint32 result) { } void HP_chr_delete2_req(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_req_pre ) { + if (HPMHooks.count.HP_chr_delete2_req_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_req_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3068,9 +3095,9 @@ void HP_chr_delete2_req(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_req(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_req_post ) { + if (HPMHooks.count.HP_chr_delete2_req_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_req_post[hIndex].func; postHookFunc(fd, sd); } @@ -3079,14 +3106,14 @@ void HP_chr_delete2_req(int fd, struct char_session_data *sd) { } void HP_chr_delete2_accept(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_pre ) { + if (HPMHooks.count.HP_chr_delete2_accept_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3094,9 +3121,9 @@ void HP_chr_delete2_accept(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_accept(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_accept_post ) { + if (HPMHooks.count.HP_chr_delete2_accept_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_post[hIndex].func; postHookFunc(fd, sd); } @@ -3105,14 +3132,14 @@ void HP_chr_delete2_accept(int fd, struct char_session_data *sd) { } void HP_chr_delete2_cancel(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_cancel_pre ) { + if (HPMHooks.count.HP_chr_delete2_cancel_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_cancel_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3120,9 +3147,9 @@ void HP_chr_delete2_cancel(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_cancel(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_cancel_post ) { + if (HPMHooks.count.HP_chr_delete2_cancel_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_cancel_post[hIndex].func; postHookFunc(fd, sd); } @@ -3131,14 +3158,14 @@ void HP_chr_delete2_cancel(int fd, struct char_session_data *sd) { } void HP_chr_send_account_id(int fd, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_account_id_pre ) { + if (HPMHooks.count.HP_chr_send_account_id_pre > 0) { void (*preHookFunc) (int *fd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_account_id_pre[hIndex].func; preHookFunc(&fd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3146,9 +3173,9 @@ void HP_chr_send_account_id(int fd, int account_id) { { HPMHooks.source.chr.send_account_id(fd, account_id); } - if( HPMHooks.count.HP_chr_send_account_id_post ) { + if (HPMHooks.count.HP_chr_send_account_id_post > 0) { void (*postHookFunc) (int fd, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_account_id_post[hIndex].func; postHookFunc(fd, account_id); } @@ -3157,14 +3184,14 @@ void HP_chr_send_account_id(int fd, int account_id) { } void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_connect_pre ) { + if (HPMHooks.count.HP_chr_parse_char_connect_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_connect_pre[hIndex].func; preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3172,9 +3199,9 @@ void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) { HPMHooks.source.chr.parse_char_connect(fd, sd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_connect_post ) { + if (HPMHooks.count.HP_chr_parse_char_connect_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_connect_post[hIndex].func; postHookFunc(fd, sd, ipl); } @@ -3183,14 +3210,14 @@ void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) } void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_map_info_pre ) { + if (HPMHooks.count.HP_chr_send_map_info_pre > 0) { void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_map_info_pre[hIndex].func; preHookFunc(&fd, &i, &subnet_map_ip, &cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3198,9 +3225,9 @@ void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charst { HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd); } - if( HPMHooks.count.HP_chr_send_map_info_post ) { + if (HPMHooks.count.HP_chr_send_map_info_post > 0) { void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_map_info_post[hIndex].func; postHookFunc(fd, i, subnet_map_ip, cd); } @@ -3209,14 +3236,14 @@ void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charst } void HP_chr_send_wait_char_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_wait_char_server_pre ) { + if (HPMHooks.count.HP_chr_send_wait_char_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_wait_char_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3224,9 +3251,9 @@ void HP_chr_send_wait_char_server(int fd) { { HPMHooks.source.chr.send_wait_char_server(fd); } - if( HPMHooks.count.HP_chr_send_wait_char_server_post ) { + if (HPMHooks.count.HP_chr_send_wait_char_server_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_wait_char_server_post[hIndex].func; postHookFunc(fd); } @@ -3236,14 +3263,14 @@ void HP_chr_send_wait_char_server(int fd) { int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_search_default_maps_mapserver_pre ) { + if (HPMHooks.count.HP_chr_search_default_maps_mapserver_pre > 0) { int (*preHookFunc) (struct mmo_charstatus **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_search_default_maps_mapserver_pre[hIndex].func; retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3251,9 +3278,9 @@ int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { { retVal___ = HPMHooks.source.chr.search_default_maps_mapserver(cd); } - if( HPMHooks.count.HP_chr_search_default_maps_mapserver_post ) { + if (HPMHooks.count.HP_chr_search_default_maps_mapserver_post > 0) { int (*postHookFunc) (int retVal___, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_search_default_maps_mapserver_post[hIndex].func; retVal___ = postHookFunc(retVal___, cd); } @@ -3262,14 +3289,14 @@ int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { } void HP_chr_parse_char_select(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_select_pre ) { + if (HPMHooks.count.HP_chr_parse_char_select_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_select_pre[hIndex].func; preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3277,9 +3304,9 @@ void HP_chr_parse_char_select(int fd, struct char_session_data *sd, uint32 ipl) { HPMHooks.source.chr.parse_char_select(fd, sd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_select_post ) { + if (HPMHooks.count.HP_chr_parse_char_select_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_select_post[hIndex].func; postHookFunc(fd, sd, ipl); } @@ -3288,14 +3315,14 @@ void HP_chr_parse_char_select(int fd, struct char_session_data *sd, uint32 ipl) } void HP_chr_creation_failed(int fd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_creation_failed_pre ) { + if (HPMHooks.count.HP_chr_creation_failed_pre > 0) { void (*preHookFunc) (int *fd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_creation_failed_pre[hIndex].func; preHookFunc(&fd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3303,9 +3330,9 @@ void HP_chr_creation_failed(int fd, int result) { { HPMHooks.source.chr.creation_failed(fd, result); } - if( HPMHooks.count.HP_chr_creation_failed_post ) { + if (HPMHooks.count.HP_chr_creation_failed_post > 0) { void (*postHookFunc) (int fd, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_creation_failed_post[hIndex].func; postHookFunc(fd, result); } @@ -3314,14 +3341,14 @@ void HP_chr_creation_failed(int fd, int result) { } void HP_chr_creation_ok(int fd, struct mmo_charstatus *char_dat) { int hIndex = 0; - if( HPMHooks.count.HP_chr_creation_ok_pre ) { + if (HPMHooks.count.HP_chr_creation_ok_pre > 0) { void (*preHookFunc) (int *fd, struct mmo_charstatus **char_dat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_creation_ok_pre[hIndex].func; preHookFunc(&fd, &char_dat); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3329,9 +3356,9 @@ void HP_chr_creation_ok(int fd, struct mmo_charstatus *char_dat) { { HPMHooks.source.chr.creation_ok(fd, char_dat); } - if( HPMHooks.count.HP_chr_creation_ok_post ) { + if (HPMHooks.count.HP_chr_creation_ok_post > 0) { void (*postHookFunc) (int fd, struct mmo_charstatus *char_dat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_creation_ok_post[hIndex].func; postHookFunc(fd, char_dat); } @@ -3340,14 +3367,14 @@ void HP_chr_creation_ok(int fd, struct mmo_charstatus *char_dat) { } void HP_chr_parse_char_create_new_char(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_create_new_char_pre ) { + if (HPMHooks.count.HP_chr_parse_char_create_new_char_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_create_new_char_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3355,9 +3382,9 @@ void HP_chr_parse_char_create_new_char(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_create_new_char(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_create_new_char_post ) { + if (HPMHooks.count.HP_chr_parse_char_create_new_char_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_create_new_char_post[hIndex].func; postHookFunc(fd, sd); } @@ -3366,14 +3393,14 @@ void HP_chr_parse_char_create_new_char(int fd, struct char_session_data *sd) { } void HP_chr_delete_char_failed(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete_char_failed_pre ) { + if (HPMHooks.count.HP_chr_delete_char_failed_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_failed_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3381,9 +3408,9 @@ void HP_chr_delete_char_failed(int fd, int flag) { { HPMHooks.source.chr.delete_char_failed(fd, flag); } - if( HPMHooks.count.HP_chr_delete_char_failed_post ) { + if (HPMHooks.count.HP_chr_delete_char_failed_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_failed_post[hIndex].func; postHookFunc(fd, flag); } @@ -3392,14 +3419,14 @@ void HP_chr_delete_char_failed(int fd, int flag) { } void HP_chr_delete_char_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete_char_ok_pre ) { + if (HPMHooks.count.HP_chr_delete_char_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3407,9 +3434,9 @@ void HP_chr_delete_char_ok(int fd) { { HPMHooks.source.chr.delete_char_ok(fd); } - if( HPMHooks.count.HP_chr_delete_char_ok_post ) { + if (HPMHooks.count.HP_chr_delete_char_ok_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_ok_post[hIndex].func; postHookFunc(fd); } @@ -3418,14 +3445,14 @@ void HP_chr_delete_char_ok(int fd) { } void HP_chr_parse_char_delete_char(int fd, struct char_session_data *sd, unsigned short cmd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete_char_pre ) { + if (HPMHooks.count.HP_chr_parse_char_delete_char_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd, unsigned short *cmd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete_char_pre[hIndex].func; preHookFunc(&fd, &sd, &cmd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3433,9 +3460,9 @@ void HP_chr_parse_char_delete_char(int fd, struct char_session_data *sd, unsigne { HPMHooks.source.chr.parse_char_delete_char(fd, sd, cmd); } - if( HPMHooks.count.HP_chr_parse_char_delete_char_post ) { + if (HPMHooks.count.HP_chr_parse_char_delete_char_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd, unsigned short cmd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete_char_post[hIndex].func; postHookFunc(fd, sd, cmd); } @@ -3444,14 +3471,14 @@ void HP_chr_parse_char_delete_char(int fd, struct char_session_data *sd, unsigne } void HP_chr_parse_char_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_ping_pre ) { + if (HPMHooks.count.HP_chr_parse_char_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3459,9 +3486,9 @@ void HP_chr_parse_char_ping(int fd) { { HPMHooks.source.chr.parse_char_ping(fd); } - if( HPMHooks.count.HP_chr_parse_char_ping_post ) { + if (HPMHooks.count.HP_chr_parse_char_ping_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_ping_post[hIndex].func; postHookFunc(fd); } @@ -3470,14 +3497,14 @@ void HP_chr_parse_char_ping(int fd) { } void HP_chr_allow_rename(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_allow_rename_pre ) { + if (HPMHooks.count.HP_chr_allow_rename_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_allow_rename_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3485,9 +3512,9 @@ void HP_chr_allow_rename(int fd, int flag) { { HPMHooks.source.chr.allow_rename(fd, flag); } - if( HPMHooks.count.HP_chr_allow_rename_post ) { + if (HPMHooks.count.HP_chr_allow_rename_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_allow_rename_post[hIndex].func; postHookFunc(fd, flag); } @@ -3496,14 +3523,14 @@ void HP_chr_allow_rename(int fd, int flag) { } void HP_chr_parse_char_rename_char(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char_pre ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3511,9 +3538,9 @@ void HP_chr_parse_char_rename_char(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_rename_char(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char_post ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_post[hIndex].func; postHookFunc(fd, sd); } @@ -3522,14 +3549,14 @@ void HP_chr_parse_char_rename_char(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_rename_char2(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char2_pre ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char2_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char2_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3537,9 +3564,9 @@ void HP_chr_parse_char_rename_char2(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_rename_char2(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char2_post ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char2_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char2_post[hIndex].func; postHookFunc(fd, sd); } @@ -3548,14 +3575,14 @@ void HP_chr_parse_char_rename_char2(int fd, struct char_session_data *sd) { } void HP_chr_rename_char_ack(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_rename_char_ack_pre ) { + if (HPMHooks.count.HP_chr_rename_char_ack_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_rename_char_ack_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3563,9 +3590,9 @@ void HP_chr_rename_char_ack(int fd, int flag) { { HPMHooks.source.chr.rename_char_ack(fd, flag); } - if( HPMHooks.count.HP_chr_rename_char_ack_post ) { + if (HPMHooks.count.HP_chr_rename_char_ack_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_rename_char_ack_post[hIndex].func; postHookFunc(fd, flag); } @@ -3574,14 +3601,14 @@ void HP_chr_rename_char_ack(int fd, int flag) { } void HP_chr_parse_char_rename_char_confirm(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_confirm_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3589,9 +3616,9 @@ void HP_chr_parse_char_rename_char_confirm(int fd, struct char_session_data *sd) { HPMHooks.source.chr.parse_char_rename_char_confirm(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_confirm_post[hIndex].func; postHookFunc(fd, sd); } @@ -3600,14 +3627,14 @@ void HP_chr_parse_char_rename_char_confirm(int fd, struct char_session_data *sd) } void HP_chr_captcha_notsupported(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_captcha_notsupported_pre ) { + if (HPMHooks.count.HP_chr_captcha_notsupported_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_captcha_notsupported_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3615,9 +3642,9 @@ void HP_chr_captcha_notsupported(int fd) { { HPMHooks.source.chr.captcha_notsupported(fd); } - if( HPMHooks.count.HP_chr_captcha_notsupported_post ) { + if (HPMHooks.count.HP_chr_captcha_notsupported_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_captcha_notsupported_post[hIndex].func; postHookFunc(fd); } @@ -3626,14 +3653,14 @@ void HP_chr_captcha_notsupported(int fd) { } void HP_chr_parse_char_request_captcha(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_request_captcha_pre ) { + if (HPMHooks.count.HP_chr_parse_char_request_captcha_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_request_captcha_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3641,9 +3668,9 @@ void HP_chr_parse_char_request_captcha(int fd) { { HPMHooks.source.chr.parse_char_request_captcha(fd); } - if( HPMHooks.count.HP_chr_parse_char_request_captcha_post ) { + if (HPMHooks.count.HP_chr_parse_char_request_captcha_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_request_captcha_post[hIndex].func; postHookFunc(fd); } @@ -3652,14 +3679,14 @@ void HP_chr_parse_char_request_captcha(int fd) { } void HP_chr_parse_char_check_captcha(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_check_captcha_pre ) { + if (HPMHooks.count.HP_chr_parse_char_check_captcha_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_check_captcha_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3667,9 +3694,9 @@ void HP_chr_parse_char_check_captcha(int fd) { { HPMHooks.source.chr.parse_char_check_captcha(fd); } - if( HPMHooks.count.HP_chr_parse_char_check_captcha_post ) { + if (HPMHooks.count.HP_chr_parse_char_check_captcha_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_check_captcha_post[hIndex].func; postHookFunc(fd); } @@ -3678,14 +3705,14 @@ void HP_chr_parse_char_check_captcha(int fd) { } void HP_chr_parse_char_delete2_req(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_req_pre ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_req_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_req_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3693,9 +3720,9 @@ void HP_chr_parse_char_delete2_req(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_req(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_req_post ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_req_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_req_post[hIndex].func; postHookFunc(fd, sd); } @@ -3704,14 +3731,14 @@ void HP_chr_parse_char_delete2_req(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_delete2_accept(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_accept_pre ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_accept_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_accept_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3719,9 +3746,9 @@ void HP_chr_parse_char_delete2_accept(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_accept(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_accept_post ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_accept_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_accept_post[hIndex].func; postHookFunc(fd, sd); } @@ -3730,14 +3757,14 @@ void HP_chr_parse_char_delete2_accept(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_delete2_cancel(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_cancel_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3745,9 +3772,9 @@ void HP_chr_parse_char_delete2_cancel(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_cancel(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_cancel_post ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_cancel_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_cancel_post[hIndex].func; postHookFunc(fd, sd); } @@ -3756,14 +3783,14 @@ void HP_chr_parse_char_delete2_cancel(int fd, struct char_session_data *sd) { } void HP_chr_login_map_server_ack(int fd, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_login_map_server_ack_pre ) { + if (HPMHooks.count.HP_chr_login_map_server_ack_pre > 0) { void (*preHookFunc) (int *fd, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_login_map_server_ack_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3771,9 +3798,9 @@ void HP_chr_login_map_server_ack(int fd, uint8 flag) { { HPMHooks.source.chr.login_map_server_ack(fd, flag); } - if( HPMHooks.count.HP_chr_login_map_server_ack_post ) { + if (HPMHooks.count.HP_chr_login_map_server_ack_post > 0) { void (*postHookFunc) (int fd, uint8 flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_login_map_server_ack_post[hIndex].func; postHookFunc(fd, flag); } @@ -3782,14 +3809,14 @@ void HP_chr_login_map_server_ack(int fd, uint8 flag) { } void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_login_map_server_pre ) { + if (HPMHooks.count.HP_chr_parse_char_login_map_server_pre > 0) { void (*preHookFunc) (int *fd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_pre[hIndex].func; preHookFunc(&fd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3797,9 +3824,9 @@ void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { { HPMHooks.source.chr.parse_char_login_map_server(fd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_login_map_server_post ) { + if (HPMHooks.count.HP_chr_parse_char_login_map_server_post > 0) { void (*postHookFunc) (int fd, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_post[hIndex].func; postHookFunc(fd, ipl); } @@ -3808,14 +3835,14 @@ void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { } void HP_chr_parse_char_pincode_check(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_check_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_check_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_check_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3823,9 +3850,9 @@ void HP_chr_parse_char_pincode_check(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_check(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_check_post ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_check_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_check_post[hIndex].func; postHookFunc(fd, sd); } @@ -3834,14 +3861,14 @@ void HP_chr_parse_char_pincode_check(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_pincode_window(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_window_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_window_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_window_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3849,9 +3876,9 @@ void HP_chr_parse_char_pincode_window(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_window(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_window_post ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_window_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_window_post[hIndex].func; postHookFunc(fd, sd); } @@ -3860,14 +3887,14 @@ void HP_chr_parse_char_pincode_window(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_pincode_change(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_change_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_change_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_change_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3875,9 +3902,9 @@ void HP_chr_parse_char_pincode_change(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_change(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_change_post ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_change_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_change_post[hIndex].func; postHookFunc(fd, sd); } @@ -3886,14 +3913,14 @@ void HP_chr_parse_char_pincode_change(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_pincode_first_pin(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_first_pin_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3901,9 +3928,9 @@ void HP_chr_parse_char_pincode_first_pin(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_first_pin(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_first_pin_post[hIndex].func; postHookFunc(fd, sd); } @@ -3912,14 +3939,14 @@ void HP_chr_parse_char_pincode_first_pin(int fd, struct char_session_data *sd) { } void HP_chr_parse_char_request_chars(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_request_chars_pre ) { + if (HPMHooks.count.HP_chr_parse_char_request_chars_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_request_chars_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3927,9 +3954,9 @@ void HP_chr_parse_char_request_chars(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_request_chars(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_request_chars_post ) { + if (HPMHooks.count.HP_chr_parse_char_request_chars_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_request_chars_post[hIndex].func; postHookFunc(fd, sd); } @@ -3938,14 +3965,14 @@ void HP_chr_parse_char_request_chars(int fd, struct char_session_data *sd) { } void HP_chr_change_character_slot_ack(int fd, bool ret) { int hIndex = 0; - if( HPMHooks.count.HP_chr_change_character_slot_ack_pre ) { + if (HPMHooks.count.HP_chr_change_character_slot_ack_pre > 0) { void (*preHookFunc) (int *fd, bool *ret); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_change_character_slot_ack_pre[hIndex].func; preHookFunc(&fd, &ret); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3953,9 +3980,9 @@ void HP_chr_change_character_slot_ack(int fd, bool ret) { { HPMHooks.source.chr.change_character_slot_ack(fd, ret); } - if( HPMHooks.count.HP_chr_change_character_slot_ack_post ) { + if (HPMHooks.count.HP_chr_change_character_slot_ack_post > 0) { void (*postHookFunc) (int fd, bool ret); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_change_character_slot_ack_post[hIndex].func; postHookFunc(fd, ret); } @@ -3964,14 +3991,14 @@ void HP_chr_change_character_slot_ack(int fd, bool ret) { } void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_move_character_pre ) { + if (HPMHooks.count.HP_chr_parse_char_move_character_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_move_character_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3979,9 +4006,9 @@ void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_move_character(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_move_character_post ) { + if (HPMHooks.count.HP_chr_parse_char_move_character_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_move_character_post[hIndex].func; postHookFunc(fd, sd); } @@ -3991,14 +4018,14 @@ void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_char_unknown_packet_pre ) { + if (HPMHooks.count.HP_chr_parse_char_unknown_packet_pre > 0) { int (*preHookFunc) (int *fd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_unknown_packet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4006,9 +4033,9 @@ int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { { retVal___ = HPMHooks.source.chr.parse_char_unknown_packet(fd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_unknown_packet_post ) { + if (HPMHooks.count.HP_chr_parse_char_unknown_packet_post > 0) { int (*postHookFunc) (int retVal___, int fd, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_unknown_packet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, ipl); } @@ -4018,14 +4045,14 @@ int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { int HP_chr_parse_char(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_char_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4033,9 +4060,9 @@ int HP_chr_parse_char(int fd) { { retVal___ = HPMHooks.source.chr.parse_char(fd); } - if( HPMHooks.count.HP_chr_parse_char_post ) { + if (HPMHooks.count.HP_chr_parse_char_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -4045,14 +4072,14 @@ int HP_chr_parse_char(int fd) { int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_broadcast_user_count_pre ) { + if (HPMHooks.count.HP_chr_broadcast_user_count_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_broadcast_user_count_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4060,9 +4087,9 @@ int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.broadcast_user_count(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_broadcast_user_count_post ) { + if (HPMHooks.count.HP_chr_broadcast_user_count_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_broadcast_user_count_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -4072,16 +4099,16 @@ int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_sub_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4091,9 +4118,9 @@ int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_li retVal___ = HPMHooks.source.chr.send_accounts_tologin_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_send_accounts_tologin_sub_post ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -4105,14 +4132,14 @@ int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_li int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_accounts_tologin_pre ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4120,9 +4147,9 @@ int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.send_accounts_tologin(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_send_accounts_tologin_post ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -4132,14 +4159,14 @@ int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_check_connect_login_server_pre ) { + if (HPMHooks.count.HP_chr_check_connect_login_server_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_check_connect_login_server_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4147,9 +4174,9 @@ int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data { retVal___ = HPMHooks.source.chr.check_connect_login_server(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_check_connect_login_server_post ) { + if (HPMHooks.count.HP_chr_check_connect_login_server_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_check_connect_login_server_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -4159,16 +4186,16 @@ int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_online_data_cleanup_sub_pre ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_sub_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4178,9 +4205,9 @@ int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list retVal___ = HPMHooks.source.chr.online_data_cleanup_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_online_data_cleanup_sub_post ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -4192,14 +4219,14 @@ int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_online_data_cleanup_pre ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4207,9 +4234,9 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.online_data_cleanup(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_online_data_cleanup_post ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -4219,14 +4246,14 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { bool HP_chr_sql_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_sql_config_read_pre ) { + if (HPMHooks.count.HP_chr_sql_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4234,9 +4261,9 @@ bool HP_chr_sql_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.chr.sql_config_read(filename, imported); } - if( HPMHooks.count.HP_chr_sql_config_read_post ) { + if (HPMHooks.count.HP_chr_sql_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_sql_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, imported); } @@ -4246,14 +4273,14 @@ bool HP_chr_sql_config_read(const char *filename, bool imported) { bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_sql_config_read_registry_pre ) { + if (HPMHooks.count.HP_chr_sql_config_read_registry_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4261,9 +4288,9 @@ bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t { retVal___ = HPMHooks.source.chr.sql_config_read_registry(filename, config, imported); } - if( HPMHooks.count.HP_chr_sql_config_read_registry_post ) { + if (HPMHooks.count.HP_chr_sql_config_read_registry_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4273,14 +4300,14 @@ bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_sql_config_read_pc_pre ) { + if (HPMHooks.count.HP_chr_sql_config_read_pc_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4288,9 +4315,9 @@ bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *conf { retVal___ = HPMHooks.source.chr.sql_config_read_pc(filename, config, imported); } - if( HPMHooks.count.HP_chr_sql_config_read_pc_post ) { + if (HPMHooks.count.HP_chr_sql_config_read_pc_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4300,14 +4327,14 @@ bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *conf bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_sql_config_read_guild_pre ) { + if (HPMHooks.count.HP_chr_sql_config_read_guild_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4315,9 +4342,9 @@ bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *c { retVal___ = HPMHooks.source.chr.sql_config_read_guild(filename, config, imported); } - if( HPMHooks.count.HP_chr_sql_config_read_guild_post ) { + if (HPMHooks.count.HP_chr_sql_config_read_guild_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4327,14 +4354,14 @@ bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *c bool HP_chr_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_pre ) { + if (HPMHooks.count.HP_chr_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4342,9 +4369,9 @@ bool HP_chr_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.chr.config_read(filename, imported); } - if( HPMHooks.count.HP_chr_config_read_post ) { + if (HPMHooks.count.HP_chr_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, imported); } @@ -4354,14 +4381,14 @@ bool HP_chr_config_read(const char *filename, bool imported) { bool HP_chr_config_read_database(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_database_pre ) { + if (HPMHooks.count.HP_chr_config_read_database_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_database_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4369,9 +4396,9 @@ bool HP_chr_config_read_database(const char *filename, const struct config_t *co { retVal___ = HPMHooks.source.chr.config_read_database(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_database_post ) { + if (HPMHooks.count.HP_chr_config_read_database_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_database_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4381,14 +4408,14 @@ bool HP_chr_config_read_database(const char *filename, const struct config_t *co bool HP_chr_config_read_console(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_console_pre ) { + if (HPMHooks.count.HP_chr_config_read_console_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_console_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4396,9 +4423,9 @@ bool HP_chr_config_read_console(const char *filename, const struct config_t *con { retVal___ = HPMHooks.source.chr.config_read_console(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_console_post ) { + if (HPMHooks.count.HP_chr_config_read_console_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_console_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4408,14 +4435,14 @@ bool HP_chr_config_read_console(const char *filename, const struct config_t *con bool HP_chr_config_read_player_fame(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_player_fame_pre ) { + if (HPMHooks.count.HP_chr_config_read_player_fame_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4423,9 +4450,9 @@ bool HP_chr_config_read_player_fame(const char *filename, const struct config_t { retVal___ = HPMHooks.source.chr.config_read_player_fame(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_player_fame_post ) { + if (HPMHooks.count.HP_chr_config_read_player_fame_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4435,14 +4462,14 @@ bool HP_chr_config_read_player_fame(const char *filename, const struct config_t bool HP_chr_config_read_player_deletion(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_player_deletion_pre ) { + if (HPMHooks.count.HP_chr_config_read_player_deletion_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4450,9 +4477,9 @@ bool HP_chr_config_read_player_deletion(const char *filename, const struct confi { retVal___ = HPMHooks.source.chr.config_read_player_deletion(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_player_deletion_post ) { + if (HPMHooks.count.HP_chr_config_read_player_deletion_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4462,14 +4489,14 @@ bool HP_chr_config_read_player_deletion(const char *filename, const struct confi bool HP_chr_config_read_player_name(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_player_name_pre ) { + if (HPMHooks.count.HP_chr_config_read_player_name_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_player_name_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4477,9 +4504,9 @@ bool HP_chr_config_read_player_name(const char *filename, const struct config_t { retVal___ = HPMHooks.source.chr.config_read_player_name(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_player_name_post ) { + if (HPMHooks.count.HP_chr_config_read_player_name_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_player_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4488,14 +4515,14 @@ bool HP_chr_config_read_player_name(const char *filename, const struct config_t } void HP_chr_config_set_start_item(const struct config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_chr_config_set_start_item_pre ) { + if (HPMHooks.count.HP_chr_config_set_start_item_pre > 0) { void (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_set_start_item_pre[hIndex].func; preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4503,9 +4530,9 @@ void HP_chr_config_set_start_item(const struct config_setting_t *setting) { { HPMHooks.source.chr.config_set_start_item(setting); } - if( HPMHooks.count.HP_chr_config_set_start_item_post ) { + if (HPMHooks.count.HP_chr_config_set_start_item_post > 0) { void (*postHookFunc) (const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_set_start_item_post[hIndex].func; postHookFunc(setting); } @@ -4515,14 +4542,14 @@ void HP_chr_config_set_start_item(const struct config_setting_t *setting) { bool HP_chr_config_read_player_new(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_player_new_pre ) { + if (HPMHooks.count.HP_chr_config_read_player_new_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_player_new_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4530,9 +4557,9 @@ bool HP_chr_config_read_player_new(const char *filename, const struct config_t * { retVal___ = HPMHooks.source.chr.config_read_player_new(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_player_new_post ) { + if (HPMHooks.count.HP_chr_config_read_player_new_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_player_new_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4542,14 +4569,14 @@ bool HP_chr_config_read_player_new(const char *filename, const struct config_t * bool HP_chr_config_read_player(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_player_pre ) { + if (HPMHooks.count.HP_chr_config_read_player_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_player_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4557,9 +4584,9 @@ bool HP_chr_config_read_player(const char *filename, const struct config_t *conf { retVal___ = HPMHooks.source.chr.config_read_player(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_player_post ) { + if (HPMHooks.count.HP_chr_config_read_player_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_player_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4569,14 +4596,14 @@ bool HP_chr_config_read_player(const char *filename, const struct config_t *conf bool HP_chr_config_read_permission(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_permission_pre ) { + if (HPMHooks.count.HP_chr_config_read_permission_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_permission_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4584,9 +4611,9 @@ bool HP_chr_config_read_permission(const char *filename, const struct config_t * { retVal___ = HPMHooks.source.chr.config_read_permission(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_permission_post ) { + if (HPMHooks.count.HP_chr_config_read_permission_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_permission_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4596,14 +4623,14 @@ bool HP_chr_config_read_permission(const char *filename, const struct config_t * bool HP_chr_config_set_ip(const char *type, const char *value, uint32 *out_ip, char *out_ip_str) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_set_ip_pre ) { + if (HPMHooks.count.HP_chr_config_set_ip_pre > 0) { bool (*preHookFunc) (const char **type, const char **value, uint32 **out_ip, char **out_ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_set_ip_pre[hIndex].func; retVal___ = preHookFunc(&type, &value, &out_ip, &out_ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4611,9 +4638,9 @@ bool HP_chr_config_set_ip(const char *type, const char *value, uint32 *out_ip, c { retVal___ = HPMHooks.source.chr.config_set_ip(type, value, out_ip, out_ip_str); } - if( HPMHooks.count.HP_chr_config_set_ip_post ) { + if (HPMHooks.count.HP_chr_config_set_ip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *type, const char *value, uint32 *out_ip, char *out_ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_set_ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, value, out_ip, out_ip_str); } @@ -4623,14 +4650,14 @@ bool HP_chr_config_set_ip(const char *type, const char *value, uint32 *out_ip, c bool HP_chr_config_read_inter(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_inter_pre ) { + if (HPMHooks.count.HP_chr_config_read_inter_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_inter_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4638,9 +4665,9 @@ bool HP_chr_config_read_inter(const char *filename, const struct config_t *confi { retVal___ = HPMHooks.source.chr.config_read_inter(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_inter_post ) { + if (HPMHooks.count.HP_chr_config_read_inter_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_inter_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4650,14 +4677,14 @@ bool HP_chr_config_read_inter(const char *filename, const struct config_t *confi bool HP_chr_config_read_top(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_config_read_top_pre ) { + if (HPMHooks.count.HP_chr_config_read_top_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_top_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4665,9 +4692,9 @@ bool HP_chr_config_read_top(const char *filename, const struct config_t *config, { retVal___ = HPMHooks.source.chr.config_read_top(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_read_top_post ) { + if (HPMHooks.count.HP_chr_config_read_top_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_top_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -4677,14 +4704,14 @@ bool HP_chr_config_read_top(const char *filename, const struct config_t *config, /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4692,9 +4719,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -4703,14 +4730,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4718,9 +4745,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -4730,14 +4757,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4745,9 +4772,9 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } @@ -4757,14 +4784,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4772,9 +4799,9 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; retVal___ = postHookFunc(retVal___, argc, argv, options); } @@ -4784,14 +4811,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4799,9 +4826,9 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, current_arg, argc); } @@ -4811,14 +4838,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4826,9 +4853,9 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } @@ -4838,14 +4865,14 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { /* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4853,9 +4880,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -4864,14 +4891,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4879,9 +4906,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -4890,14 +4917,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4905,9 +4932,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -4916,14 +4943,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4931,9 +4958,9 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } @@ -4943,14 +4970,14 @@ void HP_console_display_gplnotice(void) { /* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4958,9 +4985,9 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } @@ -4971,14 +4998,14 @@ void HP_core_shutdown_callback(void) { enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4986,9 +5013,9 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -4998,14 +5025,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5013,9 +5040,9 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -5025,14 +5052,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5040,9 +5067,9 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -5052,14 +5079,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5067,9 +5094,9 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -5079,14 +5106,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5094,9 +5121,9 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, which); } @@ -5106,14 +5133,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { + if (HPMHooks.count.HP_DB_alloc_pre > 0) { struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5121,9 +5148,9 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } @@ -5133,14 +5160,14 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT union DBKey HP_DB_i2key(int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2key_pre ) { + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5148,9 +5175,9 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -5160,14 +5187,14 @@ union DBKey HP_DB_i2key(int key) { union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2key_pre ) { + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5175,9 +5202,9 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -5187,14 +5214,14 @@ union DBKey HP_DB_ui2key(unsigned int key) { union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_str2key_pre ) { + if (HPMHooks.count.HP_DB_str2key_pre > 0) { union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5202,9 +5229,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -5214,14 +5241,14 @@ union DBKey HP_DB_str2key(const char *key) { union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i642key_pre ) { + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5229,9 +5256,9 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -5241,14 +5268,14 @@ union DBKey HP_DB_i642key(int64 key) { union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui642key_pre ) { + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5256,9 +5283,9 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -5268,14 +5295,14 @@ union DBKey HP_DB_ui642key(uint64 key) { struct DBData HP_DB_i2data(int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2data_pre ) { + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5283,9 +5310,9 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5295,14 +5322,14 @@ struct DBData HP_DB_i2data(int data) { struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2data_pre ) { + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5310,9 +5337,9 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5322,14 +5349,14 @@ struct DBData HP_DB_ui2data(unsigned int data) { struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ptr2data_pre ) { + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5337,9 +5364,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5349,14 +5376,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { + if (HPMHooks.count.HP_DB_data2i_pre > 0) { int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5364,9 +5391,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5376,14 +5403,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5391,9 +5418,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5403,14 +5430,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5418,9 +5445,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5429,14 +5456,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5444,9 +5471,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -5455,14 +5482,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5470,9 +5497,9 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } @@ -5482,14 +5509,14 @@ void HP_DB_final(void) { /* des_interface */ void HP_des_decrypt_block(struct des_bit64 *block) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_block_pre ) { + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { void (*preHookFunc) (struct des_bit64 **block); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; preHookFunc(&block); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5497,9 +5524,9 @@ void HP_des_decrypt_block(struct des_bit64 *block) { { HPMHooks.source.des.decrypt_block(block); } - if( HPMHooks.count.HP_des_decrypt_block_post ) { + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { void (*postHookFunc) (struct des_bit64 *block); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; postHookFunc(block); } @@ -5508,14 +5535,14 @@ void HP_des_decrypt_block(struct des_bit64 *block) { } void HP_des_decrypt(unsigned char *data, size_t size) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_pre ) { + if (HPMHooks.count.HP_des_decrypt_pre > 0) { void (*preHookFunc) (unsigned char **data, size_t *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; preHookFunc(&data, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5523,9 +5550,9 @@ void HP_des_decrypt(unsigned char *data, size_t size) { { HPMHooks.source.des.decrypt(data, size); } - if( HPMHooks.count.HP_des_decrypt_post ) { + if (HPMHooks.count.HP_des_decrypt_post > 0) { void (*postHookFunc) (unsigned char *data, size_t size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; postHookFunc(data, size); } @@ -5536,14 +5563,14 @@ void HP_des_decrypt(unsigned char *data, size_t size) { const char* HP_geoip_getcountry(uint32 ipnum) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_geoip_getcountry_pre ) { + if (HPMHooks.count.HP_geoip_getcountry_pre > 0) { const char* (*preHookFunc) (uint32 *ipnum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_getcountry_pre[hIndex].func; retVal___ = preHookFunc(&ipnum); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5551,9 +5578,9 @@ const char* HP_geoip_getcountry(uint32 ipnum) { { retVal___ = HPMHooks.source.geoip.getcountry(ipnum); } - if( HPMHooks.count.HP_geoip_getcountry_post ) { + if (HPMHooks.count.HP_geoip_getcountry_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint32 ipnum); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_getcountry_post[hIndex].func; retVal___ = postHookFunc(retVal___, ipnum); } @@ -5562,14 +5589,14 @@ const char* HP_geoip_getcountry(uint32 ipnum) { } void HP_geoip_final(bool shutdown) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_final_pre ) { + if (HPMHooks.count.HP_geoip_final_pre > 0) { void (*preHookFunc) (bool *shutdown); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_final_pre[hIndex].func; preHookFunc(&shutdown); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5577,9 +5604,9 @@ void HP_geoip_final(bool shutdown) { { HPMHooks.source.geoip.final(shutdown); } - if( HPMHooks.count.HP_geoip_final_post ) { + if (HPMHooks.count.HP_geoip_final_post > 0) { void (*postHookFunc) (bool shutdown); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_final_post[hIndex].func; postHookFunc(shutdown); } @@ -5588,14 +5615,14 @@ void HP_geoip_final(bool shutdown) { } void HP_geoip_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_init_pre ) { + if (HPMHooks.count.HP_geoip_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5603,9 +5630,9 @@ void HP_geoip_init(void) { { HPMHooks.source.geoip.init(); } - if( HPMHooks.count.HP_geoip_init_post ) { + if (HPMHooks.count.HP_geoip_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_init_post[hIndex].func; postHookFunc(); } @@ -5616,14 +5643,14 @@ void HP_geoip_init(void) { int HP_inter_auction_count(int char_id, bool buy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_count_pre ) { + if (HPMHooks.count.HP_inter_auction_count_pre > 0) { int (*preHookFunc) (int *char_id, bool *buy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_count_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &buy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5631,9 +5658,9 @@ int HP_inter_auction_count(int char_id, bool buy) { { retVal___ = HPMHooks.source.inter_auction.count(char_id, buy); } - if( HPMHooks.count.HP_inter_auction_count_post ) { + if (HPMHooks.count.HP_inter_auction_count_post > 0) { int (*postHookFunc) (int retVal___, int char_id, bool buy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_count_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, buy); } @@ -5642,14 +5669,14 @@ int HP_inter_auction_count(int char_id, bool buy) { } void HP_inter_auction_save(struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_save_pre ) { + if (HPMHooks.count.HP_inter_auction_save_pre > 0) { void (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_save_pre[hIndex].func; preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5657,9 +5684,9 @@ void HP_inter_auction_save(struct auction_data *auction) { { HPMHooks.source.inter_auction.save(auction); } - if( HPMHooks.count.HP_inter_auction_save_post ) { + if (HPMHooks.count.HP_inter_auction_save_post > 0) { void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_save_post[hIndex].func; postHookFunc(auction); } @@ -5669,14 +5696,14 @@ void HP_inter_auction_save(struct auction_data *auction) { unsigned int HP_inter_auction_create(struct auction_data *auction) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_create_pre ) { + if (HPMHooks.count.HP_inter_auction_create_pre > 0) { unsigned int (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_create_pre[hIndex].func; retVal___ = preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5684,9 +5711,9 @@ unsigned int HP_inter_auction_create(struct auction_data *auction) { { retVal___ = HPMHooks.source.inter_auction.create(auction); } - if( HPMHooks.count.HP_inter_auction_create_post ) { + if (HPMHooks.count.HP_inter_auction_create_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, auction); } @@ -5696,14 +5723,14 @@ unsigned int HP_inter_auction_create(struct auction_data *auction) { int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_end_timer_pre ) { + if (HPMHooks.count.HP_inter_auction_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_end_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5711,9 +5738,9 @@ int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.inter_auction.end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_auction_end_timer_post ) { + if (HPMHooks.count.HP_inter_auction_end_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_end_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -5722,14 +5749,14 @@ int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_inter_auction_delete_(struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_delete__pre ) { + if (HPMHooks.count.HP_inter_auction_delete__pre > 0) { void (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_delete__pre[hIndex].func; preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5737,9 +5764,9 @@ void HP_inter_auction_delete_(struct auction_data *auction) { { HPMHooks.source.inter_auction.delete_(auction); } - if( HPMHooks.count.HP_inter_auction_delete__post ) { + if (HPMHooks.count.HP_inter_auction_delete__post > 0) { void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_delete__post[hIndex].func; postHookFunc(auction); } @@ -5748,14 +5775,14 @@ void HP_inter_auction_delete_(struct auction_data *auction) { } void HP_inter_auction_fromsql(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_fromsql_pre ) { + if (HPMHooks.count.HP_inter_auction_fromsql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_fromsql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5763,9 +5790,9 @@ void HP_inter_auction_fromsql(void) { { HPMHooks.source.inter_auction.fromsql(); } - if( HPMHooks.count.HP_inter_auction_fromsql_post ) { + if (HPMHooks.count.HP_inter_auction_fromsql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_fromsql_post[hIndex].func; postHookFunc(); } @@ -5775,14 +5802,14 @@ void HP_inter_auction_fromsql(void) { int HP_inter_auction_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_auction_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5790,9 +5817,9 @@ int HP_inter_auction_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_auction.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_auction_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_auction_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -5802,14 +5829,14 @@ int HP_inter_auction_parse_frommap(int fd) { int HP_inter_auction_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_sql_init_pre ) { + if (HPMHooks.count.HP_inter_auction_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5817,9 +5844,9 @@ int HP_inter_auction_sql_init(void) { { retVal___ = HPMHooks.source.inter_auction.sql_init(); } - if( HPMHooks.count.HP_inter_auction_sql_init_post ) { + if (HPMHooks.count.HP_inter_auction_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5828,14 +5855,14 @@ int HP_inter_auction_sql_init(void) { } void HP_inter_auction_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_sql_final_pre ) { + if (HPMHooks.count.HP_inter_auction_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5843,9 +5870,9 @@ void HP_inter_auction_sql_final(void) { { HPMHooks.source.inter_auction.sql_final(); } - if( HPMHooks.count.HP_inter_auction_sql_final_post ) { + if (HPMHooks.count.HP_inter_auction_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_sql_final_post[hIndex].func; postHookFunc(); } @@ -5855,14 +5882,14 @@ void HP_inter_auction_sql_final(void) { /* inter_elemental_interface */ void HP_inter_elemental_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_init_pre ) { + if (HPMHooks.count.HP_inter_elemental_sql_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5870,9 +5897,9 @@ void HP_inter_elemental_sql_init(void) { { HPMHooks.source.inter_elemental.sql_init(); } - if( HPMHooks.count.HP_inter_elemental_sql_init_post ) { + if (HPMHooks.count.HP_inter_elemental_sql_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_post[hIndex].func; postHookFunc(); } @@ -5881,14 +5908,14 @@ void HP_inter_elemental_sql_init(void) { } void HP_inter_elemental_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_final_pre ) { + if (HPMHooks.count.HP_inter_elemental_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5896,9 +5923,9 @@ void HP_inter_elemental_sql_final(void) { { HPMHooks.source.inter_elemental.sql_final(); } - if( HPMHooks.count.HP_inter_elemental_sql_final_post ) { + if (HPMHooks.count.HP_inter_elemental_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_post[hIndex].func; postHookFunc(); } @@ -5908,14 +5935,14 @@ void HP_inter_elemental_sql_final(void) { int HP_inter_elemental_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_elemental_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_elemental_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5923,9 +5950,9 @@ int HP_inter_elemental_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_elemental.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_elemental_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_elemental_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -5936,14 +5963,14 @@ int HP_inter_elemental_parse_frommap(int fd) { int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_save_timer_pre ) { + if (HPMHooks.count.HP_inter_guild_save_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_save_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5951,9 +5978,9 @@ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.inter_guild.save_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_guild_save_timer_post ) { + if (HPMHooks.count.HP_inter_guild_save_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_save_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -5963,14 +5990,14 @@ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int HP_inter_guild_removemember_tosql(int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_removemember_tosql_pre ) { + if (HPMHooks.count.HP_inter_guild_removemember_tosql_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5978,9 +6005,9 @@ int HP_inter_guild_removemember_tosql(int account_id, int char_id) { { retVal___ = HPMHooks.source.inter_guild.removemember_tosql(account_id, char_id); } - if( HPMHooks.count.HP_inter_guild_removemember_tosql_post ) { + if (HPMHooks.count.HP_inter_guild_removemember_tosql_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id); } @@ -5990,14 +6017,14 @@ int HP_inter_guild_removemember_tosql(int account_id, int char_id) { int HP_inter_guild_tosql(struct guild *g, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_tosql_pre ) { + if (HPMHooks.count.HP_inter_guild_tosql_pre > 0) { int (*preHookFunc) (struct guild **g, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_tosql_pre[hIndex].func; retVal___ = preHookFunc(&g, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6005,9 +6032,9 @@ int HP_inter_guild_tosql(struct guild *g, int flag) { { retVal___ = HPMHooks.source.inter_guild.tosql(g, flag); } - if( HPMHooks.count.HP_inter_guild_tosql_post ) { + if (HPMHooks.count.HP_inter_guild_tosql_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, flag); } @@ -6017,14 +6044,14 @@ int HP_inter_guild_tosql(struct guild *g, int flag) { struct guild* HP_inter_guild_fromsql(int guild_id) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_fromsql_pre ) { + if (HPMHooks.count.HP_inter_guild_fromsql_pre > 0) { struct guild* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6032,9 +6059,9 @@ struct guild* HP_inter_guild_fromsql(int guild_id) { { retVal___ = HPMHooks.source.inter_guild.fromsql(guild_id); } - if( HPMHooks.count.HP_inter_guild_fromsql_post ) { + if (HPMHooks.count.HP_inter_guild_fromsql_post > 0) { struct guild* (*postHookFunc) (struct guild* retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id); } @@ -6044,14 +6071,14 @@ struct guild* HP_inter_guild_fromsql(int guild_id) { int HP_inter_guild_castle_tosql(struct guild_castle *gc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_castle_tosql_pre ) { + if (HPMHooks.count.HP_inter_guild_castle_tosql_pre > 0) { int (*preHookFunc) (struct guild_castle **gc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_pre[hIndex].func; retVal___ = preHookFunc(&gc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6059,9 +6086,9 @@ int HP_inter_guild_castle_tosql(struct guild_castle *gc) { { retVal___ = HPMHooks.source.inter_guild.castle_tosql(gc); } - if( HPMHooks.count.HP_inter_guild_castle_tosql_post ) { + if (HPMHooks.count.HP_inter_guild_castle_tosql_post > 0) { int (*postHookFunc) (int retVal___, struct guild_castle *gc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, gc); } @@ -6071,14 +6098,14 @@ int HP_inter_guild_castle_tosql(struct guild_castle *gc) { struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { int hIndex = 0; struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_castle_fromsql_pre ) { + if (HPMHooks.count.HP_inter_guild_castle_fromsql_pre > 0) { struct guild_castle* (*preHookFunc) (int *castle_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&castle_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6086,9 +6113,9 @@ struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { { retVal___ = HPMHooks.source.inter_guild.castle_fromsql(castle_id); } - if( HPMHooks.count.HP_inter_guild_castle_fromsql_post ) { + if (HPMHooks.count.HP_inter_guild_castle_fromsql_post > 0) { struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int castle_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, castle_id); } @@ -6098,14 +6125,14 @@ struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_exp_parse_row_pre ) { + if (HPMHooks.count.HP_inter_guild_exp_parse_row_pre > 0) { bool (*preHookFunc) (char **split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_pre[hIndex].func; retVal___ = preHookFunc(&split, &column, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6113,9 +6140,9 @@ bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { { retVal___ = HPMHooks.source.inter_guild.exp_parse_row(split, column, current); } - if( HPMHooks.count.HP_inter_guild_exp_parse_row_post ) { + if (HPMHooks.count.HP_inter_guild_exp_parse_row_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int column, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_post[hIndex].func; retVal___ = postHookFunc(retVal___, split, column, current); } @@ -6125,14 +6152,14 @@ bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { int HP_inter_guild_CharOnline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOnline_pre ) { + if (HPMHooks.count.HP_inter_guild_CharOnline_pre > 0) { int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6140,9 +6167,9 @@ int HP_inter_guild_CharOnline(int char_id, int guild_id) { { retVal___ = HPMHooks.source.inter_guild.CharOnline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_guild_CharOnline_post ) { + if (HPMHooks.count.HP_inter_guild_CharOnline_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, guild_id); } @@ -6152,14 +6179,14 @@ int HP_inter_guild_CharOnline(int char_id, int guild_id) { int HP_inter_guild_CharOffline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOffline_pre ) { + if (HPMHooks.count.HP_inter_guild_CharOffline_pre > 0) { int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6167,9 +6194,9 @@ int HP_inter_guild_CharOffline(int char_id, int guild_id) { { retVal___ = HPMHooks.source.inter_guild.CharOffline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_guild_CharOffline_post ) { + if (HPMHooks.count.HP_inter_guild_CharOffline_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, guild_id); } @@ -6179,14 +6206,14 @@ int HP_inter_guild_CharOffline(int char_id, int guild_id) { int HP_inter_guild_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sql_init_pre ) { + if (HPMHooks.count.HP_inter_guild_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6194,9 +6221,9 @@ int HP_inter_guild_sql_init(void) { { retVal___ = HPMHooks.source.inter_guild.sql_init(); } - if( HPMHooks.count.HP_inter_guild_sql_init_post ) { + if (HPMHooks.count.HP_inter_guild_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6206,16 +6233,16 @@ int HP_inter_guild_sql_init(void) { int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_db_final_pre ) { + if (HPMHooks.count.HP_inter_guild_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_guild_db_final_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6225,9 +6252,9 @@ int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.inter_guild.db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_guild_db_final_post ) { + if (HPMHooks.count.HP_inter_guild_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_guild_db_final_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -6238,14 +6265,14 @@ int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { } void HP_inter_guild_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_guild_sql_final_pre ) { + if (HPMHooks.count.HP_inter_guild_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6253,9 +6280,9 @@ void HP_inter_guild_sql_final(void) { { HPMHooks.source.inter_guild.sql_final(); } - if( HPMHooks.count.HP_inter_guild_sql_final_post ) { + if (HPMHooks.count.HP_inter_guild_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sql_final_post[hIndex].func; postHookFunc(); } @@ -6265,14 +6292,14 @@ void HP_inter_guild_sql_final(void) { int HP_inter_guild_search_guildname(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_search_guildname_pre ) { + if (HPMHooks.count.HP_inter_guild_search_guildname_pre > 0) { int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6280,9 +6307,9 @@ int HP_inter_guild_search_guildname(const char *str) { { retVal___ = HPMHooks.source.inter_guild.search_guildname(str); } - if( HPMHooks.count.HP_inter_guild_search_guildname_post ) { + if (HPMHooks.count.HP_inter_guild_search_guildname_post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -6292,14 +6319,14 @@ int HP_inter_guild_search_guildname(const char *str) { bool HP_inter_guild_check_empty(struct guild *g) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_check_empty_pre ) { + if (HPMHooks.count.HP_inter_guild_check_empty_pre > 0) { bool (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_check_empty_pre[hIndex].func; retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6307,9 +6334,9 @@ bool HP_inter_guild_check_empty(struct guild *g) { { retVal___ = HPMHooks.source.inter_guild.check_empty(g); } - if( HPMHooks.count.HP_inter_guild_check_empty_post ) { + if (HPMHooks.count.HP_inter_guild_check_empty_post > 0) { bool (*postHookFunc) (bool retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_check_empty_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -6319,14 +6346,14 @@ bool HP_inter_guild_check_empty(struct guild *g) { unsigned int HP_inter_guild_nextexp(int level) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_nextexp_pre ) { + if (HPMHooks.count.HP_inter_guild_nextexp_pre > 0) { unsigned int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_nextexp_pre[hIndex].func; retVal___ = preHookFunc(&level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6334,9 +6361,9 @@ unsigned int HP_inter_guild_nextexp(int level) { { retVal___ = HPMHooks.source.inter_guild.nextexp(level); } - if( HPMHooks.count.HP_inter_guild_nextexp_post ) { + if (HPMHooks.count.HP_inter_guild_nextexp_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, int level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_nextexp_post[hIndex].func; retVal___ = postHookFunc(retVal___, level); } @@ -6346,14 +6373,14 @@ unsigned int HP_inter_guild_nextexp(int level) { int HP_inter_guild_checkskill(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_checkskill_pre ) { + if (HPMHooks.count.HP_inter_guild_checkskill_pre > 0) { int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_checkskill_pre[hIndex].func; retVal___ = preHookFunc(&g, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6361,9 +6388,9 @@ int HP_inter_guild_checkskill(struct guild *g, int id) { { retVal___ = HPMHooks.source.inter_guild.checkskill(g, id); } - if( HPMHooks.count.HP_inter_guild_checkskill_post ) { + if (HPMHooks.count.HP_inter_guild_checkskill_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_checkskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, id); } @@ -6373,14 +6400,14 @@ int HP_inter_guild_checkskill(struct guild *g, int id) { int HP_inter_guild_calcinfo(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_calcinfo_pre ) { + if (HPMHooks.count.HP_inter_guild_calcinfo_pre > 0) { int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_pre[hIndex].func; retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6388,9 +6415,9 @@ int HP_inter_guild_calcinfo(struct guild *g) { { retVal___ = HPMHooks.source.inter_guild.calcinfo(g); } - if( HPMHooks.count.HP_inter_guild_calcinfo_post ) { + if (HPMHooks.count.HP_inter_guild_calcinfo_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -6400,14 +6427,14 @@ int HP_inter_guild_calcinfo(struct guild *g) { int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short gender) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sex_changed_pre ) { + if (HPMHooks.count.HP_inter_guild_sex_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *gender); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &gender); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6415,9 +6442,9 @@ int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short { retVal___ = HPMHooks.source.inter_guild.sex_changed(guild_id, account_id, char_id, gender); } - if( HPMHooks.count.HP_inter_guild_sex_changed_post ) { + if (HPMHooks.count.HP_inter_guild_sex_changed_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, short gender); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, gender); } @@ -6427,14 +6454,14 @@ int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_charname_changed_pre ) { + if (HPMHooks.count.HP_inter_guild_charname_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6442,9 +6469,9 @@ int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, c { retVal___ = HPMHooks.source.inter_guild.charname_changed(guild_id, account_id, char_id, name); } - if( HPMHooks.count.HP_inter_guild_charname_changed_post ) { + if (HPMHooks.count.HP_inter_guild_charname_changed_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, name); } @@ -6454,14 +6481,14 @@ int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, c int HP_inter_guild_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_guild_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6469,9 +6496,9 @@ int HP_inter_guild_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_guild.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_guild_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_guild_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6481,14 +6508,14 @@ int HP_inter_guild_parse_frommap(int fd) { int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_leave_pre ) { + if (HPMHooks.count.HP_inter_guild_leave_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_leave_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6496,9 +6523,9 @@ int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.inter_guild.leave(guild_id, account_id, char_id); } - if( HPMHooks.count.HP_inter_guild_leave_post ) { + if (HPMHooks.count.HP_inter_guild_leave_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_leave_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id); } @@ -6508,14 +6535,14 @@ int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { int HP_inter_guild_broken(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_broken_pre ) { + if (HPMHooks.count.HP_inter_guild_broken_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_broken_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6523,9 +6550,9 @@ int HP_inter_guild_broken(int guild_id) { { retVal___ = HPMHooks.source.inter_guild.broken(guild_id); } - if( HPMHooks.count.HP_inter_guild_broken_post ) { + if (HPMHooks.count.HP_inter_guild_broken_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_broken_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id); } @@ -6536,14 +6563,14 @@ int HP_inter_guild_broken(int guild_id) { int HP_inter_homunculus_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_init_pre ) { + if (HPMHooks.count.HP_inter_homunculus_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6551,9 +6578,9 @@ int HP_inter_homunculus_sql_init(void) { { retVal___ = HPMHooks.source.inter_homunculus.sql_init(); } - if( HPMHooks.count.HP_inter_homunculus_sql_init_post ) { + if (HPMHooks.count.HP_inter_homunculus_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6562,14 +6589,14 @@ int HP_inter_homunculus_sql_init(void) { } void HP_inter_homunculus_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_final_pre ) { + if (HPMHooks.count.HP_inter_homunculus_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6577,9 +6604,9 @@ void HP_inter_homunculus_sql_final(void) { { HPMHooks.source.inter_homunculus.sql_final(); } - if( HPMHooks.count.HP_inter_homunculus_sql_final_post ) { + if (HPMHooks.count.HP_inter_homunculus_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_post[hIndex].func; postHookFunc(); } @@ -6589,14 +6616,14 @@ void HP_inter_homunculus_sql_final(void) { int HP_inter_homunculus_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_homunculus_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6604,9 +6631,9 @@ int HP_inter_homunculus_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_homunculus.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_homunculus_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6617,14 +6644,14 @@ int HP_inter_homunculus_parse_frommap(int fd) { const char* HP_inter_msg_txt(int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_msg_txt_pre ) { + if (HPMHooks.count.HP_inter_msg_txt_pre > 0) { const char* (*preHookFunc) (int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_msg_txt_pre[hIndex].func; retVal___ = preHookFunc(&msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6632,9 +6659,9 @@ const char* HP_inter_msg_txt(int msg_number) { { retVal___ = HPMHooks.source.inter.msg_txt(msg_number); } - if( HPMHooks.count.HP_inter_msg_txt_post ) { + if (HPMHooks.count.HP_inter_msg_txt_post > 0) { const char* (*postHookFunc) (const char* retVal___, int msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_msg_txt_post[hIndex].func; retVal___ = postHookFunc(retVal___, msg_number); } @@ -6644,14 +6671,14 @@ const char* HP_inter_msg_txt(int msg_number) { bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_msg_config_read_pre ) { + if (HPMHooks.count.HP_inter_msg_config_read_pre > 0) { bool (*preHookFunc) (const char **cfg_name, bool *allow_override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_msg_config_read_pre[hIndex].func; retVal___ = preHookFunc(&cfg_name, &allow_override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6659,9 +6686,9 @@ bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { { retVal___ = HPMHooks.source.inter.msg_config_read(cfg_name, allow_override); } - if( HPMHooks.count.HP_inter_msg_config_read_post ) { + if (HPMHooks.count.HP_inter_msg_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool allow_override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_msg_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, cfg_name, allow_override); } @@ -6670,14 +6697,14 @@ bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { } void HP_inter_do_final_msg(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_do_final_msg_pre ) { + if (HPMHooks.count.HP_inter_do_final_msg_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_do_final_msg_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6685,54 +6712,54 @@ void HP_inter_do_final_msg(void) { { HPMHooks.source.inter.do_final_msg(); } - if( HPMHooks.count.HP_inter_do_final_msg_post ) { + if (HPMHooks.count.HP_inter_do_final_msg_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_do_final_msg_post[hIndex].func; postHookFunc(); } } return; } -const char* HP_inter_job_name(int class_) { +const char* HP_inter_job_name(int class) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + if (HPMHooks.count.HP_inter_job_name_pre > 0) { + const char* (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_job_name_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter.job_name(class_); + retVal___ = HPMHooks.source.inter.job_name(class); } - if( HPMHooks.count.HP_inter_job_name_post ) { - const char* (*postHookFunc) (const char* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_job_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_job_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; } void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_inter_vmsg_to_fd_pre ) { + if (HPMHooks.count.HP_inter_vmsg_to_fd_pre > 0) { void (*preHookFunc) (int *fd, int *u_fd, int *aid, char **msg, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_pre[hIndex].func; preHookFunc(&fd, &u_fd, &aid, &msg, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6742,9 +6769,9 @@ void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { HPMHooks.source.inter.vmsg_to_fd(fd, u_fd, aid, msg, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_vmsg_to_fd_post ) { + if (HPMHooks.count.HP_inter_vmsg_to_fd_post > 0) { void (*postHookFunc) (int fd, int u_fd, int aid, char *msg, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_post[hIndex].func; postHookFunc(fd, u_fd, aid, msg, ap___copy); @@ -6755,14 +6782,14 @@ void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { } void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string) { int hIndex = 0; - if( HPMHooks.count.HP_inter_savereg_pre ) { + if (HPMHooks.count.HP_inter_savereg_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, const char **key, unsigned int *index, intptr_t *val, bool *is_string); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_savereg_pre[hIndex].func; preHookFunc(&account_id, &char_id, &key, &index, &val, &is_string); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6770,9 +6797,9 @@ void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int { HPMHooks.source.inter.savereg(account_id, char_id, key, index, val, is_string); } - if( HPMHooks.count.HP_inter_savereg_post ) { + if (HPMHooks.count.HP_inter_savereg_post > 0) { void (*postHookFunc) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_savereg_post[hIndex].func; postHookFunc(account_id, char_id, key, index, val, is_string); } @@ -6782,14 +6809,14 @@ void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_accreg_fromsql_pre ) { + if (HPMHooks.count.HP_inter_accreg_fromsql_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id, int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id, &fd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6797,9 +6824,9 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { { retVal___ = HPMHooks.source.inter.accreg_fromsql(account_id, char_id, fd, type); } - if( HPMHooks.count.HP_inter_accreg_fromsql_post ) { + if (HPMHooks.count.HP_inter_accreg_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int char_id, int fd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, fd, type); } @@ -6809,16 +6836,16 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { int HP_inter_vlog(char *fmt, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_vlog_pre ) { + if (HPMHooks.count.HP_inter_vlog_pre > 0) { int (*preHookFunc) (char **fmt, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_vlog_pre[hIndex].func; retVal___ = preHookFunc(&fmt, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6828,9 +6855,9 @@ int HP_inter_vlog(char *fmt, va_list ap) { retVal___ = HPMHooks.source.inter.vlog(fmt, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_vlog_post ) { + if (HPMHooks.count.HP_inter_vlog_post > 0) { int (*postHookFunc) (int retVal___, char *fmt, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_vlog_post[hIndex].func; retVal___ = postHookFunc(retVal___, fmt, ap___copy); @@ -6842,14 +6869,14 @@ int HP_inter_vlog(char *fmt, va_list ap) { int HP_inter_init_sql(const char *file) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_init_sql_pre ) { + if (HPMHooks.count.HP_inter_init_sql_pre > 0) { int (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_init_sql_pre[hIndex].func; retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6857,9 +6884,9 @@ int HP_inter_init_sql(const char *file) { { retVal___ = HPMHooks.source.inter.init_sql(file); } - if( HPMHooks.count.HP_inter_init_sql_post ) { + if (HPMHooks.count.HP_inter_init_sql_post > 0) { int (*postHookFunc) (int retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_init_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -6869,14 +6896,14 @@ int HP_inter_init_sql(const char *file) { int HP_inter_mapif_init(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mapif_init_pre ) { + if (HPMHooks.count.HP_inter_mapif_init_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mapif_init_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6884,9 +6911,9 @@ int HP_inter_mapif_init(int fd) { { retVal___ = HPMHooks.source.inter.mapif_init(fd); } - if( HPMHooks.count.HP_inter_mapif_init_post ) { + if (HPMHooks.count.HP_inter_mapif_init_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mapif_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6896,16 +6923,16 @@ int HP_inter_mapif_init(int fd) { int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre ) { + if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6915,9 +6942,9 @@ int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list retVal___ = HPMHooks.source.inter.check_ttl_wisdata_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post ) { + if (HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -6929,14 +6956,14 @@ int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list int HP_inter_check_ttl_wisdata(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_pre ) { + if (HPMHooks.count.HP_inter_check_ttl_wisdata_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6944,9 +6971,9 @@ int HP_inter_check_ttl_wisdata(void) { { retVal___ = HPMHooks.source.inter.check_ttl_wisdata(); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_post ) { + if (HPMHooks.count.HP_inter_check_ttl_wisdata_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6956,14 +6983,14 @@ int HP_inter_check_ttl_wisdata(void) { int HP_inter_check_length(int fd, int length) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_length_pre ) { + if (HPMHooks.count.HP_inter_check_length_pre > 0) { int (*preHookFunc) (int *fd, int *length); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_check_length_pre[hIndex].func; retVal___ = preHookFunc(&fd, &length); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6971,9 +6998,9 @@ int HP_inter_check_length(int fd, int length) { { retVal___ = HPMHooks.source.inter.check_length(fd, length); } - if( HPMHooks.count.HP_inter_check_length_post ) { + if (HPMHooks.count.HP_inter_check_length_post > 0) { int (*postHookFunc) (int retVal___, int fd, int length); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_check_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, length); } @@ -6983,14 +7010,14 @@ int HP_inter_check_length(int fd, int length) { int HP_inter_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6998,9 +7025,9 @@ int HP_inter_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -7009,14 +7036,14 @@ int HP_inter_parse_frommap(int fd) { } void HP_inter_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_final_pre ) { + if (HPMHooks.count.HP_inter_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7024,9 +7051,9 @@ void HP_inter_final(void) { { HPMHooks.source.inter.final(); } - if( HPMHooks.count.HP_inter_final_post ) { + if (HPMHooks.count.HP_inter_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_final_post[hIndex].func; postHookFunc(); } @@ -7036,14 +7063,14 @@ void HP_inter_final(void) { bool HP_inter_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_config_read_pre ) { + if (HPMHooks.count.HP_inter_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7051,9 +7078,9 @@ bool HP_inter_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.inter.config_read(filename, imported); } - if( HPMHooks.count.HP_inter_config_read_post ) { + if (HPMHooks.count.HP_inter_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, imported); } @@ -7063,14 +7090,14 @@ bool HP_inter_config_read(const char *filename, bool imported) { bool HP_inter_config_read_log(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_config_read_log_pre ) { + if (HPMHooks.count.HP_inter_config_read_log_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_config_read_log_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7078,9 +7105,9 @@ bool HP_inter_config_read_log(const char *filename, const struct config_t *confi { retVal___ = HPMHooks.source.inter.config_read_log(filename, config, imported); } - if( HPMHooks.count.HP_inter_config_read_log_post ) { + if (HPMHooks.count.HP_inter_config_read_log_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_config_read_log_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -7090,14 +7117,14 @@ bool HP_inter_config_read_log(const char *filename, const struct config_t *confi bool HP_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_config_read_connection_pre ) { + if (HPMHooks.count.HP_inter_config_read_connection_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_config_read_connection_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7105,9 +7132,9 @@ bool HP_inter_config_read_connection(const char *filename, const struct config_t { retVal___ = HPMHooks.source.inter.config_read_connection(filename, config, imported); } - if( HPMHooks.count.HP_inter_config_read_connection_post ) { + if (HPMHooks.count.HP_inter_config_read_connection_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_config_read_connection_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -7118,14 +7145,14 @@ bool HP_inter_config_read_connection(const char *filename, const struct config_t int HP_inter_mail_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_sql_init_pre ) { + if (HPMHooks.count.HP_inter_mail_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7133,9 +7160,9 @@ int HP_inter_mail_sql_init(void) { { retVal___ = HPMHooks.source.inter_mail.sql_init(); } - if( HPMHooks.count.HP_inter_mail_sql_init_post ) { + if (HPMHooks.count.HP_inter_mail_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7144,14 +7171,14 @@ int HP_inter_mail_sql_init(void) { } void HP_inter_mail_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sql_final_pre ) { + if (HPMHooks.count.HP_inter_mail_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7159,9 +7186,9 @@ void HP_inter_mail_sql_final(void) { { HPMHooks.source.inter_mail.sql_final(); } - if( HPMHooks.count.HP_inter_mail_sql_final_post ) { + if (HPMHooks.count.HP_inter_mail_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sql_final_post[hIndex].func; postHookFunc(); } @@ -7171,14 +7198,14 @@ void HP_inter_mail_sql_final(void) { int HP_inter_mail_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_mail_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7186,9 +7213,9 @@ int HP_inter_mail_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_mail.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mail_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_mail_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -7198,14 +7225,14 @@ int HP_inter_mail_parse_frommap(int fd) { int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_fromsql_pre ) { + if (HPMHooks.count.HP_inter_mail_fromsql_pre > 0) { int (*preHookFunc) (int *char_id, struct mail_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7213,9 +7240,9 @@ int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { { retVal___ = HPMHooks.source.inter_mail.fromsql(char_id, md); } - if( HPMHooks.count.HP_inter_mail_fromsql_post ) { + if (HPMHooks.count.HP_inter_mail_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int char_id, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, md); } @@ -7225,14 +7252,14 @@ int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { int HP_inter_mail_savemessage(struct mail_message *msg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_savemessage_pre ) { + if (HPMHooks.count.HP_inter_mail_savemessage_pre > 0) { int (*preHookFunc) (struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_savemessage_pre[hIndex].func; retVal___ = preHookFunc(&msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7240,9 +7267,9 @@ int HP_inter_mail_savemessage(struct mail_message *msg) { { retVal___ = HPMHooks.source.inter_mail.savemessage(msg); } - if( HPMHooks.count.HP_inter_mail_savemessage_post ) { + if (HPMHooks.count.HP_inter_mail_savemessage_post > 0) { int (*postHookFunc) (int retVal___, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_savemessage_post[hIndex].func; retVal___ = postHookFunc(retVal___, msg); } @@ -7252,14 +7279,14 @@ int HP_inter_mail_savemessage(struct mail_message *msg) { bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_loadmessage_pre ) { + if (HPMHooks.count.HP_inter_mail_loadmessage_pre > 0) { bool (*preHookFunc) (int *mail_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_pre[hIndex].func; retVal___ = preHookFunc(&mail_id, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7267,9 +7294,9 @@ bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { { retVal___ = HPMHooks.source.inter_mail.loadmessage(mail_id, msg); } - if( HPMHooks.count.HP_inter_mail_loadmessage_post ) { + if (HPMHooks.count.HP_inter_mail_loadmessage_post > 0) { bool (*postHookFunc) (bool retVal___, int mail_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_post[hIndex].func; retVal___ = postHookFunc(retVal___, mail_id, msg); } @@ -7279,14 +7306,14 @@ bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { bool HP_inter_mail_DeleteAttach(int mail_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_DeleteAttach_pre ) { + if (HPMHooks.count.HP_inter_mail_DeleteAttach_pre > 0) { bool (*preHookFunc) (int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_pre[hIndex].func; retVal___ = preHookFunc(&mail_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7294,9 +7321,9 @@ bool HP_inter_mail_DeleteAttach(int mail_id) { { retVal___ = HPMHooks.source.inter_mail.DeleteAttach(mail_id); } - if( HPMHooks.count.HP_inter_mail_DeleteAttach_post ) { + if (HPMHooks.count.HP_inter_mail_DeleteAttach_post > 0) { bool (*postHookFunc) (bool retVal___, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_post[hIndex].func; retVal___ = postHookFunc(retVal___, mail_id); } @@ -7305,14 +7332,14 @@ bool HP_inter_mail_DeleteAttach(int mail_id) { } void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, const char *dest_name, const char *title, const char *body, int zeny, struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sendmail_pre ) { + if (HPMHooks.count.HP_inter_mail_sendmail_pre > 0) { void (*preHookFunc) (int *send_id, const char **send_name, int *dest_id, const char **dest_name, const char **title, const char **body, int *zeny, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sendmail_pre[hIndex].func; preHookFunc(&send_id, &send_name, &dest_id, &dest_name, &title, &body, &zeny, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7320,9 +7347,9 @@ void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, con { HPMHooks.source.inter_mail.sendmail(send_id, send_name, dest_id, dest_name, title, body, zeny, item); } - if( HPMHooks.count.HP_inter_mail_sendmail_post ) { + if (HPMHooks.count.HP_inter_mail_sendmail_post > 0) { void (*postHookFunc) (int send_id, const char *send_name, int dest_id, const char *dest_name, const char *title, const char *body, int zeny, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sendmail_post[hIndex].func; postHookFunc(send_id, send_name, dest_id, dest_name, title, body, zeny, item); } @@ -7333,14 +7360,14 @@ void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, con bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre ) { + if (HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre > 0) { bool (*preHookFunc) (int *char_id, struct mmo_charstatus **status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7348,9 +7375,9 @@ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status { retVal___ = HPMHooks.source.inter_mercenary.owner_fromsql(char_id, status); } - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_post ) { + if (HPMHooks.count.HP_inter_mercenary_owner_fromsql_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, status); } @@ -7360,14 +7387,14 @@ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_pre ) { + if (HPMHooks.count.HP_inter_mercenary_owner_tosql_pre > 0) { bool (*preHookFunc) (int *char_id, struct mmo_charstatus **status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7375,9 +7402,9 @@ bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { retVal___ = HPMHooks.source.inter_mercenary.owner_tosql(char_id, status); } - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_post ) { + if (HPMHooks.count.HP_inter_mercenary_owner_tosql_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, status); } @@ -7387,14 +7414,14 @@ bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) bool HP_inter_mercenary_owner_delete(int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_delete_pre ) { + if (HPMHooks.count.HP_inter_mercenary_owner_delete_pre > 0) { bool (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_pre[hIndex].func; retVal___ = preHookFunc(&char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7402,9 +7429,9 @@ bool HP_inter_mercenary_owner_delete(int char_id) { { retVal___ = HPMHooks.source.inter_mercenary.owner_delete(char_id); } - if( HPMHooks.count.HP_inter_mercenary_owner_delete_post ) { + if (HPMHooks.count.HP_inter_mercenary_owner_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id); } @@ -7414,14 +7441,14 @@ bool HP_inter_mercenary_owner_delete(int char_id) { int HP_inter_mercenary_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_init_pre ) { + if (HPMHooks.count.HP_inter_mercenary_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7429,9 +7456,9 @@ int HP_inter_mercenary_sql_init(void) { { retVal___ = HPMHooks.source.inter_mercenary.sql_init(); } - if( HPMHooks.count.HP_inter_mercenary_sql_init_post ) { + if (HPMHooks.count.HP_inter_mercenary_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7440,14 +7467,14 @@ int HP_inter_mercenary_sql_init(void) { } void HP_inter_mercenary_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_final_pre ) { + if (HPMHooks.count.HP_inter_mercenary_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7455,9 +7482,9 @@ void HP_inter_mercenary_sql_final(void) { { HPMHooks.source.inter_mercenary.sql_final(); } - if( HPMHooks.count.HP_inter_mercenary_sql_final_post ) { + if (HPMHooks.count.HP_inter_mercenary_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_post[hIndex].func; postHookFunc(); } @@ -7467,14 +7494,14 @@ void HP_inter_mercenary_sql_final(void) { int HP_inter_mercenary_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_mercenary_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7482,9 +7509,9 @@ int HP_inter_mercenary_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_mercenary.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_mercenary_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -7495,14 +7522,14 @@ int HP_inter_mercenary_parse_frommap(int fd) { int HP_inter_party_check_lv(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_lv_pre ) { + if (HPMHooks.count.HP_inter_party_check_lv_pre > 0) { int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_lv_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7510,9 +7537,9 @@ int HP_inter_party_check_lv(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_lv(p); } - if( HPMHooks.count.HP_inter_party_check_lv_post ) { + if (HPMHooks.count.HP_inter_party_check_lv_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_lv_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7521,14 +7548,14 @@ int HP_inter_party_check_lv(struct party_data *p) { } void HP_inter_party_calc_state(struct party_data *p) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_calc_state_pre ) { + if (HPMHooks.count.HP_inter_party_calc_state_pre > 0) { void (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_calc_state_pre[hIndex].func; preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7536,9 +7563,9 @@ void HP_inter_party_calc_state(struct party_data *p) { { HPMHooks.source.inter_party.calc_state(p); } - if( HPMHooks.count.HP_inter_party_calc_state_post ) { + if (HPMHooks.count.HP_inter_party_calc_state_post > 0) { void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_calc_state_post[hIndex].func; postHookFunc(p); } @@ -7548,14 +7575,14 @@ void HP_inter_party_calc_state(struct party_data *p) { int HP_inter_party_tosql(struct party *p, int flag, int index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_tosql_pre ) { + if (HPMHooks.count.HP_inter_party_tosql_pre > 0) { int (*preHookFunc) (struct party **p, int *flag, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_tosql_pre[hIndex].func; retVal___ = preHookFunc(&p, &flag, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7563,9 +7590,9 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { { retVal___ = HPMHooks.source.inter_party.tosql(p, flag, index); } - if( HPMHooks.count.HP_inter_party_tosql_post ) { + if (HPMHooks.count.HP_inter_party_tosql_post > 0) { int (*postHookFunc) (int retVal___, struct party *p, int flag, int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, p, flag, index); } @@ -7575,14 +7602,14 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { struct party_data* HP_inter_party_fromsql(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_fromsql_pre ) { + if (HPMHooks.count.HP_inter_party_fromsql_pre > 0) { struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7590,9 +7617,9 @@ struct party_data* HP_inter_party_fromsql(int party_id) { { retVal___ = HPMHooks.source.inter_party.fromsql(party_id); } - if( HPMHooks.count.HP_inter_party_fromsql_post ) { + if (HPMHooks.count.HP_inter_party_fromsql_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id); } @@ -7602,14 +7629,14 @@ struct party_data* HP_inter_party_fromsql(int party_id) { int HP_inter_party_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_sql_init_pre ) { + if (HPMHooks.count.HP_inter_party_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7617,9 +7644,9 @@ int HP_inter_party_sql_init(void) { { retVal___ = HPMHooks.source.inter_party.sql_init(); } - if( HPMHooks.count.HP_inter_party_sql_init_post ) { + if (HPMHooks.count.HP_inter_party_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7628,14 +7655,14 @@ int HP_inter_party_sql_init(void) { } void HP_inter_party_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_sql_final_pre ) { + if (HPMHooks.count.HP_inter_party_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7643,9 +7670,9 @@ void HP_inter_party_sql_final(void) { { HPMHooks.source.inter_party.sql_final(); } - if( HPMHooks.count.HP_inter_party_sql_final_post ) { + if (HPMHooks.count.HP_inter_party_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_sql_final_post[hIndex].func; postHookFunc(); } @@ -7655,14 +7682,14 @@ void HP_inter_party_sql_final(void) { struct party_data* HP_inter_party_search_partyname(const char *str) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_search_partyname_pre ) { + if (HPMHooks.count.HP_inter_party_search_partyname_pre > 0) { struct party_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_search_partyname_pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7670,9 +7697,9 @@ struct party_data* HP_inter_party_search_partyname(const char *str) { { retVal___ = HPMHooks.source.inter_party.search_partyname(str); } - if( HPMHooks.count.HP_inter_party_search_partyname_post ) { + if (HPMHooks.count.HP_inter_party_search_partyname_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_search_partyname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -7682,14 +7709,14 @@ struct party_data* HP_inter_party_search_partyname(const char *str) { int HP_inter_party_check_exp_share(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_exp_share_pre ) { + if (HPMHooks.count.HP_inter_party_check_exp_share_pre > 0) { int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7697,9 +7724,9 @@ int HP_inter_party_check_exp_share(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_exp_share(p); } - if( HPMHooks.count.HP_inter_party_check_exp_share_post ) { + if (HPMHooks.count.HP_inter_party_check_exp_share_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7709,14 +7736,14 @@ int HP_inter_party_check_exp_share(struct party_data *p) { int HP_inter_party_check_empty(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_empty_pre ) { + if (HPMHooks.count.HP_inter_party_check_empty_pre > 0) { int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_empty_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7724,9 +7751,9 @@ int HP_inter_party_check_empty(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_empty(p); } - if( HPMHooks.count.HP_inter_party_check_empty_post ) { + if (HPMHooks.count.HP_inter_party_check_empty_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_empty_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7736,14 +7763,14 @@ int HP_inter_party_check_empty(struct party_data *p) { int HP_inter_party_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_party_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7751,9 +7778,9 @@ int HP_inter_party_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_party.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_party_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_party_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -7763,14 +7790,14 @@ int HP_inter_party_parse_frommap(int fd) { int HP_inter_party_leave(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_leave_pre ) { + if (HPMHooks.count.HP_inter_party_leave_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_leave_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7778,9 +7805,9 @@ int HP_inter_party_leave(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.inter_party.leave(party_id, account_id, char_id); } - if( HPMHooks.count.HP_inter_party_leave_post ) { + if (HPMHooks.count.HP_inter_party_leave_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_leave_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } @@ -7790,14 +7817,14 @@ int HP_inter_party_leave(int party_id, int account_id, int char_id) { int HP_inter_party_CharOnline(int char_id, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOnline_pre ) { + if (HPMHooks.count.HP_inter_party_CharOnline_pre > 0) { int (*preHookFunc) (int *char_id, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_CharOnline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7805,9 +7832,9 @@ int HP_inter_party_CharOnline(int char_id, int party_id) { { retVal___ = HPMHooks.source.inter_party.CharOnline(char_id, party_id); } - if( HPMHooks.count.HP_inter_party_CharOnline_post ) { + if (HPMHooks.count.HP_inter_party_CharOnline_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_CharOnline_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, party_id); } @@ -7817,14 +7844,14 @@ int HP_inter_party_CharOnline(int char_id, int party_id) { int HP_inter_party_CharOffline(int char_id, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOffline_pre ) { + if (HPMHooks.count.HP_inter_party_CharOffline_pre > 0) { int (*preHookFunc) (int *char_id, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_CharOffline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7832,9 +7859,9 @@ int HP_inter_party_CharOffline(int char_id, int party_id) { { retVal___ = HPMHooks.source.inter_party.CharOffline(char_id, party_id); } - if( HPMHooks.count.HP_inter_party_CharOffline_post ) { + if (HPMHooks.count.HP_inter_party_CharOffline_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_CharOffline_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, party_id); } @@ -7845,14 +7872,14 @@ int HP_inter_party_CharOffline(int char_id, int party_id) { int HP_inter_pet_tosql(const struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_tosql_pre ) { + if (HPMHooks.count.HP_inter_pet_tosql_pre > 0) { int (*preHookFunc) (const struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_tosql_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7860,9 +7887,9 @@ int HP_inter_pet_tosql(const struct s_pet *p) { { retVal___ = HPMHooks.source.inter_pet.tosql(p); } - if( HPMHooks.count.HP_inter_pet_tosql_post ) { + if (HPMHooks.count.HP_inter_pet_tosql_post > 0) { int (*postHookFunc) (int retVal___, const struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7872,14 +7899,14 @@ int HP_inter_pet_tosql(const struct s_pet *p) { int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_fromsql_pre ) { + if (HPMHooks.count.HP_inter_pet_fromsql_pre > 0) { int (*preHookFunc) (int *pet_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&pet_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7887,9 +7914,9 @@ int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { { retVal___ = HPMHooks.source.inter_pet.fromsql(pet_id, p); } - if( HPMHooks.count.HP_inter_pet_fromsql_post ) { + if (HPMHooks.count.HP_inter_pet_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int pet_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, pet_id, p); } @@ -7899,14 +7926,14 @@ int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { int HP_inter_pet_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_sql_init_pre ) { + if (HPMHooks.count.HP_inter_pet_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7914,9 +7941,9 @@ int HP_inter_pet_sql_init(void) { { retVal___ = HPMHooks.source.inter_pet.sql_init(); } - if( HPMHooks.count.HP_inter_pet_sql_init_post ) { + if (HPMHooks.count.HP_inter_pet_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7925,14 +7952,14 @@ int HP_inter_pet_sql_init(void) { } void HP_inter_pet_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_pet_sql_final_pre ) { + if (HPMHooks.count.HP_inter_pet_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7940,9 +7967,9 @@ void HP_inter_pet_sql_final(void) { { HPMHooks.source.inter_pet.sql_final(); } - if( HPMHooks.count.HP_inter_pet_sql_final_post ) { + if (HPMHooks.count.HP_inter_pet_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_sql_final_post[hIndex].func; postHookFunc(); } @@ -7952,14 +7979,14 @@ void HP_inter_pet_sql_final(void) { int HP_inter_pet_delete_(int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_delete__pre ) { + if (HPMHooks.count.HP_inter_pet_delete__pre > 0) { int (*preHookFunc) (int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_delete__pre[hIndex].func; retVal___ = preHookFunc(&pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7967,9 +7994,9 @@ int HP_inter_pet_delete_(int pet_id) { { retVal___ = HPMHooks.source.inter_pet.delete_(pet_id); } - if( HPMHooks.count.HP_inter_pet_delete__post ) { + if (HPMHooks.count.HP_inter_pet_delete__post > 0) { int (*postHookFunc) (int retVal___, int pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_delete__post[hIndex].func; retVal___ = postHookFunc(retVal___, pet_id); } @@ -7979,14 +8006,14 @@ int HP_inter_pet_delete_(int pet_id) { int HP_inter_pet_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_pet_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7994,9 +8021,9 @@ int HP_inter_pet_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_pet.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_pet_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_pet_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -8007,14 +8034,14 @@ int HP_inter_pet_parse_frommap(int fd) { int HP_inter_quest_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_quest_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_quest_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8022,27 +8049,216 @@ int HP_inter_quest_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_quest.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_quest_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_quest_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } +/* inter_rodex_interface */ +int HP_inter_rodex_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_sql_init_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.sql_init(); + } + if (HPMHooks.count.HP_inter_rodex_sql_init_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_inter_rodex_sql_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_inter_rodex_sql_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_sql_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter_rodex.sql_final(); + } + if (HPMHooks.count.HP_inter_rodex_sql_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_inter_rodex_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_parse_frommap_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_parse_frommap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.parse_frommap(fd); + } + if (HPMHooks.count.HP_inter_rodex_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_parse_frommap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +int HP_inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_fromsql_pre > 0) { + int (*preHookFunc) (int *char_id, int *account_id, int8 *opentype, int64 *mail_id, struct rodex_maillist **mails); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id, &opentype, &mail_id, &mails); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.fromsql(char_id, account_id, opentype, mail_id, mails); + } + if (HPMHooks.count.HP_inter_rodex_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id, opentype, mail_id, mails); + } + } + return retVal___; +} +bool HP_inter_rodex_hasnew(int char_id, int account_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_rodex_hasnew_pre > 0) { + bool (*preHookFunc) (int *char_id, int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_hasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_hasnew_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.hasnew(char_id, account_id); + } + if (HPMHooks.count.HP_inter_rodex_hasnew_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_hasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_hasnew_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id); + } + } + return retVal___; +} +bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) { + bool (*preHookFunc) (const char **name, int **target_char_id, short **target_class, int **target_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func; + retVal___ = preHookFunc(&name, &target_char_id, &target_class, &target_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level); + } + if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level); + } + } + return retVal___; +} +int64 HP_inter_rodex_savemessage(struct rodex_message *msg) { + int hIndex = 0; + int64 retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_savemessage_pre > 0) { + int64 (*preHookFunc) (struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_savemessage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_savemessage_pre[hIndex].func; + retVal___ = preHookFunc(&msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.savemessage(msg); + } + if (HPMHooks.count.HP_inter_rodex_savemessage_post > 0) { + int64 (*postHookFunc) (int64 retVal___, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_savemessage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_savemessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, msg); + } + } + return retVal___; +} /* inter_storage_interface */ -int HP_inter_storage_tosql(int account_id, struct storage_data *p) { +int HP_inter_storage_tosql(int account_id, const struct storage_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_tosql_pre ) { - int (*preHookFunc) (int *account_id, struct storage_data **p); + if (HPMHooks.count.HP_inter_storage_tosql_pre > 0) { + int (*preHookFunc) (int *account_id, const struct storage_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_tosql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8050,9 +8266,9 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *p) { { retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p); } - if( HPMHooks.count.HP_inter_storage_tosql_post ) { - int (*postHookFunc) (int retVal___, int account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_tosql_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, const struct storage_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, p); } @@ -8062,14 +8278,14 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *p) { int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_fromsql_pre ) { + if (HPMHooks.count.HP_inter_storage_fromsql_pre > 0) { int (*preHookFunc) (int *account_id, struct storage_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8077,9 +8293,9 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { { retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, p); } - if( HPMHooks.count.HP_inter_storage_fromsql_post ) { + if (HPMHooks.count.HP_inter_storage_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, p); } @@ -8089,14 +8305,14 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storage *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre > 0) { int (*preHookFunc) (int *guild_id, const struct guild_storage **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8104,9 +8320,9 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storag { retVal___ = HPMHooks.source.inter_storage.guild_storage_tosql(guild_id, p); } - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_post ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_tosql_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, const struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, p); } @@ -8116,14 +8332,14 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storag int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre > 0) { int (*preHookFunc) (int *guild_id, struct guild_storage **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8131,9 +8347,9 @@ int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p { retVal___ = HPMHooks.source.inter_storage.guild_storage_fromsql(guild_id, p); } - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, p); } @@ -8143,14 +8359,14 @@ int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p int HP_inter_storage_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_sql_init_pre ) { + if (HPMHooks.count.HP_inter_storage_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8158,9 +8374,9 @@ int HP_inter_storage_sql_init(void) { { retVal___ = HPMHooks.source.inter_storage.sql_init(); } - if( HPMHooks.count.HP_inter_storage_sql_init_post ) { + if (HPMHooks.count.HP_inter_storage_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8169,14 +8385,14 @@ int HP_inter_storage_sql_init(void) { } void HP_inter_storage_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_storage_sql_final_pre ) { + if (HPMHooks.count.HP_inter_storage_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8184,9 +8400,9 @@ void HP_inter_storage_sql_final(void) { { HPMHooks.source.inter_storage.sql_final(); } - if( HPMHooks.count.HP_inter_storage_sql_final_post ) { + if (HPMHooks.count.HP_inter_storage_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_sql_final_post[hIndex].func; postHookFunc(); } @@ -8196,14 +8412,14 @@ void HP_inter_storage_sql_final(void) { int HP_inter_storage_delete_(int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_delete__pre ) { + if (HPMHooks.count.HP_inter_storage_delete__pre > 0) { int (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_delete__pre[hIndex].func; retVal___ = preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8211,9 +8427,9 @@ int HP_inter_storage_delete_(int account_id) { { retVal___ = HPMHooks.source.inter_storage.delete_(account_id); } - if( HPMHooks.count.HP_inter_storage_delete__post ) { + if (HPMHooks.count.HP_inter_storage_delete__post > 0) { int (*postHookFunc) (int retVal___, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_delete__post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id); } @@ -8223,14 +8439,14 @@ int HP_inter_storage_delete_(int account_id) { int HP_inter_storage_guild_storage_delete(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_pre ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_delete_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8238,9 +8454,9 @@ int HP_inter_storage_guild_storage_delete(int guild_id) { { retVal___ = HPMHooks.source.inter_storage.guild_storage_delete(guild_id); } - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_post ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_delete_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id); } @@ -8250,14 +8466,14 @@ int HP_inter_storage_guild_storage_delete(int guild_id) { int HP_inter_storage_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_storage_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8265,9 +8481,9 @@ int HP_inter_storage_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_storage.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_storage_parse_frommap_post ) { + if (HPMHooks.count.HP_inter_storage_parse_frommap_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -8278,14 +8494,14 @@ int HP_inter_storage_parse_frommap(int fd) { int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { + if (HPMHooks.count.HP_libconfig_read_pre > 0) { int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8293,9 +8509,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -8304,14 +8520,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { + if (HPMHooks.count.HP_libconfig_write_pre > 0) { void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8319,9 +8535,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -8330,14 +8546,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8345,9 +8561,9 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { void (*postHookFunc) (struct config_t *config, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; postHookFunc(config, options); } @@ -8357,14 +8573,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8372,9 +8588,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -8384,14 +8600,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8399,9 +8615,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -8411,14 +8627,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8426,9 +8642,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -8438,14 +8654,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8453,9 +8669,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -8464,14 +8680,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8479,9 +8695,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -8490,14 +8706,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8505,9 +8721,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -8516,14 +8732,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { + if (HPMHooks.count.HP_libconfig_init_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8531,9 +8747,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -8542,14 +8758,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8557,9 +8773,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -8569,14 +8785,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8584,26 +8800,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8611,9 +8827,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8623,14 +8839,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8638,9 +8854,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8650,14 +8866,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8665,9 +8881,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8677,14 +8893,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8692,9 +8908,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8704,14 +8920,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8719,9 +8935,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -8731,14 +8947,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8746,26 +8962,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8773,9 +8989,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8785,14 +9001,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8800,9 +9016,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8812,14 +9028,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8827,9 +9043,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8839,14 +9055,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8854,9 +9070,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8866,14 +9082,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8881,26 +9097,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t **setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8908,9 +9124,9 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -8920,14 +9136,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8935,9 +9151,9 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -8947,14 +9163,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8962,9 +9178,9 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -8974,14 +9190,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8989,9 +9205,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -9001,14 +9217,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9016,9 +9232,9 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, format); } @@ -9028,14 +9244,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9043,9 +9259,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9055,14 +9271,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9070,26 +9286,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9097,9 +9313,9 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -9109,14 +9325,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9124,9 +9340,9 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -9136,14 +9352,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9151,9 +9367,9 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -9163,14 +9379,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9178,9 +9394,9 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -9190,14 +9406,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9205,26 +9421,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9232,9 +9448,9 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -9244,14 +9460,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9259,9 +9475,9 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -9271,14 +9487,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9286,9 +9502,9 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -9298,14 +9514,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9313,9 +9529,9 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -9325,14 +9541,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9340,9 +9556,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9352,14 +9568,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9367,9 +9583,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9379,14 +9595,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9394,9 +9610,9 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -9406,14 +9622,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9421,9 +9637,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -9433,14 +9649,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9448,9 +9664,9 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name, type); } @@ -9460,14 +9676,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9475,9 +9691,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -9487,14 +9703,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9502,9 +9718,9 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, idx); } @@ -9513,14 +9729,14 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9528,9 +9744,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -9540,14 +9756,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9555,9 +9771,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -9567,14 +9783,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9582,26 +9798,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9609,9 +9825,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9621,14 +9837,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9636,9 +9852,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9648,14 +9864,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9663,9 +9879,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9675,14 +9891,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9690,9 +9906,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9702,14 +9918,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9717,9 +9933,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -9728,14 +9944,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9743,9 +9959,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -9754,14 +9970,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9769,9 +9985,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -9780,14 +9996,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9795,9 +10011,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -9807,14 +10023,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9822,9 +10038,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -9834,14 +10050,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9849,9 +10065,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9861,14 +10077,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9876,9 +10092,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9888,14 +10104,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9903,9 +10119,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9915,14 +10131,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9930,9 +10146,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9942,14 +10158,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9957,9 +10173,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9969,14 +10185,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9984,9 +10200,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9996,14 +10212,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10011,9 +10227,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -10023,14 +10239,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10038,9 +10254,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -10050,14 +10266,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10065,9 +10281,9 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } @@ -10077,14 +10293,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10092,9 +10308,9 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, name, out, out_size); } @@ -10104,14 +10320,14 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char /* loginif_interface */ void HP_loginif_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_init_pre ) { + if (HPMHooks.count.HP_loginif_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10119,9 +10335,9 @@ void HP_loginif_init(void) { { HPMHooks.source.loginif.init(); } - if( HPMHooks.count.HP_loginif_init_post ) { + if (HPMHooks.count.HP_loginif_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_init_post[hIndex].func; postHookFunc(); } @@ -10130,14 +10346,14 @@ void HP_loginif_init(void) { } void HP_loginif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_final_pre ) { + if (HPMHooks.count.HP_loginif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10145,9 +10361,9 @@ void HP_loginif_final(void) { { HPMHooks.source.loginif.final(); } - if( HPMHooks.count.HP_loginif_final_post ) { + if (HPMHooks.count.HP_loginif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_final_post[hIndex].func; postHookFunc(); } @@ -10156,14 +10372,14 @@ void HP_loginif_final(void) { } void HP_loginif_reset(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_reset_pre ) { + if (HPMHooks.count.HP_loginif_reset_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_reset_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10171,9 +10387,9 @@ void HP_loginif_reset(void) { { HPMHooks.source.loginif.reset(); } - if( HPMHooks.count.HP_loginif_reset_post ) { + if (HPMHooks.count.HP_loginif_reset_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_reset_post[hIndex].func; postHookFunc(); } @@ -10182,14 +10398,14 @@ void HP_loginif_reset(void) { } void HP_loginif_check_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_check_shutdown_pre ) { + if (HPMHooks.count.HP_loginif_check_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_check_shutdown_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10197,9 +10413,9 @@ void HP_loginif_check_shutdown(void) { { HPMHooks.source.loginif.check_shutdown(); } - if( HPMHooks.count.HP_loginif_check_shutdown_post ) { + if (HPMHooks.count.HP_loginif_check_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_check_shutdown_post[hIndex].func; postHookFunc(); } @@ -10208,14 +10424,14 @@ void HP_loginif_check_shutdown(void) { } void HP_loginif_on_disconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_disconnect_pre ) { + if (HPMHooks.count.HP_loginif_on_disconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_on_disconnect_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10223,9 +10439,9 @@ void HP_loginif_on_disconnect(void) { { HPMHooks.source.loginif.on_disconnect(); } - if( HPMHooks.count.HP_loginif_on_disconnect_post ) { + if (HPMHooks.count.HP_loginif_on_disconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_on_disconnect_post[hIndex].func; postHookFunc(); } @@ -10234,14 +10450,14 @@ void HP_loginif_on_disconnect(void) { } void HP_loginif_on_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_ready_pre ) { + if (HPMHooks.count.HP_loginif_on_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_on_ready_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10249,9 +10465,9 @@ void HP_loginif_on_ready(void) { { HPMHooks.source.loginif.on_ready(); } - if( HPMHooks.count.HP_loginif_on_ready_post ) { + if (HPMHooks.count.HP_loginif_on_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_on_ready_post[hIndex].func; postHookFunc(); } @@ -10260,14 +10476,14 @@ void HP_loginif_on_ready(void) { } void HP_loginif_block_account(int account_id, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_block_account_pre ) { + if (HPMHooks.count.HP_loginif_block_account_pre > 0) { void (*preHookFunc) (int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_block_account_pre[hIndex].func; preHookFunc(&account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10275,9 +10491,9 @@ void HP_loginif_block_account(int account_id, int flag) { { HPMHooks.source.loginif.block_account(account_id, flag); } - if( HPMHooks.count.HP_loginif_block_account_post ) { + if (HPMHooks.count.HP_loginif_block_account_post > 0) { void (*postHookFunc) (int account_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_block_account_post[hIndex].func; postHookFunc(account_id, flag); } @@ -10286,14 +10502,14 @@ void HP_loginif_block_account(int account_id, int flag) { } void HP_loginif_ban_account(int account_id, short year, short month, short day, short hour, short minute, short second) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_ban_account_pre ) { + if (HPMHooks.count.HP_loginif_ban_account_pre > 0) { void (*preHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_ban_account_pre[hIndex].func; preHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10301,9 +10517,9 @@ void HP_loginif_ban_account(int account_id, short year, short month, short day, { HPMHooks.source.loginif.ban_account(account_id, year, month, day, hour, minute, second); } - if( HPMHooks.count.HP_loginif_ban_account_post ) { + if (HPMHooks.count.HP_loginif_ban_account_post > 0) { void (*postHookFunc) (int account_id, short year, short month, short day, short hour, short minute, short second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_ban_account_post[hIndex].func; postHookFunc(account_id, year, month, day, hour, minute, second); } @@ -10312,14 +10528,14 @@ void HP_loginif_ban_account(int account_id, short year, short month, short day, } void HP_loginif_unban_account(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_unban_account_pre ) { + if (HPMHooks.count.HP_loginif_unban_account_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_unban_account_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10327,9 +10543,9 @@ void HP_loginif_unban_account(int account_id) { { HPMHooks.source.loginif.unban_account(account_id); } - if( HPMHooks.count.HP_loginif_unban_account_post ) { + if (HPMHooks.count.HP_loginif_unban_account_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_unban_account_post[hIndex].func; postHookFunc(account_id); } @@ -10338,14 +10554,14 @@ void HP_loginif_unban_account(int account_id) { } void HP_loginif_changesex(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_changesex_pre ) { + if (HPMHooks.count.HP_loginif_changesex_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_changesex_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10353,9 +10569,9 @@ void HP_loginif_changesex(int account_id) { { HPMHooks.source.loginif.changesex(account_id); } - if( HPMHooks.count.HP_loginif_changesex_post ) { + if (HPMHooks.count.HP_loginif_changesex_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_changesex_post[hIndex].func; postHookFunc(account_id); } @@ -10364,14 +10580,14 @@ void HP_loginif_changesex(int account_id) { } void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_auth_pre ) { + if (HPMHooks.count.HP_loginif_auth_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_auth_pre[hIndex].func; preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10379,9 +10595,9 @@ void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { { HPMHooks.source.loginif.auth(fd, sd, ipl); } - if( HPMHooks.count.HP_loginif_auth_post ) { + if (HPMHooks.count.HP_loginif_auth_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_auth_post[hIndex].func; postHookFunc(fd, sd, ipl); } @@ -10390,14 +10606,14 @@ void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { } void HP_loginif_send_users_count(int users) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_send_users_count_pre ) { + if (HPMHooks.count.HP_loginif_send_users_count_pre > 0) { void (*preHookFunc) (int *users); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_send_users_count_pre[hIndex].func; preHookFunc(&users); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10405,9 +10621,9 @@ void HP_loginif_send_users_count(int users) { { HPMHooks.source.loginif.send_users_count(users); } - if( HPMHooks.count.HP_loginif_send_users_count_post ) { + if (HPMHooks.count.HP_loginif_send_users_count_post > 0) { void (*postHookFunc) (int users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_send_users_count_post[hIndex].func; postHookFunc(users); } @@ -10416,14 +10632,14 @@ void HP_loginif_send_users_count(int users) { } void HP_loginif_connect_to_server(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_connect_to_server_pre ) { + if (HPMHooks.count.HP_loginif_connect_to_server_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_connect_to_server_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10431,399 +10647,26 @@ void HP_loginif_connect_to_server(void) { { HPMHooks.source.loginif.connect_to_server(); } - if( HPMHooks.count.HP_loginif_connect_to_server_post ) { + if (HPMHooks.count.HP_loginif_connect_to_server_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_connect_to_server_post[hIndex].func; postHookFunc(); } } return; } -/* malloc_interface */ -void HP_iMalloc_init(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init(); - } - if( HPMHooks.count.HP_iMalloc_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_final(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.final(); - } - if( HPMHooks.count.HP_iMalloc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, num, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void **p, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(&p, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.free(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, line, func); - } - } - return; -} -void HP_iMalloc_memory_check(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.memory_check(); - } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; - postHookFunc(); - } - } - return; -} -bool HP_iMalloc_verify_ptr(void *ptr) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void **ptr); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(&ptr); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); - } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); - } - } - return retVal___; -} -size_t HP_iMalloc_usage(void) { - int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.usage(); - } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; - retVal___ = postHookFunc(retVal___); - } - } - return retVal___; -} -void HP_iMalloc_post_shutdown(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.post_shutdown(); - } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_init_messages(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init_messages(); - } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; - postHookFunc(); - } - } - return; -} /* mapif_interface */ void HP_mapif_ban(int id, unsigned int flag, int status) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_ban_pre ) { + if (HPMHooks.count.HP_mapif_ban_pre > 0) { void (*preHookFunc) (int *id, unsigned int *flag, int *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_ban_pre[hIndex].func; preHookFunc(&id, &flag, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10831,9 +10674,9 @@ void HP_mapif_ban(int id, unsigned int flag, int status) { { HPMHooks.source.mapif.ban(id, flag, status); } - if( HPMHooks.count.HP_mapif_ban_post ) { + if (HPMHooks.count.HP_mapif_ban_post > 0) { void (*postHookFunc) (int id, unsigned int flag, int status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_ban_post[hIndex].func; postHookFunc(id, flag, status); } @@ -10842,14 +10685,14 @@ void HP_mapif_ban(int id, unsigned int flag, int status) { } void HP_mapif_server_init(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_init_pre ) { + if (HPMHooks.count.HP_mapif_server_init_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_init_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10857,9 +10700,9 @@ void HP_mapif_server_init(int id) { { HPMHooks.source.mapif.server_init(id); } - if( HPMHooks.count.HP_mapif_server_init_post ) { + if (HPMHooks.count.HP_mapif_server_init_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_init_post[hIndex].func; postHookFunc(id); } @@ -10868,14 +10711,14 @@ void HP_mapif_server_init(int id) { } void HP_mapif_server_destroy(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_destroy_pre ) { + if (HPMHooks.count.HP_mapif_server_destroy_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_destroy_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10883,9 +10726,9 @@ void HP_mapif_server_destroy(int id) { { HPMHooks.source.mapif.server_destroy(id); } - if( HPMHooks.count.HP_mapif_server_destroy_post ) { + if (HPMHooks.count.HP_mapif_server_destroy_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_destroy_post[hIndex].func; postHookFunc(id); } @@ -10894,14 +10737,14 @@ void HP_mapif_server_destroy(int id) { } void HP_mapif_server_reset(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_reset_pre ) { + if (HPMHooks.count.HP_mapif_server_reset_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_reset_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10909,9 +10752,9 @@ void HP_mapif_server_reset(int id) { { HPMHooks.source.mapif.server_reset(id); } - if( HPMHooks.count.HP_mapif_server_reset_post ) { + if (HPMHooks.count.HP_mapif_server_reset_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_reset_post[hIndex].func; postHookFunc(id); } @@ -10920,14 +10763,14 @@ void HP_mapif_server_reset(int id) { } void HP_mapif_on_disconnect(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_disconnect_pre ) { + if (HPMHooks.count.HP_mapif_on_disconnect_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_on_disconnect_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10935,9 +10778,9 @@ void HP_mapif_on_disconnect(int id) { { HPMHooks.source.mapif.on_disconnect(id); } - if( HPMHooks.count.HP_mapif_on_disconnect_post ) { + if (HPMHooks.count.HP_mapif_on_disconnect_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_on_disconnect_post[hIndex].func; postHookFunc(id); } @@ -10946,14 +10789,14 @@ void HP_mapif_on_disconnect(int id) { } void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, int map_fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_parse_accinfo_pre ) { + if (HPMHooks.count.HP_mapif_on_parse_accinfo_pre > 0) { void (*preHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_pre[hIndex].func; preHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10961,9 +10804,9 @@ void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, { HPMHooks.source.mapif.on_parse_accinfo(account_id, u_fd, u_aid, u_group, map_fd); } - if( HPMHooks.count.HP_mapif_on_parse_accinfo_post ) { + if (HPMHooks.count.HP_mapif_on_parse_accinfo_post > 0) { void (*postHookFunc) (int account_id, int u_fd, int u_aid, int u_group, int map_fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_post[hIndex].func; postHookFunc(account_id, u_fd, u_aid, u_group, map_fd); } @@ -10972,14 +10815,14 @@ void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, } void HP_mapif_char_ban(int char_id, time_t timestamp) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_char_ban_pre ) { + if (HPMHooks.count.HP_mapif_char_ban_pre > 0) { void (*preHookFunc) (int *char_id, time_t *timestamp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_char_ban_pre[hIndex].func; preHookFunc(&char_id, ×tamp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10987,9 +10830,9 @@ void HP_mapif_char_ban(int char_id, time_t timestamp) { { HPMHooks.source.mapif.char_ban(char_id, timestamp); } - if( HPMHooks.count.HP_mapif_char_ban_post ) { + if (HPMHooks.count.HP_mapif_char_ban_post > 0) { void (*postHookFunc) (int char_id, time_t timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_char_ban_post[hIndex].func; postHookFunc(char_id, timestamp); } @@ -10999,14 +10842,14 @@ void HP_mapif_char_ban(int char_id, time_t timestamp) { int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendall_pre ) { + if (HPMHooks.count.HP_mapif_sendall_pre > 0) { int (*preHookFunc) (const unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_sendall_pre[hIndex].func; retVal___ = preHookFunc(&buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11014,9 +10857,9 @@ int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.sendall(buf, len); } - if( HPMHooks.count.HP_mapif_sendall_post ) { + if (HPMHooks.count.HP_mapif_sendall_post > 0) { int (*postHookFunc) (int retVal___, const unsigned char *buf, unsigned int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_sendall_post[hIndex].func; retVal___ = postHookFunc(retVal___, buf, len); } @@ -11026,14 +10869,14 @@ int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendallwos_pre ) { + if (HPMHooks.count.HP_mapif_sendallwos_pre > 0) { int (*preHookFunc) (int *sfd, unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_sendallwos_pre[hIndex].func; retVal___ = preHookFunc(&sfd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11041,9 +10884,9 @@ int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.sendallwos(sfd, buf, len); } - if( HPMHooks.count.HP_mapif_sendallwos_post ) { + if (HPMHooks.count.HP_mapif_sendallwos_post > 0) { int (*postHookFunc) (int retVal___, int sfd, unsigned char *buf, unsigned int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_sendallwos_post[hIndex].func; retVal___ = postHookFunc(retVal___, sfd, buf, len); } @@ -11053,14 +10896,14 @@ int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_send_pre ) { + if (HPMHooks.count.HP_mapif_send_pre > 0) { int (*preHookFunc) (int *fd, unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_send_pre[hIndex].func; retVal___ = preHookFunc(&fd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11068,9 +10911,9 @@ int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.send(fd, buf, len); } - if( HPMHooks.count.HP_mapif_send_post ) { + if (HPMHooks.count.HP_mapif_send_post > 0) { int (*postHookFunc) (int retVal___, int fd, unsigned char *buf, unsigned int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_send_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, buf, len); } @@ -11079,14 +10922,14 @@ int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { } void HP_mapif_send_users_count(int users) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_users_count_pre ) { + if (HPMHooks.count.HP_mapif_send_users_count_pre > 0) { void (*preHookFunc) (int *users); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_send_users_count_pre[hIndex].func; preHookFunc(&users); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11094,9 +10937,9 @@ void HP_mapif_send_users_count(int users) { { HPMHooks.source.mapif.send_users_count(users); } - if( HPMHooks.count.HP_mapif_send_users_count_post ) { + if (HPMHooks.count.HP_mapif_send_users_count_post > 0) { void (*postHookFunc) (int users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_send_users_count_post[hIndex].func; postHookFunc(users); } @@ -11105,14 +10948,14 @@ void HP_mapif_send_users_count(int users) { } void HP_mapif_auction_message(int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_message_pre ) { + if (HPMHooks.count.HP_mapif_auction_message_pre > 0) { void (*preHookFunc) (int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_message_pre[hIndex].func; preHookFunc(&char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11120,9 +10963,9 @@ void HP_mapif_auction_message(int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_message(char_id, result); } - if( HPMHooks.count.HP_mapif_auction_message_post ) { + if (HPMHooks.count.HP_mapif_auction_message_post > 0) { void (*postHookFunc) (int char_id, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_message_post[hIndex].func; postHookFunc(char_id, result); } @@ -11131,14 +10974,14 @@ void HP_mapif_auction_message(int char_id, unsigned char result) { } void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, unsigned char *buf) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_sendlist_pre ) { + if (HPMHooks.count.HP_mapif_auction_sendlist_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char **buf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_pre[hIndex].func; preHookFunc(&fd, &char_id, &count, &pages, &buf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11146,9 +10989,9 @@ void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, un { HPMHooks.source.mapif.auction_sendlist(fd, char_id, count, pages, buf); } - if( HPMHooks.count.HP_mapif_auction_sendlist_post ) { + if (HPMHooks.count.HP_mapif_auction_sendlist_post > 0) { void (*postHookFunc) (int fd, int char_id, short count, short pages, unsigned char *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_post[hIndex].func; postHookFunc(fd, char_id, count, pages, buf); } @@ -11157,14 +11000,14 @@ void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, un } void HP_mapif_parse_auction_requestlist(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_requestlist_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11172,9 +11015,9 @@ void HP_mapif_parse_auction_requestlist(int fd) { { HPMHooks.source.mapif.parse_auction_requestlist(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_post ) { + if (HPMHooks.count.HP_mapif_parse_auction_requestlist_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_post[hIndex].func; postHookFunc(fd); } @@ -11183,14 +11026,14 @@ void HP_mapif_parse_auction_requestlist(int fd) { } void HP_mapif_auction_register(int fd, struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_register_pre ) { + if (HPMHooks.count.HP_mapif_auction_register_pre > 0) { void (*preHookFunc) (int *fd, struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_register_pre[hIndex].func; preHookFunc(&fd, &auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11198,9 +11041,9 @@ void HP_mapif_auction_register(int fd, struct auction_data *auction) { { HPMHooks.source.mapif.auction_register(fd, auction); } - if( HPMHooks.count.HP_mapif_auction_register_post ) { + if (HPMHooks.count.HP_mapif_auction_register_post > 0) { void (*postHookFunc) (int fd, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_register_post[hIndex].func; postHookFunc(fd, auction); } @@ -11209,14 +11052,14 @@ void HP_mapif_auction_register(int fd, struct auction_data *auction) { } void HP_mapif_parse_auction_register(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_register_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_register_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11224,9 +11067,9 @@ void HP_mapif_parse_auction_register(int fd) { { HPMHooks.source.mapif.parse_auction_register(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_register_post ) { + if (HPMHooks.count.HP_mapif_parse_auction_register_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_post[hIndex].func; postHookFunc(fd); } @@ -11235,14 +11078,14 @@ void HP_mapif_parse_auction_register(int fd) { } void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_cancel_pre ) { + if (HPMHooks.count.HP_mapif_auction_cancel_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_cancel_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11250,9 +11093,9 @@ void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_cancel(fd, char_id, result); } - if( HPMHooks.count.HP_mapif_auction_cancel_post ) { + if (HPMHooks.count.HP_mapif_auction_cancel_post > 0) { void (*postHookFunc) (int fd, int char_id, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_cancel_post[hIndex].func; postHookFunc(fd, char_id, result); } @@ -11261,14 +11104,14 @@ void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { } void HP_mapif_parse_auction_cancel(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_cancel_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_cancel_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11276,9 +11119,9 @@ void HP_mapif_parse_auction_cancel(int fd) { { HPMHooks.source.mapif.parse_auction_cancel(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_cancel_post ) { + if (HPMHooks.count.HP_mapif_parse_auction_cancel_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_post[hIndex].func; postHookFunc(fd); } @@ -11287,14 +11130,14 @@ void HP_mapif_parse_auction_cancel(int fd) { } void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_close_pre ) { + if (HPMHooks.count.HP_mapif_auction_close_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_close_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11302,9 +11145,9 @@ void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_close(fd, char_id, result); } - if( HPMHooks.count.HP_mapif_auction_close_post ) { + if (HPMHooks.count.HP_mapif_auction_close_post > 0) { void (*postHookFunc) (int fd, int char_id, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_close_post[hIndex].func; postHookFunc(fd, char_id, result); } @@ -11313,14 +11156,14 @@ void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { } void HP_mapif_parse_auction_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_close_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11328,9 +11171,9 @@ void HP_mapif_parse_auction_close(int fd) { { HPMHooks.source.mapif.parse_auction_close(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_close_post ) { + if (HPMHooks.count.HP_mapif_parse_auction_close_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_post[hIndex].func; postHookFunc(fd); } @@ -11339,14 +11182,14 @@ void HP_mapif_parse_auction_close(int fd) { } void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_bid_pre ) { + if (HPMHooks.count.HP_mapif_auction_bid_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_bid_pre[hIndex].func; preHookFunc(&fd, &char_id, &bid, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11354,9 +11197,9 @@ void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { { HPMHooks.source.mapif.auction_bid(fd, char_id, bid, result); } - if( HPMHooks.count.HP_mapif_auction_bid_post ) { + if (HPMHooks.count.HP_mapif_auction_bid_post > 0) { void (*postHookFunc) (int fd, int char_id, int bid, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_bid_post[hIndex].func; postHookFunc(fd, char_id, bid, result); } @@ -11365,14 +11208,14 @@ void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { } void HP_mapif_parse_auction_bid(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_bid_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_bid_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11380,9 +11223,9 @@ void HP_mapif_parse_auction_bid(int fd) { { HPMHooks.source.mapif.parse_auction_bid(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_bid_post ) { + if (HPMHooks.count.HP_mapif_parse_auction_bid_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_post[hIndex].func; postHookFunc(fd); } @@ -11392,14 +11235,14 @@ void HP_mapif_parse_auction_bid(int fd) { bool HP_mapif_elemental_create(struct s_elemental *ele) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_create_pre ) { + if (HPMHooks.count.HP_mapif_elemental_create_pre > 0) { bool (*preHookFunc) (struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_create_pre[hIndex].func; retVal___ = preHookFunc(&ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11407,9 +11250,9 @@ bool HP_mapif_elemental_create(struct s_elemental *ele) { { retVal___ = HPMHooks.source.mapif.elemental_create(ele); } - if( HPMHooks.count.HP_mapif_elemental_create_post ) { + if (HPMHooks.count.HP_mapif_elemental_create_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, ele); } @@ -11419,14 +11262,14 @@ bool HP_mapif_elemental_create(struct s_elemental *ele) { bool HP_mapif_elemental_save(const struct s_elemental *ele) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_save_pre ) { + if (HPMHooks.count.HP_mapif_elemental_save_pre > 0) { bool (*preHookFunc) (const struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_save_pre[hIndex].func; retVal___ = preHookFunc(&ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11434,9 +11277,9 @@ bool HP_mapif_elemental_save(const struct s_elemental *ele) { { retVal___ = HPMHooks.source.mapif.elemental_save(ele); } - if( HPMHooks.count.HP_mapif_elemental_save_post ) { + if (HPMHooks.count.HP_mapif_elemental_save_post > 0) { bool (*postHookFunc) (bool retVal___, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, ele); } @@ -11446,14 +11289,14 @@ bool HP_mapif_elemental_save(const struct s_elemental *ele) { bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_load_pre ) { + if (HPMHooks.count.HP_mapif_elemental_load_pre > 0) { bool (*preHookFunc) (int *ele_id, int *char_id, struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_load_pre[hIndex].func; retVal___ = preHookFunc(&ele_id, &char_id, &ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11461,9 +11304,9 @@ bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { { retVal___ = HPMHooks.source.mapif.elemental_load(ele_id, char_id, ele); } - if( HPMHooks.count.HP_mapif_elemental_load_post ) { + if (HPMHooks.count.HP_mapif_elemental_load_post > 0) { bool (*postHookFunc) (bool retVal___, int ele_id, int char_id, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_load_post[hIndex].func; retVal___ = postHookFunc(retVal___, ele_id, char_id, ele); } @@ -11473,14 +11316,14 @@ bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { bool HP_mapif_elemental_delete(int ele_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_delete_pre ) { + if (HPMHooks.count.HP_mapif_elemental_delete_pre > 0) { bool (*preHookFunc) (int *ele_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_delete_pre[hIndex].func; retVal___ = preHookFunc(&ele_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11488,9 +11331,9 @@ bool HP_mapif_elemental_delete(int ele_id) { { retVal___ = HPMHooks.source.mapif.elemental_delete(ele_id); } - if( HPMHooks.count.HP_mapif_elemental_delete_post ) { + if (HPMHooks.count.HP_mapif_elemental_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, ele_id); } @@ -11499,14 +11342,14 @@ bool HP_mapif_elemental_delete(int ele_id) { } void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_send_pre ) { + if (HPMHooks.count.HP_mapif_elemental_send_pre > 0) { void (*preHookFunc) (int *fd, struct s_elemental **ele, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_send_pre[hIndex].func; preHookFunc(&fd, &ele, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11514,9 +11357,9 @@ void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag { HPMHooks.source.mapif.elemental_send(fd, ele, flag); } - if( HPMHooks.count.HP_mapif_elemental_send_post ) { + if (HPMHooks.count.HP_mapif_elemental_send_post > 0) { void (*postHookFunc) (int fd, struct s_elemental *ele, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_send_post[hIndex].func; postHookFunc(fd, ele, flag); } @@ -11525,14 +11368,14 @@ void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag } void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_create_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_create_pre > 0) { void (*preHookFunc) (int *fd, const struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_pre[hIndex].func; preHookFunc(&fd, &ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11540,9 +11383,9 @@ void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) { { HPMHooks.source.mapif.parse_elemental_create(fd, ele); } - if( HPMHooks.count.HP_mapif_parse_elemental_create_post ) { + if (HPMHooks.count.HP_mapif_parse_elemental_create_post > 0) { void (*postHookFunc) (int fd, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_post[hIndex].func; postHookFunc(fd, ele); } @@ -11551,14 +11394,14 @@ void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) { } void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_load_pre > 0) { void (*preHookFunc) (int *fd, int *ele_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_pre[hIndex].func; preHookFunc(&fd, &ele_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11566,9 +11409,9 @@ void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { { HPMHooks.source.mapif.parse_elemental_load(fd, ele_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_elemental_load_post ) { + if (HPMHooks.count.HP_mapif_parse_elemental_load_post > 0) { void (*postHookFunc) (int fd, int ele_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_post[hIndex].func; postHookFunc(fd, ele_id, char_id); } @@ -11577,14 +11420,14 @@ void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { } void HP_mapif_elemental_deleted(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_deleted_pre ) { + if (HPMHooks.count.HP_mapif_elemental_deleted_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11592,9 +11435,9 @@ void HP_mapif_elemental_deleted(int fd, unsigned char flag) { { HPMHooks.source.mapif.elemental_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_elemental_deleted_post ) { + if (HPMHooks.count.HP_mapif_elemental_deleted_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_post[hIndex].func; postHookFunc(fd, flag); } @@ -11603,14 +11446,14 @@ void HP_mapif_elemental_deleted(int fd, unsigned char flag) { } void HP_mapif_parse_elemental_delete(int fd, int ele_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_delete_pre > 0) { void (*preHookFunc) (int *fd, int *ele_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_pre[hIndex].func; preHookFunc(&fd, &ele_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11618,9 +11461,9 @@ void HP_mapif_parse_elemental_delete(int fd, int ele_id) { { HPMHooks.source.mapif.parse_elemental_delete(fd, ele_id); } - if( HPMHooks.count.HP_mapif_parse_elemental_delete_post ) { + if (HPMHooks.count.HP_mapif_parse_elemental_delete_post > 0) { void (*postHookFunc) (int fd, int ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_post[hIndex].func; postHookFunc(fd, ele_id); } @@ -11629,14 +11472,14 @@ void HP_mapif_parse_elemental_delete(int fd, int ele_id) { } void HP_mapif_elemental_saved(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_saved_pre ) { + if (HPMHooks.count.HP_mapif_elemental_saved_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_saved_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11644,9 +11487,9 @@ void HP_mapif_elemental_saved(int fd, unsigned char flag) { { HPMHooks.source.mapif.elemental_saved(fd, flag); } - if( HPMHooks.count.HP_mapif_elemental_saved_post ) { + if (HPMHooks.count.HP_mapif_elemental_saved_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_saved_post[hIndex].func; postHookFunc(fd, flag); } @@ -11655,14 +11498,14 @@ void HP_mapif_elemental_saved(int fd, unsigned char flag) { } void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_save_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_save_pre > 0) { void (*preHookFunc) (int *fd, const struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_pre[hIndex].func; preHookFunc(&fd, &ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11670,9 +11513,9 @@ void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { { HPMHooks.source.mapif.parse_elemental_save(fd, ele); } - if( HPMHooks.count.HP_mapif_parse_elemental_save_post ) { + if (HPMHooks.count.HP_mapif_parse_elemental_save_post > 0) { void (*postHookFunc) (int fd, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_post[hIndex].func; postHookFunc(fd, ele); } @@ -11682,14 +11525,14 @@ void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_created_pre ) { + if (HPMHooks.count.HP_mapif_guild_created_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_created_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11697,9 +11540,9 @@ int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_created(fd, account_id, g); } - if( HPMHooks.count.HP_mapif_guild_created_post ) { + if (HPMHooks.count.HP_mapif_guild_created_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_created_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, g); } @@ -11709,14 +11552,14 @@ int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { int HP_mapif_guild_noinfo(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_guild_noinfo_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11724,9 +11567,9 @@ int HP_mapif_guild_noinfo(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.guild_noinfo(fd, guild_id); } - if( HPMHooks.count.HP_mapif_guild_noinfo_post ) { + if (HPMHooks.count.HP_mapif_guild_noinfo_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id); } @@ -11736,14 +11579,14 @@ int HP_mapif_guild_noinfo(int fd, int guild_id) { int HP_mapif_guild_info(int fd, struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_info_pre ) { + if (HPMHooks.count.HP_mapif_guild_info_pre > 0) { int (*preHookFunc) (int *fd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_info_pre[hIndex].func; retVal___ = preHookFunc(&fd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11751,9 +11594,9 @@ int HP_mapif_guild_info(int fd, struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_info(fd, g); } - if( HPMHooks.count.HP_mapif_guild_info_post ) { + if (HPMHooks.count.HP_mapif_guild_info_post > 0) { int (*postHookFunc) (int retVal___, int fd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_info_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, g); } @@ -11763,14 +11606,14 @@ int HP_mapif_guild_info(int fd, struct guild *g) { int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberadded_pre ) { + if (HPMHooks.count.HP_mapif_guild_memberadded_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11778,9 +11621,9 @@ int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id { retVal___ = HPMHooks.source.mapif.guild_memberadded(fd, guild_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_mapif_guild_memberadded_post ) { + if (HPMHooks.count.HP_mapif_guild_memberadded_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, flag); } @@ -11790,14 +11633,14 @@ int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_withdraw_pre ) { + if (HPMHooks.count.HP_mapif_guild_withdraw_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, &name, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11805,9 +11648,9 @@ int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, { retVal___ = HPMHooks.source.mapif.guild_withdraw(guild_id, account_id, char_id, flag, name, mes); } - if( HPMHooks.count.HP_mapif_guild_withdraw_post ) { + if (HPMHooks.count.HP_mapif_guild_withdraw_post > 0) { 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_mapif_guild_withdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, flag, name, mes); } @@ -11817,14 +11660,14 @@ int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_pre ) { + if (HPMHooks.count.HP_mapif_guild_memberinfoshort_pre > 0) { int (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_pre[hIndex].func; retVal___ = preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11832,9 +11675,9 @@ int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { { retVal___ = HPMHooks.source.mapif.guild_memberinfoshort(g, idx); } - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_post ) { + if (HPMHooks.count.HP_mapif_guild_memberinfoshort_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, idx); } @@ -11844,14 +11687,14 @@ int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { int HP_mapif_guild_broken(int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_broken_pre ) { + if (HPMHooks.count.HP_mapif_guild_broken_pre > 0) { int (*preHookFunc) (int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_broken_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11859,9 +11702,9 @@ int HP_mapif_guild_broken(int guild_id, int flag) { { retVal___ = HPMHooks.source.mapif.guild_broken(guild_id, flag); } - if( HPMHooks.count.HP_mapif_guild_broken_post ) { + if (HPMHooks.count.HP_mapif_guild_broken_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_broken_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, flag); } @@ -11871,14 +11714,14 @@ int HP_mapif_guild_broken(int guild_id, int flag) { int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_message_pre ) { + if (HPMHooks.count.HP_mapif_guild_message_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len, int *sfd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &mes, &len, &sfd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11886,9 +11729,9 @@ int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int le { retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd); } - if( HPMHooks.count.HP_mapif_guild_message_post ) { + if (HPMHooks.count.HP_mapif_guild_message_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int account_id, const char *mes, int len, int sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, mes, len, sfd); } @@ -11898,14 +11741,14 @@ int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int le int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_pre ) { + if (HPMHooks.count.HP_mapif_guild_basicinfochanged_pre > 0) { int (*preHookFunc) (int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11913,9 +11756,9 @@ int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, in { retVal___ = HPMHooks.source.mapif.guild_basicinfochanged(guild_id, type, data, len); } - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_post ) { + if (HPMHooks.count.HP_mapif_guild_basicinfochanged_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int type, const void *data, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, type, data, len); } @@ -11925,14 +11768,14 @@ int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, in int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_pre ) { + if (HPMHooks.count.HP_mapif_guild_memberinfochanged_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11940,9 +11783,9 @@ int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, { retVal___ = HPMHooks.source.mapif.guild_memberinfochanged(guild_id, account_id, char_id, type, data, len); } - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_post ) { + if (HPMHooks.count.HP_mapif_guild_memberinfochanged_post > 0) { 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_mapif_guild_memberinfochanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, type, data, len); } @@ -11952,14 +11795,14 @@ int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_skillupack_pre ) { + if (HPMHooks.count.HP_mapif_guild_skillupack_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &skill_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11967,9 +11810,9 @@ int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { { retVal___ = HPMHooks.source.mapif.guild_skillupack(guild_id, skill_id, account_id); } - if( HPMHooks.count.HP_mapif_guild_skillupack_post ) { + if (HPMHooks.count.HP_mapif_guild_skillupack_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, uint16 skill_id, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, skill_id, account_id); } @@ -11979,14 +11822,14 @@ int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int HP_mapif_guild_alliance(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___ = 0; - if( HPMHooks.count.HP_mapif_guild_alliance_pre ) { + if (HPMHooks.count.HP_mapif_guild_alliance_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_alliance_pre[hIndex].func; retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, &name1, &name2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11994,9 +11837,9 @@ int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a { retVal___ = HPMHooks.source.mapif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } - if( HPMHooks.count.HP_mapif_guild_alliance_post ) { + if (HPMHooks.count.HP_mapif_guild_alliance_post > 0) { 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_mapif_guild_alliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_alliance_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } @@ -12006,14 +11849,14 @@ int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a int HP_mapif_guild_position(struct guild *g, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_position_pre ) { + if (HPMHooks.count.HP_mapif_guild_position_pre > 0) { int (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_position_pre[hIndex].func; retVal___ = preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12021,9 +11864,9 @@ int HP_mapif_guild_position(struct guild *g, int idx) { { retVal___ = HPMHooks.source.mapif.guild_position(g, idx); } - if( HPMHooks.count.HP_mapif_guild_position_post ) { + if (HPMHooks.count.HP_mapif_guild_position_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_position_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, idx); } @@ -12033,14 +11876,14 @@ int HP_mapif_guild_position(struct guild *g, int idx) { int HP_mapif_guild_notice(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_notice_pre ) { + if (HPMHooks.count.HP_mapif_guild_notice_pre > 0) { int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_notice_pre[hIndex].func; retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12048,9 +11891,9 @@ int HP_mapif_guild_notice(struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_notice(g); } - if( HPMHooks.count.HP_mapif_guild_notice_post ) { + if (HPMHooks.count.HP_mapif_guild_notice_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_notice_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -12060,14 +11903,14 @@ int HP_mapif_guild_notice(struct guild *g) { int HP_mapif_guild_emblem(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_emblem_pre ) { + if (HPMHooks.count.HP_mapif_guild_emblem_pre > 0) { int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_emblem_pre[hIndex].func; retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12075,9 +11918,9 @@ int HP_mapif_guild_emblem(struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_emblem(g); } - if( HPMHooks.count.HP_mapif_guild_emblem_post ) { + if (HPMHooks.count.HP_mapif_guild_emblem_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_emblem_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -12087,14 +11930,14 @@ int HP_mapif_guild_emblem(struct guild *g) { int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_master_changed_pre ) { + if (HPMHooks.count.HP_mapif_guild_master_changed_pre > 0) { int (*preHookFunc) (struct guild **g, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_pre[hIndex].func; retVal___ = preHookFunc(&g, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12102,9 +11945,9 @@ int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { { retVal___ = HPMHooks.source.mapif.guild_master_changed(g, aid, cid); } - if( HPMHooks.count.HP_mapif_guild_master_changed_post ) { + if (HPMHooks.count.HP_mapif_guild_master_changed_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int aid, int cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, aid, cid); } @@ -12114,14 +11957,14 @@ int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_castle_dataload_pre ) { + if (HPMHooks.count.HP_mapif_guild_castle_dataload_pre > 0) { int (*preHookFunc) (int *fd, int *sz, const int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sz, &castle_ids); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12129,9 +11972,9 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { { retVal___ = HPMHooks.source.mapif.guild_castle_dataload(fd, sz, castle_ids); } - if( HPMHooks.count.HP_mapif_guild_castle_dataload_post ) { + if (HPMHooks.count.HP_mapif_guild_castle_dataload_post > 0) { int (*postHookFunc) (int retVal___, int fd, int sz, const int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sz, castle_ids); } @@ -12141,14 +11984,14 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const struct guild_member *master) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateGuild_pre ) { + if (HPMHooks.count.HP_mapif_parse_CreateGuild_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, const char **name, const struct guild_member **master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &name, &master); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12156,9 +11999,9 @@ int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const s { retVal___ = HPMHooks.source.mapif.parse_CreateGuild(fd, account_id, name, master); } - if( HPMHooks.count.HP_mapif_parse_CreateGuild_post ) { + if (HPMHooks.count.HP_mapif_parse_CreateGuild_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, const char *name, const struct guild_member *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, name, master); } @@ -12168,14 +12011,14 @@ int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const s int HP_mapif_parse_GuildInfo(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildInfo_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildInfo_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12183,9 +12026,9 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.parse_GuildInfo(fd, guild_id); } - if( HPMHooks.count.HP_mapif_parse_GuildInfo_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildInfo_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id); } @@ -12195,14 +12038,14 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) { int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_member *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildAddMember_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, const struct guild_member **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12210,9 +12053,9 @@ int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_membe { retVal___ = HPMHooks.source.mapif.parse_GuildAddMember(fd, guild_id, m); } - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildAddMember_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, const struct guild_member *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, m); } @@ -12222,14 +12065,14 @@ int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_membe int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildLeave_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildLeave_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12237,38 +12080,38 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, { retVal___ = HPMHooks.source.mapif.parse_GuildLeave(fd, guild_id, account_id, char_id, flag, mes); } - if( HPMHooks.count.HP_mapif_parse_GuildLeave_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildLeave_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, flag, mes); } } return retVal___; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) { +int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class); } - if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post ) { - int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class_); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -12276,14 +12119,14 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakGuild_pre ) { + if (HPMHooks.count.HP_mapif_parse_BreakGuild_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12291,9 +12134,9 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.parse_BreakGuild(fd, guild_id); } - if( HPMHooks.count.HP_mapif_parse_BreakGuild_post ) { + if (HPMHooks.count.HP_mapif_parse_BreakGuild_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id); } @@ -12303,14 +12146,14 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMessage_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildMessage_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &account_id, &mes, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12318,9 +12161,9 @@ int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char { retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len); } - if( HPMHooks.count.HP_mapif_parse_GuildMessage_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildMessage_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, const char *mes, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, mes, len); } @@ -12330,14 +12173,14 @@ int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12345,9 +12188,9 @@ int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const vo { retVal___ = HPMHooks.source.mapif.parse_GuildBasicInfoChange(fd, guild_id, type, data, len); } - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int type, const void *data, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, type, data, len); } @@ -12357,14 +12200,14 @@ int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const vo int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12372,9 +12215,9 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i { retVal___ = HPMHooks.source.mapif.parse_GuildMemberInfoChange(fd, guild_id, account_id, char_id, type, data, len); } - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, type, data, len); } @@ -12384,14 +12227,14 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildPosition_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildPosition_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *idx, const struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &idx, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12399,9 +12242,9 @@ int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct gui { retVal___ = HPMHooks.source.mapif.parse_GuildPosition(fd, guild_id, idx, p); } - if( HPMHooks.count.HP_mapif_parse_GuildPosition_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildPosition_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, int idx, const struct guild_position *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, idx, p); } @@ -12411,14 +12254,14 @@ int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct gui int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int account_id, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &skill_id, &account_id, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12426,9 +12269,9 @@ int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int accou { retVal___ = HPMHooks.source.mapif.parse_GuildSkillUp(fd, guild_id, skill_id, account_id, max); } - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildSkillUp_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, uint16 skill_id, int account_id, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, skill_id, account_id, max); } @@ -12438,14 +12281,14 @@ int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int accou int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre > 0) { int (*preHookFunc) (struct guild **g, int *guild_id, int *account_id1, int *account_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_pre[hIndex].func; retVal___ = preHookFunc(&g, &guild_id, &account_id1, &account_id2, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12453,9 +12296,9 @@ int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int accoun { retVal___ = HPMHooks.source.mapif.parse_GuildDeleteAlliance(g, guild_id, account_id1, account_id2, flag); } - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int guild_id, int account_id1, int account_id2, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_post[hIndex].func; retVal___ = postHookFunc(retVal___, g, guild_id, account_id1, account_id2, flag); } @@ -12465,14 +12308,14 @@ int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int accoun int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildAlliance_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12480,9 +12323,9 @@ int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int accou { retVal___ = HPMHooks.source.mapif.parse_GuildAlliance(fd, guild_id1, guild_id2, account_id1, account_id2, flag); } - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildAlliance_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id1, guild_id2, account_id1, account_id2, flag); } @@ -12492,14 +12335,14 @@ int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int accou int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildNotice_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildNotice_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &mes1, &mes2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12507,9 +12350,9 @@ int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const cha { retVal___ = HPMHooks.source.mapif.parse_GuildNotice(fd, guild_id, mes1, mes2); } - if( HPMHooks.count.HP_mapif_parse_GuildNotice_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildNotice_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, const char *mes1, const char *mes2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, mes1, mes2); } @@ -12519,14 +12362,14 @@ int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const cha int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildEmblem_pre > 0) { int (*preHookFunc) (int *fd, int *len, int *guild_id, int *dummy, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len, &guild_id, &dummy, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12534,9 +12377,9 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c { retVal___ = HPMHooks.source.mapif.parse_GuildEmblem(fd, len, guild_id, dummy, data); } - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildEmblem_post > 0) { int (*postHookFunc) (int retVal___, int fd, int len, int guild_id, int dummy, const char *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len, guild_id, dummy, data); } @@ -12546,14 +12389,14 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre > 0) { int (*preHookFunc) (int *fd, int *len, const int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len, &castle_ids); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12561,9 +12404,9 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { { retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataLoad(fd, len, castle_ids); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post > 0) { int (*postHookFunc) (int retVal___, int fd, int len, const int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len, castle_ids); } @@ -12573,14 +12416,14 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre > 0) { int (*preHookFunc) (int *fd, int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_pre[hIndex].func; retVal___ = preHookFunc(&fd, &castle_id, &index, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12588,9 +12431,9 @@ int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int val { retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataSave(fd, castle_id, index, value); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post > 0) { int (*postHookFunc) (int retVal___, int fd, int castle_id, int index, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, castle_id, index, value); } @@ -12600,14 +12443,14 @@ int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int val int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, const char **name, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &name, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12615,9 +12458,9 @@ int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int { retVal___ = HPMHooks.source.mapif.parse_GuildMasterChange(fd, guild_id, name, len); } - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_post ) { + if (HPMHooks.count.HP_mapif_parse_GuildMasterChange_post > 0) { int (*postHookFunc) (int retVal___, int fd, int guild_id, const char *name, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, name, len); } @@ -12626,14 +12469,14 @@ int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int } void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homunculus *sh, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_created_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_created_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, const struct s_homunculus **sh, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_created_pre[hIndex].func; preHookFunc(&fd, &account_id, &sh, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12641,9 +12484,9 @@ void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homuncul { HPMHooks.source.mapif.homunculus_created(fd, account_id, sh, flag); } - if( HPMHooks.count.HP_mapif_homunculus_created_post ) { + if (HPMHooks.count.HP_mapif_homunculus_created_post > 0) { void (*postHookFunc) (int fd, int account_id, const struct s_homunculus *sh, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_created_post[hIndex].func; postHookFunc(fd, account_id, sh, flag); } @@ -12652,14 +12495,14 @@ void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homuncul } void HP_mapif_homunculus_deleted(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_deleted_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_deleted_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12667,9 +12510,9 @@ void HP_mapif_homunculus_deleted(int fd, int flag) { { HPMHooks.source.mapif.homunculus_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_homunculus_deleted_post ) { + if (HPMHooks.count.HP_mapif_homunculus_deleted_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_post[hIndex].func; postHookFunc(fd, flag); } @@ -12678,14 +12521,14 @@ void HP_mapif_homunculus_deleted(int fd, int flag) { } void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_loaded_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_loaded_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_pre[hIndex].func; preHookFunc(&fd, &account_id, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12693,9 +12536,9 @@ void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { HPMHooks.source.mapif.homunculus_loaded(fd, account_id, hd); } - if( HPMHooks.count.HP_mapif_homunculus_loaded_post ) { + if (HPMHooks.count.HP_mapif_homunculus_loaded_post > 0) { void (*postHookFunc) (int fd, int account_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_post[hIndex].func; postHookFunc(fd, account_id, hd); } @@ -12704,14 +12547,14 @@ void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) } void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_saved_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_saved_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_pre[hIndex].func; preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12719,9 +12562,9 @@ void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { { HPMHooks.source.mapif.homunculus_saved(fd, account_id, flag); } - if( HPMHooks.count.HP_mapif_homunculus_saved_post ) { + if (HPMHooks.count.HP_mapif_homunculus_saved_post > 0) { void (*postHookFunc) (int fd, int account_id, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_post[hIndex].func; postHookFunc(fd, account_id, flag); } @@ -12730,14 +12573,14 @@ void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { } void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_renamed_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_renamed_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_pre[hIndex].func; preHookFunc(&fd, &account_id, &char_id, &flag, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12745,9 +12588,9 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c { HPMHooks.source.mapif.homunculus_renamed(fd, account_id, char_id, flag, name); } - if( HPMHooks.count.HP_mapif_homunculus_renamed_post ) { + if (HPMHooks.count.HP_mapif_homunculus_renamed_post > 0) { void (*postHookFunc) (int fd, int account_id, int char_id, unsigned char flag, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_post[hIndex].func; postHookFunc(fd, account_id, char_id, flag, name); } @@ -12757,14 +12600,14 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c bool HP_mapif_homunculus_create(struct s_homunculus *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_create_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_create_pre > 0) { bool (*preHookFunc) (struct s_homunculus **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_create_pre[hIndex].func; retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12772,9 +12615,9 @@ bool HP_mapif_homunculus_create(struct s_homunculus *hd) { { retVal___ = HPMHooks.source.mapif.homunculus_create(hd); } - if( HPMHooks.count.HP_mapif_homunculus_create_post ) { + if (HPMHooks.count.HP_mapif_homunculus_create_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -12784,14 +12627,14 @@ bool HP_mapif_homunculus_create(struct s_homunculus *hd) { bool HP_mapif_homunculus_save(const struct s_homunculus *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_save_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_save_pre > 0) { bool (*preHookFunc) (const struct s_homunculus **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_save_pre[hIndex].func; retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12799,9 +12642,9 @@ bool HP_mapif_homunculus_save(const struct s_homunculus *hd) { { retVal___ = HPMHooks.source.mapif.homunculus_save(hd); } - if( HPMHooks.count.HP_mapif_homunculus_save_post ) { + if (HPMHooks.count.HP_mapif_homunculus_save_post > 0) { bool (*postHookFunc) (bool retVal___, const struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -12811,14 +12654,14 @@ bool HP_mapif_homunculus_save(const struct s_homunculus *hd) { bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_load_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_load_pre > 0) { bool (*preHookFunc) (int *homun_id, struct s_homunculus **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_load_pre[hIndex].func; retVal___ = preHookFunc(&homun_id, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12826,9 +12669,9 @@ bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { { retVal___ = HPMHooks.source.mapif.homunculus_load(homun_id, hd); } - if( HPMHooks.count.HP_mapif_homunculus_load_post ) { + if (HPMHooks.count.HP_mapif_homunculus_load_post > 0) { bool (*postHookFunc) (bool retVal___, int homun_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_load_post[hIndex].func; retVal___ = postHookFunc(retVal___, homun_id, hd); } @@ -12838,14 +12681,14 @@ bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { bool HP_mapif_homunculus_delete(int homun_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_delete_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_delete_pre > 0) { bool (*preHookFunc) (int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_pre[hIndex].func; retVal___ = preHookFunc(&homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12853,9 +12696,9 @@ bool HP_mapif_homunculus_delete(int homun_id) { { retVal___ = HPMHooks.source.mapif.homunculus_delete(homun_id); } - if( HPMHooks.count.HP_mapif_homunculus_delete_post ) { + if (HPMHooks.count.HP_mapif_homunculus_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, homun_id); } @@ -12865,14 +12708,14 @@ bool HP_mapif_homunculus_delete(int homun_id) { bool HP_mapif_homunculus_rename(const char *name) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_rename_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_rename_pre > 0) { bool (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_pre[hIndex].func; retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12880,9 +12723,9 @@ bool HP_mapif_homunculus_rename(const char *name) { { retVal___ = HPMHooks.source.mapif.homunculus_rename(name); } - if( HPMHooks.count.HP_mapif_homunculus_rename_post ) { + if (HPMHooks.count.HP_mapif_homunculus_rename_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -12891,14 +12734,14 @@ bool HP_mapif_homunculus_rename(const char *name) { } void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const struct s_homunculus *phd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_create_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_create_pre > 0) { void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_pre[hIndex].func; preHookFunc(&fd, &len, &account_id, &phd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12906,9 +12749,9 @@ void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const str { HPMHooks.source.mapif.parse_homunculus_create(fd, len, account_id, phd); } - if( HPMHooks.count.HP_mapif_parse_homunculus_create_post ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_create_post > 0) { void (*postHookFunc) (int fd, int len, int account_id, const struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_post[hIndex].func; postHookFunc(fd, len, account_id, phd); } @@ -12917,14 +12760,14 @@ void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const str } void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_delete_pre > 0) { void (*preHookFunc) (int *fd, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_pre[hIndex].func; preHookFunc(&fd, &homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12932,9 +12775,9 @@ void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { { HPMHooks.source.mapif.parse_homunculus_delete(fd, homun_id); } - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_post ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_delete_post > 0) { void (*postHookFunc) (int fd, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_post[hIndex].func; postHookFunc(fd, homun_id); } @@ -12943,14 +12786,14 @@ void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { } void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_load_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_pre[hIndex].func; preHookFunc(&fd, &account_id, &homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12958,9 +12801,9 @@ void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { { HPMHooks.source.mapif.parse_homunculus_load(fd, account_id, homun_id); } - if( HPMHooks.count.HP_mapif_parse_homunculus_load_post ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_load_post > 0) { void (*postHookFunc) (int fd, int account_id, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_post[hIndex].func; postHookFunc(fd, account_id, homun_id); } @@ -12969,14 +12812,14 @@ void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { } void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struct s_homunculus *phd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_save_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_save_pre > 0) { void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_pre[hIndex].func; preHookFunc(&fd, &len, &account_id, &phd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12984,9 +12827,9 @@ void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struc { HPMHooks.source.mapif.parse_homunculus_save(fd, len, account_id, phd); } - if( HPMHooks.count.HP_mapif_parse_homunculus_save_post ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_save_post > 0) { void (*postHookFunc) (int fd, int len, int account_id, const struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_post[hIndex].func; postHookFunc(fd, len, account_id, phd); } @@ -12995,14 +12838,14 @@ void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struc } void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_rename_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *char_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_pre[hIndex].func; preHookFunc(&fd, &account_id, &char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13010,9 +12853,9 @@ void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const { HPMHooks.source.mapif.parse_homunculus_rename(fd, account_id, char_id, name); } - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_post ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_rename_post > 0) { void (*postHookFunc) (int fd, int account_id, int char_id, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_post[hIndex].func; postHookFunc(fd, account_id, char_id, name); } @@ -13021,14 +12864,14 @@ void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const } void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mail_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendinbox_pre ) { + if (HPMHooks.count.HP_mapif_mail_sendinbox_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_pre[hIndex].func; preHookFunc(&fd, &char_id, &flag, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13036,9 +12879,9 @@ void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mai { HPMHooks.source.mapif.mail_sendinbox(fd, char_id, flag, md); } - if( HPMHooks.count.HP_mapif_mail_sendinbox_post ) { + if (HPMHooks.count.HP_mapif_mail_sendinbox_post > 0) { void (*postHookFunc) (int fd, int char_id, unsigned char flag, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_post[hIndex].func; postHookFunc(fd, char_id, flag, md); } @@ -13047,14 +12890,14 @@ void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mai } void HP_mapif_parse_mail_requestinbox(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13062,9 +12905,9 @@ void HP_mapif_parse_mail_requestinbox(int fd) { { HPMHooks.source.mapif.parse_mail_requestinbox(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_requestinbox_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_post[hIndex].func; postHookFunc(fd); } @@ -13073,14 +12916,14 @@ void HP_mapif_parse_mail_requestinbox(int fd) { } void HP_mapif_parse_mail_read(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_read_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_read_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13088,9 +12931,9 @@ void HP_mapif_parse_mail_read(int fd) { { HPMHooks.source.mapif.parse_mail_read(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_read_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_read_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_post[hIndex].func; postHookFunc(fd); } @@ -13099,14 +12942,14 @@ void HP_mapif_parse_mail_read(int fd) { } void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendattach_pre ) { + if (HPMHooks.count.HP_mapif_mail_sendattach_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_pre[hIndex].func; preHookFunc(&fd, &char_id, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13114,9 +12957,9 @@ void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { { HPMHooks.source.mapif.mail_sendattach(fd, char_id, msg); } - if( HPMHooks.count.HP_mapif_mail_sendattach_post ) { + if (HPMHooks.count.HP_mapif_mail_sendattach_post > 0) { void (*postHookFunc) (int fd, int char_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_post[hIndex].func; postHookFunc(fd, char_id, msg); } @@ -13125,14 +12968,14 @@ void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { } void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_getattach_pre ) { + if (HPMHooks.count.HP_mapif_mail_getattach_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_getattach_pre[hIndex].func; preHookFunc(&fd, &char_id, &mail_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13140,9 +12983,9 @@ void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { { HPMHooks.source.mapif.mail_getattach(fd, char_id, mail_id); } - if( HPMHooks.count.HP_mapif_mail_getattach_post ) { + if (HPMHooks.count.HP_mapif_mail_getattach_post > 0) { void (*postHookFunc) (int fd, int char_id, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_getattach_post[hIndex].func; postHookFunc(fd, char_id, mail_id); } @@ -13151,14 +12994,14 @@ void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { } void HP_mapif_parse_mail_getattach(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_getattach_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_getattach_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13166,9 +13009,9 @@ void HP_mapif_parse_mail_getattach(int fd) { { HPMHooks.source.mapif.parse_mail_getattach(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_getattach_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_getattach_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_post[hIndex].func; postHookFunc(fd); } @@ -13177,14 +13020,14 @@ void HP_mapif_parse_mail_getattach(int fd) { } void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_delete_pre ) { + if (HPMHooks.count.HP_mapif_mail_delete_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_delete_pre[hIndex].func; preHookFunc(&fd, &char_id, &mail_id, &failed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13192,9 +13035,9 @@ void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { { HPMHooks.source.mapif.mail_delete(fd, char_id, mail_id, failed); } - if( HPMHooks.count.HP_mapif_mail_delete_post ) { + if (HPMHooks.count.HP_mapif_mail_delete_post > 0) { void (*postHookFunc) (int fd, int char_id, int mail_id, bool failed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_delete_post[hIndex].func; postHookFunc(fd, char_id, mail_id, failed); } @@ -13203,14 +13046,14 @@ void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { } void HP_mapif_parse_mail_delete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_delete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13218,9 +13061,9 @@ void HP_mapif_parse_mail_delete(int fd) { { HPMHooks.source.mapif.parse_mail_delete(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_delete_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_delete_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_post[hIndex].func; postHookFunc(fd); } @@ -13229,14 +13072,14 @@ void HP_mapif_parse_mail_delete(int fd) { } void HP_mapif_mail_new(struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_new_pre ) { + if (HPMHooks.count.HP_mapif_mail_new_pre > 0) { void (*preHookFunc) (struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_new_pre[hIndex].func; preHookFunc(&msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13244,9 +13087,9 @@ void HP_mapif_mail_new(struct mail_message *msg) { { HPMHooks.source.mapif.mail_new(msg); } - if( HPMHooks.count.HP_mapif_mail_new_post ) { + if (HPMHooks.count.HP_mapif_mail_new_post > 0) { void (*postHookFunc) (struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_new_post[hIndex].func; postHookFunc(msg); } @@ -13255,14 +13098,14 @@ void HP_mapif_mail_new(struct mail_message *msg) { } void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_return_pre ) { + if (HPMHooks.count.HP_mapif_mail_return_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_return_pre[hIndex].func; preHookFunc(&fd, &char_id, &mail_id, &new_mail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13270,9 +13113,9 @@ void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { { HPMHooks.source.mapif.mail_return(fd, char_id, mail_id, new_mail); } - if( HPMHooks.count.HP_mapif_mail_return_post ) { + if (HPMHooks.count.HP_mapif_mail_return_post > 0) { void (*postHookFunc) (int fd, int char_id, int mail_id, int new_mail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_return_post[hIndex].func; postHookFunc(fd, char_id, mail_id, new_mail); } @@ -13281,14 +13124,14 @@ void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { } void HP_mapif_parse_mail_return(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_return_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_return_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13296,9 +13139,9 @@ void HP_mapif_parse_mail_return(int fd) { { HPMHooks.source.mapif.parse_mail_return(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_return_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_return_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_post[hIndex].func; postHookFunc(fd); } @@ -13307,14 +13150,14 @@ void HP_mapif_parse_mail_return(int fd) { } void HP_mapif_mail_send(int fd, struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_send_pre ) { + if (HPMHooks.count.HP_mapif_mail_send_pre > 0) { void (*preHookFunc) (int *fd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_send_pre[hIndex].func; preHookFunc(&fd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13322,9 +13165,9 @@ void HP_mapif_mail_send(int fd, struct mail_message *msg) { { HPMHooks.source.mapif.mail_send(fd, msg); } - if( HPMHooks.count.HP_mapif_mail_send_post ) { + if (HPMHooks.count.HP_mapif_mail_send_post > 0) { void (*postHookFunc) (int fd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_send_post[hIndex].func; postHookFunc(fd, msg); } @@ -13333,14 +13176,14 @@ void HP_mapif_mail_send(int fd, struct mail_message *msg) { } void HP_mapif_parse_mail_send(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_send_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_send_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13348,9 +13191,9 @@ void HP_mapif_parse_mail_send(int fd) { { HPMHooks.source.mapif.parse_mail_send(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_send_post ) { + if (HPMHooks.count.HP_mapif_parse_mail_send_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_post[hIndex].func; postHookFunc(fd); } @@ -13360,14 +13203,14 @@ void HP_mapif_parse_mail_send(int fd) { bool HP_mapif_mercenary_create(struct s_mercenary *merc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_create_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_create_pre > 0) { bool (*preHookFunc) (struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_create_pre[hIndex].func; retVal___ = preHookFunc(&merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13375,9 +13218,9 @@ bool HP_mapif_mercenary_create(struct s_mercenary *merc) { { retVal___ = HPMHooks.source.mapif.mercenary_create(merc); } - if( HPMHooks.count.HP_mapif_mercenary_create_post ) { + if (HPMHooks.count.HP_mapif_mercenary_create_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, merc); } @@ -13387,14 +13230,14 @@ bool HP_mapif_mercenary_create(struct s_mercenary *merc) { bool HP_mapif_mercenary_save(const struct s_mercenary *merc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_save_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_save_pre > 0) { bool (*preHookFunc) (const struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_save_pre[hIndex].func; retVal___ = preHookFunc(&merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13402,9 +13245,9 @@ bool HP_mapif_mercenary_save(const struct s_mercenary *merc) { { retVal___ = HPMHooks.source.mapif.mercenary_save(merc); } - if( HPMHooks.count.HP_mapif_mercenary_save_post ) { + if (HPMHooks.count.HP_mapif_mercenary_save_post > 0) { bool (*postHookFunc) (bool retVal___, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, merc); } @@ -13414,14 +13257,14 @@ bool HP_mapif_mercenary_save(const struct s_mercenary *merc) { bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_load_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_load_pre > 0) { bool (*preHookFunc) (int *merc_id, int *char_id, struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_load_pre[hIndex].func; retVal___ = preHookFunc(&merc_id, &char_id, &merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13429,9 +13272,9 @@ bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { retVal___ = HPMHooks.source.mapif.mercenary_load(merc_id, char_id, merc); } - if( HPMHooks.count.HP_mapif_mercenary_load_post ) { + if (HPMHooks.count.HP_mapif_mercenary_load_post > 0) { bool (*postHookFunc) (bool retVal___, int merc_id, int char_id, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_load_post[hIndex].func; retVal___ = postHookFunc(retVal___, merc_id, char_id, merc); } @@ -13441,14 +13284,14 @@ bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) bool HP_mapif_mercenary_delete(int merc_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_delete_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_delete_pre > 0) { bool (*preHookFunc) (int *merc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_pre[hIndex].func; retVal___ = preHookFunc(&merc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13456,9 +13299,9 @@ bool HP_mapif_mercenary_delete(int merc_id) { { retVal___ = HPMHooks.source.mapif.mercenary_delete(merc_id); } - if( HPMHooks.count.HP_mapif_mercenary_delete_post ) { + if (HPMHooks.count.HP_mapif_mercenary_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, merc_id); } @@ -13467,14 +13310,14 @@ bool HP_mapif_mercenary_delete(int merc_id) { } void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_send_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_send_pre > 0) { void (*preHookFunc) (int *fd, struct s_mercenary **merc, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_send_pre[hIndex].func; preHookFunc(&fd, &merc, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13482,9 +13325,9 @@ void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char fla { HPMHooks.source.mapif.mercenary_send(fd, merc, flag); } - if( HPMHooks.count.HP_mapif_mercenary_send_post ) { + if (HPMHooks.count.HP_mapif_mercenary_send_post > 0) { void (*postHookFunc) (int fd, struct s_mercenary *merc, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_send_post[hIndex].func; postHookFunc(fd, merc, flag); } @@ -13493,14 +13336,14 @@ void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char fla } void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_create_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_create_pre > 0) { void (*preHookFunc) (int *fd, const struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_pre[hIndex].func; preHookFunc(&fd, &merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13508,9 +13351,9 @@ void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) { { HPMHooks.source.mapif.parse_mercenary_create(fd, merc); } - if( HPMHooks.count.HP_mapif_parse_mercenary_create_post ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_create_post > 0) { void (*postHookFunc) (int fd, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_post[hIndex].func; postHookFunc(fd, merc); } @@ -13519,14 +13362,14 @@ void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) { } void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_load_pre > 0) { void (*preHookFunc) (int *fd, int *merc_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_pre[hIndex].func; preHookFunc(&fd, &merc_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13534,9 +13377,9 @@ void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { { HPMHooks.source.mapif.parse_mercenary_load(fd, merc_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_mercenary_load_post ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_load_post > 0) { void (*postHookFunc) (int fd, int merc_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_post[hIndex].func; postHookFunc(fd, merc_id, char_id); } @@ -13545,14 +13388,14 @@ void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { } void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_deleted_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_deleted_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13560,9 +13403,9 @@ void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { { HPMHooks.source.mapif.mercenary_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_mercenary_deleted_post ) { + if (HPMHooks.count.HP_mapif_mercenary_deleted_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_post[hIndex].func; postHookFunc(fd, flag); } @@ -13571,14 +13414,14 @@ void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { } void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_delete_pre > 0) { void (*preHookFunc) (int *fd, int *merc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_pre[hIndex].func; preHookFunc(&fd, &merc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13586,9 +13429,9 @@ void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { { HPMHooks.source.mapif.parse_mercenary_delete(fd, merc_id); } - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_post ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_delete_post > 0) { void (*postHookFunc) (int fd, int merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_post[hIndex].func; postHookFunc(fd, merc_id); } @@ -13597,14 +13440,14 @@ void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { } void HP_mapif_mercenary_saved(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_saved_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_saved_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13612,9 +13455,9 @@ void HP_mapif_mercenary_saved(int fd, unsigned char flag) { { HPMHooks.source.mapif.mercenary_saved(fd, flag); } - if( HPMHooks.count.HP_mapif_mercenary_saved_post ) { + if (HPMHooks.count.HP_mapif_mercenary_saved_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_post[hIndex].func; postHookFunc(fd, flag); } @@ -13623,14 +13466,14 @@ void HP_mapif_mercenary_saved(int fd, unsigned char flag) { } void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_save_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_save_pre > 0) { void (*preHookFunc) (int *fd, const struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_pre[hIndex].func; preHookFunc(&fd, &merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13638,9 +13481,9 @@ void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { { HPMHooks.source.mapif.parse_mercenary_save(fd, merc); } - if( HPMHooks.count.HP_mapif_parse_mercenary_save_post ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_save_post > 0) { void (*postHookFunc) (int fd, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_post[hIndex].func; postHookFunc(fd, merc); } @@ -13650,14 +13493,14 @@ void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_created_pre ) { + if (HPMHooks.count.HP_mapif_party_created_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, struct party **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_created_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13665,9 +13508,9 @@ int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { retVal___ = HPMHooks.source.mapif.party_created(fd, account_id, char_id, p); } - if( HPMHooks.count.HP_mapif_party_created_post ) { + if (HPMHooks.count.HP_mapif_party_created_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, struct party *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_created_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, char_id, p); } @@ -13676,14 +13519,14 @@ int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) } void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_party_noinfo_pre > 0) { void (*preHookFunc) (int *fd, int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_noinfo_pre[hIndex].func; preHookFunc(&fd, &party_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13691,9 +13534,9 @@ void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { { HPMHooks.source.mapif.party_noinfo(fd, party_id, char_id); } - if( HPMHooks.count.HP_mapif_party_noinfo_post ) { + if (HPMHooks.count.HP_mapif_party_noinfo_post > 0) { void (*postHookFunc) (int fd, int party_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_noinfo_post[hIndex].func; postHookFunc(fd, party_id, char_id); } @@ -13702,14 +13545,14 @@ void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { } void HP_mapif_party_info(int fd, struct party *p, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_info_pre ) { + if (HPMHooks.count.HP_mapif_party_info_pre > 0) { void (*preHookFunc) (int *fd, struct party **p, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_info_pre[hIndex].func; preHookFunc(&fd, &p, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13717,9 +13560,9 @@ void HP_mapif_party_info(int fd, struct party *p, int char_id) { { HPMHooks.source.mapif.party_info(fd, p, char_id); } - if( HPMHooks.count.HP_mapif_party_info_post ) { + if (HPMHooks.count.HP_mapif_party_info_post > 0) { void (*postHookFunc) (int fd, struct party *p, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_info_post[hIndex].func; postHookFunc(fd, p, char_id); } @@ -13729,14 +13572,14 @@ void HP_mapif_party_info(int fd, struct party *p, int char_id) { int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_memberadded_pre ) { + if (HPMHooks.count.HP_mapif_party_memberadded_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_memberadded_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13744,9 +13587,9 @@ int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id { retVal___ = HPMHooks.source.mapif.party_memberadded(fd, party_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_mapif_party_memberadded_post ) { + if (HPMHooks.count.HP_mapif_party_memberadded_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_memberadded_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id, flag); } @@ -13756,14 +13599,14 @@ int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_optionchanged_pre ) { + if (HPMHooks.count.HP_mapif_party_optionchanged_pre > 0) { int (*preHookFunc) (int *fd, struct party **p, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_pre[hIndex].func; retVal___ = preHookFunc(&fd, &p, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13771,9 +13614,9 @@ int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int fl { retVal___ = HPMHooks.source.mapif.party_optionchanged(fd, p, account_id, flag); } - if( HPMHooks.count.HP_mapif_party_optionchanged_post ) { + if (HPMHooks.count.HP_mapif_party_optionchanged_post > 0) { int (*postHookFunc) (int retVal___, int fd, struct party *p, int account_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, p, account_id, flag); } @@ -13783,14 +13626,14 @@ int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int fl int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_withdraw_pre ) { + if (HPMHooks.count.HP_mapif_party_withdraw_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_withdraw_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13798,9 +13641,9 @@ int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.mapif.party_withdraw(party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_party_withdraw_post ) { + if (HPMHooks.count.HP_mapif_party_withdraw_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_withdraw_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } @@ -13810,14 +13653,14 @@ int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { int HP_mapif_party_membermoved(struct party *p, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_membermoved_pre ) { + if (HPMHooks.count.HP_mapif_party_membermoved_pre > 0) { int (*preHookFunc) (struct party **p, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_membermoved_pre[hIndex].func; retVal___ = preHookFunc(&p, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13825,9 +13668,9 @@ int HP_mapif_party_membermoved(struct party *p, int idx) { { retVal___ = HPMHooks.source.mapif.party_membermoved(p, idx); } - if( HPMHooks.count.HP_mapif_party_membermoved_post ) { + if (HPMHooks.count.HP_mapif_party_membermoved_post > 0) { int (*postHookFunc) (int retVal___, struct party *p, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_membermoved_post[hIndex].func; retVal___ = postHookFunc(retVal___, p, idx); } @@ -13837,14 +13680,14 @@ int HP_mapif_party_membermoved(struct party *p, int idx) { int HP_mapif_party_broken(int party_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_broken_pre ) { + if (HPMHooks.count.HP_mapif_party_broken_pre > 0) { int (*preHookFunc) (int *party_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_broken_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13852,9 +13695,9 @@ int HP_mapif_party_broken(int party_id, int flag) { { retVal___ = HPMHooks.source.mapif.party_broken(party_id, flag); } - if( HPMHooks.count.HP_mapif_party_broken_post ) { + if (HPMHooks.count.HP_mapif_party_broken_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_broken_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id, flag); } @@ -13864,14 +13707,14 @@ int HP_mapif_party_broken(int party_id, int flag) { int HP_mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_message_pre ) { + if (HPMHooks.count.HP_mapif_party_message_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len, int *sfd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &account_id, &mes, &len, &sfd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13879,9 +13722,9 @@ int HP_mapif_party_message(int party_id, int account_id, const char *mes, int le { retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd); } - if( HPMHooks.count.HP_mapif_party_message_post ) { + if (HPMHooks.count.HP_mapif_party_message_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int account_id, const char *mes, int len, int sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id, account_id, mes, len, sfd); } @@ -13891,14 +13734,14 @@ int HP_mapif_party_message(int party_id, int account_id, const char *mes, int le int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateParty_pre ) { + if (HPMHooks.count.HP_mapif_parse_CreateParty_pre > 0) { int (*preHookFunc) (int *fd, const char **name, int *item, int *item2, const struct party_member **leader); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_pre[hIndex].func; retVal___ = preHookFunc(&fd, &name, &item, &item2, &leader); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13906,9 +13749,9 @@ int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, co { retVal___ = HPMHooks.source.mapif.parse_CreateParty(fd, name, item, item2, leader); } - if( HPMHooks.count.HP_mapif_parse_CreateParty_post ) { + if (HPMHooks.count.HP_mapif_parse_CreateParty_post > 0) { int (*postHookFunc) (int retVal___, int fd, const char *name, int item, int item2, const struct party_member *leader); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, name, item, item2, leader); } @@ -13917,14 +13760,14 @@ int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, co } void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_PartyInfo_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyInfo_pre > 0) { void (*preHookFunc) (int *fd, int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_pre[hIndex].func; preHookFunc(&fd, &party_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13932,9 +13775,9 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { { HPMHooks.source.mapif.parse_PartyInfo(fd, party_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyInfo_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyInfo_post > 0) { void (*postHookFunc) (int fd, int party_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_post[hIndex].func; postHookFunc(fd, party_id, char_id); } @@ -13944,14 +13787,14 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_member *member) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyAddMember_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, const struct party_member **member); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &member); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13959,9 +13802,9 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_membe { retVal___ = HPMHooks.source.mapif.parse_PartyAddMember(fd, party_id, member); } - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyAddMember_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, const struct party_member *member); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, member); } @@ -13971,14 +13814,14 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_membe int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &exp, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13986,9 +13829,9 @@ int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int e { retVal___ = HPMHooks.source.mapif.parse_PartyChangeOption(fd, party_id, account_id, exp, item); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeOption_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int exp, int item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, exp, item); } @@ -13998,14 +13841,14 @@ int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int e int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeave_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeave_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14013,9 +13856,9 @@ int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { retVal___ = HPMHooks.source.mapif.parse_PartyLeave(fd, party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyLeave_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeave_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id); } @@ -14025,14 +13868,14 @@ int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &map, &online, &lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14040,9 +13883,9 @@ int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char { retVal___ = HPMHooks.source.mapif.parse_PartyChangeMap(fd, party_id, account_id, char_id, map, online, lv); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeMap_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id, map, online, lv); } @@ -14052,14 +13895,14 @@ int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char int HP_mapif_parse_BreakParty(int fd, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakParty_pre ) { + if (HPMHooks.count.HP_mapif_parse_BreakParty_pre > 0) { int (*preHookFunc) (int *fd, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14067,9 +13910,9 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) { { retVal___ = HPMHooks.source.mapif.parse_BreakParty(fd, party_id); } - if( HPMHooks.count.HP_mapif_parse_BreakParty_post ) { + if (HPMHooks.count.HP_mapif_parse_BreakParty_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id); } @@ -14079,14 +13922,14 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) { int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyMessage_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyMessage_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &mes, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14094,9 +13937,9 @@ int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char { retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len); } - if( HPMHooks.count.HP_mapif_parse_PartyMessage_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyMessage_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, const char *mes, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, mes, len); } @@ -14106,14 +13949,14 @@ int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14121,9 +13964,9 @@ int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int c { retVal___ = HPMHooks.source.mapif.parse_PartyLeaderChange(fd, party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post > 0) { int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id); } @@ -14133,14 +13976,14 @@ int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int c int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_created_pre ) { + if (HPMHooks.count.HP_mapif_pet_created_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_created_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14148,9 +13991,9 @@ int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { { retVal___ = HPMHooks.source.mapif.pet_created(fd, account_id, p); } - if( HPMHooks.count.HP_mapif_pet_created_post ) { + if (HPMHooks.count.HP_mapif_pet_created_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_created_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, p); } @@ -14160,14 +14003,14 @@ int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_info_pre ) { + if (HPMHooks.count.HP_mapif_pet_info_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_info_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14175,9 +14018,9 @@ int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { { retVal___ = HPMHooks.source.mapif.pet_info(fd, account_id, p); } - if( HPMHooks.count.HP_mapif_pet_info_post ) { + if (HPMHooks.count.HP_mapif_pet_info_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_info_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, p); } @@ -14187,14 +14030,14 @@ int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { int HP_mapif_pet_noinfo(int fd, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_pet_noinfo_pre > 0) { int (*preHookFunc) (int *fd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14202,9 +14045,9 @@ int HP_mapif_pet_noinfo(int fd, int account_id) { { retVal___ = HPMHooks.source.mapif.pet_noinfo(fd, account_id); } - if( HPMHooks.count.HP_mapif_pet_noinfo_post ) { + if (HPMHooks.count.HP_mapif_pet_noinfo_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id); } @@ -14214,14 +14057,14 @@ int HP_mapif_pet_noinfo(int fd, int account_id) { int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_ack_pre ) { + if (HPMHooks.count.HP_mapif_save_pet_ack_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14229,9 +14072,9 @@ int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { { retVal___ = HPMHooks.source.mapif.save_pet_ack(fd, account_id, flag); } - if( HPMHooks.count.HP_mapif_save_pet_ack_post ) { + if (HPMHooks.count.HP_mapif_save_pet_ack_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, flag); } @@ -14241,14 +14084,14 @@ int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { int HP_mapif_delete_pet_ack(int fd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_ack_pre ) { + if (HPMHooks.count.HP_mapif_delete_pet_ack_pre > 0) { int (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14256,9 +14099,9 @@ int HP_mapif_delete_pet_ack(int fd, int flag) { { retVal___ = HPMHooks.source.mapif.delete_pet_ack(fd, flag); } - if( HPMHooks.count.HP_mapif_delete_pet_ack_post ) { + if (HPMHooks.count.HP_mapif_delete_pet_ack_post > 0) { int (*postHookFunc) (int retVal___, int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, flag); } @@ -14268,14 +14111,14 @@ int HP_mapif_delete_pet_ack(int fd, int flag) { int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_create_pet_pre ) { + if (HPMHooks.count.HP_mapif_create_pet_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_create_pet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, &pet_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14283,9 +14126,9 @@ int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, sh { retVal___ = HPMHooks.source.mapif.create_pet(fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } - if( HPMHooks.count.HP_mapif_create_pet_post ) { + if (HPMHooks.count.HP_mapif_create_pet_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_create_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } @@ -14295,14 +14138,14 @@ int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, sh int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_pet_pre ) { + if (HPMHooks.count.HP_mapif_load_pet_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_load_pet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14310,9 +14153,9 @@ int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { { retVal___ = HPMHooks.source.mapif.load_pet(fd, account_id, char_id, pet_id); } - if( HPMHooks.count.HP_mapif_load_pet_post ) { + if (HPMHooks.count.HP_mapif_load_pet_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, int pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_load_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, char_id, pet_id); } @@ -14322,14 +14165,14 @@ int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_pre ) { + if (HPMHooks.count.HP_mapif_save_pet_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, const struct s_pet **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_pet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14337,9 +14180,9 @@ int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { { retVal___ = HPMHooks.source.mapif.save_pet(fd, account_id, data); } - if( HPMHooks.count.HP_mapif_save_pet_post ) { + if (HPMHooks.count.HP_mapif_save_pet_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, const struct s_pet *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, data); } @@ -14349,14 +14192,14 @@ int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { int HP_mapif_delete_pet(int fd, int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_pre ) { + if (HPMHooks.count.HP_mapif_delete_pet_pre > 0) { int (*preHookFunc) (int *fd, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_delete_pet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14364,9 +14207,9 @@ int HP_mapif_delete_pet(int fd, int pet_id) { { retVal___ = HPMHooks.source.mapif.delete_pet(fd, pet_id); } - if( HPMHooks.count.HP_mapif_delete_pet_post ) { + if (HPMHooks.count.HP_mapif_delete_pet_post > 0) { int (*postHookFunc) (int retVal___, int fd, int pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_delete_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, pet_id); } @@ -14376,14 +14219,14 @@ int HP_mapif_delete_pet(int fd, int pet_id) { int HP_mapif_parse_CreatePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreatePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_CreatePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14391,9 +14234,9 @@ int HP_mapif_parse_CreatePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_CreatePet(fd); } - if( HPMHooks.count.HP_mapif_parse_CreatePet_post ) { + if (HPMHooks.count.HP_mapif_parse_CreatePet_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14403,14 +14246,14 @@ int HP_mapif_parse_CreatePet(int fd) { int HP_mapif_parse_LoadPet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadPet_pre ) { + if (HPMHooks.count.HP_mapif_parse_LoadPet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14418,9 +14261,9 @@ int HP_mapif_parse_LoadPet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_LoadPet(fd); } - if( HPMHooks.count.HP_mapif_parse_LoadPet_post ) { + if (HPMHooks.count.HP_mapif_parse_LoadPet_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14430,14 +14273,14 @@ int HP_mapif_parse_LoadPet(int fd) { int HP_mapif_parse_SavePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SavePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_SavePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14445,9 +14288,9 @@ int HP_mapif_parse_SavePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_SavePet(fd); } - if( HPMHooks.count.HP_mapif_parse_SavePet_post ) { + if (HPMHooks.count.HP_mapif_parse_SavePet_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14457,14 +14300,14 @@ int HP_mapif_parse_SavePet(int fd) { int HP_mapif_parse_DeletePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_DeletePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_DeletePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14472,9 +14315,9 @@ int HP_mapif_parse_DeletePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_DeletePet(fd); } - if( HPMHooks.count.HP_mapif_parse_DeletePet_post ) { + if (HPMHooks.count.HP_mapif_parse_DeletePet_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14484,14 +14327,14 @@ int HP_mapif_parse_DeletePet(int fd) { struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { int hIndex = 0; struct quest* retVal___ = NULL; - if( HPMHooks.count.HP_mapif_quests_fromsql_pre ) { + if (HPMHooks.count.HP_mapif_quests_fromsql_pre > 0) { struct quest* (*preHookFunc) (int *char_id, int **count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14499,9 +14342,9 @@ struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { { retVal___ = HPMHooks.source.mapif.quests_fromsql(char_id, count); } - if( HPMHooks.count.HP_mapif_quests_fromsql_post ) { + if (HPMHooks.count.HP_mapif_quests_fromsql_post > 0) { struct quest* (*postHookFunc) (struct quest* retVal___, int char_id, int *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, count); } @@ -14511,14 +14354,14 @@ struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { bool HP_mapif_quest_delete(int char_id, int quest_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_delete_pre ) { + if (HPMHooks.count.HP_mapif_quest_delete_pre > 0) { bool (*preHookFunc) (int *char_id, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_quest_delete_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &quest_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14526,9 +14369,9 @@ bool HP_mapif_quest_delete(int char_id, int quest_id) { { retVal___ = HPMHooks.source.mapif.quest_delete(char_id, quest_id); } - if( HPMHooks.count.HP_mapif_quest_delete_post ) { + if (HPMHooks.count.HP_mapif_quest_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, int quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_quest_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, quest_id); } @@ -14538,14 +14381,14 @@ bool HP_mapif_quest_delete(int char_id, int quest_id) { bool HP_mapif_quest_add(int char_id, struct quest qd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_add_pre ) { + if (HPMHooks.count.HP_mapif_quest_add_pre > 0) { bool (*preHookFunc) (int *char_id, struct quest *qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_quest_add_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &qd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14553,9 +14396,9 @@ bool HP_mapif_quest_add(int char_id, struct quest qd) { { retVal___ = HPMHooks.source.mapif.quest_add(char_id, qd); } - if( HPMHooks.count.HP_mapif_quest_add_post ) { + if (HPMHooks.count.HP_mapif_quest_add_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, struct quest qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_quest_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, qd); } @@ -14565,14 +14408,14 @@ bool HP_mapif_quest_add(int char_id, struct quest qd) { bool HP_mapif_quest_update(int char_id, struct quest qd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_update_pre ) { + if (HPMHooks.count.HP_mapif_quest_update_pre > 0) { bool (*preHookFunc) (int *char_id, struct quest *qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_quest_update_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &qd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14580,9 +14423,9 @@ bool HP_mapif_quest_update(int char_id, struct quest qd) { { retVal___ = HPMHooks.source.mapif.quest_update(char_id, qd); } - if( HPMHooks.count.HP_mapif_quest_update_post ) { + if (HPMHooks.count.HP_mapif_quest_update_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, struct quest qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_quest_update_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_id, qd); } @@ -14591,14 +14434,14 @@ bool HP_mapif_quest_update(int char_id, struct quest qd) { } void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_quest_save_ack_pre ) { + if (HPMHooks.count.HP_mapif_quest_save_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, bool *success); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &success); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14606,9 +14449,9 @@ void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { { HPMHooks.source.mapif.quest_save_ack(fd, char_id, success); } - if( HPMHooks.count.HP_mapif_quest_save_ack_post ) { + if (HPMHooks.count.HP_mapif_quest_save_ack_post > 0) { void (*postHookFunc) (int fd, int char_id, bool success); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_post[hIndex].func; postHookFunc(fd, char_id, success); } @@ -14618,14 +14461,14 @@ void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { int HP_mapif_parse_quest_save(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_save_pre ) { + if (HPMHooks.count.HP_mapif_parse_quest_save_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14633,9 +14476,9 @@ int HP_mapif_parse_quest_save(int fd) { { retVal___ = HPMHooks.source.mapif.parse_quest_save(fd); } - if( HPMHooks.count.HP_mapif_parse_quest_save_post ) { + if (HPMHooks.count.HP_mapif_parse_quest_save_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14644,14 +14487,14 @@ int HP_mapif_parse_quest_save(int fd) { } void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_quests_pre ) { + if (HPMHooks.count.HP_mapif_send_quests_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, struct quest **tmp_questlog, int *num_quests); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_send_quests_pre[hIndex].func; preHookFunc(&fd, &char_id, &tmp_questlog, &num_quests); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14659,9 +14502,9 @@ void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int n { HPMHooks.source.mapif.send_quests(fd, char_id, tmp_questlog, num_quests); } - if( HPMHooks.count.HP_mapif_send_quests_post ) { + if (HPMHooks.count.HP_mapif_send_quests_post > 0) { void (*postHookFunc) (int fd, int char_id, struct quest *tmp_questlog, int num_quests); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_send_quests_post[hIndex].func; postHookFunc(fd, char_id, tmp_questlog, num_quests); } @@ -14671,14 +14514,14 @@ void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int n int HP_mapif_parse_quest_load(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_quest_load_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14686,26 +14529,265 @@ int HP_mapif_parse_quest_load(int fd) { { retVal___ = HPMHooks.source.mapif.parse_quest_load(fd); } - if( HPMHooks.count.HP_mapif_parse_quest_load_post ) { + if (HPMHooks.count.HP_mapif_parse_quest_load_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } +int HP_mapif_parse_rodex_requestinbox(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_requestinbox_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_requestinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_requestinbox_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_rodex_requestinbox(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_requestinbox_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_requestinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_requestinbox_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +void HP_mapif_rodex_sendinbox(int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_sendinbox_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int8 *opentype, int8 *flag, int *count, struct rodex_maillist **mails); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_sendinbox_pre[hIndex].func; + preHookFunc(&fd, &char_id, &opentype, &flag, &count, &mails); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_sendinbox(fd, char_id, opentype, flag, count, mails); + } + if (HPMHooks.count.HP_mapif_rodex_sendinbox_post > 0) { + void (*postHookFunc) (int fd, int char_id, int8 opentype, int8 flag, int count, struct rodex_maillist *mails); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_sendinbox_post[hIndex].func; + postHookFunc(fd, char_id, opentype, flag, count, mails); + } + } + return; +} +int HP_mapif_parse_rodex_checkhasnew(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkhasnew_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_rodex_checkhasnew(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkhasnew_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +void HP_mapif_rodex_sendhasnew(int fd, int char_id, bool has_new) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_sendhasnew_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, bool *has_new); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_sendhasnew_pre[hIndex].func; + preHookFunc(&fd, &char_id, &has_new); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_sendhasnew(fd, char_id, has_new); + } + if (HPMHooks.count.HP_mapif_rodex_sendhasnew_post > 0) { + void (*postHookFunc) (int fd, int char_id, bool has_new); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_sendhasnew_post[hIndex].func; + postHookFunc(fd, char_id, has_new); + } + } + return; +} +int HP_mapif_parse_rodex_updatemail(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_updatemail_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_updatemail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_updatemail_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_rodex_updatemail(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_updatemail_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_updatemail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_updatemail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +int HP_mapif_parse_rodex_send(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_send_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_send_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_rodex_send(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_send_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_send_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +void HP_mapif_rodex_send(int fd, int sender_id, int receiver_id, int receiver_accountid, bool result) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_send_pre > 0) { + void (*preHookFunc) (int *fd, int *sender_id, int *receiver_id, int *receiver_accountid, bool *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_send_pre[hIndex].func; + preHookFunc(&fd, &sender_id, &receiver_id, &receiver_accountid, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_send(fd, sender_id, receiver_id, receiver_accountid, result); + } + if (HPMHooks.count.HP_mapif_rodex_send_post > 0) { + void (*postHookFunc) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_send_post[hIndex].func; + postHookFunc(fd, sender_id, receiver_id, receiver_accountid, result); + } + } + return; +} +int HP_mapif_parse_rodex_checkname(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_checkname_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkname_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.parse_rodex_checkname(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_checkname_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) { + void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func; + preHookFunc(&fd, &reqchar_id, &target_char_id, &target_class, &target_level, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); + } + if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) { + void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func; + postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name); + } + } + return; +} int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_guild_storage_pre ) { + if (HPMHooks.count.HP_mapif_load_guild_storage_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *guild_id, char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14713,9 +14795,9 @@ int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { retVal___ = HPMHooks.source.mapif.load_guild_storage(fd, account_id, guild_id, flag); } - if( HPMHooks.count.HP_mapif_load_guild_storage_post ) { + if (HPMHooks.count.HP_mapif_load_guild_storage_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int guild_id, char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, guild_id, flag); } @@ -14725,14 +14807,14 @@ int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_pre ) { + if (HPMHooks.count.HP_mapif_save_guild_storage_ack_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *guild_id, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &guild_id, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14740,9 +14822,9 @@ int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fa { retVal___ = HPMHooks.source.mapif.save_guild_storage_ack(fd, account_id, guild_id, fail); } - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_post ) { + if (HPMHooks.count.HP_mapif_save_guild_storage_ack_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int guild_id, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, guild_id, fail); } @@ -14752,14 +14834,14 @@ int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fa int HP_mapif_parse_LoadGuildStorage(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre ) { + if (HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14767,9 +14849,9 @@ int HP_mapif_parse_LoadGuildStorage(int fd) { { retVal___ = HPMHooks.source.mapif.parse_LoadGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post ) { + if (HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14779,14 +14861,14 @@ int HP_mapif_parse_LoadGuildStorage(int fd) { int HP_mapif_parse_SaveGuildStorage(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre ) { + if (HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14794,26 +14876,133 @@ int HP_mapif_parse_SaveGuildStorage(int fd) { { retVal___ = HPMHooks.source.mapif.parse_SaveGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post ) { + if (HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } +int HP_mapif_account_storage_load(int fd, int account_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_account_storage_load_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_account_storage_load_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.account_storage_load(fd, account_id); + } + if (HPMHooks.count.HP_mapif_account_storage_load_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_account_storage_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, account_id); + } + } + return retVal___; +} +int HP_mapif_pAccountStorageLoad(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_pAccountStorageLoad_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.pAccountStorageLoad(fd); + } + if (HPMHooks.count.HP_mapif_pAccountStorageLoad_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +int HP_mapif_pAccountStorageSave(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_pAccountStorageSave_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapif.pAccountStorageSave(fd); + } + if (HPMHooks.count.HP_mapif_pAccountStorageSave_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, bool save) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, bool *save); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_pre[hIndex].func; + preHookFunc(&fd, &account_id, &save); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.sAccountStorageSaveAck(fd, account_id, save); + } + if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post > 0) { + void (*postHookFunc) (int fd, int account_id, bool save); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_post[hIndex].func; + postHookFunc(fd, account_id, save); + } + } + return; +} int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_itembound_ack_pre ) { + if (HPMHooks.count.HP_mapif_itembound_ack_pre > 0) { int (*preHookFunc) (int *fd, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_itembound_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14821,9 +15010,9 @@ int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { { retVal___ = HPMHooks.source.mapif.itembound_ack(fd, aid, guild_id); } - if( HPMHooks.count.HP_mapif_itembound_ack_post ) { + if (HPMHooks.count.HP_mapif_itembound_ack_post > 0) { int (*postHookFunc) (int retVal___, int fd, int aid, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_itembound_ack_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, aid, guild_id); } @@ -14833,14 +15022,14 @@ int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre ) { + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14848,9 +15037,9 @@ int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { { retVal___ = HPMHooks.source.mapif.parse_ItemBoundRetrieve_sub(fd); } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post ) { + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -14859,14 +15048,14 @@ int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { } void HP_mapif_parse_ItemBoundRetrieve(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre ) { + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14874,9 +15063,9 @@ void HP_mapif_parse_ItemBoundRetrieve(int fd) { { HPMHooks.source.mapif.parse_ItemBoundRetrieve(fd); } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post ) { + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_post[hIndex].func; postHookFunc(fd); } @@ -14885,14 +15074,14 @@ void HP_mapif_parse_ItemBoundRetrieve(int fd) { } void HP_mapif_parse_accinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo_pre ) { + if (HPMHooks.count.HP_mapif_parse_accinfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14900,9 +15089,9 @@ void HP_mapif_parse_accinfo(int fd) { { HPMHooks.source.mapif.parse_accinfo(fd); } - if( HPMHooks.count.HP_mapif_parse_accinfo_post ) { + if (HPMHooks.count.HP_mapif_parse_accinfo_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_post[hIndex].func; postHookFunc(fd); } @@ -14911,14 +15100,14 @@ void HP_mapif_parse_accinfo(int fd) { } void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo2_pre ) { + if (HPMHooks.count.HP_mapif_parse_accinfo2_pre > 0) { void (*preHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char **userid, const char **user_pass, const char **email, const char **last_ip, const char **lastlogin, const char **pin_code, const char **birthdate, int *group_id, int *logincount, int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_pre[hIndex].func; preHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, &userid, &user_pass, &email, &last_ip, &lastlogin, &pin_code, &birthdate, &group_id, &logincount, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14926,9 +15115,9 @@ void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int { HPMHooks.source.mapif.parse_accinfo2(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); } - if( HPMHooks.count.HP_mapif_parse_accinfo2_post ) { + if (HPMHooks.count.HP_mapif_parse_accinfo2_post > 0) { void (*postHookFunc) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_post[hIndex].func; postHookFunc(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); } @@ -14938,14 +15127,14 @@ void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_broadcast_pre ) { + if (HPMHooks.count.HP_mapif_broadcast_pre > 0) { int (*preHookFunc) (const unsigned char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func; retVal___ = preHookFunc(&mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14953,9 +15142,9 @@ int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor { retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); } - if( HPMHooks.count.HP_mapif_broadcast_post ) { + if (HPMHooks.count.HP_mapif_broadcast_post > 0) { int (*postHookFunc) (int retVal___, const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func; retVal___ = postHookFunc(retVal___, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); } @@ -14965,14 +15154,14 @@ int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor int HP_mapif_wis_message(struct WisData *wd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_message_pre ) { + if (HPMHooks.count.HP_mapif_wis_message_pre > 0) { int (*preHookFunc) (struct WisData **wd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func; retVal___ = preHookFunc(&wd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14980,9 +15169,9 @@ int HP_mapif_wis_message(struct WisData *wd) { { retVal___ = HPMHooks.source.mapif.wis_message(wd); } - if( HPMHooks.count.HP_mapif_wis_message_post ) { + if (HPMHooks.count.HP_mapif_wis_message_post > 0) { int (*postHookFunc) (int retVal___, struct WisData *wd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, wd); } @@ -14991,14 +15180,14 @@ int HP_mapif_wis_message(struct WisData *wd) { } void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_wis_response_pre ) { + if (HPMHooks.count.HP_mapif_wis_response_pre > 0) { void (*preHookFunc) (int *fd, const unsigned char **src, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func; preHookFunc(&fd, &src, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15006,9 +15195,9 @@ void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) { { HPMHooks.source.mapif.wis_response(fd, src, flag); } - if( HPMHooks.count.HP_mapif_wis_response_post ) { + if (HPMHooks.count.HP_mapif_wis_response_post > 0) { void (*postHookFunc) (int fd, const unsigned char *src, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func; postHookFunc(fd, src, flag); } @@ -15018,14 +15207,14 @@ void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) { int HP_mapif_wis_end(struct WisData *wd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_end_pre ) { + if (HPMHooks.count.HP_mapif_wis_end_pre > 0) { int (*preHookFunc) (struct WisData **wd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func; retVal___ = preHookFunc(&wd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15033,9 +15222,9 @@ int HP_mapif_wis_end(struct WisData *wd, int flag) { { retVal___ = HPMHooks.source.mapif.wis_end(wd, flag); } - if( HPMHooks.count.HP_mapif_wis_end_post ) { + if (HPMHooks.count.HP_mapif_wis_end_post > 0) { int (*postHookFunc) (int retVal___, struct WisData *wd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func; retVal___ = postHookFunc(retVal___, wd, flag); } @@ -15045,14 +15234,14 @@ int HP_mapif_wis_end(struct WisData *wd, int flag) { int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_account_reg_reply_pre ) { + if (HPMHooks.count.HP_mapif_account_reg_reply_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15060,9 +15249,9 @@ int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { { retVal___ = HPMHooks.source.mapif.account_reg_reply(fd, account_id, char_id, type); } - if( HPMHooks.count.HP_mapif_account_reg_reply_post ) { + if (HPMHooks.count.HP_mapif_account_reg_reply_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, char_id, type); } @@ -15072,14 +15261,14 @@ int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_disconnectplayer_pre ) { + if (HPMHooks.count.HP_mapif_disconnectplayer_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15087,9 +15276,9 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { { retVal___ = HPMHooks.source.mapif.disconnectplayer(fd, account_id, char_id, reason); } - if( HPMHooks.count.HP_mapif_disconnectplayer_post ) { + if (HPMHooks.count.HP_mapif_disconnectplayer_post > 0) { int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, int reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, account_id, char_id, reason); } @@ -15099,14 +15288,14 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { int HP_mapif_parse_broadcast(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_broadcast_pre ) { + if (HPMHooks.count.HP_mapif_parse_broadcast_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15114,9 +15303,9 @@ int HP_mapif_parse_broadcast(int fd) { { retVal___ = HPMHooks.source.mapif.parse_broadcast(fd); } - if( HPMHooks.count.HP_mapif_parse_broadcast_post ) { + if (HPMHooks.count.HP_mapif_parse_broadcast_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15126,14 +15315,14 @@ int HP_mapif_parse_broadcast(int fd) { int HP_mapif_parse_WisRequest(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisRequest_pre ) { + if (HPMHooks.count.HP_mapif_parse_WisRequest_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15141,9 +15330,9 @@ int HP_mapif_parse_WisRequest(int fd) { { retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd); } - if( HPMHooks.count.HP_mapif_parse_WisRequest_post ) { + if (HPMHooks.count.HP_mapif_parse_WisRequest_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15153,14 +15342,14 @@ int HP_mapif_parse_WisRequest(int fd) { int HP_mapif_parse_WisReply(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisReply_pre ) { + if (HPMHooks.count.HP_mapif_parse_WisReply_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15168,9 +15357,9 @@ int HP_mapif_parse_WisReply(int fd) { { retVal___ = HPMHooks.source.mapif.parse_WisReply(fd); } - if( HPMHooks.count.HP_mapif_parse_WisReply_post ) { + if (HPMHooks.count.HP_mapif_parse_WisReply_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15180,14 +15369,14 @@ int HP_mapif_parse_WisReply(int fd) { int HP_mapif_parse_WisToGM(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisToGM_pre ) { + if (HPMHooks.count.HP_mapif_parse_WisToGM_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15195,9 +15384,9 @@ int HP_mapif_parse_WisToGM(int fd) { { retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); } - if( HPMHooks.count.HP_mapif_parse_WisToGM_post ) { + if (HPMHooks.count.HP_mapif_parse_WisToGM_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15207,14 +15396,14 @@ int HP_mapif_parse_WisToGM(int fd) { int HP_mapif_parse_Registry(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_Registry_pre ) { + if (HPMHooks.count.HP_mapif_parse_Registry_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_Registry_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15222,9 +15411,9 @@ int HP_mapif_parse_Registry(int fd) { { retVal___ = HPMHooks.source.mapif.parse_Registry(fd); } - if( HPMHooks.count.HP_mapif_parse_Registry_post ) { + if (HPMHooks.count.HP_mapif_parse_Registry_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_Registry_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15234,14 +15423,14 @@ int HP_mapif_parse_Registry(int fd) { int HP_mapif_parse_RegistryRequest(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_pre ) { + if (HPMHooks.count.HP_mapif_parse_RegistryRequest_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15249,9 +15438,9 @@ int HP_mapif_parse_RegistryRequest(int fd) { { retVal___ = HPMHooks.source.mapif.parse_RegistryRequest(fd); } - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_post ) { + if (HPMHooks.count.HP_mapif_parse_RegistryRequest_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15260,14 +15449,14 @@ int HP_mapif_parse_RegistryRequest(int fd) { } void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_namechange_ack_pre ) { + if (HPMHooks.count.HP_mapif_namechange_ack_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_namechange_ack_pre[hIndex].func; preHookFunc(&fd, &account_id, &char_id, &type, &flag, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15275,9 +15464,9 @@ void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int { HPMHooks.source.mapif.namechange_ack(fd, account_id, char_id, type, flag, name); } - if( HPMHooks.count.HP_mapif_namechange_ack_post ) { + if (HPMHooks.count.HP_mapif_namechange_ack_post > 0) { void (*postHookFunc) (int fd, int account_id, int char_id, int type, int flag, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_namechange_ack_post[hIndex].func; postHookFunc(fd, account_id, char_id, type, flag, name); } @@ -15287,14 +15476,14 @@ void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int int HP_mapif_parse_NameChangeRequest(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre ) { + if (HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15302,9 +15491,9 @@ int HP_mapif_parse_NameChangeRequest(int fd) { { retVal___ = HPMHooks.source.mapif.parse_NameChangeRequest(fd); } - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_post ) { + if (HPMHooks.count.HP_mapif_parse_NameChangeRequest_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -15315,14 +15504,14 @@ int HP_mapif_parse_NameChangeRequest(int fd) { int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_init_pre ) { + if (HPMHooks.count.HP_mapindex_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15330,9 +15519,9 @@ int HP_mapindex_init(void) { { retVal___ = HPMHooks.source.mapindex.init(); } - if( HPMHooks.count.HP_mapindex_init_post ) { + if (HPMHooks.count.HP_mapindex_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -15341,14 +15530,14 @@ int HP_mapindex_init(void) { } void HP_mapindex_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_final_pre ) { + if (HPMHooks.count.HP_mapindex_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15356,9 +15545,9 @@ void HP_mapindex_final(void) { { HPMHooks.source.mapindex.final(); } - if( HPMHooks.count.HP_mapindex_final_post ) { + if (HPMHooks.count.HP_mapindex_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; postHookFunc(); } @@ -15368,14 +15557,14 @@ void HP_mapindex_final(void) { int HP_mapindex_addmap(int index, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_addmap_pre ) { + if (HPMHooks.count.HP_mapindex_addmap_pre > 0) { int (*preHookFunc) (int *index, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; retVal___ = preHookFunc(&index, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15383,9 +15572,9 @@ int HP_mapindex_addmap(int index, const char *name) { { retVal___ = HPMHooks.source.mapindex.addmap(index, name); } - if( HPMHooks.count.HP_mapindex_addmap_post ) { + if (HPMHooks.count.HP_mapindex_addmap_post > 0) { int (*postHookFunc) (int retVal___, int index, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; retVal___ = postHookFunc(retVal___, index, name); } @@ -15394,14 +15583,14 @@ int HP_mapindex_addmap(int index, const char *name) { } void HP_mapindex_removemap(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_removemap_pre ) { + if (HPMHooks.count.HP_mapindex_removemap_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15409,9 +15598,9 @@ void HP_mapindex_removemap(int index) { { HPMHooks.source.mapindex.removemap(index); } - if( HPMHooks.count.HP_mapindex_removemap_post ) { + if (HPMHooks.count.HP_mapindex_removemap_post > 0) { void (*postHookFunc) (int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; postHookFunc(index); } @@ -15421,14 +15610,14 @@ void HP_mapindex_removemap(int index) { const char* HP_mapindex_getmapname(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_pre ) { + if (HPMHooks.count.HP_mapindex_getmapname_pre > 0) { const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15436,9 +15625,9 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -15448,14 +15637,14 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { const char* HP_mapindex_getmapname_ext(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_pre > 0) { const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15463,9 +15652,9 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -15475,14 +15664,14 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { unsigned short HP_mapindex_name2id(const char *p1) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_mapindex_name2id_pre ) { + if (HPMHooks.count.HP_mapindex_name2id_pre > 0) { unsigned short (*preHookFunc) (const char **p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; retVal___ = preHookFunc(&p1); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15490,9 +15679,9 @@ unsigned short HP_mapindex_name2id(const char *p1) { { retVal___ = HPMHooks.source.mapindex.name2id(p1); } - if( HPMHooks.count.HP_mapindex_name2id_post ) { + if (HPMHooks.count.HP_mapindex_name2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, p1); } @@ -15502,14 +15691,14 @@ unsigned short HP_mapindex_name2id(const char *p1) { const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_id2name_pre ) { + if (HPMHooks.count.HP_mapindex_id2name_pre > 0) { const char* (*preHookFunc) (uint16 *id, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; retVal___ = preHookFunc(&id, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15517,9 +15706,9 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha { retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); } - if( HPMHooks.count.HP_mapindex_id2name_post ) { + if (HPMHooks.count.HP_mapindex_id2name_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint16 id, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; retVal___ = postHookFunc(retVal___, id, file, line, func); } @@ -15529,14 +15718,14 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha bool HP_mapindex_check_default(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapindex_check_default_pre ) { + if (HPMHooks.count.HP_mapindex_check_default_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15544,9 +15733,9 @@ bool HP_mapindex_check_default(void) { { retVal___ = HPMHooks.source.mapindex.check_default(); } - if( HPMHooks.count.HP_mapindex_check_default_post ) { + if (HPMHooks.count.HP_mapindex_check_default_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -15556,14 +15745,14 @@ bool HP_mapindex_check_default(void) { /* md5_interface */ void HP_md5_string(const char *string, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_string_pre ) { + if (HPMHooks.count.HP_md5_string_pre > 0) { void (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15571,51 +15760,51 @@ void HP_md5_string(const char *string, char *output) { { HPMHooks.source.md5.string(string, output); } - if( HPMHooks.count.HP_md5_string_post ) { + if (HPMHooks.count.HP_md5_string_post > 0) { void (*postHookFunc) (const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; postHookFunc(string, output); } } return; } -void HP_md5_binary(const char *string, unsigned char *output) { +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_binary_pre ) { - void (*preHookFunc) (const char **string, unsigned char **output); + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; - preHookFunc(&string, &output); + preHookFunc(&buf, &buf_size, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.md5.binary(string, output); + HPMHooks.source.md5.binary(buf, buf_size, output); } - if( HPMHooks.count.HP_md5_binary_post ) { - void (*postHookFunc) (const char *string, unsigned char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++ ) { + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; - postHookFunc(string, output); + postHookFunc(buf, buf_size, output); } } return; } void HP_md5_salt(int len, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_salt_pre ) { + if (HPMHooks.count.HP_md5_salt_pre > 0) { void (*preHookFunc) (int *len, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; preHookFunc(&len, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15623,9 +15812,9 @@ void HP_md5_salt(int len, char *output) { { HPMHooks.source.md5.salt(len, output); } - if( HPMHooks.count.HP_md5_salt_post ) { + if (HPMHooks.count.HP_md5_salt_post > 0) { void (*postHookFunc) (int len, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; postHookFunc(len, output); } @@ -15636,14 +15825,14 @@ void HP_md5_salt(int len, char *output) { struct mutex_data* HP_mutex_create(void) { int hIndex = 0; struct mutex_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_create_pre ) { + if (HPMHooks.count.HP_mutex_create_pre > 0) { struct mutex_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15651,9 +15840,9 @@ struct mutex_data* HP_mutex_create(void) { { retVal___ = HPMHooks.source.mutex.create(); } - if( HPMHooks.count.HP_mutex_create_post ) { + if (HPMHooks.count.HP_mutex_create_post > 0) { struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -15662,14 +15851,14 @@ struct mutex_data* HP_mutex_create(void) { } void HP_mutex_destroy(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_destroy_pre ) { + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15677,9 +15866,9 @@ void HP_mutex_destroy(struct mutex_data *m) { { HPMHooks.source.mutex.destroy(m); } - if( HPMHooks.count.HP_mutex_destroy_post ) { + if (HPMHooks.count.HP_mutex_destroy_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; postHookFunc(m); } @@ -15688,14 +15877,14 @@ void HP_mutex_destroy(struct mutex_data *m) { } void HP_mutex_lock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_lock_pre ) { + if (HPMHooks.count.HP_mutex_lock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15703,9 +15892,9 @@ void HP_mutex_lock(struct mutex_data *m) { { HPMHooks.source.mutex.lock(m); } - if( HPMHooks.count.HP_mutex_lock_post ) { + if (HPMHooks.count.HP_mutex_lock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; postHookFunc(m); } @@ -15715,14 +15904,14 @@ void HP_mutex_lock(struct mutex_data *m) { bool HP_mutex_trylock(struct mutex_data *m) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mutex_trylock_pre ) { + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { bool (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15730,9 +15919,9 @@ bool HP_mutex_trylock(struct mutex_data *m) { { retVal___ = HPMHooks.source.mutex.trylock(m); } - if( HPMHooks.count.HP_mutex_trylock_post ) { + if (HPMHooks.count.HP_mutex_trylock_post > 0) { bool (*postHookFunc) (bool retVal___, struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; retVal___ = postHookFunc(retVal___, m); } @@ -15741,14 +15930,14 @@ bool HP_mutex_trylock(struct mutex_data *m) { } void HP_mutex_unlock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_unlock_pre ) { + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15756,9 +15945,9 @@ void HP_mutex_unlock(struct mutex_data *m) { { HPMHooks.source.mutex.unlock(m); } - if( HPMHooks.count.HP_mutex_unlock_post ) { + if (HPMHooks.count.HP_mutex_unlock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; postHookFunc(m); } @@ -15768,14 +15957,14 @@ void HP_mutex_unlock(struct mutex_data *m) { struct cond_data* HP_mutex_cond_create(void) { int hIndex = 0; struct cond_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_cond_create_pre ) { + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { struct cond_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15783,9 +15972,9 @@ struct cond_data* HP_mutex_cond_create(void) { { retVal___ = HPMHooks.source.mutex.cond_create(); } - if( HPMHooks.count.HP_mutex_cond_create_post ) { + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { struct cond_data* (*postHookFunc) (struct cond_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -15794,14 +15983,14 @@ struct cond_data* HP_mutex_cond_create(void) { } void HP_mutex_cond_destroy(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_destroy_pre ) { + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15809,9 +15998,9 @@ void HP_mutex_cond_destroy(struct cond_data *c) { { HPMHooks.source.mutex.cond_destroy(c); } - if( HPMHooks.count.HP_mutex_cond_destroy_post ) { + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; postHookFunc(c); } @@ -15820,14 +16009,14 @@ void HP_mutex_cond_destroy(struct cond_data *c) { } void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_wait_pre ) { + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; preHookFunc(&c, &m, &timeout_ticks); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15835,9 +16024,9 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou { HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); } - if( HPMHooks.count.HP_mutex_cond_wait_post ) { + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; postHookFunc(c, m, timeout_ticks); } @@ -15846,14 +16035,14 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou } void HP_mutex_cond_signal(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_signal_pre ) { + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15861,9 +16050,9 @@ void HP_mutex_cond_signal(struct cond_data *c) { { HPMHooks.source.mutex.cond_signal(c); } - if( HPMHooks.count.HP_mutex_cond_signal_post ) { + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; postHookFunc(c); } @@ -15872,14 +16061,14 @@ void HP_mutex_cond_signal(struct cond_data *c) { } void HP_mutex_cond_broadcast(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_broadcast_pre ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15887,9 +16076,9 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { { HPMHooks.source.mutex.cond_broadcast(c); } - if( HPMHooks.count.HP_mutex_cond_broadcast_post ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; postHookFunc(c); } @@ -15899,14 +16088,14 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { /* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15914,9 +16103,9 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; postHookFunc(file, line, func, targetname, title); } @@ -15926,14 +16115,14 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const /* pincode_interface */ void HP_pincode_handle(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_handle_pre ) { + if (HPMHooks.count.HP_pincode_handle_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_handle_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15941,9 +16130,9 @@ void HP_pincode_handle(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.handle(fd, sd); } - if( HPMHooks.count.HP_pincode_handle_post ) { + if (HPMHooks.count.HP_pincode_handle_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_handle_post[hIndex].func; postHookFunc(fd, sd); } @@ -15952,14 +16141,14 @@ void HP_pincode_handle(int fd, struct char_session_data *sd) { } void HP_pincode_decrypt(unsigned int userSeed, char *pin) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_decrypt_pre ) { + if (HPMHooks.count.HP_pincode_decrypt_pre > 0) { void (*preHookFunc) (unsigned int *userSeed, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_decrypt_pre[hIndex].func; preHookFunc(&userSeed, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15967,9 +16156,9 @@ void HP_pincode_decrypt(unsigned int userSeed, char *pin) { { HPMHooks.source.pincode.decrypt(userSeed, pin); } - if( HPMHooks.count.HP_pincode_decrypt_post ) { + if (HPMHooks.count.HP_pincode_decrypt_post > 0) { void (*postHookFunc) (unsigned int userSeed, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_decrypt_post[hIndex].func; postHookFunc(userSeed, pin); } @@ -15978,14 +16167,14 @@ void HP_pincode_decrypt(unsigned int userSeed, char *pin) { } void HP_pincode_error(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_error_pre ) { + if (HPMHooks.count.HP_pincode_error_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_error_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15993,9 +16182,9 @@ void HP_pincode_error(int account_id) { { HPMHooks.source.pincode.error(account_id); } - if( HPMHooks.count.HP_pincode_error_post ) { + if (HPMHooks.count.HP_pincode_error_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_error_post[hIndex].func; postHookFunc(account_id); } @@ -16004,14 +16193,14 @@ void HP_pincode_error(int account_id) { } void HP_pincode_update(int account_id, char *pin) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_update_pre ) { + if (HPMHooks.count.HP_pincode_update_pre > 0) { void (*preHookFunc) (int *account_id, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_update_pre[hIndex].func; preHookFunc(&account_id, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16019,9 +16208,9 @@ void HP_pincode_update(int account_id, char *pin) { { HPMHooks.source.pincode.update(account_id, pin); } - if( HPMHooks.count.HP_pincode_update_post ) { + if (HPMHooks.count.HP_pincode_update_post > 0) { void (*postHookFunc) (int account_id, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_update_post[hIndex].func; postHookFunc(account_id, pin); } @@ -16030,14 +16219,14 @@ void HP_pincode_update(int account_id, char *pin) { } void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_sendstate_pre ) { + if (HPMHooks.count.HP_pincode_sendstate_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd, uint16 *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_sendstate_pre[hIndex].func; preHookFunc(&fd, &sd, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16045,9 +16234,9 @@ void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { { HPMHooks.source.pincode.sendstate(fd, sd, state); } - if( HPMHooks.count.HP_pincode_sendstate_post ) { + if (HPMHooks.count.HP_pincode_sendstate_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd, uint16 state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_sendstate_post[hIndex].func; postHookFunc(fd, sd, state); } @@ -16056,14 +16245,14 @@ void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { } void HP_pincode_setnew(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_setnew_pre ) { + if (HPMHooks.count.HP_pincode_setnew_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_setnew_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16071,9 +16260,9 @@ void HP_pincode_setnew(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.setnew(fd, sd); } - if( HPMHooks.count.HP_pincode_setnew_post ) { + if (HPMHooks.count.HP_pincode_setnew_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_setnew_post[hIndex].func; postHookFunc(fd, sd); } @@ -16082,14 +16271,14 @@ void HP_pincode_setnew(int fd, struct char_session_data *sd) { } void HP_pincode_change(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_change_pre ) { + if (HPMHooks.count.HP_pincode_change_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_change_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16097,9 +16286,9 @@ void HP_pincode_change(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.change(fd, sd); } - if( HPMHooks.count.HP_pincode_change_post ) { + if (HPMHooks.count.HP_pincode_change_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_change_post[hIndex].func; postHookFunc(fd, sd); } @@ -16109,14 +16298,14 @@ void HP_pincode_change(int fd, struct char_session_data *sd) { int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pincode_compare_pre ) { + if (HPMHooks.count.HP_pincode_compare_pre > 0) { int (*preHookFunc) (int *fd, struct char_session_data **sd, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_compare_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16124,9 +16313,9 @@ int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { { retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); } - if( HPMHooks.count.HP_pincode_compare_post ) { + if (HPMHooks.count.HP_pincode_compare_post > 0) { int (*postHookFunc) (int retVal___, int fd, struct char_session_data *sd, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_compare_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd, pin); } @@ -16135,14 +16324,14 @@ int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { } void HP_pincode_check(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_check_pre ) { + if (HPMHooks.count.HP_pincode_check_pre > 0) { void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_check_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16150,9 +16339,9 @@ void HP_pincode_check(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.check(fd, sd); } - if( HPMHooks.count.HP_pincode_check_post ) { + if (HPMHooks.count.HP_pincode_check_post > 0) { void (*postHookFunc) (int fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_check_post[hIndex].func; postHookFunc(fd, sd); } @@ -16162,14 +16351,14 @@ void HP_pincode_check(int fd, struct char_session_data *sd) { bool HP_pincode_config_read(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pincode_config_read_pre ) { + if (HPMHooks.count.HP_pincode_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16177,9 +16366,9 @@ bool HP_pincode_config_read(const char *filename, const struct config_t *config, { retVal___ = HPMHooks.source.pincode.config_read(filename, config, imported); } - if( HPMHooks.count.HP_pincode_config_read_post ) { + if (HPMHooks.count.HP_pincode_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -16189,14 +16378,14 @@ bool HP_pincode_config_read(const char *filename, const struct config_t *config, /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_init_pre ) { + if (HPMHooks.count.HP_rnd_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16204,9 +16393,9 @@ void HP_rnd_init(void) { { HPMHooks.source.rnd.init(); } - if( HPMHooks.count.HP_rnd_init_post ) { + if (HPMHooks.count.HP_rnd_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; postHookFunc(); } @@ -16215,14 +16404,14 @@ void HP_rnd_init(void) { } void HP_rnd_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_final_pre ) { + if (HPMHooks.count.HP_rnd_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16230,9 +16419,9 @@ void HP_rnd_final(void) { { HPMHooks.source.rnd.final(); } - if( HPMHooks.count.HP_rnd_final_post ) { + if (HPMHooks.count.HP_rnd_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; postHookFunc(); } @@ -16241,14 +16430,14 @@ void HP_rnd_final(void) { } void HP_rnd_seed(uint32 seed) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_seed_pre ) { + if (HPMHooks.count.HP_rnd_seed_pre > 0) { void (*preHookFunc) (uint32 *seed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; preHookFunc(&seed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16256,9 +16445,9 @@ void HP_rnd_seed(uint32 seed) { { HPMHooks.source.rnd.seed(seed); } - if( HPMHooks.count.HP_rnd_seed_post ) { + if (HPMHooks.count.HP_rnd_seed_post > 0) { void (*postHookFunc) (uint32 seed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; postHookFunc(seed); } @@ -16268,14 +16457,14 @@ void HP_rnd_seed(uint32 seed) { int32 HP_rnd_random(void) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_random_pre ) { + if (HPMHooks.count.HP_rnd_random_pre > 0) { int32 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16283,9 +16472,9 @@ int32 HP_rnd_random(void) { { retVal___ = HPMHooks.source.rnd.random(); } - if( HPMHooks.count.HP_rnd_random_post ) { + if (HPMHooks.count.HP_rnd_random_post > 0) { int32 (*postHookFunc) (int32 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -16295,14 +16484,14 @@ int32 HP_rnd_random(void) { uint32 HP_rnd_roll(uint32 dice_faces) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_roll_pre ) { + if (HPMHooks.count.HP_rnd_roll_pre > 0) { uint32 (*preHookFunc) (uint32 *dice_faces); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; retVal___ = preHookFunc(&dice_faces); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16310,9 +16499,9 @@ uint32 HP_rnd_roll(uint32 dice_faces) { { retVal___ = HPMHooks.source.rnd.roll(dice_faces); } - if( HPMHooks.count.HP_rnd_roll_post ) { + if (HPMHooks.count.HP_rnd_roll_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; retVal___ = postHookFunc(retVal___, dice_faces); } @@ -16322,14 +16511,14 @@ uint32 HP_rnd_roll(uint32 dice_faces) { int32 HP_rnd_value(int32 min, int32 max) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_value_pre ) { + if (HPMHooks.count.HP_rnd_value_pre > 0) { int32 (*preHookFunc) (int32 *min, int32 *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; retVal___ = preHookFunc(&min, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16337,9 +16526,9 @@ int32 HP_rnd_value(int32 min, int32 max) { { retVal___ = HPMHooks.source.rnd.value(min, max); } - if( HPMHooks.count.HP_rnd_value_post ) { + if (HPMHooks.count.HP_rnd_value_post > 0) { int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, min, max); } @@ -16349,14 +16538,14 @@ int32 HP_rnd_value(int32 min, int32 max) { double HP_rnd_uniform(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform_pre ) { + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16364,9 +16553,9 @@ double HP_rnd_uniform(void) { { retVal___ = HPMHooks.source.rnd.uniform(); } - if( HPMHooks.count.HP_rnd_uniform_post ) { + if (HPMHooks.count.HP_rnd_uniform_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -16376,14 +16565,14 @@ double HP_rnd_uniform(void) { double HP_rnd_uniform53(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform53_pre ) { + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16391,9 +16580,9 @@ double HP_rnd_uniform53(void) { { retVal___ = HPMHooks.source.rnd.uniform53(); } - if( HPMHooks.count.HP_rnd_uniform53_post ) { + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -16403,14 +16592,14 @@ double HP_rnd_uniform53(void) { /* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16418,9 +16607,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -16429,14 +16618,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16444,9 +16633,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -16455,14 +16644,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16470,9 +16659,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -16482,16 +16671,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16501,9 +16690,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -16515,14 +16704,14 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { /* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16530,9 +16719,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -16541,14 +16730,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16556,9 +16745,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -16568,14 +16757,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16583,9 +16772,9 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { int (*postHookFunc) (int retVal___, int next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, next); } @@ -16594,14 +16783,14 @@ int HP_sockt_perform(int next) { } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16609,9 +16798,9 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { void (*postHookFunc) (int fd, bool send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; postHookFunc(fd, send); } @@ -16621,14 +16810,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16636,9 +16825,9 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port); } @@ -16648,14 +16837,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16663,9 +16852,9 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port, opt); } @@ -16675,14 +16864,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16690,9 +16879,9 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } @@ -16702,14 +16891,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16717,9 +16906,9 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, addition); } @@ -16729,14 +16918,14 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { int HP_sockt_wfifoset(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16744,9 +16933,9 @@ int HP_sockt_wfifoset(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -16756,14 +16945,14 @@ int HP_sockt_wfifoset(int fd, size_t len) { int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16771,9 +16960,9 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -16782,14 +16971,14 @@ int HP_sockt_rfifoskip(int fd, size_t len) { } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16797,9 +16986,9 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; postHookFunc(fd); } @@ -16809,14 +16998,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16824,9 +17013,9 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -16836,14 +17025,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16851,9 +17040,9 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -16862,14 +17051,14 @@ bool HP_sockt_session_is_active(int fd) { } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16877,9 +17066,9 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; postHookFunc(fd); } @@ -16888,14 +17077,14 @@ void HP_sockt_flush(int fd) { } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16903,9 +17092,9 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } @@ -16914,14 +17103,14 @@ void HP_sockt_flush_fifos(void) { } void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16929,9 +17118,9 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { void (*postHookFunc) (int fd, unsigned long yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; postHookFunc(fd, yes); } @@ -16940,14 +17129,14 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16955,9 +17144,9 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { void (*postHookFunc) (ParseFunc defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; postHookFunc(defaultparse); } @@ -16967,14 +17156,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16982,9 +17171,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -16994,14 +17183,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17009,9 +17198,9 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, ip_str); } @@ -17021,14 +17210,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17036,9 +17225,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -17048,14 +17237,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17063,9 +17252,9 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; retVal___ = postHookFunc(retVal___, netshort); } @@ -17075,14 +17264,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { + if (HPMHooks.count.HP_sockt_getips_pre > 0) { int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17090,9 +17279,9 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { int (*postHookFunc) (int retVal___, uint32 *ips, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; retVal___ = postHookFunc(retVal___, ips, max); } @@ -17101,14 +17290,14 @@ int HP_sockt_getips(uint32 *ips, int max) { } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17116,9 +17305,9 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; postHookFunc(fd); } @@ -17128,14 +17317,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17143,9 +17332,9 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, info); } @@ -17155,14 +17344,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17170,9 +17359,9 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -17182,14 +17371,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17197,9 +17386,9 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -17209,14 +17398,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17224,9 +17413,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -17235,14 +17424,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17250,9 +17439,9 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } @@ -17263,14 +17452,14 @@ void HP_sockt_net_config_read(const char *filename) { int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17278,9 +17467,9 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } @@ -17290,14 +17479,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17305,9 +17494,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -17317,14 +17506,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17332,9 +17521,9 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } @@ -17344,14 +17533,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17359,9 +17548,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -17371,14 +17560,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17386,9 +17575,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17398,14 +17587,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17413,9 +17602,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -17425,14 +17614,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17440,9 +17629,9 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } @@ -17452,16 +17641,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17471,9 +17660,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -17485,14 +17674,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17500,9 +17689,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -17512,14 +17701,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17527,9 +17716,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17539,14 +17728,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17554,9 +17743,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17566,14 +17755,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17581,9 +17770,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17593,14 +17782,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17608,9 +17797,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17620,14 +17809,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17635,9 +17824,9 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } @@ -17646,14 +17835,14 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17661,9 +17850,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -17672,14 +17861,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17687,9 +17876,9 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -17698,14 +17887,14 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { + if (HPMHooks.count.HP_SQL_Free_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17713,9 +17902,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -17725,14 +17914,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17740,9 +17929,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -17752,14 +17941,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17767,9 +17956,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -17779,16 +17968,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17798,9 +17987,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -17812,14 +18001,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17827,9 +18016,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -17839,14 +18028,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17854,9 +18043,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17866,14 +18055,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17881,9 +18070,9 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } @@ -17893,14 +18082,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17908,9 +18097,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17920,14 +18109,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17935,9 +18124,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17947,14 +18136,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17962,9 +18151,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17974,14 +18163,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17989,9 +18178,9 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } @@ -18001,14 +18190,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18016,9 +18205,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -18028,14 +18217,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18043,9 +18232,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -18054,14 +18243,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18069,9 +18258,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -18080,14 +18269,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18095,9 +18284,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -18106,14 +18295,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18121,9 +18310,9 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -18134,14 +18323,14 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18149,9 +18338,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18160,14 +18349,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18175,9 +18364,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -18187,16 +18376,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18206,9 +18395,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -18220,14 +18409,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18235,9 +18424,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -18247,14 +18436,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18262,9 +18451,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -18274,14 +18463,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18289,9 +18478,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -18301,14 +18490,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18316,9 +18505,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -18327,14 +18516,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18342,9 +18531,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -18353,14 +18542,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18368,9 +18557,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -18379,14 +18568,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18394,9 +18583,9 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } @@ -18407,14 +18596,14 @@ void HP_StrBuf_Free(StringBuf *self) { char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18422,9 +18611,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -18434,14 +18623,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18449,9 +18638,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -18461,14 +18650,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18476,9 +18665,9 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt, size); } @@ -18488,14 +18677,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18503,9 +18692,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -18515,14 +18704,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { + if (HPMHooks.count.HP_strlib_trim__pre > 0) { char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18530,9 +18719,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -18542,14 +18731,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18557,9 +18746,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -18569,14 +18758,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18584,9 +18773,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -18596,14 +18785,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18611,9 +18800,9 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -18623,14 +18812,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18638,9 +18827,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -18650,14 +18839,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18665,9 +18854,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -18677,14 +18866,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18692,9 +18881,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -18704,14 +18893,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18719,9 +18908,9 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; retVal___ = postHookFunc(retVal___, dst, src, n); } @@ -18731,14 +18920,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18746,9 +18935,9 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -18758,14 +18947,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { + if (HPMHooks.count.HP_strlib_strline__pre > 0) { int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18773,9 +18962,9 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { int (*postHookFunc) (int retVal___, const char *str, size_t pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, pos); } @@ -18785,14 +18974,14 @@ int HP_strlib_strline_(const char *str, size_t pos) { bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18800,9 +18989,9 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, count); } @@ -18813,14 +19002,14 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18828,9 +19017,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -18840,14 +19029,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { + if (HPMHooks.count.HP_sv_parse_pre > 0) { int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18855,9 +19044,9 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } @@ -18867,14 +19056,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { + if (HPMHooks.count.HP_sv_split_pre > 0) { int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18882,9 +19071,9 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { + if (HPMHooks.count.HP_sv_split_post > 0) { int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } @@ -18894,14 +19083,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18909,9 +19098,9 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } @@ -18921,14 +19110,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18936,9 +19125,9 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len); } @@ -18948,14 +19137,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18963,9 +19152,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -18975,14 +19164,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { + if (HPMHooks.count.HP_sv_readdb_pre > 0) { bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18990,9 +19179,9 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } @@ -19003,14 +19192,14 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19018,9 +19207,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19030,14 +19219,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19045,9 +19234,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19057,14 +19246,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19072,9 +19261,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19084,14 +19273,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19099,9 +19288,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19111,14 +19300,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19126,9 +19315,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19138,14 +19327,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19153,9 +19342,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19165,14 +19354,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19180,9 +19369,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19192,14 +19381,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19207,9 +19396,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19219,14 +19408,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19234,9 +19423,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19246,14 +19435,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19261,9 +19450,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19273,14 +19462,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19288,9 +19477,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19300,14 +19489,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19315,9 +19504,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19327,14 +19516,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19342,9 +19531,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19354,14 +19543,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19369,9 +19558,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19380,14 +19569,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19395,9 +19584,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -19407,14 +19596,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19422,9 +19611,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19433,14 +19622,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19448,9 +19637,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -19459,14 +19648,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19474,9 +19663,9 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } @@ -19486,14 +19675,14 @@ void HP_sysinfo_final(void) { /* thread_interface */ void HP_thread_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_init_pre ) { + if (HPMHooks.count.HP_thread_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19501,9 +19690,9 @@ void HP_thread_init(void) { { HPMHooks.source.thread.init(); } - if( HPMHooks.count.HP_thread_init_post ) { + if (HPMHooks.count.HP_thread_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; postHookFunc(); } @@ -19512,14 +19701,14 @@ void HP_thread_init(void) { } void HP_thread_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_final_pre ) { + if (HPMHooks.count.HP_thread_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19527,9 +19716,9 @@ void HP_thread_final(void) { { HPMHooks.source.thread.final(); } - if( HPMHooks.count.HP_thread_final_post ) { + if (HPMHooks.count.HP_thread_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; postHookFunc(); } @@ -19539,14 +19728,14 @@ void HP_thread_final(void) { struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_pre ) { + if (HPMHooks.count.HP_thread_create_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19554,9 +19743,9 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { { retVal___ = HPMHooks.source.thread.create(entry_point, param); } - if( HPMHooks.count.HP_thread_create_post ) { + if (HPMHooks.count.HP_thread_create_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param); } @@ -19566,14 +19755,14 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_opt_pre ) { + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19581,9 +19770,9 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, { retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); } - if( HPMHooks.count.HP_thread_create_opt_post ) { + if (HPMHooks.count.HP_thread_create_opt_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); } @@ -19592,14 +19781,14 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, } void HP_thread_destroy(struct thread_handle *handle) { int hIndex = 0; - if( HPMHooks.count.HP_thread_destroy_pre ) { + if (HPMHooks.count.HP_thread_destroy_pre > 0) { void (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19607,9 +19796,9 @@ void HP_thread_destroy(struct thread_handle *handle) { { HPMHooks.source.thread.destroy(handle); } - if( HPMHooks.count.HP_thread_destroy_post ) { + if (HPMHooks.count.HP_thread_destroy_post > 0) { void (*postHookFunc) (struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; postHookFunc(handle); } @@ -19619,14 +19808,14 @@ void HP_thread_destroy(struct thread_handle *handle) { struct thread_handle* HP_thread_self(void) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_self_pre ) { + if (HPMHooks.count.HP_thread_self_pre > 0) { struct thread_handle* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19634,9 +19823,9 @@ struct thread_handle* HP_thread_self(void) { { retVal___ = HPMHooks.source.thread.self(); } - if( HPMHooks.count.HP_thread_self_post ) { + if (HPMHooks.count.HP_thread_self_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19646,14 +19835,14 @@ struct thread_handle* HP_thread_self(void) { int HP_thread_get_tid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_thread_get_tid_pre ) { + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19661,9 +19850,9 @@ int HP_thread_get_tid(void) { { retVal___ = HPMHooks.source.thread.get_tid(); } - if( HPMHooks.count.HP_thread_get_tid_post ) { + if (HPMHooks.count.HP_thread_get_tid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19673,14 +19862,14 @@ int HP_thread_get_tid(void) { bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_thread_wait_pre ) { + if (HPMHooks.count.HP_thread_wait_pre > 0) { bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; retVal___ = preHookFunc(&handle, &out_exit_code); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19688,9 +19877,9 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { { retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); } - if( HPMHooks.count.HP_thread_wait_post ) { + if (HPMHooks.count.HP_thread_wait_post > 0) { bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle, out_exit_code); } @@ -19699,14 +19888,14 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { } void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { int hIndex = 0; - if( HPMHooks.count.HP_thread_prio_set_pre ) { + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; preHookFunc(&handle, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19714,9 +19903,9 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { HPMHooks.source.thread.prio_set(handle, prio); } - if( HPMHooks.count.HP_thread_prio_set_post ) { + if (HPMHooks.count.HP_thread_prio_set_post > 0) { void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; postHookFunc(handle, prio); } @@ -19726,14 +19915,14 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { int hIndex = 0; enum thread_priority retVal___ = THREADPRIO_NORMAL; - if( HPMHooks.count.HP_thread_prio_get_pre ) { + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { enum thread_priority (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; retVal___ = preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19741,9 +19930,9 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { { retVal___ = HPMHooks.source.thread.prio_get(handle); } - if( HPMHooks.count.HP_thread_prio_get_post ) { + if (HPMHooks.count.HP_thread_prio_get_post > 0) { enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle); } @@ -19752,14 +19941,14 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { } void HP_thread_yield(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_yield_pre ) { + if (HPMHooks.count.HP_thread_yield_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19767,9 +19956,9 @@ void HP_thread_yield(void) { { HPMHooks.source.thread.yield(); } - if( HPMHooks.count.HP_thread_yield_post ) { + if (HPMHooks.count.HP_thread_yield_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; postHookFunc(); } @@ -19780,14 +19969,14 @@ void HP_thread_yield(void) { int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19795,9 +19984,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19807,14 +19996,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19822,9 +20011,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -19834,14 +20023,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19849,9 +20038,9 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { + if (HPMHooks.count.HP_timer_add_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data); } @@ -19861,14 +20050,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19876,9 +20065,9 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } @@ -19888,14 +20077,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19903,9 +20092,9 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { + if (HPMHooks.count.HP_timer_get_post > 0) { const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid); } @@ -19915,14 +20104,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19930,9 +20119,9 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, int tid, TimerFunc func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, func); } @@ -19942,14 +20131,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19957,9 +20146,9 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -19969,14 +20158,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -19984,9 +20173,9 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -19996,14 +20185,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -20011,9 +20200,9 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { int (*postHookFunc) (int retVal___, TimerFunc func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, func, name); } @@ -20023,14 +20212,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -20038,9 +20227,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -20050,14 +20239,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -20065,9 +20254,9 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { int (*postHookFunc) (int retVal___, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick); } @@ -20076,14 +20265,14 @@ int HP_timer_perform(int64 tick) { } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20091,9 +20280,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -20102,14 +20291,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20117,9 +20306,9 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc index 54ae8f030..b5e9afc08 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,41 +25,41 @@ /* GENERATED FILE DO NOT EDIT */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface)); -memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); -memcpy(&HPMHooks.source.des, des, sizeof(struct des_interface)); -memcpy(&HPMHooks.source.geoip, geoip, sizeof(struct geoip_interface)); -memcpy(&HPMHooks.source.inter_auction, inter_auction, sizeof(struct inter_auction_interface)); -memcpy(&HPMHooks.source.inter_elemental, inter_elemental, sizeof(struct inter_elemental_interface)); -memcpy(&HPMHooks.source.inter_guild, inter_guild, sizeof(struct inter_guild_interface)); -memcpy(&HPMHooks.source.inter_homunculus, inter_homunculus, sizeof(struct inter_homunculus_interface)); -memcpy(&HPMHooks.source.inter, inter, sizeof(struct inter_interface)); -memcpy(&HPMHooks.source.inter_mail, inter_mail, sizeof(struct inter_mail_interface)); -memcpy(&HPMHooks.source.inter_mercenary, inter_mercenary, sizeof(struct inter_mercenary_interface)); -memcpy(&HPMHooks.source.inter_party, inter_party, sizeof(struct inter_party_interface)); -memcpy(&HPMHooks.source.inter_pet, inter_pet, sizeof(struct inter_pet_interface)); -memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_interface)); -memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface)); -memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface)); -memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface)); -memcpy(&HPMHooks.source.md5, md5, sizeof(struct md5_interface)); -memcpy(&HPMHooks.source.mutex, mutex, sizeof(struct mutex_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface)); -memcpy(&HPMHooks.source.rnd, rnd, sizeof(struct rnd_interface)); -memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.thread, thread, sizeof(struct thread_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); +HPMHooks.source.HCache = *HCache; +HPMHooks.source.chr = *chr; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.geoip = *geoip; +HPMHooks.source.inter_auction = *inter_auction; +HPMHooks.source.inter_elemental = *inter_elemental; +HPMHooks.source.inter_guild = *inter_guild; +HPMHooks.source.inter_homunculus = *inter_homunculus; +HPMHooks.source.inter = *inter; +HPMHooks.source.inter_mail = *inter_mail; +HPMHooks.source.inter_mercenary = *inter_mercenary; +HPMHooks.source.inter_party = *inter_party; +HPMHooks.source.inter_pet = *inter_pet; +HPMHooks.source.inter_quest = *inter_quest; +HPMHooks.source.inter_rodex = *inter_rodex; +HPMHooks.source.inter_storage = *inter_storage; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.loginif = *loginif; +HPMHooks.source.mapif = *mapif; +HPMHooks.source.mapindex = *mapindex; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.pincode = *pincode; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index b97b6ea7f..9c38c0c4c 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -376,34 +376,32 @@ struct { struct HPMHookPoint *HP_login_config_set_defaults_post; struct HPMHookPoint *HP_login_config_read_pre; struct HPMHookPoint *HP_login_config_read_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_post; + struct HPMHookPoint *HP_login_config_read_inter_pre; + struct HPMHookPoint *HP_login_config_read_inter_post; + struct HPMHookPoint *HP_login_config_read_console_pre; + struct HPMHookPoint *HP_login_config_read_console_post; + struct HPMHookPoint *HP_login_config_read_log_pre; + struct HPMHookPoint *HP_login_config_read_log_post; + struct HPMHookPoint *HP_login_config_read_account_pre; + struct HPMHookPoint *HP_login_config_read_account_post; + struct HPMHookPoint *HP_login_config_read_permission_pre; + struct HPMHookPoint *HP_login_config_read_permission_post; + struct HPMHookPoint *HP_login_config_read_permission_hash_pre; + struct HPMHookPoint *HP_login_config_read_permission_hash_post; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_pre; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_post; + struct HPMHookPoint *HP_login_config_read_users_pre; + struct HPMHookPoint *HP_login_config_read_users_post; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_post; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_post; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_pre; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_post; + struct HPMHookPoint *HP_login_config_set_md5hash_pre; + struct HPMHookPoint *HP_login_config_set_md5hash_post; + struct HPMHookPoint *HP_login_convert_users_to_colors_pre; + struct HPMHookPoint *HP_login_convert_users_to_colors_post; struct HPMHookPoint *HP_md5_string_pre; struct HPMHookPoint *HP_md5_string_post; struct HPMHookPoint *HP_md5_binary_pre; @@ -1077,34 +1075,32 @@ struct { int HP_login_config_set_defaults_post; int HP_login_config_read_pre; int HP_login_config_read_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_post; + int HP_login_config_read_inter_pre; + int HP_login_config_read_inter_post; + int HP_login_config_read_console_pre; + int HP_login_config_read_console_post; + int HP_login_config_read_log_pre; + int HP_login_config_read_log_post; + int HP_login_config_read_account_pre; + int HP_login_config_read_account_post; + int HP_login_config_read_permission_pre; + int HP_login_config_read_permission_post; + int HP_login_config_read_permission_hash_pre; + int HP_login_config_read_permission_hash_post; + int HP_login_config_read_permission_blacklist_pre; + int HP_login_config_read_permission_blacklist_post; + int HP_login_config_read_users_pre; + int HP_login_config_read_users_post; + int HP_login_clear_dnsbl_servers_pre; + int HP_login_clear_dnsbl_servers_post; + int HP_login_config_set_dnsbl_servers_pre; + int HP_login_config_set_dnsbl_servers_post; + int HP_login_clear_client_hash_nodes_pre; + int HP_login_clear_client_hash_nodes_post; + int HP_login_config_set_md5hash_pre; + int HP_login_config_set_md5hash_post; + int HP_login_convert_users_to_colors_pre; + int HP_login_convert_users_to_colors_post; int HP_md5_string_pre; int HP_md5_string_post; int HP_md5_binary_pre; @@ -1438,7 +1434,6 @@ struct { struct lclif_interface_private PRIV__lclif; struct libconfig_interface libconfig; struct login_interface login; - struct malloc_interface iMalloc; struct md5_interface md5; struct mutex_interface mutex; struct nullpo_interface nullpo; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 2d3e37bc3..ba4b941a9 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -211,21 +211,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, { HP_POP(login->config_read, HP_login_config_read) }, -/* malloc_interface */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, + { HP_POP(login->config_read_inter, HP_login_config_read_inter) }, + { HP_POP(login->config_read_console, HP_login_config_read_console) }, + { HP_POP(login->config_read_log, HP_login_config_read_log) }, + { HP_POP(login->config_read_account, HP_login_config_read_account) }, + { HP_POP(login->config_read_permission, HP_login_config_read_permission) }, + { HP_POP(login->config_read_permission_hash, HP_login_config_read_permission_hash) }, + { HP_POP(login->config_read_permission_blacklist, HP_login_config_read_permission_blacklist) }, + { HP_POP(login->config_read_users, HP_login_config_read_users) }, + { HP_POP(login->clear_dnsbl_servers, HP_login_clear_dnsbl_servers) }, + { HP_POP(login->config_set_dnsbl_servers, HP_login_config_set_dnsbl_servers) }, + { HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) }, + { HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) }, + { HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) }, /* md5_interface */ { HP_POP(md5->string, HP_md5_string) }, { HP_POP(md5->binary, HP_md5_binary) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 290c2283a..0dbf2e5ae 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,14 +28,14 @@ /* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -55,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { + if (HPMHooks.count.HP_HCache_check_pre > 0) { bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -82,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { + if (HPMHooks.count.HP_HCache_open_pre > 0) { FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -97,9 +97,9 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } @@ -109,14 +109,14 @@ FILE* HP_HCache_open(const char *file, const char *opt) { /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -124,9 +124,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -135,14 +135,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -150,9 +150,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -162,14 +162,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -177,9 +177,9 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } @@ -189,14 +189,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -204,9 +204,9 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; retVal___ = postHookFunc(retVal___, argc, argv, options); } @@ -216,14 +216,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -231,9 +231,9 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, current_arg, argc); } @@ -243,14 +243,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -258,9 +258,9 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } @@ -270,14 +270,14 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { /* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -285,9 +285,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -296,14 +296,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -311,9 +311,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -322,14 +322,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -337,9 +337,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -348,14 +348,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -363,9 +363,9 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } @@ -375,14 +375,14 @@ void HP_console_display_gplnotice(void) { /* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -390,9 +390,9 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } @@ -403,14 +403,14 @@ void HP_core_shutdown_callback(void) { enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -418,9 +418,9 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -430,14 +430,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -445,9 +445,9 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -457,14 +457,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -472,9 +472,9 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -484,14 +484,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -499,9 +499,9 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -511,14 +511,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -526,9 +526,9 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, which); } @@ -538,14 +538,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { + if (HPMHooks.count.HP_DB_alloc_pre > 0) { struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -553,9 +553,9 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } @@ -565,14 +565,14 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT union DBKey HP_DB_i2key(int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2key_pre ) { + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -580,9 +580,9 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -592,14 +592,14 @@ union DBKey HP_DB_i2key(int key) { union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2key_pre ) { + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -607,9 +607,9 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -619,14 +619,14 @@ union DBKey HP_DB_ui2key(unsigned int key) { union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_str2key_pre ) { + if (HPMHooks.count.HP_DB_str2key_pre > 0) { union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -634,9 +634,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -646,14 +646,14 @@ union DBKey HP_DB_str2key(const char *key) { union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i642key_pre ) { + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -661,9 +661,9 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -673,14 +673,14 @@ union DBKey HP_DB_i642key(int64 key) { union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui642key_pre ) { + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -688,9 +688,9 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -700,14 +700,14 @@ union DBKey HP_DB_ui642key(uint64 key) { struct DBData HP_DB_i2data(int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2data_pre ) { + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -715,9 +715,9 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -727,14 +727,14 @@ struct DBData HP_DB_i2data(int data) { struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2data_pre ) { + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -742,9 +742,9 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -754,14 +754,14 @@ struct DBData HP_DB_ui2data(unsigned int data) { struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ptr2data_pre ) { + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -769,9 +769,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -781,14 +781,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { + if (HPMHooks.count.HP_DB_data2i_pre > 0) { int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -796,9 +796,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -808,14 +808,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -823,9 +823,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -835,14 +835,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -850,9 +850,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -861,14 +861,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -876,9 +876,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -887,14 +887,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -902,9 +902,9 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } @@ -914,14 +914,14 @@ void HP_DB_final(void) { /* des_interface */ void HP_des_decrypt_block(struct des_bit64 *block) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_block_pre ) { + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { void (*preHookFunc) (struct des_bit64 **block); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; preHookFunc(&block); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -929,9 +929,9 @@ void HP_des_decrypt_block(struct des_bit64 *block) { { HPMHooks.source.des.decrypt_block(block); } - if( HPMHooks.count.HP_des_decrypt_block_post ) { + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { void (*postHookFunc) (struct des_bit64 *block); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; postHookFunc(block); } @@ -940,14 +940,14 @@ void HP_des_decrypt_block(struct des_bit64 *block) { } void HP_des_decrypt(unsigned char *data, size_t size) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_pre ) { + if (HPMHooks.count.HP_des_decrypt_pre > 0) { void (*preHookFunc) (unsigned char **data, size_t *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; preHookFunc(&data, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -955,9 +955,9 @@ void HP_des_decrypt(unsigned char *data, size_t size) { { HPMHooks.source.des.decrypt(data, size); } - if( HPMHooks.count.HP_des_decrypt_post ) { + if (HPMHooks.count.HP_des_decrypt_post > 0) { void (*postHookFunc) (unsigned char *data, size_t size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; postHookFunc(data, size); } @@ -967,14 +967,14 @@ void HP_des_decrypt(unsigned char *data, size_t size) { /* lclif_interface */ void HP_lclif_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_init_pre ) { + if (HPMHooks.count.HP_lclif_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -982,9 +982,9 @@ void HP_lclif_init(void) { { HPMHooks.source.lclif.init(); } - if( HPMHooks.count.HP_lclif_init_post ) { + if (HPMHooks.count.HP_lclif_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_init_post[hIndex].func; postHookFunc(); } @@ -993,14 +993,14 @@ void HP_lclif_init(void) { } void HP_lclif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_final_pre ) { + if (HPMHooks.count.HP_lclif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1008,9 +1008,9 @@ void HP_lclif_final(void) { { HPMHooks.source.lclif.final(); } - if( HPMHooks.count.HP_lclif_final_post ) { + if (HPMHooks.count.HP_lclif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_final_post[hIndex].func; postHookFunc(); } @@ -1019,14 +1019,14 @@ void HP_lclif_final(void) { } void HP_lclif_connection_error(int fd, uint8 error) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_connection_error_pre ) { + if (HPMHooks.count.HP_lclif_connection_error_pre > 0) { void (*preHookFunc) (int *fd, uint8 *error); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_connection_error_pre[hIndex].func; preHookFunc(&fd, &error); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1034,9 +1034,9 @@ void HP_lclif_connection_error(int fd, uint8 error) { { HPMHooks.source.lclif.connection_error(fd, error); } - if( HPMHooks.count.HP_lclif_connection_error_post ) { + if (HPMHooks.count.HP_lclif_connection_error_post > 0) { void (*postHookFunc) (int fd, uint8 error); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_connection_error_post[hIndex].func; postHookFunc(fd, error); } @@ -1046,14 +1046,14 @@ void HP_lclif_connection_error(int fd, uint8 error) { bool HP_lclif_server_list(struct login_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_lclif_server_list_pre ) { + if (HPMHooks.count.HP_lclif_server_list_pre > 0) { bool (*preHookFunc) (struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_server_list_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1061,9 +1061,9 @@ bool HP_lclif_server_list(struct login_session_data *sd) { { retVal___ = HPMHooks.source.lclif.server_list(sd); } - if( HPMHooks.count.HP_lclif_server_list_post ) { + if (HPMHooks.count.HP_lclif_server_list_post > 0) { bool (*postHookFunc) (bool retVal___, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_server_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -1072,14 +1072,14 @@ bool HP_lclif_server_list(struct login_session_data *sd) { } void HP_lclif_auth_failed(int fd, time_t ban, uint32 error) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_auth_failed_pre ) { + if (HPMHooks.count.HP_lclif_auth_failed_pre > 0) { void (*preHookFunc) (int *fd, time_t *ban, uint32 *error); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_auth_failed_pre[hIndex].func; preHookFunc(&fd, &ban, &error); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1087,9 +1087,9 @@ void HP_lclif_auth_failed(int fd, time_t ban, uint32 error) { { HPMHooks.source.lclif.auth_failed(fd, ban, error); } - if( HPMHooks.count.HP_lclif_auth_failed_post ) { + if (HPMHooks.count.HP_lclif_auth_failed_post > 0) { void (*postHookFunc) (int fd, time_t ban, uint32 error); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_auth_failed_post[hIndex].func; postHookFunc(fd, ban, error); } @@ -1098,14 +1098,14 @@ void HP_lclif_auth_failed(int fd, time_t ban, uint32 error) { } void HP_lclif_login_error(int fd, uint8 error) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_login_error_pre ) { + if (HPMHooks.count.HP_lclif_login_error_pre > 0) { void (*preHookFunc) (int *fd, uint8 *error); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_login_error_pre[hIndex].func; preHookFunc(&fd, &error); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1113,9 +1113,9 @@ void HP_lclif_login_error(int fd, uint8 error) { { HPMHooks.source.lclif.login_error(fd, error); } - if( HPMHooks.count.HP_lclif_login_error_post ) { + if (HPMHooks.count.HP_lclif_login_error_post > 0) { void (*postHookFunc) (int fd, uint8 error); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_login_error_post[hIndex].func; postHookFunc(fd, error); } @@ -1124,14 +1124,14 @@ void HP_lclif_login_error(int fd, uint8 error) { } void HP_lclif_coding_key(int fd, struct login_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_lclif_coding_key_pre ) { + if (HPMHooks.count.HP_lclif_coding_key_pre > 0) { void (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_coding_key_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1139,9 +1139,9 @@ void HP_lclif_coding_key(int fd, struct login_session_data *sd) { { HPMHooks.source.lclif.coding_key(fd, sd); } - if( HPMHooks.count.HP_lclif_coding_key_post ) { + if (HPMHooks.count.HP_lclif_coding_key_post > 0) { void (*postHookFunc) (int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_coding_key_post[hIndex].func; postHookFunc(fd, sd); } @@ -1151,14 +1151,14 @@ void HP_lclif_coding_key(int fd, struct login_session_data *sd) { const struct login_packet_db* HP_lclif_packet(int16 packet_id) { int hIndex = 0; const struct login_packet_db* retVal___ = NULL; - if( HPMHooks.count.HP_lclif_packet_pre ) { + if (HPMHooks.count.HP_lclif_packet_pre > 0) { const struct login_packet_db* (*preHookFunc) (int16 *packet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_packet_pre[hIndex].func; retVal___ = preHookFunc(&packet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1166,9 +1166,9 @@ const struct login_packet_db* HP_lclif_packet(int16 packet_id) { { retVal___ = HPMHooks.source.lclif.packet(packet_id); } - if( HPMHooks.count.HP_lclif_packet_post ) { + if (HPMHooks.count.HP_lclif_packet_post > 0) { const struct login_packet_db* (*postHookFunc) (const struct login_packet_db* retVal___, int16 packet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_packet_post[hIndex].func; retVal___ = postHookFunc(retVal___, packet_id); } @@ -1178,14 +1178,14 @@ const struct login_packet_db* HP_lclif_packet(int16 packet_id) { enum parsefunc_rcode HP_lclif_parse_packet(const struct login_packet_db *lpd, int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_lclif_parse_packet_pre ) { + if (HPMHooks.count.HP_lclif_parse_packet_pre > 0) { enum parsefunc_rcode (*preHookFunc) (const struct login_packet_db **lpd, int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_parse_packet_pre[hIndex].func; retVal___ = preHookFunc(&lpd, &fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1193,9 +1193,9 @@ enum parsefunc_rcode HP_lclif_parse_packet(const struct login_packet_db *lpd, in { retVal___ = HPMHooks.source.lclif.parse_packet(lpd, fd, sd); } - if( HPMHooks.count.HP_lclif_parse_packet_post ) { + if (HPMHooks.count.HP_lclif_parse_packet_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, const struct login_packet_db *lpd, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_parse_packet_post[hIndex].func; retVal___ = postHookFunc(retVal___, lpd, fd, sd); } @@ -1205,14 +1205,14 @@ enum parsefunc_rcode HP_lclif_parse_packet(const struct login_packet_db *lpd, in int HP_lclif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_lclif_parse_pre ) { + if (HPMHooks.count.HP_lclif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_lclif_parse_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1220,9 +1220,9 @@ int HP_lclif_parse(int fd) { { retVal___ = HPMHooks.source.lclif.parse(fd); } - if( HPMHooks.count.HP_lclif_parse_post ) { + if (HPMHooks.count.HP_lclif_parse_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_lclif_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -1232,14 +1232,14 @@ int HP_lclif_parse(int fd) { /* lclif_interface_private */ void HP_PRIV__lclif_packetdb_loaddb(void) { int hIndex = 0; - if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1247,9 +1247,9 @@ void HP_PRIV__lclif_packetdb_loaddb(void) { { HPMHooks.source.PRIV__lclif.packetdb_loaddb(); } - if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post ) { + if (HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_post[hIndex].func; postHookFunc(); } @@ -1259,14 +1259,14 @@ void HP_PRIV__lclif_packetdb_loaddb(void) { enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_sub_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_sub_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1274,9 +1274,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data { retVal___ = HPMHooks.source.PRIV__lclif.parse_sub(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_sub_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_sub_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1286,14 +1286,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1301,9 +1301,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CONNECT_INFO_CHANGED(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1313,14 +1313,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct enum parsefunc_rcode HP_PRIV__lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1328,9 +1328,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_ { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_EXE_HASHCHECK(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1340,14 +1340,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1355,9 +1355,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN(int fd, struct login_session_ { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1367,14 +1367,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN(int fd, struct login_session_ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1382,9 +1382,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN2(int fd, struct login_session { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN2(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1394,14 +1394,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN2(int fd, struct login_session enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1409,9 +1409,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN3(int fd, struct login_session { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN3(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1421,14 +1421,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN3(int fd, struct login_session enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1436,9 +1436,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN4(int fd, struct login_session { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN4(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1448,14 +1448,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN4(int fd, struct login_session enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1463,9 +1463,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_s { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_PCBANG(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1475,14 +1475,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_s enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1490,9 +1490,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_HAN(int fd, struct login_sess { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_HAN(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1502,14 +1502,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_HAN(int fd, struct login_sess enum parsefunc_rcode HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1517,9 +1517,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_ { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_SSO_LOGIN_REQ(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1529,14 +1529,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1544,9 +1544,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_sessi { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_REQ_HASH(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1556,14 +1556,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_sessi enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd) { int hIndex = 0; enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre > 0) { enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1571,9 +1571,9 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct lo { retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CHARSERVERCONNECT(fd, sd); } - if( HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post ) { + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post > 0) { enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; hIndex++) { postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -1584,14 +1584,14 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct lo int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { + if (HPMHooks.count.HP_libconfig_read_pre > 0) { int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1599,9 +1599,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -1610,14 +1610,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { + if (HPMHooks.count.HP_libconfig_write_pre > 0) { void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1625,9 +1625,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -1636,14 +1636,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1651,9 +1651,9 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { void (*postHookFunc) (struct config_t *config, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; postHookFunc(config, options); } @@ -1663,14 +1663,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1678,9 +1678,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -1690,14 +1690,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1705,9 +1705,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -1717,14 +1717,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1732,9 +1732,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -1744,14 +1744,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1759,9 +1759,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -1770,14 +1770,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1785,9 +1785,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -1796,14 +1796,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1811,9 +1811,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -1822,14 +1822,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { + if (HPMHooks.count.HP_libconfig_init_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1837,9 +1837,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -1848,14 +1848,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1863,9 +1863,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -1875,14 +1875,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1890,26 +1890,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1917,9 +1917,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1929,14 +1929,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1944,9 +1944,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1956,14 +1956,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1971,9 +1971,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1983,14 +1983,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1998,9 +1998,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2010,14 +2010,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2025,9 +2025,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -2037,14 +2037,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2052,26 +2052,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2079,9 +2079,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2091,14 +2091,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2106,9 +2106,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2118,14 +2118,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2133,9 +2133,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2145,14 +2145,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2160,9 +2160,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2172,14 +2172,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2187,26 +2187,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t **setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2214,9 +2214,9 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -2226,14 +2226,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2241,9 +2241,9 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -2253,14 +2253,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2268,9 +2268,9 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -2280,14 +2280,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2295,9 +2295,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -2307,14 +2307,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2322,9 +2322,9 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, format); } @@ -2334,14 +2334,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2349,9 +2349,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2361,14 +2361,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2376,26 +2376,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2403,9 +2403,9 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -2415,14 +2415,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2430,9 +2430,9 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -2442,14 +2442,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2457,9 +2457,9 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -2469,14 +2469,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2484,9 +2484,9 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -2496,14 +2496,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2511,26 +2511,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2538,9 +2538,9 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -2550,14 +2550,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2565,9 +2565,9 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -2577,14 +2577,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2592,9 +2592,9 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -2604,14 +2604,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2619,9 +2619,9 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -2631,14 +2631,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2646,9 +2646,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2658,14 +2658,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2673,9 +2673,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2685,14 +2685,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2700,9 +2700,9 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -2712,14 +2712,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2727,9 +2727,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -2739,14 +2739,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2754,9 +2754,9 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name, type); } @@ -2766,14 +2766,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2781,9 +2781,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -2793,14 +2793,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2808,9 +2808,9 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, idx); } @@ -2819,14 +2819,14 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2834,9 +2834,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -2846,14 +2846,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2861,9 +2861,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -2873,14 +2873,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2888,26 +2888,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2915,9 +2915,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2927,14 +2927,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2942,9 +2942,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2954,14 +2954,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2969,9 +2969,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2981,14 +2981,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2996,9 +2996,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -3008,14 +3008,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3023,9 +3023,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -3034,14 +3034,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3049,9 +3049,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -3060,14 +3060,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3075,9 +3075,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -3086,14 +3086,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3101,9 +3101,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -3113,14 +3113,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3128,9 +3128,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -3140,14 +3140,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3155,9 +3155,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -3167,14 +3167,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3182,9 +3182,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -3194,14 +3194,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3209,9 +3209,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -3221,14 +3221,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3236,9 +3236,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -3248,14 +3248,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3263,9 +3263,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -3275,14 +3275,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3290,9 +3290,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -3302,14 +3302,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3317,9 +3317,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -3329,14 +3329,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3344,9 +3344,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -3356,14 +3356,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3371,9 +3371,9 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } @@ -3383,14 +3383,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3398,9 +3398,9 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, name, out, out_size); } @@ -3411,14 +3411,14 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_pre ) { + if (HPMHooks.count.HP_login_mmo_auth_pre > 0) { int (*preHookFunc) (struct login_session_data **sd, bool *isServer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_mmo_auth_pre[hIndex].func; retVal___ = preHookFunc(&sd, &isServer); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3426,9 +3426,9 @@ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { { retVal___ = HPMHooks.source.login.mmo_auth(sd, isServer); } - if( HPMHooks.count.HP_login_mmo_auth_post ) { + if (HPMHooks.count.HP_login_mmo_auth_post > 0) { int (*postHookFunc) (int retVal___, struct login_session_data *sd, bool isServer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_mmo_auth_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, isServer); } @@ -3438,14 +3438,14 @@ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, const char *last_ip) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_new_pre ) { + if (HPMHooks.count.HP_login_mmo_auth_new_pre > 0) { int (*preHookFunc) (const char **userid, const char **pass, const char *sex, const char **last_ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_mmo_auth_new_pre[hIndex].func; retVal___ = preHookFunc(&userid, &pass, &sex, &last_ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3453,9 +3453,9 @@ int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, { retVal___ = HPMHooks.source.login.mmo_auth_new(userid, pass, sex, last_ip); } - if( HPMHooks.count.HP_login_mmo_auth_new_post ) { + if (HPMHooks.count.HP_login_mmo_auth_new_post > 0) { int (*postHookFunc) (int retVal___, const char *userid, const char *pass, const char sex, const char *last_ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_mmo_auth_new_post[hIndex].func; retVal___ = postHookFunc(retVal___, userid, pass, sex, last_ip); } @@ -3465,14 +3465,14 @@ int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_waiting_disconnect_timer_pre ) { + if (HPMHooks.count.HP_login_waiting_disconnect_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3480,9 +3480,9 @@ int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data { retVal___ = HPMHooks.source.login.waiting_disconnect_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_login_waiting_disconnect_timer_post ) { + if (HPMHooks.count.HP_login_waiting_disconnect_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -3492,16 +3492,16 @@ int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data struct DBData HP_login_create_online_user(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_login_create_online_user_pre ) { + if (HPMHooks.count.HP_login_create_online_user_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_login_create_online_user_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3511,9 +3511,9 @@ struct DBData HP_login_create_online_user(union DBKey key, va_list args) { retVal___ = HPMHooks.source.login.create_online_user(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_login_create_online_user_post ) { + if (HPMHooks.count.HP_login_create_online_user_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_login_create_online_user_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, args___copy); @@ -3525,14 +3525,14 @@ struct DBData HP_login_create_online_user(union DBKey key, va_list args) { struct online_login_data* HP_login_add_online_user(int char_server, int account_id) { int hIndex = 0; struct online_login_data* retVal___ = NULL; - if( HPMHooks.count.HP_login_add_online_user_pre ) { + if (HPMHooks.count.HP_login_add_online_user_pre > 0) { struct online_login_data* (*preHookFunc) (int *char_server, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_add_online_user_pre[hIndex].func; retVal___ = preHookFunc(&char_server, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3540,9 +3540,9 @@ struct online_login_data* HP_login_add_online_user(int char_server, int account_ { retVal___ = HPMHooks.source.login.add_online_user(char_server, account_id); } - if( HPMHooks.count.HP_login_add_online_user_post ) { + if (HPMHooks.count.HP_login_add_online_user_post > 0) { struct online_login_data* (*postHookFunc) (struct online_login_data* retVal___, int char_server, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_add_online_user_post[hIndex].func; retVal___ = postHookFunc(retVal___, char_server, account_id); } @@ -3551,14 +3551,14 @@ struct online_login_data* HP_login_add_online_user(int char_server, int account_ } void HP_login_remove_online_user(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_login_remove_online_user_pre ) { + if (HPMHooks.count.HP_login_remove_online_user_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_remove_online_user_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3566,9 +3566,9 @@ void HP_login_remove_online_user(int account_id) { { HPMHooks.source.login.remove_online_user(account_id); } - if( HPMHooks.count.HP_login_remove_online_user_post ) { + if (HPMHooks.count.HP_login_remove_online_user_post > 0) { void (*postHookFunc) (int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_remove_online_user_post[hIndex].func; postHookFunc(account_id); } @@ -3578,16 +3578,16 @@ void HP_login_remove_online_user(int account_id) { int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_db_setoffline_pre ) { + if (HPMHooks.count.HP_login_online_db_setoffline_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_login_online_db_setoffline_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3597,9 +3597,9 @@ int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list retVal___ = HPMHooks.source.login.online_db_setoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_login_online_db_setoffline_post ) { + if (HPMHooks.count.HP_login_online_db_setoffline_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_login_online_db_setoffline_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -3611,16 +3611,16 @@ int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_sub_pre ) { + if (HPMHooks.count.HP_login_online_data_cleanup_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3630,9 +3630,9 @@ int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_li retVal___ = HPMHooks.source.login.online_data_cleanup_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_login_online_data_cleanup_sub_post ) { + if (HPMHooks.count.HP_login_online_data_cleanup_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -3644,14 +3644,14 @@ int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_li int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_pre ) { + if (HPMHooks.count.HP_login_online_data_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3659,9 +3659,9 @@ int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.login.online_data_cleanup(tid, tick, id, data); } - if( HPMHooks.count.HP_login_online_data_cleanup_post ) { + if (HPMHooks.count.HP_login_online_data_cleanup_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -3671,14 +3671,14 @@ int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_sync_ip_addresses_pre ) { + if (HPMHooks.count.HP_login_sync_ip_addresses_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3686,9 +3686,9 @@ int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.login.sync_ip_addresses(tid, tick, id, data); } - if( HPMHooks.count.HP_login_sync_ip_addresses_post ) { + if (HPMHooks.count.HP_login_sync_ip_addresses_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -3698,14 +3698,14 @@ int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { bool HP_login_check_encrypted(const char *str1, const char *str2, const char *passwd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_check_encrypted_pre ) { + if (HPMHooks.count.HP_login_check_encrypted_pre > 0) { bool (*preHookFunc) (const char **str1, const char **str2, const char **passwd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_check_encrypted_pre[hIndex].func; retVal___ = preHookFunc(&str1, &str2, &passwd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3713,9 +3713,9 @@ bool HP_login_check_encrypted(const char *str1, const char *str2, const char *pa { retVal___ = HPMHooks.source.login.check_encrypted(str1, str2, passwd); } - if( HPMHooks.count.HP_login_check_encrypted_post ) { + if (HPMHooks.count.HP_login_check_encrypted_post > 0) { bool (*postHookFunc) (bool retVal___, const char *str1, const char *str2, const char *passwd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_check_encrypted_post[hIndex].func; retVal___ = postHookFunc(retVal___, str1, str2, passwd); } @@ -3725,14 +3725,14 @@ bool HP_login_check_encrypted(const char *str1, const char *str2, const char *pa bool HP_login_check_password(const char *md5key, int passwdenc, const char *passwd, const char *refpass) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_check_password_pre ) { + if (HPMHooks.count.HP_login_check_password_pre > 0) { bool (*preHookFunc) (const char **md5key, int *passwdenc, const char **passwd, const char **refpass); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_check_password_pre[hIndex].func; retVal___ = preHookFunc(&md5key, &passwdenc, &passwd, &refpass); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3740,9 +3740,9 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass { retVal___ = HPMHooks.source.login.check_password(md5key, passwdenc, passwd, refpass); } - if( HPMHooks.count.HP_login_check_password_post ) { + if (HPMHooks.count.HP_login_check_password_post > 0) { bool (*postHookFunc) (bool retVal___, const char *md5key, int passwdenc, const char *passwd, const char *refpass); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_check_password_post[hIndex].func; retVal___ = postHookFunc(retVal___, md5key, passwdenc, passwd, refpass); } @@ -3752,14 +3752,14 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass uint32 HP_login_lan_subnet_check(uint32 ip) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_login_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_login_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3767,9 +3767,9 @@ uint32 HP_login_lan_subnet_check(uint32 ip) { { retVal___ = HPMHooks.source.login.lan_subnet_check(ip); } - if( HPMHooks.count.HP_login_lan_subnet_check_post ) { + if (HPMHooks.count.HP_login_lan_subnet_check_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -3778,14 +3778,14 @@ uint32 HP_login_lan_subnet_check(uint32 ip) { } void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) { + if (HPMHooks.count.HP_login_fromchar_accinfo_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account **acc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_pre[hIndex].func; preHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, &acc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3793,9 +3793,9 @@ void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int { HPMHooks.source.login.fromchar_accinfo(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); } - if( HPMHooks.count.HP_login_fromchar_accinfo_post ) { + if (HPMHooks.count.HP_login_fromchar_accinfo_post > 0) { void (*postHookFunc) (int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_post[hIndex].func; postHookFunc(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); } @@ -3804,14 +3804,14 @@ void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int } void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_pre ) { + if (HPMHooks.count.HP_login_fromchar_account_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, struct mmo_account **acc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_account_pre[hIndex].func; preHookFunc(&fd, &account_id, &acc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3819,9 +3819,9 @@ void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { HPMHooks.source.login.fromchar_account(fd, account_id, acc); } - if( HPMHooks.count.HP_login_fromchar_account_post ) { + if (HPMHooks.count.HP_login_fromchar_account_post > 0) { void (*postHookFunc) (int fd, int account_id, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_account_post[hIndex].func; postHookFunc(fd, account_id, acc); } @@ -3830,14 +3830,14 @@ void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) } void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_update_other_pre ) { + if (HPMHooks.count.HP_login_fromchar_account_update_other_pre > 0) { void (*preHookFunc) (int *account_id, unsigned int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_pre[hIndex].func; preHookFunc(&account_id, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3845,9 +3845,9 @@ void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { HPMHooks.source.login.fromchar_account_update_other(account_id, state); } - if( HPMHooks.count.HP_login_fromchar_account_update_other_post ) { + if (HPMHooks.count.HP_login_fromchar_account_update_other_post > 0) { void (*postHookFunc) (int account_id, unsigned int state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_post[hIndex].func; postHookFunc(account_id, state); } @@ -3856,14 +3856,14 @@ void HP_login_fromchar_account_update_other(int account_id, unsigned int state) } void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_auth_ack_pre ) { + if (HPMHooks.count.HP_login_fromchar_auth_ack_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node **node); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_pre[hIndex].func; preHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, &node); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3871,9 +3871,9 @@ void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 { HPMHooks.source.login.fromchar_auth_ack(fd, account_id, login_id1, login_id2, sex, request_id, node); } - if( HPMHooks.count.HP_login_fromchar_auth_ack_post ) { + if (HPMHooks.count.HP_login_fromchar_auth_ack_post > 0) { void (*postHookFunc) (int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_post[hIndex].func; postHookFunc(fd, account_id, login_id1, login_id2, sex, request_id, node); } @@ -3882,14 +3882,14 @@ void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 } void HP_login_fromchar_ban(int account_id, time_t timestamp) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_ban_pre ) { + if (HPMHooks.count.HP_login_fromchar_ban_pre > 0) { void (*preHookFunc) (int *account_id, time_t *timestamp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_ban_pre[hIndex].func; preHookFunc(&account_id, ×tamp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3897,9 +3897,9 @@ void HP_login_fromchar_ban(int account_id, time_t timestamp) { { HPMHooks.source.login.fromchar_ban(account_id, timestamp); } - if( HPMHooks.count.HP_login_fromchar_ban_post ) { + if (HPMHooks.count.HP_login_fromchar_ban_post > 0) { void (*postHookFunc) (int account_id, time_t timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_ban_post[hIndex].func; postHookFunc(account_id, timestamp); } @@ -3908,14 +3908,14 @@ void HP_login_fromchar_ban(int account_id, time_t timestamp) { } void HP_login_fromchar_change_sex_other(int account_id, char sex) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_change_sex_other_pre ) { + if (HPMHooks.count.HP_login_fromchar_change_sex_other_pre > 0) { void (*preHookFunc) (int *account_id, char *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_pre[hIndex].func; preHookFunc(&account_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3923,9 +3923,9 @@ void HP_login_fromchar_change_sex_other(int account_id, char sex) { { HPMHooks.source.login.fromchar_change_sex_other(account_id, sex); } - if( HPMHooks.count.HP_login_fromchar_change_sex_other_post ) { + if (HPMHooks.count.HP_login_fromchar_change_sex_other_post > 0) { void (*postHookFunc) (int account_id, char sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_post[hIndex].func; postHookFunc(account_id, sex); } @@ -3934,14 +3934,14 @@ void HP_login_fromchar_change_sex_other(int account_id, char sex) { } void HP_login_fromchar_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_pong_pre ) { + if (HPMHooks.count.HP_login_fromchar_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3949,9 +3949,9 @@ void HP_login_fromchar_pong(int fd) { { HPMHooks.source.login.fromchar_pong(fd); } - if( HPMHooks.count.HP_login_fromchar_pong_post ) { + if (HPMHooks.count.HP_login_fromchar_pong_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_pong_post[hIndex].func; postHookFunc(fd); } @@ -3960,14 +3960,14 @@ void HP_login_fromchar_pong(int fd) { } void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_auth_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_auth_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3975,9 +3975,9 @@ void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_auth(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_auth_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_auth_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -3986,14 +3986,14 @@ void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_update_users(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_users_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_users_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4001,9 +4001,9 @@ void HP_login_fromchar_parse_update_users(int fd, int id) { { HPMHooks.source.login.fromchar_parse_update_users(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_update_users_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_users_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_post[hIndex].func; postHookFunc(fd, id); } @@ -4012,14 +4012,14 @@ void HP_login_fromchar_parse_update_users(int fd, int id) { } void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4027,9 +4027,9 @@ void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip { HPMHooks.source.login.fromchar_parse_request_change_email(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_change_email_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4038,14 +4038,14 @@ void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip } void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_data_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_data_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4053,9 +4053,9 @@ void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_data(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_data_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_data_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4064,14 +4064,14 @@ void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ping_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4079,9 +4079,9 @@ void HP_login_fromchar_parse_ping(int fd) { { HPMHooks.source.login.fromchar_parse_ping(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_ping_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_ping_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_post[hIndex].func; postHookFunc(fd); } @@ -4090,14 +4090,14 @@ void HP_login_fromchar_parse_ping(int fd) { } void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_email_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_email_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4105,9 +4105,9 @@ void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_change_email(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_change_email_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_email_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4116,14 +4116,14 @@ void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_update_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_update_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4131,9 +4131,9 @@ void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_update(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_update_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_update_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4142,14 +4142,14 @@ void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ban_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_ban_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4157,9 +4157,9 @@ void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_ban(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_ban_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_ban_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4168,14 +4168,14 @@ void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_sex_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4183,9 +4183,9 @@ void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_change_sex(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_sex_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4194,14 +4194,14 @@ void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4209,9 +4209,9 @@ void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_reg2(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_reg2_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4220,14 +4220,14 @@ void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_unban_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_unban_pre > 0) { void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_pre[hIndex].func; preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4235,9 +4235,9 @@ void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_unban(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_unban_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_unban_post > 0) { void (*postHookFunc) (int fd, int id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_post[hIndex].func; postHookFunc(fd, id, ip); } @@ -4246,14 +4246,14 @@ void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { } void HP_login_fromchar_parse_account_online(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_online_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_online_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4261,9 +4261,9 @@ void HP_login_fromchar_parse_account_online(int fd, int id) { { HPMHooks.source.login.fromchar_parse_account_online(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_account_online_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_online_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_post[hIndex].func; postHookFunc(fd, id); } @@ -4272,14 +4272,14 @@ void HP_login_fromchar_parse_account_online(int fd, int id) { } void HP_login_fromchar_parse_account_offline(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_offline_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4287,9 +4287,9 @@ void HP_login_fromchar_parse_account_offline(int fd) { { HPMHooks.source.login.fromchar_parse_account_offline(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_offline_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_post[hIndex].func; postHookFunc(fd); } @@ -4298,14 +4298,14 @@ void HP_login_fromchar_parse_account_offline(int fd) { } void HP_login_fromchar_parse_online_accounts(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4313,9 +4313,9 @@ void HP_login_fromchar_parse_online_accounts(int fd, int id) { { HPMHooks.source.login.fromchar_parse_online_accounts(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_online_accounts_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_post[hIndex].func; postHookFunc(fd, id); } @@ -4324,14 +4324,14 @@ void HP_login_fromchar_parse_online_accounts(int fd, int id) { } void HP_login_fromchar_parse_request_account_reg2(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4339,9 +4339,9 @@ void HP_login_fromchar_parse_request_account_reg2(int fd) { { HPMHooks.source.login.fromchar_parse_request_account_reg2(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_post[hIndex].func; postHookFunc(fd); } @@ -4350,14 +4350,14 @@ void HP_login_fromchar_parse_request_account_reg2(int fd) { } void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4365,9 +4365,9 @@ void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { { HPMHooks.source.login.fromchar_parse_update_wan_ip(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_post[hIndex].func; postHookFunc(fd, id); } @@ -4376,14 +4376,14 @@ void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { } void HP_login_fromchar_parse_all_offline(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_all_offline_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4391,9 +4391,9 @@ void HP_login_fromchar_parse_all_offline(int fd, int id) { { HPMHooks.source.login.fromchar_parse_all_offline(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_all_offline_post > 0) { void (*postHookFunc) (int fd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_post[hIndex].func; postHookFunc(fd, id); } @@ -4402,14 +4402,14 @@ void HP_login_fromchar_parse_all_offline(int fd, int id) { } void HP_login_fromchar_parse_change_pincode(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4417,9 +4417,9 @@ void HP_login_fromchar_parse_change_pincode(int fd) { { HPMHooks.source.login.fromchar_parse_change_pincode(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_pincode_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_post[hIndex].func; postHookFunc(fd); } @@ -4429,14 +4429,14 @@ void HP_login_fromchar_parse_change_pincode(int fd) { bool HP_login_fromchar_parse_wrong_pincode(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4444,9 +4444,9 @@ bool HP_login_fromchar_parse_wrong_pincode(int fd) { { retVal___ = HPMHooks.source.login.fromchar_parse_wrong_pincode(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -4455,14 +4455,14 @@ bool HP_login_fromchar_parse_wrong_pincode(int fd) { } void HP_login_fromchar_parse_accinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_accinfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4470,9 +4470,9 @@ void HP_login_fromchar_parse_accinfo(int fd) { { HPMHooks.source.login.fromchar_parse_accinfo(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_post ) { + if (HPMHooks.count.HP_login_fromchar_parse_accinfo_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_post[hIndex].func; postHookFunc(fd); } @@ -4482,14 +4482,14 @@ void HP_login_fromchar_parse_accinfo(int fd) { int HP_login_parse_fromchar(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_fromchar_pre ) { + if (HPMHooks.count.HP_login_parse_fromchar_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_parse_fromchar_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4497,9 +4497,9 @@ int HP_login_parse_fromchar(int fd) { { retVal___ = HPMHooks.source.login.parse_fromchar(fd); } - if( HPMHooks.count.HP_login_parse_fromchar_post ) { + if (HPMHooks.count.HP_login_parse_fromchar_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_parse_fromchar_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -4508,14 +4508,14 @@ int HP_login_parse_fromchar(int fd) { } void HP_login_kick(struct login_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_login_kick_pre ) { + if (HPMHooks.count.HP_login_kick_pre > 0) { void (*preHookFunc) (struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_kick_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4523,9 +4523,9 @@ void HP_login_kick(struct login_session_data *sd) { { HPMHooks.source.login.kick(sd); } - if( HPMHooks.count.HP_login_kick_post ) { + if (HPMHooks.count.HP_login_kick_post > 0) { void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_kick_post[hIndex].func; postHookFunc(sd); } @@ -4534,14 +4534,14 @@ void HP_login_kick(struct login_session_data *sd) { } void HP_login_auth_ok(struct login_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_ok_pre ) { + if (HPMHooks.count.HP_login_auth_ok_pre > 0) { void (*preHookFunc) (struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_auth_ok_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4549,9 +4549,9 @@ void HP_login_auth_ok(struct login_session_data *sd) { { HPMHooks.source.login.auth_ok(sd); } - if( HPMHooks.count.HP_login_auth_ok_post ) { + if (HPMHooks.count.HP_login_auth_ok_post > 0) { void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_auth_ok_post[hIndex].func; postHookFunc(sd); } @@ -4560,14 +4560,14 @@ void HP_login_auth_ok(struct login_session_data *sd) { } void HP_login_auth_failed(struct login_session_data *sd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_failed_pre ) { + if (HPMHooks.count.HP_login_auth_failed_pre > 0) { void (*preHookFunc) (struct login_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_auth_failed_pre[hIndex].func; preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4575,9 +4575,9 @@ void HP_login_auth_failed(struct login_session_data *sd, int result) { { HPMHooks.source.login.auth_failed(sd, result); } - if( HPMHooks.count.HP_login_auth_failed_post ) { + if (HPMHooks.count.HP_login_auth_failed_post > 0) { void (*postHookFunc) (struct login_session_data *sd, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_auth_failed_post[hIndex].func; postHookFunc(sd, result); } @@ -4587,14 +4587,14 @@ void HP_login_auth_failed(struct login_session_data *sd, int result) { bool HP_login_client_login(int fd, struct login_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_client_login_pre ) { + if (HPMHooks.count.HP_login_client_login_pre > 0) { bool (*preHookFunc) (int *fd, struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_client_login_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4602,9 +4602,9 @@ bool HP_login_client_login(int fd, struct login_session_data *sd) { { retVal___ = HPMHooks.source.login.client_login(fd, sd); } - if( HPMHooks.count.HP_login_client_login_post ) { + if (HPMHooks.count.HP_login_client_login_post > 0) { bool (*postHookFunc) (bool retVal___, int fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_client_login_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd); } @@ -4613,14 +4613,14 @@ bool HP_login_client_login(int fd, struct login_session_data *sd) { } void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { int hIndex = 0; - if( HPMHooks.count.HP_login_char_server_connection_status_pre ) { + if (HPMHooks.count.HP_login_char_server_connection_status_pre > 0) { void (*preHookFunc) (int *fd, struct login_session_data **sd, uint8 *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_char_server_connection_status_pre[hIndex].func; preHookFunc(&fd, &sd, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4628,9 +4628,9 @@ void HP_login_char_server_connection_status(int fd, struct login_session_data *s { HPMHooks.source.login.char_server_connection_status(fd, sd, status); } - if( HPMHooks.count.HP_login_char_server_connection_status_post ) { + if (HPMHooks.count.HP_login_char_server_connection_status_post > 0) { void (*postHookFunc) (int fd, struct login_session_data *sd, uint8 status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_char_server_connection_status_post[hIndex].func; postHookFunc(fd, sd, status); } @@ -4639,14 +4639,14 @@ void HP_login_char_server_connection_status(int fd, struct login_session_data *s } void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_connection_pre ) { + if (HPMHooks.count.HP_login_parse_request_connection_pre > 0) { void (*preHookFunc) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; preHookFunc(&fd, &sd, &ip, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4654,9 +4654,9 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co { HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); } - if( HPMHooks.count.HP_login_parse_request_connection_post ) { + if (HPMHooks.count.HP_login_parse_request_connection_post > 0) { void (*postHookFunc) (int fd, struct login_session_data *sd, const char *ip, uint32 ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; postHookFunc(fd, sd, ip, ipl); } @@ -4665,14 +4665,14 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co } void HP_login_config_set_defaults(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_config_set_defaults_pre ) { + if (HPMHooks.count.HP_login_config_set_defaults_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_config_set_defaults_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4680,9 +4680,9 @@ void HP_login_config_set_defaults(void) { { HPMHooks.source.login.config_set_defaults(); } - if( HPMHooks.count.HP_login_config_set_defaults_post ) { + if (HPMHooks.count.HP_login_config_set_defaults_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_config_set_defaults_post[hIndex].func; postHookFunc(); } @@ -4692,14 +4692,14 @@ void HP_login_config_set_defaults(void) { bool HP_login_config_read(const char *filename, bool included) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_config_read_pre ) { + if (HPMHooks.count.HP_login_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *included); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &included); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4707,399 +4707,373 @@ bool HP_login_config_read(const char *filename, bool included) { { retVal___ = HPMHooks.source.login.config_read(filename, included); } - if( HPMHooks.count.HP_login_config_read_post ) { + if (HPMHooks.count.HP_login_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool included); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_config_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, included); } } return retVal___; } -/* malloc_interface */ -void HP_iMalloc_init(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init(); - } - if( HPMHooks.count.HP_iMalloc_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_final(void) { +bool HP_login_config_read_inter(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.iMalloc.final(); + retVal___ = HPMHooks.source.login.config_read_inter(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_login_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { +bool HP_login_config_read_console(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_console_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_console_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); + retVal___ = HPMHooks.source.login.config_read_console(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, size, file, line, func); + if (HPMHooks.count.HP_login_config_read_console_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_console_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { +bool HP_login_config_read_log(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); + retVal___ = HPMHooks.source.login.config_read_log(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, num, size, file, line, func); + if (HPMHooks.count.HP_login_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { +bool HP_login_config_read_account(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_account_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_account_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); + retVal___ = HPMHooks.source.login.config_read_account(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); + if (HPMHooks.count.HP_login_config_read_account_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_account_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { +bool HP_login_config_read_permission(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); + retVal___ = HPMHooks.source.login.config_read_permission(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); + if (HPMHooks.count.HP_login_config_read_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { +bool HP_login_config_read_permission_hash(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_hash_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); + retVal___ = HPMHooks.source.login.config_read_permission_hash(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, line, func); + if (HPMHooks.count.HP_login_config_read_permission_hash_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { +bool HP_login_config_read_permission_blacklist(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_blacklist_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); + retVal___ = HPMHooks.source.login.config_read_permission_blacklist(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); + if (HPMHooks.count.HP_login_config_read_permission_blacklist_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { +bool HP_login_config_read_users(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void **p, const char **file, int *line, const char **func); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_users_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(&p, &file, &line, &func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_users_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.iMalloc.free(p, file, line, func); + retVal___ = HPMHooks.source.login.config_read_users(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, line, func); + if (HPMHooks.count.HP_login_config_read_users_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_users_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -void HP_iMalloc_memory_check(void) { +void HP_login_clear_dnsbl_servers(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { + if (HPMHooks.count.HP_login_clear_dnsbl_servers_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.memory_check(); + HPMHooks.source.login.clear_dnsbl_servers(); } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { + if (HPMHooks.count.HP_login_clear_dnsbl_servers_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_post[hIndex].func; postHookFunc(); } } return; } -bool HP_iMalloc_verify_ptr(void *ptr) { +void HP_login_config_set_dnsbl_servers(struct config_setting_t *setting) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void **ptr); + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(&ptr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_pre[hIndex].func; + preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); + HPMHooks.source.login.config_set_dnsbl_servers(setting); } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_post[hIndex].func; + postHookFunc(setting); } } - return retVal___; + return; } -size_t HP_iMalloc_usage(void) { +void HP_login_clear_client_hash_nodes(void) { int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); + if (HPMHooks.count.HP_login_clear_client_hash_nodes_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; - retVal___ = preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_pre[hIndex].func; + preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.iMalloc.usage(); + HPMHooks.source.login.clear_client_hash_nodes(); } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if (HPMHooks.count.HP_login_clear_client_hash_nodes_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } -void HP_iMalloc_post_shutdown(void) { +void HP_login_config_set_md5hash(struct config_setting_t *setting) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_login_config_set_md5hash_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_md5hash_pre[hIndex].func; + preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.post_shutdown(); + HPMHooks.source.login.config_set_md5hash(setting); } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_login_config_set_md5hash_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_md5hash_post[hIndex].func; + postHookFunc(setting); } } return; } -void HP_iMalloc_init_messages(void) { +uint16 HP_login_convert_users_to_colors(uint16 users) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { - void (*preHookFunc) (void); + uint16 retVal___ = 0; + if (HPMHooks.count.HP_login_convert_users_to_colors_pre > 0) { + uint16 (*preHookFunc) (uint16 *users); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_pre[hIndex].func; + retVal___ = preHookFunc(&users); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.iMalloc.init_messages(); + retVal___ = HPMHooks.source.login.convert_users_to_colors(users); } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_login_convert_users_to_colors_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_post[hIndex].func; + retVal___ = postHookFunc(retVal___, users); } } - return; + return retVal___; } /* md5_interface */ void HP_md5_string(const char *string, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_string_pre ) { + if (HPMHooks.count.HP_md5_string_pre > 0) { void (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5107,51 +5081,51 @@ void HP_md5_string(const char *string, char *output) { { HPMHooks.source.md5.string(string, output); } - if( HPMHooks.count.HP_md5_string_post ) { + if (HPMHooks.count.HP_md5_string_post > 0) { void (*postHookFunc) (const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; postHookFunc(string, output); } } return; } -void HP_md5_binary(const char *string, unsigned char *output) { +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_binary_pre ) { - void (*preHookFunc) (const char **string, unsigned char **output); + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; - preHookFunc(&string, &output); + preHookFunc(&buf, &buf_size, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.md5.binary(string, output); + HPMHooks.source.md5.binary(buf, buf_size, output); } - if( HPMHooks.count.HP_md5_binary_post ) { - void (*postHookFunc) (const char *string, unsigned char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++ ) { + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; - postHookFunc(string, output); + postHookFunc(buf, buf_size, output); } } return; } void HP_md5_salt(int len, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_salt_pre ) { + if (HPMHooks.count.HP_md5_salt_pre > 0) { void (*preHookFunc) (int *len, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; preHookFunc(&len, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5159,9 +5133,9 @@ void HP_md5_salt(int len, char *output) { { HPMHooks.source.md5.salt(len, output); } - if( HPMHooks.count.HP_md5_salt_post ) { + if (HPMHooks.count.HP_md5_salt_post > 0) { void (*postHookFunc) (int len, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; postHookFunc(len, output); } @@ -5172,14 +5146,14 @@ void HP_md5_salt(int len, char *output) { struct mutex_data* HP_mutex_create(void) { int hIndex = 0; struct mutex_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_create_pre ) { + if (HPMHooks.count.HP_mutex_create_pre > 0) { struct mutex_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5187,9 +5161,9 @@ struct mutex_data* HP_mutex_create(void) { { retVal___ = HPMHooks.source.mutex.create(); } - if( HPMHooks.count.HP_mutex_create_post ) { + if (HPMHooks.count.HP_mutex_create_post > 0) { struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5198,14 +5172,14 @@ struct mutex_data* HP_mutex_create(void) { } void HP_mutex_destroy(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_destroy_pre ) { + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5213,9 +5187,9 @@ void HP_mutex_destroy(struct mutex_data *m) { { HPMHooks.source.mutex.destroy(m); } - if( HPMHooks.count.HP_mutex_destroy_post ) { + if (HPMHooks.count.HP_mutex_destroy_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; postHookFunc(m); } @@ -5224,14 +5198,14 @@ void HP_mutex_destroy(struct mutex_data *m) { } void HP_mutex_lock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_lock_pre ) { + if (HPMHooks.count.HP_mutex_lock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5239,9 +5213,9 @@ void HP_mutex_lock(struct mutex_data *m) { { HPMHooks.source.mutex.lock(m); } - if( HPMHooks.count.HP_mutex_lock_post ) { + if (HPMHooks.count.HP_mutex_lock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; postHookFunc(m); } @@ -5251,14 +5225,14 @@ void HP_mutex_lock(struct mutex_data *m) { bool HP_mutex_trylock(struct mutex_data *m) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mutex_trylock_pre ) { + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { bool (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5266,9 +5240,9 @@ bool HP_mutex_trylock(struct mutex_data *m) { { retVal___ = HPMHooks.source.mutex.trylock(m); } - if( HPMHooks.count.HP_mutex_trylock_post ) { + if (HPMHooks.count.HP_mutex_trylock_post > 0) { bool (*postHookFunc) (bool retVal___, struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; retVal___ = postHookFunc(retVal___, m); } @@ -5277,14 +5251,14 @@ bool HP_mutex_trylock(struct mutex_data *m) { } void HP_mutex_unlock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_unlock_pre ) { + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5292,9 +5266,9 @@ void HP_mutex_unlock(struct mutex_data *m) { { HPMHooks.source.mutex.unlock(m); } - if( HPMHooks.count.HP_mutex_unlock_post ) { + if (HPMHooks.count.HP_mutex_unlock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; postHookFunc(m); } @@ -5304,14 +5278,14 @@ void HP_mutex_unlock(struct mutex_data *m) { struct cond_data* HP_mutex_cond_create(void) { int hIndex = 0; struct cond_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_cond_create_pre ) { + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { struct cond_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5319,9 +5293,9 @@ struct cond_data* HP_mutex_cond_create(void) { { retVal___ = HPMHooks.source.mutex.cond_create(); } - if( HPMHooks.count.HP_mutex_cond_create_post ) { + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { struct cond_data* (*postHookFunc) (struct cond_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5330,14 +5304,14 @@ struct cond_data* HP_mutex_cond_create(void) { } void HP_mutex_cond_destroy(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_destroy_pre ) { + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5345,9 +5319,9 @@ void HP_mutex_cond_destroy(struct cond_data *c) { { HPMHooks.source.mutex.cond_destroy(c); } - if( HPMHooks.count.HP_mutex_cond_destroy_post ) { + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; postHookFunc(c); } @@ -5356,14 +5330,14 @@ void HP_mutex_cond_destroy(struct cond_data *c) { } void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_wait_pre ) { + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; preHookFunc(&c, &m, &timeout_ticks); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5371,9 +5345,9 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou { HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); } - if( HPMHooks.count.HP_mutex_cond_wait_post ) { + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; postHookFunc(c, m, timeout_ticks); } @@ -5382,14 +5356,14 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou } void HP_mutex_cond_signal(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_signal_pre ) { + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5397,9 +5371,9 @@ void HP_mutex_cond_signal(struct cond_data *c) { { HPMHooks.source.mutex.cond_signal(c); } - if( HPMHooks.count.HP_mutex_cond_signal_post ) { + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; postHookFunc(c); } @@ -5408,14 +5382,14 @@ void HP_mutex_cond_signal(struct cond_data *c) { } void HP_mutex_cond_broadcast(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_broadcast_pre ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5423,9 +5397,9 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { { HPMHooks.source.mutex.cond_broadcast(c); } - if( HPMHooks.count.HP_mutex_cond_broadcast_post ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; postHookFunc(c); } @@ -5435,14 +5409,14 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { /* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5450,9 +5424,9 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; postHookFunc(file, line, func, targetname, title); } @@ -5462,14 +5436,14 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_init_pre ) { + if (HPMHooks.count.HP_rnd_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5477,9 +5451,9 @@ void HP_rnd_init(void) { { HPMHooks.source.rnd.init(); } - if( HPMHooks.count.HP_rnd_init_post ) { + if (HPMHooks.count.HP_rnd_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; postHookFunc(); } @@ -5488,14 +5462,14 @@ void HP_rnd_init(void) { } void HP_rnd_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_final_pre ) { + if (HPMHooks.count.HP_rnd_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5503,9 +5477,9 @@ void HP_rnd_final(void) { { HPMHooks.source.rnd.final(); } - if( HPMHooks.count.HP_rnd_final_post ) { + if (HPMHooks.count.HP_rnd_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; postHookFunc(); } @@ -5514,14 +5488,14 @@ void HP_rnd_final(void) { } void HP_rnd_seed(uint32 seed) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_seed_pre ) { + if (HPMHooks.count.HP_rnd_seed_pre > 0) { void (*preHookFunc) (uint32 *seed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; preHookFunc(&seed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5529,9 +5503,9 @@ void HP_rnd_seed(uint32 seed) { { HPMHooks.source.rnd.seed(seed); } - if( HPMHooks.count.HP_rnd_seed_post ) { + if (HPMHooks.count.HP_rnd_seed_post > 0) { void (*postHookFunc) (uint32 seed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; postHookFunc(seed); } @@ -5541,14 +5515,14 @@ void HP_rnd_seed(uint32 seed) { int32 HP_rnd_random(void) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_random_pre ) { + if (HPMHooks.count.HP_rnd_random_pre > 0) { int32 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5556,9 +5530,9 @@ int32 HP_rnd_random(void) { { retVal___ = HPMHooks.source.rnd.random(); } - if( HPMHooks.count.HP_rnd_random_post ) { + if (HPMHooks.count.HP_rnd_random_post > 0) { int32 (*postHookFunc) (int32 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5568,14 +5542,14 @@ int32 HP_rnd_random(void) { uint32 HP_rnd_roll(uint32 dice_faces) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_roll_pre ) { + if (HPMHooks.count.HP_rnd_roll_pre > 0) { uint32 (*preHookFunc) (uint32 *dice_faces); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; retVal___ = preHookFunc(&dice_faces); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5583,9 +5557,9 @@ uint32 HP_rnd_roll(uint32 dice_faces) { { retVal___ = HPMHooks.source.rnd.roll(dice_faces); } - if( HPMHooks.count.HP_rnd_roll_post ) { + if (HPMHooks.count.HP_rnd_roll_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; retVal___ = postHookFunc(retVal___, dice_faces); } @@ -5595,14 +5569,14 @@ uint32 HP_rnd_roll(uint32 dice_faces) { int32 HP_rnd_value(int32 min, int32 max) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_value_pre ) { + if (HPMHooks.count.HP_rnd_value_pre > 0) { int32 (*preHookFunc) (int32 *min, int32 *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; retVal___ = preHookFunc(&min, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5610,9 +5584,9 @@ int32 HP_rnd_value(int32 min, int32 max) { { retVal___ = HPMHooks.source.rnd.value(min, max); } - if( HPMHooks.count.HP_rnd_value_post ) { + if (HPMHooks.count.HP_rnd_value_post > 0) { int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, min, max); } @@ -5622,14 +5596,14 @@ int32 HP_rnd_value(int32 min, int32 max) { double HP_rnd_uniform(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform_pre ) { + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5637,9 +5611,9 @@ double HP_rnd_uniform(void) { { retVal___ = HPMHooks.source.rnd.uniform(); } - if( HPMHooks.count.HP_rnd_uniform_post ) { + if (HPMHooks.count.HP_rnd_uniform_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5649,14 +5623,14 @@ double HP_rnd_uniform(void) { double HP_rnd_uniform53(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform53_pre ) { + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5664,9 +5638,9 @@ double HP_rnd_uniform53(void) { { retVal___ = HPMHooks.source.rnd.uniform53(); } - if( HPMHooks.count.HP_rnd_uniform53_post ) { + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5676,14 +5650,14 @@ double HP_rnd_uniform53(void) { /* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5691,9 +5665,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -5702,14 +5676,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5717,9 +5691,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -5728,14 +5702,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5743,9 +5717,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -5755,16 +5729,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5774,9 +5748,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -5788,14 +5762,14 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { /* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5803,9 +5777,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -5814,14 +5788,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5829,9 +5803,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -5841,14 +5815,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5856,9 +5830,9 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { int (*postHookFunc) (int retVal___, int next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, next); } @@ -5867,14 +5841,14 @@ int HP_sockt_perform(int next) { } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5882,9 +5856,9 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { void (*postHookFunc) (int fd, bool send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; postHookFunc(fd, send); } @@ -5894,14 +5868,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5909,9 +5883,9 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port); } @@ -5921,14 +5895,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5936,9 +5910,9 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port, opt); } @@ -5948,14 +5922,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5963,9 +5937,9 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } @@ -5975,14 +5949,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5990,9 +5964,9 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, addition); } @@ -6002,14 +5976,14 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { int HP_sockt_wfifoset(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6017,9 +5991,9 @@ int HP_sockt_wfifoset(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -6029,14 +6003,14 @@ int HP_sockt_wfifoset(int fd, size_t len) { int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6044,9 +6018,9 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -6055,14 +6029,14 @@ int HP_sockt_rfifoskip(int fd, size_t len) { } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6070,9 +6044,9 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; postHookFunc(fd); } @@ -6082,14 +6056,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6097,9 +6071,9 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6109,14 +6083,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6124,9 +6098,9 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6135,14 +6109,14 @@ bool HP_sockt_session_is_active(int fd) { } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6150,9 +6124,9 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; postHookFunc(fd); } @@ -6161,14 +6135,14 @@ void HP_sockt_flush(int fd) { } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6176,9 +6150,9 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } @@ -6187,14 +6161,14 @@ void HP_sockt_flush_fifos(void) { } void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6202,9 +6176,9 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { void (*postHookFunc) (int fd, unsigned long yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; postHookFunc(fd, yes); } @@ -6213,14 +6187,14 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6228,9 +6202,9 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { void (*postHookFunc) (ParseFunc defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; postHookFunc(defaultparse); } @@ -6240,14 +6214,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6255,9 +6229,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -6267,14 +6241,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6282,9 +6256,9 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, ip_str); } @@ -6294,14 +6268,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6309,9 +6283,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -6321,14 +6295,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6336,9 +6310,9 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; retVal___ = postHookFunc(retVal___, netshort); } @@ -6348,14 +6322,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { + if (HPMHooks.count.HP_sockt_getips_pre > 0) { int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6363,9 +6337,9 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { int (*postHookFunc) (int retVal___, uint32 *ips, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; retVal___ = postHookFunc(retVal___, ips, max); } @@ -6374,14 +6348,14 @@ int HP_sockt_getips(uint32 *ips, int max) { } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6389,9 +6363,9 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; postHookFunc(fd); } @@ -6401,14 +6375,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6416,9 +6390,9 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, info); } @@ -6428,14 +6402,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6443,9 +6417,9 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6455,14 +6429,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6470,9 +6444,9 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6482,14 +6456,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6497,9 +6471,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -6508,14 +6482,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6523,9 +6497,9 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } @@ -6536,14 +6510,14 @@ void HP_sockt_net_config_read(const char *filename) { int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6551,9 +6525,9 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } @@ -6563,14 +6537,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6578,9 +6552,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -6590,14 +6564,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6605,9 +6579,9 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } @@ -6617,14 +6591,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6632,9 +6606,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -6644,14 +6618,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6659,9 +6633,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6671,14 +6645,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6686,9 +6660,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -6698,14 +6672,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6713,9 +6687,9 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } @@ -6725,16 +6699,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6744,9 +6718,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -6758,14 +6732,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6773,9 +6747,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -6785,14 +6759,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6800,9 +6774,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6812,14 +6786,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6827,9 +6801,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6839,14 +6813,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6854,9 +6828,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6866,14 +6840,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6881,9 +6855,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6893,14 +6867,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6908,9 +6882,9 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } @@ -6919,14 +6893,14 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6934,9 +6908,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -6945,14 +6919,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6960,9 +6934,9 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -6971,14 +6945,14 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { + if (HPMHooks.count.HP_SQL_Free_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6986,9 +6960,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -6998,14 +6972,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7013,9 +6987,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7025,14 +6999,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7040,9 +7014,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -7052,16 +7026,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7071,9 +7045,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -7085,14 +7059,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7100,9 +7074,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -7112,14 +7086,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7127,9 +7101,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7139,14 +7113,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7154,9 +7128,9 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } @@ -7166,14 +7140,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7181,9 +7155,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7193,14 +7167,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7208,9 +7182,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7220,14 +7194,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7235,9 +7209,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7247,14 +7221,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7262,9 +7236,9 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } @@ -7274,14 +7248,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7289,9 +7263,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7301,14 +7275,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7316,9 +7290,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7327,14 +7301,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7342,9 +7316,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -7353,14 +7327,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7368,9 +7342,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -7379,14 +7353,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7394,9 +7368,9 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -7407,14 +7381,14 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7422,9 +7396,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7433,14 +7407,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7448,9 +7422,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -7460,16 +7434,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7479,9 +7453,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -7493,14 +7467,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7508,9 +7482,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -7520,14 +7494,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7535,9 +7509,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -7547,14 +7521,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7562,9 +7536,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7574,14 +7548,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7589,9 +7563,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -7600,14 +7574,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7615,9 +7589,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -7626,14 +7600,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7641,9 +7615,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -7652,14 +7626,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7667,9 +7641,9 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } @@ -7680,14 +7654,14 @@ void HP_StrBuf_Free(StringBuf *self) { char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7695,9 +7669,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -7707,14 +7681,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7722,9 +7696,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -7734,14 +7708,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7749,9 +7723,9 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt, size); } @@ -7761,14 +7735,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7776,9 +7750,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -7788,14 +7762,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { + if (HPMHooks.count.HP_strlib_trim__pre > 0) { char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7803,9 +7777,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -7815,14 +7789,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7830,9 +7804,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -7842,14 +7816,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7857,9 +7831,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -7869,14 +7843,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7884,9 +7858,9 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -7896,14 +7870,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7911,9 +7885,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -7923,14 +7897,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7938,9 +7912,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -7950,14 +7924,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7965,9 +7939,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -7977,14 +7951,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7992,9 +7966,9 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; retVal___ = postHookFunc(retVal___, dst, src, n); } @@ -8004,14 +7978,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8019,9 +7993,9 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -8031,14 +8005,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { + if (HPMHooks.count.HP_strlib_strline__pre > 0) { int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8046,9 +8020,9 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { int (*postHookFunc) (int retVal___, const char *str, size_t pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, pos); } @@ -8058,14 +8032,14 @@ int HP_strlib_strline_(const char *str, size_t pos) { bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8073,9 +8047,9 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, count); } @@ -8086,14 +8060,14 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8101,9 +8075,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -8113,14 +8087,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { + if (HPMHooks.count.HP_sv_parse_pre > 0) { int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8128,9 +8102,9 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } @@ -8140,14 +8114,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { + if (HPMHooks.count.HP_sv_split_pre > 0) { int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8155,9 +8129,9 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { + if (HPMHooks.count.HP_sv_split_post > 0) { int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } @@ -8167,14 +8141,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8182,9 +8156,9 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } @@ -8194,14 +8168,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8209,9 +8183,9 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len); } @@ -8221,14 +8195,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8236,9 +8210,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -8248,14 +8222,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { + if (HPMHooks.count.HP_sv_readdb_pre > 0) { bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8263,9 +8237,9 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } @@ -8276,14 +8250,14 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8291,9 +8265,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8303,14 +8277,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8318,9 +8292,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8330,14 +8304,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8345,9 +8319,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8357,14 +8331,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8372,9 +8346,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8384,14 +8358,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8399,9 +8373,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8411,14 +8385,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8426,9 +8400,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8438,14 +8412,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8453,9 +8427,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8465,14 +8439,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8480,9 +8454,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8492,14 +8466,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8507,9 +8481,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8519,14 +8493,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8534,9 +8508,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8546,14 +8520,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8561,9 +8535,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8573,14 +8547,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8588,9 +8562,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8600,14 +8574,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8615,9 +8589,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8627,14 +8601,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8642,9 +8616,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8653,14 +8627,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8668,9 +8642,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -8680,14 +8654,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8695,9 +8669,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8706,14 +8680,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8721,9 +8695,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -8732,14 +8706,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8747,9 +8721,9 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } @@ -8759,14 +8733,14 @@ void HP_sysinfo_final(void) { /* thread_interface */ void HP_thread_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_init_pre ) { + if (HPMHooks.count.HP_thread_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8774,9 +8748,9 @@ void HP_thread_init(void) { { HPMHooks.source.thread.init(); } - if( HPMHooks.count.HP_thread_init_post ) { + if (HPMHooks.count.HP_thread_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; postHookFunc(); } @@ -8785,14 +8759,14 @@ void HP_thread_init(void) { } void HP_thread_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_final_pre ) { + if (HPMHooks.count.HP_thread_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8800,9 +8774,9 @@ void HP_thread_final(void) { { HPMHooks.source.thread.final(); } - if( HPMHooks.count.HP_thread_final_post ) { + if (HPMHooks.count.HP_thread_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; postHookFunc(); } @@ -8812,14 +8786,14 @@ void HP_thread_final(void) { struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_pre ) { + if (HPMHooks.count.HP_thread_create_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8827,9 +8801,9 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { { retVal___ = HPMHooks.source.thread.create(entry_point, param); } - if( HPMHooks.count.HP_thread_create_post ) { + if (HPMHooks.count.HP_thread_create_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param); } @@ -8839,14 +8813,14 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_opt_pre ) { + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8854,9 +8828,9 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, { retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); } - if( HPMHooks.count.HP_thread_create_opt_post ) { + if (HPMHooks.count.HP_thread_create_opt_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); } @@ -8865,14 +8839,14 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, } void HP_thread_destroy(struct thread_handle *handle) { int hIndex = 0; - if( HPMHooks.count.HP_thread_destroy_pre ) { + if (HPMHooks.count.HP_thread_destroy_pre > 0) { void (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8880,9 +8854,9 @@ void HP_thread_destroy(struct thread_handle *handle) { { HPMHooks.source.thread.destroy(handle); } - if( HPMHooks.count.HP_thread_destroy_post ) { + if (HPMHooks.count.HP_thread_destroy_post > 0) { void (*postHookFunc) (struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; postHookFunc(handle); } @@ -8892,14 +8866,14 @@ void HP_thread_destroy(struct thread_handle *handle) { struct thread_handle* HP_thread_self(void) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_self_pre ) { + if (HPMHooks.count.HP_thread_self_pre > 0) { struct thread_handle* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8907,9 +8881,9 @@ struct thread_handle* HP_thread_self(void) { { retVal___ = HPMHooks.source.thread.self(); } - if( HPMHooks.count.HP_thread_self_post ) { + if (HPMHooks.count.HP_thread_self_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8919,14 +8893,14 @@ struct thread_handle* HP_thread_self(void) { int HP_thread_get_tid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_thread_get_tid_pre ) { + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8934,9 +8908,9 @@ int HP_thread_get_tid(void) { { retVal___ = HPMHooks.source.thread.get_tid(); } - if( HPMHooks.count.HP_thread_get_tid_post ) { + if (HPMHooks.count.HP_thread_get_tid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -8946,14 +8920,14 @@ int HP_thread_get_tid(void) { bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_thread_wait_pre ) { + if (HPMHooks.count.HP_thread_wait_pre > 0) { bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; retVal___ = preHookFunc(&handle, &out_exit_code); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8961,9 +8935,9 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { { retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); } - if( HPMHooks.count.HP_thread_wait_post ) { + if (HPMHooks.count.HP_thread_wait_post > 0) { bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle, out_exit_code); } @@ -8972,14 +8946,14 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { } void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { int hIndex = 0; - if( HPMHooks.count.HP_thread_prio_set_pre ) { + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; preHookFunc(&handle, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8987,9 +8961,9 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { HPMHooks.source.thread.prio_set(handle, prio); } - if( HPMHooks.count.HP_thread_prio_set_post ) { + if (HPMHooks.count.HP_thread_prio_set_post > 0) { void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; postHookFunc(handle, prio); } @@ -8999,14 +8973,14 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { int hIndex = 0; enum thread_priority retVal___ = THREADPRIO_NORMAL; - if( HPMHooks.count.HP_thread_prio_get_pre ) { + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { enum thread_priority (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; retVal___ = preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9014,9 +8988,9 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { { retVal___ = HPMHooks.source.thread.prio_get(handle); } - if( HPMHooks.count.HP_thread_prio_get_post ) { + if (HPMHooks.count.HP_thread_prio_get_post > 0) { enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle); } @@ -9025,14 +8999,14 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { } void HP_thread_yield(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_yield_pre ) { + if (HPMHooks.count.HP_thread_yield_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9040,9 +9014,9 @@ void HP_thread_yield(void) { { HPMHooks.source.thread.yield(); } - if( HPMHooks.count.HP_thread_yield_post ) { + if (HPMHooks.count.HP_thread_yield_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; postHookFunc(); } @@ -9053,14 +9027,14 @@ void HP_thread_yield(void) { int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9068,9 +9042,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -9080,14 +9054,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9095,9 +9069,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -9107,14 +9081,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9122,9 +9096,9 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { + if (HPMHooks.count.HP_timer_add_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data); } @@ -9134,14 +9108,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9149,9 +9123,9 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } @@ -9161,14 +9135,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9176,9 +9150,9 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { + if (HPMHooks.count.HP_timer_get_post > 0) { const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid); } @@ -9188,14 +9162,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9203,9 +9177,9 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, int tid, TimerFunc func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, func); } @@ -9215,14 +9189,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9230,9 +9204,9 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -9242,14 +9216,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9257,9 +9231,9 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -9269,14 +9243,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9284,9 +9258,9 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { int (*postHookFunc) (int retVal___, TimerFunc func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, func, name); } @@ -9296,14 +9270,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9311,9 +9285,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -9323,14 +9297,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9338,9 +9312,9 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { int (*postHookFunc) (int retVal___, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick); } @@ -9349,14 +9323,14 @@ int HP_timer_perform(int64 tick) { } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9364,9 +9338,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -9375,14 +9349,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9390,9 +9364,9 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc index 6677a0c55..8c3b935ac 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,27 +25,26 @@ /* GENERATED FILE DO NOT EDIT */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); -memcpy(&HPMHooks.source.des, des, sizeof(struct des_interface)); -memcpy(&HPMHooks.source.lclif, lclif, sizeof(struct lclif_interface)); -memcpy(&HPMHooks.source.PRIV__lclif, lclif->p, sizeof(struct lclif_interface_private)); -memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.md5, md5, sizeof(struct md5_interface)); -memcpy(&HPMHooks.source.mutex, mutex, sizeof(struct mutex_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.rnd, rnd, sizeof(struct rnd_interface)); -memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.thread, thread, sizeof(struct thread_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); +HPMHooks.source.HCache = *HCache; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.lclif = *lclif; +HPMHooks.source.PRIV__lclif = *lclif->p; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.login = *login; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index d71ecc52f..c3e6d5529 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1062,6 +1062,8 @@ struct { 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_job_and_level_pre; + struct HPMHookPoint *HP_clif_party_job_and_level_post; struct HPMHookPoint *HP_clif_party_invite_pre; struct HPMHookPoint *HP_clif_party_invite_post; struct HPMHookPoint *HP_clif_party_inviteack_pre; @@ -1860,8 +1862,8 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; - struct HPMHookPoint *HP_clif_add_random_options_pre; - struct HPMHookPoint *HP_clif_add_random_options_post; + struct HPMHookPoint *HP_clif_add_item_options_pre; + struct HPMHookPoint *HP_clif_add_item_options_post; struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; @@ -1874,6 +1876,60 @@ struct { struct HPMHookPoint *HP_clif_pSelectCart_post; struct HPMHookPoint *HP_clif_get_bl_name_pre; struct HPMHookPoint *HP_clif_get_bl_name_post; + struct HPMHookPoint *HP_clif_pRodexOpenWriteMail_pre; + struct HPMHookPoint *HP_clif_pRodexOpenWriteMail_post; + struct HPMHookPoint *HP_clif_rodex_open_write_mail_pre; + struct HPMHookPoint *HP_clif_rodex_open_write_mail_post; + struct HPMHookPoint *HP_clif_pRodexAddItem_pre; + struct HPMHookPoint *HP_clif_pRodexAddItem_post; + struct HPMHookPoint *HP_clif_rodex_add_item_result_pre; + struct HPMHookPoint *HP_clif_rodex_add_item_result_post; + struct HPMHookPoint *HP_clif_pRodexRemoveItem_pre; + struct HPMHookPoint *HP_clif_pRodexRemoveItem_post; + struct HPMHookPoint *HP_clif_rodex_remove_item_result_pre; + struct HPMHookPoint *HP_clif_rodex_remove_item_result_post; + struct HPMHookPoint *HP_clif_pRodexSendMail_pre; + struct HPMHookPoint *HP_clif_pRodexSendMail_post; + struct HPMHookPoint *HP_clif_rodex_send_mail_result_pre; + struct HPMHookPoint *HP_clif_rodex_send_mail_result_post; + struct HPMHookPoint *HP_clif_rodex_send_maillist_pre; + struct HPMHookPoint *HP_clif_rodex_send_maillist_post; + struct HPMHookPoint *HP_clif_rodex_send_refresh_pre; + struct HPMHookPoint *HP_clif_rodex_send_refresh_post; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_pre; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_post; + struct HPMHookPoint *HP_clif_pRodexReadMail_pre; + struct HPMHookPoint *HP_clif_pRodexReadMail_post; + struct HPMHookPoint *HP_clif_rodex_read_mail_pre; + struct HPMHookPoint *HP_clif_rodex_read_mail_post; + struct HPMHookPoint *HP_clif_pRodexNextMaillist_pre; + struct HPMHookPoint *HP_clif_pRodexNextMaillist_post; + struct HPMHookPoint *HP_clif_pRodexCloseMailbox_pre; + struct HPMHookPoint *HP_clif_pRodexCloseMailbox_post; + struct HPMHookPoint *HP_clif_pRodexCancelWriteMail_pre; + struct HPMHookPoint *HP_clif_pRodexCancelWriteMail_post; + struct HPMHookPoint *HP_clif_pRodexOpenMailbox_pre; + struct HPMHookPoint *HP_clif_pRodexOpenMailbox_post; + struct HPMHookPoint *HP_clif_pRodexCheckName_pre; + struct HPMHookPoint *HP_clif_pRodexCheckName_post; + struct HPMHookPoint *HP_clif_rodex_checkname_result_pre; + struct HPMHookPoint *HP_clif_rodex_checkname_result_post; + struct HPMHookPoint *HP_clif_pRodexDeleteMail_pre; + struct HPMHookPoint *HP_clif_pRodexDeleteMail_post; + struct HPMHookPoint *HP_clif_rodex_delete_mail_pre; + struct HPMHookPoint *HP_clif_rodex_delete_mail_post; + struct HPMHookPoint *HP_clif_pRodexRefreshMaillist_pre; + struct HPMHookPoint *HP_clif_pRodexRefreshMaillist_post; + struct HPMHookPoint *HP_clif_pRodexRequestZeny_pre; + struct HPMHookPoint *HP_clif_pRodexRequestZeny_post; + struct HPMHookPoint *HP_clif_rodex_request_zeny_pre; + struct HPMHookPoint *HP_clif_rodex_request_zeny_post; + struct HPMHookPoint *HP_clif_pRodexRequestItems_pre; + struct HPMHookPoint *HP_clif_pRodexRequestItems_post; + struct HPMHookPoint *HP_clif_rodex_request_items_pre; + struct HPMHookPoint *HP_clif_rodex_request_items_post; + struct HPMHookPoint *HP_clif_rodex_icon_pre; + struct HPMHookPoint *HP_clif_rodex_icon_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -2386,6 +2442,10 @@ struct { 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_account_storage_pre; + struct HPMHookPoint *HP_intif_request_account_storage_post; + struct HPMHookPoint *HP_intif_send_account_storage_pre; + struct HPMHookPoint *HP_intif_send_account_storage_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; @@ -2502,6 +2562,16 @@ struct { 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_rodex_requestinbox_pre; + struct HPMHookPoint *HP_intif_rodex_requestinbox_post; + struct HPMHookPoint *HP_intif_rodex_checkhasnew_pre; + struct HPMHookPoint *HP_intif_rodex_checkhasnew_post; + struct HPMHookPoint *HP_intif_rodex_updatemail_pre; + struct HPMHookPoint *HP_intif_rodex_updatemail_post; + struct HPMHookPoint *HP_intif_rodex_sendmail_pre; + struct HPMHookPoint *HP_intif_rodex_sendmail_post; + struct HPMHookPoint *HP_intif_rodex_checkname_pre; + struct HPMHookPoint *HP_intif_rodex_checkname_post; struct HPMHookPoint *HP_intif_request_accinfo_pre; struct HPMHookPoint *HP_intif_request_accinfo_post; struct HPMHookPoint *HP_intif_CheckForCharServer_pre; @@ -2516,10 +2586,14 @@ struct { struct HPMHookPoint *HP_intif_pWisToGM_post; struct HPMHookPoint *HP_intif_pRegisters_pre; struct HPMHookPoint *HP_intif_pRegisters_post; + struct HPMHookPoint *HP_intif_pAccountStorage_pre; + struct HPMHookPoint *HP_intif_pAccountStorage_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_pAccountStorageSaveAck_pre; + struct HPMHookPoint *HP_intif_pAccountStorageSaveAck_post; struct HPMHookPoint *HP_intif_pLoadGuildStorage_pre; struct HPMHookPoint *HP_intif_pLoadGuildStorage_post; struct HPMHookPoint *HP_intif_pSaveGuildStorage_pre; @@ -2630,6 +2704,14 @@ struct { struct HPMHookPoint *HP_intif_pSaveHomunculusOk_post; struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_pre; struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_post; + struct HPMHookPoint *HP_intif_pRequestRodexOpenInbox_pre; + struct HPMHookPoint *HP_intif_pRequestRodexOpenInbox_post; + struct HPMHookPoint *HP_intif_pRodexHasNew_pre; + struct HPMHookPoint *HP_intif_pRodexHasNew_post; + struct HPMHookPoint *HP_intif_pRodexSendMail_pre; + struct HPMHookPoint *HP_intif_pRodexSendMail_post; + struct HPMHookPoint *HP_intif_pRodexCheckName_pre; + struct HPMHookPoint *HP_intif_pRodexCheckName_post; struct HPMHookPoint *HP_ircbot_init_pre; struct HPMHookPoint *HP_ircbot_init_post; struct HPMHookPoint *HP_ircbot_final_pre; @@ -2682,6 +2764,8 @@ struct { 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_read_options_pre; + struct HPMHookPoint *HP_itemdb_read_options_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; @@ -2698,6 +2782,8 @@ struct { struct HPMHookPoint *HP_itemdb_search_post; struct HPMHookPoint *HP_itemdb_exists_pre; struct HPMHookPoint *HP_itemdb_exists_post; + struct HPMHookPoint *HP_itemdb_option_exists_pre; + struct HPMHookPoint *HP_itemdb_option_exists_post; struct HPMHookPoint *HP_itemdb_in_group_pre; struct HPMHookPoint *HP_itemdb_in_group_post; struct HPMHookPoint *HP_itemdb_group_item_pre; @@ -2762,6 +2848,8 @@ struct { struct HPMHookPoint *HP_itemdb_gendercheck_post; struct HPMHookPoint *HP_itemdb_validate_entry_pre; struct HPMHookPoint *HP_itemdb_validate_entry_post; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_pre; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_pre; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_job_sub_pre; @@ -2778,6 +2866,8 @@ struct { 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_itemdb_options_final_sub_pre; + struct HPMHookPoint *HP_itemdb_options_final_sub_post; struct HPMHookPoint *HP_itemdb_clear_pre; struct HPMHookPoint *HP_itemdb_clear_post; struct HPMHookPoint *HP_itemdb_id2combo_pre; @@ -2786,6 +2876,8 @@ struct { struct HPMHookPoint *HP_itemdb_is_item_usable_post; struct HPMHookPoint *HP_itemdb_lookup_const_pre; struct HPMHookPoint *HP_itemdb_lookup_const_post; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_pre; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -2984,34 +3076,6 @@ struct { struct HPMHookPoint *HP_mail_deliveryfail_post; struct HPMHookPoint *HP_mail_invalid_operation_pre; struct HPMHookPoint *HP_mail_invalid_operation_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_post; struct HPMHookPoint *HP_map_zone_init_pre; struct HPMHookPoint *HP_map_zone_init_post; struct HPMHookPoint *HP_map_zone_remove_pre; @@ -3854,6 +3918,8 @@ struct { struct HPMHookPoint *HP_npc_market_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; + struct HPMHookPoint *HP_npc_refresh_pre; + struct HPMHookPoint *HP_npc_refresh_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; @@ -4028,6 +4094,8 @@ struct { struct HPMHookPoint *HP_pc_isequip_post; struct HPMHookPoint *HP_pc_equippoint_pre; struct HPMHookPoint *HP_pc_equippoint_post; + struct HPMHookPoint *HP_pc_item_equippoint_pre; + struct HPMHookPoint *HP_pc_item_equippoint_post; struct HPMHookPoint *HP_pc_setinventorydata_pre; struct HPMHookPoint *HP_pc_setinventorydata_post; struct HPMHookPoint *HP_pc_checkskill_pre; @@ -4294,8 +4362,10 @@ struct { struct HPMHookPoint *HP_pc_getmaxspiritball_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_fame_rank_pre; + struct HPMHookPoint *HP_pc_fame_rank_post; + struct HPMHookPoint *HP_pc_famelist_type_pre; + struct HPMHookPoint *HP_pc_famelist_type_post; struct HPMHookPoint *HP_pc_set_hate_mob_pre; struct HPMHookPoint *HP_pc_set_hate_mob_post; struct HPMHookPoint *HP_pc_readdb_pre; @@ -4408,6 +4478,8 @@ struct { struct HPMHookPoint *HP_pc_db_checkid_post; struct HPMHookPoint *HP_pc_validate_levels_pre; struct HPMHookPoint *HP_pc_validate_levels_post; + struct HPMHookPoint *HP_pc_update_job_and_level_pre; + struct HPMHookPoint *HP_pc_update_job_and_level_post; struct HPMHookPoint *HP_pc_autotrade_load_pre; struct HPMHookPoint *HP_pc_autotrade_load_post; struct HPMHookPoint *HP_pc_autotrade_update_pre; @@ -4430,6 +4502,8 @@ struct { struct HPMHookPoint *HP_pc_process_chat_message_post; struct HPMHookPoint *HP_pc_check_supernovice_call_pre; struct HPMHookPoint *HP_pc_check_supernovice_call_post; + struct HPMHookPoint *HP_pc_check_basicskill_pre; + struct HPMHookPoint *HP_pc_check_basicskill_post; struct HPMHookPoint *HP_libpcre_compile_pre; struct HPMHookPoint *HP_libpcre_compile_post; struct HPMHookPoint *HP_libpcre_study_pre; @@ -4568,6 +4642,40 @@ struct { struct HPMHookPoint *HP_rnd_uniform_post; struct HPMHookPoint *HP_rnd_uniform53_pre; struct HPMHookPoint *HP_rnd_uniform53_post; + struct HPMHookPoint *HP_rodex_init_pre; + struct HPMHookPoint *HP_rodex_init_post; + struct HPMHookPoint *HP_rodex_final_pre; + struct HPMHookPoint *HP_rodex_final_post; + struct HPMHookPoint *HP_rodex_isenabled_pre; + struct HPMHookPoint *HP_rodex_isenabled_post; + struct HPMHookPoint *HP_rodex_open_pre; + struct HPMHookPoint *HP_rodex_open_post; + struct HPMHookPoint *HP_rodex_next_page_pre; + struct HPMHookPoint *HP_rodex_next_page_post; + struct HPMHookPoint *HP_rodex_refresh_pre; + struct HPMHookPoint *HP_rodex_refresh_post; + struct HPMHookPoint *HP_rodex_add_item_pre; + struct HPMHookPoint *HP_rodex_add_item_post; + struct HPMHookPoint *HP_rodex_remove_item_pre; + struct HPMHookPoint *HP_rodex_remove_item_post; + struct HPMHookPoint *HP_rodex_check_player_pre; + struct HPMHookPoint *HP_rodex_check_player_post; + struct HPMHookPoint *HP_rodex_send_mail_pre; + struct HPMHookPoint *HP_rodex_send_mail_post; + struct HPMHookPoint *HP_rodex_send_mail_result_pre; + struct HPMHookPoint *HP_rodex_send_mail_result_post; + struct HPMHookPoint *HP_rodex_get_mail_pre; + struct HPMHookPoint *HP_rodex_get_mail_post; + struct HPMHookPoint *HP_rodex_read_mail_pre; + struct HPMHookPoint *HP_rodex_read_mail_post; + struct HPMHookPoint *HP_rodex_get_zeny_pre; + struct HPMHookPoint *HP_rodex_get_zeny_post; + struct HPMHookPoint *HP_rodex_get_items_pre; + struct HPMHookPoint *HP_rodex_get_items_post; + struct HPMHookPoint *HP_rodex_delete_mail_pre; + struct HPMHookPoint *HP_rodex_delete_mail_post; + struct HPMHookPoint *HP_rodex_clean_pre; + struct HPMHookPoint *HP_rodex_clean_post; struct HPMHookPoint *HP_script_init_pre; struct HPMHookPoint *HP_script_init_post; struct HPMHookPoint *HP_script_final_pre; @@ -4610,6 +4718,8 @@ struct { struct HPMHookPoint *HP_script_get_val_post; struct HPMHookPoint *HP_script_get_val_ref_str_pre; struct HPMHookPoint *HP_script_get_val_ref_str_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_post; struct HPMHookPoint *HP_script_get_val_scope_str_pre; struct HPMHookPoint *HP_script_get_val_scope_str_post; struct HPMHookPoint *HP_script_get_val_npc_str_pre; @@ -4618,6 +4728,8 @@ struct { struct HPMHookPoint *HP_script_get_val_instance_str_post; struct HPMHookPoint *HP_script_get_val_ref_num_pre; struct HPMHookPoint *HP_script_get_val_ref_num_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_post; struct HPMHookPoint *HP_script_get_val_scope_num_pre; struct HPMHookPoint *HP_script_get_val_scope_num_post; struct HPMHookPoint *HP_script_get_val_npc_num_pre; @@ -4772,6 +4884,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_post; struct HPMHookPoint *HP_script_set_reg_ref_str_pre; struct HPMHookPoint *HP_script_set_reg_ref_str_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_post; struct HPMHookPoint *HP_script_set_reg_scope_str_pre; struct HPMHookPoint *HP_script_set_reg_scope_str_post; struct HPMHookPoint *HP_script_set_reg_npc_str_pre; @@ -4780,6 +4894,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_instance_str_post; struct HPMHookPoint *HP_script_set_reg_ref_num_pre; struct HPMHookPoint *HP_script_set_reg_ref_num_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_post; struct HPMHookPoint *HP_script_set_reg_scope_num_pre; struct HPMHookPoint *HP_script_set_reg_scope_num_post; struct HPMHookPoint *HP_script_set_reg_npc_num_pre; @@ -4810,6 +4926,12 @@ struct { 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_recovery_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_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; @@ -5626,6 +5748,22 @@ struct { 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_is_immune_to_status_pre; + struct HPMHookPoint *HP_status_is_immune_to_status_post; + struct HPMHookPoint *HP_status_is_boss_resist_sc_pre; + struct HPMHookPoint *HP_status_is_boss_resist_sc_post; + struct HPMHookPoint *HP_status_end_sc_before_start_pre; + struct HPMHookPoint *HP_status_end_sc_before_start_post; + struct HPMHookPoint *HP_status_change_start_stop_action_pre; + struct HPMHookPoint *HP_status_change_start_stop_action_post; + struct HPMHookPoint *HP_status_change_start_set_option_pre; + struct HPMHookPoint *HP_status_change_start_set_option_post; + struct HPMHookPoint *HP_status_get_val_flag_pre; + struct HPMHookPoint *HP_status_get_val_flag_post; + struct HPMHookPoint *HP_status_change_start_display_pre; + struct HPMHookPoint *HP_status_change_start_display_post; + struct HPMHookPoint *HP_status_change_start_unknown_sc_pre; + struct HPMHookPoint *HP_status_change_start_unknown_sc_post; struct HPMHookPoint *HP_status_kaahi_heal_timer_pre; struct HPMHookPoint *HP_status_kaahi_heal_timer_post; struct HPMHookPoint *HP_status_change_timer_pre; @@ -7125,6 +7263,8 @@ struct { int HP_clif_party_member_info_post; int HP_clif_party_info_pre; int HP_clif_party_info_post; + int HP_clif_party_job_and_level_pre; + int HP_clif_party_job_and_level_post; int HP_clif_party_invite_pre; int HP_clif_party_invite_post; int HP_clif_party_inviteack_pre; @@ -7923,8 +8063,8 @@ struct { int HP_clif_pNPCMarketClosed_post; int HP_clif_pNPCMarketPurchase_pre; int HP_clif_pNPCMarketPurchase_post; - int HP_clif_add_random_options_pre; - int HP_clif_add_random_options_post; + int HP_clif_add_item_options_pre; + int HP_clif_add_item_options_post; int HP_clif_pHotkeyRowShift_pre; int HP_clif_pHotkeyRowShift_post; int HP_clif_dressroom_open_pre; @@ -7937,6 +8077,60 @@ struct { int HP_clif_pSelectCart_post; int HP_clif_get_bl_name_pre; int HP_clif_get_bl_name_post; + int HP_clif_pRodexOpenWriteMail_pre; + int HP_clif_pRodexOpenWriteMail_post; + int HP_clif_rodex_open_write_mail_pre; + int HP_clif_rodex_open_write_mail_post; + int HP_clif_pRodexAddItem_pre; + int HP_clif_pRodexAddItem_post; + int HP_clif_rodex_add_item_result_pre; + int HP_clif_rodex_add_item_result_post; + int HP_clif_pRodexRemoveItem_pre; + int HP_clif_pRodexRemoveItem_post; + int HP_clif_rodex_remove_item_result_pre; + int HP_clif_rodex_remove_item_result_post; + int HP_clif_pRodexSendMail_pre; + int HP_clif_pRodexSendMail_post; + int HP_clif_rodex_send_mail_result_pre; + int HP_clif_rodex_send_mail_result_post; + int HP_clif_rodex_send_maillist_pre; + int HP_clif_rodex_send_maillist_post; + int HP_clif_rodex_send_refresh_pre; + int HP_clif_rodex_send_refresh_post; + int HP_clif_rodex_send_mails_all_pre; + int HP_clif_rodex_send_mails_all_post; + int HP_clif_pRodexReadMail_pre; + int HP_clif_pRodexReadMail_post; + int HP_clif_rodex_read_mail_pre; + int HP_clif_rodex_read_mail_post; + int HP_clif_pRodexNextMaillist_pre; + int HP_clif_pRodexNextMaillist_post; + int HP_clif_pRodexCloseMailbox_pre; + int HP_clif_pRodexCloseMailbox_post; + int HP_clif_pRodexCancelWriteMail_pre; + int HP_clif_pRodexCancelWriteMail_post; + int HP_clif_pRodexOpenMailbox_pre; + int HP_clif_pRodexOpenMailbox_post; + int HP_clif_pRodexCheckName_pre; + int HP_clif_pRodexCheckName_post; + int HP_clif_rodex_checkname_result_pre; + int HP_clif_rodex_checkname_result_post; + int HP_clif_pRodexDeleteMail_pre; + int HP_clif_pRodexDeleteMail_post; + int HP_clif_rodex_delete_mail_pre; + int HP_clif_rodex_delete_mail_post; + int HP_clif_pRodexRefreshMaillist_pre; + int HP_clif_pRodexRefreshMaillist_post; + int HP_clif_pRodexRequestZeny_pre; + int HP_clif_pRodexRequestZeny_post; + int HP_clif_rodex_request_zeny_pre; + int HP_clif_rodex_request_zeny_post; + int HP_clif_pRodexRequestItems_pre; + int HP_clif_pRodexRequestItems_post; + int HP_clif_rodex_request_items_pre; + int HP_clif_rodex_request_items_post; + int HP_clif_rodex_icon_pre; + int HP_clif_rodex_icon_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -8449,6 +8643,10 @@ struct { int HP_intif_saveregistry_post; int HP_intif_request_registry_pre; int HP_intif_request_registry_post; + int HP_intif_request_account_storage_pre; + int HP_intif_request_account_storage_post; + int HP_intif_send_account_storage_pre; + int HP_intif_send_account_storage_post; int HP_intif_request_guild_storage_pre; int HP_intif_request_guild_storage_post; int HP_intif_send_guild_storage_pre; @@ -8565,6 +8763,16 @@ struct { int HP_intif_elemental_delete_post; int HP_intif_elemental_save_pre; int HP_intif_elemental_save_post; + int HP_intif_rodex_requestinbox_pre; + int HP_intif_rodex_requestinbox_post; + int HP_intif_rodex_checkhasnew_pre; + int HP_intif_rodex_checkhasnew_post; + int HP_intif_rodex_updatemail_pre; + int HP_intif_rodex_updatemail_post; + int HP_intif_rodex_sendmail_pre; + int HP_intif_rodex_sendmail_post; + int HP_intif_rodex_checkname_pre; + int HP_intif_rodex_checkname_post; int HP_intif_request_accinfo_pre; int HP_intif_request_accinfo_post; int HP_intif_CheckForCharServer_pre; @@ -8579,10 +8787,14 @@ struct { int HP_intif_pWisToGM_post; int HP_intif_pRegisters_pre; int HP_intif_pRegisters_post; + int HP_intif_pAccountStorage_pre; + int HP_intif_pAccountStorage_post; int HP_intif_pChangeNameOk_pre; int HP_intif_pChangeNameOk_post; int HP_intif_pMessageToFD_pre; int HP_intif_pMessageToFD_post; + int HP_intif_pAccountStorageSaveAck_pre; + int HP_intif_pAccountStorageSaveAck_post; int HP_intif_pLoadGuildStorage_pre; int HP_intif_pLoadGuildStorage_post; int HP_intif_pSaveGuildStorage_pre; @@ -8693,6 +8905,14 @@ struct { int HP_intif_pSaveHomunculusOk_post; int HP_intif_pDeleteHomunculusOk_pre; int HP_intif_pDeleteHomunculusOk_post; + int HP_intif_pRequestRodexOpenInbox_pre; + int HP_intif_pRequestRodexOpenInbox_post; + int HP_intif_pRodexHasNew_pre; + int HP_intif_pRodexHasNew_post; + int HP_intif_pRodexSendMail_pre; + int HP_intif_pRodexSendMail_post; + int HP_intif_pRodexCheckName_pre; + int HP_intif_pRodexCheckName_post; int HP_ircbot_init_pre; int HP_ircbot_init_post; int HP_ircbot_final_pre; @@ -8745,6 +8965,8 @@ struct { int HP_itemdb_read_chains_post; int HP_itemdb_read_packages_pre; int HP_itemdb_read_packages_post; + int HP_itemdb_read_options_pre; + int HP_itemdb_read_options_post; int HP_itemdb_write_cached_packages_pre; int HP_itemdb_write_cached_packages_post; int HP_itemdb_read_cached_packages_pre; @@ -8761,6 +8983,8 @@ struct { int HP_itemdb_search_post; int HP_itemdb_exists_pre; int HP_itemdb_exists_post; + int HP_itemdb_option_exists_pre; + int HP_itemdb_option_exists_post; int HP_itemdb_in_group_pre; int HP_itemdb_in_group_post; int HP_itemdb_group_item_pre; @@ -8825,6 +9049,8 @@ struct { int HP_itemdb_gendercheck_post; int HP_itemdb_validate_entry_pre; int HP_itemdb_validate_entry_post; + int HP_itemdb_readdb_options_additional_fields_pre; + int HP_itemdb_readdb_options_additional_fields_post; int HP_itemdb_readdb_additional_fields_pre; int HP_itemdb_readdb_additional_fields_post; int HP_itemdb_readdb_job_sub_pre; @@ -8841,6 +9067,8 @@ struct { int HP_itemdb_destroy_item_data_post; int HP_itemdb_final_sub_pre; int HP_itemdb_final_sub_post; + int HP_itemdb_options_final_sub_pre; + int HP_itemdb_options_final_sub_post; int HP_itemdb_clear_pre; int HP_itemdb_clear_post; int HP_itemdb_id2combo_pre; @@ -8849,6 +9077,8 @@ struct { int HP_itemdb_is_item_usable_post; int HP_itemdb_lookup_const_pre; int HP_itemdb_lookup_const_post; + int HP_itemdb_lookup_const_mask_pre; + int HP_itemdb_lookup_const_mask_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -9047,34 +9277,6 @@ struct { int HP_mail_deliveryfail_post; int HP_mail_invalid_operation_pre; int HP_mail_invalid_operation_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_post; int HP_map_zone_init_pre; int HP_map_zone_init_post; int HP_map_zone_remove_pre; @@ -9917,6 +10119,8 @@ struct { int HP_npc_market_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; + int HP_npc_refresh_pre; + int HP_npc_refresh_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; int HP_nullpo_assert_report_pre; @@ -10091,6 +10295,8 @@ struct { int HP_pc_isequip_post; int HP_pc_equippoint_pre; int HP_pc_equippoint_post; + int HP_pc_item_equippoint_pre; + int HP_pc_item_equippoint_post; int HP_pc_setinventorydata_pre; int HP_pc_setinventorydata_post; int HP_pc_checkskill_pre; @@ -10357,8 +10563,10 @@ struct { int HP_pc_getmaxspiritball_post; int HP_pc_addfame_pre; int HP_pc_addfame_post; - int HP_pc_famerank_pre; - int HP_pc_famerank_post; + int HP_pc_fame_rank_pre; + int HP_pc_fame_rank_post; + int HP_pc_famelist_type_pre; + int HP_pc_famelist_type_post; int HP_pc_set_hate_mob_pre; int HP_pc_set_hate_mob_post; int HP_pc_readdb_pre; @@ -10471,6 +10679,8 @@ struct { int HP_pc_db_checkid_post; int HP_pc_validate_levels_pre; int HP_pc_validate_levels_post; + int HP_pc_update_job_and_level_pre; + int HP_pc_update_job_and_level_post; int HP_pc_autotrade_load_pre; int HP_pc_autotrade_load_post; int HP_pc_autotrade_update_pre; @@ -10493,6 +10703,8 @@ struct { int HP_pc_process_chat_message_post; int HP_pc_check_supernovice_call_pre; int HP_pc_check_supernovice_call_post; + int HP_pc_check_basicskill_pre; + int HP_pc_check_basicskill_post; int HP_libpcre_compile_pre; int HP_libpcre_compile_post; int HP_libpcre_study_pre; @@ -10631,6 +10843,40 @@ struct { int HP_rnd_uniform_post; int HP_rnd_uniform53_pre; int HP_rnd_uniform53_post; + int HP_rodex_init_pre; + int HP_rodex_init_post; + int HP_rodex_final_pre; + int HP_rodex_final_post; + int HP_rodex_isenabled_pre; + int HP_rodex_isenabled_post; + int HP_rodex_open_pre; + int HP_rodex_open_post; + int HP_rodex_next_page_pre; + int HP_rodex_next_page_post; + int HP_rodex_refresh_pre; + int HP_rodex_refresh_post; + int HP_rodex_add_item_pre; + int HP_rodex_add_item_post; + int HP_rodex_remove_item_pre; + int HP_rodex_remove_item_post; + int HP_rodex_check_player_pre; + int HP_rodex_check_player_post; + int HP_rodex_send_mail_pre; + int HP_rodex_send_mail_post; + int HP_rodex_send_mail_result_pre; + int HP_rodex_send_mail_result_post; + int HP_rodex_get_mail_pre; + int HP_rodex_get_mail_post; + int HP_rodex_read_mail_pre; + int HP_rodex_read_mail_post; + int HP_rodex_get_zeny_pre; + int HP_rodex_get_zeny_post; + int HP_rodex_get_items_pre; + int HP_rodex_get_items_post; + int HP_rodex_delete_mail_pre; + int HP_rodex_delete_mail_post; + int HP_rodex_clean_pre; + int HP_rodex_clean_post; int HP_script_init_pre; int HP_script_init_post; int HP_script_final_pre; @@ -10673,6 +10919,8 @@ struct { int HP_script_get_val_post; int HP_script_get_val_ref_str_pre; int HP_script_get_val_ref_str_post; + int HP_script_get_val_pc_ref_str_pre; + int HP_script_get_val_pc_ref_str_post; int HP_script_get_val_scope_str_pre; int HP_script_get_val_scope_str_post; int HP_script_get_val_npc_str_pre; @@ -10681,6 +10929,8 @@ struct { int HP_script_get_val_instance_str_post; int HP_script_get_val_ref_num_pre; int HP_script_get_val_ref_num_post; + int HP_script_get_val_pc_ref_num_pre; + int HP_script_get_val_pc_ref_num_post; int HP_script_get_val_scope_num_pre; int HP_script_get_val_scope_num_post; int HP_script_get_val_npc_num_pre; @@ -10835,6 +11085,8 @@ struct { int HP_script_set_reg_post; int HP_script_set_reg_ref_str_pre; int HP_script_set_reg_ref_str_post; + int HP_script_set_reg_pc_ref_str_pre; + int HP_script_set_reg_pc_ref_str_post; int HP_script_set_reg_scope_str_pre; int HP_script_set_reg_scope_str_post; int HP_script_set_reg_npc_str_pre; @@ -10843,6 +11095,8 @@ struct { int HP_script_set_reg_instance_str_post; int HP_script_set_reg_ref_num_pre; int HP_script_set_reg_ref_num_post; + int HP_script_set_reg_pc_ref_num_pre; + int HP_script_set_reg_pc_ref_num_post; int HP_script_set_reg_scope_num_pre; int HP_script_set_reg_scope_num_post; int HP_script_set_reg_npc_num_pre; @@ -10873,6 +11127,12 @@ struct { int HP_script_add_autobonus_post; int HP_script_menu_countoptions_pre; int HP_script_menu_countoptions_post; + int HP_script_buildin_recovery_sub_pre; + int HP_script_buildin_recovery_sub_post; + int HP_script_buildin_recovery_pc_sub_pre; + int HP_script_buildin_recovery_pc_sub_post; + int HP_script_buildin_recovery_bl_sub_pre; + int HP_script_buildin_recovery_bl_sub_post; int HP_script_buildin_areawarp_sub_pre; int HP_script_buildin_areawarp_sub_post; int HP_script_buildin_areapercentheal_sub_pre; @@ -11689,6 +11949,22 @@ struct { int HP_status_change_start_post; int HP_status_change_end__pre; int HP_status_change_end__post; + int HP_status_is_immune_to_status_pre; + int HP_status_is_immune_to_status_post; + int HP_status_is_boss_resist_sc_pre; + int HP_status_is_boss_resist_sc_post; + int HP_status_end_sc_before_start_pre; + int HP_status_end_sc_before_start_post; + int HP_status_change_start_stop_action_pre; + int HP_status_change_start_stop_action_post; + int HP_status_change_start_set_option_pre; + int HP_status_change_start_set_option_post; + int HP_status_get_val_flag_pre; + int HP_status_get_val_flag_post; + int HP_status_change_start_display_pre; + int HP_status_change_start_display_post; + int HP_status_change_start_unknown_sc_pre; + int HP_status_change_start_unknown_sc_post; int HP_status_kaahi_heal_timer_pre; int HP_status_kaahi_heal_timer_post; int HP_status_change_timer_pre; @@ -12179,7 +12455,6 @@ struct { struct libconfig_interface libconfig; struct log_interface logs; struct mail_interface mail; - struct malloc_interface iMalloc; struct map_interface map; struct mapindex_interface mapindex; struct mapit_interface mapit; @@ -12199,6 +12474,7 @@ struct { struct pet_interface pet; struct quest_interface quest; struct rnd_interface rnd; + struct rodex_interface rodex; struct script_interface script; struct searchstore_interface searchstore; struct showmsg_interface showmsg; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index b6ee443a3..15052b7f1 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -553,6 +553,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->party_created, HP_clif_party_created) }, { HP_POP(clif->party_member_info, HP_clif_party_member_info) }, { HP_POP(clif->party_info, HP_clif_party_info) }, + { HP_POP(clif->party_job_and_level, HP_clif_party_job_and_level) }, { HP_POP(clif->party_invite, HP_clif_party_invite) }, { HP_POP(clif->party_inviteack, HP_clif_party_inviteack) }, { HP_POP(clif->party_option, HP_clif_party_option) }, @@ -952,13 +953,40 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, - { HP_POP(clif->add_random_options, HP_clif_add_random_options) }, + { HP_POP(clif->add_item_options, HP_clif_add_item_options) }, { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, { HP_POP(clif->pOneClick_ItemIdentify, HP_clif_pOneClick_ItemIdentify) }, { HP_POP(clif->selectcart, HP_clif_selectcart) }, { HP_POP(clif->pSelectCart, HP_clif_pSelectCart) }, { HP_POP(clif->get_bl_name, HP_clif_get_bl_name) }, + { HP_POP(clif->pRodexOpenWriteMail, HP_clif_pRodexOpenWriteMail) }, + { HP_POP(clif->rodex_open_write_mail, HP_clif_rodex_open_write_mail) }, + { HP_POP(clif->pRodexAddItem, HP_clif_pRodexAddItem) }, + { HP_POP(clif->rodex_add_item_result, HP_clif_rodex_add_item_result) }, + { HP_POP(clif->pRodexRemoveItem, HP_clif_pRodexRemoveItem) }, + { HP_POP(clif->rodex_remove_item_result, HP_clif_rodex_remove_item_result) }, + { HP_POP(clif->pRodexSendMail, HP_clif_pRodexSendMail) }, + { HP_POP(clif->rodex_send_mail_result, HP_clif_rodex_send_mail_result) }, + { HP_POP(clif->rodex_send_maillist, HP_clif_rodex_send_maillist) }, + { HP_POP(clif->rodex_send_refresh, HP_clif_rodex_send_refresh) }, + { HP_POP(clif->rodex_send_mails_all, HP_clif_rodex_send_mails_all) }, + { HP_POP(clif->pRodexReadMail, HP_clif_pRodexReadMail) }, + { HP_POP(clif->rodex_read_mail, HP_clif_rodex_read_mail) }, + { HP_POP(clif->pRodexNextMaillist, HP_clif_pRodexNextMaillist) }, + { HP_POP(clif->pRodexCloseMailbox, HP_clif_pRodexCloseMailbox) }, + { HP_POP(clif->pRodexCancelWriteMail, HP_clif_pRodexCancelWriteMail) }, + { HP_POP(clif->pRodexOpenMailbox, HP_clif_pRodexOpenMailbox) }, + { HP_POP(clif->pRodexCheckName, HP_clif_pRodexCheckName) }, + { HP_POP(clif->rodex_checkname_result, HP_clif_rodex_checkname_result) }, + { HP_POP(clif->pRodexDeleteMail, HP_clif_pRodexDeleteMail) }, + { HP_POP(clif->rodex_delete_mail, HP_clif_rodex_delete_mail) }, + { HP_POP(clif->pRodexRefreshMaillist, HP_clif_pRodexRefreshMaillist) }, + { HP_POP(clif->pRodexRequestZeny, HP_clif_pRodexRequestZeny) }, + { HP_POP(clif->rodex_request_zeny, HP_clif_rodex_request_zeny) }, + { HP_POP(clif->pRodexRequestItems, HP_clif_pRodexRequestItems) }, + { HP_POP(clif->rodex_request_items, HP_clif_rodex_request_items) }, + { HP_POP(clif->rodex_icon, HP_clif_rodex_icon) }, /* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, @@ -1228,6 +1256,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) }, { HP_POP(intif->saveregistry, HP_intif_saveregistry) }, { HP_POP(intif->request_registry, HP_intif_request_registry) }, + { HP_POP(intif->request_account_storage, HP_intif_request_account_storage) }, + { HP_POP(intif->send_account_storage, HP_intif_send_account_storage) }, { HP_POP(intif->request_guild_storage, HP_intif_request_guild_storage) }, { HP_POP(intif->send_guild_storage, HP_intif_send_guild_storage) }, { HP_POP(intif->create_party, HP_intif_create_party) }, @@ -1286,6 +1316,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->elemental_request, HP_intif_elemental_request) }, { HP_POP(intif->elemental_delete, HP_intif_elemental_delete) }, { HP_POP(intif->elemental_save, HP_intif_elemental_save) }, + { HP_POP(intif->rodex_requestinbox, HP_intif_rodex_requestinbox) }, + { HP_POP(intif->rodex_checkhasnew, HP_intif_rodex_checkhasnew) }, + { HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) }, + { HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) }, + { HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) }, { HP_POP(intif->request_accinfo, HP_intif_request_accinfo) }, { HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) }, { HP_POP(intif->pWisMessage, HP_intif_pWisMessage) }, @@ -1293,8 +1328,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) }, { HP_POP(intif->pWisToGM, HP_intif_pWisToGM) }, { HP_POP(intif->pRegisters, HP_intif_pRegisters) }, + { HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) }, { HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) }, { HP_POP(intif->pMessageToFD, HP_intif_pMessageToFD) }, + { HP_POP(intif->pAccountStorageSaveAck, HP_intif_pAccountStorageSaveAck) }, { HP_POP(intif->pLoadGuildStorage, HP_intif_pLoadGuildStorage) }, { HP_POP(intif->pSaveGuildStorage, HP_intif_pSaveGuildStorage) }, { HP_POP(intif->pPartyCreated, HP_intif_pPartyCreated) }, @@ -1350,6 +1387,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pRecvHomunculusData, HP_intif_pRecvHomunculusData) }, { HP_POP(intif->pSaveHomunculusOk, HP_intif_pSaveHomunculusOk) }, { HP_POP(intif->pDeleteHomunculusOk, HP_intif_pDeleteHomunculusOk) }, + { HP_POP(intif->pRequestRodexOpenInbox, HP_intif_pRequestRodexOpenInbox) }, + { HP_POP(intif->pRodexHasNew, HP_intif_pRodexHasNew) }, + { HP_POP(intif->pRodexSendMail, HP_intif_pRodexSendMail) }, + { HP_POP(intif->pRodexCheckName, HP_intif_pRodexCheckName) }, /* irc_bot_interface */ { HP_POP(ircbot->init, HP_ircbot_init) }, { HP_POP(ircbot->final, HP_ircbot_final) }, @@ -1378,6 +1419,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_groups, HP_itemdb_read_groups) }, { HP_POP(itemdb->read_chains, HP_itemdb_read_chains) }, { HP_POP(itemdb->read_packages, HP_itemdb_read_packages) }, + { HP_POP(itemdb->read_options, HP_itemdb_read_options) }, { HP_POP(itemdb->write_cached_packages, HP_itemdb_write_cached_packages) }, { HP_POP(itemdb->read_cached_packages, HP_itemdb_read_cached_packages) }, { HP_POP(itemdb->name2id, HP_itemdb_name2id) }, @@ -1386,6 +1428,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->load, HP_itemdb_load) }, { HP_POP(itemdb->search, HP_itemdb_search) }, { HP_POP(itemdb->exists, HP_itemdb_exists) }, + { HP_POP(itemdb->option_exists, HP_itemdb_option_exists) }, { HP_POP(itemdb->in_group, HP_itemdb_in_group) }, { HP_POP(itemdb->group_item, HP_itemdb_group_item) }, { HP_POP(itemdb->chain_item, HP_itemdb_chain_item) }, @@ -1418,6 +1461,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_combos, HP_itemdb_read_combos) }, { HP_POP(itemdb->gendercheck, HP_itemdb_gendercheck) }, { HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) }, + { HP_POP(itemdb->readdb_options_additional_fields, HP_itemdb_readdb_options_additional_fields) }, { HP_POP(itemdb->readdb_additional_fields, HP_itemdb_readdb_additional_fields) }, { HP_POP(itemdb->readdb_job_sub, HP_itemdb_readdb_job_sub) }, { HP_POP(itemdb->readdb_libconfig_sub, HP_itemdb_readdb_libconfig_sub) }, @@ -1426,10 +1470,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read, HP_itemdb_read) }, { HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) }, { HP_POP(itemdb->final_sub, HP_itemdb_final_sub) }, + { HP_POP(itemdb->options_final_sub, HP_itemdb_options_final_sub) }, { HP_POP(itemdb->clear, HP_itemdb_clear) }, { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, + { HP_POP(itemdb->lookup_const_mask, HP_itemdb_lookup_const_mask) }, /* libconfig_interface */ { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, @@ -1532,21 +1578,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mail->openmail, HP_mail_openmail) }, { HP_POP(mail->deliveryfail, HP_mail_deliveryfail) }, { HP_POP(mail->invalid_operation, HP_mail_invalid_operation) }, -/* malloc_interface */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, /* map_interface */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, @@ -1978,6 +2009,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) }, { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, + { HP_POP(npc->refresh, HP_npc_refresh) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, /* nullpo_interface */ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, @@ -2070,6 +2102,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->reg_received, HP_pc_reg_received) }, { HP_POP(pc->isequip, HP_pc_isequip) }, { HP_POP(pc->equippoint, HP_pc_equippoint) }, + { HP_POP(pc->item_equippoint, HP_pc_item_equippoint) }, { HP_POP(pc->setinventorydata, HP_pc_setinventorydata) }, { HP_POP(pc->checkskill, HP_pc_checkskill) }, { HP_POP(pc->checkskill2, HP_pc_checkskill2) }, @@ -2203,7 +2236,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->delspiritball, HP_pc_delspiritball) }, { HP_POP(pc->getmaxspiritball, HP_pc_getmaxspiritball) }, { HP_POP(pc->addfame, HP_pc_addfame) }, - { HP_POP(pc->famerank, HP_pc_famerank) }, + { HP_POP(pc->fame_rank, HP_pc_fame_rank) }, + { HP_POP(pc->famelist_type, HP_pc_famelist_type) }, { HP_POP(pc->set_hate_mob, HP_pc_set_hate_mob) }, { HP_POP(pc->readdb, HP_pc_readdb) }, { HP_POP(pc->map_day_timer, HP_pc_map_day_timer) }, @@ -2260,6 +2294,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->expire_check, HP_pc_expire_check) }, { HP_POP(pc->db_checkid, HP_pc_db_checkid) }, { HP_POP(pc->validate_levels, HP_pc_validate_levels) }, + { HP_POP(pc->update_job_and_level, HP_pc_update_job_and_level) }, { HP_POP(pc->autotrade_load, HP_pc_autotrade_load) }, { HP_POP(pc->autotrade_update, HP_pc_autotrade_update) }, { HP_POP(pc->autotrade_start, HP_pc_autotrade_start) }, @@ -2271,6 +2306,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) }, { HP_POP(pc->process_chat_message, HP_pc_process_chat_message) }, { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, + { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, /* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, @@ -2344,6 +2380,24 @@ struct HookingPointData HookingPoints[] = { { HP_POP(rnd->value, HP_rnd_value) }, { HP_POP(rnd->uniform, HP_rnd_uniform) }, { HP_POP(rnd->uniform53, HP_rnd_uniform53) }, +/* rodex_interface */ + { HP_POP(rodex->init, HP_rodex_init) }, + { HP_POP(rodex->final, HP_rodex_final) }, + { HP_POP(rodex->isenabled, HP_rodex_isenabled) }, + { HP_POP(rodex->open, HP_rodex_open) }, + { HP_POP(rodex->next_page, HP_rodex_next_page) }, + { HP_POP(rodex->refresh, HP_rodex_refresh) }, + { HP_POP(rodex->add_item, HP_rodex_add_item) }, + { HP_POP(rodex->remove_item, HP_rodex_remove_item) }, + { HP_POP(rodex->check_player, HP_rodex_check_player) }, + { HP_POP(rodex->send_mail, HP_rodex_send_mail) }, + { HP_POP(rodex->send_mail_result, HP_rodex_send_mail_result) }, + { HP_POP(rodex->get_mail, HP_rodex_get_mail) }, + { HP_POP(rodex->read_mail, HP_rodex_read_mail) }, + { HP_POP(rodex->get_zeny, HP_rodex_get_zeny) }, + { HP_POP(rodex->get_items, HP_rodex_get_items) }, + { HP_POP(rodex->delete_mail, HP_rodex_delete_mail) }, + { HP_POP(rodex->clean, HP_rodex_clean) }, /* script_interface */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, @@ -2366,10 +2420,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->push_val, HP_script_push_val) }, { HP_POP(script->get_val, HP_script_get_val) }, { HP_POP(script->get_val_ref_str, HP_script_get_val_ref_str) }, + { HP_POP(script->get_val_pc_ref_str, HP_script_get_val_pc_ref_str) }, { HP_POP(script->get_val_scope_str, HP_script_get_val_scope_str) }, { HP_POP(script->get_val_npc_str, HP_script_get_val_npc_str) }, { HP_POP(script->get_val_instance_str, HP_script_get_val_instance_str) }, { HP_POP(script->get_val_ref_num, HP_script_get_val_ref_num) }, + { HP_POP(script->get_val_pc_ref_num, HP_script_get_val_pc_ref_num) }, { HP_POP(script->get_val_scope_num, HP_script_get_val_scope_num) }, { HP_POP(script->get_val_npc_num, HP_script_get_val_npc_num) }, { HP_POP(script->get_val_instance_num, HP_script_get_val_instance_num) }, @@ -2447,10 +2503,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->errorwarning_sub, HP_script_errorwarning_sub) }, { HP_POP(script->set_reg, HP_script_set_reg) }, { HP_POP(script->set_reg_ref_str, HP_script_set_reg_ref_str) }, + { HP_POP(script->set_reg_pc_ref_str, HP_script_set_reg_pc_ref_str) }, { HP_POP(script->set_reg_scope_str, HP_script_set_reg_scope_str) }, { HP_POP(script->set_reg_npc_str, HP_script_set_reg_npc_str) }, { HP_POP(script->set_reg_instance_str, HP_script_set_reg_instance_str) }, { HP_POP(script->set_reg_ref_num, HP_script_set_reg_ref_num) }, + { HP_POP(script->set_reg_pc_ref_num, HP_script_set_reg_pc_ref_num) }, { HP_POP(script->set_reg_scope_num, HP_script_set_reg_scope_num) }, { HP_POP(script->set_reg_npc_num, HP_script_set_reg_npc_num) }, { HP_POP(script->set_reg_instance_num, HP_script_set_reg_instance_num) }, @@ -2466,6 +2524,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->db_free_code_sub, HP_script_db_free_code_sub) }, { HP_POP(script->add_autobonus, HP_script_add_autobonus) }, { HP_POP(script->menu_countoptions, HP_script_menu_countoptions) }, + { HP_POP(script->buildin_recovery_sub, HP_script_buildin_recovery_sub) }, + { HP_POP(script->buildin_recovery_pc_sub, HP_script_buildin_recovery_pc_sub) }, + { HP_POP(script->buildin_recovery_bl_sub, HP_script_buildin_recovery_bl_sub) }, { HP_POP(script->buildin_areawarp_sub, HP_script_buildin_areawarp_sub) }, { HP_POP(script->buildin_areapercentheal_sub, HP_script_buildin_areapercentheal_sub) }, { HP_POP(script->buildin_delitem_delete, HP_script_buildin_delitem_delete) }, @@ -2880,6 +2941,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->get_sc_def, HP_status_get_sc_def) }, { HP_POP(status->change_start, HP_status_change_start) }, { HP_POP(status->change_end_, HP_status_change_end_) }, + { HP_POP(status->is_immune_to_status, HP_status_is_immune_to_status) }, + { HP_POP(status->is_boss_resist_sc, HP_status_is_boss_resist_sc) }, + { HP_POP(status->end_sc_before_start, HP_status_end_sc_before_start) }, + { HP_POP(status->change_start_stop_action, HP_status_change_start_stop_action) }, + { HP_POP(status->change_start_set_option, HP_status_change_start_set_option) }, + { HP_POP(status->get_val_flag, HP_status_get_val_flag) }, + { HP_POP(status->change_start_display, HP_status_change_start_display) }, + { HP_POP(status->change_start_unknown_sc, HP_status_change_start_unknown_sc) }, { HP_POP(status->kaahi_heal_timer, HP_status_kaahi_heal_timer) }, { HP_POP(status->change_timer, HP_status_change_timer) }, { HP_POP(status->change_timer_sub, HP_status_change_timer_sub) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 0c81e557f..69658949c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,14 +28,14 @@ /* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -55,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { + if (HPMHooks.count.HP_HCache_check_pre > 0) { bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -82,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { + if (HPMHooks.count.HP_HCache_open_pre > 0) { FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -97,9 +97,9 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } @@ -109,14 +109,14 @@ FILE* HP_HCache_open(const char *file, const char *opt) { /* atcommand_interface */ void HP_atcommand_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_init_pre ) { + if (HPMHooks.count.HP_atcommand_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -124,9 +124,9 @@ void HP_atcommand_init(bool minimal) { { HPMHooks.source.atcommand.init(minimal); } - if( HPMHooks.count.HP_atcommand_init_post ) { + if (HPMHooks.count.HP_atcommand_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_init_post[hIndex].func; postHookFunc(minimal); } @@ -135,14 +135,14 @@ void HP_atcommand_init(bool minimal) { } void HP_atcommand_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_final_pre ) { + if (HPMHooks.count.HP_atcommand_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -150,9 +150,9 @@ void HP_atcommand_final(void) { { HPMHooks.source.atcommand.final(); } - if( HPMHooks.count.HP_atcommand_final_post ) { + if (HPMHooks.count.HP_atcommand_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_final_post[hIndex].func; postHookFunc(); } @@ -162,14 +162,14 @@ void HP_atcommand_final(void) { bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *message, bool player_invoked) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_exec_pre ) { + if (HPMHooks.count.HP_atcommand_exec_pre > 0) { bool (*preHookFunc) (const int *fd, struct map_session_data **sd, const char **message, bool *player_invoked); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_exec_pre[hIndex].func; retVal___ = preHookFunc(&fd, &sd, &message, &player_invoked); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -177,9 +177,9 @@ bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *me { retVal___ = HPMHooks.source.atcommand.exec(fd, sd, message, player_invoked); } - if( HPMHooks.count.HP_atcommand_exec_post ) { + if (HPMHooks.count.HP_atcommand_exec_post > 0) { bool (*postHookFunc) (bool retVal___, const int fd, struct map_session_data *sd, const char *message, bool player_invoked); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_exec_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, sd, message, player_invoked); } @@ -189,14 +189,14 @@ bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *me bool HP_atcommand_create(char *name, AtCommandFunc func) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_create_pre ) { + if (HPMHooks.count.HP_atcommand_create_pre > 0) { bool (*preHookFunc) (char **name, AtCommandFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -204,9 +204,9 @@ bool HP_atcommand_create(char *name, AtCommandFunc func) { { retVal___ = HPMHooks.source.atcommand.create(name, func); } - if( HPMHooks.count.HP_atcommand_create_post ) { + if (HPMHooks.count.HP_atcommand_create_post > 0) { bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_post; hIndex++ ) { + 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); } @@ -216,14 +216,14 @@ bool HP_atcommand_create(char *name, AtCommandFunc func) { bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_can_use_pre ) { + if (HPMHooks.count.HP_atcommand_can_use_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **command); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -231,9 +231,9 @@ bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { { retVal___ = HPMHooks.source.atcommand.can_use(sd, command); } - if( HPMHooks.count.HP_atcommand_can_use_post ) { + if (HPMHooks.count.HP_atcommand_can_use_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_post; hIndex++ ) { + 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); } @@ -243,14 +243,14 @@ bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtCommandType type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_can_use2_pre ) { + if (HPMHooks.count.HP_atcommand_can_use2_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **command, AtCommandType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -258,9 +258,9 @@ bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtC { retVal___ = HPMHooks.source.atcommand.can_use2(sd, command, type); } - if( HPMHooks.count.HP_atcommand_can_use2_post ) { + if (HPMHooks.count.HP_atcommand_can_use2_post > 0) { 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++ ) { + 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); } @@ -269,14 +269,14 @@ bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtC } void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t **commands_, size_t sz) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_load_groups_pre ) { + if (HPMHooks.count.HP_atcommand_load_groups_pre > 0) { void (*preHookFunc) (GroupSettings ***groups, struct config_setting_t ***commands_, size_t *sz); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -284,9 +284,9 @@ void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t ** { HPMHooks.source.atcommand.load_groups(groups, commands_, sz); } - if( HPMHooks.count.HP_atcommand_load_groups_post ) { + if (HPMHooks.count.HP_atcommand_load_groups_post > 0) { void (*postHookFunc) (GroupSettings **groups, struct config_setting_t **commands_, size_t sz); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_post; hIndex++ ) { + 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); } @@ -296,14 +296,14 @@ void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t ** AtCommandInfo* HP_atcommand_exists(const char *name) { int hIndex = 0; AtCommandInfo* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_exists_pre ) { + if (HPMHooks.count.HP_atcommand_exists_pre > 0) { AtCommandInfo* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -311,9 +311,9 @@ AtCommandInfo* HP_atcommand_exists(const char *name) { { retVal___ = HPMHooks.source.atcommand.exists(name); } - if( HPMHooks.count.HP_atcommand_exists_post ) { + if (HPMHooks.count.HP_atcommand_exists_post > 0) { AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_exists_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -323,14 +323,14 @@ AtCommandInfo* HP_atcommand_exists(const char *name) { bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_msg_read_pre ) { + if (HPMHooks.count.HP_atcommand_msg_read_pre > 0) { bool (*preHookFunc) (const char **cfg_name, bool *allow_override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msg_read_pre[hIndex].func; retVal___ = preHookFunc(&cfg_name, &allow_override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -338,9 +338,9 @@ bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) { { retVal___ = HPMHooks.source.atcommand.msg_read(cfg_name, allow_override); } - if( HPMHooks.count.HP_atcommand_msg_read_post ) { + if (HPMHooks.count.HP_atcommand_msg_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool allow_override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_post; hIndex++ ) { + 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___, cfg_name, allow_override); } @@ -349,14 +349,14 @@ bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) { } void HP_atcommand_final_msg(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_final_msg_pre ) { + if (HPMHooks.count.HP_atcommand_final_msg_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -364,9 +364,9 @@ void HP_atcommand_final_msg(void) { { HPMHooks.source.atcommand.final_msg(); } - if( HPMHooks.count.HP_atcommand_final_msg_post ) { + if (HPMHooks.count.HP_atcommand_final_msg_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_final_msg_post[hIndex].func; postHookFunc(); } @@ -376,14 +376,14 @@ void HP_atcommand_final_msg(void) { 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 ) { + if (HPMHooks.count.HP_atcommand_get_bind_byname_pre > 0) { struct atcmd_binding_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -391,9 +391,9 @@ struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) { { retVal___ = HPMHooks.source.atcommand.get_bind_byname(name); } - if( HPMHooks.count.HP_atcommand_get_bind_byname_post ) { + if (HPMHooks.count.HP_atcommand_get_bind_byname_post > 0) { 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++ ) { + 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); } @@ -403,14 +403,14 @@ struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) { AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { int hIndex = 0; AtCommandInfo* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_get_info_byname_pre ) { + if (HPMHooks.count.HP_atcommand_get_info_byname_pre > 0) { AtCommandInfo* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -418,9 +418,9 @@ AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { { retVal___ = HPMHooks.source.atcommand.get_info_byname(name); } - if( HPMHooks.count.HP_atcommand_get_info_byname_post ) { + if (HPMHooks.count.HP_atcommand_get_info_byname_post > 0) { AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_post; hIndex++ ) { + 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); } @@ -430,14 +430,14 @@ AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { const char* HP_atcommand_check_alias(const char *aliasname) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_check_alias_pre ) { + if (HPMHooks.count.HP_atcommand_check_alias_pre > 0) { const char* (*preHookFunc) (const char **aliasname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -445,9 +445,9 @@ const char* HP_atcommand_check_alias(const char *aliasname) { { retVal___ = HPMHooks.source.atcommand.check_alias(aliasname); } - if( HPMHooks.count.HP_atcommand_check_alias_post ) { + if (HPMHooks.count.HP_atcommand_check_alias_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *aliasname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_post; hIndex++ ) { + 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); } @@ -456,14 +456,14 @@ const char* HP_atcommand_check_alias(const char *aliasname) { } 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 ) { + if (HPMHooks.count.HP_atcommand_get_suggestions_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name, bool *is_atcmd_cmd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -471,9 +471,9 @@ void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name, { HPMHooks.source.atcommand.get_suggestions(sd, name, is_atcmd_cmd); } - if( HPMHooks.count.HP_atcommand_get_suggestions_post ) { + if (HPMHooks.count.HP_atcommand_get_suggestions_post > 0) { 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++ ) { + 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); } @@ -482,14 +482,14 @@ void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name, } void HP_atcommand_config_read(const char *config_filename) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_config_read_pre ) { + if (HPMHooks.count.HP_atcommand_config_read_pre > 0) { void (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -497,9 +497,9 @@ void HP_atcommand_config_read(const char *config_filename) { { HPMHooks.source.atcommand.config_read(config_filename); } - if( HPMHooks.count.HP_atcommand_config_read_post ) { + if (HPMHooks.count.HP_atcommand_config_read_post > 0) { void (*postHookFunc) (const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_post; hIndex++ ) { + 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); } @@ -509,16 +509,16 @@ void HP_atcommand_config_read(const char *config_filename) { int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_stopattack_pre ) { + if (HPMHooks.count.HP_atcommand_stopattack_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -528,9 +528,9 @@ int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.stopattack(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_stopattack_post ) { + if (HPMHooks.count.HP_atcommand_stopattack_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_post; hIndex++ ) { + 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); @@ -542,16 +542,16 @@ int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_pvpoff_sub_pre ) { + if (HPMHooks.count.HP_atcommand_pvpoff_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -561,9 +561,9 @@ int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.pvpoff_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_pvpoff_sub_post ) { + if (HPMHooks.count.HP_atcommand_pvpoff_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_post; hIndex++ ) { + 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); @@ -575,16 +575,16 @@ int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_pvpon_sub_pre ) { + if (HPMHooks.count.HP_atcommand_pvpon_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -594,9 +594,9 @@ int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.pvpon_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_pvpon_sub_post ) { + if (HPMHooks.count.HP_atcommand_pvpon_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_post; hIndex++ ) { + 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); @@ -608,16 +608,16 @@ int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_atkillmonster_sub_pre ) { + if (HPMHooks.count.HP_atcommand_atkillmonster_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -627,9 +627,9 @@ int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.atkillmonster_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_atkillmonster_sub_post ) { + if (HPMHooks.count.HP_atcommand_atkillmonster_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_post; hIndex++ ) { + 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); @@ -640,14 +640,14 @@ int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { } void HP_atcommand_raise_sub(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_raise_sub_pre ) { + if (HPMHooks.count.HP_atcommand_raise_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -655,9 +655,9 @@ void HP_atcommand_raise_sub(struct map_session_data *sd) { { HPMHooks.source.atcommand.raise_sub(sd); } - if( HPMHooks.count.HP_atcommand_raise_sub_post ) { + if (HPMHooks.count.HP_atcommand_raise_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_raise_sub_post[hIndex].func; postHookFunc(sd); } @@ -666,14 +666,14 @@ void HP_atcommand_raise_sub(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_atcommand_get_jail_time_pre > 0) { void (*preHookFunc) (int *jailtime, int **year, int **month, int **day, int **hour, int **minute); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -681,9 +681,9 @@ void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, i { HPMHooks.source.atcommand.get_jail_time(jailtime, year, month, day, hour, minute); } - if( HPMHooks.count.HP_atcommand_get_jail_time_post ) { + if (HPMHooks.count.HP_atcommand_get_jail_time_post > 0) { 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++ ) { + 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); } @@ -693,16 +693,16 @@ void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, i int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_cleanfloor_sub_pre ) { + if (HPMHooks.count.HP_atcommand_cleanfloor_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -712,9 +712,9 @@ int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.cleanfloor_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_cleanfloor_sub_post ) { + if (HPMHooks.count.HP_atcommand_cleanfloor_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_post; hIndex++ ) { + 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); @@ -726,16 +726,16 @@ int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_mutearea_sub_pre ) { + if (HPMHooks.count.HP_atcommand_mutearea_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -745,9 +745,9 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.mutearea_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_mutearea_sub_post ) { + if (HPMHooks.count.HP_atcommand_mutearea_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_post; hIndex++ ) { + 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); @@ -758,14 +758,14 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { } void HP_atcommand_getring(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_getring_pre ) { + if (HPMHooks.count.HP_atcommand_getring_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_getring_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -773,9 +773,9 @@ void HP_atcommand_getring(struct map_session_data *sd) { { HPMHooks.source.atcommand.getring(sd); } - if( HPMHooks.count.HP_atcommand_getring_post ) { + if (HPMHooks.count.HP_atcommand_getring_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_getring_post[hIndex].func; postHookFunc(sd); } @@ -784,14 +784,14 @@ void HP_atcommand_getring(struct map_session_data *sd) { } void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_channel_help_pre ) { + if (HPMHooks.count.HP_atcommand_channel_help_pre > 0) { void (*preHookFunc) (int *fd, const char **command, bool *can_create); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_channel_help_pre[hIndex].func; preHookFunc(&fd, &command, &can_create); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -799,9 +799,9 @@ void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { { HPMHooks.source.atcommand.channel_help(fd, command, can_create); } - if( HPMHooks.count.HP_atcommand_channel_help_post ) { + if (HPMHooks.count.HP_atcommand_channel_help_post > 0) { void (*postHookFunc) (int fd, const char *command, bool can_create); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_channel_help_post[hIndex].func; postHookFunc(fd, command, can_create); } @@ -810,14 +810,14 @@ void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { } 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 ) { + if (HPMHooks.count.HP_atcommand_commands_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const int *fd, AtCommandType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -825,9 +825,9 @@ void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtComm { HPMHooks.source.atcommand.commands_sub(sd, fd, type); } - if( HPMHooks.count.HP_atcommand_commands_sub_post ) { + if (HPMHooks.count.HP_atcommand_commands_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const int fd, AtCommandType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_post; hIndex++ ) { + 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); } @@ -836,14 +836,14 @@ void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtComm } void HP_atcommand_cmd_db_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_cmd_db_clear_pre ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -851,9 +851,9 @@ void HP_atcommand_cmd_db_clear(void) { { HPMHooks.source.atcommand.cmd_db_clear(); } - if( HPMHooks.count.HP_atcommand_cmd_db_clear_post ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_post; hIndex++ ) { + 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(); } @@ -863,16 +863,16 @@ void HP_atcommand_cmd_db_clear(void) { int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -882,9 +882,9 @@ int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post; hIndex++ ) { + 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); @@ -895,14 +895,14 @@ int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list } void HP_atcommand_doload(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_doload_pre ) { + if (HPMHooks.count.HP_atcommand_doload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_doload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -910,9 +910,9 @@ void HP_atcommand_doload(void) { { HPMHooks.source.atcommand.doload(); } - if( HPMHooks.count.HP_atcommand_doload_post ) { + if (HPMHooks.count.HP_atcommand_doload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_doload_post[hIndex].func; postHookFunc(); } @@ -921,14 +921,14 @@ void HP_atcommand_doload(void) { } void HP_atcommand_base_commands(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_base_commands_pre ) { + if (HPMHooks.count.HP_atcommand_base_commands_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -936,9 +936,9 @@ void HP_atcommand_base_commands(void) { { HPMHooks.source.atcommand.base_commands(); } - if( HPMHooks.count.HP_atcommand_base_commands_post ) { + if (HPMHooks.count.HP_atcommand_base_commands_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_base_commands_post[hIndex].func; postHookFunc(); } @@ -948,14 +948,14 @@ void HP_atcommand_base_commands(void) { bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_add_pre ) { + if (HPMHooks.count.HP_atcommand_add_pre > 0) { bool (*preHookFunc) (char **name, AtCommandFunc *func, bool *replace); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_add_pre[hIndex].func; retVal___ = preHookFunc(&name, &func, &replace); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -963,9 +963,9 @@ bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { { retVal___ = HPMHooks.source.atcommand.add(name, func, replace); } - if( HPMHooks.count.HP_atcommand_add_post ) { + if (HPMHooks.count.HP_atcommand_add_post > 0) { bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc func, bool replace); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, func, replace); } @@ -975,14 +975,14 @@ bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { const char* HP_atcommand_msg(int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msg_pre ) { + if (HPMHooks.count.HP_atcommand_msg_pre > 0) { const char* (*preHookFunc) (int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msg_pre[hIndex].func; retVal___ = preHookFunc(&msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -990,9 +990,9 @@ const char* HP_atcommand_msg(int msg_number) { { retVal___ = HPMHooks.source.atcommand.msg(msg_number); } - if( HPMHooks.count.HP_atcommand_msg_post ) { + if (HPMHooks.count.HP_atcommand_msg_post > 0) { const char* (*postHookFunc) (const char* retVal___, int msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msg_post[hIndex].func; retVal___ = postHookFunc(retVal___, msg_number); } @@ -1001,14 +1001,14 @@ const char* HP_atcommand_msg(int msg_number) { } void HP_atcommand_expand_message_table(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_expand_message_table_pre ) { + if (HPMHooks.count.HP_atcommand_expand_message_table_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_expand_message_table_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1016,9 +1016,9 @@ void HP_atcommand_expand_message_table(void) { { HPMHooks.source.atcommand.expand_message_table(); } - if( HPMHooks.count.HP_atcommand_expand_message_table_post ) { + if (HPMHooks.count.HP_atcommand_expand_message_table_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_expand_message_table_post[hIndex].func; postHookFunc(); } @@ -1028,14 +1028,14 @@ void HP_atcommand_expand_message_table(void) { const char* HP_atcommand_msgfd(int fd, int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msgfd_pre ) { + if (HPMHooks.count.HP_atcommand_msgfd_pre > 0) { const char* (*preHookFunc) (int *fd, int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msgfd_pre[hIndex].func; retVal___ = preHookFunc(&fd, &msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1043,9 +1043,9 @@ const char* HP_atcommand_msgfd(int fd, int msg_number) { { retVal___ = HPMHooks.source.atcommand.msgfd(fd, msg_number); } - if( HPMHooks.count.HP_atcommand_msgfd_post ) { + if (HPMHooks.count.HP_atcommand_msgfd_post > 0) { const char* (*postHookFunc) (const char* retVal___, int fd, int msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msgfd_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, msg_number); } @@ -1055,14 +1055,14 @@ const char* HP_atcommand_msgfd(int fd, int msg_number) { const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msgsd_pre ) { + if (HPMHooks.count.HP_atcommand_msgsd_pre > 0) { const char* (*preHookFunc) (struct map_session_data **sd, int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msgsd_pre[hIndex].func; retVal___ = preHookFunc(&sd, &msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1070,9 +1070,9 @@ const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { { retVal___ = HPMHooks.source.atcommand.msgsd(sd, msg_number); } - if( HPMHooks.count.HP_atcommand_msgsd_post ) { + if (HPMHooks.count.HP_atcommand_msgsd_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct map_session_data *sd, int msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msgsd_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, msg_number); } @@ -1082,14 +1082,14 @@ const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { /* battle_interface */ void HP_battle_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_battle_init_pre ) { + if (HPMHooks.count.HP_battle_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1097,9 +1097,9 @@ void HP_battle_init(bool minimal) { { HPMHooks.source.battle.init(minimal); } - if( HPMHooks.count.HP_battle_init_post ) { + if (HPMHooks.count.HP_battle_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_init_post[hIndex].func; postHookFunc(minimal); } @@ -1108,14 +1108,14 @@ void HP_battle_init(bool minimal) { } void HP_battle_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_final_pre ) { + if (HPMHooks.count.HP_battle_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1123,9 +1123,9 @@ void HP_battle_final(void) { { HPMHooks.source.battle.final(); } - if( HPMHooks.count.HP_battle_final_post ) { + if (HPMHooks.count.HP_battle_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_final_post[hIndex].func; postHookFunc(); } @@ -1135,14 +1135,14 @@ void HP_battle_final(void) { 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___ = { 0 }; - if( HPMHooks.count.HP_battle_calc_attack_pre ) { + if (HPMHooks.count.HP_battle_calc_attack_pre > 0) { struct Damage (*preHookFunc) (int *attack_type, struct block_list **bl, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1150,9 +1150,9 @@ struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, stru { retVal___ = HPMHooks.source.battle.calc_attack(attack_type, bl, target, skill_id, skill_lv, count); } - if( HPMHooks.count.HP_battle_calc_attack_post ) { + if (HPMHooks.count.HP_battle_calc_attack_post > 0) { 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++ ) { + 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); } @@ -1162,14 +1162,14 @@ struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, stru 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___ = 0; - if( HPMHooks.count.HP_battle_calc_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_damage_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1177,9 +1177,9 @@ int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struc { retVal___ = HPMHooks.source.battle.calc_damage(src, bl, d, damage, skill_id, skill_lv); } - if( HPMHooks.count.HP_battle_calc_damage_post ) { + if (HPMHooks.count.HP_battle_calc_damage_post > 0) { 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++ ) { + 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); } @@ -1189,14 +1189,14 @@ int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struc int64 HP_battle_calc_pc_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___ = 0; - if( HPMHooks.count.HP_battle_calc_pc_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_pc_damage_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_pc_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_pc_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_pc_damage_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &d, &damage, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1204,9 +1204,9 @@ int64 HP_battle_calc_pc_damage(struct block_list *src, struct block_list *bl, st { retVal___ = HPMHooks.source.battle.calc_pc_damage(src, bl, d, damage, skill_id, skill_lv); } - if( HPMHooks.count.HP_battle_calc_pc_damage_post ) { + if (HPMHooks.count.HP_battle_calc_pc_damage_post > 0) { 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_pc_damage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_pc_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_pc_damage_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, d, damage, skill_id, skill_lv); } @@ -1216,14 +1216,14 @@ int64 HP_battle_calc_pc_damage(struct block_list *src, struct block_list *bl, st 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___ = 0; - if( HPMHooks.count.HP_battle_calc_gvg_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_gvg_damage_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1231,9 +1231,9 @@ int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, i { 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 ) { + if (HPMHooks.count.HP_battle_calc_gvg_damage_post > 0) { 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++ ) { + 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); } @@ -1243,14 +1243,14 @@ int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, i 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___ = 0; - if( HPMHooks.count.HP_battle_calc_bg_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_bg_damage_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1258,9 +1258,9 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in { 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 ) { + if (HPMHooks.count.HP_battle_calc_bg_damage_post > 0) { 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++ ) { + 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); } @@ -1270,14 +1270,14 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, int64 tick, int flag) { int hIndex = 0; enum damage_lv retVal___ = ATK_NONE; - if( HPMHooks.count.HP_battle_weapon_attack_pre ) { + if (HPMHooks.count.HP_battle_weapon_attack_pre > 0) { enum damage_lv (*preHookFunc) (struct block_list **bl, struct block_list **target, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1285,9 +1285,9 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list { retVal___ = HPMHooks.source.battle.weapon_attack(bl, target, tick, flag); } - if( HPMHooks.count.HP_battle_weapon_attack_post ) { + if (HPMHooks.count.HP_battle_weapon_attack_post > 0) { enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_post; hIndex++ ) { + 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); } @@ -1297,14 +1297,14 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list bool HP_battle_check_arrows(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_check_arrows_pre ) { + if (HPMHooks.count.HP_battle_check_arrows_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_check_arrows_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1312,9 +1312,9 @@ bool HP_battle_check_arrows(struct map_session_data *sd) { { retVal___ = HPMHooks.source.battle.check_arrows(sd); } - if( HPMHooks.count.HP_battle_check_arrows_post ) { + if (HPMHooks.count.HP_battle_check_arrows_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_check_arrows_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -1324,14 +1324,14 @@ bool HP_battle_check_arrows(struct map_session_data *sd) { 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___ = { 0 }; - if( HPMHooks.count.HP_battle_calc_weapon_attack_pre ) { + if (HPMHooks.count.HP_battle_calc_weapon_attack_pre > 0) { struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *wflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1339,9 +1339,9 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_ { retVal___ = HPMHooks.source.battle.calc_weapon_attack(src, target, skill_id, skill_lv, wflag); } - if( HPMHooks.count.HP_battle_calc_weapon_attack_post ) { + if (HPMHooks.count.HP_battle_calc_weapon_attack_post > 0) { 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++ ) { + 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); } @@ -1351,14 +1351,14 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_ int HP_battle_delay_damage(int64 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___ = 0; - if( HPMHooks.count.HP_battle_delay_damage_pre ) { + if (HPMHooks.count.HP_battle_delay_damage_pre > 0) { int (*preHookFunc) (int64 *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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1366,9 +1366,9 @@ int HP_battle_delay_damage(int64 tick, int amotion, struct block_list *src, stru { 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 ) { + if (HPMHooks.count.HP_battle_delay_damage_post > 0) { int (*postHookFunc) (int retVal___, int64 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++ ) { + 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); } @@ -1377,14 +1377,14 @@ int HP_battle_delay_damage(int64 tick, int amotion, struct block_list *src, stru } 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 ) { + if (HPMHooks.count.HP_battle_drain_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1392,9 +1392,9 @@ void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 { HPMHooks.source.battle.drain(sd, tbl, rdamage, ldamage, race, boss); } - if( HPMHooks.count.HP_battle_drain_post ) { + if (HPMHooks.count.HP_battle_drain_post > 0) { 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++ ) { + 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); } @@ -1403,14 +1403,14 @@ void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 } void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_battle_reflect_damage_pre ) { + if (HPMHooks.count.HP_battle_reflect_damage_pre > 0) { void (*preHookFunc) (struct block_list **target, struct block_list **src, struct Damage **wd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_reflect_damage_pre[hIndex].func; preHookFunc(&target, &src, &wd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1418,9 +1418,9 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, { HPMHooks.source.battle.reflect_damage(target, src, wd, skill_id); } - if( HPMHooks.count.HP_battle_reflect_damage_post ) { + if (HPMHooks.count.HP_battle_reflect_damage_post > 0) { void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_reflect_damage_post[hIndex].func; postHookFunc(target, src, wd, skill_id); } @@ -1430,14 +1430,14 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_attr_ratio_pre ) { + if (HPMHooks.count.HP_battle_attr_ratio_pre > 0) { int (*preHookFunc) (int *atk_elem, int *def_type, int *def_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1445,9 +1445,9 @@ int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { { retVal___ = HPMHooks.source.battle.attr_ratio(atk_elem, def_type, def_lv); } - if( HPMHooks.count.HP_battle_attr_ratio_post ) { + if (HPMHooks.count.HP_battle_attr_ratio_post > 0) { 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++ ) { + 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); } @@ -1457,14 +1457,14 @@ int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { 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___ = 0; - if( HPMHooks.count.HP_battle_attr_fix_pre ) { + if (HPMHooks.count.HP_battle_attr_fix_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1472,9 +1472,9 @@ int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int6 { retVal___ = HPMHooks.source.battle.attr_fix(src, target, damage, atk_elem, def_type, def_lv); } - if( HPMHooks.count.HP_battle_attr_fix_post ) { + if (HPMHooks.count.HP_battle_attr_fix_post > 0) { 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++ ) { + 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); } @@ -1484,14 +1484,14 @@ int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int6 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___ = 0; - if( HPMHooks.count.HP_battle_calc_cardfix_pre ) { + if (HPMHooks.count.HP_battle_calc_cardfix_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1499,9 +1499,9 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo { 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 ) { + if (HPMHooks.count.HP_battle_calc_cardfix_post > 0) { 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++ ) { + 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); } @@ -1511,14 +1511,14 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_cardfix2_pre ) { + if (HPMHooks.count.HP_battle_calc_cardfix2_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *s_ele, int *nk, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &damage, &s_ele, &nk, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1526,9 +1526,9 @@ int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int { retVal___ = HPMHooks.source.battle.calc_cardfix2(src, bl, damage, s_ele, nk, flag); } - if( HPMHooks.count.HP_battle_calc_cardfix2_post ) { + if (HPMHooks.count.HP_battle_calc_cardfix2_post > 0) { int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, damage, s_ele, nk, flag); } @@ -1538,14 +1538,14 @@ int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int 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___ = 0; - if( HPMHooks.count.HP_battle_calc_elefix_pre ) { + if (HPMHooks.count.HP_battle_calc_elefix_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1553,9 +1553,9 @@ int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, u { 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 ) { + if (HPMHooks.count.HP_battle_calc_elefix_post > 0) { 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++ ) { + 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); } @@ -1565,14 +1565,14 @@ int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, u 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___ = 0; - if( HPMHooks.count.HP_battle_calc_masteryfix_pre ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_pre > 0) { int64 (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1580,9 +1580,9 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe { retVal___ = HPMHooks.source.battle.calc_masteryfix(src, target, skill_id, skill_lv, damage, div, left, weapon); } - if( HPMHooks.count.HP_battle_calc_masteryfix_post ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_post > 0) { 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++ ) { + 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); } @@ -1592,14 +1592,14 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe int HP_battle_calc_chorusbonus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_chorusbonus_pre ) { + if (HPMHooks.count.HP_battle_calc_chorusbonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1607,9 +1607,9 @@ int HP_battle_calc_chorusbonus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.battle.calc_chorusbonus(sd); } - if( HPMHooks.count.HP_battle_calc_chorusbonus_post ) { + if (HPMHooks.count.HP_battle_calc_chorusbonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -1619,14 +1619,14 @@ int HP_battle_calc_chorusbonus(struct map_session_data *sd) { 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___ = 0; - if( HPMHooks.count.HP_battle_calc_skillratio_pre ) { + if (HPMHooks.count.HP_battle_calc_skillratio_pre > 0) { int (*preHookFunc) (int *attack_type, struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1634,9 +1634,9 @@ int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct bl { retVal___ = HPMHooks.source.battle.calc_skillratio(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } - if( HPMHooks.count.HP_battle_calc_skillratio_post ) { + if (HPMHooks.count.HP_battle_calc_skillratio_post > 0) { 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++ ) { + 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); } @@ -1646,14 +1646,14 @@ int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct bl int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type, int size, bool ignore) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_sizefix_pre ) { + if (HPMHooks.count.HP_battle_calc_sizefix_pre > 0) { int64 (*preHookFunc) (struct map_session_data **sd, int64 *damage, int *type, int *size, bool *ignore); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1661,9 +1661,9 @@ int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type { retVal___ = HPMHooks.source.battle.calc_sizefix(sd, damage, type, size, ignore); } - if( HPMHooks.count.HP_battle_calc_sizefix_post ) { + if (HPMHooks.count.HP_battle_calc_sizefix_post > 0) { 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++ ) { + 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); } @@ -1673,14 +1673,14 @@ int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type 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___ = 0; - if( HPMHooks.count.HP_battle_calc_weapon_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_weapon_damage_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1688,9 +1688,9 @@ int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl { 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 ) { + if (HPMHooks.count.HP_battle_calc_weapon_damage_post > 0) { 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++ ) { + 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); } @@ -1700,14 +1700,14 @@ int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl 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___ = 0; - if( HPMHooks.count.HP_battle_calc_defense_pre ) { + if (HPMHooks.count.HP_battle_calc_defense_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1715,9 +1715,9 @@ int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct blo { 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 ) { + if (HPMHooks.count.HP_battle_calc_defense_post > 0) { 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++ ) { + 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); } @@ -1727,14 +1727,14 @@ int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct blo 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 ) { + if (HPMHooks.count.HP_battle_get_master_pre > 0) { struct block_list* (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1742,9 +1742,9 @@ struct block_list* HP_battle_get_master(struct block_list *src) { { retVal___ = HPMHooks.source.battle.get_master(src); } - if( HPMHooks.count.HP_battle_get_master_post ) { + if (HPMHooks.count.HP_battle_get_master_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_post; hIndex++ ) { + 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); } @@ -1754,14 +1754,14 @@ struct block_list* HP_battle_get_master(struct block_list *src) { 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 ) { + if (HPMHooks.count.HP_battle_get_targeted_pre > 0) { struct block_list* (*preHookFunc) (struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1769,9 +1769,9 @@ struct block_list* HP_battle_get_targeted(struct block_list *target) { { retVal___ = HPMHooks.source.battle.get_targeted(target); } - if( HPMHooks.count.HP_battle_get_targeted_post ) { + if (HPMHooks.count.HP_battle_get_targeted_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_post; hIndex++ ) { + 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); } @@ -1781,14 +1781,14 @@ struct block_list* HP_battle_get_targeted(struct block_list *target) { 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 ) { + if (HPMHooks.count.HP_battle_get_enemy_pre > 0) { struct block_list* (*preHookFunc) (struct block_list **target, int *type, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1796,9 +1796,9 @@ struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int { retVal___ = HPMHooks.source.battle.get_enemy(target, type, range); } - if( HPMHooks.count.HP_battle_get_enemy_post ) { + if (HPMHooks.count.HP_battle_get_enemy_post > 0) { 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++ ) { + 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); } @@ -1808,14 +1808,14 @@ struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int int HP_battle_get_target(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_target_pre ) { + if (HPMHooks.count.HP_battle_get_target_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1823,9 +1823,9 @@ int HP_battle_get_target(struct block_list *bl) { { retVal___ = HPMHooks.source.battle.get_target(bl); } - if( HPMHooks.count.HP_battle_get_target_post ) { + if (HPMHooks.count.HP_battle_get_target_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_post; hIndex++ ) { + 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); } @@ -1835,14 +1835,14 @@ int HP_battle_get_target(struct block_list *bl) { int HP_battle_get_current_skill(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_current_skill_pre ) { + if (HPMHooks.count.HP_battle_get_current_skill_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1850,9 +1850,9 @@ int HP_battle_get_current_skill(struct block_list *bl) { { retVal___ = HPMHooks.source.battle.get_current_skill(bl); } - if( HPMHooks.count.HP_battle_get_current_skill_post ) { + if (HPMHooks.count.HP_battle_get_current_skill_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_post; hIndex++ ) { + 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); } @@ -1862,14 +1862,14 @@ int HP_battle_get_current_skill(struct block_list *bl) { bool HP_battle_check_undead(int race, int element) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_check_undead_pre ) { + if (HPMHooks.count.HP_battle_check_undead_pre > 0) { bool (*preHookFunc) (int *race, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1877,9 +1877,9 @@ bool HP_battle_check_undead(int race, int element) { { retVal___ = HPMHooks.source.battle.check_undead(race, element); } - if( HPMHooks.count.HP_battle_check_undead_post ) { + if (HPMHooks.count.HP_battle_check_undead_post > 0) { bool (*postHookFunc) (bool retVal___, int race, int element); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_post; hIndex++ ) { + 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); } @@ -1889,14 +1889,14 @@ bool HP_battle_check_undead(int race, int element) { int HP_battle_check_target(struct block_list *src, struct block_list *target, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_check_target_pre ) { + if (HPMHooks.count.HP_battle_check_target_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1904,9 +1904,9 @@ int HP_battle_check_target(struct block_list *src, struct block_list *target, in { retVal___ = HPMHooks.source.battle.check_target(src, target, flag); } - if( HPMHooks.count.HP_battle_check_target_post ) { + if (HPMHooks.count.HP_battle_check_target_post > 0) { 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++ ) { + 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); } @@ -1916,14 +1916,14 @@ int HP_battle_check_target(struct block_list *src, struct block_list *target, in bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int range) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_check_range_pre ) { + if (HPMHooks.count.HP_battle_check_range_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1931,9 +1931,9 @@ bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int ra { retVal___ = HPMHooks.source.battle.check_range(src, bl, range); } - if( HPMHooks.count.HP_battle_check_range_post ) { + if (HPMHooks.count.HP_battle_check_range_post > 0) { 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++ ) { + 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); } @@ -1942,14 +1942,14 @@ bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int ra } 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 ) { + if (HPMHooks.count.HP_battle_consume_ammo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1957,9 +1957,9 @@ void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) { { HPMHooks.source.battle.consume_ammo(sd, skill_id, lv); } - if( HPMHooks.count.HP_battle_consume_ammo_post ) { + if (HPMHooks.count.HP_battle_consume_ammo_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int skill_id, int lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_post; hIndex++ ) { + 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); } @@ -1969,16 +1969,16 @@ void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) { int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_targeted_sub_pre ) { + if (HPMHooks.count.HP_battle_get_targeted_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1988,9 +1988,9 @@ int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.get_targeted_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_get_targeted_sub_post ) { + if (HPMHooks.count.HP_battle_get_targeted_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_post; hIndex++ ) { + 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); @@ -2002,16 +2002,16 @@ int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_enemy_sub_pre ) { + if (HPMHooks.count.HP_battle_get_enemy_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2021,9 +2021,9 @@ int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.get_enemy_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_get_enemy_sub_post ) { + if (HPMHooks.count.HP_battle_get_enemy_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_post; hIndex++ ) { + 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); @@ -2035,16 +2035,16 @@ int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_enemy_area_sub_pre ) { + if (HPMHooks.count.HP_battle_get_enemy_area_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2054,9 +2054,9 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_battle_get_enemy_area_sub_post > 0) { 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++ ) { + 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); @@ -2068,14 +2068,14 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) { int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) { + if (HPMHooks.count.HP_battle_delay_damage_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2083,9 +2083,9 @@ int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.battle.delay_damage_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_battle_delay_damage_sub_post ) { + if (HPMHooks.count.HP_battle_delay_damage_sub_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_post; hIndex++ ) { + 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); } @@ -2095,14 +2095,14 @@ int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_blewcount_bonus_pre ) { + if (HPMHooks.count.HP_battle_blewcount_bonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2110,9 +2110,9 @@ int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.battle.blewcount_bonus(sd, skill_id); } - if( HPMHooks.count.HP_battle_blewcount_bonus_post ) { + if (HPMHooks.count.HP_battle_blewcount_bonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_post; hIndex++ ) { + 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); } @@ -2122,14 +2122,14 @@ int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_battle_range_type(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_range_type_pre ) { + if (HPMHooks.count.HP_battle_range_type_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2137,9 +2137,9 @@ int HP_battle_range_type(struct block_list *src, struct block_list *target, uint { retVal___ = HPMHooks.source.battle.range_type(src, target, skill_id, skill_lv); } - if( HPMHooks.count.HP_battle_range_type_post ) { + if (HPMHooks.count.HP_battle_range_type_post > 0) { 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++ ) { + 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); } @@ -2149,14 +2149,14 @@ int HP_battle_range_type(struct block_list *src, struct block_list *target, uint 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___ = 0; - if( HPMHooks.count.HP_battle_calc_base_damage_pre ) { + if (HPMHooks.count.HP_battle_calc_base_damage_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2164,9 +2164,9 @@ int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, { 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 ) { + if (HPMHooks.count.HP_battle_calc_base_damage_post > 0) { 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++ ) { + 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); } @@ -2176,14 +2176,14 @@ int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, 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___ = 0; - if( HPMHooks.count.HP_battle_calc_base_damage2_pre ) { + if (HPMHooks.count.HP_battle_calc_base_damage2_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2191,9 +2191,9 @@ int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, { retVal___ = HPMHooks.source.battle.calc_base_damage2(st, wa, sc, t_size, sd, flag); } - if( HPMHooks.count.HP_battle_calc_base_damage2_post ) { + if (HPMHooks.count.HP_battle_calc_base_damage2_post > 0) { 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++ ) { + 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); } @@ -2203,14 +2203,14 @@ int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, 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___ = { 0 }; - if( HPMHooks.count.HP_battle_calc_misc_attack_pre ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_pre > 0) { struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2218,9 +2218,9 @@ struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_li { retVal___ = HPMHooks.source.battle.calc_misc_attack(src, target, skill_id, skill_lv, mflag); } - if( HPMHooks.count.HP_battle_calc_misc_attack_post ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_post > 0) { 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++ ) { + 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); } @@ -2230,14 +2230,14 @@ struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_li 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___ = { 0 }; - if( HPMHooks.count.HP_battle_calc_magic_attack_pre ) { + if (HPMHooks.count.HP_battle_calc_magic_attack_pre > 0) { struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2245,9 +2245,9 @@ struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_l { retVal___ = HPMHooks.source.battle.calc_magic_attack(src, target, skill_id, skill_lv, mflag); } - if( HPMHooks.count.HP_battle_calc_magic_attack_post ) { + if (HPMHooks.count.HP_battle_calc_magic_attack_post > 0) { 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++ ) { + 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); } @@ -2257,14 +2257,14 @@ struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_l int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_adjust_skill_damage_pre ) { + if (HPMHooks.count.HP_battle_adjust_skill_damage_pre > 0) { int (*preHookFunc) (int *m, unsigned short *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2272,9 +2272,9 @@ int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { { retVal___ = HPMHooks.source.battle.adjust_skill_damage(m, skill_id); } - if( HPMHooks.count.HP_battle_adjust_skill_damage_post ) { + if (HPMHooks.count.HP_battle_adjust_skill_damage_post > 0) { int (*postHookFunc) (int retVal___, int m, unsigned short skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_post; hIndex++ ) { + 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); } @@ -2284,14 +2284,14 @@ int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *target, int64 dmg, int type) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_add_mastery_pre ) { + if (HPMHooks.count.HP_battle_add_mastery_pre > 0) { int64 (*preHookFunc) (struct map_session_data **sd, struct block_list **target, int64 *dmg, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2299,9 +2299,9 @@ int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *targ { retVal___ = HPMHooks.source.battle.add_mastery(sd, target, dmg, type); } - if( HPMHooks.count.HP_battle_add_mastery_post ) { + if (HPMHooks.count.HP_battle_add_mastery_post > 0) { 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++ ) { + 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); } @@ -2311,14 +2311,14 @@ int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *targ int HP_battle_calc_drain(int64 damage, int rate, int per) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_drain_pre ) { + if (HPMHooks.count.HP_battle_calc_drain_pre > 0) { int (*preHookFunc) (int64 *damage, int *rate, int *per); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2326,9 +2326,9 @@ int HP_battle_calc_drain(int64 damage, int rate, int per) { { retVal___ = HPMHooks.source.battle.calc_drain(damage, rate, per); } - if( HPMHooks.count.HP_battle_calc_drain_post ) { + if (HPMHooks.count.HP_battle_calc_drain_post > 0) { int (*postHookFunc) (int retVal___, int64 damage, int rate, int per); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_post; hIndex++ ) { + 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); } @@ -2338,14 +2338,14 @@ int HP_battle_calc_drain(int64 damage, int rate, int per) { bool HP_battle_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_config_read_pre ) { + if (HPMHooks.count.HP_battle_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2353,9 +2353,9 @@ bool HP_battle_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.battle.config_read(filename, imported); } - if( HPMHooks.count.HP_battle_config_read_post ) { + if (HPMHooks.count.HP_battle_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_post; hIndex++ ) { + 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___, filename, imported); } @@ -2364,14 +2364,14 @@ bool HP_battle_config_read(const char *filename, bool imported) { } void HP_battle_config_set_defaults(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_config_set_defaults_pre ) { + if (HPMHooks.count.HP_battle_config_set_defaults_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2379,9 +2379,9 @@ void HP_battle_config_set_defaults(void) { { HPMHooks.source.battle.config_set_defaults(); } - if( HPMHooks.count.HP_battle_config_set_defaults_post ) { + if (HPMHooks.count.HP_battle_config_set_defaults_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_post; hIndex++ ) { + 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(); } @@ -2391,14 +2391,14 @@ void HP_battle_config_set_defaults(void) { bool HP_battle_config_set_value_sub(int index, int value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_config_set_value_sub_pre ) { + if (HPMHooks.count.HP_battle_config_set_value_sub_pre > 0) { bool (*preHookFunc) (int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_pre[hIndex].func; retVal___ = preHookFunc(&index, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2406,9 +2406,9 @@ bool HP_battle_config_set_value_sub(int index, int value) { { retVal___ = HPMHooks.source.battle.config_set_value_sub(index, value); } - if( HPMHooks.count.HP_battle_config_set_value_sub_post ) { + if (HPMHooks.count.HP_battle_config_set_value_sub_post > 0) { bool (*postHookFunc) (bool retVal___, int index, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, index, value); } @@ -2418,14 +2418,14 @@ bool HP_battle_config_set_value_sub(int index, int value) { bool HP_battle_config_set_value(const char *param, const char *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_config_set_value_pre ) { + if (HPMHooks.count.HP_battle_config_set_value_pre > 0) { bool (*preHookFunc) (const char **param, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) { + 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(¶m, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2433,9 +2433,9 @@ bool HP_battle_config_set_value(const char *param, const char *value) { { retVal___ = HPMHooks.source.battle.config_set_value(param, value); } - if( HPMHooks.count.HP_battle_config_set_value_post ) { + if (HPMHooks.count.HP_battle_config_set_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *param, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_post; hIndex++ ) { + 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___, param, value); } @@ -2445,14 +2445,14 @@ bool HP_battle_config_set_value(const char *param, const char *value) { bool HP_battle_config_get_value(const char *w1, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_config_get_value_pre ) { + if (HPMHooks.count.HP_battle_config_get_value_pre > 0) { bool (*preHookFunc) (const char **w1, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) { + 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, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2460,9 +2460,9 @@ bool HP_battle_config_get_value(const char *w1, int *value) { { retVal___ = HPMHooks.source.battle.config_get_value(w1, value); } - if( HPMHooks.count.HP_battle_config_get_value_post ) { + if (HPMHooks.count.HP_battle_config_get_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *w1, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_post; hIndex++ ) { + 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, value); } @@ -2471,14 +2471,14 @@ bool HP_battle_config_get_value(const char *w1, int *value) { } void HP_battle_config_adjust(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_config_adjust_pre ) { + if (HPMHooks.count.HP_battle_config_adjust_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2486,9 +2486,9 @@ void HP_battle_config_adjust(void) { { HPMHooks.source.battle.config_adjust(); } - if( HPMHooks.count.HP_battle_config_adjust_post ) { + if (HPMHooks.count.HP_battle_config_adjust_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_config_adjust_post[hIndex].func; postHookFunc(); } @@ -2498,14 +2498,14 @@ void HP_battle_config_adjust(void) { 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 ) { + if (HPMHooks.count.HP_battle_get_enemy_area_pre > 0) { struct block_list* (*preHookFunc) (struct block_list **src, int *x, int *y, int *range, int *type, int *ignore_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2513,9 +2513,9 @@ struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y { retVal___ = HPMHooks.source.battle.get_enemy_area(src, x, y, range, type, ignore_id); } - if( HPMHooks.count.HP_battle_get_enemy_area_post ) { + if (HPMHooks.count.HP_battle_get_enemy_area_post > 0) { 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++ ) { + 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); } @@ -2525,16 +2525,16 @@ struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y int HP_battle_damage_area(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_damage_area_pre ) { + if (HPMHooks.count.HP_battle_damage_area_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2544,9 +2544,9 @@ int HP_battle_damage_area(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.damage_area(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_damage_area_post ) { + if (HPMHooks.count.HP_battle_damage_area_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_post; hIndex++ ) { + 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); @@ -2557,14 +2557,14 @@ int HP_battle_damage_area(struct block_list *bl, va_list ap) { } void HP_battle_calc_masteryfix_unknown(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; - if( HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int64 **damage, int **div, bool **left, bool **weapon); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_unknown_pre[hIndex].func; preHookFunc(&src, &target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2572,9 +2572,9 @@ void HP_battle_calc_masteryfix_unknown(struct block_list *src, struct block_list { HPMHooks.source.battle.calc_masteryfix_unknown(src, target, skill_id, skill_lv, damage, div, left, weapon); } - if( HPMHooks.count.HP_battle_calc_masteryfix_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_unknown_post > 0) { void (*postHookFunc) (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_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_unknown_post[hIndex].func; postHookFunc(src, target, skill_id, skill_lv, damage, div, left, weapon); } @@ -2583,14 +2583,14 @@ void HP_battle_calc_masteryfix_unknown(struct block_list *src, struct block_list } void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre ) { + if (HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_magic_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &skillratio, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2598,9 +2598,9 @@ void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list { HPMHooks.source.battle.calc_skillratio_magic_unknown(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } - if( HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post > 0) { void (*postHookFunc) (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_magic_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_magic_unknown_post[hIndex].func; postHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } @@ -2609,14 +2609,14 @@ void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list } void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre ) { + if (HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_weapon_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &skillratio, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2624,9 +2624,9 @@ void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_lis { HPMHooks.source.battle.calc_skillratio_weapon_unknown(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } - if( HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post > 0) { void (*postHookFunc) (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_weapon_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_weapon_unknown_post[hIndex].func; postHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } @@ -2635,14 +2635,14 @@ void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_lis } void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **mflag, struct Damage **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_unknown_pre[hIndex].func; preHookFunc(&src, &target, &skill_id, &skill_lv, &mflag, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2650,9 +2650,9 @@ void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_lis { HPMHooks.source.battle.calc_misc_attack_unknown(src, target, skill_id, skill_lv, mflag, md); } - if( HPMHooks.count.HP_battle_calc_misc_attack_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_unknown_post[hIndex].func; postHookFunc(src, target, skill_id, skill_lv, mflag, md); } @@ -2662,14 +2662,14 @@ void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_lis /* battleground_interface */ void HP_bg_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_bg_init_pre ) { + if (HPMHooks.count.HP_bg_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2677,9 +2677,9 @@ void HP_bg_init(bool minimal) { { HPMHooks.source.bg.init(minimal); } - if( HPMHooks.count.HP_bg_init_post ) { + if (HPMHooks.count.HP_bg_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_init_post[hIndex].func; postHookFunc(minimal); } @@ -2688,14 +2688,14 @@ void HP_bg_init(bool minimal) { } void HP_bg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_bg_final_pre ) { + if (HPMHooks.count.HP_bg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2703,9 +2703,9 @@ void HP_bg_final(void) { { HPMHooks.source.bg.final(); } - if( HPMHooks.count.HP_bg_final_post ) { + if (HPMHooks.count.HP_bg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_final_post[hIndex].func; postHookFunc(); } @@ -2715,14 +2715,14 @@ void HP_bg_final(void) { struct bg_arena* HP_bg_name2arena(const char *name) { int hIndex = 0; struct bg_arena* retVal___ = NULL; - if( HPMHooks.count.HP_bg_name2arena_pre ) { + if (HPMHooks.count.HP_bg_name2arena_pre > 0) { struct bg_arena* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2730,9 +2730,9 @@ struct bg_arena* HP_bg_name2arena(const char *name) { { retVal___ = HPMHooks.source.bg.name2arena(name); } - if( HPMHooks.count.HP_bg_name2arena_post ) { + if (HPMHooks.count.HP_bg_name2arena_post > 0) { struct bg_arena* (*postHookFunc) (struct bg_arena* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_name2arena_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -2741,14 +2741,14 @@ struct bg_arena* HP_bg_name2arena(const char *name) { } 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 ) { + if (HPMHooks.count.HP_bg_queue_add_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2756,9 +2756,9 @@ void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum b { HPMHooks.source.bg.queue_add(sd, arena, type); } - if( HPMHooks.count.HP_bg_queue_add_post ) { + if (HPMHooks.count.HP_bg_queue_add_post > 0) { 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++ ) { + 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); } @@ -2768,14 +2768,14 @@ void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum b 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___ = BGQA_SUCCESS; - if( HPMHooks.count.HP_bg_can_queue_pre ) { + if (HPMHooks.count.HP_bg_can_queue_pre > 0) { enum BATTLEGROUNDS_QUEUE_ACK (*preHookFunc) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2783,9 +2783,9 @@ enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct { retVal___ = HPMHooks.source.bg.can_queue(sd, arena, type); } - if( HPMHooks.count.HP_bg_can_queue_post ) { + if (HPMHooks.count.HP_bg_can_queue_post > 0) { 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++ ) { + 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); } @@ -2795,14 +2795,14 @@ enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct int HP_bg_id2pos(int queue_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_id2pos_pre ) { + if (HPMHooks.count.HP_bg_id2pos_pre > 0) { int (*preHookFunc) (int *queue_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2810,9 +2810,9 @@ int HP_bg_id2pos(int queue_id, int account_id) { { retVal___ = HPMHooks.source.bg.id2pos(queue_id, account_id); } - if( HPMHooks.count.HP_bg_id2pos_post ) { + if (HPMHooks.count.HP_bg_id2pos_post > 0) { int (*postHookFunc) (int retVal___, int queue_id, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_post; hIndex++ ) { + 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); } @@ -2821,14 +2821,14 @@ int HP_bg_id2pos(int queue_id, int account_id) { } void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_bg_queue_pc_cleanup_pre ) { + if (HPMHooks.count.HP_bg_queue_pc_cleanup_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2836,9 +2836,9 @@ void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { { HPMHooks.source.bg.queue_pc_cleanup(sd); } - if( HPMHooks.count.HP_bg_queue_pc_cleanup_post ) { + if (HPMHooks.count.HP_bg_queue_pc_cleanup_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_post; hIndex++ ) { + 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); } @@ -2847,14 +2847,14 @@ void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { } void HP_bg_begin(struct bg_arena *arena) { int hIndex = 0; - if( HPMHooks.count.HP_bg_begin_pre ) { + if (HPMHooks.count.HP_bg_begin_pre > 0) { void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2862,9 +2862,9 @@ void HP_bg_begin(struct bg_arena *arena) { { HPMHooks.source.bg.begin(arena); } - if( HPMHooks.count.HP_bg_begin_post ) { + if (HPMHooks.count.HP_bg_begin_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_begin_post[hIndex].func; postHookFunc(arena); } @@ -2874,14 +2874,14 @@ void HP_bg_begin(struct bg_arena *arena) { int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_begin_timer_pre ) { + if (HPMHooks.count.HP_bg_begin_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2889,9 +2889,9 @@ int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.begin_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_begin_timer_post ) { + if (HPMHooks.count.HP_bg_begin_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_post; hIndex++ ) { + 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); } @@ -2900,14 +2900,14 @@ int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_bg_queue_pregame(struct bg_arena *arena) { int hIndex = 0; - if( HPMHooks.count.HP_bg_queue_pregame_pre ) { + if (HPMHooks.count.HP_bg_queue_pregame_pre > 0) { void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2915,9 +2915,9 @@ void HP_bg_queue_pregame(struct bg_arena *arena) { { HPMHooks.source.bg.queue_pregame(arena); } - if( HPMHooks.count.HP_bg_queue_pregame_post ) { + if (HPMHooks.count.HP_bg_queue_pregame_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_queue_pregame_post[hIndex].func; postHookFunc(arena); } @@ -2927,14 +2927,14 @@ void HP_bg_queue_pregame(struct bg_arena *arena) { int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_fillup_timer_pre ) { + if (HPMHooks.count.HP_bg_fillup_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2942,9 +2942,9 @@ int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.fillup_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_fillup_timer_post ) { + if (HPMHooks.count.HP_bg_fillup_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_post; hIndex++ ) { + 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); } @@ -2953,14 +2953,14 @@ int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_bg_queue_ready_ack_pre > 0) { void (*preHookFunc) (struct bg_arena **arena, struct map_session_data **sd, bool *response); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2968,9 +2968,9 @@ void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd, { HPMHooks.source.bg.queue_ready_ack(arena, sd, response); } - if( HPMHooks.count.HP_bg_queue_ready_ack_post ) { + if (HPMHooks.count.HP_bg_queue_ready_ack_post > 0) { 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++ ) { + 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); } @@ -2979,14 +2979,14 @@ void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd, } void HP_bg_match_over(struct bg_arena *arena, bool canceled) { int hIndex = 0; - if( HPMHooks.count.HP_bg_match_over_pre ) { + if (HPMHooks.count.HP_bg_match_over_pre > 0) { void (*preHookFunc) (struct bg_arena **arena, bool *canceled); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2994,9 +2994,9 @@ void HP_bg_match_over(struct bg_arena *arena, bool canceled) { { HPMHooks.source.bg.match_over(arena, canceled); } - if( HPMHooks.count.HP_bg_match_over_post ) { + if (HPMHooks.count.HP_bg_match_over_post > 0) { void (*postHookFunc) (struct bg_arena *arena, bool canceled); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_post; hIndex++ ) { + 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); } @@ -3005,14 +3005,14 @@ void HP_bg_match_over(struct bg_arena *arena, bool canceled) { } void HP_bg_queue_check(struct bg_arena *arena) { int hIndex = 0; - if( HPMHooks.count.HP_bg_queue_check_pre ) { + if (HPMHooks.count.HP_bg_queue_check_pre > 0) { void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3020,9 +3020,9 @@ void HP_bg_queue_check(struct bg_arena *arena) { { HPMHooks.source.bg.queue_check(arena); } - if( HPMHooks.count.HP_bg_queue_check_post ) { + if (HPMHooks.count.HP_bg_queue_check_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_queue_check_post[hIndex].func; postHookFunc(arena); } @@ -3032,14 +3032,14 @@ void HP_bg_queue_check(struct bg_arena *arena) { 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 ) { + if (HPMHooks.count.HP_bg_team_search_pre > 0) { struct battleground_data* (*preHookFunc) (int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3047,9 +3047,9 @@ struct battleground_data* HP_bg_team_search(int bg_id) { { retVal___ = HPMHooks.source.bg.team_search(bg_id); } - if( HPMHooks.count.HP_bg_team_search_post ) { + if (HPMHooks.count.HP_bg_team_search_post > 0) { struct battleground_data* (*postHookFunc) (struct battleground_data* retVal___, int bg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_post; hIndex++ ) { + 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); } @@ -3059,14 +3059,14 @@ struct battleground_data* HP_bg_team_search(int bg_id) { 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 ) { + if (HPMHooks.count.HP_bg_getavailablesd_pre > 0) { struct map_session_data* (*preHookFunc) (struct battleground_data **bgd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3074,9 +3074,9 @@ struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) { { retVal___ = HPMHooks.source.bg.getavailablesd(bgd); } - if( HPMHooks.count.HP_bg_getavailablesd_post ) { + if (HPMHooks.count.HP_bg_getavailablesd_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, bgd); } @@ -3086,14 +3086,14 @@ struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) { bool HP_bg_team_delete(int bg_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_delete_pre ) { + if (HPMHooks.count.HP_bg_team_delete_pre > 0) { bool (*preHookFunc) (int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3101,9 +3101,9 @@ bool HP_bg_team_delete(int bg_id) { { retVal___ = HPMHooks.source.bg.team_delete(bg_id); } - if( HPMHooks.count.HP_bg_team_delete_post ) { + if (HPMHooks.count.HP_bg_team_delete_post > 0) { bool (*postHookFunc) (bool retVal___, int bg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_post; hIndex++ ) { + 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); } @@ -3113,14 +3113,14 @@ bool HP_bg_team_delete(int bg_id) { bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_warp_pre ) { + if (HPMHooks.count.HP_bg_team_warp_pre > 0) { bool (*preHookFunc) (int *bg_id, unsigned short *map_index, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) { + 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, &map_index, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3128,9 +3128,9 @@ bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { { retVal___ = HPMHooks.source.bg.team_warp(bg_id, map_index, x, y); } - if( HPMHooks.count.HP_bg_team_warp_post ) { + if (HPMHooks.count.HP_bg_team_warp_post > 0) { bool (*postHookFunc) (bool retVal___, int bg_id, unsigned short map_index, short x, short y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_post; hIndex++ ) { + 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, map_index, x, y); } @@ -3139,14 +3139,14 @@ bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { } void HP_bg_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_bg_send_dot_remove_pre ) { + if (HPMHooks.count.HP_bg_send_dot_remove_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_send_dot_remove_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3154,9 +3154,9 @@ void HP_bg_send_dot_remove(struct map_session_data *sd) { { HPMHooks.source.bg.send_dot_remove(sd); } - if( HPMHooks.count.HP_bg_send_dot_remove_post ) { + if (HPMHooks.count.HP_bg_send_dot_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_send_dot_remove_post[hIndex].func; postHookFunc(sd); } @@ -3166,14 +3166,14 @@ void HP_bg_send_dot_remove(struct map_session_data *sd) { bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_join_pre ) { + if (HPMHooks.count.HP_bg_team_join_pre > 0) { bool (*preHookFunc) (int *bg_id, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3181,9 +3181,9 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { { retVal___ = HPMHooks.source.bg.team_join(bg_id, sd); } - if( HPMHooks.count.HP_bg_team_join_post ) { + if (HPMHooks.count.HP_bg_team_join_post > 0) { bool (*postHookFunc) (bool retVal___, int bg_id, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_post; hIndex++ ) { + 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); } @@ -3193,14 +3193,14 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_leave_pre ) { + if (HPMHooks.count.HP_bg_team_leave_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, enum bg_team_leave_type *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3208,9 +3208,9 @@ int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) { retVal___ = HPMHooks.source.bg.team_leave(sd, flag); } - if( HPMHooks.count.HP_bg_team_leave_post ) { + if (HPMHooks.count.HP_bg_team_leave_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum bg_team_leave_type flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_post; hIndex++ ) { + 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); } @@ -3220,14 +3220,14 @@ int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) bool HP_bg_member_respawn(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_member_respawn_pre ) { + if (HPMHooks.count.HP_bg_member_respawn_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3235,9 +3235,9 @@ bool HP_bg_member_respawn(struct map_session_data *sd) { { retVal___ = HPMHooks.source.bg.member_respawn(sd); } - if( HPMHooks.count.HP_bg_member_respawn_post ) { + if (HPMHooks.count.HP_bg_member_respawn_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_post; hIndex++ ) { + 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); } @@ -3247,14 +3247,14 @@ bool HP_bg_member_respawn(struct map_session_data *sd) { int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, const char *dev) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_create_pre ) { + if (HPMHooks.count.HP_bg_create_pre > 0) { int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char **ev, const char **dev); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func; retVal___ = preHookFunc(&map_index, &rx, &ry, &ev, &dev); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3262,9 +3262,9 @@ int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, c { retVal___ = HPMHooks.source.bg.create(map_index, rx, ry, ev, dev); } - if( HPMHooks.count.HP_bg_create_post ) { + if (HPMHooks.count.HP_bg_create_post > 0) { int (*postHookFunc) (int retVal___, unsigned short map_index, short rx, short ry, const char *ev, const char *dev); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_index, rx, ry, ev, dev); } @@ -3274,14 +3274,14 @@ int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, c int HP_bg_team_get_id(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_get_id_pre ) { + if (HPMHooks.count.HP_bg_team_get_id_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3289,9 +3289,9 @@ int HP_bg_team_get_id(struct block_list *bl) { { retVal___ = HPMHooks.source.bg.team_get_id(bl); } - if( HPMHooks.count.HP_bg_team_get_id_post ) { + if (HPMHooks.count.HP_bg_team_get_id_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_post; hIndex++ ) { + 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); } @@ -3301,14 +3301,14 @@ int HP_bg_team_get_id(struct block_list *bl) { bool HP_bg_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_send_message_pre ) { + if (HPMHooks.count.HP_bg_send_message_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3316,9 +3316,9 @@ bool HP_bg_send_message(struct map_session_data *sd, const char *mes) { { retVal___ = HPMHooks.source.bg.send_message(sd, mes); } - if( HPMHooks.count.HP_bg_send_message_post ) { + if (HPMHooks.count.HP_bg_send_message_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_post; hIndex++ ) { + 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); } @@ -3328,16 +3328,16 @@ bool HP_bg_send_message(struct map_session_data *sd, const char *mes) { int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_send_xy_timer_sub_pre ) { + if (HPMHooks.count.HP_bg_send_xy_timer_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3347,9 +3347,9 @@ int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_bg_send_xy_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_post; hIndex++ ) { + 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); @@ -3361,14 +3361,14 @@ int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_send_xy_timer_pre ) { + if (HPMHooks.count.HP_bg_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3376,9 +3376,9 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.send_xy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_send_xy_timer_post ) { + if (HPMHooks.count.HP_bg_send_xy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_post; hIndex++ ) { + 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); } @@ -3388,14 +3388,14 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_afk_timer_pre ) { + if (HPMHooks.count.HP_bg_afk_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_afk_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3403,9 +3403,9 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.afk_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_afk_timer_post ) { + if (HPMHooks.count.HP_bg_afk_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_afk_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -3415,16 +3415,16 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_db_final_pre ) { + if (HPMHooks.count.HP_bg_team_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_bg_team_db_final_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3434,9 +3434,9 @@ int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.bg.team_db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_bg_team_db_final_post ) { + if (HPMHooks.count.HP_bg_team_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_bg_team_db_final_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -3448,14 +3448,14 @@ int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { enum bg_queue_types HP_bg_str2teamtype(const char *str) { int hIndex = 0; enum bg_queue_types retVal___ = BGQT_INVALID; - if( HPMHooks.count.HP_bg_str2teamtype_pre ) { + if (HPMHooks.count.HP_bg_str2teamtype_pre > 0) { enum bg_queue_types (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_str2teamtype_pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3463,9 +3463,9 @@ enum bg_queue_types HP_bg_str2teamtype(const char *str) { { retVal___ = HPMHooks.source.bg.str2teamtype(str); } - if( HPMHooks.count.HP_bg_str2teamtype_post ) { + if (HPMHooks.count.HP_bg_str2teamtype_post > 0) { enum bg_queue_types (*postHookFunc) (enum bg_queue_types retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_str2teamtype_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -3474,14 +3474,14 @@ enum bg_queue_types HP_bg_str2teamtype(const char *str) { } void HP_bg_config_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_bg_config_read_pre ) { + if (HPMHooks.count.HP_bg_config_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3489,9 +3489,9 @@ void HP_bg_config_read(void) { { HPMHooks.source.bg.config_read(); } - if( HPMHooks.count.HP_bg_config_read_post ) { + if (HPMHooks.count.HP_bg_config_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_config_read_post[hIndex].func; postHookFunc(); } @@ -3502,14 +3502,14 @@ void HP_bg_config_read(void) { bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_setup_pre ) { + if (HPMHooks.count.HP_buyingstore_setup_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, unsigned char *slots); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3517,9 +3517,9 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { { retVal___ = HPMHooks.source.buyingstore.setup(sd, slots); } - if( HPMHooks.count.HP_buyingstore_setup_post ) { + if (HPMHooks.count.HP_buyingstore_setup_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned char slots); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_post; hIndex++ ) { + 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); } @@ -3528,14 +3528,14 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { } 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 ) { + if (HPMHooks.count.HP_buyingstore_create_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const uint8 **itemlist, unsigned int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3543,9 +3543,9 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned { HPMHooks.source.buyingstore.create(sd, zenylimit, result, storename, itemlist, count); } - if( HPMHooks.count.HP_buyingstore_create_post ) { + if (HPMHooks.count.HP_buyingstore_create_post > 0) { 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++ ) { + 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); } @@ -3554,14 +3554,14 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned } void HP_buyingstore_close(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_buyingstore_close_pre ) { + if (HPMHooks.count.HP_buyingstore_close_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3569,9 +3569,9 @@ void HP_buyingstore_close(struct map_session_data *sd) { { HPMHooks.source.buyingstore.close(sd); } - if( HPMHooks.count.HP_buyingstore_close_post ) { + if (HPMHooks.count.HP_buyingstore_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_close_post[hIndex].func; postHookFunc(sd); } @@ -3580,14 +3580,14 @@ void HP_buyingstore_close(struct map_session_data *sd) { } void HP_buyingstore_open(struct map_session_data *sd, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_buyingstore_open_pre ) { + if (HPMHooks.count.HP_buyingstore_open_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3595,9 +3595,9 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) { { HPMHooks.source.buyingstore.open(sd, account_id); } - if( HPMHooks.count.HP_buyingstore_open_post ) { + if (HPMHooks.count.HP_buyingstore_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_open_post[hIndex].func; postHookFunc(sd, account_id); } @@ -3606,14 +3606,14 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) { } 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 ) { + if (HPMHooks.count.HP_buyingstore_trade_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const uint8 **itemlist, unsigned int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3621,9 +3621,9 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned { HPMHooks.source.buyingstore.trade(sd, account_id, buyer_id, itemlist, count); } - if( HPMHooks.count.HP_buyingstore_trade_post ) { + if (HPMHooks.count.HP_buyingstore_trade_post > 0) { 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++ ) { + 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); } @@ -3633,14 +3633,14 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_search_pre ) { + if (HPMHooks.count.HP_buyingstore_search_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3648,9 +3648,9 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { { retVal___ = HPMHooks.source.buyingstore.search(sd, nameid); } - if( HPMHooks.count.HP_buyingstore_search_post ) { + if (HPMHooks.count.HP_buyingstore_search_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_post; hIndex++ ) { + 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); } @@ -3660,14 +3660,14 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_searchall_pre ) { + if (HPMHooks.count.HP_buyingstore_searchall_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const struct s_search_store_search **s); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3675,9 +3675,9 @@ bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search { retVal___ = HPMHooks.source.buyingstore.searchall(sd, s); } - if( HPMHooks.count.HP_buyingstore_searchall_post ) { + if (HPMHooks.count.HP_buyingstore_searchall_post > 0) { 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++ ) { + 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); } @@ -3687,14 +3687,14 @@ bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search unsigned int HP_buyingstore_getuid(void) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_buyingstore_getuid_pre ) { + if (HPMHooks.count.HP_buyingstore_getuid_pre > 0) { unsigned int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3702,9 +3702,9 @@ unsigned int HP_buyingstore_getuid(void) { { retVal___ = HPMHooks.source.buyingstore.getuid(); } - if( HPMHooks.count.HP_buyingstore_getuid_post ) { + if (HPMHooks.count.HP_buyingstore_getuid_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_getuid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -3715,14 +3715,14 @@ unsigned int HP_buyingstore_getuid(void) { int HP_channel_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_channel_init_pre ) { + if (HPMHooks.count.HP_channel_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3730,9 +3730,9 @@ int HP_channel_init(bool minimal) { { retVal___ = HPMHooks.source.channel.init(minimal); } - if( HPMHooks.count.HP_channel_init_post ) { + if (HPMHooks.count.HP_channel_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -3741,14 +3741,14 @@ int HP_channel_init(bool minimal) { } void HP_channel_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_channel_final_pre ) { + if (HPMHooks.count.HP_channel_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3756,9 +3756,9 @@ void HP_channel_final(void) { { HPMHooks.source.channel.final(); } - if( HPMHooks.count.HP_channel_final_post ) { + if (HPMHooks.count.HP_channel_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_final_post[hIndex].func; postHookFunc(); } @@ -3768,14 +3768,14 @@ void HP_channel_final(void) { struct channel_data* HP_channel_search(const char *name, struct map_session_data *sd) { int hIndex = 0; struct channel_data* retVal___ = NULL; - if( HPMHooks.count.HP_channel_search_pre ) { + if (HPMHooks.count.HP_channel_search_pre > 0) { struct channel_data* (*preHookFunc) (const char **name, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_search_pre[hIndex].func; retVal___ = preHookFunc(&name, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3783,9 +3783,9 @@ struct channel_data* HP_channel_search(const char *name, struct map_session_data { retVal___ = HPMHooks.source.channel.search(name, sd); } - if( HPMHooks.count.HP_channel_search_post ) { + if (HPMHooks.count.HP_channel_search_post > 0) { struct channel_data* (*postHookFunc) (struct channel_data* retVal___, const char *name, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, sd); } @@ -3795,14 +3795,14 @@ struct channel_data* HP_channel_search(const char *name, struct map_session_data struct channel_data* HP_channel_create(enum channel_types type, const char *name, unsigned char color) { int hIndex = 0; struct channel_data* retVal___ = NULL; - if( HPMHooks.count.HP_channel_create_pre ) { + if (HPMHooks.count.HP_channel_create_pre > 0) { struct channel_data* (*preHookFunc) (enum channel_types *type, const char **name, unsigned char *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_create_pre[hIndex].func; retVal___ = preHookFunc(&type, &name, &color); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3810,9 +3810,9 @@ struct channel_data* HP_channel_create(enum channel_types type, const char *name { retVal___ = HPMHooks.source.channel.create(type, name, color); } - if( HPMHooks.count.HP_channel_create_post ) { + if (HPMHooks.count.HP_channel_create_post > 0) { struct channel_data* (*postHookFunc) (struct channel_data* retVal___, enum channel_types type, const char *name, unsigned char color); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, name, color); } @@ -3821,14 +3821,14 @@ struct channel_data* HP_channel_create(enum channel_types type, const char *name } void HP_channel_delete(struct channel_data *chan) { int hIndex = 0; - if( HPMHooks.count.HP_channel_delete_pre ) { + if (HPMHooks.count.HP_channel_delete_pre > 0) { void (*preHookFunc) (struct channel_data **chan); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_delete_pre[hIndex].func; preHookFunc(&chan); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3836,9 +3836,9 @@ void HP_channel_delete(struct channel_data *chan) { { HPMHooks.source.channel.delete(chan); } - if( HPMHooks.count.HP_channel_delete_post ) { + if (HPMHooks.count.HP_channel_delete_post > 0) { void (*postHookFunc) (struct channel_data *chan); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_delete_post[hIndex].func; postHookFunc(chan); } @@ -3847,14 +3847,14 @@ void HP_channel_delete(struct channel_data *chan) { } void HP_channel_set_password(struct channel_data *chan, const char *password) { int hIndex = 0; - if( HPMHooks.count.HP_channel_set_password_pre ) { + if (HPMHooks.count.HP_channel_set_password_pre > 0) { void (*preHookFunc) (struct channel_data **chan, const char **password); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_set_password_pre[hIndex].func; preHookFunc(&chan, &password); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3862,9 +3862,9 @@ void HP_channel_set_password(struct channel_data *chan, const char *password) { { HPMHooks.source.channel.set_password(chan, password); } - if( HPMHooks.count.HP_channel_set_password_post ) { + if (HPMHooks.count.HP_channel_set_password_post > 0) { void (*postHookFunc) (struct channel_data *chan, const char *password); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_set_password_post[hIndex].func; postHookFunc(chan, password); } @@ -3874,14 +3874,14 @@ void HP_channel_set_password(struct channel_data *chan, const char *password) { enum channel_operation_status HP_channel_ban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_ban_pre ) { + if (HPMHooks.count.HP_channel_ban_pre > 0) { enum channel_operation_status (*preHookFunc) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_ban_pre[hIndex].func; retVal___ = preHookFunc(&chan, &ssd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3889,9 +3889,9 @@ enum channel_operation_status HP_channel_ban(struct channel_data *chan, const st { retVal___ = HPMHooks.source.channel.ban(chan, ssd, tsd); } - if( HPMHooks.count.HP_channel_ban_post ) { + if (HPMHooks.count.HP_channel_ban_post > 0) { enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_ban_post[hIndex].func; retVal___ = postHookFunc(retVal___, chan, ssd, tsd); } @@ -3901,14 +3901,14 @@ enum channel_operation_status HP_channel_ban(struct channel_data *chan, const st enum channel_operation_status HP_channel_unban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_unban_pre ) { + if (HPMHooks.count.HP_channel_unban_pre > 0) { enum channel_operation_status (*preHookFunc) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_unban_pre[hIndex].func; retVal___ = preHookFunc(&chan, &ssd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3916,9 +3916,9 @@ enum channel_operation_status HP_channel_unban(struct channel_data *chan, const { retVal___ = HPMHooks.source.channel.unban(chan, ssd, tsd); } - if( HPMHooks.count.HP_channel_unban_post ) { + if (HPMHooks.count.HP_channel_unban_post > 0) { enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_unban_post[hIndex].func; retVal___ = postHookFunc(retVal___, chan, ssd, tsd); } @@ -3927,14 +3927,14 @@ enum channel_operation_status HP_channel_unban(struct channel_data *chan, const } void HP_channel_set_options(struct channel_data *chan, unsigned int options) { int hIndex = 0; - if( HPMHooks.count.HP_channel_set_options_pre ) { + if (HPMHooks.count.HP_channel_set_options_pre > 0) { void (*preHookFunc) (struct channel_data **chan, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_set_options_pre[hIndex].func; preHookFunc(&chan, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3942,9 +3942,9 @@ void HP_channel_set_options(struct channel_data *chan, unsigned int options) { { HPMHooks.source.channel.set_options(chan, options); } - if( HPMHooks.count.HP_channel_set_options_post ) { + if (HPMHooks.count.HP_channel_set_options_post > 0) { void (*postHookFunc) (struct channel_data *chan, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_set_options_post[hIndex].func; postHookFunc(chan, options); } @@ -3953,14 +3953,14 @@ void HP_channel_set_options(struct channel_data *chan, unsigned int options) { } void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_channel_send_pre ) { + if (HPMHooks.count.HP_channel_send_pre > 0) { void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_send_pre[hIndex].func; preHookFunc(&chan, &sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3968,9 +3968,9 @@ void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, con { HPMHooks.source.channel.send(chan, sd, msg); } - if( HPMHooks.count.HP_channel_send_post ) { + if (HPMHooks.count.HP_channel_send_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_send_post[hIndex].func; postHookFunc(chan, sd, msg); } @@ -3979,14 +3979,14 @@ void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, con } void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, bool stealth) { int hIndex = 0; - if( HPMHooks.count.HP_channel_join_sub_pre ) { + if (HPMHooks.count.HP_channel_join_sub_pre > 0) { void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, bool *stealth); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_join_sub_pre[hIndex].func; preHookFunc(&chan, &sd, &stealth); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3994,9 +3994,9 @@ void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, { HPMHooks.source.channel.join_sub(chan, sd, stealth); } - if( HPMHooks.count.HP_channel_join_sub_post ) { + if (HPMHooks.count.HP_channel_join_sub_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool stealth); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_join_sub_post[hIndex].func; postHookFunc(chan, sd, stealth); } @@ -4006,14 +4006,14 @@ void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, enum channel_operation_status HP_channel_join(struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_join_pre ) { + if (HPMHooks.count.HP_channel_join_pre > 0) { enum channel_operation_status (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, const char **password, bool *silent); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_join_pre[hIndex].func; retVal___ = preHookFunc(&chan, &sd, &password, &silent); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4021,9 +4021,9 @@ enum channel_operation_status HP_channel_join(struct channel_data *chan, struct { retVal___ = HPMHooks.source.channel.join(chan, sd, password, silent); } - if( HPMHooks.count.HP_channel_join_post ) { + if (HPMHooks.count.HP_channel_join_post > 0) { enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_join_post[hIndex].func; retVal___ = postHookFunc(retVal___, chan, sd, password, silent); } @@ -4032,14 +4032,14 @@ enum channel_operation_status HP_channel_join(struct channel_data *chan, struct } void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_leave_pre ) { + if (HPMHooks.count.HP_channel_leave_pre > 0) { void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_leave_pre[hIndex].func; preHookFunc(&chan, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4047,9 +4047,9 @@ void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { { HPMHooks.source.channel.leave(chan, sd); } - if( HPMHooks.count.HP_channel_leave_post ) { + if (HPMHooks.count.HP_channel_leave_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_leave_post[hIndex].func; postHookFunc(chan, sd); } @@ -4058,14 +4058,14 @@ void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { } void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_leave_sub_pre ) { + if (HPMHooks.count.HP_channel_leave_sub_pre > 0) { void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_leave_sub_pre[hIndex].func; preHookFunc(&chan, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4073,9 +4073,9 @@ void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd { HPMHooks.source.channel.leave_sub(chan, sd); } - if( HPMHooks.count.HP_channel_leave_sub_post ) { + if (HPMHooks.count.HP_channel_leave_sub_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_leave_sub_post[hIndex].func; postHookFunc(chan, sd); } @@ -4084,14 +4084,14 @@ void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd } void HP_channel_quit(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_quit_pre ) { + if (HPMHooks.count.HP_channel_quit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_quit_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4099,9 +4099,9 @@ void HP_channel_quit(struct map_session_data *sd) { { HPMHooks.source.channel.quit(sd); } - if( HPMHooks.count.HP_channel_quit_post ) { + if (HPMHooks.count.HP_channel_quit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_quit_post[hIndex].func; postHookFunc(sd); } @@ -4110,14 +4110,14 @@ void HP_channel_quit(struct map_session_data *sd) { } void HP_channel_map_join(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_map_join_pre ) { + if (HPMHooks.count.HP_channel_map_join_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_map_join_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4125,9 +4125,9 @@ void HP_channel_map_join(struct map_session_data *sd) { { HPMHooks.source.channel.map_join(sd); } - if( HPMHooks.count.HP_channel_map_join_post ) { + if (HPMHooks.count.HP_channel_map_join_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_map_join_post[hIndex].func; postHookFunc(sd); } @@ -4136,14 +4136,14 @@ void HP_channel_map_join(struct map_session_data *sd) { } void HP_channel_guild_join_alliance(const struct guild *g_source, const struct guild *g_ally) { int hIndex = 0; - if( HPMHooks.count.HP_channel_guild_join_alliance_pre ) { + if (HPMHooks.count.HP_channel_guild_join_alliance_pre > 0) { void (*preHookFunc) (const struct guild **g_source, const struct guild **g_ally); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_pre[hIndex].func; preHookFunc(&g_source, &g_ally); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4151,9 +4151,9 @@ void HP_channel_guild_join_alliance(const struct guild *g_source, const struct g { HPMHooks.source.channel.guild_join_alliance(g_source, g_ally); } - if( HPMHooks.count.HP_channel_guild_join_alliance_post ) { + if (HPMHooks.count.HP_channel_guild_join_alliance_post > 0) { void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_post[hIndex].func; postHookFunc(g_source, g_ally); } @@ -4162,14 +4162,14 @@ void HP_channel_guild_join_alliance(const struct guild *g_source, const struct g } void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct guild *g_ally) { int hIndex = 0; - if( HPMHooks.count.HP_channel_guild_leave_alliance_pre ) { + if (HPMHooks.count.HP_channel_guild_leave_alliance_pre > 0) { void (*preHookFunc) (const struct guild **g_source, const struct guild **g_ally); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_pre[hIndex].func; preHookFunc(&g_source, &g_ally); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4177,9 +4177,9 @@ void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct { HPMHooks.source.channel.guild_leave_alliance(g_source, g_ally); } - if( HPMHooks.count.HP_channel_guild_leave_alliance_post ) { + if (HPMHooks.count.HP_channel_guild_leave_alliance_post > 0) { void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_post[hIndex].func; postHookFunc(g_source, g_ally); } @@ -4188,14 +4188,14 @@ void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct } void HP_channel_quit_guild(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_quit_guild_pre ) { + if (HPMHooks.count.HP_channel_quit_guild_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_quit_guild_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4203,9 +4203,9 @@ void HP_channel_quit_guild(struct map_session_data *sd) { { HPMHooks.source.channel.quit_guild(sd); } - if( HPMHooks.count.HP_channel_quit_guild_post ) { + if (HPMHooks.count.HP_channel_quit_guild_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_quit_guild_post[hIndex].func; postHookFunc(sd); } @@ -4214,14 +4214,14 @@ void HP_channel_quit_guild(struct map_session_data *sd) { } void HP_channel_irc_join(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_irc_join_pre ) { + if (HPMHooks.count.HP_channel_irc_join_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_irc_join_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4229,9 +4229,9 @@ void HP_channel_irc_join(struct map_session_data *sd) { { HPMHooks.source.channel.irc_join(sd); } - if( HPMHooks.count.HP_channel_irc_join_post ) { + if (HPMHooks.count.HP_channel_irc_join_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_irc_join_post[hIndex].func; postHookFunc(sd); } @@ -4240,14 +4240,14 @@ void HP_channel_irc_join(struct map_session_data *sd) { } void HP_channel_config_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_channel_config_read_pre ) { + if (HPMHooks.count.HP_channel_config_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_config_read_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4255,9 +4255,9 @@ void HP_channel_config_read(void) { { HPMHooks.source.channel.config_read(); } - if( HPMHooks.count.HP_channel_config_read_post ) { + if (HPMHooks.count.HP_channel_config_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_config_read_post[hIndex].func; postHookFunc(); } @@ -4268,14 +4268,14 @@ void HP_channel_config_read(void) { bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_create_pc_chat_pre ) { + if (HPMHooks.count.HP_chat_create_pc_chat_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4283,9 +4283,9 @@ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, cons { retVal___ = HPMHooks.source.chat.create_pc_chat(sd, title, pass, limit, pub); } - if( HPMHooks.count.HP_chat_create_pc_chat_post ) { + if (HPMHooks.count.HP_chat_create_pc_chat_post > 0) { bool (*postHookFunc) (bool 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++ ) { + 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); } @@ -4295,14 +4295,14 @@ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, cons bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_join_pre ) { + if (HPMHooks.count.HP_chat_join_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *chatid, const char **pass); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4310,9 +4310,9 @@ bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { { retVal___ = HPMHooks.source.chat.join(sd, chatid, pass); } - if( HPMHooks.count.HP_chat_join_post ) { + if (HPMHooks.count.HP_chat_join_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int chatid, const char *pass); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_post; hIndex++ ) { + 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); } @@ -4322,14 +4322,14 @@ bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { int HP_chat_leave(struct map_session_data *sd, bool kicked) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chat_leave_pre ) { + if (HPMHooks.count.HP_chat_leave_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, bool *kicked); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4337,9 +4337,9 @@ int HP_chat_leave(struct map_session_data *sd, bool kicked) { { retVal___ = HPMHooks.source.chat.leave(sd, kicked); } - if( HPMHooks.count.HP_chat_leave_post ) { + if (HPMHooks.count.HP_chat_leave_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool kicked); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_post; hIndex++ ) { + 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); } @@ -4349,14 +4349,14 @@ int HP_chat_leave(struct map_session_data *sd, bool kicked) { bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_change_owner_pre ) { + if (HPMHooks.count.HP_chat_change_owner_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **nextownername); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4364,9 +4364,9 @@ bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername { retVal___ = HPMHooks.source.chat.change_owner(sd, nextownername); } - if( HPMHooks.count.HP_chat_change_owner_post ) { + if (HPMHooks.count.HP_chat_change_owner_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *nextownername); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_post; hIndex++ ) { + 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); } @@ -4376,14 +4376,14 @@ bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername bool HP_chat_change_status(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_change_status_pre ) { + if (HPMHooks.count.HP_chat_change_status_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4391,9 +4391,9 @@ bool HP_chat_change_status(struct map_session_data *sd, const char *title, const { retVal___ = HPMHooks.source.chat.change_status(sd, title, pass, limit, pub); } - if( HPMHooks.count.HP_chat_change_status_post ) { + if (HPMHooks.count.HP_chat_change_status_post > 0) { bool (*postHookFunc) (bool 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++ ) { + 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); } @@ -4403,14 +4403,14 @@ bool HP_chat_change_status(struct map_session_data *sd, const char *title, const bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_kick_pre ) { + if (HPMHooks.count.HP_chat_kick_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **kickusername); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4418,9 +4418,9 @@ bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) { { retVal___ = HPMHooks.source.chat.kick(sd, kickusername); } - if( HPMHooks.count.HP_chat_kick_post ) { + if (HPMHooks.count.HP_chat_kick_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *kickusername); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_post; hIndex++ ) { + 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); } @@ -4430,14 +4430,14 @@ bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) { bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int min_level, int max_level) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_create_npc_chat_pre ) { + if (HPMHooks.count.HP_chat_create_npc_chat_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, const char **title, int *limit, bool *pub, int *trigger, const char **ev, int *zeny, int *min_level, int *max_level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_pre; hIndex++ ) { + 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, &min_level, &max_level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4445,9 +4445,9 @@ bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, { retVal___ = HPMHooks.source.chat.create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, min_level, max_level); } - if( HPMHooks.count.HP_chat_create_npc_chat_post ) { + if (HPMHooks.count.HP_chat_create_npc_chat_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int min_level, int max_level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_post; hIndex++ ) { + 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, min_level, max_level); } @@ -4457,14 +4457,14 @@ bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool HP_chat_delete_npc_chat(struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_delete_npc_chat_pre ) { + if (HPMHooks.count.HP_chat_delete_npc_chat_pre > 0) { bool (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4472,9 +4472,9 @@ bool HP_chat_delete_npc_chat(struct npc_data *nd) { { retVal___ = HPMHooks.source.chat.delete_npc_chat(nd); } - if( HPMHooks.count.HP_chat_delete_npc_chat_post ) { + if (HPMHooks.count.HP_chat_delete_npc_chat_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_post; hIndex++ ) { + 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); } @@ -4484,14 +4484,14 @@ bool HP_chat_delete_npc_chat(struct npc_data *nd) { bool HP_chat_enable_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_enable_event_pre ) { + if (HPMHooks.count.HP_chat_enable_event_pre > 0) { bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4499,9 +4499,9 @@ bool HP_chat_enable_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.enable_event(cd); } - if( HPMHooks.count.HP_chat_enable_event_post ) { + if (HPMHooks.count.HP_chat_enable_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_post; hIndex++ ) { + 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); } @@ -4511,14 +4511,14 @@ bool HP_chat_enable_event(struct chat_data *cd) { bool HP_chat_disable_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_disable_event_pre ) { + if (HPMHooks.count.HP_chat_disable_event_pre > 0) { bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4526,9 +4526,9 @@ bool HP_chat_disable_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.disable_event(cd); } - if( HPMHooks.count.HP_chat_disable_event_post ) { + if (HPMHooks.count.HP_chat_disable_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_post; hIndex++ ) { + 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); } @@ -4538,14 +4538,14 @@ bool HP_chat_disable_event(struct chat_data *cd) { bool HP_chat_npc_kick_all(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_npc_kick_all_pre ) { + if (HPMHooks.count.HP_chat_npc_kick_all_pre > 0) { bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4553,9 +4553,9 @@ bool HP_chat_npc_kick_all(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.npc_kick_all(cd); } - if( HPMHooks.count.HP_chat_npc_kick_all_post ) { + if (HPMHooks.count.HP_chat_npc_kick_all_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_post; hIndex++ ) { + 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); } @@ -4565,14 +4565,14 @@ bool HP_chat_npc_kick_all(struct chat_data *cd) { bool HP_chat_trigger_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_trigger_event_pre ) { + if (HPMHooks.count.HP_chat_trigger_event_pre > 0) { bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4580,9 +4580,9 @@ bool HP_chat_trigger_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.trigger_event(cd); } - if( HPMHooks.count.HP_chat_trigger_event_post ) { + if (HPMHooks.count.HP_chat_trigger_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_post; hIndex++ ) { + 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); } @@ -4592,14 +4592,14 @@ bool HP_chat_trigger_event(struct chat_data *cd) { 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 min_level, int max_level) { int hIndex = 0; struct chat_data* retVal___ = NULL; - if( HPMHooks.count.HP_chat_create_pre ) { + if (HPMHooks.count.HP_chat_create_pre > 0) { 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 *min_level, int *max_level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pre; hIndex++ ) { + 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, &min_level, &max_level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4607,9 +4607,9 @@ struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const { retVal___ = HPMHooks.source.chat.create(bl, title, pass, limit, pub, trigger, ev, zeny, min_level, max_level); } - if( HPMHooks.count.HP_chat_create_post ) { + if (HPMHooks.count.HP_chat_create_post > 0) { 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 min_level, int max_level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_post; hIndex++ ) { + 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, min_level, max_level); } @@ -4619,14 +4619,14 @@ struct chat_data* HP_chat_create(struct block_list *bl, const char *title, const /* chrif_interface */ void HP_chrif_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_init_pre ) { + if (HPMHooks.count.HP_chrif_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4634,9 +4634,9 @@ void HP_chrif_init(bool minimal) { { HPMHooks.source.chrif.init(minimal); } - if( HPMHooks.count.HP_chrif_init_post ) { + if (HPMHooks.count.HP_chrif_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_init_post[hIndex].func; postHookFunc(minimal); } @@ -4645,14 +4645,14 @@ void HP_chrif_init(bool minimal) { } void HP_chrif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_final_pre ) { + if (HPMHooks.count.HP_chrif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4660,9 +4660,9 @@ void HP_chrif_final(void) { { HPMHooks.source.chrif.final(); } - if( HPMHooks.count.HP_chrif_final_post ) { + if (HPMHooks.count.HP_chrif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_final_post[hIndex].func; postHookFunc(); } @@ -4671,14 +4671,14 @@ void HP_chrif_final(void) { } void HP_chrif_setuserid(char *id) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setuserid_pre ) { + if (HPMHooks.count.HP_chrif_setuserid_pre > 0) { void (*preHookFunc) (char **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4686,9 +4686,9 @@ void HP_chrif_setuserid(char *id) { { HPMHooks.source.chrif.setuserid(id); } - if( HPMHooks.count.HP_chrif_setuserid_post ) { + if (HPMHooks.count.HP_chrif_setuserid_post > 0) { void (*postHookFunc) (char *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setuserid_post[hIndex].func; postHookFunc(id); } @@ -4697,14 +4697,14 @@ void HP_chrif_setuserid(char *id) { } void HP_chrif_setpasswd(char *pwd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setpasswd_pre ) { + if (HPMHooks.count.HP_chrif_setpasswd_pre > 0) { void (*preHookFunc) (char **pwd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4712,9 +4712,9 @@ void HP_chrif_setpasswd(char *pwd) { { HPMHooks.source.chrif.setpasswd(pwd); } - if( HPMHooks.count.HP_chrif_setpasswd_post ) { + if (HPMHooks.count.HP_chrif_setpasswd_post > 0) { void (*postHookFunc) (char *pwd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setpasswd_post[hIndex].func; postHookFunc(pwd); } @@ -4723,14 +4723,14 @@ void HP_chrif_setpasswd(char *pwd) { } void HP_chrif_checkdefaultlogin(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_checkdefaultlogin_pre ) { + if (HPMHooks.count.HP_chrif_checkdefaultlogin_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4738,9 +4738,9 @@ void HP_chrif_checkdefaultlogin(void) { { HPMHooks.source.chrif.checkdefaultlogin(); } - if( HPMHooks.count.HP_chrif_checkdefaultlogin_post ) { + if (HPMHooks.count.HP_chrif_checkdefaultlogin_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_post[hIndex].func; postHookFunc(); } @@ -4750,14 +4750,14 @@ void HP_chrif_checkdefaultlogin(void) { bool HP_chrif_setip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_setip_pre ) { + if (HPMHooks.count.HP_chrif_setip_pre > 0) { bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4765,9 +4765,9 @@ bool HP_chrif_setip(const char *ip) { { retVal___ = HPMHooks.source.chrif.setip(ip); } - if( HPMHooks.count.HP_chrif_setip_post ) { + if (HPMHooks.count.HP_chrif_setip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -4776,14 +4776,14 @@ bool HP_chrif_setip(const char *ip) { } void HP_chrif_setport(uint16 port) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setport_pre ) { + if (HPMHooks.count.HP_chrif_setport_pre > 0) { void (*preHookFunc) (uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4791,9 +4791,9 @@ void HP_chrif_setport(uint16 port) { { HPMHooks.source.chrif.setport(port); } - if( HPMHooks.count.HP_chrif_setport_post ) { + if (HPMHooks.count.HP_chrif_setport_post > 0) { void (*postHookFunc) (uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setport_post[hIndex].func; postHookFunc(port); } @@ -4803,14 +4803,14 @@ void HP_chrif_setport(uint16 port) { int HP_chrif_isconnected(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_isconnected_pre ) { + if (HPMHooks.count.HP_chrif_isconnected_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4818,9 +4818,9 @@ int HP_chrif_isconnected(void) { { retVal___ = HPMHooks.source.chrif.isconnected(); } - if( HPMHooks.count.HP_chrif_isconnected_post ) { + if (HPMHooks.count.HP_chrif_isconnected_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_isconnected_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -4829,14 +4829,14 @@ int HP_chrif_isconnected(void) { } void HP_chrif_check_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_check_shutdown_pre ) { + if (HPMHooks.count.HP_chrif_check_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4844,9 +4844,9 @@ void HP_chrif_check_shutdown(void) { { HPMHooks.source.chrif.check_shutdown(); } - if( HPMHooks.count.HP_chrif_check_shutdown_post ) { + if (HPMHooks.count.HP_chrif_check_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_check_shutdown_post[hIndex].func; postHookFunc(); } @@ -4856,14 +4856,14 @@ void HP_chrif_check_shutdown(void) { struct auth_node* HP_chrif_search(int account_id) { int hIndex = 0; struct auth_node* retVal___ = NULL; - if( HPMHooks.count.HP_chrif_search_pre ) { + if (HPMHooks.count.HP_chrif_search_pre > 0) { struct auth_node* (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4871,9 +4871,9 @@ struct auth_node* HP_chrif_search(int account_id) { { retVal___ = HPMHooks.source.chrif.search(account_id); } - if( HPMHooks.count.HP_chrif_search_post ) { + if (HPMHooks.count.HP_chrif_search_post > 0) { struct auth_node* (*postHookFunc) (struct auth_node* retVal___, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_post; hIndex++ ) { + 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); } @@ -4883,14 +4883,14 @@ struct auth_node* HP_chrif_search(int account_id) { 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 ) { + if (HPMHooks.count.HP_chrif_auth_check_pre > 0) { struct auth_node* (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4898,9 +4898,9 @@ struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state { retVal___ = HPMHooks.source.chrif.auth_check(account_id, char_id, state); } - if( HPMHooks.count.HP_chrif_auth_check_post ) { + if (HPMHooks.count.HP_chrif_auth_check_post > 0) { 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++ ) { + 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); } @@ -4910,14 +4910,14 @@ struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_delete_pre ) { + if (HPMHooks.count.HP_chrif_auth_delete_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4925,9 +4925,9 @@ bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { { retVal___ = HPMHooks.source.chrif.auth_delete(account_id, char_id, state); } - if( HPMHooks.count.HP_chrif_auth_delete_post ) { + if (HPMHooks.count.HP_chrif_auth_delete_post > 0) { 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++ ) { + 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); } @@ -4937,14 +4937,14 @@ bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { bool HP_chrif_auth_finished(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_finished_pre ) { + if (HPMHooks.count.HP_chrif_auth_finished_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4952,9 +4952,9 @@ bool HP_chrif_auth_finished(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.auth_finished(sd); } - if( HPMHooks.count.HP_chrif_auth_finished_post ) { + if (HPMHooks.count.HP_chrif_auth_finished_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_post; hIndex++ ) { + 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); } @@ -4963,14 +4963,14 @@ bool HP_chrif_auth_finished(struct map_session_data *sd) { } void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authreq_pre ) { + if (HPMHooks.count.HP_chrif_authreq_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *hstandalone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_authreq_pre[hIndex].func; preHookFunc(&sd, &hstandalone); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4978,9 +4978,9 @@ void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) { { HPMHooks.source.chrif.authreq(sd, hstandalone); } - if( HPMHooks.count.HP_chrif_authreq_post ) { + if (HPMHooks.count.HP_chrif_authreq_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool hstandalone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_authreq_post[hIndex].func; postHookFunc(sd, hstandalone); } @@ -4989,14 +4989,14 @@ void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) { } void HP_chrif_authok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authok_pre ) { + if (HPMHooks.count.HP_chrif_authok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5004,9 +5004,9 @@ void HP_chrif_authok(int fd) { { HPMHooks.source.chrif.authok(fd); } - if( HPMHooks.count.HP_chrif_authok_post ) { + if (HPMHooks.count.HP_chrif_authok_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_authok_post[hIndex].func; postHookFunc(fd); } @@ -5016,14 +5016,14 @@ void HP_chrif_authok(int fd) { bool HP_chrif_scdata_request(int account_id, int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_scdata_request_pre ) { + if (HPMHooks.count.HP_chrif_scdata_request_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5031,9 +5031,9 @@ bool HP_chrif_scdata_request(int account_id, int char_id) { { retVal___ = HPMHooks.source.chrif.scdata_request(account_id, char_id); } - if( HPMHooks.count.HP_chrif_scdata_request_post ) { + if (HPMHooks.count.HP_chrif_scdata_request_post > 0) { bool (*postHookFunc) (bool retVal___, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_post; hIndex++ ) { + 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); } @@ -5043,14 +5043,14 @@ bool HP_chrif_scdata_request(int account_id, int char_id) { bool HP_chrif_save(struct map_session_data *sd, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_save_pre ) { + if (HPMHooks.count.HP_chrif_save_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5058,9 +5058,9 @@ bool HP_chrif_save(struct map_session_data *sd, int flag) { { retVal___ = HPMHooks.source.chrif.save(sd, flag); } - if( HPMHooks.count.HP_chrif_save_post ) { + if (HPMHooks.count.HP_chrif_save_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_post; hIndex++ ) { + 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); } @@ -5070,14 +5070,14 @@ bool HP_chrif_save(struct map_session_data *sd, int flag) { bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_charselectreq_pre ) { + if (HPMHooks.count.HP_chrif_charselectreq_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, uint32 *s_ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5085,9 +5085,9 @@ bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { { retVal___ = HPMHooks.source.chrif.charselectreq(sd, s_ip); } - if( HPMHooks.count.HP_chrif_charselectreq_post ) { + if (HPMHooks.count.HP_chrif_charselectreq_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint32 s_ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_post; hIndex++ ) { + 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); } @@ -5097,14 +5097,14 @@ bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 port) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changemapserver_pre ) { + if (HPMHooks.count.HP_chrif_changemapserver_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5112,9 +5112,9 @@ bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 por { retVal___ = HPMHooks.source.chrif.changemapserver(sd, ip, port); } - if( HPMHooks.count.HP_chrif_changemapserver_post ) { + if (HPMHooks.count.HP_chrif_changemapserver_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_post; hIndex++ ) { + 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); } @@ -5124,14 +5124,14 @@ bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 por bool HP_chrif_searchcharid(int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_searchcharid_pre ) { + if (HPMHooks.count.HP_chrif_searchcharid_pre > 0) { bool (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5139,9 +5139,9 @@ bool HP_chrif_searchcharid(int char_id) { { retVal___ = HPMHooks.source.chrif.searchcharid(char_id); } - if( HPMHooks.count.HP_chrif_searchcharid_post ) { + if (HPMHooks.count.HP_chrif_searchcharid_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_post; hIndex++ ) { + 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); } @@ -5151,14 +5151,14 @@ bool HP_chrif_searchcharid(int char_id) { bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_email) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changeemail_pre ) { + if (HPMHooks.count.HP_chrif_changeemail_pre > 0) { bool (*preHookFunc) (int *id, const char **actual_email, const char **new_email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5166,9 +5166,9 @@ bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_emai { retVal___ = HPMHooks.source.chrif.changeemail(id, actual_email, new_email); } - if( HPMHooks.count.HP_chrif_changeemail_post ) { + if (HPMHooks.count.HP_chrif_changeemail_post > 0) { bool (*postHookFunc) (bool retVal___, int id, const char *actual_email, const char *new_email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_post; hIndex++ ) { + 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); } @@ -5178,14 +5178,14 @@ bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_emai bool 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; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_ask_name_pre ) { + if (HPMHooks.count.HP_chrif_char_ask_name_pre > 0) { bool (*preHookFunc) (int *acc, const char **character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5193,9 +5193,9 @@ bool HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short { 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 ) { + if (HPMHooks.count.HP_chrif_char_ask_name_post > 0) { bool (*postHookFunc) (bool 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++ ) { + 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); } @@ -5205,14 +5205,14 @@ bool HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short int HP_chrif_updatefamelist(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_updatefamelist_pre ) { + if (HPMHooks.count.HP_chrif_updatefamelist_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5220,9 +5220,9 @@ int HP_chrif_updatefamelist(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.updatefamelist(sd); } - if( HPMHooks.count.HP_chrif_updatefamelist_post ) { + if (HPMHooks.count.HP_chrif_updatefamelist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -5232,14 +5232,14 @@ int HP_chrif_updatefamelist(struct map_session_data *sd) { bool HP_chrif_buildfamelist(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_buildfamelist_pre ) { + if (HPMHooks.count.HP_chrif_buildfamelist_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5247,9 +5247,9 @@ bool HP_chrif_buildfamelist(void) { { retVal___ = HPMHooks.source.chrif.buildfamelist(); } - if( HPMHooks.count.HP_chrif_buildfamelist_post ) { + if (HPMHooks.count.HP_chrif_buildfamelist_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_buildfamelist_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5259,14 +5259,14 @@ bool HP_chrif_buildfamelist(void) { bool HP_chrif_save_scdata(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_save_scdata_pre ) { + if (HPMHooks.count.HP_chrif_save_scdata_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5274,9 +5274,9 @@ bool HP_chrif_save_scdata(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.save_scdata(sd); } - if( HPMHooks.count.HP_chrif_save_scdata_post ) { + if (HPMHooks.count.HP_chrif_save_scdata_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_post; hIndex++ ) { + 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); } @@ -5286,14 +5286,14 @@ bool HP_chrif_save_scdata(struct map_session_data *sd) { bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_ragsrvinfo_pre ) { + if (HPMHooks.count.HP_chrif_ragsrvinfo_pre > 0) { bool (*preHookFunc) (int *base_rate, int *job_rate, int *drop_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5301,9 +5301,9 @@ bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { { retVal___ = HPMHooks.source.chrif.ragsrvinfo(base_rate, job_rate, drop_rate); } - if( HPMHooks.count.HP_chrif_ragsrvinfo_post ) { + if (HPMHooks.count.HP_chrif_ragsrvinfo_post > 0) { bool (*postHookFunc) (bool retVal___, int base_rate, int job_rate, int drop_rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_post; hIndex++ ) { + 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); } @@ -5313,14 +5313,14 @@ bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { bool HP_chrif_char_offline_nsd(int account_id, int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_offline_nsd_pre ) { + if (HPMHooks.count.HP_chrif_char_offline_nsd_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5328,9 +5328,9 @@ bool HP_chrif_char_offline_nsd(int account_id, int char_id) { { retVal___ = HPMHooks.source.chrif.char_offline_nsd(account_id, char_id); } - if( HPMHooks.count.HP_chrif_char_offline_nsd_post ) { + if (HPMHooks.count.HP_chrif_char_offline_nsd_post > 0) { bool (*postHookFunc) (bool retVal___, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_post; hIndex++ ) { + 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); } @@ -5340,14 +5340,14 @@ bool HP_chrif_char_offline_nsd(int account_id, int char_id) { bool HP_chrif_char_reset_offline(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_reset_offline_pre ) { + if (HPMHooks.count.HP_chrif_char_reset_offline_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5355,9 +5355,9 @@ bool HP_chrif_char_reset_offline(void) { { retVal___ = HPMHooks.source.chrif.char_reset_offline(); } - if( HPMHooks.count.HP_chrif_char_reset_offline_post ) { + if (HPMHooks.count.HP_chrif_char_reset_offline_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_post; hIndex++ ) { + 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___); } @@ -5367,14 +5367,14 @@ bool HP_chrif_char_reset_offline(void) { bool HP_chrif_send_users_tochar(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_send_users_tochar_pre ) { + if (HPMHooks.count.HP_chrif_send_users_tochar_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5382,9 +5382,9 @@ bool HP_chrif_send_users_tochar(void) { { retVal___ = HPMHooks.source.chrif.send_users_tochar(); } - if( HPMHooks.count.HP_chrif_send_users_tochar_post ) { + if (HPMHooks.count.HP_chrif_send_users_tochar_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_post; hIndex++ ) { + 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___); } @@ -5394,14 +5394,14 @@ bool HP_chrif_send_users_tochar(void) { bool HP_chrif_char_online(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_online_pre ) { + if (HPMHooks.count.HP_chrif_char_online_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5409,9 +5409,9 @@ bool HP_chrif_char_online(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.char_online(sd); } - if( HPMHooks.count.HP_chrif_char_online_post ) { + if (HPMHooks.count.HP_chrif_char_online_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_post; hIndex++ ) { + 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); } @@ -5421,14 +5421,14 @@ bool HP_chrif_char_online(struct map_session_data *sd) { bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changesex_pre ) { + if (HPMHooks.count.HP_chrif_changesex_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, bool *change_account); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_changesex_pre[hIndex].func; retVal___ = preHookFunc(&sd, &change_account); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5436,9 +5436,9 @@ bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { { retVal___ = HPMHooks.source.chrif.changesex(sd, change_account); } - if( HPMHooks.count.HP_chrif_changesex_post ) { + if (HPMHooks.count.HP_chrif_changesex_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, bool change_account); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_changesex_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, change_account); } @@ -5448,14 +5448,14 @@ bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { bool HP_chrif_divorce(int partner_id1, int partner_id2) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_divorce_pre ) { + if (HPMHooks.count.HP_chrif_divorce_pre > 0) { bool (*preHookFunc) (int *partner_id1, int *partner_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5463,9 +5463,9 @@ bool HP_chrif_divorce(int partner_id1, int partner_id2) { { retVal___ = HPMHooks.source.chrif.divorce(partner_id1, partner_id2); } - if( HPMHooks.count.HP_chrif_divorce_post ) { + if (HPMHooks.count.HP_chrif_divorce_post > 0) { bool (*postHookFunc) (bool retVal___, int partner_id1, int partner_id2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_post; hIndex++ ) { + 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); } @@ -5475,14 +5475,14 @@ bool HP_chrif_divorce(int partner_id1, int partner_id2) { bool HP_chrif_removefriend(int char_id, int friend_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_removefriend_pre ) { + if (HPMHooks.count.HP_chrif_removefriend_pre > 0) { bool (*preHookFunc) (int *char_id, int *friend_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5490,9 +5490,9 @@ bool HP_chrif_removefriend(int char_id, int friend_id) { { retVal___ = HPMHooks.source.chrif.removefriend(char_id, friend_id); } - if( HPMHooks.count.HP_chrif_removefriend_post ) { + if (HPMHooks.count.HP_chrif_removefriend_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, int friend_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_post; hIndex++ ) { + 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); } @@ -5501,14 +5501,14 @@ bool HP_chrif_removefriend(int char_id, int friend_id) { } void HP_chrif_send_report(char *buf, int len) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_send_report_pre ) { + if (HPMHooks.count.HP_chrif_send_report_pre > 0) { void (*preHookFunc) (char **buf, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5516,9 +5516,9 @@ void HP_chrif_send_report(char *buf, int len) { { HPMHooks.source.chrif.send_report(buf, len); } - if( HPMHooks.count.HP_chrif_send_report_post ) { + if (HPMHooks.count.HP_chrif_send_report_post > 0) { void (*postHookFunc) (char *buf, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_report_post; hIndex++ ) { + 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); } @@ -5528,14 +5528,14 @@ void HP_chrif_send_report(char *buf, int len) { bool HP_chrif_flush(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_flush_pre ) { + if (HPMHooks.count.HP_chrif_flush_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_flush_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5543,9 +5543,9 @@ bool HP_chrif_flush(void) { { retVal___ = HPMHooks.source.chrif.flush(); } - if( HPMHooks.count.HP_chrif_flush_post ) { + if (HPMHooks.count.HP_chrif_flush_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_flush_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5554,14 +5554,14 @@ bool HP_chrif_flush(void) { } void HP_chrif_skillid2idx(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_skillid2idx_pre ) { + if (HPMHooks.count.HP_chrif_skillid2idx_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5569,9 +5569,9 @@ void HP_chrif_skillid2idx(int fd) { { HPMHooks.source.chrif.skillid2idx(fd); } - if( HPMHooks.count.HP_chrif_skillid2idx_post ) { + if (HPMHooks.count.HP_chrif_skillid2idx_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_skillid2idx_post[hIndex].func; postHookFunc(fd); } @@ -5581,14 +5581,14 @@ void HP_chrif_skillid2idx(int fd) { bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_sd_to_auth_pre ) { + if (HPMHooks.count.HP_chrif_sd_to_auth_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5596,9 +5596,9 @@ bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { { retVal___ = HPMHooks.source.chrif.sd_to_auth(sd, state); } - if( HPMHooks.count.HP_chrif_sd_to_auth_post ) { + if (HPMHooks.count.HP_chrif_sd_to_auth_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum sd_state state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_post; hIndex++ ) { + 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); } @@ -5608,14 +5608,14 @@ bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) { + if (HPMHooks.count.HP_chrif_check_connect_char_server_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5623,9 +5623,9 @@ int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t dat { retVal___ = HPMHooks.source.chrif.check_connect_char_server(tid, tick, id, data); } - if( HPMHooks.count.HP_chrif_check_connect_char_server_post ) { + if (HPMHooks.count.HP_chrif_check_connect_char_server_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_post; hIndex++ ) { + 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); } @@ -5635,14 +5635,14 @@ int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t dat bool HP_chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_logout_pre ) { + if (HPMHooks.count.HP_chrif_auth_logout_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5650,9 +5650,9 @@ bool HP_chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { { retVal___ = HPMHooks.source.chrif.auth_logout(sd, state); } - if( HPMHooks.count.HP_chrif_auth_logout_post ) { + if (HPMHooks.count.HP_chrif_auth_logout_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum sd_state state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_post; hIndex++ ) { + 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); } @@ -5661,14 +5661,14 @@ bool HP_chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { } void HP_chrif_save_ack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_save_ack_pre ) { + if (HPMHooks.count.HP_chrif_save_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5676,9 +5676,9 @@ void HP_chrif_save_ack(int fd) { { HPMHooks.source.chrif.save_ack(fd); } - if( HPMHooks.count.HP_chrif_save_ack_post ) { + if (HPMHooks.count.HP_chrif_save_ack_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_save_ack_post[hIndex].func; postHookFunc(fd); } @@ -5688,16 +5688,16 @@ void HP_chrif_save_ack(int fd) { int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_reconnect_pre ) { + if (HPMHooks.count.HP_chrif_reconnect_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5707,9 +5707,9 @@ int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.chrif.reconnect(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chrif_reconnect_post ) { + if (HPMHooks.count.HP_chrif_reconnect_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_post; hIndex++ ) { + 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); @@ -5721,16 +5721,16 @@ int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list ap) { int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5740,9 +5740,9 @@ int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list a 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 ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post; hIndex++ ) { + 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); @@ -5754,14 +5754,14 @@ int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list a bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type, uint16 answer) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_ask_name_answer_pre ) { + if (HPMHooks.count.HP_chrif_char_ask_name_answer_pre > 0) { bool (*preHookFunc) (int *acc, const char **player_name, uint16 *type, uint16 *answer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_pre; hIndex++ ) { + 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; retVal___ = preHookFunc(&acc, &player_name, &type, &answer); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5769,9 +5769,9 @@ bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type { retVal___ = HPMHooks.source.chrif.char_ask_name_answer(acc, player_name, type, answer); } - if( HPMHooks.count.HP_chrif_char_ask_name_answer_post ) { + if (HPMHooks.count.HP_chrif_char_ask_name_answer_post > 0) { bool (*postHookFunc) (bool retVal___, int acc, const char *player_name, uint16 type, uint16 answer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_post; hIndex++ ) { + 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; retVal___ = postHookFunc(retVal___, acc, player_name, type, answer); } @@ -5781,16 +5781,16 @@ bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_final_pre ) { + if (HPMHooks.count.HP_chrif_auth_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5800,9 +5800,9 @@ int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_chrif_auth_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_post; hIndex++ ) { + 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); @@ -5814,14 +5814,14 @@ int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) { + if (HPMHooks.count.HP_chrif_send_usercount_tochar_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5829,9 +5829,9 @@ int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chrif.send_usercount_tochar(tid, tick, id, data); } - if( HPMHooks.count.HP_chrif_send_usercount_tochar_post ) { + if (HPMHooks.count.HP_chrif_send_usercount_tochar_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_post; hIndex++ ) { + 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); } @@ -5841,14 +5841,14 @@ int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5856,9 +5856,9 @@ int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chrif.auth_db_cleanup(tid, tick, id, data); } - if( HPMHooks.count.HP_chrif_auth_db_cleanup_post ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_post; hIndex++ ) { + 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); } @@ -5867,14 +5867,14 @@ int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) { } void HP_chrif_connect(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_connect_pre ) { + if (HPMHooks.count.HP_chrif_connect_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_connect_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5882,9 +5882,9 @@ void HP_chrif_connect(int fd) { { HPMHooks.source.chrif.connect(fd); } - if( HPMHooks.count.HP_chrif_connect_post ) { + if (HPMHooks.count.HP_chrif_connect_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_connect_post[hIndex].func; postHookFunc(fd); } @@ -5893,14 +5893,14 @@ void HP_chrif_connect(int fd) { } void HP_chrif_connectack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_connectack_pre ) { + if (HPMHooks.count.HP_chrif_connectack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_connectack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5908,9 +5908,9 @@ void HP_chrif_connectack(int fd) { { HPMHooks.source.chrif.connectack(fd); } - if( HPMHooks.count.HP_chrif_connectack_post ) { + if (HPMHooks.count.HP_chrif_connectack_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_connectack_post[hIndex].func; postHookFunc(fd); } @@ -5919,14 +5919,14 @@ void HP_chrif_connectack(int fd) { } void HP_chrif_sendmap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_sendmap_pre ) { + if (HPMHooks.count.HP_chrif_sendmap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_sendmap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5934,9 +5934,9 @@ void HP_chrif_sendmap(int fd) { { HPMHooks.source.chrif.sendmap(fd); } - if( HPMHooks.count.HP_chrif_sendmap_post ) { + if (HPMHooks.count.HP_chrif_sendmap_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_sendmap_post[hIndex].func; postHookFunc(fd); } @@ -5945,14 +5945,14 @@ void HP_chrif_sendmap(int fd) { } void HP_chrif_sendmapack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_sendmapack_pre ) { + if (HPMHooks.count.HP_chrif_sendmapack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_sendmapack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5960,9 +5960,9 @@ void HP_chrif_sendmapack(int fd) { { HPMHooks.source.chrif.sendmapack(fd); } - if( HPMHooks.count.HP_chrif_sendmapack_post ) { + if (HPMHooks.count.HP_chrif_sendmapack_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_sendmapack_post[hIndex].func; postHookFunc(fd); } @@ -5971,14 +5971,14 @@ void HP_chrif_sendmapack(int fd) { } void HP_chrif_recvmap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_recvmap_pre ) { + if (HPMHooks.count.HP_chrif_recvmap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_recvmap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5986,9 +5986,9 @@ void HP_chrif_recvmap(int fd) { { HPMHooks.source.chrif.recvmap(fd); } - if( HPMHooks.count.HP_chrif_recvmap_post ) { + if (HPMHooks.count.HP_chrif_recvmap_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_recvmap_post[hIndex].func; postHookFunc(fd); } @@ -5998,14 +5998,14 @@ void HP_chrif_recvmap(int fd) { bool 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; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changemapserverack_pre ) { + if (HPMHooks.count.HP_chrif_changemapserverack_pre > 0) { bool (*preHookFunc) (int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6013,9 +6013,9 @@ bool HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, i { 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 ) { + if (HPMHooks.count.HP_chrif_changemapserverack_post > 0) { bool (*postHookFunc) (bool 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++ ) { + 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); } @@ -6024,14 +6024,14 @@ bool HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, i } void HP_chrif_changedsex(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_changedsex_pre ) { + if (HPMHooks.count.HP_chrif_changedsex_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_changedsex_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6039,9 +6039,9 @@ void HP_chrif_changedsex(int fd) { { HPMHooks.source.chrif.changedsex(fd); } - if( HPMHooks.count.HP_chrif_changedsex_post ) { + if (HPMHooks.count.HP_chrif_changedsex_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_changedsex_post[hIndex].func; postHookFunc(fd); } @@ -6051,14 +6051,14 @@ void HP_chrif_changedsex(int fd) { bool HP_chrif_divorceack(int char_id, int partner_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_divorceack_pre ) { + if (HPMHooks.count.HP_chrif_divorceack_pre > 0) { bool (*preHookFunc) (int *char_id, int *partner_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6066,9 +6066,9 @@ bool HP_chrif_divorceack(int char_id, int partner_id) { { retVal___ = HPMHooks.source.chrif.divorceack(char_id, partner_id); } - if( HPMHooks.count.HP_chrif_divorceack_post ) { + if (HPMHooks.count.HP_chrif_divorceack_post > 0) { bool (*postHookFunc) (bool retVal___, int char_id, int partner_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_post; hIndex++ ) { + 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); } @@ -6077,14 +6077,14 @@ bool HP_chrif_divorceack(int char_id, int partner_id) { } void HP_chrif_idbanned(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_idbanned_pre ) { + if (HPMHooks.count.HP_chrif_idbanned_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6092,9 +6092,9 @@ void HP_chrif_idbanned(int fd) { { HPMHooks.source.chrif.idbanned(fd); } - if( HPMHooks.count.HP_chrif_idbanned_post ) { + if (HPMHooks.count.HP_chrif_idbanned_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_idbanned_post[hIndex].func; postHookFunc(fd); } @@ -6103,14 +6103,14 @@ void HP_chrif_idbanned(int fd) { } void HP_chrif_recvfamelist(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_recvfamelist_pre ) { + if (HPMHooks.count.HP_chrif_recvfamelist_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_recvfamelist_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6118,9 +6118,9 @@ void HP_chrif_recvfamelist(int fd) { { HPMHooks.source.chrif.recvfamelist(fd); } - if( HPMHooks.count.HP_chrif_recvfamelist_post ) { + if (HPMHooks.count.HP_chrif_recvfamelist_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_recvfamelist_post[hIndex].func; postHookFunc(fd); } @@ -6130,14 +6130,14 @@ void HP_chrif_recvfamelist(int fd) { bool HP_chrif_load_scdata(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_load_scdata_pre ) { + if (HPMHooks.count.HP_chrif_load_scdata_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6145,9 +6145,9 @@ bool HP_chrif_load_scdata(int fd) { { retVal___ = HPMHooks.source.chrif.load_scdata(fd); } - if( HPMHooks.count.HP_chrif_load_scdata_post ) { + if (HPMHooks.count.HP_chrif_load_scdata_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_post; hIndex++ ) { + 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); } @@ -6156,14 +6156,14 @@ bool HP_chrif_load_scdata(int fd) { } void HP_chrif_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_update_ip_pre ) { + if (HPMHooks.count.HP_chrif_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6171,9 +6171,9 @@ void HP_chrif_update_ip(int fd) { { HPMHooks.source.chrif.update_ip(fd); } - if( HPMHooks.count.HP_chrif_update_ip_post ) { + if (HPMHooks.count.HP_chrif_update_ip_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_update_ip_post[hIndex].func; postHookFunc(fd); } @@ -6183,14 +6183,14 @@ void HP_chrif_update_ip(int fd) { int HP_chrif_disconnectplayer(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_disconnectplayer_pre ) { + if (HPMHooks.count.HP_chrif_disconnectplayer_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6198,9 +6198,9 @@ int HP_chrif_disconnectplayer(int fd) { { retVal___ = HPMHooks.source.chrif.disconnectplayer(fd); } - if( HPMHooks.count.HP_chrif_disconnectplayer_post ) { + if (HPMHooks.count.HP_chrif_disconnectplayer_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_disconnectplayer_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6209,14 +6209,14 @@ int HP_chrif_disconnectplayer(int fd) { } void HP_chrif_removemap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_removemap_pre ) { + if (HPMHooks.count.HP_chrif_removemap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_removemap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6224,9 +6224,9 @@ void HP_chrif_removemap(int fd) { { HPMHooks.source.chrif.removemap(fd); } - if( HPMHooks.count.HP_chrif_removemap_post ) { + if (HPMHooks.count.HP_chrif_removemap_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_removemap_post[hIndex].func; postHookFunc(fd); } @@ -6236,14 +6236,14 @@ void HP_chrif_removemap(int fd) { int HP_chrif_updatefamelist_ack(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_updatefamelist_ack_pre ) { + if (HPMHooks.count.HP_chrif_updatefamelist_ack_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6251,9 +6251,9 @@ int HP_chrif_updatefamelist_ack(int fd) { { retVal___ = HPMHooks.source.chrif.updatefamelist_ack(fd); } - if( HPMHooks.count.HP_chrif_updatefamelist_ack_post ) { + if (HPMHooks.count.HP_chrif_updatefamelist_ack_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_post; hIndex++ ) { + 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); } @@ -6262,14 +6262,14 @@ int HP_chrif_updatefamelist_ack(int fd) { } void HP_chrif_keepalive(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_keepalive_pre ) { + if (HPMHooks.count.HP_chrif_keepalive_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6277,9 +6277,9 @@ void HP_chrif_keepalive(int fd) { { HPMHooks.source.chrif.keepalive(fd); } - if( HPMHooks.count.HP_chrif_keepalive_post ) { + if (HPMHooks.count.HP_chrif_keepalive_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_keepalive_post[hIndex].func; postHookFunc(fd); } @@ -6288,14 +6288,14 @@ void HP_chrif_keepalive(int fd) { } void HP_chrif_keepalive_ack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_keepalive_ack_pre ) { + if (HPMHooks.count.HP_chrif_keepalive_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6303,9 +6303,9 @@ void HP_chrif_keepalive_ack(int fd) { { HPMHooks.source.chrif.keepalive_ack(fd); } - if( HPMHooks.count.HP_chrif_keepalive_ack_post ) { + if (HPMHooks.count.HP_chrif_keepalive_ack_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_keepalive_ack_post[hIndex].func; postHookFunc(fd); } @@ -6314,14 +6314,14 @@ void HP_chrif_keepalive_ack(int fd) { } void HP_chrif_deadopt(int father_id, int mother_id, int child_id) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_deadopt_pre ) { + if (HPMHooks.count.HP_chrif_deadopt_pre > 0) { void (*preHookFunc) (int *father_id, int *mother_id, int *child_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_deadopt_pre[hIndex].func; preHookFunc(&father_id, &mother_id, &child_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6329,9 +6329,9 @@ void HP_chrif_deadopt(int father_id, int mother_id, int child_id) { { HPMHooks.source.chrif.deadopt(father_id, mother_id, child_id); } - if( HPMHooks.count.HP_chrif_deadopt_post ) { + if (HPMHooks.count.HP_chrif_deadopt_post > 0) { void (*postHookFunc) (int father_id, int mother_id, int child_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_deadopt_post[hIndex].func; postHookFunc(father_id, mother_id, child_id); } @@ -6340,14 +6340,14 @@ void HP_chrif_deadopt(int father_id, int mother_id, int child_id) { } void HP_chrif_authfail(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authfail_pre ) { + if (HPMHooks.count.HP_chrif_authfail_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6355,9 +6355,9 @@ void HP_chrif_authfail(int fd) { { HPMHooks.source.chrif.authfail(fd); } - if( HPMHooks.count.HP_chrif_authfail_post ) { + if (HPMHooks.count.HP_chrif_authfail_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_authfail_post[hIndex].func; postHookFunc(fd); } @@ -6366,14 +6366,14 @@ void HP_chrif_authfail(int fd) { } void HP_chrif_on_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_on_ready_pre ) { + if (HPMHooks.count.HP_chrif_on_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6381,9 +6381,9 @@ void HP_chrif_on_ready(void) { { HPMHooks.source.chrif.on_ready(); } - if( HPMHooks.count.HP_chrif_on_ready_post ) { + if (HPMHooks.count.HP_chrif_on_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_on_ready_post[hIndex].func; postHookFunc(); } @@ -6392,14 +6392,14 @@ void HP_chrif_on_ready(void) { } void HP_chrif_on_disconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_on_disconnect_pre ) { + if (HPMHooks.count.HP_chrif_on_disconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6407,9 +6407,9 @@ void HP_chrif_on_disconnect(void) { { HPMHooks.source.chrif.on_disconnect(); } - if( HPMHooks.count.HP_chrif_on_disconnect_post ) { + if (HPMHooks.count.HP_chrif_on_disconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_on_disconnect_post[hIndex].func; postHookFunc(); } @@ -6419,14 +6419,14 @@ void HP_chrif_on_disconnect(void) { int HP_chrif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_parse_pre ) { + if (HPMHooks.count.HP_chrif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6434,9 +6434,9 @@ int HP_chrif_parse(int fd) { { retVal___ = HPMHooks.source.chrif.parse(fd); } - if( HPMHooks.count.HP_chrif_parse_post ) { + if (HPMHooks.count.HP_chrif_parse_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6445,14 +6445,14 @@ int HP_chrif_parse(int fd) { } void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct status_change_entry *sce) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_save_scdata_single_pre ) { + if (HPMHooks.count.HP_chrif_save_scdata_single_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, short *type, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_save_scdata_single_pre[hIndex].func; preHookFunc(&account_id, &char_id, &type, &sce); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6460,9 +6460,9 @@ void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct { HPMHooks.source.chrif.save_scdata_single(account_id, char_id, type, sce); } - if( HPMHooks.count.HP_chrif_save_scdata_single_post ) { + if (HPMHooks.count.HP_chrif_save_scdata_single_post > 0) { void (*postHookFunc) (int account_id, int char_id, short type, struct status_change_entry *sce); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_save_scdata_single_post[hIndex].func; postHookFunc(account_id, char_id, type, sce); } @@ -6471,14 +6471,14 @@ void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct } void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_del_scdata_single_pre ) { + if (HPMHooks.count.HP_chrif_del_scdata_single_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_del_scdata_single_pre[hIndex].func; preHookFunc(&account_id, &char_id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6486,9 +6486,9 @@ void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { { HPMHooks.source.chrif.del_scdata_single(account_id, char_id, type); } - if( HPMHooks.count.HP_chrif_del_scdata_single_post ) { + if (HPMHooks.count.HP_chrif_del_scdata_single_post > 0) { void (*postHookFunc) (int account_id, int char_id, short type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_del_scdata_single_post[hIndex].func; postHookFunc(account_id, char_id, type); } @@ -6499,14 +6499,14 @@ void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { int HP_clif_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_init_pre ) { + if (HPMHooks.count.HP_clif_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6514,9 +6514,9 @@ int HP_clif_init(bool minimal) { { retVal___ = HPMHooks.source.clif.init(minimal); } - if( HPMHooks.count.HP_clif_init_post ) { + if (HPMHooks.count.HP_clif_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -6525,14 +6525,14 @@ int HP_clif_init(bool minimal) { } void HP_clif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_final_pre ) { + if (HPMHooks.count.HP_clif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6540,9 +6540,9 @@ void HP_clif_final(void) { { HPMHooks.source.clif.final(); } - if( HPMHooks.count.HP_clif_final_post ) { + if (HPMHooks.count.HP_clif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_final_post[hIndex].func; postHookFunc(); } @@ -6552,14 +6552,14 @@ void HP_clif_final(void) { bool HP_clif_setip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_setip_pre ) { + if (HPMHooks.count.HP_clif_setip_pre > 0) { bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6567,9 +6567,9 @@ bool HP_clif_setip(const char *ip) { { retVal___ = HPMHooks.source.clif.setip(ip); } - if( HPMHooks.count.HP_clif_setip_post ) { + if (HPMHooks.count.HP_clif_setip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_setip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6579,14 +6579,14 @@ bool HP_clif_setip(const char *ip) { bool HP_clif_setbindip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_setbindip_pre ) { + if (HPMHooks.count.HP_clif_setbindip_pre > 0) { bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6594,9 +6594,9 @@ bool HP_clif_setbindip(const char *ip) { { retVal___ = HPMHooks.source.clif.setbindip(ip); } - if( HPMHooks.count.HP_clif_setbindip_post ) { + if (HPMHooks.count.HP_clif_setbindip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_setbindip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6605,14 +6605,14 @@ bool HP_clif_setbindip(const char *ip) { } void HP_clif_setport(uint16 port) { int hIndex = 0; - if( HPMHooks.count.HP_clif_setport_pre ) { + if (HPMHooks.count.HP_clif_setport_pre > 0) { void (*preHookFunc) (uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6620,9 +6620,9 @@ void HP_clif_setport(uint16 port) { { HPMHooks.source.clif.setport(port); } - if( HPMHooks.count.HP_clif_setport_post ) { + if (HPMHooks.count.HP_clif_setport_post > 0) { void (*postHookFunc) (uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_setport_post[hIndex].func; postHookFunc(port); } @@ -6632,14 +6632,14 @@ void HP_clif_setport(uint16 port) { uint32 HP_clif_refresh_ip(void) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_clif_refresh_ip_pre ) { + if (HPMHooks.count.HP_clif_refresh_ip_pre > 0) { uint32 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6647,9 +6647,9 @@ uint32 HP_clif_refresh_ip(void) { { retVal___ = HPMHooks.source.clif.refresh_ip(); } - if( HPMHooks.count.HP_clif_refresh_ip_post ) { + if (HPMHooks.count.HP_clif_refresh_ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_post; hIndex++ ) { + 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___); } @@ -6659,14 +6659,14 @@ uint32 HP_clif_refresh_ip(void) { bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_send_pre ) { + if (HPMHooks.count.HP_clif_send_pre > 0) { bool (*preHookFunc) (const void **buf, int *len, struct block_list **bl, enum send_target *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6674,9 +6674,9 @@ bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_tar { retVal___ = HPMHooks.source.clif.send(buf, len, bl, type); } - if( HPMHooks.count.HP_clif_send_post ) { + if (HPMHooks.count.HP_clif_send_post > 0) { bool (*postHookFunc) (bool 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++ ) { + 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); } @@ -6686,16 +6686,16 @@ bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_tar int HP_clif_send_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_send_sub_pre ) { + if (HPMHooks.count.HP_clif_send_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6705,9 +6705,9 @@ int HP_clif_send_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.send_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_send_sub_post ) { + if (HPMHooks.count.HP_clif_send_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_post; hIndex++ ) { + 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); @@ -6719,14 +6719,14 @@ int HP_clif_send_sub(struct block_list *bl, va_list ap) { int HP_clif_send_actual(int fd, void *buf, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_send_actual_pre ) { + if (HPMHooks.count.HP_clif_send_actual_pre > 0) { int (*preHookFunc) (int *fd, void **buf, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_send_actual_pre[hIndex].func; retVal___ = preHookFunc(&fd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6734,9 +6734,9 @@ int HP_clif_send_actual(int fd, void *buf, int len) { { retVal___ = HPMHooks.source.clif.send_actual(fd, buf, len); } - if( HPMHooks.count.HP_clif_send_actual_post ) { + if (HPMHooks.count.HP_clif_send_actual_post > 0) { int (*postHookFunc) (int retVal___, int fd, void *buf, int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_send_actual_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, buf, len); } @@ -6746,14 +6746,14 @@ int HP_clif_send_actual(int fd, void *buf, int len) { int HP_clif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_parse_pre ) { + if (HPMHooks.count.HP_clif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6761,9 +6761,9 @@ int HP_clif_parse(int fd) { { retVal___ = HPMHooks.source.clif.parse(fd); } - if( HPMHooks.count.HP_clif_parse_post ) { + if (HPMHooks.count.HP_clif_parse_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -6773,14 +6773,14 @@ int HP_clif_parse(int fd) { const struct s_packet_db* HP_clif_packet(int packet_id) { int hIndex = 0; const struct s_packet_db* retVal___ = NULL; - if( HPMHooks.count.HP_clif_packet_pre ) { + if (HPMHooks.count.HP_clif_packet_pre > 0) { const struct s_packet_db* (*preHookFunc) (int *packet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_packet_pre[hIndex].func; retVal___ = preHookFunc(&packet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6788,9 +6788,9 @@ const struct s_packet_db* HP_clif_packet(int packet_id) { { retVal___ = HPMHooks.source.clif.packet(packet_id); } - if( HPMHooks.count.HP_clif_packet_post ) { + if (HPMHooks.count.HP_clif_packet_post > 0) { const struct s_packet_db* (*postHookFunc) (const struct s_packet_db* retVal___, int packet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_packet_post[hIndex].func; retVal___ = postHookFunc(retVal___, packet_id); } @@ -6800,14 +6800,14 @@ const struct s_packet_db* HP_clif_packet(int packet_id) { unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_clif_parse_cmd_pre ) { + if (HPMHooks.count.HP_clif_parse_cmd_pre > 0) { unsigned short (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6815,9 +6815,9 @@ unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.parse_cmd(fd, sd); } - if( HPMHooks.count.HP_clif_parse_cmd_post ) { + if (HPMHooks.count.HP_clif_parse_cmd_post > 0) { 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++ ) { + 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); } @@ -6827,14 +6827,14 @@ unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_clif_decrypt_cmd_pre ) { + if (HPMHooks.count.HP_clif_decrypt_cmd_pre > 0) { unsigned short (*preHookFunc) (int *cmd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6842,9 +6842,9 @@ unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.decrypt_cmd(cmd, sd); } - if( HPMHooks.count.HP_clif_decrypt_cmd_post ) { + if (HPMHooks.count.HP_clif_decrypt_cmd_post > 0) { 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++ ) { + 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); } @@ -6853,14 +6853,14 @@ unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { } void HP_clif_authok(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_authok_pre ) { + if (HPMHooks.count.HP_clif_authok_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6868,9 +6868,9 @@ void HP_clif_authok(struct map_session_data *sd) { { HPMHooks.source.clif.authok(sd); } - if( HPMHooks.count.HP_clif_authok_post ) { + if (HPMHooks.count.HP_clif_authok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_authok_post[hIndex].func; postHookFunc(sd); } @@ -6879,14 +6879,14 @@ void HP_clif_authok(struct map_session_data *sd) { } void HP_clif_authrefuse(int fd, uint8 error_code) { int hIndex = 0; - if( HPMHooks.count.HP_clif_authrefuse_pre ) { + if (HPMHooks.count.HP_clif_authrefuse_pre > 0) { void (*preHookFunc) (int *fd, uint8 *error_code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6894,9 +6894,9 @@ void HP_clif_authrefuse(int fd, uint8 error_code) { { HPMHooks.source.clif.authrefuse(fd, error_code); } - if( HPMHooks.count.HP_clif_authrefuse_post ) { + if (HPMHooks.count.HP_clif_authrefuse_post > 0) { void (*postHookFunc) (int fd, uint8 error_code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_authrefuse_post[hIndex].func; postHookFunc(fd, error_code); } @@ -6905,14 +6905,14 @@ void HP_clif_authrefuse(int fd, uint8 error_code) { } void HP_clif_authfail_fd(int fd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_authfail_fd_pre ) { + if (HPMHooks.count.HP_clif_authfail_fd_pre > 0) { void (*preHookFunc) (int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6920,9 +6920,9 @@ void HP_clif_authfail_fd(int fd, int type) { { HPMHooks.source.clif.authfail_fd(fd, type); } - if( HPMHooks.count.HP_clif_authfail_fd_post ) { + if (HPMHooks.count.HP_clif_authfail_fd_post > 0) { void (*postHookFunc) (int fd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_post; hIndex++ ) { + 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); } @@ -6931,14 +6931,14 @@ void HP_clif_authfail_fd(int fd, int type) { } void HP_clif_charselectok(int id, uint8 ok) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charselectok_pre ) { + if (HPMHooks.count.HP_clif_charselectok_pre > 0) { void (*preHookFunc) (int *id, uint8 *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6946,9 +6946,9 @@ void HP_clif_charselectok(int id, uint8 ok) { { HPMHooks.source.clif.charselectok(id, ok); } - if( HPMHooks.count.HP_clif_charselectok_post ) { + if (HPMHooks.count.HP_clif_charselectok_post > 0) { void (*postHookFunc) (int id, uint8 ok); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_charselectok_post[hIndex].func; postHookFunc(id, ok); } @@ -6957,14 +6957,14 @@ void HP_clif_charselectok(int id, uint8 ok) { } void HP_clif_dropflooritem(struct flooritem_data *fitem) { int hIndex = 0; - if( HPMHooks.count.HP_clif_dropflooritem_pre ) { + if (HPMHooks.count.HP_clif_dropflooritem_pre > 0) { void (*preHookFunc) (struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6972,9 +6972,9 @@ void HP_clif_dropflooritem(struct flooritem_data *fitem) { { HPMHooks.source.clif.dropflooritem(fitem); } - if( HPMHooks.count.HP_clif_dropflooritem_post ) { + if (HPMHooks.count.HP_clif_dropflooritem_post > 0) { void (*postHookFunc) (struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dropflooritem_post[hIndex].func; postHookFunc(fitem); } @@ -6983,14 +6983,14 @@ void HP_clif_dropflooritem(struct flooritem_data *fitem) { } void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearflooritem_pre ) { + if (HPMHooks.count.HP_clif_clearflooritem_pre > 0) { void (*preHookFunc) (struct flooritem_data **fitem, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6998,9 +6998,9 @@ void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) { { HPMHooks.source.clif.clearflooritem(fitem, fd); } - if( HPMHooks.count.HP_clif_clearflooritem_post ) { + if (HPMHooks.count.HP_clif_clearflooritem_post > 0) { void (*postHookFunc) (struct flooritem_data *fitem, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearflooritem_post[hIndex].func; postHookFunc(fitem, fd); } @@ -7009,14 +7009,14 @@ void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) { } 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 ) { + if (HPMHooks.count.HP_clif_additem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7024,9 +7024,9 @@ void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) { { HPMHooks.source.clif.additem(sd, n, amount, fail); } - if( HPMHooks.count.HP_clif_additem_post ) { + if (HPMHooks.count.HP_clif_additem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int amount, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_post; hIndex++ ) { + 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); } @@ -7035,14 +7035,14 @@ void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) { } void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_clif_dropitem_pre ) { + if (HPMHooks.count.HP_clif_dropitem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7050,9 +7050,9 @@ void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) { { HPMHooks.source.clif.dropitem(sd, n, amount); } - if( HPMHooks.count.HP_clif_dropitem_post ) { + if (HPMHooks.count.HP_clif_dropitem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dropitem_post[hIndex].func; postHookFunc(sd, n, amount); } @@ -7061,14 +7061,14 @@ void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) { } 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 ) { + if (HPMHooks.count.HP_clif_delitem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, short *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7076,9 +7076,9 @@ void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reaso { HPMHooks.source.clif.delitem(sd, n, amount, reason); } - if( HPMHooks.count.HP_clif_delitem_post ) { + if (HPMHooks.count.HP_clif_delitem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int amount, short reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_post; hIndex++ ) { + 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); } @@ -7087,14 +7087,14 @@ void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reaso } void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { int hIndex = 0; - if( HPMHooks.count.HP_clif_takeitem_pre ) { + if (HPMHooks.count.HP_clif_takeitem_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **dst); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7102,9 +7102,9 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { { HPMHooks.source.clif.takeitem(src, dst); } - if( HPMHooks.count.HP_clif_takeitem_post ) { + if (HPMHooks.count.HP_clif_takeitem_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *dst); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_takeitem_post[hIndex].func; postHookFunc(src, dst); } @@ -7113,14 +7113,14 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { } void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_equip_pre ) { + if (HPMHooks.count.HP_clif_item_equip_pre > 0) { void (*preHookFunc) (short *idx, struct EQUIPITEM_INFO **p, struct item **i, struct item_data **id, int *eqp_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_equip_pre[hIndex].func; preHookFunc(&idx, &p, &i, &id, &eqp_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7128,9 +7128,9 @@ void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, str { HPMHooks.source.clif.item_equip(idx, p, i, id, eqp_pos); } - if( HPMHooks.count.HP_clif_item_equip_post ) { + if (HPMHooks.count.HP_clif_item_equip_post > 0) { void (*postHookFunc) (short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_equip_post[hIndex].func; postHookFunc(idx, p, i, id, eqp_pos); } @@ -7139,14 +7139,14 @@ void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, str } void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_normal_pre ) { + if (HPMHooks.count.HP_clif_item_normal_pre > 0) { void (*preHookFunc) (short *idx, struct NORMALITEM_INFO **p, struct item **i, struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_normal_pre[hIndex].func; preHookFunc(&idx, &p, &i, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7154,9 +7154,9 @@ void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, s { HPMHooks.source.clif.item_normal(idx, p, i, id); } - if( HPMHooks.count.HP_clif_item_normal_post ) { + if (HPMHooks.count.HP_clif_item_normal_post > 0) { void (*postHookFunc) (short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_normal_post[hIndex].func; postHookFunc(idx, p, i, id); } @@ -7165,14 +7165,14 @@ void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, s } void HP_clif_arrowequip(struct map_session_data *sd, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_arrowequip_pre ) { + if (HPMHooks.count.HP_clif_arrowequip_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7180,9 +7180,9 @@ void HP_clif_arrowequip(struct map_session_data *sd, int val) { { HPMHooks.source.clif.arrowequip(sd, val); } - if( HPMHooks.count.HP_clif_arrowequip_post ) { + if (HPMHooks.count.HP_clif_arrowequip_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_arrowequip_post[hIndex].func; postHookFunc(sd, val); } @@ -7191,14 +7191,14 @@ void HP_clif_arrowequip(struct map_session_data *sd, int val) { } void HP_clif_arrow_fail(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_arrow_fail_pre ) { + if (HPMHooks.count.HP_clif_arrow_fail_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7206,9 +7206,9 @@ void HP_clif_arrow_fail(struct map_session_data *sd, int type) { { HPMHooks.source.clif.arrow_fail(sd, type); } - if( HPMHooks.count.HP_clif_arrow_fail_post ) { + if (HPMHooks.count.HP_clif_arrow_fail_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_post; hIndex++ ) { + 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); } @@ -7217,14 +7217,14 @@ void HP_clif_arrow_fail(struct map_session_data *sd, int type) { } void HP_clif_use_card(struct map_session_data *sd, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_clif_use_card_pre ) { + if (HPMHooks.count.HP_clif_use_card_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7232,9 +7232,9 @@ void HP_clif_use_card(struct map_session_data *sd, int idx) { { HPMHooks.source.clif.use_card(sd, idx); } - if( HPMHooks.count.HP_clif_use_card_post ) { + if (HPMHooks.count.HP_clif_use_card_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_post; hIndex++ ) { + 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); } @@ -7243,14 +7243,14 @@ void HP_clif_use_card(struct map_session_data *sd, int idx) { } 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 ) { + if (HPMHooks.count.HP_clif_cart_additem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7258,9 +7258,9 @@ void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fa { HPMHooks.source.clif.cart_additem(sd, n, amount, fail); } - if( HPMHooks.count.HP_clif_cart_additem_post ) { + if (HPMHooks.count.HP_clif_cart_additem_post > 0) { 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++ ) { + 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); } @@ -7269,14 +7269,14 @@ void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fa } 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 ) { + if (HPMHooks.count.HP_clif_cart_delitem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7284,9 +7284,9 @@ void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) { { HPMHooks.source.clif.cart_delitem(sd, n, amount); } - if( HPMHooks.count.HP_clif_cart_delitem_post ) { + if (HPMHooks.count.HP_clif_cart_delitem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_post; hIndex++ ) { + 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); } @@ -7295,14 +7295,14 @@ void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) { } void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equipitemack_pre ) { + if (HPMHooks.count.HP_clif_equipitemack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func; preHookFunc(&sd, &n, &pos, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7310,9 +7310,9 @@ void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQ { HPMHooks.source.clif.equipitemack(sd, n, pos, result); } - if( HPMHooks.count.HP_clif_equipitemack_post ) { + if (HPMHooks.count.HP_clif_equipitemack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_equipitemack_post[hIndex].func; postHookFunc(sd, n, pos, result); } @@ -7321,14 +7321,14 @@ void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQ } void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_unequipitemack_pre ) { + if (HPMHooks.count.HP_clif_unequipitemack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func; preHookFunc(&sd, &n, &pos, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7336,9 +7336,9 @@ void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_ { HPMHooks.source.clif.unequipitemack(sd, n, pos, result); } - if( HPMHooks.count.HP_clif_unequipitemack_post ) { + if (HPMHooks.count.HP_clif_unequipitemack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_unequipitemack_post[hIndex].func; postHookFunc(sd, n, pos, result); } @@ -7347,14 +7347,14 @@ void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_ } 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 ) { + if (HPMHooks.count.HP_clif_useitemack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, bool *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7362,9 +7362,9 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool { HPMHooks.source.clif.useitemack(sd, index, amount, ok); } - if( HPMHooks.count.HP_clif_useitemack_post ) { + if (HPMHooks.count.HP_clif_useitemack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index, int amount, bool ok); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_post; hIndex++ ) { + 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); } @@ -7373,14 +7373,14 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool } void HP_clif_addcards(unsigned char *buf, struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_clif_addcards_pre ) { + if (HPMHooks.count.HP_clif_addcards_pre > 0) { void (*preHookFunc) (unsigned char **buf, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7388,9 +7388,9 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) { { HPMHooks.source.clif.addcards(buf, item); } - if( HPMHooks.count.HP_clif_addcards_post ) { + if (HPMHooks.count.HP_clif_addcards_post > 0) { void (*postHookFunc) (unsigned char *buf, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addcards_post[hIndex].func; postHookFunc(buf, item); } @@ -7399,14 +7399,14 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) { } void HP_clif_addcards2(unsigned short *cards, struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_clif_addcards2_pre ) { + if (HPMHooks.count.HP_clif_addcards2_pre > 0) { void (*preHookFunc) (unsigned short **cards, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7414,9 +7414,9 @@ void HP_clif_addcards2(unsigned short *cards, struct item *item) { { HPMHooks.source.clif.addcards2(cards, item); } - if( HPMHooks.count.HP_clif_addcards2_post ) { + if (HPMHooks.count.HP_clif_addcards2_post > 0) { void (*postHookFunc) (unsigned short *cards, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addcards2_post[hIndex].func; postHookFunc(cards, item); } @@ -7425,14 +7425,14 @@ void HP_clif_addcards2(unsigned short *cards, struct item *item) { } 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 ) { + if (HPMHooks.count.HP_clif_item_sub_pre > 0) { void (*preHookFunc) (unsigned char **buf, int *n, struct item **i, struct item_data **id, int *equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7440,9 +7440,9 @@ void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_dat { HPMHooks.source.clif.item_sub(buf, n, i, id, equip); } - if( HPMHooks.count.HP_clif_item_sub_post ) { + if (HPMHooks.count.HP_clif_item_sub_post > 0) { 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++ ) { + 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); } @@ -7451,14 +7451,14 @@ void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_dat } 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 ) { + if (HPMHooks.count.HP_clif_getareachar_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7466,9 +7466,9 @@ void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data { HPMHooks.source.clif.getareachar_item(sd, fitem); } - if( HPMHooks.count.HP_clif_getareachar_item_post ) { + if (HPMHooks.count.HP_clif_getareachar_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_post; hIndex++ ) { + 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); } @@ -7477,14 +7477,14 @@ void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data } 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 ) { + if (HPMHooks.count.HP_clif_cart_additem_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7492,9 +7492,9 @@ void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.cart_additem_ack(sd, flag); } - if( HPMHooks.count.HP_clif_cart_additem_ack_post ) { + if (HPMHooks.count.HP_clif_cart_additem_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_post; hIndex++ ) { + 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); } @@ -7503,14 +7503,14 @@ void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) { } void HP_clif_cashshop_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cashshop_load_pre ) { + if (HPMHooks.count.HP_clif_cashshop_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7518,9 +7518,9 @@ void HP_clif_cashshop_load(void) { { HPMHooks.source.clif.cashshop_load(); } - if( HPMHooks.count.HP_clif_cashshop_load_post ) { + if (HPMHooks.count.HP_clif_cashshop_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_cashshop_load_post[hIndex].func; postHookFunc(); } @@ -7529,14 +7529,14 @@ void HP_clif_cashshop_load(void) { } 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 ) { + if (HPMHooks.count.HP_clif_package_announce_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, unsigned short *containerid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7544,9 +7544,9 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid { HPMHooks.source.clif.package_announce(sd, nameid, containerid); } - if( HPMHooks.count.HP_clif_package_announce_post ) { + if (HPMHooks.count.HP_clif_package_announce_post > 0) { 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++ ) { + 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); } @@ -7555,14 +7555,14 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid } void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid, char *monsterName) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_drop_announce_pre ) { + if (HPMHooks.count.HP_clif_item_drop_announce_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, char **monsterName); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_drop_announce_pre[hIndex].func; preHookFunc(&sd, &nameid, &monsterName); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7570,9 +7570,9 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short name { HPMHooks.source.clif.item_drop_announce(sd, nameid, monsterName); } - if( HPMHooks.count.HP_clif_item_drop_announce_post ) { + if (HPMHooks.count.HP_clif_item_drop_announce_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short nameid, char *monsterName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_drop_announce_post[hIndex].func; postHookFunc(sd, nameid, monsterName); } @@ -7581,14 +7581,14 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short name } void HP_clif_clearunit_single(int id, clr_type type, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearunit_single_pre ) { + if (HPMHooks.count.HP_clif_clearunit_single_pre > 0) { void (*preHookFunc) (int *id, clr_type *type, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7596,9 +7596,9 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) { { HPMHooks.source.clif.clearunit_single(id, type, fd); } - if( HPMHooks.count.HP_clif_clearunit_single_post ) { + if (HPMHooks.count.HP_clif_clearunit_single_post > 0) { void (*postHookFunc) (int id, clr_type type, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_post; hIndex++ ) { + 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); } @@ -7607,14 +7607,14 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) { } void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearunit_area_pre ) { + if (HPMHooks.count.HP_clif_clearunit_area_pre > 0) { void (*preHookFunc) (struct block_list **bl, clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7622,9 +7622,9 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { { HPMHooks.source.clif.clearunit_area(bl, type); } - if( HPMHooks.count.HP_clif_clearunit_area_post ) { + if (HPMHooks.count.HP_clif_clearunit_area_post > 0) { void (*postHookFunc) (struct block_list *bl, clr_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_post; hIndex++ ) { + 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); } @@ -7633,14 +7633,14 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { } void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_pre > 0) { void (*preHookFunc) (struct block_list **bl, clr_type *type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7648,9 +7648,9 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) { HPMHooks.source.clif.clearunit_delayed(bl, type, tick); } - if( HPMHooks.count.HP_clif_clearunit_delayed_post ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_post > 0) { void (*postHookFunc) (struct block_list *bl, clr_type type, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++ ) { + 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); } @@ -7659,14 +7659,14 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) } void HP_clif_walkok(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_walkok_pre ) { + if (HPMHooks.count.HP_clif_walkok_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7674,9 +7674,9 @@ void HP_clif_walkok(struct map_session_data *sd) { { HPMHooks.source.clif.walkok(sd); } - if( HPMHooks.count.HP_clif_walkok_post ) { + if (HPMHooks.count.HP_clif_walkok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_walkok_post[hIndex].func; postHookFunc(sd); } @@ -7685,14 +7685,14 @@ void HP_clif_walkok(struct map_session_data *sd) { } void HP_clif_move(struct unit_data *ud) { int hIndex = 0; - if( HPMHooks.count.HP_clif_move_pre ) { + if (HPMHooks.count.HP_clif_move_pre > 0) { void (*preHookFunc) (struct unit_data **ud); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7700,9 +7700,9 @@ void HP_clif_move(struct unit_data *ud) { { HPMHooks.source.clif.move(ud); } - if( HPMHooks.count.HP_clif_move_post ) { + if (HPMHooks.count.HP_clif_move_post > 0) { void (*postHookFunc) (struct unit_data *ud); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_move_post[hIndex].func; postHookFunc(ud); } @@ -7711,14 +7711,14 @@ void HP_clif_move(struct unit_data *ud) { } 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 ) { + if (HPMHooks.count.HP_clif_move2_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct view_data **vd, struct unit_data **ud); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7726,9 +7726,9 @@ void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data { HPMHooks.source.clif.move2(bl, vd, ud); } - if( HPMHooks.count.HP_clif_move2_post ) { + if (HPMHooks.count.HP_clif_move2_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_move2_post[hIndex].func; postHookFunc(bl, vd, ud); } @@ -7737,14 +7737,14 @@ void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data } void HP_clif_blown(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_blown_pre ) { + if (HPMHooks.count.HP_clif_blown_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7752,9 +7752,9 @@ void HP_clif_blown(struct block_list *bl) { { HPMHooks.source.clif.blown(bl); } - if( HPMHooks.count.HP_clif_blown_post ) { + if (HPMHooks.count.HP_clif_blown_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_blown_post[hIndex].func; postHookFunc(bl); } @@ -7763,14 +7763,14 @@ void HP_clif_blown(struct block_list *bl) { } void HP_clif_slide(struct block_list *bl, int x, int y) { int hIndex = 0; - if( HPMHooks.count.HP_clif_slide_pre ) { + if (HPMHooks.count.HP_clif_slide_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7778,9 +7778,9 @@ void HP_clif_slide(struct block_list *bl, int x, int y) { { HPMHooks.source.clif.slide(bl, x, y); } - if( HPMHooks.count.HP_clif_slide_post ) { + if (HPMHooks.count.HP_clif_slide_post > 0) { void (*postHookFunc) (struct block_list *bl, int x, int y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_slide_post[hIndex].func; postHookFunc(bl, x, y); } @@ -7789,14 +7789,14 @@ void HP_clif_slide(struct block_list *bl, int x, int y) { } void HP_clif_fixpos(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_fixpos_pre ) { + if (HPMHooks.count.HP_clif_fixpos_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7804,9 +7804,9 @@ void HP_clif_fixpos(struct block_list *bl) { { HPMHooks.source.clif.fixpos(bl); } - if( HPMHooks.count.HP_clif_fixpos_post ) { + if (HPMHooks.count.HP_clif_fixpos_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_fixpos_post[hIndex].func; postHookFunc(bl); } @@ -7815,14 +7815,14 @@ void HP_clif_fixpos(struct block_list *bl) { } void HP_clif_changelook(struct block_list *bl, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changelook_pre ) { + if (HPMHooks.count.HP_clif_changelook_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7830,9 +7830,9 @@ void HP_clif_changelook(struct block_list *bl, int type, int val) { { HPMHooks.source.clif.changelook(bl, type, val); } - if( HPMHooks.count.HP_clif_changelook_post ) { + if (HPMHooks.count.HP_clif_changelook_post > 0) { void (*postHookFunc) (struct block_list *bl, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changelook_post[hIndex].func; postHookFunc(bl, type, val); } @@ -7841,14 +7841,14 @@ void HP_clif_changelook(struct block_list *bl, int type, int val) { } void HP_clif_changetraplook(struct block_list *bl, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changetraplook_pre ) { + if (HPMHooks.count.HP_clif_changetraplook_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7856,9 +7856,9 @@ void HP_clif_changetraplook(struct block_list *bl, int val) { { HPMHooks.source.clif.changetraplook(bl, val); } - if( HPMHooks.count.HP_clif_changetraplook_post ) { + if (HPMHooks.count.HP_clif_changetraplook_post > 0) { void (*postHookFunc) (struct block_list *bl, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changetraplook_post[hIndex].func; postHookFunc(bl, val); } @@ -7867,14 +7867,14 @@ void HP_clif_changetraplook(struct block_list *bl, int val) { } 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 ) { + if (HPMHooks.count.HP_clif_refreshlook_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *id, int *type, int *val, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7882,9 +7882,9 @@ void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum { HPMHooks.source.clif.refreshlook(bl, id, type, val, target); } - if( HPMHooks.count.HP_clif_refreshlook_post ) { + if (HPMHooks.count.HP_clif_refreshlook_post > 0) { 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++ ) { + 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); } @@ -7893,14 +7893,14 @@ void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum } void HP_clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendlook_pre ) { + if (HPMHooks.count.HP_clif_sendlook_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sendlook_pre[hIndex].func; preHookFunc(&bl, &id, &type, &val, &val2, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7908,51 +7908,51 @@ void HP_clif_sendlook(struct block_list *bl, int id, int type, int val, int val2 { HPMHooks.source.clif.sendlook(bl, id, type, val, val2, target); } - if( HPMHooks.count.HP_clif_sendlook_post ) { + if (HPMHooks.count.HP_clif_sendlook_post > 0) { void (*postHookFunc) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendlook_post[hIndex].func; postHookFunc(bl, id, type, val, val2, target); } } return; } -void HP_clif_class_change(struct block_list *bl, int class_, int type) { +void HP_clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_class_change_pre ) { - void (*preHookFunc) (struct block_list **bl, int *class_, int *type); + if (HPMHooks.count.HP_clif_class_change_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &class_, &type, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.class_change(bl, class_, type); + HPMHooks.source.clif.class_change(bl, class_, type, sd); } - 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++ ) { + if (HPMHooks.count.HP_clif_class_change_post > 0) { + void (*postHookFunc) (struct block_list *bl, int class_, int type, struct map_session_data *sd); + 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); + postHookFunc(bl, class_, type, sd); } } return; } void HP_clif_skill_delunit(struct skill_unit *su) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_delunit_pre ) { + if (HPMHooks.count.HP_clif_skill_delunit_pre > 0) { void (*preHookFunc) (struct skill_unit **su); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7960,9 +7960,9 @@ void HP_clif_skill_delunit(struct skill_unit *su) { { HPMHooks.source.clif.skill_delunit(su); } - if( HPMHooks.count.HP_clif_skill_delunit_post ) { + if (HPMHooks.count.HP_clif_skill_delunit_post > 0) { void (*postHookFunc) (struct skill_unit *su); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skill_delunit_post[hIndex].func; postHookFunc(su); } @@ -7971,14 +7971,14 @@ void HP_clif_skill_delunit(struct skill_unit *su) { } void HP_clif_skillunit_update(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillunit_update_pre ) { + if (HPMHooks.count.HP_clif_skillunit_update_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7986,9 +7986,9 @@ void HP_clif_skillunit_update(struct block_list *bl) { { HPMHooks.source.clif.skillunit_update(bl); } - if( HPMHooks.count.HP_clif_skillunit_update_post ) { + if (HPMHooks.count.HP_clif_skillunit_update_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillunit_update_post[hIndex].func; postHookFunc(bl); } @@ -7998,14 +7998,14 @@ void HP_clif_skillunit_update(struct block_list *bl) { int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8013,9 +8013,9 @@ int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.clearunit_delayed_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_clearunit_delayed_sub_post ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_sub_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_post; hIndex++ ) { + 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); } @@ -8024,14 +8024,14 @@ int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_clif_set_unit_idle_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8039,9 +8039,9 @@ void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, { HPMHooks.source.clif.set_unit_idle(bl, tsd, target); } - if( HPMHooks.count.HP_clif_set_unit_idle_post ) { + if (HPMHooks.count.HP_clif_set_unit_idle_post > 0) { 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++ ) { + 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); } @@ -8050,14 +8050,14 @@ void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, } void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spawn_unit_pre ) { + if (HPMHooks.count.HP_clif_spawn_unit_pre > 0) { void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8065,9 +8065,9 @@ void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { { HPMHooks.source.clif.spawn_unit(bl, target); } - if( HPMHooks.count.HP_clif_spawn_unit_post ) { + if (HPMHooks.count.HP_clif_spawn_unit_post > 0) { void (*postHookFunc) (struct block_list *bl, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_post; hIndex++ ) { + 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); } @@ -8076,14 +8076,14 @@ void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { } void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spawn_unit2_pre ) { + if (HPMHooks.count.HP_clif_spawn_unit2_pre > 0) { void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8091,9 +8091,9 @@ void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { { HPMHooks.source.clif.spawn_unit2(bl, target); } - if( HPMHooks.count.HP_clif_spawn_unit2_post ) { + if (HPMHooks.count.HP_clif_spawn_unit2_post > 0) { void (*postHookFunc) (struct block_list *bl, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_post; hIndex++ ) { + 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); } @@ -8102,14 +8102,14 @@ void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { } 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 ) { + if (HPMHooks.count.HP_clif_set_unit_idle2_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8117,9 +8117,9 @@ void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, { HPMHooks.source.clif.set_unit_idle2(bl, tsd, target); } - if( HPMHooks.count.HP_clif_set_unit_idle2_post ) { + if (HPMHooks.count.HP_clif_set_unit_idle2_post > 0) { 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++ ) { + 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); } @@ -8128,14 +8128,14 @@ void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, } 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 ) { + if (HPMHooks.count.HP_clif_set_unit_walking_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, struct unit_data **ud, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8143,9 +8143,9 @@ void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *ts { HPMHooks.source.clif.set_unit_walking(bl, tsd, ud, target); } - if( HPMHooks.count.HP_clif_set_unit_walking_post ) { + if (HPMHooks.count.HP_clif_set_unit_walking_post > 0) { 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++ ) { + 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); } @@ -8155,14 +8155,14 @@ void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *ts int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damage, int div_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_calc_walkdelay_pre ) { + if (HPMHooks.count.HP_clif_calc_walkdelay_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *delay, int *type, int *damage, int *div_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8170,9 +8170,9 @@ int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damag { retVal___ = HPMHooks.source.clif.calc_walkdelay(bl, delay, type, damage, div_); } - if( HPMHooks.count.HP_clif_calc_walkdelay_post ) { + if (HPMHooks.count.HP_clif_calc_walkdelay_post > 0) { 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++ ) { + 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_); } @@ -8181,14 +8181,14 @@ int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damag } void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_getareachar_skillunit_pre ) { + if (HPMHooks.count.HP_clif_getareachar_skillunit_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct skill_unit **su, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_pre[hIndex].func; preHookFunc(&bl, &su, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8196,9 +8196,9 @@ void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, { HPMHooks.source.clif.getareachar_skillunit(bl, su, target); } - if( HPMHooks.count.HP_clif_getareachar_skillunit_post ) { + if (HPMHooks.count.HP_clif_getareachar_skillunit_post > 0) { void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_post[hIndex].func; postHookFunc(bl, su, target); } @@ -8207,14 +8207,14 @@ void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, } 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 ) { + if (HPMHooks.count.HP_clif_getareachar_unit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8222,9 +8222,9 @@ void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl { HPMHooks.source.clif.getareachar_unit(sd, bl); } - if( HPMHooks.count.HP_clif_getareachar_unit_post ) { + if (HPMHooks.count.HP_clif_getareachar_unit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_post; hIndex++ ) { + 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); } @@ -8233,14 +8233,14 @@ void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl } void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearchar_skillunit_pre ) { + if (HPMHooks.count.HP_clif_clearchar_skillunit_pre > 0) { void (*preHookFunc) (struct skill_unit **su, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8248,9 +8248,9 @@ void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { { HPMHooks.source.clif.clearchar_skillunit(su, fd); } - if( HPMHooks.count.HP_clif_clearchar_skillunit_post ) { + if (HPMHooks.count.HP_clif_clearchar_skillunit_post > 0) { void (*postHookFunc) (struct skill_unit *su, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_post; hIndex++ ) { + 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); } @@ -8260,16 +8260,16 @@ void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { int HP_clif_getareachar(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_getareachar_pre ) { + if (HPMHooks.count.HP_clif_getareachar_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8279,9 +8279,9 @@ int HP_clif_getareachar(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.getareachar(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_getareachar_post ) { + if (HPMHooks.count.HP_clif_getareachar_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_post; hIndex++ ) { + 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); @@ -8292,14 +8292,14 @@ int HP_clif_getareachar(struct block_list *bl, va_list ap) { } void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_graffiti_entry_pre ) { + if (HPMHooks.count.HP_clif_graffiti_entry_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct skill_unit **su, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_graffiti_entry_pre[hIndex].func; preHookFunc(&bl, &su, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8307,9 +8307,9 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s { HPMHooks.source.clif.graffiti_entry(bl, su, target); } - if( HPMHooks.count.HP_clif_graffiti_entry_post ) { + if (HPMHooks.count.HP_clif_graffiti_entry_post > 0) { void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_graffiti_entry_post[hIndex].func; postHookFunc(bl, su, target); } @@ -8319,14 +8319,14 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s bool HP_clif_spawn(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_spawn_pre ) { + if (HPMHooks.count.HP_clif_spawn_pre > 0) { bool (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8334,9 +8334,9 @@ bool HP_clif_spawn(struct block_list *bl) { { retVal___ = HPMHooks.source.clif.spawn(bl); } - if( HPMHooks.count.HP_clif_spawn_post ) { + if (HPMHooks.count.HP_clif_spawn_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -8345,14 +8345,14 @@ bool HP_clif_spawn(struct block_list *bl) { } 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 ) { + if (HPMHooks.count.HP_clif_changemap_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *m, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8360,9 +8360,9 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) { { HPMHooks.source.clif.changemap(sd, m, x, y); } - if( HPMHooks.count.HP_clif_changemap_post ) { + if (HPMHooks.count.HP_clif_changemap_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short m, int x, int y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_post; hIndex++ ) { + 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); } @@ -8371,14 +8371,14 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) { } 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 ) { + if (HPMHooks.count.HP_clif_changemapcell_pre > 0) { void (*preHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8386,9 +8386,9 @@ void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_ta { HPMHooks.source.clif.changemapcell(fd, m, x, y, type, target); } - if( HPMHooks.count.HP_clif_changemapcell_post ) { + if (HPMHooks.count.HP_clif_changemapcell_post > 0) { 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++ ) { + 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); } @@ -8397,14 +8397,14 @@ void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_ta } 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 ) { + if (HPMHooks.count.HP_clif_map_property_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum map_property *property); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8412,9 +8412,9 @@ void HP_clif_map_property(struct map_session_data *sd, enum map_property propert { HPMHooks.source.clif.map_property(sd, property); } - if( HPMHooks.count.HP_clif_map_property_post ) { + if (HPMHooks.count.HP_clif_map_property_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum map_property property); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_post; hIndex++ ) { + 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); } @@ -8423,14 +8423,14 @@ void HP_clif_map_property(struct map_session_data *sd, enum map_property propert } 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 ) { + if (HPMHooks.count.HP_clif_pvpset_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *pvprank, int *pvpnum, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8438,9 +8438,9 @@ void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int ty { HPMHooks.source.clif.pvpset(sd, pvprank, pvpnum, type); } - if( HPMHooks.count.HP_clif_pvpset_post ) { + if (HPMHooks.count.HP_clif_pvpset_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int pvprank, int pvpnum, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_post; hIndex++ ) { + 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); } @@ -8449,14 +8449,14 @@ void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int ty } void HP_clif_map_property_mapall(int mapid, enum map_property property) { int hIndex = 0; - if( HPMHooks.count.HP_clif_map_property_mapall_pre ) { + if (HPMHooks.count.HP_clif_map_property_mapall_pre > 0) { void (*preHookFunc) (int *mapid, enum map_property *property); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8464,9 +8464,9 @@ void HP_clif_map_property_mapall(int mapid, enum map_property property) { { HPMHooks.source.clif.map_property_mapall(mapid, property); } - if( HPMHooks.count.HP_clif_map_property_mapall_post ) { + if (HPMHooks.count.HP_clif_map_property_mapall_post > 0) { void (*postHookFunc) (int mapid, enum map_property property); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_post; hIndex++ ) { + 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); } @@ -8475,14 +8475,14 @@ void HP_clif_map_property_mapall(int mapid, enum map_property property) { } void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bossmapinfo_pre ) { + if (HPMHooks.count.HP_clif_bossmapinfo_pre > 0) { void (*preHookFunc) (int *fd, struct mob_data **md, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8490,9 +8490,9 @@ void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) { { HPMHooks.source.clif.bossmapinfo(fd, md, flag); } - if( HPMHooks.count.HP_clif_bossmapinfo_post ) { + if (HPMHooks.count.HP_clif_bossmapinfo_post > 0) { void (*postHookFunc) (int fd, struct mob_data *md, short flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bossmapinfo_post[hIndex].func; postHookFunc(fd, md, flag); } @@ -8501,14 +8501,14 @@ void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) { } 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 ) { + if (HPMHooks.count.HP_clif_map_type_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum map_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8516,9 +8516,9 @@ void HP_clif_map_type(struct map_session_data *sd, enum map_type type) { { HPMHooks.source.clif.map_type(sd, type); } - if( HPMHooks.count.HP_clif_map_type_post ) { + if (HPMHooks.count.HP_clif_map_type_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum map_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_post; hIndex++ ) { + 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); } @@ -8527,14 +8527,14 @@ void HP_clif_map_type(struct map_session_data *sd, enum map_type type) { } void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { int hIndex = 0; - if( HPMHooks.count.HP_clif_maptypeproperty2_pre ) { + if (HPMHooks.count.HP_clif_maptypeproperty2_pre > 0) { void (*preHookFunc) (struct block_list **bl, enum send_target *t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8542,9 +8542,9 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { { HPMHooks.source.clif.maptypeproperty2(bl, t); } - if( HPMHooks.count.HP_clif_maptypeproperty2_post ) { + if (HPMHooks.count.HP_clif_maptypeproperty2_post > 0) { void (*postHookFunc) (struct block_list *bl, enum send_target t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_post[hIndex].func; postHookFunc(bl, t); } @@ -8553,14 +8553,14 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { } 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 ) { + if (HPMHooks.count.HP_clif_changemapserver_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8568,9 +8568,9 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind { HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port); } - if( HPMHooks.count.HP_clif_changemapserver_post ) { + if (HPMHooks.count.HP_clif_changemapserver_post > 0) { 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++ ) { + 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); } @@ -8579,14 +8579,14 @@ void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_ind } void HP_clif_npcbuysell(struct map_session_data *sd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_npcbuysell_pre ) { + if (HPMHooks.count.HP_clif_npcbuysell_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8594,9 +8594,9 @@ void HP_clif_npcbuysell(struct map_session_data *sd, int id) { { HPMHooks.source.clif.npcbuysell(sd, id); } - if( HPMHooks.count.HP_clif_npcbuysell_post ) { + if (HPMHooks.count.HP_clif_npcbuysell_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npcbuysell_post[hIndex].func; postHookFunc(sd, id); } @@ -8605,14 +8605,14 @@ void HP_clif_npcbuysell(struct map_session_data *sd, int id) { } void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buylist_pre ) { + if (HPMHooks.count.HP_clif_buylist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8620,9 +8620,9 @@ void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.buylist(sd, nd); } - if( HPMHooks.count.HP_clif_buylist_post ) { + if (HPMHooks.count.HP_clif_buylist_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buylist_post[hIndex].func; postHookFunc(sd, nd); } @@ -8631,14 +8631,14 @@ void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { } void HP_clif_selllist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_selllist_pre ) { + if (HPMHooks.count.HP_clif_selllist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8646,9 +8646,9 @@ void HP_clif_selllist(struct map_session_data *sd) { { HPMHooks.source.clif.selllist(sd); } - if( HPMHooks.count.HP_clif_selllist_post ) { + if (HPMHooks.count.HP_clif_selllist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_selllist_post[hIndex].func; postHookFunc(sd); } @@ -8657,14 +8657,14 @@ void HP_clif_selllist(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_cashshop_show_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8672,9 +8672,9 @@ void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.cashshop_show(sd, nd); } - if( HPMHooks.count.HP_clif_cashshop_show_post ) { + if (HPMHooks.count.HP_clif_cashshop_show_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_post; hIndex++ ) { + 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); } @@ -8683,14 +8683,14 @@ void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { } 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 ) { + if (HPMHooks.count.HP_clif_npc_buy_result_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8698,9 +8698,9 @@ void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) { { HPMHooks.source.clif.npc_buy_result(sd, result); } - if( HPMHooks.count.HP_clif_npc_buy_result_post ) { + if (HPMHooks.count.HP_clif_npc_buy_result_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_post; hIndex++ ) { + 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); } @@ -8709,14 +8709,14 @@ void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) { } 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 ) { + if (HPMHooks.count.HP_clif_npc_sell_result_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8724,9 +8724,9 @@ void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result) { HPMHooks.source.clif.npc_sell_result(sd, result); } - if( HPMHooks.count.HP_clif_npc_sell_result_post ) { + if (HPMHooks.count.HP_clif_npc_sell_result_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned char result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_post; hIndex++ ) { + 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); } @@ -8735,14 +8735,14 @@ void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result) } void HP_clif_cashshop_ack(struct map_session_data *sd, int error) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cashshop_ack_pre ) { + if (HPMHooks.count.HP_clif_cashshop_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *error); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8750,9 +8750,9 @@ void HP_clif_cashshop_ack(struct map_session_data *sd, int error) { { HPMHooks.source.clif.cashshop_ack(sd, error); } - if( HPMHooks.count.HP_clif_cashshop_ack_post ) { + if (HPMHooks.count.HP_clif_cashshop_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int error); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_post; hIndex++ ) { + 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); } @@ -8761,14 +8761,14 @@ void HP_clif_cashshop_ack(struct map_session_data *sd, int error) { } void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptmes_pre ) { + if (HPMHooks.count.HP_clif_scriptmes_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8776,9 +8776,9 @@ void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) { HPMHooks.source.clif.scriptmes(sd, npcid, mes); } - if( HPMHooks.count.HP_clif_scriptmes_post ) { + if (HPMHooks.count.HP_clif_scriptmes_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptmes_post[hIndex].func; postHookFunc(sd, npcid, mes); } @@ -8787,14 +8787,14 @@ void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) } void HP_clif_scriptnext(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptnext_pre ) { + if (HPMHooks.count.HP_clif_scriptnext_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8802,9 +8802,9 @@ void HP_clif_scriptnext(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.scriptnext(sd, npcid); } - if( HPMHooks.count.HP_clif_scriptnext_post ) { + if (HPMHooks.count.HP_clif_scriptnext_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptnext_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8813,14 +8813,14 @@ void HP_clif_scriptnext(struct map_session_data *sd, int npcid) { } void HP_clif_scriptclose(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptclose_pre ) { + if (HPMHooks.count.HP_clif_scriptclose_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8828,9 +8828,9 @@ void HP_clif_scriptclose(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.scriptclose(sd, npcid); } - if( HPMHooks.count.HP_clif_scriptclose_post ) { + if (HPMHooks.count.HP_clif_scriptclose_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptclose_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8839,14 +8839,14 @@ void HP_clif_scriptclose(struct map_session_data *sd, int npcid) { } void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptmenu_pre ) { + if (HPMHooks.count.HP_clif_scriptmenu_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8854,9 +8854,9 @@ void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) { HPMHooks.source.clif.scriptmenu(sd, npcid, mes); } - if( HPMHooks.count.HP_clif_scriptmenu_post ) { + if (HPMHooks.count.HP_clif_scriptmenu_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptmenu_post[hIndex].func; postHookFunc(sd, npcid, mes); } @@ -8865,14 +8865,14 @@ void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) } void HP_clif_scriptinput(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptinput_pre ) { + if (HPMHooks.count.HP_clif_scriptinput_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8880,9 +8880,9 @@ void HP_clif_scriptinput(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.scriptinput(sd, npcid); } - if( HPMHooks.count.HP_clif_scriptinput_post ) { + if (HPMHooks.count.HP_clif_scriptinput_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptinput_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8891,14 +8891,14 @@ void HP_clif_scriptinput(struct map_session_data *sd, int npcid) { } void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptinputstr_pre ) { + if (HPMHooks.count.HP_clif_scriptinputstr_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8906,9 +8906,9 @@ void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.scriptinputstr(sd, npcid); } - if( HPMHooks.count.HP_clif_scriptinputstr_post ) { + if (HPMHooks.count.HP_clif_scriptinputstr_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptinputstr_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8917,14 +8917,14 @@ void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) { } void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cutin_pre ) { + if (HPMHooks.count.HP_clif_cutin_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **image, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8932,9 +8932,9 @@ void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) { { HPMHooks.source.clif.cutin(sd, image, type); } - if( HPMHooks.count.HP_clif_cutin_post ) { + if (HPMHooks.count.HP_clif_cutin_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *image, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_cutin_post[hIndex].func; postHookFunc(sd, image, type); } @@ -8943,14 +8943,14 @@ void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) { } void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendfakenpc_pre ) { + if (HPMHooks.count.HP_clif_sendfakenpc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8958,9 +8958,9 @@ void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.sendfakenpc(sd, npcid); } - if( HPMHooks.count.HP_clif_sendfakenpc_post ) { + if (HPMHooks.count.HP_clif_sendfakenpc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendfakenpc_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8969,14 +8969,14 @@ void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) { } void HP_clif_scriptclear(struct map_session_data *sd, int npcid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_scriptclear_pre ) { + if (HPMHooks.count.HP_clif_scriptclear_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8984,9 +8984,9 @@ void HP_clif_scriptclear(struct map_session_data *sd, int npcid) { { HPMHooks.source.clif.scriptclear(sd, npcid); } - if( HPMHooks.count.HP_clif_scriptclear_post ) { + if (HPMHooks.count.HP_clif_scriptclear_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int npcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_scriptclear_post[hIndex].func; postHookFunc(sd, npcid); } @@ -8995,14 +8995,14 @@ void HP_clif_scriptclear(struct map_session_data *sd, int npcid) { } 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 ) { + if (HPMHooks.count.HP_clif_viewpoint_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9010,9 +9010,9 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, { HPMHooks.source.clif.viewpoint(sd, npc_id, type, x, y, id, color); } - if( HPMHooks.count.HP_clif_viewpoint_post ) { + if (HPMHooks.count.HP_clif_viewpoint_post > 0) { 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++ ) { + 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); } @@ -9022,14 +9022,14 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_damage_pre ) { + if (HPMHooks.count.HP_clif_damage_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func; retVal___ = preHookFunc(&src, &dst, &sdelay, &ddelay, &damage, &div, &type, &damage2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9037,9 +9037,9 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i { retVal___ = HPMHooks.source.clif.damage(src, dst, sdelay, ddelay, damage, div, type, damage2); } - if( HPMHooks.count.HP_clif_damage_post ) { + if (HPMHooks.count.HP_clif_damage_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++ ) { + 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, sdelay, ddelay, damage, div, type, damage2); } @@ -9048,14 +9048,14 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i } void HP_clif_sitting(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sitting_pre ) { + if (HPMHooks.count.HP_clif_sitting_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9063,9 +9063,9 @@ void HP_clif_sitting(struct block_list *bl) { { HPMHooks.source.clif.sitting(bl); } - if( HPMHooks.count.HP_clif_sitting_post ) { + if (HPMHooks.count.HP_clif_sitting_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sitting_post[hIndex].func; postHookFunc(bl); } @@ -9074,14 +9074,14 @@ void HP_clif_sitting(struct block_list *bl) { } void HP_clif_standing(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_standing_pre ) { + if (HPMHooks.count.HP_clif_standing_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9089,9 +9089,9 @@ void HP_clif_standing(struct block_list *bl) { { HPMHooks.source.clif.standing(bl); } - if( HPMHooks.count.HP_clif_standing_post ) { + if (HPMHooks.count.HP_clif_standing_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_standing_post[hIndex].func; postHookFunc(bl); } @@ -9100,14 +9100,14 @@ void HP_clif_standing(struct block_list *bl) { } void HP_clif_arrow_create_list(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_arrow_create_list_pre ) { + if (HPMHooks.count.HP_clif_arrow_create_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9115,9 +9115,9 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) { { HPMHooks.source.clif.arrow_create_list(sd); } - if( HPMHooks.count.HP_clif_arrow_create_list_post ) { + if (HPMHooks.count.HP_clif_arrow_create_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_post; hIndex++ ) { + 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); } @@ -9126,14 +9126,14 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) { } void HP_clif_refresh_storagewindow(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_refresh_storagewindow_pre ) { + if (HPMHooks.count.HP_clif_refresh_storagewindow_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9141,9 +9141,9 @@ void HP_clif_refresh_storagewindow(struct map_session_data *sd) { { HPMHooks.source.clif.refresh_storagewindow(sd); } - if( HPMHooks.count.HP_clif_refresh_storagewindow_post ) { + if (HPMHooks.count.HP_clif_refresh_storagewindow_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_post[hIndex].func; postHookFunc(sd); } @@ -9152,14 +9152,14 @@ void HP_clif_refresh_storagewindow(struct map_session_data *sd) { } void HP_clif_refresh(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_refresh_pre ) { + if (HPMHooks.count.HP_clif_refresh_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9167,9 +9167,9 @@ void HP_clif_refresh(struct map_session_data *sd) { { HPMHooks.source.clif.refresh(sd); } - if( HPMHooks.count.HP_clif_refresh_post ) { + if (HPMHooks.count.HP_clif_refresh_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_refresh_post[hIndex].func; postHookFunc(sd); } @@ -9178,14 +9178,14 @@ void HP_clif_refresh(struct map_session_data *sd) { } void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) { int hIndex = 0; - if( HPMHooks.count.HP_clif_fame_blacksmith_pre ) { + if (HPMHooks.count.HP_clif_fame_blacksmith_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9193,9 +9193,9 @@ void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) { { HPMHooks.source.clif.fame_blacksmith(sd, points); } - if( HPMHooks.count.HP_clif_fame_blacksmith_post ) { + if (HPMHooks.count.HP_clif_fame_blacksmith_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_post; hIndex++ ) { + 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); } @@ -9204,14 +9204,14 @@ void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) { } void HP_clif_fame_alchemist(struct map_session_data *sd, int points) { int hIndex = 0; - if( HPMHooks.count.HP_clif_fame_alchemist_pre ) { + if (HPMHooks.count.HP_clif_fame_alchemist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9219,9 +9219,9 @@ void HP_clif_fame_alchemist(struct map_session_data *sd, int points) { { HPMHooks.source.clif.fame_alchemist(sd, points); } - if( HPMHooks.count.HP_clif_fame_alchemist_post ) { + if (HPMHooks.count.HP_clif_fame_alchemist_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_post; hIndex++ ) { + 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); } @@ -9230,14 +9230,14 @@ void HP_clif_fame_alchemist(struct map_session_data *sd, int points) { } void HP_clif_fame_taekwon(struct map_session_data *sd, int points) { int hIndex = 0; - if( HPMHooks.count.HP_clif_fame_taekwon_pre ) { + if (HPMHooks.count.HP_clif_fame_taekwon_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9245,9 +9245,9 @@ void HP_clif_fame_taekwon(struct map_session_data *sd, int points) { { HPMHooks.source.clif.fame_taekwon(sd, points); } - if( HPMHooks.count.HP_clif_fame_taekwon_post ) { + if (HPMHooks.count.HP_clif_fame_taekwon_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_post; hIndex++ ) { + 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); } @@ -9256,14 +9256,14 @@ void HP_clif_fame_taekwon(struct map_session_data *sd, int points) { } void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ranklist_pre ) { + if (HPMHooks.count.HP_clif_ranklist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum fame_list_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9271,9 +9271,9 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { { HPMHooks.source.clif.ranklist(sd, type); } - if( HPMHooks.count.HP_clif_ranklist_post ) { + if (HPMHooks.count.HP_clif_ranklist_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum fame_list_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ranklist_post[hIndex].func; postHookFunc(sd, type); } @@ -9282,14 +9282,14 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { } 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 ) { + if (HPMHooks.count.HP_clif_update_rankingpoint_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum fame_list_type *type, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9297,9 +9297,9 @@ void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_typ { HPMHooks.source.clif.update_rankingpoint(sd, type, points); } - if( HPMHooks.count.HP_clif_update_rankingpoint_post ) { + if (HPMHooks.count.HP_clif_update_rankingpoint_post > 0) { 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++ ) { + 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); } @@ -9308,14 +9308,14 @@ void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_typ } void HP_clif_pRanklist(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRanklist_pre ) { + if (HPMHooks.count.HP_clif_pRanklist_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9323,9 +9323,9 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRanklist(fd, sd); } - if( HPMHooks.count.HP_clif_pRanklist_post ) { + if (HPMHooks.count.HP_clif_pRanklist_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRanklist_post[hIndex].func; postHookFunc(fd, sd); } @@ -9334,14 +9334,14 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) { } void HP_clif_hotkeys(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_hotkeys_pre ) { + if (HPMHooks.count.HP_clif_hotkeys_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9349,9 +9349,9 @@ void HP_clif_hotkeys(struct map_session_data *sd) { { HPMHooks.source.clif.hotkeys(sd); } - if( HPMHooks.count.HP_clif_hotkeys_post ) { + if (HPMHooks.count.HP_clif_hotkeys_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func; postHookFunc(sd); } @@ -9361,16 +9361,16 @@ void HP_clif_hotkeys(struct map_session_data *sd) { int HP_clif_insight(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_insight_pre ) { + if (HPMHooks.count.HP_clif_insight_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9380,9 +9380,9 @@ int HP_clif_insight(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.insight(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_insight_post ) { + if (HPMHooks.count.HP_clif_insight_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_post; hIndex++ ) { + 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); @@ -9394,16 +9394,16 @@ int HP_clif_insight(struct block_list *bl, va_list ap) { int HP_clif_outsight(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_outsight_pre ) { + if (HPMHooks.count.HP_clif_outsight_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9413,9 +9413,9 @@ int HP_clif_outsight(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.outsight(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_outsight_post ) { + if (HPMHooks.count.HP_clif_outsight_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_post; hIndex++ ) { + 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); @@ -9426,14 +9426,14 @@ int HP_clif_outsight(struct block_list *bl, va_list ap) { } void HP_clif_skillcastcancel(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillcastcancel_pre ) { + if (HPMHooks.count.HP_clif_skillcastcancel_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9441,9 +9441,9 @@ void HP_clif_skillcastcancel(struct block_list *bl) { { HPMHooks.source.clif.skillcastcancel(bl); } - if( HPMHooks.count.HP_clif_skillcastcancel_post ) { + if (HPMHooks.count.HP_clif_skillcastcancel_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillcastcancel_post[hIndex].func; postHookFunc(bl); } @@ -9452,14 +9452,14 @@ void HP_clif_skillcastcancel(struct block_list *bl) { } 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 ) { + if (HPMHooks.count.HP_clif_skill_fail_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9467,9 +9467,9 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk { HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype); } - if( HPMHooks.count.HP_clif_skill_fail_post ) { + if (HPMHooks.count.HP_clif_skill_fail_post > 0) { 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++ ) { + 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); } @@ -9478,14 +9478,14 @@ void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum usesk } void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_cooldown_pre ) { + if (HPMHooks.count.HP_clif_skill_cooldown_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, unsigned int *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) { + 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, &duration); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9493,9 +9493,9 @@ void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsign { HPMHooks.source.clif.skill_cooldown(sd, skill_id, duration); } - if( HPMHooks.count.HP_clif_skill_cooldown_post ) { + if (HPMHooks.count.HP_clif_skill_cooldown_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, unsigned int duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_post; hIndex++ ) { + 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, duration); } @@ -9504,14 +9504,14 @@ void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsign } void HP_clif_skill_memomessage(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_memomessage_pre ) { + if (HPMHooks.count.HP_clif_skill_memomessage_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9519,9 +9519,9 @@ void HP_clif_skill_memomessage(struct map_session_data *sd, int type) { { HPMHooks.source.clif.skill_memomessage(sd, type); } - if( HPMHooks.count.HP_clif_skill_memomessage_post ) { + if (HPMHooks.count.HP_clif_skill_memomessage_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_post; hIndex++ ) { + 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); } @@ -9530,14 +9530,14 @@ void HP_clif_skill_memomessage(struct map_session_data *sd, int type) { } void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_mapinfomessage_pre ) { + if (HPMHooks.count.HP_clif_skill_mapinfomessage_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9545,9 +9545,9 @@ void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) { { HPMHooks.source.clif.skill_mapinfomessage(sd, type); } - if( HPMHooks.count.HP_clif_skill_mapinfomessage_post ) { + if (HPMHooks.count.HP_clif_skill_mapinfomessage_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_post; hIndex++ ) { + 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); } @@ -9556,14 +9556,14 @@ void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) { } 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 ) { + if (HPMHooks.count.HP_clif_skill_produce_mix_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *trigger); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9571,9 +9571,9 @@ void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, i { HPMHooks.source.clif.skill_produce_mix_list(sd, skill_id, trigger); } - if( HPMHooks.count.HP_clif_skill_produce_mix_list_post ) { + if (HPMHooks.count.HP_clif_skill_produce_mix_list_post > 0) { 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++ ) { + 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); } @@ -9582,14 +9582,14 @@ void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, i } 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 ) { + if (HPMHooks.count.HP_clif_cooking_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *trigger, uint16 *skill_id, int *qty, int *list_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9597,9 +9597,9 @@ void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill { HPMHooks.source.clif.cooking_list(sd, trigger, skill_id, qty, list_type); } - if( HPMHooks.count.HP_clif_cooking_list_post ) { + if (HPMHooks.count.HP_clif_cooking_list_post > 0) { 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++ ) { + 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); } @@ -9608,14 +9608,14 @@ void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill } void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_clif_autospell_pre ) { + if (HPMHooks.count.HP_clif_autospell_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9623,9 +9623,9 @@ void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) { { HPMHooks.source.clif.autospell(sd, skill_lv); } - if( HPMHooks.count.HP_clif_autospell_post ) { + if (HPMHooks.count.HP_clif_autospell_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_autospell_post[hIndex].func; postHookFunc(sd, skill_lv); } @@ -9634,14 +9634,14 @@ void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) { } void HP_clif_combo_delay(struct block_list *bl, int wait) { int hIndex = 0; - if( HPMHooks.count.HP_clif_combo_delay_pre ) { + if (HPMHooks.count.HP_clif_combo_delay_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *wait); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9649,9 +9649,9 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) { { HPMHooks.source.clif.combo_delay(bl, wait); } - if( HPMHooks.count.HP_clif_combo_delay_post ) { + if (HPMHooks.count.HP_clif_combo_delay_post > 0) { void (*postHookFunc) (struct block_list *bl, int wait); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_post; hIndex++ ) { + 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); } @@ -9660,14 +9660,14 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) { } 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 ) { + if (HPMHooks.count.HP_clif_status_change_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type, int *flag, int *tick, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9675,9 +9675,9 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, { HPMHooks.source.clif.status_change(bl, type, flag, tick, val1, val2, val3); } - if( HPMHooks.count.HP_clif_status_change_post ) { + if (HPMHooks.count.HP_clif_status_change_post > 0) { 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++ ) { + 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); } @@ -9686,14 +9686,14 @@ void HP_clif_status_change(struct block_list *bl, int type, int flag, int tick, } 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 ) { + if (HPMHooks.count.HP_clif_insert_card_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9701,9 +9701,9 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car { HPMHooks.source.clif.insert_card(sd, idx_equip, idx_card, flag); } - if( HPMHooks.count.HP_clif_insert_card_post ) { + if (HPMHooks.count.HP_clif_insert_card_post > 0) { 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++ ) { + 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); } @@ -9712,14 +9712,14 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car } void HP_clif_inventorylist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_inventorylist_pre ) { + if (HPMHooks.count.HP_clif_inventorylist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9727,9 +9727,9 @@ void HP_clif_inventorylist(struct map_session_data *sd) { { HPMHooks.source.clif.inventorylist(sd); } - if( HPMHooks.count.HP_clif_inventorylist_post ) { + if (HPMHooks.count.HP_clif_inventorylist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_inventorylist_post[hIndex].func; postHookFunc(sd); } @@ -9738,14 +9738,14 @@ void HP_clif_inventorylist(struct map_session_data *sd) { } void HP_clif_equiplist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equiplist_pre ) { + if (HPMHooks.count.HP_clif_equiplist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9753,9 +9753,9 @@ void HP_clif_equiplist(struct map_session_data *sd) { { HPMHooks.source.clif.equiplist(sd); } - if( HPMHooks.count.HP_clif_equiplist_post ) { + if (HPMHooks.count.HP_clif_equiplist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_equiplist_post[hIndex].func; postHookFunc(sd); } @@ -9764,14 +9764,14 @@ void HP_clif_equiplist(struct map_session_data *sd) { } void HP_clif_cartlist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cartlist_pre ) { + if (HPMHooks.count.HP_clif_cartlist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9779,9 +9779,9 @@ void HP_clif_cartlist(struct map_session_data *sd) { { HPMHooks.source.clif.cartlist(sd); } - if( HPMHooks.count.HP_clif_cartlist_post ) { + if (HPMHooks.count.HP_clif_cartlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_cartlist_post[hIndex].func; postHookFunc(sd); } @@ -9790,14 +9790,14 @@ void HP_clif_cartlist(struct map_session_data *sd) { } void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_favorite_item_pre ) { + if (HPMHooks.count.HP_clif_favorite_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9805,9 +9805,9 @@ void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { { HPMHooks.source.clif.favorite_item(sd, index); } - if( HPMHooks.count.HP_clif_favorite_item_post ) { + if (HPMHooks.count.HP_clif_favorite_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_post; hIndex++ ) { + 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); } @@ -9816,14 +9816,14 @@ void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { } void HP_clif_clearcart(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearcart_pre ) { + if (HPMHooks.count.HP_clif_clearcart_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9831,9 +9831,9 @@ void HP_clif_clearcart(int fd) { { HPMHooks.source.clif.clearcart(fd); } - if( HPMHooks.count.HP_clif_clearcart_post ) { + if (HPMHooks.count.HP_clif_clearcart_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearcart_post[hIndex].func; postHookFunc(fd); } @@ -9842,14 +9842,14 @@ void HP_clif_clearcart(int fd) { } void HP_clif_item_identify_list(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_identify_list_pre ) { + if (HPMHooks.count.HP_clif_item_identify_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9857,9 +9857,9 @@ void HP_clif_item_identify_list(struct map_session_data *sd) { { HPMHooks.source.clif.item_identify_list(sd); } - if( HPMHooks.count.HP_clif_item_identify_list_post ) { + if (HPMHooks.count.HP_clif_item_identify_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_post; hIndex++ ) { + 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); } @@ -9868,14 +9868,14 @@ void HP_clif_item_identify_list(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_item_identified_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9883,9 +9883,9 @@ void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) { { HPMHooks.source.clif.item_identified(sd, idx, flag); } - if( HPMHooks.count.HP_clif_item_identified_post ) { + if (HPMHooks.count.HP_clif_item_identified_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_post; hIndex++ ) { + 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); } @@ -9894,14 +9894,14 @@ void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_item_repair_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9909,9 +9909,9 @@ void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_da { HPMHooks.source.clif.item_repair_list(sd, dstsd, lv); } - if( HPMHooks.count.HP_clif_item_repair_list_post ) { + if (HPMHooks.count.HP_clif_item_repair_list_post > 0) { 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++ ) { + 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); } @@ -9920,14 +9920,14 @@ void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_da } 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 ) { + if (HPMHooks.count.HP_clif_item_repaireffect_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9935,9 +9935,9 @@ void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) { { HPMHooks.source.clif.item_repaireffect(sd, idx, flag); } - if( HPMHooks.count.HP_clif_item_repaireffect_post ) { + if (HPMHooks.count.HP_clif_item_repaireffect_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_post; hIndex++ ) { + 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); } @@ -9946,14 +9946,14 @@ void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) { } void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_damaged_pre ) { + if (HPMHooks.count.HP_clif_item_damaged_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *position); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9961,9 +9961,9 @@ void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) { HPMHooks.source.clif.item_damaged(sd, position); } - if( HPMHooks.count.HP_clif_item_damaged_post ) { + if (HPMHooks.count.HP_clif_item_damaged_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short position); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_post; hIndex++ ) { + 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); } @@ -9972,14 +9972,14 @@ void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) } void HP_clif_item_refine_list(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_refine_list_pre ) { + if (HPMHooks.count.HP_clif_item_refine_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9987,9 +9987,9 @@ void HP_clif_item_refine_list(struct map_session_data *sd) { { HPMHooks.source.clif.item_refine_list(sd); } - if( HPMHooks.count.HP_clif_item_refine_list_post ) { + if (HPMHooks.count.HP_clif_item_refine_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_post; hIndex++ ) { + 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); } @@ -9998,14 +9998,14 @@ void HP_clif_item_refine_list(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_item_skill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10013,9 +10013,9 @@ void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 ski { HPMHooks.source.clif.item_skill(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_clif_item_skill_post ) { + if (HPMHooks.count.HP_clif_item_skill_post > 0) { 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++ ) { + 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); } @@ -10024,14 +10024,14 @@ void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 ski } void HP_clif_mvp_item(struct map_session_data *sd, int nameid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mvp_item_pre ) { + if (HPMHooks.count.HP_clif_mvp_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10039,9 +10039,9 @@ void HP_clif_mvp_item(struct map_session_data *sd, int nameid) { { HPMHooks.source.clif.mvp_item(sd, nameid); } - if( HPMHooks.count.HP_clif_mvp_item_post ) { + if (HPMHooks.count.HP_clif_mvp_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_post; hIndex++ ) { + 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); } @@ -10050,14 +10050,14 @@ void HP_clif_mvp_item(struct map_session_data *sd, int nameid) { } void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mvp_exp_pre ) { + if (HPMHooks.count.HP_clif_mvp_exp_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10065,9 +10065,9 @@ void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { { HPMHooks.source.clif.mvp_exp(sd, exp); } - if( HPMHooks.count.HP_clif_mvp_exp_post ) { + if (HPMHooks.count.HP_clif_mvp_exp_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int exp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_post; hIndex++ ) { + 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); } @@ -10076,14 +10076,14 @@ void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { } void HP_clif_mvp_noitem(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mvp_noitem_pre ) { + if (HPMHooks.count.HP_clif_mvp_noitem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10091,9 +10091,9 @@ void HP_clif_mvp_noitem(struct map_session_data *sd) { { HPMHooks.source.clif.mvp_noitem(sd); } - if( HPMHooks.count.HP_clif_mvp_noitem_post ) { + if (HPMHooks.count.HP_clif_mvp_noitem_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mvp_noitem_post[hIndex].func; postHookFunc(sd); } @@ -10102,14 +10102,14 @@ void HP_clif_mvp_noitem(struct map_session_data *sd) { } void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changed_dir_pre ) { + if (HPMHooks.count.HP_clif_changed_dir_pre > 0) { void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10117,9 +10117,9 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { { HPMHooks.source.clif.changed_dir(bl, target); } - if( HPMHooks.count.HP_clif_changed_dir_post ) { + if (HPMHooks.count.HP_clif_changed_dir_post > 0) { void (*postHookFunc) (struct block_list *bl, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_post; hIndex++ ) { + 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); } @@ -10128,14 +10128,14 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { } void HP_clif_charnameack(int fd, struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charnameack_pre ) { + if (HPMHooks.count.HP_clif_charnameack_pre > 0) { void (*preHookFunc) (int *fd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10143,9 +10143,9 @@ void HP_clif_charnameack(int fd, struct block_list *bl) { { HPMHooks.source.clif.charnameack(fd, bl); } - if( HPMHooks.count.HP_clif_charnameack_post ) { + if (HPMHooks.count.HP_clif_charnameack_post > 0) { void (*postHookFunc) (int fd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_charnameack_post[hIndex].func; postHookFunc(fd, bl); } @@ -10154,14 +10154,14 @@ void HP_clif_charnameack(int fd, struct block_list *bl) { } 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 ) { + if (HPMHooks.count.HP_clif_monster_hp_bar_pre > 0) { void (*preHookFunc) (struct mob_data **md, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10169,9 +10169,9 @@ void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { { HPMHooks.source.clif.monster_hp_bar(md, sd); } - if( HPMHooks.count.HP_clif_monster_hp_bar_post ) { + if (HPMHooks.count.HP_clif_monster_hp_bar_post > 0) { void (*postHookFunc) (struct mob_data *md, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_post; hIndex++ ) { + 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); } @@ -10181,14 +10181,14 @@ void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { int HP_clif_hpmeter(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_hpmeter_pre ) { + if (HPMHooks.count.HP_clif_hpmeter_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10196,9 +10196,9 @@ int HP_clif_hpmeter(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.hpmeter(sd); } - if( HPMHooks.count.HP_clif_hpmeter_post ) { + if (HPMHooks.count.HP_clif_hpmeter_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hpmeter_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -10207,14 +10207,14 @@ int HP_clif_hpmeter(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_hpmeter_single_pre > 0) { void (*preHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10222,9 +10222,9 @@ void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { HPMHooks.source.clif.hpmeter_single(fd, id, hp, maxhp); } - if( HPMHooks.count.HP_clif_hpmeter_single_post ) { + if (HPMHooks.count.HP_clif_hpmeter_single_post > 0) { void (*postHookFunc) (int fd, int id, unsigned int hp, unsigned int maxhp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_post; hIndex++ ) { + 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); } @@ -10234,16 +10234,16 @@ void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_hpmeter_sub_pre ) { + if (HPMHooks.count.HP_clif_hpmeter_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10253,9 +10253,9 @@ int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.hpmeter_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_hpmeter_sub_post ) { + if (HPMHooks.count.HP_clif_hpmeter_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_post; hIndex++ ) { + 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); @@ -10266,14 +10266,14 @@ int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { } void HP_clif_upgrademessage(int fd, int result, int item_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_upgrademessage_pre ) { + if (HPMHooks.count.HP_clif_upgrademessage_pre > 0) { void (*preHookFunc) (int *fd, int *result, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10281,9 +10281,9 @@ void HP_clif_upgrademessage(int fd, int result, int item_id) { { HPMHooks.source.clif.upgrademessage(fd, result, item_id); } - if( HPMHooks.count.HP_clif_upgrademessage_post ) { + if (HPMHooks.count.HP_clif_upgrademessage_post > 0) { void (*postHookFunc) (int fd, int result, int item_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_post; hIndex++ ) { + 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); } @@ -10292,14 +10292,14 @@ void HP_clif_upgrademessage(int fd, int result, int item_id) { } 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 ) { + if (HPMHooks.count.HP_clif_get_weapon_view_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short **rhand, unsigned short **lhand); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10307,9 +10307,9 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, { HPMHooks.source.clif.get_weapon_view(sd, rhand, lhand); } - if( HPMHooks.count.HP_clif_get_weapon_view_post ) { + if (HPMHooks.count.HP_clif_get_weapon_view_post > 0) { 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++ ) { + 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); } @@ -10318,14 +10318,14 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, } void HP_clif_gospel_info(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_gospel_info_pre ) { + if (HPMHooks.count.HP_clif_gospel_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10333,9 +10333,9 @@ void HP_clif_gospel_info(struct map_session_data *sd, int type) { { HPMHooks.source.clif.gospel_info(sd, type); } - if( HPMHooks.count.HP_clif_gospel_info_post ) { + if (HPMHooks.count.HP_clif_gospel_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_post; hIndex++ ) { + 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); } @@ -10344,14 +10344,14 @@ void HP_clif_gospel_info(struct map_session_data *sd, int type) { } 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 ) { + if (HPMHooks.count.HP_clif_feel_req_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10359,9 +10359,9 @@ void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) { { HPMHooks.source.clif.feel_req(fd, sd, skill_lv); } - if( HPMHooks.count.HP_clif_feel_req_post ) { + if (HPMHooks.count.HP_clif_feel_req_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_post; hIndex++ ) { + 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); } @@ -10370,14 +10370,14 @@ void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) { } 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 ) { + if (HPMHooks.count.HP_clif_starskill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **mapname, int *monster_id, unsigned char *star, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10385,9 +10385,9 @@ void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int mon { HPMHooks.source.clif.starskill(sd, mapname, monster_id, star, result); } - if( HPMHooks.count.HP_clif_starskill_post ) { + if (HPMHooks.count.HP_clif_starskill_post > 0) { 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++ ) { + 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); } @@ -10396,14 +10396,14 @@ void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int mon } 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 ) { + if (HPMHooks.count.HP_clif_feel_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *feel_level, unsigned char *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10411,9 +10411,9 @@ void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, un { HPMHooks.source.clif.feel_info(sd, feel_level, type); } - if( HPMHooks.count.HP_clif_feel_info_post ) { + if (HPMHooks.count.HP_clif_feel_info_post > 0) { 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++ ) { + 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); } @@ -10422,14 +10422,14 @@ void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, un } 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 ) { + if (HPMHooks.count.HP_clif_hate_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *hate_level, int *class_, unsigned char *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10437,9 +10437,9 @@ void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, in { HPMHooks.source.clif.hate_info(sd, hate_level, class_, type); } - if( HPMHooks.count.HP_clif_hate_info_post ) { + if (HPMHooks.count.HP_clif_hate_info_post > 0) { 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++ ) { + 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); } @@ -10448,14 +10448,14 @@ void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, in } 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 ) { + if (HPMHooks.count.HP_clif_mission_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *mob_id, unsigned char *progress); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10463,9 +10463,9 @@ void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char { HPMHooks.source.clif.mission_info(sd, mob_id, progress); } - if( HPMHooks.count.HP_clif_mission_info_post ) { + if (HPMHooks.count.HP_clif_mission_info_post > 0) { 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++ ) { + 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); } @@ -10474,14 +10474,14 @@ void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char } void HP_clif_feel_hate_reset(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_feel_hate_reset_pre ) { + if (HPMHooks.count.HP_clif_feel_hate_reset_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10489,9 +10489,9 @@ void HP_clif_feel_hate_reset(struct map_session_data *sd) { { HPMHooks.source.clif.feel_hate_reset(sd); } - if( HPMHooks.count.HP_clif_feel_hate_reset_post ) { + if (HPMHooks.count.HP_clif_feel_hate_reset_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_post; hIndex++ ) { + 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); } @@ -10500,14 +10500,14 @@ void HP_clif_feel_hate_reset(struct map_session_data *sd) { } void HP_clif_partytickack(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_partytickack_pre ) { + if (HPMHooks.count.HP_clif_partytickack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10515,9 +10515,9 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) { { HPMHooks.source.clif.partytickack(sd, flag); } - if( HPMHooks.count.HP_clif_partytickack_post ) { + if (HPMHooks.count.HP_clif_partytickack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_partytickack_post[hIndex].func; postHookFunc(sd, flag); } @@ -10526,14 +10526,14 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) { } void HP_clif_equiptickack(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equiptickack_pre ) { + if (HPMHooks.count.HP_clif_equiptickack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10541,9 +10541,9 @@ void HP_clif_equiptickack(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.equiptickack(sd, flag); } - if( HPMHooks.count.HP_clif_equiptickack_post ) { + if (HPMHooks.count.HP_clif_equiptickack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_equiptickack_post[hIndex].func; postHookFunc(sd, flag); } @@ -10552,14 +10552,14 @@ void HP_clif_equiptickack(struct map_session_data *sd, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_viewequip_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10567,9 +10567,9 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data { HPMHooks.source.clif.viewequip_ack(sd, tsd); } - if( HPMHooks.count.HP_clif_viewequip_ack_post ) { + if (HPMHooks.count.HP_clif_viewequip_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_post; hIndex++ ) { + 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); } @@ -10578,14 +10578,14 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data } void HP_clif_equpcheckbox(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equpcheckbox_pre ) { + if (HPMHooks.count.HP_clif_equpcheckbox_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10593,25 +10593,25 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) { { HPMHooks.source.clif.equpcheckbox(sd); } - if( HPMHooks.count.HP_clif_equpcheckbox_post ) { + if (HPMHooks.count.HP_clif_equpcheckbox_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_post; hIndex++ ) { + 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) { +void HP_clif_displayexp(struct map_session_data *sd, uint64 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); + if (HPMHooks.count.HP_clif_displayexp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10619,9 +10619,9 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type { 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++ ) { + if (HPMHooks.count.HP_clif_displayexp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint64 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); } @@ -10630,14 +10630,14 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type } void HP_clif_font(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_font_pre ) { + if (HPMHooks.count.HP_clif_font_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10645,9 +10645,9 @@ void HP_clif_font(struct map_session_data *sd) { { HPMHooks.source.clif.font(sd); } - if( HPMHooks.count.HP_clif_font_post ) { + if (HPMHooks.count.HP_clif_font_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_font_post[hIndex].func; postHookFunc(sd); } @@ -10656,14 +10656,14 @@ void HP_clif_font(struct map_session_data *sd) { } void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsigned int second) { int hIndex = 0; - if( HPMHooks.count.HP_clif_progressbar_pre ) { + if (HPMHooks.count.HP_clif_progressbar_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *color, unsigned int *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10671,9 +10671,9 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsign { HPMHooks.source.clif.progressbar(sd, color, second); } - if( HPMHooks.count.HP_clif_progressbar_post ) { + if (HPMHooks.count.HP_clif_progressbar_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int color, unsigned int second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_progressbar_post[hIndex].func; postHookFunc(sd, color, second); } @@ -10682,14 +10682,14 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsign } void HP_clif_progressbar_abort(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_progressbar_abort_pre ) { + if (HPMHooks.count.HP_clif_progressbar_abort_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10697,9 +10697,9 @@ void HP_clif_progressbar_abort(struct map_session_data *sd) { { HPMHooks.source.clif.progressbar_abort(sd); } - if( HPMHooks.count.HP_clif_progressbar_abort_post ) { + if (HPMHooks.count.HP_clif_progressbar_abort_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_progressbar_abort_post[hIndex].func; postHookFunc(sd); } @@ -10708,14 +10708,14 @@ void HP_clif_progressbar_abort(struct map_session_data *sd) { } void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int value) { int hIndex = 0; - if( HPMHooks.count.HP_clif_showdigit_pre ) { + if (HPMHooks.count.HP_clif_showdigit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10723,9 +10723,9 @@ void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int valu { HPMHooks.source.clif.showdigit(sd, type, value); } - if( HPMHooks.count.HP_clif_showdigit_post ) { + if (HPMHooks.count.HP_clif_showdigit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned char type, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_showdigit_post[hIndex].func; postHookFunc(sd, type, value); } @@ -10735,14 +10735,14 @@ void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int valu int HP_clif_elementalconverter_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_elementalconverter_list_pre ) { + if (HPMHooks.count.HP_clif_elementalconverter_list_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10750,9 +10750,9 @@ int HP_clif_elementalconverter_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.elementalconverter_list(sd); } - if( HPMHooks.count.HP_clif_elementalconverter_list_post ) { + if (HPMHooks.count.HP_clif_elementalconverter_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_post; hIndex++ ) { + 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); } @@ -10762,14 +10762,14 @@ int HP_clif_elementalconverter_list(struct map_session_data *sd) { int HP_clif_spellbook_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_spellbook_list_pre ) { + if (HPMHooks.count.HP_clif_spellbook_list_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10777,9 +10777,9 @@ int HP_clif_spellbook_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.spellbook_list(sd); } - if( HPMHooks.count.HP_clif_spellbook_list_post ) { + if (HPMHooks.count.HP_clif_spellbook_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_post; hIndex++ ) { + 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); } @@ -10789,14 +10789,14 @@ int HP_clif_spellbook_list(struct map_session_data *sd) { int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_magicdecoy_list_pre ) { + if (HPMHooks.count.HP_clif_magicdecoy_list_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10804,9 +10804,9 @@ int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short { retVal___ = HPMHooks.source.clif.magicdecoy_list(sd, skill_lv, x, y); } - if( HPMHooks.count.HP_clif_magicdecoy_list_post ) { + if (HPMHooks.count.HP_clif_magicdecoy_list_post > 0) { 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++ ) { + 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); } @@ -10816,14 +10816,14 @@ int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_poison_list_pre ) { + if (HPMHooks.count.HP_clif_poison_list_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10831,9 +10831,9 @@ int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { { retVal___ = HPMHooks.source.clif.poison_list(sd, skill_lv); } - if( HPMHooks.count.HP_clif_poison_list_post ) { + if (HPMHooks.count.HP_clif_poison_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_post; hIndex++ ) { + 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); } @@ -10843,14 +10843,14 @@ int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { int HP_clif_autoshadowspell_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_autoshadowspell_list_pre ) { + if (HPMHooks.count.HP_clif_autoshadowspell_list_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10858,9 +10858,9 @@ int HP_clif_autoshadowspell_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.autoshadowspell_list(sd); } - if( HPMHooks.count.HP_clif_autoshadowspell_list_post ) { + if (HPMHooks.count.HP_clif_autoshadowspell_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_post; hIndex++ ) { + 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); } @@ -10870,14 +10870,14 @@ int HP_clif_autoshadowspell_list(struct map_session_data *sd) { int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_skill_itemlistwindow_pre ) { + if (HPMHooks.count.HP_clif_skill_itemlistwindow_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10885,9 +10885,9 @@ int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, u { retVal___ = HPMHooks.source.clif.skill_itemlistwindow(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_clif_skill_itemlistwindow_post ) { + if (HPMHooks.count.HP_clif_skill_itemlistwindow_post > 0) { 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++ ) { + 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); } @@ -10896,14 +10896,14 @@ int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, u } 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 ) { + if (HPMHooks.count.HP_clif_sc_load_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10911,9 +10911,9 @@ void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, in { HPMHooks.source.clif.sc_load(bl, tid, target, type, val1, val2, val3); } - if( HPMHooks.count.HP_clif_sc_load_post ) { + if (HPMHooks.count.HP_clif_sc_load_post > 0) { 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++ ) { + 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); } @@ -10922,14 +10922,14 @@ void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, in } void HP_clif_sc_continue(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_continue_pre ) { + if (HPMHooks.count.HP_clif_sc_continue_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_continue_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_continue_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sc_continue_pre[hIndex].func; preHookFunc(&bl, &tid, &target, &type, &val1, &val2, &val3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10937,9 +10937,9 @@ void HP_clif_sc_continue(struct block_list *bl, int tid, enum send_target target { HPMHooks.source.clif.sc_continue(bl, tid, target, type, val1, val2, val3); } - if( HPMHooks.count.HP_clif_sc_continue_post ) { + if (HPMHooks.count.HP_clif_sc_continue_post > 0) { 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_continue_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_continue_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sc_continue_post[hIndex].func; postHookFunc(bl, tid, target, type, val1, val2, val3); } @@ -10948,14 +10948,14 @@ void HP_clif_sc_continue(struct block_list *bl, int tid, enum send_target target } 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 ) { + if (HPMHooks.count.HP_clif_sc_end_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10963,9 +10963,9 @@ void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int { HPMHooks.source.clif.sc_end(bl, tid, target, type); } - if( HPMHooks.count.HP_clif_sc_end_post ) { + if (HPMHooks.count.HP_clif_sc_end_post > 0) { 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++ ) { + 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); } @@ -10974,14 +10974,14 @@ void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int } void HP_clif_initialstatus(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_initialstatus_pre ) { + if (HPMHooks.count.HP_clif_initialstatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10989,9 +10989,9 @@ void HP_clif_initialstatus(struct map_session_data *sd) { { HPMHooks.source.clif.initialstatus(sd); } - if( HPMHooks.count.HP_clif_initialstatus_post ) { + if (HPMHooks.count.HP_clif_initialstatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_initialstatus_post[hIndex].func; postHookFunc(sd); } @@ -11000,14 +11000,14 @@ void HP_clif_initialstatus(struct map_session_data *sd) { } void HP_clif_cooldown_list(int fd, struct skill_cd *cd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cooldown_list_pre ) { + if (HPMHooks.count.HP_clif_cooldown_list_pre > 0) { void (*preHookFunc) (int *fd, struct skill_cd **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11015,9 +11015,9 @@ void HP_clif_cooldown_list(int fd, struct skill_cd *cd) { { HPMHooks.source.clif.cooldown_list(fd, cd); } - if( HPMHooks.count.HP_clif_cooldown_list_post ) { + if (HPMHooks.count.HP_clif_cooldown_list_post > 0) { void (*postHookFunc) (int fd, struct skill_cd *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_post; hIndex++ ) { + 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); } @@ -11026,14 +11026,14 @@ void HP_clif_cooldown_list(int fd, struct skill_cd *cd) { } void HP_clif_updatestatus(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_updatestatus_pre ) { + if (HPMHooks.count.HP_clif_updatestatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11041,9 +11041,9 @@ void HP_clif_updatestatus(struct map_session_data *sd, int type) { { HPMHooks.source.clif.updatestatus(sd, type); } - if( HPMHooks.count.HP_clif_updatestatus_post ) { + if (HPMHooks.count.HP_clif_updatestatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_updatestatus_post[hIndex].func; postHookFunc(sd, type); } @@ -11052,14 +11052,14 @@ void HP_clif_updatestatus(struct map_session_data *sd, int type) { } void HP_clif_changestatus(struct map_session_data *sd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changestatus_pre ) { + if (HPMHooks.count.HP_clif_changestatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11067,9 +11067,9 @@ void HP_clif_changestatus(struct map_session_data *sd, int type, int val) { { HPMHooks.source.clif.changestatus(sd, type, val); } - if( HPMHooks.count.HP_clif_changestatus_post ) { + if (HPMHooks.count.HP_clif_changestatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changestatus_post[hIndex].func; postHookFunc(sd, type, val); } @@ -11078,14 +11078,14 @@ void HP_clif_changestatus(struct map_session_data *sd, int type, int val) { } 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 ) { + if (HPMHooks.count.HP_clif_statusupack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type, int *ok, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11093,9 +11093,9 @@ void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val) { HPMHooks.source.clif.statusupack(sd, type, ok, val); } - if( HPMHooks.count.HP_clif_statusupack_post ) { + if (HPMHooks.count.HP_clif_statusupack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type, int ok, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_post; hIndex++ ) { + 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); } @@ -11104,14 +11104,14 @@ void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val) } void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_movetoattack_pre ) { + if (HPMHooks.count.HP_clif_movetoattack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11119,9 +11119,9 @@ void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { { HPMHooks.source.clif.movetoattack(sd, bl); } - if( HPMHooks.count.HP_clif_movetoattack_post ) { + if (HPMHooks.count.HP_clif_movetoattack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_movetoattack_post[hIndex].func; postHookFunc(sd, bl); } @@ -11130,14 +11130,14 @@ void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { } void HP_clif_solved_charname(int fd, int charid, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_clif_solved_charname_pre ) { + if (HPMHooks.count.HP_clif_solved_charname_pre > 0) { void (*preHookFunc) (int *fd, int *charid, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11145,9 +11145,9 @@ void HP_clif_solved_charname(int fd, int charid, const char *name) { { HPMHooks.source.clif.solved_charname(fd, charid, name); } - if( HPMHooks.count.HP_clif_solved_charname_post ) { + if (HPMHooks.count.HP_clif_solved_charname_post > 0) { void (*postHookFunc) (int fd, int charid, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_post; hIndex++ ) { + 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); } @@ -11156,14 +11156,14 @@ void HP_clif_solved_charname(int fd, int charid, const char *name) { } void HP_clif_charnameupdate(struct map_session_data *ssd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charnameupdate_pre ) { + if (HPMHooks.count.HP_clif_charnameupdate_pre > 0) { void (*preHookFunc) (struct map_session_data **ssd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11171,9 +11171,9 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) { { HPMHooks.source.clif.charnameupdate(ssd); } - if( HPMHooks.count.HP_clif_charnameupdate_post ) { + if (HPMHooks.count.HP_clif_charnameupdate_post > 0) { void (*postHookFunc) (struct map_session_data *ssd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_charnameupdate_post[hIndex].func; postHookFunc(ssd); } @@ -11183,14 +11183,14 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) { int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delayquit_pre ) { + if (HPMHooks.count.HP_clif_delayquit_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11198,9 +11198,9 @@ int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.delayquit(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_delayquit_post ) { + if (HPMHooks.count.HP_clif_delayquit_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_post; hIndex++ ) { + 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); } @@ -11209,14 +11209,14 @@ int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_clif_getareachar_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11224,9 +11224,9 @@ void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data { HPMHooks.source.clif.getareachar_pc(sd, dstsd); } - if( HPMHooks.count.HP_clif_getareachar_pc_post ) { + if (HPMHooks.count.HP_clif_getareachar_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_post; hIndex++ ) { + 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); } @@ -11235,14 +11235,14 @@ void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data } void HP_clif_disconnect_ack(struct map_session_data *sd, short result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_disconnect_ack_pre ) { + if (HPMHooks.count.HP_clif_disconnect_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11250,9 +11250,9 @@ void HP_clif_disconnect_ack(struct map_session_data *sd, short result) { { HPMHooks.source.clif.disconnect_ack(sd, result); } - if( HPMHooks.count.HP_clif_disconnect_ack_post ) { + if (HPMHooks.count.HP_clif_disconnect_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_post; hIndex++ ) { + 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); } @@ -11261,14 +11261,14 @@ void HP_clif_disconnect_ack(struct map_session_data *sd, short result) { } void HP_clif_PVPInfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PVPInfo_pre ) { + if (HPMHooks.count.HP_clif_PVPInfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11276,9 +11276,9 @@ void HP_clif_PVPInfo(struct map_session_data *sd) { { HPMHooks.source.clif.PVPInfo(sd); } - if( HPMHooks.count.HP_clif_PVPInfo_post ) { + if (HPMHooks.count.HP_clif_PVPInfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PVPInfo_post[hIndex].func; postHookFunc(sd); } @@ -11287,14 +11287,14 @@ void HP_clif_PVPInfo(struct map_session_data *sd) { } void HP_clif_blacksmith(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_blacksmith_pre ) { + if (HPMHooks.count.HP_clif_blacksmith_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11302,9 +11302,9 @@ void HP_clif_blacksmith(struct map_session_data *sd) { { HPMHooks.source.clif.blacksmith(sd); } - if( HPMHooks.count.HP_clif_blacksmith_post ) { + if (HPMHooks.count.HP_clif_blacksmith_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_blacksmith_post[hIndex].func; postHookFunc(sd); } @@ -11313,14 +11313,14 @@ void HP_clif_blacksmith(struct map_session_data *sd) { } void HP_clif_alchemist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_alchemist_pre ) { + if (HPMHooks.count.HP_clif_alchemist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11328,9 +11328,9 @@ void HP_clif_alchemist(struct map_session_data *sd) { { HPMHooks.source.clif.alchemist(sd); } - if( HPMHooks.count.HP_clif_alchemist_post ) { + if (HPMHooks.count.HP_clif_alchemist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_alchemist_post[hIndex].func; postHookFunc(sd); } @@ -11339,14 +11339,14 @@ void HP_clif_alchemist(struct map_session_data *sd) { } void HP_clif_taekwon(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_taekwon_pre ) { + if (HPMHooks.count.HP_clif_taekwon_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11354,9 +11354,9 @@ void HP_clif_taekwon(struct map_session_data *sd) { { HPMHooks.source.clif.taekwon(sd); } - if( HPMHooks.count.HP_clif_taekwon_post ) { + if (HPMHooks.count.HP_clif_taekwon_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_taekwon_post[hIndex].func; postHookFunc(sd); } @@ -11365,14 +11365,14 @@ void HP_clif_taekwon(struct map_session_data *sd) { } void HP_clif_ranking_pk(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ranking_pk_pre ) { + if (HPMHooks.count.HP_clif_ranking_pk_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11380,9 +11380,9 @@ void HP_clif_ranking_pk(struct map_session_data *sd) { { HPMHooks.source.clif.ranking_pk(sd); } - if( HPMHooks.count.HP_clif_ranking_pk_post ) { + if (HPMHooks.count.HP_clif_ranking_pk_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ranking_pk_post[hIndex].func; postHookFunc(sd); } @@ -11391,14 +11391,14 @@ void HP_clif_ranking_pk(struct map_session_data *sd) { } void HP_clif_quitsave(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quitsave_pre ) { + if (HPMHooks.count.HP_clif_quitsave_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11406,9 +11406,9 @@ void HP_clif_quitsave(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.quitsave(fd, sd); } - if( HPMHooks.count.HP_clif_quitsave_post ) { + if (HPMHooks.count.HP_clif_quitsave_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_quitsave_post[hIndex].func; postHookFunc(fd, sd); } @@ -11417,14 +11417,14 @@ void HP_clif_quitsave(int fd, struct map_session_data *sd) { } void HP_clif_misceffect(struct block_list *bl, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_misceffect_pre ) { + if (HPMHooks.count.HP_clif_misceffect_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11432,9 +11432,9 @@ void HP_clif_misceffect(struct block_list *bl, int type) { { HPMHooks.source.clif.misceffect(bl, type); } - if( HPMHooks.count.HP_clif_misceffect_post ) { + if (HPMHooks.count.HP_clif_misceffect_post > 0) { void (*postHookFunc) (struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_misceffect_post[hIndex].func; postHookFunc(bl, type); } @@ -11443,14 +11443,14 @@ void HP_clif_misceffect(struct block_list *bl, int type) { } void HP_clif_changeoption(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changeoption_pre ) { + if (HPMHooks.count.HP_clif_changeoption_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11458,9 +11458,9 @@ void HP_clif_changeoption(struct block_list *bl) { { HPMHooks.source.clif.changeoption(bl); } - if( HPMHooks.count.HP_clif_changeoption_post ) { + if (HPMHooks.count.HP_clif_changeoption_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changeoption_post[hIndex].func; postHookFunc(bl); } @@ -11469,14 +11469,14 @@ void HP_clif_changeoption(struct block_list *bl) { } void HP_clif_changeoption2(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changeoption2_pre ) { + if (HPMHooks.count.HP_clif_changeoption2_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11484,9 +11484,9 @@ void HP_clif_changeoption2(struct block_list *bl) { { HPMHooks.source.clif.changeoption2(bl); } - if( HPMHooks.count.HP_clif_changeoption2_post ) { + if (HPMHooks.count.HP_clif_changeoption2_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changeoption2_post[hIndex].func; postHookFunc(bl); } @@ -11495,14 +11495,14 @@ void HP_clif_changeoption2(struct block_list *bl) { } void HP_clif_emotion(struct block_list *bl, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_emotion_pre ) { + if (HPMHooks.count.HP_clif_emotion_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11510,9 +11510,9 @@ void HP_clif_emotion(struct block_list *bl, int type) { { HPMHooks.source.clif.emotion(bl, type); } - if( HPMHooks.count.HP_clif_emotion_post ) { + if (HPMHooks.count.HP_clif_emotion_post > 0) { void (*postHookFunc) (struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_emotion_post[hIndex].func; postHookFunc(bl, type); } @@ -11521,14 +11521,14 @@ void HP_clif_emotion(struct block_list *bl, int type) { } void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { int hIndex = 0; - if( HPMHooks.count.HP_clif_talkiebox_pre ) { + if (HPMHooks.count.HP_clif_talkiebox_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **talkie); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11536,9 +11536,9 @@ void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { { HPMHooks.source.clif.talkiebox(bl, talkie); } - if( HPMHooks.count.HP_clif_talkiebox_post ) { + if (HPMHooks.count.HP_clif_talkiebox_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *talkie); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_talkiebox_post[hIndex].func; postHookFunc(bl, talkie); } @@ -11547,14 +11547,14 @@ void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { } void HP_clif_wedding_effect(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_wedding_effect_pre ) { + if (HPMHooks.count.HP_clif_wedding_effect_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11562,9 +11562,9 @@ void HP_clif_wedding_effect(struct block_list *bl) { { HPMHooks.source.clif.wedding_effect(bl); } - if( HPMHooks.count.HP_clif_wedding_effect_post ) { + if (HPMHooks.count.HP_clif_wedding_effect_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_wedding_effect_post[hIndex].func; postHookFunc(bl); } @@ -11573,14 +11573,14 @@ void HP_clif_wedding_effect(struct block_list *bl) { } void HP_clif_divorced(struct map_session_data *sd, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_clif_divorced_pre ) { + if (HPMHooks.count.HP_clif_divorced_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11588,9 +11588,9 @@ void HP_clif_divorced(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.divorced(sd, name); } - if( HPMHooks.count.HP_clif_divorced_post ) { + if (HPMHooks.count.HP_clif_divorced_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_divorced_post[hIndex].func; postHookFunc(sd, name); } @@ -11599,14 +11599,14 @@ void HP_clif_divorced(struct map_session_data *sd, const char *name) { } void HP_clif_callpartner(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_callpartner_pre ) { + if (HPMHooks.count.HP_clif_callpartner_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11614,9 +11614,9 @@ void HP_clif_callpartner(struct map_session_data *sd) { { HPMHooks.source.clif.callpartner(sd); } - if( HPMHooks.count.HP_clif_callpartner_post ) { + if (HPMHooks.count.HP_clif_callpartner_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_callpartner_post[hIndex].func; postHookFunc(sd); } @@ -11626,14 +11626,14 @@ void HP_clif_callpartner(struct map_session_data *sd) { int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_skill_damage_pre ) { + if (HPMHooks.count.HP_clif_skill_damage_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11641,9 +11641,9 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t { 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 ) { + if (HPMHooks.count.HP_clif_skill_damage_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 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++ ) { + 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); } @@ -11653,14 +11653,14 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t 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___ = 0; - if( HPMHooks.count.HP_clif_skill_nodamage_pre ) { + if (HPMHooks.count.HP_clif_skill_nodamage_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **dst, uint16 *skill_id, int *heal, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11668,9 +11668,9 @@ int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint1 { retVal___ = HPMHooks.source.clif.skill_nodamage(src, dst, skill_id, heal, fail); } - if( HPMHooks.count.HP_clif_skill_nodamage_post ) { + if (HPMHooks.count.HP_clif_skill_nodamage_post > 0) { 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++ ) { + 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); } @@ -11679,14 +11679,14 @@ int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint1 } void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_poseffect_pre ) { + if (HPMHooks.count.HP_clif_skill_poseffect_pre > 0) { void (*preHookFunc) (struct block_list **src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11694,9 +11694,9 @@ void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, i { HPMHooks.source.clif.skill_poseffect(src, skill_id, val, x, y, tick); } - if( HPMHooks.count.HP_clif_skill_poseffect_post ) { + if (HPMHooks.count.HP_clif_skill_poseffect_post > 0) { void (*postHookFunc) (struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_post; hIndex++ ) { + 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); } @@ -11705,14 +11705,14 @@ void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, i } 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 ) { + if (HPMHooks.count.HP_clif_skill_estimation_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **dst); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11720,9 +11720,9 @@ void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *ds { HPMHooks.source.clif.skill_estimation(sd, dst); } - if( HPMHooks.count.HP_clif_skill_estimation_post ) { + if (HPMHooks.count.HP_clif_skill_estimation_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *dst); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_post; hIndex++ ) { + 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); } @@ -11731,14 +11731,14 @@ void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *ds } 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 ) { + if (HPMHooks.count.HP_clif_skill_warppoint_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11746,9 +11746,9 @@ void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint1 { HPMHooks.source.clif.skill_warppoint(sd, skill_id, skill_lv, map1, map2, map3, map4); } - if( HPMHooks.count.HP_clif_skill_warppoint_post ) { + if (HPMHooks.count.HP_clif_skill_warppoint_post > 0) { 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++ ) { + 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); } @@ -11757,14 +11757,14 @@ void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint1 } void HP_clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime) { int hIndex = 0; - if( HPMHooks.count.HP_clif_useskill_pre ) { + if (HPMHooks.count.HP_clif_useskill_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, uint16 *skill_lv, int *casttime); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_useskill_pre[hIndex].func; preHookFunc(&bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &skill_lv, &casttime); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11772,9 +11772,9 @@ void HP_clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, { HPMHooks.source.clif.useskill(bl, src_id, dst_id, dst_x, dst_y, skill_id, skill_lv, casttime); } - if( HPMHooks.count.HP_clif_useskill_post ) { + if (HPMHooks.count.HP_clif_useskill_post > 0) { void (*postHookFunc) (struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_useskill_post[hIndex].func; postHookFunc(bl, src_id, dst_id, dst_x, dst_y, skill_id, skill_lv, casttime); } @@ -11783,14 +11783,14 @@ void HP_clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, } 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 ) { + if (HPMHooks.count.HP_clif_produce_effect_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11798,9 +11798,9 @@ void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) { { HPMHooks.source.clif.produce_effect(sd, flag, nameid); } - if( HPMHooks.count.HP_clif_produce_effect_post ) { + if (HPMHooks.count.HP_clif_produce_effect_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_post; hIndex++ ) { + 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); } @@ -11809,14 +11809,14 @@ void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) { } void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_devotion_pre ) { + if (HPMHooks.count.HP_clif_devotion_pre > 0) { void (*preHookFunc) (struct block_list **src, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11824,9 +11824,9 @@ void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { { HPMHooks.source.clif.devotion(src, tsd); } - if( HPMHooks.count.HP_clif_devotion_post ) { + if (HPMHooks.count.HP_clif_devotion_post > 0) { void (*postHookFunc) (struct block_list *src, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_devotion_post[hIndex].func; postHookFunc(src, tsd); } @@ -11835,14 +11835,14 @@ void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { } void HP_clif_spiritball(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spiritball_pre ) { + if (HPMHooks.count.HP_clif_spiritball_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11850,9 +11850,9 @@ void HP_clif_spiritball(struct block_list *bl) { { HPMHooks.source.clif.spiritball(bl); } - if( HPMHooks.count.HP_clif_spiritball_post ) { + if (HPMHooks.count.HP_clif_spiritball_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spiritball_post[hIndex].func; postHookFunc(bl); } @@ -11861,14 +11861,14 @@ void HP_clif_spiritball(struct block_list *bl) { } void HP_clif_spiritball_single(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spiritball_single_pre ) { + if (HPMHooks.count.HP_clif_spiritball_single_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11876,9 +11876,9 @@ void HP_clif_spiritball_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.spiritball_single(fd, sd); } - if( HPMHooks.count.HP_clif_spiritball_single_post ) { + if (HPMHooks.count.HP_clif_spiritball_single_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_post; hIndex++ ) { + 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); } @@ -11887,14 +11887,14 @@ void HP_clif_spiritball_single(int fd, struct map_session_data *sd) { } void HP_clif_bladestop(struct block_list *src, int dst_id, int active) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bladestop_pre ) { + if (HPMHooks.count.HP_clif_bladestop_pre > 0) { void (*preHookFunc) (struct block_list **src, int *dst_id, int *active); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11902,9 +11902,9 @@ void HP_clif_bladestop(struct block_list *src, int dst_id, int active) { { HPMHooks.source.clif.bladestop(src, dst_id, active); } - if( HPMHooks.count.HP_clif_bladestop_post ) { + if (HPMHooks.count.HP_clif_bladestop_post > 0) { void (*postHookFunc) (struct block_list *src, int dst_id, int active); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_post; hIndex++ ) { + 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); } @@ -11913,14 +11913,14 @@ void HP_clif_bladestop(struct block_list *src, int dst_id, int active) { } void HP_clif_mvp_effect(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mvp_effect_pre ) { + if (HPMHooks.count.HP_clif_mvp_effect_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11928,9 +11928,9 @@ void HP_clif_mvp_effect(struct map_session_data *sd) { { HPMHooks.source.clif.mvp_effect(sd); } - if( HPMHooks.count.HP_clif_mvp_effect_post ) { + if (HPMHooks.count.HP_clif_mvp_effect_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mvp_effect_post[hIndex].func; postHookFunc(sd); } @@ -11939,14 +11939,14 @@ void HP_clif_mvp_effect(struct map_session_data *sd) { } void HP_clif_heal(int fd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_heal_pre ) { + if (HPMHooks.count.HP_clif_heal_pre > 0) { void (*preHookFunc) (int *fd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11954,9 +11954,9 @@ void HP_clif_heal(int fd, int type, int val) { { HPMHooks.source.clif.heal(fd, type, val); } - if( HPMHooks.count.HP_clif_heal_post ) { + if (HPMHooks.count.HP_clif_heal_post > 0) { void (*postHookFunc) (int fd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_heal_post[hIndex].func; postHookFunc(fd, type, val); } @@ -11965,14 +11965,14 @@ void HP_clif_heal(int fd, int type, int val) { } void HP_clif_resurrection(struct block_list *bl, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_resurrection_pre ) { + if (HPMHooks.count.HP_clif_resurrection_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11980,9 +11980,9 @@ void HP_clif_resurrection(struct block_list *bl, int type) { { HPMHooks.source.clif.resurrection(bl, type); } - if( HPMHooks.count.HP_clif_resurrection_post ) { + if (HPMHooks.count.HP_clif_resurrection_post > 0) { void (*postHookFunc) (struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_resurrection_post[hIndex].func; postHookFunc(bl, type); } @@ -11991,14 +11991,14 @@ void HP_clif_resurrection(struct block_list *bl, int type) { } void HP_clif_refine(int fd, int fail, int index, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_refine_pre ) { + if (HPMHooks.count.HP_clif_refine_pre > 0) { void (*preHookFunc) (int *fd, int *fail, int *index, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12006,9 +12006,9 @@ void HP_clif_refine(int fd, int fail, int index, int val) { { HPMHooks.source.clif.refine(fd, fail, index, val); } - if( HPMHooks.count.HP_clif_refine_post ) { + if (HPMHooks.count.HP_clif_refine_post > 0) { void (*postHookFunc) (int fd, int fail, int index, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_post; hIndex++ ) { + 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); } @@ -12017,14 +12017,14 @@ void HP_clif_refine(int fd, int fail, int index, int val) { } void HP_clif_weather(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_clif_weather_pre ) { + if (HPMHooks.count.HP_clif_weather_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12032,9 +12032,9 @@ void HP_clif_weather(int16 m) { { HPMHooks.source.clif.weather(m); } - if( HPMHooks.count.HP_clif_weather_post ) { + if (HPMHooks.count.HP_clif_weather_post > 0) { void (*postHookFunc) (int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_weather_post[hIndex].func; postHookFunc(m); } @@ -12043,14 +12043,14 @@ void HP_clif_weather(int16 m) { } void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_specialeffect_pre ) { + if (HPMHooks.count.HP_clif_specialeffect_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12058,9 +12058,9 @@ void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target tar { HPMHooks.source.clif.specialeffect(bl, type, target); } - if( HPMHooks.count.HP_clif_specialeffect_post ) { + if (HPMHooks.count.HP_clif_specialeffect_post > 0) { void (*postHookFunc) (struct block_list *bl, int type, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_specialeffect_post[hIndex].func; postHookFunc(bl, type, target); } @@ -12069,14 +12069,14 @@ void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target tar } void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_specialeffect_single_pre ) { + if (HPMHooks.count.HP_clif_specialeffect_single_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *type, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12084,9 +12084,9 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { { HPMHooks.source.clif.specialeffect_single(bl, type, fd); } - if( HPMHooks.count.HP_clif_specialeffect_single_post ) { + if (HPMHooks.count.HP_clif_specialeffect_single_post > 0) { void (*postHookFunc) (struct block_list *bl, int type, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_post; hIndex++ ) { + 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); } @@ -12095,14 +12095,14 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { } 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 ) { + if (HPMHooks.count.HP_clif_specialeffect_value_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *effect_id, int *num, send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12110,9 +12110,9 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, { HPMHooks.source.clif.specialeffect_value(bl, effect_id, num, target); } - if( HPMHooks.count.HP_clif_specialeffect_value_post ) { + if (HPMHooks.count.HP_clif_specialeffect_value_post > 0) { 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++ ) { + 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); } @@ -12121,14 +12121,14 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, } void HP_clif_millenniumshield(struct block_list *bl, short shields) { int hIndex = 0; - if( HPMHooks.count.HP_clif_millenniumshield_pre ) { + if (HPMHooks.count.HP_clif_millenniumshield_pre > 0) { void (*preHookFunc) (struct block_list **bl, short *shields); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_millenniumshield_pre[hIndex].func; preHookFunc(&bl, &shields); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12136,9 +12136,9 @@ void HP_clif_millenniumshield(struct block_list *bl, short shields) { { HPMHooks.source.clif.millenniumshield(bl, shields); } - if( HPMHooks.count.HP_clif_millenniumshield_post ) { + if (HPMHooks.count.HP_clif_millenniumshield_post > 0) { void (*postHookFunc) (struct block_list *bl, short shields); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_millenniumshield_post[hIndex].func; postHookFunc(bl, shields); } @@ -12147,14 +12147,14 @@ void HP_clif_millenniumshield(struct block_list *bl, short shields) { } void HP_clif_spiritcharm(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spiritcharm_pre ) { + if (HPMHooks.count.HP_clif_spiritcharm_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_spiritcharm_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12162,9 +12162,9 @@ void HP_clif_spiritcharm(struct map_session_data *sd) { { HPMHooks.source.clif.spiritcharm(sd); } - if( HPMHooks.count.HP_clif_spiritcharm_post ) { + if (HPMHooks.count.HP_clif_spiritcharm_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spiritcharm_post[hIndex].func; postHookFunc(sd); } @@ -12173,14 +12173,14 @@ void HP_clif_spiritcharm(struct map_session_data *sd) { } void HP_clif_charm_single(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charm_single_pre ) { + if (HPMHooks.count.HP_clif_charm_single_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12188,9 +12188,9 @@ void HP_clif_charm_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.charm_single(fd, sd); } - if( HPMHooks.count.HP_clif_charm_single_post ) { + if (HPMHooks.count.HP_clif_charm_single_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_post; hIndex++ ) { + 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); } @@ -12199,14 +12199,14 @@ void HP_clif_charm_single(int fd, struct map_session_data *sd) { } void HP_clif_snap(struct block_list *bl, short x, short y) { int hIndex = 0; - if( HPMHooks.count.HP_clif_snap_pre ) { + if (HPMHooks.count.HP_clif_snap_pre > 0) { void (*preHookFunc) (struct block_list **bl, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12214,9 +12214,9 @@ void HP_clif_snap(struct block_list *bl, short x, short y) { { HPMHooks.source.clif.snap(bl, x, y); } - if( HPMHooks.count.HP_clif_snap_post ) { + if (HPMHooks.count.HP_clif_snap_post > 0) { void (*postHookFunc) (struct block_list *bl, short x, short y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_snap_post[hIndex].func; postHookFunc(bl, x, y); } @@ -12225,14 +12225,14 @@ void HP_clif_snap(struct block_list *bl, short x, short y) { } void HP_clif_weather_check(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_weather_check_pre ) { + if (HPMHooks.count.HP_clif_weather_check_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12240,9 +12240,9 @@ void HP_clif_weather_check(struct map_session_data *sd) { { HPMHooks.source.clif.weather_check(sd); } - if( HPMHooks.count.HP_clif_weather_check_post ) { + if (HPMHooks.count.HP_clif_weather_check_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_weather_check_post[hIndex].func; postHookFunc(sd); } @@ -12251,14 +12251,14 @@ void HP_clif_weather_check(struct map_session_data *sd) { } void HP_clif_playBGM(struct map_session_data *sd, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_clif_playBGM_pre ) { + if (HPMHooks.count.HP_clif_playBGM_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12266,9 +12266,9 @@ void HP_clif_playBGM(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.playBGM(sd, name); } - if( HPMHooks.count.HP_clif_playBGM_post ) { + if (HPMHooks.count.HP_clif_playBGM_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_playBGM_post[hIndex].func; postHookFunc(sd, name); } @@ -12277,14 +12277,14 @@ void HP_clif_playBGM(struct map_session_data *sd, const char *name) { } 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 ) { + if (HPMHooks.count.HP_clif_soundeffect_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12292,9 +12292,9 @@ void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, con { HPMHooks.source.clif.soundeffect(sd, bl, name, type); } - if( HPMHooks.count.HP_clif_soundeffect_post ) { + if (HPMHooks.count.HP_clif_soundeffect_post > 0) { 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++ ) { + 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); } @@ -12303,14 +12303,14 @@ void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, con } 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 ) { + if (HPMHooks.count.HP_clif_soundeffectall_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **name, int *type, enum send_target *coverage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12318,9 +12318,9 @@ void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, e { HPMHooks.source.clif.soundeffectall(bl, name, type, coverage); } - if( HPMHooks.count.HP_clif_soundeffectall_post ) { + if (HPMHooks.count.HP_clif_soundeffectall_post > 0) { 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++ ) { + 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); } @@ -12329,14 +12329,14 @@ void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, e } void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_clif_GlobalMessage_pre ) { + if (HPMHooks.count.HP_clif_GlobalMessage_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12344,9 +12344,9 @@ void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { { HPMHooks.source.clif.GlobalMessage(bl, message); } - if( HPMHooks.count.HP_clif_GlobalMessage_post ) { + if (HPMHooks.count.HP_clif_GlobalMessage_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_GlobalMessage_post[hIndex].func; postHookFunc(bl, message); } @@ -12355,14 +12355,14 @@ void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { } void HP_clif_createchat(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_createchat_pre ) { + if (HPMHooks.count.HP_clif_createchat_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12370,9 +12370,9 @@ void HP_clif_createchat(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.createchat(sd, flag); } - if( HPMHooks.count.HP_clif_createchat_post ) { + if (HPMHooks.count.HP_clif_createchat_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_createchat_post[hIndex].func; postHookFunc(sd, flag); } @@ -12381,14 +12381,14 @@ void HP_clif_createchat(struct map_session_data *sd, int flag) { } void HP_clif_dispchat(struct chat_data *cd, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_dispchat_pre ) { + if (HPMHooks.count.HP_clif_dispchat_pre > 0) { void (*preHookFunc) (struct chat_data **cd, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12396,9 +12396,9 @@ void HP_clif_dispchat(struct chat_data *cd, int fd) { { HPMHooks.source.clif.dispchat(cd, fd); } - if( HPMHooks.count.HP_clif_dispchat_post ) { + if (HPMHooks.count.HP_clif_dispchat_post > 0) { void (*postHookFunc) (struct chat_data *cd, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dispchat_post[hIndex].func; postHookFunc(cd, fd); } @@ -12407,14 +12407,14 @@ void HP_clif_dispchat(struct chat_data *cd, int fd) { } void HP_clif_joinchatfail(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_joinchatfail_pre ) { + if (HPMHooks.count.HP_clif_joinchatfail_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12422,9 +12422,9 @@ void HP_clif_joinchatfail(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.joinchatfail(sd, flag); } - if( HPMHooks.count.HP_clif_joinchatfail_post ) { + if (HPMHooks.count.HP_clif_joinchatfail_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_joinchatfail_post[hIndex].func; postHookFunc(sd, flag); } @@ -12433,14 +12433,14 @@ void HP_clif_joinchatfail(struct map_session_data *sd, int flag) { } void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_joinchatok_pre ) { + if (HPMHooks.count.HP_clif_joinchatok_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12448,9 +12448,9 @@ void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { { HPMHooks.source.clif.joinchatok(sd, cd); } - if( HPMHooks.count.HP_clif_joinchatok_post ) { + if (HPMHooks.count.HP_clif_joinchatok_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_joinchatok_post[hIndex].func; postHookFunc(sd, cd); } @@ -12459,14 +12459,14 @@ void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { } void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_addchat_pre ) { + if (HPMHooks.count.HP_clif_addchat_pre > 0) { void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12474,9 +12474,9 @@ void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { { HPMHooks.source.clif.addchat(cd, sd); } - if( HPMHooks.count.HP_clif_addchat_post ) { + if (HPMHooks.count.HP_clif_addchat_post > 0) { void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addchat_post[hIndex].func; postHookFunc(cd, sd); } @@ -12485,14 +12485,14 @@ void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { } void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changechatowner_pre ) { + if (HPMHooks.count.HP_clif_changechatowner_pre > 0) { void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12500,9 +12500,9 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) { HPMHooks.source.clif.changechatowner(cd, sd); } - if( HPMHooks.count.HP_clif_changechatowner_post ) { + if (HPMHooks.count.HP_clif_changechatowner_post > 0) { void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changechatowner_post[hIndex].func; postHookFunc(cd, sd); } @@ -12511,14 +12511,14 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) } void HP_clif_clearchat(struct chat_data *cd, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearchat_pre ) { + if (HPMHooks.count.HP_clif_clearchat_pre > 0) { void (*preHookFunc) (struct chat_data **cd, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12526,9 +12526,9 @@ void HP_clif_clearchat(struct chat_data *cd, int fd) { { HPMHooks.source.clif.clearchat(cd, fd); } - if( HPMHooks.count.HP_clif_clearchat_post ) { + if (HPMHooks.count.HP_clif_clearchat_post > 0) { void (*postHookFunc) (struct chat_data *cd, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_clearchat_post[hIndex].func; postHookFunc(cd, fd); } @@ -12537,14 +12537,14 @@ void HP_clif_clearchat(struct chat_data *cd, int fd) { } 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 ) { + if (HPMHooks.count.HP_clif_leavechat_pre > 0) { void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12552,9 +12552,9 @@ void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool f { HPMHooks.source.clif.leavechat(cd, sd, flag); } - if( HPMHooks.count.HP_clif_leavechat_post ) { + if (HPMHooks.count.HP_clif_leavechat_post > 0) { void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_leavechat_post[hIndex].func; postHookFunc(cd, sd, flag); } @@ -12563,14 +12563,14 @@ void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool f } void HP_clif_changechatstatus(struct chat_data *cd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_changechatstatus_pre ) { + if (HPMHooks.count.HP_clif_changechatstatus_pre > 0) { void (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12578,9 +12578,9 @@ void HP_clif_changechatstatus(struct chat_data *cd) { { HPMHooks.source.clif.changechatstatus(cd); } - if( HPMHooks.count.HP_clif_changechatstatus_post ) { + if (HPMHooks.count.HP_clif_changechatstatus_post > 0) { void (*postHookFunc) (struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changechatstatus_post[hIndex].func; postHookFunc(cd); } @@ -12589,14 +12589,14 @@ void HP_clif_changechatstatus(struct chat_data *cd) { } 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 ) { + if (HPMHooks.count.HP_clif_wis_message_pre > 0) { void (*preHookFunc) (int *fd, const char **nick, const char **mes, int *mes_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12604,9 +12604,9 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) { HPMHooks.source.clif.wis_message(fd, nick, mes, mes_len); } - if( HPMHooks.count.HP_clif_wis_message_post ) { + if (HPMHooks.count.HP_clif_wis_message_post > 0) { 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++ ) { + 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); } @@ -12615,14 +12615,14 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, int mes_len) } void HP_clif_wis_end(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_wis_end_pre ) { + if (HPMHooks.count.HP_clif_wis_end_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12630,9 +12630,9 @@ void HP_clif_wis_end(int fd, int flag) { { HPMHooks.source.clif.wis_end(fd, flag); } - if( HPMHooks.count.HP_clif_wis_end_post ) { + if (HPMHooks.count.HP_clif_wis_end_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_post; hIndex++ ) { + 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); } @@ -12641,14 +12641,14 @@ void HP_clif_wis_end(int fd, int flag) { } void HP_clif_disp_message(struct block_list *src, const char *mes, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_disp_message_pre ) { + if (HPMHooks.count.HP_clif_disp_message_pre > 0) { void (*preHookFunc) (struct block_list **src, const char **mes, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) { + 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, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12656,9 +12656,9 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, enum send_tar { HPMHooks.source.clif.disp_message(src, mes, target); } - if( HPMHooks.count.HP_clif_disp_message_post ) { + if (HPMHooks.count.HP_clif_disp_message_post > 0) { void (*postHookFunc) (struct block_list *src, const char *mes, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_post; hIndex++ ) { + 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, target); } @@ -12667,14 +12667,14 @@ void HP_clif_disp_message(struct block_list *src, const char *mes, enum send_tar } 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 ) { + if (HPMHooks.count.HP_clif_broadcast_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **mes, int *len, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12682,9 +12682,9 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type { HPMHooks.source.clif.broadcast(bl, mes, len, type, target); } - if( HPMHooks.count.HP_clif_broadcast_post ) { + if (HPMHooks.count.HP_clif_broadcast_post > 0) { 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++ ) { + 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); } @@ -12693,14 +12693,14 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, int len, int type } void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_broadcast2_pre ) { + if (HPMHooks.count.HP_clif_broadcast2_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12708,9 +12708,9 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne { HPMHooks.source.clif.broadcast2(bl, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, target); } - if( HPMHooks.count.HP_clif_broadcast2_post ) { + if (HPMHooks.count.HP_clif_broadcast2_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_post; hIndex++ ) { + 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); } @@ -12719,14 +12719,14 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigne } void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_messagecolor_self_pre ) { + if (HPMHooks.count.HP_clif_messagecolor_self_pre > 0) { void (*preHookFunc) (int *fd, uint32 *color, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_messagecolor_self_pre[hIndex].func; preHookFunc(&fd, &color, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12734,9 +12734,9 @@ void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { { HPMHooks.source.clif.messagecolor_self(fd, color, msg); } - if( HPMHooks.count.HP_clif_messagecolor_self_post ) { + if (HPMHooks.count.HP_clif_messagecolor_self_post > 0) { void (*postHookFunc) (int fd, uint32 color, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_messagecolor_self_post[hIndex].func; postHookFunc(fd, color, msg); } @@ -12745,14 +12745,14 @@ void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { } void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_messagecolor_pre ) { + if (HPMHooks.count.HP_clif_messagecolor_pre > 0) { void (*preHookFunc) (struct block_list **bl, uint32 *color, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12760,9 +12760,9 @@ void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) { HPMHooks.source.clif.messagecolor(bl, color, msg); } - if( HPMHooks.count.HP_clif_messagecolor_post ) { + if (HPMHooks.count.HP_clif_messagecolor_post > 0) { void (*postHookFunc) (struct block_list *bl, uint32 color, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_messagecolor_post[hIndex].func; postHookFunc(bl, color, msg); } @@ -12771,14 +12771,14 @@ void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) } void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_disp_overhead_pre ) { + if (HPMHooks.count.HP_clif_disp_overhead_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12786,9 +12786,9 @@ void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { { HPMHooks.source.clif.disp_overhead(bl, mes); } - if( HPMHooks.count.HP_clif_disp_overhead_post ) { + if (HPMHooks.count.HP_clif_disp_overhead_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_post; hIndex++ ) { + 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); } @@ -12797,14 +12797,14 @@ void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { } void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_pre ) { + if (HPMHooks.count.HP_clif_msgtable_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func; preHookFunc(&sd, &msg_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12812,9 +12812,9 @@ void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { { HPMHooks.source.clif.msgtable(sd, msg_id); } - if( HPMHooks.count.HP_clif_msgtable_post ) { + if (HPMHooks.count.HP_clif_msgtable_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func; postHookFunc(sd, msg_id); } @@ -12823,14 +12823,14 @@ void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { } void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, int value) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_num_pre ) { + if (HPMHooks.count.HP_clif_msgtable_num_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *msg_id, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func; preHookFunc(&sd, &msg_id, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12838,9 +12838,9 @@ void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, in { HPMHooks.source.clif.msgtable_num(sd, msg_id, value); } - if( HPMHooks.count.HP_clif_msgtable_num_post ) { + if (HPMHooks.count.HP_clif_msgtable_num_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short msg_id, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func; postHookFunc(sd, msg_id, value); } @@ -12849,14 +12849,14 @@ void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, in } void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_skill_pre ) { + if (HPMHooks.count.HP_clif_msgtable_skill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_skill_pre[hIndex].func; preHookFunc(&sd, &skill_id, &msg_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12864,9 +12864,9 @@ void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int ms { HPMHooks.source.clif.msgtable_skill(sd, skill_id, msg_id); } - if( HPMHooks.count.HP_clif_msgtable_skill_post ) { + if (HPMHooks.count.HP_clif_msgtable_skill_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, int msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_skill_post[hIndex].func; postHookFunc(sd, skill_id, msg_id); } @@ -12875,14 +12875,14 @@ void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int ms } void HP_clif_message(const int fd, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_message_pre ) { + if (HPMHooks.count.HP_clif_message_pre > 0) { void (*preHookFunc) (const int *fd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12890,9 +12890,9 @@ void HP_clif_message(const int fd, const char *mes) { { HPMHooks.source.clif.message(fd, mes); } - if( HPMHooks.count.HP_clif_message_post ) { + if (HPMHooks.count.HP_clif_message_post > 0) { void (*postHookFunc) (const int fd, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_message_post[hIndex].func; postHookFunc(fd, mes); } @@ -12901,14 +12901,14 @@ void HP_clif_message(const int fd, const char *mes) { } void HP_clif_messageln(const int fd, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_messageln_pre ) { + if (HPMHooks.count.HP_clif_messageln_pre > 0) { void (*preHookFunc) (const int *fd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12916,9 +12916,9 @@ void HP_clif_messageln(const int fd, const char *mes) { { HPMHooks.source.clif.messageln(fd, mes); } - if( HPMHooks.count.HP_clif_messageln_post ) { + if (HPMHooks.count.HP_clif_messageln_post > 0) { void (*postHookFunc) (const int fd, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_messageln_post[hIndex].func; postHookFunc(fd, mes); } @@ -12928,14 +12928,14 @@ void HP_clif_messageln(const int fd, const char *mes) { const char* HP_clif_process_chat_message(struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_clif_process_chat_message_pre ) { + if (HPMHooks.count.HP_clif_process_chat_message_pre > 0) { const char* (*preHookFunc) (struct map_session_data **sd, const struct packet_chat_message **packet, char **out_buf, int *out_buflen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_process_chat_message_pre[hIndex].func; retVal___ = preHookFunc(&sd, &packet, &out_buf, &out_buflen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12943,9 +12943,9 @@ const char* HP_clif_process_chat_message(struct map_session_data *sd, const stru { retVal___ = HPMHooks.source.clif.process_chat_message(sd, packet, out_buf, out_buflen); } - if( HPMHooks.count.HP_clif_process_chat_message_post ) { + if (HPMHooks.count.HP_clif_process_chat_message_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_process_chat_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, packet, out_buf, out_buflen); } @@ -12955,14 +12955,14 @@ const char* HP_clif_process_chat_message(struct map_session_data *sd, const stru bool HP_clif_process_whisper_message(struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_process_whisper_message_pre ) { + if (HPMHooks.count.HP_clif_process_whisper_message_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const struct packet_whisper_message **packet, char **out_name, char **out_message, int *out_messagelen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_process_whisper_message_pre[hIndex].func; retVal___ = preHookFunc(&sd, &packet, &out_name, &out_message, &out_messagelen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12970,9 +12970,9 @@ bool HP_clif_process_whisper_message(struct map_session_data *sd, const struct p { retVal___ = HPMHooks.source.clif.process_whisper_message(sd, packet, out_name, out_message, out_messagelen); } - if( HPMHooks.count.HP_clif_process_whisper_message_post ) { + if (HPMHooks.count.HP_clif_process_whisper_message_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_process_whisper_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, packet, out_name, out_message, out_messagelen); } @@ -12981,14 +12981,14 @@ bool HP_clif_process_whisper_message(struct map_session_data *sd, const struct p } void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_wisexin_pre ) { + if (HPMHooks.count.HP_clif_wisexin_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12996,9 +12996,9 @@ void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) { { HPMHooks.source.clif.wisexin(sd, type, flag); } - if( HPMHooks.count.HP_clif_wisexin_post ) { + if (HPMHooks.count.HP_clif_wisexin_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_wisexin_post[hIndex].func; postHookFunc(sd, type, flag); } @@ -13007,14 +13007,14 @@ void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) { } void HP_clif_wisall(struct map_session_data *sd, int type, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_wisall_pre ) { + if (HPMHooks.count.HP_clif_wisall_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13022,9 +13022,9 @@ void HP_clif_wisall(struct map_session_data *sd, int type, int flag) { { HPMHooks.source.clif.wisall(sd, type, flag); } - if( HPMHooks.count.HP_clif_wisall_post ) { + if (HPMHooks.count.HP_clif_wisall_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_wisall_post[hIndex].func; postHookFunc(sd, type, flag); } @@ -13033,14 +13033,14 @@ void HP_clif_wisall(struct map_session_data *sd, int type, int flag) { } void HP_clif_PMIgnoreList(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PMIgnoreList_pre ) { + if (HPMHooks.count.HP_clif_PMIgnoreList_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13048,9 +13048,9 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) { { HPMHooks.source.clif.PMIgnoreList(sd); } - if( HPMHooks.count.HP_clif_PMIgnoreList_post ) { + if (HPMHooks.count.HP_clif_PMIgnoreList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_post[hIndex].func; postHookFunc(sd); } @@ -13059,14 +13059,14 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) { } void HP_clif_ShowScript(struct block_list *bl, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ShowScript_pre ) { + if (HPMHooks.count.HP_clif_ShowScript_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func; preHookFunc(&bl, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13074,9 +13074,9 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) { { HPMHooks.source.clif.ShowScript(bl, message); } - if( HPMHooks.count.HP_clif_ShowScript_post ) { + if (HPMHooks.count.HP_clif_ShowScript_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ShowScript_post[hIndex].func; postHookFunc(bl, message); } @@ -13085,14 +13085,14 @@ void HP_clif_ShowScript(struct block_list *bl, const char *message) { } void HP_clif_traderequest(struct map_session_data *sd, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_clif_traderequest_pre ) { + if (HPMHooks.count.HP_clif_traderequest_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13100,9 +13100,9 @@ void HP_clif_traderequest(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.traderequest(sd, name); } - if( HPMHooks.count.HP_clif_traderequest_post ) { + if (HPMHooks.count.HP_clif_traderequest_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_traderequest_post[hIndex].func; postHookFunc(sd, name); } @@ -13111,14 +13111,14 @@ void HP_clif_traderequest(struct map_session_data *sd, const char *name) { } void HP_clif_tradestart(struct map_session_data *sd, uint8 type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradestart_pre ) { + if (HPMHooks.count.HP_clif_tradestart_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint8 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13126,9 +13126,9 @@ void HP_clif_tradestart(struct map_session_data *sd, uint8 type) { { HPMHooks.source.clif.tradestart(sd, type); } - if( HPMHooks.count.HP_clif_tradestart_post ) { + if (HPMHooks.count.HP_clif_tradestart_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint8 type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradestart_post[hIndex].func; postHookFunc(sd, type); } @@ -13137,14 +13137,14 @@ void HP_clif_tradestart(struct map_session_data *sd, uint8 type) { } 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 ) { + if (HPMHooks.count.HP_clif_tradeadditem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13152,9 +13152,9 @@ void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data * { HPMHooks.source.clif.tradeadditem(sd, tsd, index, amount); } - if( HPMHooks.count.HP_clif_tradeadditem_post ) { + if (HPMHooks.count.HP_clif_tradeadditem_post > 0) { 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++ ) { + 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); } @@ -13163,14 +13163,14 @@ void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data * } void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradeitemok_pre ) { + if (HPMHooks.count.HP_clif_tradeitemok_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13178,9 +13178,9 @@ void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) { { HPMHooks.source.clif.tradeitemok(sd, index, fail); } - if( HPMHooks.count.HP_clif_tradeitemok_post ) { + if (HPMHooks.count.HP_clif_tradeitemok_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradeitemok_post[hIndex].func; postHookFunc(sd, index, fail); } @@ -13189,14 +13189,14 @@ void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) { } void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradedeal_lock_pre ) { + if (HPMHooks.count.HP_clif_tradedeal_lock_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13204,9 +13204,9 @@ void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) { { HPMHooks.source.clif.tradedeal_lock(sd, fail); } - if( HPMHooks.count.HP_clif_tradedeal_lock_post ) { + if (HPMHooks.count.HP_clif_tradedeal_lock_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_post; hIndex++ ) { + 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); } @@ -13215,14 +13215,14 @@ void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) { } void HP_clif_tradecancelled(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradecancelled_pre ) { + if (HPMHooks.count.HP_clif_tradecancelled_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13230,9 +13230,9 @@ void HP_clif_tradecancelled(struct map_session_data *sd) { { HPMHooks.source.clif.tradecancelled(sd); } - if( HPMHooks.count.HP_clif_tradecancelled_post ) { + if (HPMHooks.count.HP_clif_tradecancelled_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradecancelled_post[hIndex].func; postHookFunc(sd); } @@ -13241,14 +13241,14 @@ void HP_clif_tradecancelled(struct map_session_data *sd) { } void HP_clif_tradecompleted(struct map_session_data *sd, int fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradecompleted_pre ) { + if (HPMHooks.count.HP_clif_tradecompleted_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13256,9 +13256,9 @@ void HP_clif_tradecompleted(struct map_session_data *sd, int fail) { { HPMHooks.source.clif.tradecompleted(sd, fail); } - if( HPMHooks.count.HP_clif_tradecompleted_post ) { + if (HPMHooks.count.HP_clif_tradecompleted_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradecompleted_post[hIndex].func; postHookFunc(sd, fail); } @@ -13267,14 +13267,14 @@ void HP_clif_tradecompleted(struct map_session_data *sd, int fail) { } void HP_clif_tradeundo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_tradeundo_pre ) { + if (HPMHooks.count.HP_clif_tradeundo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13282,9 +13282,9 @@ void HP_clif_tradeundo(struct map_session_data *sd) { { HPMHooks.source.clif.tradeundo(sd); } - if( HPMHooks.count.HP_clif_tradeundo_post ) { + if (HPMHooks.count.HP_clif_tradeundo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradeundo_post[hIndex].func; postHookFunc(sd); } @@ -13293,14 +13293,14 @@ void HP_clif_tradeundo(struct map_session_data *sd) { } void HP_clif_openvendingreq(struct map_session_data *sd, int num) { int hIndex = 0; - if( HPMHooks.count.HP_clif_openvendingreq_pre ) { + if (HPMHooks.count.HP_clif_openvendingreq_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *num); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13308,9 +13308,9 @@ void HP_clif_openvendingreq(struct map_session_data *sd, int num) { { HPMHooks.source.clif.openvendingreq(sd, num); } - if( HPMHooks.count.HP_clif_openvendingreq_post ) { + if (HPMHooks.count.HP_clif_openvendingreq_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int num); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_openvendingreq_post[hIndex].func; postHookFunc(sd, num); } @@ -13319,14 +13319,14 @@ void HP_clif_openvendingreq(struct map_session_data *sd, int num) { } void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_showvendingboard_pre ) { + if (HPMHooks.count.HP_clif_showvendingboard_pre > 0) { void (*preHookFunc) (struct block_list **bl, const char **message, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13334,9 +13334,9 @@ void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd { HPMHooks.source.clif.showvendingboard(bl, message, fd); } - if( HPMHooks.count.HP_clif_showvendingboard_post ) { + if (HPMHooks.count.HP_clif_showvendingboard_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *message, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_showvendingboard_post[hIndex].func; postHookFunc(bl, message, fd); } @@ -13345,14 +13345,14 @@ void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd } void HP_clif_closevendingboard(struct block_list *bl, int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_closevendingboard_pre ) { + if (HPMHooks.count.HP_clif_closevendingboard_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13360,9 +13360,9 @@ void HP_clif_closevendingboard(struct block_list *bl, int fd) { { HPMHooks.source.clif.closevendingboard(bl, fd); } - if( HPMHooks.count.HP_clif_closevendingboard_post ) { + if (HPMHooks.count.HP_clif_closevendingboard_post > 0) { void (*postHookFunc) (struct block_list *bl, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_closevendingboard_post[hIndex].func; postHookFunc(bl, fd); } @@ -13371,14 +13371,14 @@ void HP_clif_closevendingboard(struct block_list *bl, int fd) { } 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 ) { + if (HPMHooks.count.HP_clif_vendinglist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *id, struct s_vending **vending_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13386,9 +13386,9 @@ void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_ { HPMHooks.source.clif.vendinglist(sd, id, vending_list); } - if( HPMHooks.count.HP_clif_vendinglist_post ) { + if (HPMHooks.count.HP_clif_vendinglist_post > 0) { 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++ ) { + 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); } @@ -13397,14 +13397,14 @@ void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_ } 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 ) { + if (HPMHooks.count.HP_clif_buyvending_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13412,9 +13412,9 @@ void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int { HPMHooks.source.clif.buyvending(sd, index, amount, fail); } - if( HPMHooks.count.HP_clif_buyvending_post ) { + if (HPMHooks.count.HP_clif_buyvending_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index, int amount, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_post; hIndex++ ) { + 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); } @@ -13423,14 +13423,14 @@ void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int } 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 ) { + if (HPMHooks.count.HP_clif_openvending_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *id, struct s_vending **vending_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13438,9 +13438,9 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending * { HPMHooks.source.clif.openvending(sd, id, vending_list); } - if( HPMHooks.count.HP_clif_openvending_post ) { + if (HPMHooks.count.HP_clif_openvending_post > 0) { 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++ ) { + 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); } @@ -13449,14 +13449,14 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending * } void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny) { int hIndex = 0; - if( HPMHooks.count.HP_clif_vendingreport_pre ) { + if (HPMHooks.count.HP_clif_vendingreport_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_vendingreport_pre[hIndex].func; preHookFunc(&sd, &index, &amount, &char_id, &zeny); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13464,9 +13464,9 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, u { HPMHooks.source.clif.vendingreport(sd, index, amount, char_id, zeny); } - if( HPMHooks.count.HP_clif_vendingreport_post ) { + if (HPMHooks.count.HP_clif_vendingreport_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_vendingreport_post[hIndex].func; postHookFunc(sd, index, amount, char_id, zeny); } @@ -13475,14 +13475,14 @@ void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, u } 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 ) { + if (HPMHooks.count.HP_clif_storagelist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13490,9 +13490,9 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it { HPMHooks.source.clif.storagelist(sd, items, items_length); } - if( HPMHooks.count.HP_clif_storagelist_post ) { + if (HPMHooks.count.HP_clif_storagelist_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storagelist_post; hIndex++ ) { + 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); } @@ -13501,14 +13501,14 @@ void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int it } void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int max_amount) { int hIndex = 0; - if( HPMHooks.count.HP_clif_updatestorageamount_pre ) { + if (HPMHooks.count.HP_clif_updatestorageamount_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *amount, int *max_amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13516,9 +13516,9 @@ void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int ma { HPMHooks.source.clif.updatestorageamount(sd, amount, max_amount); } - if( HPMHooks.count.HP_clif_updatestorageamount_post ) { + if (HPMHooks.count.HP_clif_updatestorageamount_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int amount, int max_amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_post; hIndex++ ) { + 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); } @@ -13527,14 +13527,14 @@ void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int ma } 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 ) { + if (HPMHooks.count.HP_clif_storageitemadded_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item **i, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13542,9 +13542,9 @@ void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int i { HPMHooks.source.clif.storageitemadded(sd, i, index, amount); } - if( HPMHooks.count.HP_clif_storageitemadded_post ) { + if (HPMHooks.count.HP_clif_storageitemadded_post > 0) { 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++ ) { + 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); } @@ -13553,14 +13553,14 @@ void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int i } void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_clif_storageitemremoved_pre ) { + if (HPMHooks.count.HP_clif_storageitemremoved_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13568,9 +13568,9 @@ void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amou { HPMHooks.source.clif.storageitemremoved(sd, index, amount); } - if( HPMHooks.count.HP_clif_storageitemremoved_post ) { + if (HPMHooks.count.HP_clif_storageitemremoved_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_storageitemremoved_post[hIndex].func; postHookFunc(sd, index, amount); } @@ -13579,14 +13579,14 @@ void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amou } void HP_clif_storageclose(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_storageclose_pre ) { + if (HPMHooks.count.HP_clif_storageclose_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13594,9 +13594,9 @@ void HP_clif_storageclose(struct map_session_data *sd) { { HPMHooks.source.clif.storageclose(sd); } - if( HPMHooks.count.HP_clif_storageclose_post ) { + if (HPMHooks.count.HP_clif_storageclose_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_storageclose_post[hIndex].func; postHookFunc(sd); } @@ -13605,14 +13605,14 @@ void HP_clif_storageclose(struct map_session_data *sd) { } void HP_clif_skillinfoblock(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillinfoblock_pre ) { + if (HPMHooks.count.HP_clif_skillinfoblock_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13620,9 +13620,9 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) { { HPMHooks.source.clif.skillinfoblock(sd); } - if( HPMHooks.count.HP_clif_skillinfoblock_post ) { + if (HPMHooks.count.HP_clif_skillinfoblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillinfoblock_post[hIndex].func; postHookFunc(sd); } @@ -13631,14 +13631,14 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) { } void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillup_pre ) { + if (HPMHooks.count.HP_clif_skillup_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func; preHookFunc(&sd, &skill_id, &skill_lv, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13646,9 +13646,9 @@ void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, { HPMHooks.source.clif.skillup(sd, skill_id, skill_lv, flag); } - if( HPMHooks.count.HP_clif_skillup_post ) { + if (HPMHooks.count.HP_clif_skillup_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillup_post[hIndex].func; postHookFunc(sd, skill_id, skill_lv, flag); } @@ -13657,14 +13657,14 @@ void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, } void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillinfo_pre ) { + if (HPMHooks.count.HP_clif_skillinfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *inf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13672,9 +13672,9 @@ void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) { { HPMHooks.source.clif.skillinfo(sd, skill_id, inf); } - if( HPMHooks.count.HP_clif_skillinfo_post ) { + if (HPMHooks.count.HP_clif_skillinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int skill_id, int inf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_post; hIndex++ ) { + 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); } @@ -13683,14 +13683,14 @@ void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) { } void HP_clif_addskill(struct map_session_data *sd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_addskill_pre ) { + if (HPMHooks.count.HP_clif_addskill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13698,9 +13698,9 @@ void HP_clif_addskill(struct map_session_data *sd, int id) { { HPMHooks.source.clif.addskill(sd, id); } - if( HPMHooks.count.HP_clif_addskill_post ) { + if (HPMHooks.count.HP_clif_addskill_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addskill_post[hIndex].func; postHookFunc(sd, id); } @@ -13709,14 +13709,14 @@ void HP_clif_addskill(struct map_session_data *sd, int id) { } void HP_clif_deleteskill(struct map_session_data *sd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_deleteskill_pre ) { + if (HPMHooks.count.HP_clif_deleteskill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13724,9 +13724,9 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) { { HPMHooks.source.clif.deleteskill(sd, id); } - if( HPMHooks.count.HP_clif_deleteskill_post ) { + if (HPMHooks.count.HP_clif_deleteskill_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_deleteskill_post[hIndex].func; postHookFunc(sd, id); } @@ -13735,14 +13735,14 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) { } void HP_clif_party_created(struct map_session_data *sd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_party_created_pre ) { + if (HPMHooks.count.HP_clif_party_created_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13750,9 +13750,9 @@ void HP_clif_party_created(struct map_session_data *sd, int result) { { HPMHooks.source.clif.party_created(sd, result); } - if( HPMHooks.count.HP_clif_party_created_post ) { + if (HPMHooks.count.HP_clif_party_created_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_post; hIndex++ ) { + 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); } @@ -13761,14 +13761,14 @@ void HP_clif_party_created(struct map_session_data *sd, int result) { } 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 ) { + if (HPMHooks.count.HP_clif_party_member_info_pre > 0) { void (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13776,9 +13776,9 @@ void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd { HPMHooks.source.clif.party_member_info(p, sd); } - if( HPMHooks.count.HP_clif_party_member_info_post ) { + if (HPMHooks.count.HP_clif_party_member_info_post > 0) { void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_post; hIndex++ ) { + 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); } @@ -13787,14 +13787,14 @@ void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd } 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 ) { + if (HPMHooks.count.HP_clif_party_info_pre > 0) { void (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13802,25 +13802,51 @@ void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) { { HPMHooks.source.clif.party_info(p, sd); } - if( HPMHooks.count.HP_clif_party_info_post ) { + if (HPMHooks.count.HP_clif_party_info_post > 0) { void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_post; hIndex++ ) { + 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_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_job_and_level(sd); + } + if (HPMHooks.count.HP_clif_party_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_job_and_level_post[hIndex].func; + postHookFunc(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 ) { + if (HPMHooks.count.HP_clif_party_invite_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13828,9 +13854,9 @@ void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data * { HPMHooks.source.clif.party_invite(sd, tsd); } - if( HPMHooks.count.HP_clif_party_invite_post ) { + if (HPMHooks.count.HP_clif_party_invite_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_post; hIndex++ ) { + 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); } @@ -13839,14 +13865,14 @@ void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data * } 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 ) { + if (HPMHooks.count.HP_clif_party_inviteack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **nick, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13854,9 +13880,9 @@ void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int { HPMHooks.source.clif.party_inviteack(sd, nick, result); } - if( HPMHooks.count.HP_clif_party_inviteack_post ) { + if (HPMHooks.count.HP_clif_party_inviteack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *nick, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_post; hIndex++ ) { + 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); } @@ -13865,14 +13891,14 @@ void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int } 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 ) { + if (HPMHooks.count.HP_clif_party_option_pre > 0) { void (*preHookFunc) (struct party_data **p, struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13880,9 +13906,9 @@ void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int { HPMHooks.source.clif.party_option(p, sd, flag); } - if( HPMHooks.count.HP_clif_party_option_post ) { + if (HPMHooks.count.HP_clif_party_option_post > 0) { 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++ ) { + 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); } @@ -13891,14 +13917,14 @@ void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int } 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 ) { + if (HPMHooks.count.HP_clif_party_withdraw_pre > 0) { void (*preHookFunc) (struct party_data **p, struct map_session_data **sd, int *account_id, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13906,9 +13932,9 @@ void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, i { HPMHooks.source.clif.party_withdraw(p, sd, account_id, name, flag); } - if( HPMHooks.count.HP_clif_party_withdraw_post ) { + if (HPMHooks.count.HP_clif_party_withdraw_post > 0) { 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++ ) { + 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); } @@ -13917,14 +13943,14 @@ void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, i } 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 ) { + if (HPMHooks.count.HP_clif_party_message_pre > 0) { void (*preHookFunc) (struct party_data **p, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13932,9 +13958,9 @@ void HP_clif_party_message(struct party_data *p, int account_id, const char *mes { HPMHooks.source.clif.party_message(p, account_id, mes, len); } - if( HPMHooks.count.HP_clif_party_message_post ) { + if (HPMHooks.count.HP_clif_party_message_post > 0) { 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++ ) { + 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); } @@ -13943,14 +13969,14 @@ void HP_clif_party_message(struct party_data *p, int account_id, const char *mes } void HP_clif_party_xy(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_party_xy_pre ) { + if (HPMHooks.count.HP_clif_party_xy_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13958,9 +13984,9 @@ void HP_clif_party_xy(struct map_session_data *sd) { { HPMHooks.source.clif.party_xy(sd); } - if( HPMHooks.count.HP_clif_party_xy_post ) { + if (HPMHooks.count.HP_clif_party_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_party_xy_post[hIndex].func; postHookFunc(sd); } @@ -13969,14 +13995,14 @@ void HP_clif_party_xy(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_party_xy_single_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13984,9 +14010,9 @@ void HP_clif_party_xy_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.party_xy_single(fd, sd); } - if( HPMHooks.count.HP_clif_party_xy_single_post ) { + if (HPMHooks.count.HP_clif_party_xy_single_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_post; hIndex++ ) { + 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); } @@ -13995,14 +14021,14 @@ void HP_clif_party_xy_single(int fd, struct map_session_data *sd) { } void HP_clif_party_hp(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_party_hp_pre ) { + if (HPMHooks.count.HP_clif_party_hp_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14010,9 +14036,9 @@ void HP_clif_party_hp(struct map_session_data *sd) { { HPMHooks.source.clif.party_hp(sd); } - if( HPMHooks.count.HP_clif_party_hp_post ) { + if (HPMHooks.count.HP_clif_party_hp_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_party_hp_post[hIndex].func; postHookFunc(sd); } @@ -14021,14 +14047,14 @@ void HP_clif_party_hp(struct map_session_data *sd) { } void HP_clif_party_xy_remove(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_party_xy_remove_pre ) { + if (HPMHooks.count.HP_clif_party_xy_remove_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14036,9 +14062,9 @@ void HP_clif_party_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.party_xy_remove(sd); } - if( HPMHooks.count.HP_clif_party_xy_remove_post ) { + if (HPMHooks.count.HP_clif_party_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_post; hIndex++ ) { + 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); } @@ -14047,14 +14073,14 @@ void HP_clif_party_xy_remove(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_party_show_picker_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item **item_data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14062,9 +14088,9 @@ void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_da { HPMHooks.source.clif.party_show_picker(sd, item_data); } - if( HPMHooks.count.HP_clif_party_show_picker_post ) { + if (HPMHooks.count.HP_clif_party_show_picker_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item *item_data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_post; hIndex++ ) { + 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); } @@ -14073,14 +14099,14 @@ void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_da } void HP_clif_partyinvitationstate(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_partyinvitationstate_pre ) { + if (HPMHooks.count.HP_clif_partyinvitationstate_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14088,9 +14114,9 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { { HPMHooks.source.clif.partyinvitationstate(sd); } - if( HPMHooks.count.HP_clif_partyinvitationstate_post ) { + if (HPMHooks.count.HP_clif_partyinvitationstate_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_post[hIndex].func; postHookFunc(sd); } @@ -14099,14 +14125,14 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { } void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyLeaderChanged_pre ) { + if (HPMHooks.count.HP_clif_PartyLeaderChanged_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *prev_leader_aid, int *new_leader_aid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_pre[hIndex].func; preHookFunc(&sd, &prev_leader_aid, &new_leader_aid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14114,9 +14140,9 @@ void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid { HPMHooks.source.clif.PartyLeaderChanged(sd, prev_leader_aid, new_leader_aid); } - if( HPMHooks.count.HP_clif_PartyLeaderChanged_post ) { + if (HPMHooks.count.HP_clif_PartyLeaderChanged_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int prev_leader_aid, int new_leader_aid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_post[hIndex].func; postHookFunc(sd, prev_leader_aid, new_leader_aid); } @@ -14125,14 +14151,14 @@ void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid } void HP_clif_guild_created(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_created_pre ) { + if (HPMHooks.count.HP_clif_guild_created_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14140,9 +14166,9 @@ void HP_clif_guild_created(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.guild_created(sd, flag); } - if( HPMHooks.count.HP_clif_guild_created_post ) { + if (HPMHooks.count.HP_clif_guild_created_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_post; hIndex++ ) { + 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); } @@ -14151,14 +14177,14 @@ void HP_clif_guild_created(struct map_session_data *sd, int flag) { } void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_belonginfo_pre ) { + if (HPMHooks.count.HP_clif_guild_belonginfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14166,9 +14192,9 @@ void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_belonginfo(sd, g); } - if( HPMHooks.count.HP_clif_guild_belonginfo_post ) { + if (HPMHooks.count.HP_clif_guild_belonginfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_post; hIndex++ ) { + 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); } @@ -14177,14 +14203,14 @@ void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { } void HP_clif_guild_masterormember(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_masterormember_pre ) { + if (HPMHooks.count.HP_clif_guild_masterormember_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14192,9 +14218,9 @@ void HP_clif_guild_masterormember(struct map_session_data *sd) { { HPMHooks.source.clif.guild_masterormember(sd); } - if( HPMHooks.count.HP_clif_guild_masterormember_post ) { + if (HPMHooks.count.HP_clif_guild_masterormember_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_masterormember_post[hIndex].func; postHookFunc(sd); } @@ -14203,14 +14229,14 @@ void HP_clif_guild_masterormember(struct map_session_data *sd) { } void HP_clif_guild_basicinfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_basicinfo_pre ) { + if (HPMHooks.count.HP_clif_guild_basicinfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14218,9 +14244,9 @@ void HP_clif_guild_basicinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_basicinfo(sd); } - if( HPMHooks.count.HP_clif_guild_basicinfo_post ) { + if (HPMHooks.count.HP_clif_guild_basicinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_post[hIndex].func; postHookFunc(sd); } @@ -14229,14 +14255,14 @@ void HP_clif_guild_basicinfo(struct map_session_data *sd) { } void HP_clif_guild_allianceinfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_allianceinfo_pre ) { + if (HPMHooks.count.HP_clif_guild_allianceinfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14244,9 +14270,9 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_allianceinfo(sd); } - if( HPMHooks.count.HP_clif_guild_allianceinfo_post ) { + if (HPMHooks.count.HP_clif_guild_allianceinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_post[hIndex].func; postHookFunc(sd); } @@ -14255,14 +14281,14 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) { } void HP_clif_guild_memberlist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_memberlist_pre ) { + if (HPMHooks.count.HP_clif_guild_memberlist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14270,9 +14296,9 @@ void HP_clif_guild_memberlist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_memberlist(sd); } - if( HPMHooks.count.HP_clif_guild_memberlist_post ) { + if (HPMHooks.count.HP_clif_guild_memberlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_memberlist_post[hIndex].func; postHookFunc(sd); } @@ -14281,14 +14307,14 @@ void HP_clif_guild_memberlist(struct map_session_data *sd) { } void HP_clif_guild_skillinfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_skillinfo_pre ) { + if (HPMHooks.count.HP_clif_guild_skillinfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14296,9 +14322,9 @@ void HP_clif_guild_skillinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_skillinfo(sd); } - if( HPMHooks.count.HP_clif_guild_skillinfo_post ) { + if (HPMHooks.count.HP_clif_guild_skillinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_post[hIndex].func; postHookFunc(sd); } @@ -14307,14 +14333,14 @@ void HP_clif_guild_skillinfo(struct map_session_data *sd) { } void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_send_onlineinfo_pre ) { + if (HPMHooks.count.HP_clif_guild_send_onlineinfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14322,9 +14348,9 @@ void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_send_onlineinfo(sd); } - if( HPMHooks.count.HP_clif_guild_send_onlineinfo_post ) { + if (HPMHooks.count.HP_clif_guild_send_onlineinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_post; hIndex++ ) { + 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); } @@ -14333,14 +14359,14 @@ void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_guild_memberlogin_notice_pre > 0) { void (*preHookFunc) (struct guild **g, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14348,9 +14374,9 @@ void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) { { HPMHooks.source.clif.guild_memberlogin_notice(g, idx, flag); } - if( HPMHooks.count.HP_clif_guild_memberlogin_notice_post ) { + if (HPMHooks.count.HP_clif_guild_memberlogin_notice_post > 0) { void (*postHookFunc) (struct guild *g, int idx, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_post; hIndex++ ) { + 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); } @@ -14359,14 +14385,14 @@ void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) { } void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_invite_pre ) { + if (HPMHooks.count.HP_clif_guild_invite_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14374,9 +14400,9 @@ void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_invite(sd, g); } - if( HPMHooks.count.HP_clif_guild_invite_post ) { + if (HPMHooks.count.HP_clif_guild_invite_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_post; hIndex++ ) { + 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); } @@ -14385,14 +14411,14 @@ void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { } void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_inviteack_pre ) { + if (HPMHooks.count.HP_clif_guild_inviteack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14400,9 +14426,9 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.guild_inviteack(sd, flag); } - if( HPMHooks.count.HP_clif_guild_inviteack_post ) { + if (HPMHooks.count.HP_clif_guild_inviteack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_post; hIndex++ ) { + 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); } @@ -14411,14 +14437,14 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_guild_leave_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14426,9 +14452,9 @@ void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const ch { HPMHooks.source.clif.guild_leave(sd, name, mes); } - if( HPMHooks.count.HP_clif_guild_leave_post ) { + if (HPMHooks.count.HP_clif_guild_leave_post > 0) { 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++ ) { + 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); } @@ -14437,14 +14463,14 @@ void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const ch } 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 ) { + if (HPMHooks.count.HP_clif_guild_expulsion_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **name, const char **mes, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14452,9 +14478,9 @@ void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, cons { HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id); } - if( HPMHooks.count.HP_clif_guild_expulsion_post ) { + if (HPMHooks.count.HP_clif_guild_expulsion_post > 0) { 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++ ) { + 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); } @@ -14463,14 +14489,14 @@ void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, cons } void HP_clif_guild_positionchanged(struct guild *g, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_positionchanged_pre ) { + if (HPMHooks.count.HP_clif_guild_positionchanged_pre > 0) { void (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14478,9 +14504,9 @@ void HP_clif_guild_positionchanged(struct guild *g, int idx) { { HPMHooks.source.clif.guild_positionchanged(g, idx); } - if( HPMHooks.count.HP_clif_guild_positionchanged_post ) { + if (HPMHooks.count.HP_clif_guild_positionchanged_post > 0) { void (*postHookFunc) (struct guild *g, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_post; hIndex++ ) { + 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); } @@ -14489,14 +14515,14 @@ void HP_clif_guild_positionchanged(struct guild *g, int idx) { } void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_memberpositionchanged_pre ) { + if (HPMHooks.count.HP_clif_guild_memberpositionchanged_pre > 0) { void (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14504,9 +14530,9 @@ void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) { { HPMHooks.source.clif.guild_memberpositionchanged(g, idx); } - if( HPMHooks.count.HP_clif_guild_memberpositionchanged_post ) { + if (HPMHooks.count.HP_clif_guild_memberpositionchanged_post > 0) { void (*postHookFunc) (struct guild *g, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_post; hIndex++ ) { + 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); } @@ -14515,14 +14541,14 @@ void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) { } void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_emblem_pre ) { + if (HPMHooks.count.HP_clif_guild_emblem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14530,9 +14556,9 @@ void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_emblem(sd, g); } - if( HPMHooks.count.HP_clif_guild_emblem_post ) { + if (HPMHooks.count.HP_clif_guild_emblem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_post; hIndex++ ) { + 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); } @@ -14541,14 +14567,14 @@ void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { } void HP_clif_guild_emblem_area(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_emblem_area_pre ) { + if (HPMHooks.count.HP_clif_guild_emblem_area_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14556,9 +14582,9 @@ void HP_clif_guild_emblem_area(struct block_list *bl) { { HPMHooks.source.clif.guild_emblem_area(bl); } - if( HPMHooks.count.HP_clif_guild_emblem_area_post ) { + if (HPMHooks.count.HP_clif_guild_emblem_area_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_post; hIndex++ ) { + 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); } @@ -14567,14 +14593,14 @@ void HP_clif_guild_emblem_area(struct block_list *bl) { } void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_notice_pre ) { + if (HPMHooks.count.HP_clif_guild_notice_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14582,9 +14608,9 @@ void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_notice(sd, g); } - if( HPMHooks.count.HP_clif_guild_notice_post ) { + if (HPMHooks.count.HP_clif_guild_notice_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_post; hIndex++ ) { + 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); } @@ -14593,14 +14619,14 @@ void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { } 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 ) { + if (HPMHooks.count.HP_clif_guild_message_pre > 0) { void (*preHookFunc) (struct guild **g, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14608,9 +14634,9 @@ void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int { HPMHooks.source.clif.guild_message(g, account_id, mes, len); } - if( HPMHooks.count.HP_clif_guild_message_post ) { + if (HPMHooks.count.HP_clif_guild_message_post > 0) { 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++ ) { + 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); } @@ -14619,14 +14645,14 @@ void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int } 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 ) { + if (HPMHooks.count.HP_clif_guild_reqalliance_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14634,9 +14660,9 @@ void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, cons { HPMHooks.source.clif.guild_reqalliance(sd, account_id, name); } - if( HPMHooks.count.HP_clif_guild_reqalliance_post ) { + if (HPMHooks.count.HP_clif_guild_reqalliance_post > 0) { 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++ ) { + 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); } @@ -14645,14 +14671,14 @@ void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, cons } void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_allianceack_pre ) { + if (HPMHooks.count.HP_clif_guild_allianceack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14660,9 +14686,9 @@ void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.guild_allianceack(sd, flag); } - if( HPMHooks.count.HP_clif_guild_allianceack_post ) { + if (HPMHooks.count.HP_clif_guild_allianceack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_post; hIndex++ ) { + 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); } @@ -14671,14 +14697,14 @@ void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_guild_delalliance_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14686,9 +14712,9 @@ void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int fl { HPMHooks.source.clif.guild_delalliance(sd, guild_id, flag); } - if( HPMHooks.count.HP_clif_guild_delalliance_post ) { + if (HPMHooks.count.HP_clif_guild_delalliance_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int guild_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_post; hIndex++ ) { + 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); } @@ -14697,14 +14723,14 @@ void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int fl } void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_oppositionack_pre ) { + if (HPMHooks.count.HP_clif_guild_oppositionack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14712,9 +14738,9 @@ void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.guild_oppositionack(sd, flag); } - if( HPMHooks.count.HP_clif_guild_oppositionack_post ) { + if (HPMHooks.count.HP_clif_guild_oppositionack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_post; hIndex++ ) { + 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); } @@ -14723,14 +14749,14 @@ void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) { } void HP_clif_guild_broken(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_broken_pre ) { + if (HPMHooks.count.HP_clif_guild_broken_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14738,9 +14764,9 @@ void HP_clif_guild_broken(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.guild_broken(sd, flag); } - if( HPMHooks.count.HP_clif_guild_broken_post ) { + if (HPMHooks.count.HP_clif_guild_broken_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_post; hIndex++ ) { + 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); } @@ -14749,14 +14775,14 @@ void HP_clif_guild_broken(struct map_session_data *sd, int flag) { } void HP_clif_guild_xy(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_xy_pre ) { + if (HPMHooks.count.HP_clif_guild_xy_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14764,9 +14790,9 @@ void HP_clif_guild_xy(struct map_session_data *sd) { { HPMHooks.source.clif.guild_xy(sd); } - if( HPMHooks.count.HP_clif_guild_xy_post ) { + if (HPMHooks.count.HP_clif_guild_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_xy_post[hIndex].func; postHookFunc(sd); } @@ -14775,14 +14801,14 @@ void HP_clif_guild_xy(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_guild_xy_single_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14790,9 +14816,9 @@ void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.guild_xy_single(fd, sd); } - if( HPMHooks.count.HP_clif_guild_xy_single_post ) { + if (HPMHooks.count.HP_clif_guild_xy_single_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_post; hIndex++ ) { + 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); } @@ -14801,14 +14827,14 @@ void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) { } void HP_clif_guild_xy_remove(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_xy_remove_pre ) { + if (HPMHooks.count.HP_clif_guild_xy_remove_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14816,9 +14842,9 @@ void HP_clif_guild_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.guild_xy_remove(sd); } - if( HPMHooks.count.HP_clif_guild_xy_remove_post ) { + if (HPMHooks.count.HP_clif_guild_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_post; hIndex++ ) { + 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); } @@ -14827,14 +14853,14 @@ void HP_clif_guild_xy_remove(struct map_session_data *sd) { } void HP_clif_guild_positionnamelist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_positionnamelist_pre ) { + if (HPMHooks.count.HP_clif_guild_positionnamelist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14842,9 +14868,9 @@ void HP_clif_guild_positionnamelist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_positionnamelist(sd); } - if( HPMHooks.count.HP_clif_guild_positionnamelist_post ) { + if (HPMHooks.count.HP_clif_guild_positionnamelist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_post[hIndex].func; postHookFunc(sd); } @@ -14853,14 +14879,14 @@ void HP_clif_guild_positionnamelist(struct map_session_data *sd) { } void HP_clif_guild_positioninfolist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_positioninfolist_pre ) { + if (HPMHooks.count.HP_clif_guild_positioninfolist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14868,9 +14894,9 @@ void HP_clif_guild_positioninfolist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_positioninfolist(sd); } - if( HPMHooks.count.HP_clif_guild_positioninfolist_post ) { + if (HPMHooks.count.HP_clif_guild_positioninfolist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_post[hIndex].func; postHookFunc(sd); } @@ -14879,14 +14905,14 @@ void HP_clif_guild_positioninfolist(struct map_session_data *sd) { } void HP_clif_guild_expulsionlist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_guild_expulsionlist_pre ) { + if (HPMHooks.count.HP_clif_guild_expulsionlist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14894,9 +14920,9 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_expulsionlist(sd); } - if( HPMHooks.count.HP_clif_guild_expulsionlist_post ) { + if (HPMHooks.count.HP_clif_guild_expulsionlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_post[hIndex].func; postHookFunc(sd); } @@ -14906,14 +14932,14 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) { bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_validate_emblem_pre ) { + if (HPMHooks.count.HP_clif_validate_emblem_pre > 0) { bool (*preHookFunc) (const uint8 **emblem, unsigned long *emblem_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14921,9 +14947,9 @@ bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { { retVal___ = HPMHooks.source.clif.validate_emblem(emblem, emblem_len); } - if( HPMHooks.count.HP_clif_validate_emblem_post ) { + if (HPMHooks.count.HP_clif_validate_emblem_post > 0) { bool (*postHookFunc) (bool retVal___, const uint8 *emblem, unsigned long emblem_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_post; hIndex++ ) { + 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); } @@ -14932,14 +14958,14 @@ bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { } void HP_clif_bg_hp(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_hp_pre ) { + if (HPMHooks.count.HP_clif_bg_hp_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14947,9 +14973,9 @@ void HP_clif_bg_hp(struct map_session_data *sd) { { HPMHooks.source.clif.bg_hp(sd); } - if( HPMHooks.count.HP_clif_bg_hp_post ) { + if (HPMHooks.count.HP_clif_bg_hp_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bg_hp_post[hIndex].func; postHookFunc(sd); } @@ -14958,14 +14984,14 @@ void HP_clif_bg_hp(struct map_session_data *sd) { } void HP_clif_bg_xy(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_xy_pre ) { + if (HPMHooks.count.HP_clif_bg_xy_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14973,9 +14999,9 @@ void HP_clif_bg_xy(struct map_session_data *sd) { { HPMHooks.source.clif.bg_xy(sd); } - if( HPMHooks.count.HP_clif_bg_xy_post ) { + if (HPMHooks.count.HP_clif_bg_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bg_xy_post[hIndex].func; postHookFunc(sd); } @@ -14984,14 +15010,14 @@ void HP_clif_bg_xy(struct map_session_data *sd) { } void HP_clif_bg_xy_remove(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_xy_remove_pre ) { + if (HPMHooks.count.HP_clif_bg_xy_remove_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14999,9 +15025,9 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.bg_xy_remove(sd); } - if( HPMHooks.count.HP_clif_bg_xy_remove_post ) { + if (HPMHooks.count.HP_clif_bg_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_post; hIndex++ ) { + 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); } @@ -15010,14 +15036,14 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) { } void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_message_pre ) { + if (HPMHooks.count.HP_clif_bg_message_pre > 0) { void (*preHookFunc) (struct battleground_data **bgd, int *src_id, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15025,9 +15051,9 @@ void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *n { HPMHooks.source.clif.bg_message(bgd, src_id, name, mes); } - if( HPMHooks.count.HP_clif_bg_message_post ) { + if (HPMHooks.count.HP_clif_bg_message_post > 0) { void (*postHookFunc) (struct battleground_data *bgd, int src_id, const char *name, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_post; hIndex++ ) { + 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); } @@ -15036,14 +15062,14 @@ void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *n } void HP_clif_bg_updatescore(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_updatescore_pre ) { + if (HPMHooks.count.HP_clif_bg_updatescore_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15051,9 +15077,9 @@ void HP_clif_bg_updatescore(int16 m) { { HPMHooks.source.clif.bg_updatescore(m); } - if( HPMHooks.count.HP_clif_bg_updatescore_post ) { + if (HPMHooks.count.HP_clif_bg_updatescore_post > 0) { void (*postHookFunc) (int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bg_updatescore_post[hIndex].func; postHookFunc(m); } @@ -15062,14 +15088,14 @@ void HP_clif_bg_updatescore(int16 m) { } void HP_clif_bg_updatescore_single(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_updatescore_single_pre ) { + if (HPMHooks.count.HP_clif_bg_updatescore_single_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15077,9 +15103,9 @@ void HP_clif_bg_updatescore_single(struct map_session_data *sd) { { HPMHooks.source.clif.bg_updatescore_single(sd); } - if( HPMHooks.count.HP_clif_bg_updatescore_single_post ) { + if (HPMHooks.count.HP_clif_bg_updatescore_single_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_post; hIndex++ ) { + 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); } @@ -15088,14 +15114,14 @@ void HP_clif_bg_updatescore_single(struct map_session_data *sd) { } void HP_clif_sendbgemblem_area(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendbgemblem_area_pre ) { + if (HPMHooks.count.HP_clif_sendbgemblem_area_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15103,9 +15129,9 @@ void HP_clif_sendbgemblem_area(struct map_session_data *sd) { { HPMHooks.source.clif.sendbgemblem_area(sd); } - if( HPMHooks.count.HP_clif_sendbgemblem_area_post ) { + if (HPMHooks.count.HP_clif_sendbgemblem_area_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_post[hIndex].func; postHookFunc(sd); } @@ -15114,14 +15140,14 @@ void HP_clif_sendbgemblem_area(struct map_session_data *sd) { } void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendbgemblem_single_pre ) { + if (HPMHooks.count.HP_clif_sendbgemblem_single_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15129,9 +15155,9 @@ void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.sendbgemblem_single(fd, sd); } - if( HPMHooks.count.HP_clif_sendbgemblem_single_post ) { + if (HPMHooks.count.HP_clif_sendbgemblem_single_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_post; hIndex++ ) { + 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); } @@ -15141,14 +15167,14 @@ void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { int HP_clif_instance(int instance_id, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_instance_pre ) { + if (HPMHooks.count.HP_clif_instance_pre > 0) { int (*preHookFunc) (int *instance_id, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15156,9 +15182,9 @@ int HP_clif_instance(int instance_id, int type, int flag) { { retVal___ = HPMHooks.source.clif.instance(instance_id, type, flag); } - if( HPMHooks.count.HP_clif_instance_post ) { + if (HPMHooks.count.HP_clif_instance_post > 0) { int (*postHookFunc) (int retVal___, int instance_id, int type, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_post; hIndex++ ) { + 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); } @@ -15167,14 +15193,14 @@ int HP_clif_instance(int instance_id, int type, int flag) { } void HP_clif_instance_join(int fd, int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_instance_join_pre ) { + if (HPMHooks.count.HP_clif_instance_join_pre > 0) { void (*preHookFunc) (int *fd, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15182,9 +15208,9 @@ void HP_clif_instance_join(int fd, int instance_id) { { HPMHooks.source.clif.instance_join(fd, instance_id); } - if( HPMHooks.count.HP_clif_instance_join_post ) { + if (HPMHooks.count.HP_clif_instance_join_post > 0) { void (*postHookFunc) (int fd, int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_post; hIndex++ ) { + 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); } @@ -15193,14 +15219,14 @@ void HP_clif_instance_join(int fd, int instance_id) { } void HP_clif_instance_leave(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_instance_leave_pre ) { + if (HPMHooks.count.HP_clif_instance_leave_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15208,9 +15234,9 @@ void HP_clif_instance_leave(int fd) { { HPMHooks.source.clif.instance_leave(fd); } - if( HPMHooks.count.HP_clif_instance_leave_post ) { + if (HPMHooks.count.HP_clif_instance_leave_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_instance_leave_post[hIndex].func; postHookFunc(fd); } @@ -15219,14 +15245,14 @@ void HP_clif_instance_leave(int fd) { } void HP_clif_catch_process(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_catch_process_pre ) { + if (HPMHooks.count.HP_clif_catch_process_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15234,9 +15260,9 @@ void HP_clif_catch_process(struct map_session_data *sd) { { HPMHooks.source.clif.catch_process(sd); } - if( HPMHooks.count.HP_clif_catch_process_post ) { + if (HPMHooks.count.HP_clif_catch_process_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_catch_process_post[hIndex].func; postHookFunc(sd); } @@ -15245,14 +15271,14 @@ void HP_clif_catch_process(struct map_session_data *sd) { } void HP_clif_pet_roulette(struct map_session_data *sd, int data) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pet_roulette_pre ) { + if (HPMHooks.count.HP_clif_pet_roulette_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15260,9 +15286,9 @@ void HP_clif_pet_roulette(struct map_session_data *sd, int data) { { HPMHooks.source.clif.pet_roulette(sd, data); } - if( HPMHooks.count.HP_clif_pet_roulette_post ) { + if (HPMHooks.count.HP_clif_pet_roulette_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_post; hIndex++ ) { + 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); } @@ -15271,14 +15297,14 @@ void HP_clif_pet_roulette(struct map_session_data *sd, int data) { } void HP_clif_sendegg(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendegg_pre ) { + if (HPMHooks.count.HP_clif_sendegg_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15286,9 +15312,9 @@ void HP_clif_sendegg(struct map_session_data *sd) { { HPMHooks.source.clif.sendegg(sd); } - if( HPMHooks.count.HP_clif_sendegg_post ) { + if (HPMHooks.count.HP_clif_sendegg_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendegg_post[hIndex].func; postHookFunc(sd); } @@ -15297,14 +15323,14 @@ void HP_clif_sendegg(struct map_session_data *sd) { } void HP_clif_send_petstatus(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_send_petstatus_pre ) { + if (HPMHooks.count.HP_clif_send_petstatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15312,9 +15338,9 @@ void HP_clif_send_petstatus(struct map_session_data *sd) { { HPMHooks.source.clif.send_petstatus(sd); } - if( HPMHooks.count.HP_clif_send_petstatus_post ) { + if (HPMHooks.count.HP_clif_send_petstatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_send_petstatus_post[hIndex].func; postHookFunc(sd); } @@ -15323,14 +15349,14 @@ void HP_clif_send_petstatus(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_send_petdata_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd, int *type, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_pre; hIndex++ ) { + 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, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15338,9 +15364,9 @@ void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int { HPMHooks.source.clif.send_petdata(sd, pd, type, param); } - if( HPMHooks.count.HP_clif_send_petdata_post ) { + if (HPMHooks.count.HP_clif_send_petdata_post > 0) { 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++ ) { + 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); } @@ -15349,14 +15375,14 @@ void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int } void HP_clif_pet_emotion(struct pet_data *pd, int param) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pet_emotion_pre ) { + if (HPMHooks.count.HP_clif_pet_emotion_pre > 0) { void (*preHookFunc) (struct pet_data **pd, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pet_emotion_pre[hIndex].func; preHookFunc(&pd, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15364,9 +15390,9 @@ void HP_clif_pet_emotion(struct pet_data *pd, int param) { { HPMHooks.source.clif.pet_emotion(pd, param); } - if( HPMHooks.count.HP_clif_pet_emotion_post ) { + if (HPMHooks.count.HP_clif_pet_emotion_post > 0) { void (*postHookFunc) (struct pet_data *pd, int param); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_post; hIndex++ ) { + 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); } @@ -15375,14 +15401,14 @@ void HP_clif_pet_emotion(struct pet_data *pd, int param) { } 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 ) { + if (HPMHooks.count.HP_clif_pet_food_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *foodid, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15390,9 +15416,9 @@ void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) { { HPMHooks.source.clif.pet_food(sd, foodid, fail); } - if( HPMHooks.count.HP_clif_pet_food_post ) { + if (HPMHooks.count.HP_clif_pet_food_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int foodid, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_post; hIndex++ ) { + 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); } @@ -15402,16 +15428,16 @@ void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) { int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_friendslist_toggle_sub_pre ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15421,9 +15447,9 @@ int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.clif.friendslist_toggle_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_friendslist_toggle_sub_post ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_sub_post > 0) { 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++ ) { + 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); @@ -15434,14 +15460,14 @@ int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { } void HP_clif_friendslist_send(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_friendslist_send_pre ) { + if (HPMHooks.count.HP_clif_friendslist_send_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15449,9 +15475,9 @@ void HP_clif_friendslist_send(struct map_session_data *sd) { { HPMHooks.source.clif.friendslist_send(sd); } - if( HPMHooks.count.HP_clif_friendslist_send_post ) { + if (HPMHooks.count.HP_clif_friendslist_send_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_friendslist_send_post[hIndex].func; postHookFunc(sd); } @@ -15460,14 +15486,14 @@ void HP_clif_friendslist_send(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_friendslist_reqack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **f_sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15475,9 +15501,9 @@ void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_ { HPMHooks.source.clif.friendslist_reqack(sd, f_sd, type); } - if( HPMHooks.count.HP_clif_friendslist_reqack_post ) { + if (HPMHooks.count.HP_clif_friendslist_reqack_post > 0) { 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++ ) { + 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); } @@ -15486,14 +15512,14 @@ void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_ } 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 ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15501,9 +15527,9 @@ void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int { HPMHooks.source.clif.friendslist_toggle(sd, account_id, char_id, online); } - if( HPMHooks.count.HP_clif_friendslist_toggle_post ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_post > 0) { 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++ ) { + 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); } @@ -15512,14 +15538,14 @@ void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int } 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 ) { + if (HPMHooks.count.HP_clif_friendlist_req_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15527,9 +15553,9 @@ void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int cha { HPMHooks.source.clif.friendlist_req(sd, account_id, char_id, name); } - if( HPMHooks.count.HP_clif_friendlist_req_post ) { + if (HPMHooks.count.HP_clif_friendlist_req_post > 0) { 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++ ) { + 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); } @@ -15538,14 +15564,14 @@ void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int cha } void HP_clif_GM_kickack(struct map_session_data *sd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_GM_kickack_pre ) { + if (HPMHooks.count.HP_clif_GM_kickack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_GM_kickack_pre[hIndex].func; preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15553,9 +15579,9 @@ void HP_clif_GM_kickack(struct map_session_data *sd, int result) { { HPMHooks.source.clif.GM_kickack(sd, result); } - if( HPMHooks.count.HP_clif_GM_kickack_post ) { + if (HPMHooks.count.HP_clif_GM_kickack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_GM_kickack_post[hIndex].func; postHookFunc(sd, result); } @@ -15564,14 +15590,14 @@ void HP_clif_GM_kickack(struct map_session_data *sd, int result) { } 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 ) { + if (HPMHooks.count.HP_clif_GM_kick_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15579,9 +15605,9 @@ void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) { HPMHooks.source.clif.GM_kick(sd, tsd); } - if( HPMHooks.count.HP_clif_GM_kick_post ) { + if (HPMHooks.count.HP_clif_GM_kick_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_post; hIndex++ ) { + 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); } @@ -15590,14 +15616,14 @@ void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) } void HP_clif_manner_message(struct map_session_data *sd, uint32 type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_manner_message_pre ) { + if (HPMHooks.count.HP_clif_manner_message_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint32 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15605,9 +15631,9 @@ void HP_clif_manner_message(struct map_session_data *sd, uint32 type) { { HPMHooks.source.clif.manner_message(sd, type); } - if( HPMHooks.count.HP_clif_manner_message_post ) { + if (HPMHooks.count.HP_clif_manner_message_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint32 type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_post; hIndex++ ) { + 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); } @@ -15616,14 +15642,14 @@ void HP_clif_manner_message(struct map_session_data *sd, uint32 type) { } 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 ) { + if (HPMHooks.count.HP_clif_GM_silence_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd, uint8 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15631,9 +15657,9 @@ void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *ts { HPMHooks.source.clif.GM_silence(sd, tsd, type); } - if( HPMHooks.count.HP_clif_GM_silence_post ) { + if (HPMHooks.count.HP_clif_GM_silence_post > 0) { 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++ ) { + 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); } @@ -15642,14 +15668,14 @@ void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *ts } 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 ) { + if (HPMHooks.count.HP_clif_account_name_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **accname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15657,9 +15683,9 @@ void HP_clif_account_name(struct map_session_data *sd, int account_id, const cha { HPMHooks.source.clif.account_name(sd, account_id, accname); } - if( HPMHooks.count.HP_clif_account_name_post ) { + if (HPMHooks.count.HP_clif_account_name_post > 0) { 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++ ) { + 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); } @@ -15668,14 +15694,14 @@ void HP_clif_account_name(struct map_session_data *sd, int account_id, const cha } void HP_clif_check(int fd, struct map_session_data *pl_sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_check_pre ) { + if (HPMHooks.count.HP_clif_check_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15683,9 +15709,9 @@ void HP_clif_check(int fd, struct map_session_data *pl_sd) { { HPMHooks.source.clif.check(fd, pl_sd); } - if( HPMHooks.count.HP_clif_check_post ) { + if (HPMHooks.count.HP_clif_check_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *pl_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_check_post[hIndex].func; postHookFunc(fd, pl_sd); } @@ -15694,14 +15720,14 @@ void HP_clif_check(int fd, struct map_session_data *pl_sd) { } 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 ) { + if (HPMHooks.count.HP_clif_hominfo_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct homun_data **hd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15709,9 +15735,9 @@ void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int fla { HPMHooks.source.clif.hominfo(sd, hd, flag); } - if( HPMHooks.count.HP_clif_hominfo_post ) { + if (HPMHooks.count.HP_clif_hominfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct homun_data *hd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hominfo_post[hIndex].func; postHookFunc(sd, hd, flag); } @@ -15720,14 +15746,14 @@ void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int fla } void HP_clif_homskillinfoblock(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) { + if (HPMHooks.count.HP_clif_homskillinfoblock_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15735,9 +15761,9 @@ void HP_clif_homskillinfoblock(struct map_session_data *sd) { { HPMHooks.source.clif.homskillinfoblock(sd); } - if( HPMHooks.count.HP_clif_homskillinfoblock_post ) { + if (HPMHooks.count.HP_clif_homskillinfoblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_post[hIndex].func; postHookFunc(sd); } @@ -15746,14 +15772,14 @@ void HP_clif_homskillinfoblock(struct map_session_data *sd) { } void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_homskillup_pre ) { + if (HPMHooks.count.HP_clif_homskillup_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15761,9 +15787,9 @@ void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { { HPMHooks.source.clif.homskillup(sd, skill_id); } - if( HPMHooks.count.HP_clif_homskillup_post ) { + if (HPMHooks.count.HP_clif_homskillup_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_homskillup_post[hIndex].func; postHookFunc(sd, skill_id); } @@ -15772,14 +15798,14 @@ void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { } void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_hom_food_pre ) { + if (HPMHooks.count.HP_clif_hom_food_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *foodid, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func; preHookFunc(&sd, &foodid, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15787,9 +15813,9 @@ void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { { HPMHooks.source.clif.hom_food(sd, foodid, fail); } - if( HPMHooks.count.HP_clif_hom_food_post ) { + if (HPMHooks.count.HP_clif_hom_food_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int foodid, int fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hom_food_post[hIndex].func; postHookFunc(sd, foodid, fail); } @@ -15798,14 +15824,14 @@ void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { } 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 ) { + if (HPMHooks.count.HP_clif_send_homdata_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *state, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_pre; hIndex++ ) { + 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, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15813,9 +15839,9 @@ void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) { { HPMHooks.source.clif.send_homdata(sd, state, param); } - if( HPMHooks.count.HP_clif_send_homdata_post ) { + if (HPMHooks.count.HP_clif_send_homdata_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int state, int param); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_post; hIndex++ ) { + 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); } @@ -15824,14 +15850,14 @@ void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) { } void HP_clif_quest_send_list(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_send_list_pre ) { + if (HPMHooks.count.HP_clif_quest_send_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15839,9 +15865,9 @@ void HP_clif_quest_send_list(struct map_session_data *sd) { { HPMHooks.source.clif.quest_send_list(sd); } - if( HPMHooks.count.HP_clif_quest_send_list_post ) { + if (HPMHooks.count.HP_clif_quest_send_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_post; hIndex++ ) { + 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); } @@ -15850,14 +15876,14 @@ void HP_clif_quest_send_list(struct map_session_data *sd) { } void HP_clif_quest_send_mission(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_send_mission_pre ) { + if (HPMHooks.count.HP_clif_quest_send_mission_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15865,9 +15891,9 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) { { HPMHooks.source.clif.quest_send_mission(sd); } - if( HPMHooks.count.HP_clif_quest_send_mission_post ) { + if (HPMHooks.count.HP_clif_quest_send_mission_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_post; hIndex++ ) { + 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); } @@ -15876,14 +15902,14 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) { } void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_add_pre ) { + if (HPMHooks.count.HP_clif_quest_add_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15891,9 +15917,9 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { { HPMHooks.source.clif.quest_add(sd, qd); } - if( HPMHooks.count.HP_clif_quest_add_post ) { + if (HPMHooks.count.HP_clif_quest_add_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_post; hIndex++ ) { + 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); } @@ -15902,14 +15928,14 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { } void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_delete_pre ) { + if (HPMHooks.count.HP_clif_quest_delete_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15917,9 +15943,9 @@ void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) { { HPMHooks.source.clif.quest_delete(sd, quest_id); } - if( HPMHooks.count.HP_clif_quest_delete_post ) { + if (HPMHooks.count.HP_clif_quest_delete_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_post; hIndex++ ) { + 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); } @@ -15928,14 +15954,14 @@ void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) { } 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 ) { + if (HPMHooks.count.HP_clif_quest_update_status_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *quest_id, bool *active); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15943,9 +15969,9 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool { HPMHooks.source.clif.quest_update_status(sd, quest_id, active); } - if( HPMHooks.count.HP_clif_quest_update_status_post ) { + if (HPMHooks.count.HP_clif_quest_update_status_post > 0) { 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++ ) { + 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); } @@ -15954,14 +15980,14 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool } void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_update_objective_pre ) { + if (HPMHooks.count.HP_clif_quest_update_objective_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15969,9 +15995,9 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q { HPMHooks.source.clif.quest_update_objective(sd, qd); } - if( HPMHooks.count.HP_clif_quest_update_objective_post ) { + if (HPMHooks.count.HP_clif_quest_update_objective_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_post; hIndex++ ) { + 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); } @@ -15980,14 +16006,14 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q } 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 ) { + if (HPMHooks.count.HP_clif_quest_show_event_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, short *state, short *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15995,9 +16021,9 @@ void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl { HPMHooks.source.clif.quest_show_event(sd, bl, state, color); } - if( HPMHooks.count.HP_clif_quest_show_event_post ) { + if (HPMHooks.count.HP_clif_quest_show_event_post > 0) { 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++ ) { + 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); } @@ -16006,14 +16032,14 @@ void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl } void HP_clif_mail_window(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_window_pre ) { + if (HPMHooks.count.HP_clif_mail_window_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16021,9 +16047,9 @@ void HP_clif_mail_window(int fd, int flag) { { HPMHooks.source.clif.mail_window(fd, flag); } - if( HPMHooks.count.HP_clif_mail_window_post ) { + if (HPMHooks.count.HP_clif_mail_window_post > 0) { void (*postHookFunc) (int fd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_post; hIndex++ ) { + 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); } @@ -16032,14 +16058,14 @@ void HP_clif_mail_window(int fd, int flag) { } void HP_clif_mail_read(struct map_session_data *sd, int mail_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_read_pre ) { + if (HPMHooks.count.HP_clif_mail_read_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16047,9 +16073,9 @@ void HP_clif_mail_read(struct map_session_data *sd, int mail_id) { { HPMHooks.source.clif.mail_read(sd, mail_id); } - if( HPMHooks.count.HP_clif_mail_read_post ) { + if (HPMHooks.count.HP_clif_mail_read_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_post; hIndex++ ) { + 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); } @@ -16058,14 +16084,14 @@ void HP_clif_mail_read(struct map_session_data *sd, int mail_id) { } void HP_clif_mail_delete(int fd, int mail_id, short fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_delete_pre ) { + if (HPMHooks.count.HP_clif_mail_delete_pre > 0) { void (*preHookFunc) (int *fd, int *mail_id, short *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16073,9 +16099,9 @@ void HP_clif_mail_delete(int fd, int mail_id, short fail) { { HPMHooks.source.clif.mail_delete(fd, mail_id, fail); } - if( HPMHooks.count.HP_clif_mail_delete_post ) { + if (HPMHooks.count.HP_clif_mail_delete_post > 0) { void (*postHookFunc) (int fd, int mail_id, short fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_post; hIndex++ ) { + 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); } @@ -16084,14 +16110,14 @@ void HP_clif_mail_delete(int fd, int mail_id, short fail) { } void HP_clif_mail_return(int fd, int mail_id, short fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_return_pre ) { + if (HPMHooks.count.HP_clif_mail_return_pre > 0) { void (*preHookFunc) (int *fd, int *mail_id, short *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16099,9 +16125,9 @@ void HP_clif_mail_return(int fd, int mail_id, short fail) { { HPMHooks.source.clif.mail_return(fd, mail_id, fail); } - if( HPMHooks.count.HP_clif_mail_return_post ) { + if (HPMHooks.count.HP_clif_mail_return_post > 0) { void (*postHookFunc) (int fd, int mail_id, short fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_post; hIndex++ ) { + 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); } @@ -16110,14 +16136,14 @@ void HP_clif_mail_return(int fd, int mail_id, short fail) { } void HP_clif_mail_send(int fd, bool fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_send_pre ) { + if (HPMHooks.count.HP_clif_mail_send_pre > 0) { void (*preHookFunc) (int *fd, bool *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16125,9 +16151,9 @@ void HP_clif_mail_send(int fd, bool fail) { { HPMHooks.source.clif.mail_send(fd, fail); } - if( HPMHooks.count.HP_clif_mail_send_post ) { + if (HPMHooks.count.HP_clif_mail_send_post > 0) { void (*postHookFunc) (int fd, bool fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_post; hIndex++ ) { + 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); } @@ -16136,14 +16162,14 @@ void HP_clif_mail_send(int fd, bool fail) { } 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 ) { + if (HPMHooks.count.HP_clif_mail_new_pre > 0) { void (*preHookFunc) (int *fd, int *mail_id, const char **sender, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16151,9 +16177,9 @@ void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title { HPMHooks.source.clif.mail_new(fd, mail_id, sender, title); } - if( HPMHooks.count.HP_clif_mail_new_post ) { + if (HPMHooks.count.HP_clif_mail_new_post > 0) { 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++ ) { + 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); } @@ -16162,14 +16188,14 @@ void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title } void HP_clif_mail_refreshinbox(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_refreshinbox_pre ) { + if (HPMHooks.count.HP_clif_mail_refreshinbox_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16177,9 +16203,9 @@ void HP_clif_mail_refreshinbox(struct map_session_data *sd) { { HPMHooks.source.clif.mail_refreshinbox(sd); } - if( HPMHooks.count.HP_clif_mail_refreshinbox_post ) { + if (HPMHooks.count.HP_clif_mail_refreshinbox_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_post[hIndex].func; postHookFunc(sd); } @@ -16188,14 +16214,14 @@ void HP_clif_mail_refreshinbox(struct map_session_data *sd) { } void HP_clif_mail_getattachment(int fd, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_getattachment_pre ) { + if (HPMHooks.count.HP_clif_mail_getattachment_pre > 0) { void (*preHookFunc) (int *fd, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16203,9 +16229,9 @@ void HP_clif_mail_getattachment(int fd, uint8 flag) { { HPMHooks.source.clif.mail_getattachment(fd, flag); } - if( HPMHooks.count.HP_clif_mail_getattachment_post ) { + if (HPMHooks.count.HP_clif_mail_getattachment_post > 0) { void (*postHookFunc) (int fd, uint8 flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_post; hIndex++ ) { + 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); } @@ -16214,14 +16240,14 @@ void HP_clif_mail_getattachment(int fd, uint8 flag) { } void HP_clif_mail_setattachment(int fd, int index, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_setattachment_pre ) { + if (HPMHooks.count.HP_clif_mail_setattachment_pre > 0) { void (*preHookFunc) (int *fd, int *index, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16229,9 +16255,9 @@ void HP_clif_mail_setattachment(int fd, int index, uint8 flag) { { HPMHooks.source.clif.mail_setattachment(fd, index, flag); } - if( HPMHooks.count.HP_clif_mail_setattachment_post ) { + if (HPMHooks.count.HP_clif_mail_setattachment_post > 0) { void (*postHookFunc) (int fd, int index, uint8 flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_post; hIndex++ ) { + 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); } @@ -16240,14 +16266,14 @@ void HP_clif_mail_setattachment(int fd, int index, uint8 flag) { } void HP_clif_auction_openwindow(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_openwindow_pre ) { + if (HPMHooks.count.HP_clif_auction_openwindow_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16255,9 +16281,9 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) { { HPMHooks.source.clif.auction_openwindow(sd); } - if( HPMHooks.count.HP_clif_auction_openwindow_post ) { + if (HPMHooks.count.HP_clif_auction_openwindow_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_auction_openwindow_post[hIndex].func; postHookFunc(sd); } @@ -16266,14 +16292,14 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) { } void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, const uint8 *buf) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_results_pre ) { + if (HPMHooks.count.HP_clif_auction_results_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *count, short *pages, const uint8 **buf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16281,9 +16307,9 @@ void HP_clif_auction_results(struct map_session_data *sd, short count, short pag { HPMHooks.source.clif.auction_results(sd, count, pages, buf); } - if( HPMHooks.count.HP_clif_auction_results_post ) { + if (HPMHooks.count.HP_clif_auction_results_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short count, short pages, const uint8 *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_post; hIndex++ ) { + 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); } @@ -16292,14 +16318,14 @@ void HP_clif_auction_results(struct map_session_data *sd, short count, short pag } void HP_clif_auction_message(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_message_pre ) { + if (HPMHooks.count.HP_clif_auction_message_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16307,9 +16333,9 @@ void HP_clif_auction_message(int fd, unsigned char flag) { { HPMHooks.source.clif.auction_message(fd, flag); } - if( HPMHooks.count.HP_clif_auction_message_post ) { + if (HPMHooks.count.HP_clif_auction_message_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_post; hIndex++ ) { + 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); } @@ -16318,14 +16344,14 @@ void HP_clif_auction_message(int fd, unsigned char flag) { } void HP_clif_auction_close(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_close_pre ) { + if (HPMHooks.count.HP_clif_auction_close_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16333,9 +16359,9 @@ void HP_clif_auction_close(int fd, unsigned char flag) { { HPMHooks.source.clif.auction_close(fd, flag); } - if( HPMHooks.count.HP_clif_auction_close_post ) { + if (HPMHooks.count.HP_clif_auction_close_post > 0) { void (*postHookFunc) (int fd, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_post; hIndex++ ) { + 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); } @@ -16344,14 +16370,14 @@ void HP_clif_auction_close(int fd, unsigned char flag) { } void HP_clif_auction_setitem(int fd, int index, bool fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_setitem_pre ) { + if (HPMHooks.count.HP_clif_auction_setitem_pre > 0) { void (*preHookFunc) (int *fd, int *index, bool *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16359,9 +16385,9 @@ void HP_clif_auction_setitem(int fd, int index, bool fail) { { HPMHooks.source.clif.auction_setitem(fd, index, fail); } - if( HPMHooks.count.HP_clif_auction_setitem_post ) { + if (HPMHooks.count.HP_clif_auction_setitem_post > 0) { void (*postHookFunc) (int fd, int index, bool fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_post; hIndex++ ) { + 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); } @@ -16370,14 +16396,14 @@ void HP_clif_auction_setitem(int fd, int index, bool fail) { } void HP_clif_mercenary_info(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mercenary_info_pre ) { + if (HPMHooks.count.HP_clif_mercenary_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16385,9 +16411,9 @@ void HP_clif_mercenary_info(struct map_session_data *sd) { { HPMHooks.source.clif.mercenary_info(sd); } - if( HPMHooks.count.HP_clif_mercenary_info_post ) { + if (HPMHooks.count.HP_clif_mercenary_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mercenary_info_post[hIndex].func; postHookFunc(sd); } @@ -16396,14 +16422,14 @@ void HP_clif_mercenary_info(struct map_session_data *sd) { } void HP_clif_mercenary_skillblock(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mercenary_skillblock_pre ) { + if (HPMHooks.count.HP_clif_mercenary_skillblock_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16411,9 +16437,9 @@ void HP_clif_mercenary_skillblock(struct map_session_data *sd) { { HPMHooks.source.clif.mercenary_skillblock(sd); } - if( HPMHooks.count.HP_clif_mercenary_skillblock_post ) { + if (HPMHooks.count.HP_clif_mercenary_skillblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_post[hIndex].func; postHookFunc(sd); } @@ -16422,14 +16448,14 @@ void HP_clif_mercenary_skillblock(struct map_session_data *sd) { } void HP_clif_mercenary_message(struct map_session_data *sd, int message) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mercenary_message_pre ) { + if (HPMHooks.count.HP_clif_mercenary_message_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16437,9 +16463,9 @@ void HP_clif_mercenary_message(struct map_session_data *sd, int message) { { HPMHooks.source.clif.mercenary_message(sd, message); } - if( HPMHooks.count.HP_clif_mercenary_message_post ) { + if (HPMHooks.count.HP_clif_mercenary_message_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_post; hIndex++ ) { + 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); } @@ -16448,14 +16474,14 @@ void HP_clif_mercenary_message(struct map_session_data *sd, int message) { } void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mercenary_updatestatus_pre ) { + if (HPMHooks.count.HP_clif_mercenary_updatestatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16463,9 +16489,9 @@ void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) { { HPMHooks.source.clif.mercenary_updatestatus(sd, type); } - if( HPMHooks.count.HP_clif_mercenary_updatestatus_post ) { + if (HPMHooks.count.HP_clif_mercenary_updatestatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_post; hIndex++ ) { + 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); } @@ -16474,14 +16500,14 @@ void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) { } void HP_clif_rental_time(int fd, int nameid, int seconds) { int hIndex = 0; - if( HPMHooks.count.HP_clif_rental_time_pre ) { + if (HPMHooks.count.HP_clif_rental_time_pre > 0) { void (*preHookFunc) (int *fd, int *nameid, int *seconds); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16489,9 +16515,9 @@ void HP_clif_rental_time(int fd, int nameid, int seconds) { { HPMHooks.source.clif.rental_time(fd, nameid, seconds); } - if( HPMHooks.count.HP_clif_rental_time_post ) { + if (HPMHooks.count.HP_clif_rental_time_post > 0) { void (*postHookFunc) (int fd, int nameid, int seconds); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_post; hIndex++ ) { + 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); } @@ -16500,14 +16526,14 @@ void HP_clif_rental_time(int fd, int nameid, int seconds) { } void HP_clif_rental_expired(int fd, int index, int nameid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_rental_expired_pre ) { + if (HPMHooks.count.HP_clif_rental_expired_pre > 0) { void (*preHookFunc) (int *fd, int *index, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16515,9 +16541,9 @@ void HP_clif_rental_expired(int fd, int index, int nameid) { { HPMHooks.source.clif.rental_expired(fd, index, nameid); } - if( HPMHooks.count.HP_clif_rental_expired_post ) { + if (HPMHooks.count.HP_clif_rental_expired_post > 0) { void (*postHookFunc) (int fd, int index, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_post; hIndex++ ) { + 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); } @@ -16526,14 +16552,14 @@ void HP_clif_rental_expired(int fd, int index, int nameid) { } void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16541,9 +16567,9 @@ void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyBookingRegisterAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyBookingRegisterAck_post ) { + if (HPMHooks.count.HP_clif_PartyBookingRegisterAck_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_post[hIndex].func; postHookFunc(sd, flag); } @@ -16552,14 +16578,14 @@ void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { } void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16567,9 +16593,9 @@ void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyBookingDeleteAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyBookingDeleteAck_post ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteAck_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_post[hIndex].func; postHookFunc(sd, flag); } @@ -16578,14 +16604,14 @@ void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_PartyBookingSearchAck_pre > 0) { void (*preHookFunc) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16593,9 +16619,9 @@ void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **result { HPMHooks.source.clif.PartyBookingSearchAck(fd, results, count, more_result); } - if( HPMHooks.count.HP_clif_PartyBookingSearchAck_post ) { + if (HPMHooks.count.HP_clif_PartyBookingSearchAck_post > 0) { 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++ ) { + 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); } @@ -16604,14 +16630,14 @@ void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **result } 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 ) { + if (HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16619,9 +16645,9 @@ void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyBookingUpdateNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post ) { + if (HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16630,14 +16656,14 @@ void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16645,9 +16671,9 @@ void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) { { HPMHooks.source.clif.PartyBookingDeleteNotify(sd, index); } - if( HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_post[hIndex].func; postHookFunc(sd, index); } @@ -16656,14 +16682,14 @@ void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) { } 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 ) { + if (HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16671,9 +16697,9 @@ void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyBookingInsertNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_post ) { + if (HPMHooks.count.HP_clif_PartyBookingInsertNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16682,14 +16708,14 @@ void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre ) { + if (HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16697,9 +16723,9 @@ void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyRecruitRegisterAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_post[hIndex].func; postHookFunc(sd, flag); } @@ -16708,14 +16734,14 @@ void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { } void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16723,9 +16749,9 @@ void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyRecruitDeleteAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_post[hIndex].func; postHookFunc(sd, flag); } @@ -16734,14 +16760,14 @@ void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) { } 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 ) { + if (HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre > 0) { void (*preHookFunc) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16749,9 +16775,9 @@ void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **result { HPMHooks.source.clif.PartyRecruitSearchAck(fd, results, count, more_result); } - if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitSearchAck_post > 0) { 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++ ) { + 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); } @@ -16760,14 +16786,14 @@ void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **result } 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 ) { + if (HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16775,9 +16801,9 @@ void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyRecruitUpdateNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16786,14 +16812,14 @@ void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16801,9 +16827,9 @@ void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) { { HPMHooks.source.clif.PartyRecruitDeleteNotify(sd, index); } - if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_post[hIndex].func; postHookFunc(sd, index); } @@ -16812,14 +16838,14 @@ void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) { } 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 ) { + if (HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16827,9 +16853,9 @@ void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyRecruitInsertNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16838,14 +16864,14 @@ void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre > 0) { void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16853,9 +16879,9 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { { HPMHooks.source.clif.PartyBookingVolunteerInfo(index, sd); } - if( HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post ) { + if (HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post > 0) { void (*postHookFunc) (int index, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_post[hIndex].func; postHookFunc(index, sd); } @@ -16864,14 +16890,14 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { } void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre > 0) { void (*preHookFunc) (unsigned int *aid, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16879,9 +16905,9 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_da { HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd); } - if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) { + if (HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post > 0) { void (*postHookFunc) (unsigned int aid, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_post[hIndex].func; postHookFunc(aid, sd); } @@ -16890,14 +16916,14 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_da } void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre > 0) { void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16905,9 +16931,9 @@ void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) { HPMHooks.source.clif.PartyBookingCancelVolunteer(index, sd); } - if( HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post ) { + if (HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post > 0) { void (*postHookFunc) (int index, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_post[hIndex].func; postHookFunc(index, sd); } @@ -16916,14 +16942,14 @@ void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) } void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre > 0) { void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16931,9 +16957,9 @@ void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd { HPMHooks.source.clif.PartyBookingAddFilteringList(index, sd); } - if( HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post ) { + if (HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post > 0) { void (*postHookFunc) (int index, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_post[hIndex].func; postHookFunc(index, sd); } @@ -16942,14 +16968,14 @@ void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd } void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre ) { + if (HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre > 0) { void (*preHookFunc) (int *gid, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16957,9 +16983,9 @@ void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) { HPMHooks.source.clif.PartyBookingSubFilteringList(gid, sd); } - if( HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post ) { + if (HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post > 0) { void (*postHookFunc) (int gid, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_post[hIndex].func; postHookFunc(gid, sd); } @@ -16968,14 +16994,14 @@ void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) } void HP_clif_buyingstore_open(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buyingstore_open_pre ) { + if (HPMHooks.count.HP_clif_buyingstore_open_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16983,9 +17009,9 @@ void HP_clif_buyingstore_open(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_open(sd); } - if( HPMHooks.count.HP_clif_buyingstore_open_post ) { + if (HPMHooks.count.HP_clif_buyingstore_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_post[hIndex].func; postHookFunc(sd); } @@ -16994,14 +17020,14 @@ void HP_clif_buyingstore_open(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_open_failed_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *result, unsigned int *weight); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17009,9 +17035,9 @@ void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short { HPMHooks.source.clif.buyingstore_open_failed(sd, result, weight); } - if( HPMHooks.count.HP_clif_buyingstore_open_failed_post ) { + if (HPMHooks.count.HP_clif_buyingstore_open_failed_post > 0) { 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++ ) { + 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); } @@ -17020,14 +17046,14 @@ void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short } void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buyingstore_myitemlist_pre ) { + if (HPMHooks.count.HP_clif_buyingstore_myitemlist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17035,9 +17061,9 @@ void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_myitemlist(sd); } - if( HPMHooks.count.HP_clif_buyingstore_myitemlist_post ) { + if (HPMHooks.count.HP_clif_buyingstore_myitemlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_post[hIndex].func; postHookFunc(sd); } @@ -17046,14 +17072,14 @@ void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { } void HP_clif_buyingstore_entry(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buyingstore_entry_pre ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17061,9 +17087,9 @@ void HP_clif_buyingstore_entry(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_entry(sd); } - if( HPMHooks.count.HP_clif_buyingstore_entry_post ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_post[hIndex].func; postHookFunc(sd); } @@ -17072,14 +17098,14 @@ void HP_clif_buyingstore_entry(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_single_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17087,9 +17113,9 @@ void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_se { HPMHooks.source.clif.buyingstore_entry_single(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_entry_single_post ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_single_post > 0) { 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++ ) { + 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); } @@ -17098,14 +17124,14 @@ void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_se } void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17113,9 +17139,9 @@ void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_disappear_entry(sd); } - if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_post ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_post; hIndex++ ) { + 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); } @@ -17124,14 +17150,14 @@ void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17139,9 +17165,9 @@ void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, str { HPMHooks.source.clif.buyingstore_disappear_entry_single(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post > 0) { 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++ ) { + 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); } @@ -17150,14 +17176,14 @@ void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, str } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_itemlist_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17165,9 +17191,9 @@ void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_sessio { HPMHooks.source.clif.buyingstore_itemlist(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_itemlist_post ) { + if (HPMHooks.count.HP_clif_buyingstore_itemlist_post > 0) { 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++ ) { + 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); } @@ -17176,14 +17202,14 @@ void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_sessio } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17191,9 +17217,9 @@ void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short r { HPMHooks.source.clif.buyingstore_trade_failed_buyer(sd, result); } - if( HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post; hIndex++ ) { + 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); } @@ -17202,14 +17228,14 @@ void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short r } void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny) { int hIndex = 0; - if( HPMHooks.count.HP_clif_buyingstore_update_item_pre ) { + if (HPMHooks.count.HP_clif_buyingstore_update_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid, unsigned short *amount, uint32 *char_id, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++ ) { + 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, &char_id, &zeny); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17217,9 +17243,9 @@ void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short { HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount, char_id, zeny); } - if( HPMHooks.count.HP_clif_buyingstore_update_item_post ) { + if (HPMHooks.count.HP_clif_buyingstore_update_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_post; hIndex++ ) { + 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, char_id, zeny); } @@ -17228,14 +17254,14 @@ void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_delete_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *index, unsigned short *amount, int *price); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17243,9 +17269,9 @@ void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, u { HPMHooks.source.clif.buyingstore_delete_item(sd, index, amount, price); } - if( HPMHooks.count.HP_clif_buyingstore_delete_item_post ) { + if (HPMHooks.count.HP_clif_buyingstore_delete_item_post > 0) { 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++ ) { + 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); } @@ -17254,14 +17280,14 @@ void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, u } 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 ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *result, unsigned short *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17269,9 +17295,9 @@ void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short { HPMHooks.source.clif.buyingstore_trade_failed_seller(sd, result, nameid); } - if( HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post > 0) { 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++ ) { + 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); } @@ -17280,14 +17306,14 @@ void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short } 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 ) { + if (HPMHooks.count.HP_clif_search_store_info_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17295,9 +17321,9 @@ void HP_clif_search_store_info_ack(struct map_session_data *sd) { { HPMHooks.source.clif.search_store_info_ack(sd); } - if( HPMHooks.count.HP_clif_search_store_info_ack_post ) { + if (HPMHooks.count.HP_clif_search_store_info_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_post; hIndex++ ) { + 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); } @@ -17306,14 +17332,14 @@ void HP_clif_search_store_info_ack(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_search_store_info_failed_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17321,9 +17347,9 @@ void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char { HPMHooks.source.clif.search_store_info_failed(sd, reason); } - if( HPMHooks.count.HP_clif_search_store_info_failed_post ) { + if (HPMHooks.count.HP_clif_search_store_info_failed_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned char reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_post; hIndex++ ) { + 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); } @@ -17332,14 +17358,14 @@ void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char } 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 ) { + if (HPMHooks.count.HP_clif_open_search_store_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17347,9 +17373,9 @@ void HP_clif_open_search_store_info(struct map_session_data *sd) { { HPMHooks.source.clif.open_search_store_info(sd); } - if( HPMHooks.count.HP_clif_open_search_store_info_post ) { + if (HPMHooks.count.HP_clif_open_search_store_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_post; hIndex++ ) { + 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); } @@ -17358,14 +17384,14 @@ void HP_clif_open_search_store_info(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_search_store_info_click_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17373,9 +17399,9 @@ void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, s { HPMHooks.source.clif.search_store_info_click_ack(sd, x, y); } - if( HPMHooks.count.HP_clif_search_store_info_click_ack_post ) { + if (HPMHooks.count.HP_clif_search_store_info_click_ack_post > 0) { 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++ ) { + 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); } @@ -17384,14 +17410,14 @@ void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, s } void HP_clif_elemental_info(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_elemental_info_pre ) { + if (HPMHooks.count.HP_clif_elemental_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17399,9 +17425,9 @@ void HP_clif_elemental_info(struct map_session_data *sd) { { HPMHooks.source.clif.elemental_info(sd); } - if( HPMHooks.count.HP_clif_elemental_info_post ) { + if (HPMHooks.count.HP_clif_elemental_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_elemental_info_post[hIndex].func; postHookFunc(sd); } @@ -17410,14 +17436,14 @@ void HP_clif_elemental_info(struct map_session_data *sd) { } void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_elemental_updatestatus_pre ) { + if (HPMHooks.count.HP_clif_elemental_updatestatus_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17425,9 +17451,9 @@ void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) { { HPMHooks.source.clif.elemental_updatestatus(sd, type); } - if( HPMHooks.count.HP_clif_elemental_updatestatus_post ) { + if (HPMHooks.count.HP_clif_elemental_updatestatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_post; hIndex++ ) { + 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); } @@ -17436,14 +17462,14 @@ void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) { } 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 ) { + if (HPMHooks.count.HP_clif_bgqueue_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17451,9 +17477,9 @@ void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_A { HPMHooks.source.clif.bgqueue_ack(sd, response, arena_id); } - if( HPMHooks.count.HP_clif_bgqueue_ack_post ) { + if (HPMHooks.count.HP_clif_bgqueue_ack_post > 0) { 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++ ) { + 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); } @@ -17462,14 +17488,14 @@ void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_A } void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bgqueue_notice_delete_pre ) { + if (HPMHooks.count.HP_clif_bgqueue_notice_delete_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17477,9 +17503,9 @@ void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUN { HPMHooks.source.clif.bgqueue_notice_delete(sd, response, name); } - if( HPMHooks.count.HP_clif_bgqueue_notice_delete_post ) { + if (HPMHooks.count.HP_clif_bgqueue_notice_delete_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_post; hIndex++ ) { + 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); } @@ -17488,14 +17514,14 @@ void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUN } 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 ) { + if (HPMHooks.count.HP_clif_bgqueue_update_info_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *arena_id, int *position); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17503,9 +17529,9 @@ void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char aren { HPMHooks.source.clif.bgqueue_update_info(sd, arena_id, position); } - if( HPMHooks.count.HP_clif_bgqueue_update_info_post ) { + if (HPMHooks.count.HP_clif_bgqueue_update_info_post > 0) { 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++ ) { + 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); } @@ -17514,14 +17540,14 @@ void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char aren } void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bgqueue_joined_pre ) { + if (HPMHooks.count.HP_clif_bgqueue_joined_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17529,9 +17555,9 @@ void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) { { HPMHooks.source.clif.bgqueue_joined(sd, pos); } - if( HPMHooks.count.HP_clif_bgqueue_joined_post ) { + if (HPMHooks.count.HP_clif_bgqueue_joined_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_post; hIndex++ ) { + 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); } @@ -17540,14 +17566,14 @@ void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) { } void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bgqueue_pcleft_pre ) { + if (HPMHooks.count.HP_clif_bgqueue_pcleft_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17555,9 +17581,9 @@ void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { { HPMHooks.source.clif.bgqueue_pcleft(sd); } - if( HPMHooks.count.HP_clif_bgqueue_pcleft_post ) { + if (HPMHooks.count.HP_clif_bgqueue_pcleft_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_post[hIndex].func; postHookFunc(sd); } @@ -17566,14 +17592,14 @@ void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_bgqueue_battlebegins_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *arena_id, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17581,9 +17607,9 @@ void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char are { HPMHooks.source.clif.bgqueue_battlebegins(sd, arena_id, target); } - if( HPMHooks.count.HP_clif_bgqueue_battlebegins_post ) { + if (HPMHooks.count.HP_clif_bgqueue_battlebegins_post > 0) { 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++ ) { + 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); } @@ -17592,14 +17618,14 @@ void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char are } void HP_clif_adopt_reply(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_adopt_reply_pre ) { + if (HPMHooks.count.HP_clif_adopt_reply_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17607,9 +17633,9 @@ void HP_clif_adopt_reply(struct map_session_data *sd, int type) { { HPMHooks.source.clif.adopt_reply(sd, type); } - if( HPMHooks.count.HP_clif_adopt_reply_post ) { + if (HPMHooks.count.HP_clif_adopt_reply_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_post; hIndex++ ) { + 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); } @@ -17618,14 +17644,14 @@ void HP_clif_adopt_reply(struct map_session_data *sd, int type) { } 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 ) { + if (HPMHooks.count.HP_clif_adopt_request_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **src, int *p_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17633,9 +17659,9 @@ void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data { HPMHooks.source.clif.adopt_request(sd, src, p_id); } - if( HPMHooks.count.HP_clif_adopt_request_post ) { + if (HPMHooks.count.HP_clif_adopt_request_post > 0) { 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++ ) { + 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); } @@ -17644,14 +17670,14 @@ void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data } void HP_clif_readbook(int fd, int book_id, int page) { int hIndex = 0; - if( HPMHooks.count.HP_clif_readbook_pre ) { + if (HPMHooks.count.HP_clif_readbook_pre > 0) { void (*preHookFunc) (int *fd, int *book_id, int *page); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17659,9 +17685,9 @@ void HP_clif_readbook(int fd, int book_id, int page) { { HPMHooks.source.clif.readbook(fd, book_id, page); } - if( HPMHooks.count.HP_clif_readbook_post ) { + if (HPMHooks.count.HP_clif_readbook_post > 0) { void (*postHookFunc) (int fd, int book_id, int page); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_post; hIndex++ ) { + 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); } @@ -17670,14 +17696,14 @@ void HP_clif_readbook(int fd, int book_id, int page) { } void HP_clif_notify_time(struct map_session_data *sd, int64 time) { int hIndex = 0; - if( HPMHooks.count.HP_clif_notify_time_pre ) { + if (HPMHooks.count.HP_clif_notify_time_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int64 *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17685,9 +17711,9 @@ void HP_clif_notify_time(struct map_session_data *sd, int64 time) { { HPMHooks.source.clif.notify_time(sd, time); } - if( HPMHooks.count.HP_clif_notify_time_post ) { + if (HPMHooks.count.HP_clif_notify_time_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int64 time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_post; hIndex++ ) { + 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); } @@ -17696,14 +17722,14 @@ void HP_clif_notify_time(struct map_session_data *sd, int64 time) { } void HP_clif_user_count(struct map_session_data *sd, int count) { int hIndex = 0; - if( HPMHooks.count.HP_clif_user_count_pre ) { + if (HPMHooks.count.HP_clif_user_count_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17711,9 +17737,9 @@ void HP_clif_user_count(struct map_session_data *sd, int count) { { HPMHooks.source.clif.user_count(sd, count); } - if( HPMHooks.count.HP_clif_user_count_post ) { + if (HPMHooks.count.HP_clif_user_count_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_post; hIndex++ ) { + 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); } @@ -17722,14 +17748,14 @@ void HP_clif_user_count(struct map_session_data *sd, int count) { } 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 ) { + if (HPMHooks.count.HP_clif_noask_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **src, struct map_session_data **target, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17737,9 +17763,9 @@ void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *ta { HPMHooks.source.clif.noask_sub(src, target, type); } - if( HPMHooks.count.HP_clif_noask_sub_post ) { + if (HPMHooks.count.HP_clif_noask_sub_post > 0) { 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++ ) { + 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); } @@ -17748,14 +17774,14 @@ void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *ta } void HP_clif_bc_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bc_ready_pre ) { + if (HPMHooks.count.HP_clif_bc_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17763,9 +17789,9 @@ void HP_clif_bc_ready(void) { { HPMHooks.source.clif.bc_ready(); } - if( HPMHooks.count.HP_clif_bc_ready_post ) { + if (HPMHooks.count.HP_clif_bc_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bc_ready_post[hIndex].func; postHookFunc(); } @@ -17774,14 +17800,14 @@ void HP_clif_bc_ready(void) { } void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_channel_msg_pre ) { + if (HPMHooks.count.HP_clif_channel_msg_pre > 0) { void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_channel_msg_pre[hIndex].func; preHookFunc(&chan, &sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17789,9 +17815,9 @@ void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, { HPMHooks.source.clif.channel_msg(chan, sd, msg); } - if( HPMHooks.count.HP_clif_channel_msg_post ) { + if (HPMHooks.count.HP_clif_channel_msg_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_channel_msg_post[hIndex].func; postHookFunc(chan, sd, msg); } @@ -17800,14 +17826,14 @@ void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, } void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_channel_msg2_pre ) { + if (HPMHooks.count.HP_clif_channel_msg2_pre > 0) { void (*preHookFunc) (struct channel_data **chan, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_channel_msg2_pre[hIndex].func; preHookFunc(&chan, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17815,9 +17841,9 @@ void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { { HPMHooks.source.clif.channel_msg2(chan, msg); } - if( HPMHooks.count.HP_clif_channel_msg2_post ) { + if (HPMHooks.count.HP_clif_channel_msg2_post > 0) { void (*postHookFunc) (struct channel_data *chan, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_channel_msg2_post[hIndex].func; postHookFunc(chan, msg); } @@ -17827,14 +17853,14 @@ void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_undisguise_timer_pre ) { + if (HPMHooks.count.HP_clif_undisguise_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17842,9 +17868,9 @@ int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_undisguise_timer_post ) { + if (HPMHooks.count.HP_clif_undisguise_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) { + 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); } @@ -17853,14 +17879,14 @@ int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bank_deposit_pre ) { + if (HPMHooks.count.HP_clif_bank_deposit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_BANKING_DEPOSIT_ACK *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bank_deposit_pre[hIndex].func; preHookFunc(&sd, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17868,9 +17894,9 @@ void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_AC { HPMHooks.source.clif.bank_deposit(sd, reason); } - if( HPMHooks.count.HP_clif_bank_deposit_post ) { + if (HPMHooks.count.HP_clif_bank_deposit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bank_deposit_post[hIndex].func; postHookFunc(sd, reason); } @@ -17879,14 +17905,14 @@ void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_AC } void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bank_withdraw_pre ) { + if (HPMHooks.count.HP_clif_bank_withdraw_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_BANKING_WITHDRAW_ACK *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bank_withdraw_pre[hIndex].func; preHookFunc(&sd, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17894,9 +17920,9 @@ void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ { HPMHooks.source.clif.bank_withdraw(sd, reason); } - if( HPMHooks.count.HP_clif_bank_withdraw_post ) { + if (HPMHooks.count.HP_clif_bank_withdraw_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bank_withdraw_post[hIndex].func; postHookFunc(sd, reason); } @@ -17905,14 +17931,14 @@ void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ } void HP_clif_show_modifiers(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_show_modifiers_pre ) { + if (HPMHooks.count.HP_clif_show_modifiers_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_show_modifiers_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17920,9 +17946,9 @@ void HP_clif_show_modifiers(struct map_session_data *sd) { { HPMHooks.source.clif.show_modifiers(sd); } - if( HPMHooks.count.HP_clif_show_modifiers_post ) { + if (HPMHooks.count.HP_clif_show_modifiers_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_show_modifiers_post[hIndex].func; postHookFunc(sd); } @@ -17931,14 +17957,14 @@ void HP_clif_show_modifiers(struct map_session_data *sd) { } void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_notify_bounditem_pre ) { + if (HPMHooks.count.HP_clif_notify_bounditem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_notify_bounditem_pre[hIndex].func; preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17946,9 +17972,9 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) { HPMHooks.source.clif.notify_bounditem(sd, index); } - if( HPMHooks.count.HP_clif_notify_bounditem_post ) { + if (HPMHooks.count.HP_clif_notify_bounditem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned short index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_notify_bounditem_post[hIndex].func; postHookFunc(sd, index); } @@ -17958,14 +17984,14 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delay_damage_pre ) { + if (HPMHooks.count.HP_clif_delay_damage_pre > 0) { int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_delay_damage_pre[hIndex].func; retVal___ = preHookFunc(&tick, &src, &dst, &sdelay, &ddelay, &in_damage, &div, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17973,9 +17999,9 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list * { retVal___ = HPMHooks.source.clif.delay_damage(tick, src, dst, sdelay, ddelay, in_damage, div, type); } - if( HPMHooks.count.HP_clif_delay_damage_post ) { + if (HPMHooks.count.HP_clif_delay_damage_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_delay_damage_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, src, dst, sdelay, ddelay, in_damage, div, type); } @@ -17985,14 +18011,14 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list * int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delay_damage_sub_pre ) { + if (HPMHooks.count.HP_clif_delay_damage_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_delay_damage_sub_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18000,9 +18026,9 @@ int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.delay_damage_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_delay_damage_sub_post ) { + if (HPMHooks.count.HP_clif_delay_damage_sub_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_delay_damage_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -18011,14 +18037,14 @@ int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { } void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_npc_market_open_pre ) { + if (HPMHooks.count.HP_clif_npc_market_open_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npc_market_open_pre[hIndex].func; preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18026,9 +18052,9 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.npc_market_open(sd, nd); } - if( HPMHooks.count.HP_clif_npc_market_open_post ) { + if (HPMHooks.count.HP_clif_npc_market_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npc_market_open_post[hIndex].func; postHookFunc(sd, nd); } @@ -18037,14 +18063,14 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { } void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) { int hIndex = 0; - if( HPMHooks.count.HP_clif_npc_market_purchase_ack_pre ) { + if (HPMHooks.count.HP_clif_npc_market_purchase_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, unsigned char *response); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func; preHookFunc(&sd, &item_list, &response); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18052,9 +18078,9 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i { HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response); } - if( HPMHooks.count.HP_clif_npc_market_purchase_ack_post ) { + if (HPMHooks.count.HP_clif_npc_market_purchase_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char response); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func; postHookFunc(sd, item_list, response); } @@ -18064,14 +18090,14 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i bool HP_clif_parse_roulette_db(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_parse_roulette_db_pre ) { + if (HPMHooks.count.HP_clif_parse_roulette_db_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18079,9 +18105,9 @@ bool HP_clif_parse_roulette_db(void) { { retVal___ = HPMHooks.source.clif.parse_roulette_db(); } - if( HPMHooks.count.HP_clif_parse_roulette_db_post ) { + if (HPMHooks.count.HP_clif_parse_roulette_db_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18090,14 +18116,14 @@ bool HP_clif_parse_roulette_db(void) { } void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { int hIndex = 0; - if( HPMHooks.count.HP_clif_roulette_generate_ack_pre ) { + if (HPMHooks.count.HP_clif_roulette_generate_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; preHookFunc(&sd, &result, &stage, &prizeIdx, &bonusItemID); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18105,9 +18131,9 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re { HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); } - if( HPMHooks.count.HP_clif_roulette_generate_ack_post ) { + if (HPMHooks.count.HP_clif_roulette_generate_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; postHookFunc(sd, result, stage, prizeIdx, bonusItemID); } @@ -18116,14 +18142,14 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re } void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_openmergeitem_pre ) { + if (HPMHooks.count.HP_clif_openmergeitem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_openmergeitem_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18131,9 +18157,9 @@ void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.openmergeitem(fd, sd); } - if( HPMHooks.count.HP_clif_openmergeitem_post ) { + if (HPMHooks.count.HP_clif_openmergeitem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_openmergeitem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18142,14 +18168,14 @@ void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { } void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cancelmergeitem_pre ) { + if (HPMHooks.count.HP_clif_cancelmergeitem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18157,9 +18183,9 @@ void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.cancelmergeitem(fd, sd); } - if( HPMHooks.count.HP_clif_cancelmergeitem_post ) { + if (HPMHooks.count.HP_clif_cancelmergeitem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18169,14 +18195,14 @@ void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { int HP_clif_comparemergeitem(const void *a, const void *b) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_comparemergeitem_pre ) { + if (HPMHooks.count.HP_clif_comparemergeitem_pre > 0) { int (*preHookFunc) (const void **a, const void **b); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_comparemergeitem_pre[hIndex].func; retVal___ = preHookFunc(&a, &b); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18184,9 +18210,9 @@ int HP_clif_comparemergeitem(const void *a, const void *b) { { retVal___ = HPMHooks.source.clif.comparemergeitem(a, b); } - if( HPMHooks.count.HP_clif_comparemergeitem_post ) { + if (HPMHooks.count.HP_clif_comparemergeitem_post > 0) { int (*postHookFunc) (int retVal___, const void *a, const void *b); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_comparemergeitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, a, b); } @@ -18195,14 +18221,14 @@ int HP_clif_comparemergeitem(const void *a, const void *b) { } void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ackmergeitems_pre ) { + if (HPMHooks.count.HP_clif_ackmergeitems_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ackmergeitems_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18210,9 +18236,9 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.ackmergeitems(fd, sd); } - if( HPMHooks.count.HP_clif_ackmergeitems_post ) { + if (HPMHooks.count.HP_clif_ackmergeitems_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ackmergeitems_post[hIndex].func; postHookFunc(fd, sd); } @@ -18222,14 +18248,14 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { bool HP_clif_isdisguised(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_isdisguised_pre ) { + if (HPMHooks.count.HP_clif_isdisguised_pre > 0) { bool (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_isdisguised_pre[hIndex].func; retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18237,9 +18263,9 @@ bool HP_clif_isdisguised(struct block_list *bl) { { retVal___ = HPMHooks.source.clif.isdisguised(bl); } - if( HPMHooks.count.HP_clif_isdisguised_post ) { + if (HPMHooks.count.HP_clif_isdisguised_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_isdisguised_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -18248,14 +18274,14 @@ bool HP_clif_isdisguised(struct block_list *bl) { } void HP_clif_navigate_to(struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_navigate_to_pre ) { + if (HPMHooks.count.HP_clif_navigate_to_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_navigate_to_pre[hIndex].func; preHookFunc(&sd, &mapname, &x, &y, &flag, &hideWindow, &mob_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18263,9 +18289,9 @@ void HP_clif_navigate_to(struct map_session_data *sd, const char *mapname, uint1 { HPMHooks.source.clif.navigate_to(sd, mapname, x, y, flag, hideWindow, mob_id); } - if( HPMHooks.count.HP_clif_navigate_to_post ) { + if (HPMHooks.count.HP_clif_navigate_to_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_navigate_to_post[hIndex].func; postHookFunc(sd, mapname, x, y, flag, hideWindow, mob_id); } @@ -18275,14 +18301,14 @@ void HP_clif_navigate_to(struct map_session_data *sd, const char *mapname, uint1 unsigned char HP_clif_bl_type(struct block_list *bl) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_clif_bl_type_pre ) { + if (HPMHooks.count.HP_clif_bl_type_pre > 0) { unsigned char (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bl_type_pre[hIndex].func; retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18290,9 +18316,9 @@ unsigned char HP_clif_bl_type(struct block_list *bl) { { retVal___ = HPMHooks.source.clif.bl_type(bl); } - if( HPMHooks.count.HP_clif_bl_type_post ) { + if (HPMHooks.count.HP_clif_bl_type_post > 0) { unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bl_type_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -18301,14 +18327,14 @@ unsigned char HP_clif_bl_type(struct block_list *bl) { } void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pWantToConnection_pre ) { + if (HPMHooks.count.HP_clif_pWantToConnection_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18316,9 +18342,9 @@ void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pWantToConnection(fd, sd); } - if( HPMHooks.count.HP_clif_pWantToConnection_post ) { + if (HPMHooks.count.HP_clif_pWantToConnection_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pWantToConnection_post[hIndex].func; postHookFunc(fd, sd); } @@ -18327,14 +18353,14 @@ void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { } void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pLoadEndAck_pre ) { + if (HPMHooks.count.HP_clif_pLoadEndAck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18342,9 +18368,9 @@ void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pLoadEndAck(fd, sd); } - if( HPMHooks.count.HP_clif_pLoadEndAck_post ) { + if (HPMHooks.count.HP_clif_pLoadEndAck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_post[hIndex].func; postHookFunc(fd, sd); } @@ -18353,14 +18379,14 @@ void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) { } void HP_clif_pTickSend(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTickSend_pre ) { + if (HPMHooks.count.HP_clif_pTickSend_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18368,9 +18394,9 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTickSend(fd, sd); } - if( HPMHooks.count.HP_clif_pTickSend_post ) { + if (HPMHooks.count.HP_clif_pTickSend_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTickSend_post[hIndex].func; postHookFunc(fd, sd); } @@ -18379,14 +18405,14 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) { } void HP_clif_pHotkey(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHotkey_pre ) { + if (HPMHooks.count.HP_clif_pHotkey_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18394,9 +18420,9 @@ void HP_clif_pHotkey(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHotkey(fd, sd); } - if( HPMHooks.count.HP_clif_pHotkey_post ) { + if (HPMHooks.count.HP_clif_pHotkey_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHotkey_post[hIndex].func; postHookFunc(fd, sd); } @@ -18405,14 +18431,14 @@ void HP_clif_pHotkey(int fd, struct map_session_data *sd) { } void HP_clif_pProgressbar(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pProgressbar_pre ) { + if (HPMHooks.count.HP_clif_pProgressbar_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18420,9 +18446,9 @@ void HP_clif_pProgressbar(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pProgressbar(fd, sd); } - if( HPMHooks.count.HP_clif_pProgressbar_post ) { + if (HPMHooks.count.HP_clif_pProgressbar_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pProgressbar_post[hIndex].func; postHookFunc(fd, sd); } @@ -18431,14 +18457,14 @@ void HP_clif_pProgressbar(int fd, struct map_session_data *sd) { } void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pWalkToXY_pre ) { + if (HPMHooks.count.HP_clif_pWalkToXY_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18446,9 +18472,9 @@ void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pWalkToXY(fd, sd); } - if( HPMHooks.count.HP_clif_pWalkToXY_post ) { + if (HPMHooks.count.HP_clif_pWalkToXY_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pWalkToXY_post[hIndex].func; postHookFunc(fd, sd); } @@ -18457,14 +18483,14 @@ void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) { } void HP_clif_pQuitGame(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pQuitGame_pre ) { + if (HPMHooks.count.HP_clif_pQuitGame_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18472,9 +18498,9 @@ void HP_clif_pQuitGame(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pQuitGame(fd, sd); } - if( HPMHooks.count.HP_clif_pQuitGame_post ) { + if (HPMHooks.count.HP_clif_pQuitGame_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pQuitGame_post[hIndex].func; postHookFunc(fd, sd); } @@ -18483,14 +18509,14 @@ void HP_clif_pQuitGame(int fd, struct map_session_data *sd) { } void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGetCharNameRequest_pre ) { + if (HPMHooks.count.HP_clif_pGetCharNameRequest_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18498,9 +18524,9 @@ void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGetCharNameRequest(fd, sd); } - if( HPMHooks.count.HP_clif_pGetCharNameRequest_post ) { + if (HPMHooks.count.HP_clif_pGetCharNameRequest_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_post[hIndex].func; postHookFunc(fd, sd); } @@ -18509,14 +18535,14 @@ void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) { } void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGlobalMessage_pre ) { + if (HPMHooks.count.HP_clif_pGlobalMessage_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18524,9 +18550,9 @@ void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGlobalMessage(fd, sd); } - if( HPMHooks.count.HP_clif_pGlobalMessage_post ) { + if (HPMHooks.count.HP_clif_pGlobalMessage_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_post[hIndex].func; postHookFunc(fd, sd); } @@ -18535,14 +18561,14 @@ void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) { } void HP_clif_pMapMove(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMapMove_pre ) { + if (HPMHooks.count.HP_clif_pMapMove_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18550,9 +18576,9 @@ void HP_clif_pMapMove(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMapMove(fd, sd); } - if( HPMHooks.count.HP_clif_pMapMove_post ) { + if (HPMHooks.count.HP_clif_pMapMove_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMapMove_post[hIndex].func; postHookFunc(fd, sd); } @@ -18561,14 +18587,14 @@ void HP_clif_pMapMove(int fd, struct map_session_data *sd) { } void HP_clif_pChangeDir(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChangeDir_pre ) { + if (HPMHooks.count.HP_clif_pChangeDir_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18576,9 +18602,9 @@ void HP_clif_pChangeDir(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChangeDir(fd, sd); } - if( HPMHooks.count.HP_clif_pChangeDir_post ) { + if (HPMHooks.count.HP_clif_pChangeDir_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChangeDir_post[hIndex].func; postHookFunc(fd, sd); } @@ -18587,14 +18613,14 @@ void HP_clif_pChangeDir(int fd, struct map_session_data *sd) { } void HP_clif_pEmotion(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pEmotion_pre ) { + if (HPMHooks.count.HP_clif_pEmotion_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18602,9 +18628,9 @@ void HP_clif_pEmotion(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pEmotion(fd, sd); } - if( HPMHooks.count.HP_clif_pEmotion_post ) { + if (HPMHooks.count.HP_clif_pEmotion_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pEmotion_post[hIndex].func; postHookFunc(fd, sd); } @@ -18613,14 +18639,14 @@ void HP_clif_pEmotion(int fd, struct map_session_data *sd) { } void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHowManyConnections_pre ) { + if (HPMHooks.count.HP_clif_pHowManyConnections_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18628,9 +18654,9 @@ void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHowManyConnections(fd, sd); } - if( HPMHooks.count.HP_clif_pHowManyConnections_post ) { + if (HPMHooks.count.HP_clif_pHowManyConnections_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_post[hIndex].func; postHookFunc(fd, sd); } @@ -18639,14 +18665,14 @@ void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) { } void HP_clif_pActionRequest(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pActionRequest_pre ) { + if (HPMHooks.count.HP_clif_pActionRequest_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18654,9 +18680,9 @@ void HP_clif_pActionRequest(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pActionRequest(fd, sd); } - if( HPMHooks.count.HP_clif_pActionRequest_post ) { + if (HPMHooks.count.HP_clif_pActionRequest_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pActionRequest_post[hIndex].func; postHookFunc(fd, sd); } @@ -18665,14 +18691,14 @@ void HP_clif_pActionRequest(int fd, struct map_session_data *sd) { } void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pActionRequest_sub_pre ) { + if (HPMHooks.count.HP_clif_pActionRequest_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *action_type, int *target_id, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18680,9 +18706,9 @@ void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, in { HPMHooks.source.clif.pActionRequest_sub(sd, action_type, target_id, tick); } - if( HPMHooks.count.HP_clif_pActionRequest_sub_post ) { + if (HPMHooks.count.HP_clif_pActionRequest_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int action_type, int target_id, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_post; hIndex++ ) { + 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); } @@ -18691,14 +18717,14 @@ void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, in } void HP_clif_pRestart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRestart_pre ) { + if (HPMHooks.count.HP_clif_pRestart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18706,9 +18732,9 @@ void HP_clif_pRestart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRestart(fd, sd); } - if( HPMHooks.count.HP_clif_pRestart_post ) { + if (HPMHooks.count.HP_clif_pRestart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRestart_post[hIndex].func; postHookFunc(fd, sd); } @@ -18717,14 +18743,14 @@ void HP_clif_pRestart(int fd, struct map_session_data *sd) { } void HP_clif_pWisMessage(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pWisMessage_pre ) { + if (HPMHooks.count.HP_clif_pWisMessage_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18732,9 +18758,9 @@ void HP_clif_pWisMessage(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pWisMessage(fd, sd); } - if( HPMHooks.count.HP_clif_pWisMessage_post ) { + if (HPMHooks.count.HP_clif_pWisMessage_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pWisMessage_post[hIndex].func; postHookFunc(fd, sd); } @@ -18743,14 +18769,14 @@ void HP_clif_pWisMessage(int fd, struct map_session_data *sd) { } void HP_clif_pBroadcast(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBroadcast_pre ) { + if (HPMHooks.count.HP_clif_pBroadcast_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18758,9 +18784,9 @@ void HP_clif_pBroadcast(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBroadcast(fd, sd); } - if( HPMHooks.count.HP_clif_pBroadcast_post ) { + if (HPMHooks.count.HP_clif_pBroadcast_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBroadcast_post[hIndex].func; postHookFunc(fd, sd); } @@ -18769,14 +18795,14 @@ void HP_clif_pBroadcast(int fd, struct map_session_data *sd) { } void HP_clif_pTakeItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTakeItem_pre ) { + if (HPMHooks.count.HP_clif_pTakeItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18784,9 +18810,9 @@ void HP_clif_pTakeItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTakeItem(fd, sd); } - if( HPMHooks.count.HP_clif_pTakeItem_post ) { + if (HPMHooks.count.HP_clif_pTakeItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTakeItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18795,14 +18821,14 @@ void HP_clif_pTakeItem(int fd, struct map_session_data *sd) { } void HP_clif_pDropItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pDropItem_pre ) { + if (HPMHooks.count.HP_clif_pDropItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18810,9 +18836,9 @@ void HP_clif_pDropItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pDropItem(fd, sd); } - if( HPMHooks.count.HP_clif_pDropItem_post ) { + if (HPMHooks.count.HP_clif_pDropItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pDropItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18821,14 +18847,14 @@ void HP_clif_pDropItem(int fd, struct map_session_data *sd) { } void HP_clif_pUseItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseItem_pre ) { + if (HPMHooks.count.HP_clif_pUseItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18836,9 +18862,9 @@ void HP_clif_pUseItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseItem(fd, sd); } - if( HPMHooks.count.HP_clif_pUseItem_post ) { + if (HPMHooks.count.HP_clif_pUseItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18847,14 +18873,14 @@ void HP_clif_pUseItem(int fd, struct map_session_data *sd) { } void HP_clif_pEquipItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pEquipItem_pre ) { + if (HPMHooks.count.HP_clif_pEquipItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18862,9 +18888,9 @@ void HP_clif_pEquipItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pEquipItem(fd, sd); } - if( HPMHooks.count.HP_clif_pEquipItem_post ) { + if (HPMHooks.count.HP_clif_pEquipItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pEquipItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18873,14 +18899,14 @@ void HP_clif_pEquipItem(int fd, struct map_session_data *sd) { } void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUnequipItem_pre ) { + if (HPMHooks.count.HP_clif_pUnequipItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18888,9 +18914,9 @@ void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUnequipItem(fd, sd); } - if( HPMHooks.count.HP_clif_pUnequipItem_post ) { + if (HPMHooks.count.HP_clif_pUnequipItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUnequipItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -18899,14 +18925,14 @@ void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) { } void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcClicked_pre ) { + if (HPMHooks.count.HP_clif_pNpcClicked_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18914,9 +18940,9 @@ void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcClicked(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcClicked_post ) { + if (HPMHooks.count.HP_clif_pNpcClicked_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcClicked_post[hIndex].func; postHookFunc(fd, sd); } @@ -18925,14 +18951,14 @@ void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) { } void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcBuySellSelected_pre ) { + if (HPMHooks.count.HP_clif_pNpcBuySellSelected_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18940,9 +18966,9 @@ void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcBuySellSelected(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcBuySellSelected_post ) { + if (HPMHooks.count.HP_clif_pNpcBuySellSelected_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_post[hIndex].func; postHookFunc(fd, sd); } @@ -18951,14 +18977,14 @@ void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) { } void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcBuyListSend_pre ) { + if (HPMHooks.count.HP_clif_pNpcBuyListSend_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18966,9 +18992,9 @@ void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcBuyListSend(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcBuyListSend_post ) { + if (HPMHooks.count.HP_clif_pNpcBuyListSend_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_post[hIndex].func; postHookFunc(fd, sd); } @@ -18977,14 +19003,14 @@ void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) { } void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcSellListSend_pre ) { + if (HPMHooks.count.HP_clif_pNpcSellListSend_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18992,9 +19018,9 @@ void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcSellListSend(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcSellListSend_post ) { + if (HPMHooks.count.HP_clif_pNpcSellListSend_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_post[hIndex].func; postHookFunc(fd, sd); } @@ -19003,14 +19029,14 @@ void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) { } void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCreateChatRoom_pre ) { + if (HPMHooks.count.HP_clif_pCreateChatRoom_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19018,9 +19044,9 @@ void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCreateChatRoom(fd, sd); } - if( HPMHooks.count.HP_clif_pCreateChatRoom_post ) { + if (HPMHooks.count.HP_clif_pCreateChatRoom_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_post[hIndex].func; postHookFunc(fd, sd); } @@ -19029,14 +19055,14 @@ void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) { } void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChatAddMember_pre ) { + if (HPMHooks.count.HP_clif_pChatAddMember_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19044,9 +19070,9 @@ void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChatAddMember(fd, sd); } - if( HPMHooks.count.HP_clif_pChatAddMember_post ) { + if (HPMHooks.count.HP_clif_pChatAddMember_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChatAddMember_post[hIndex].func; postHookFunc(fd, sd); } @@ -19055,14 +19081,14 @@ void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) { } void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChatRoomStatusChange_pre ) { + if (HPMHooks.count.HP_clif_pChatRoomStatusChange_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19070,9 +19096,9 @@ void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChatRoomStatusChange(fd, sd); } - if( HPMHooks.count.HP_clif_pChatRoomStatusChange_post ) { + if (HPMHooks.count.HP_clif_pChatRoomStatusChange_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_post[hIndex].func; postHookFunc(fd, sd); } @@ -19081,14 +19107,14 @@ void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) { } void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChangeChatOwner_pre ) { + if (HPMHooks.count.HP_clif_pChangeChatOwner_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19096,9 +19122,9 @@ void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChangeChatOwner(fd, sd); } - if( HPMHooks.count.HP_clif_pChangeChatOwner_post ) { + if (HPMHooks.count.HP_clif_pChangeChatOwner_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_post[hIndex].func; postHookFunc(fd, sd); } @@ -19107,14 +19133,14 @@ void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) { } void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pKickFromChat_pre ) { + if (HPMHooks.count.HP_clif_pKickFromChat_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19122,9 +19148,9 @@ void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pKickFromChat(fd, sd); } - if( HPMHooks.count.HP_clif_pKickFromChat_post ) { + if (HPMHooks.count.HP_clif_pKickFromChat_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pKickFromChat_post[hIndex].func; postHookFunc(fd, sd); } @@ -19133,14 +19159,14 @@ void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) { } void HP_clif_pChatLeave(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChatLeave_pre ) { + if (HPMHooks.count.HP_clif_pChatLeave_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19148,9 +19174,9 @@ void HP_clif_pChatLeave(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChatLeave(fd, sd); } - if( HPMHooks.count.HP_clif_pChatLeave_post ) { + if (HPMHooks.count.HP_clif_pChatLeave_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChatLeave_post[hIndex].func; postHookFunc(fd, sd); } @@ -19159,14 +19185,14 @@ void HP_clif_pChatLeave(int fd, struct map_session_data *sd) { } void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeRequest_pre ) { + if (HPMHooks.count.HP_clif_pTradeRequest_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19174,9 +19200,9 @@ void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeRequest(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeRequest_post ) { + if (HPMHooks.count.HP_clif_pTradeRequest_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeRequest_post[hIndex].func; postHookFunc(fd, sd); } @@ -19185,14 +19211,14 @@ void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) { } void HP_clif_pTradeAck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeAck_pre ) { + if (HPMHooks.count.HP_clif_pTradeAck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19200,9 +19226,9 @@ void HP_clif_pTradeAck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeAck(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeAck_post ) { + if (HPMHooks.count.HP_clif_pTradeAck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeAck_post[hIndex].func; postHookFunc(fd, sd); } @@ -19211,14 +19237,14 @@ void HP_clif_pTradeAck(int fd, struct map_session_data *sd) { } void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeAddItem_pre ) { + if (HPMHooks.count.HP_clif_pTradeAddItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19226,9 +19252,9 @@ void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeAddItem(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeAddItem_post ) { + if (HPMHooks.count.HP_clif_pTradeAddItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -19237,14 +19263,14 @@ void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) { } void HP_clif_pTradeOk(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeOk_pre ) { + if (HPMHooks.count.HP_clif_pTradeOk_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19252,9 +19278,9 @@ void HP_clif_pTradeOk(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeOk(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeOk_post ) { + if (HPMHooks.count.HP_clif_pTradeOk_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeOk_post[hIndex].func; postHookFunc(fd, sd); } @@ -19263,14 +19289,14 @@ void HP_clif_pTradeOk(int fd, struct map_session_data *sd) { } void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeCancel_pre ) { + if (HPMHooks.count.HP_clif_pTradeCancel_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19278,9 +19304,9 @@ void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeCancel(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeCancel_post ) { + if (HPMHooks.count.HP_clif_pTradeCancel_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeCancel_post[hIndex].func; postHookFunc(fd, sd); } @@ -19289,14 +19315,14 @@ void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) { } void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTradeCommit_pre ) { + if (HPMHooks.count.HP_clif_pTradeCommit_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19304,9 +19330,9 @@ void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTradeCommit(fd, sd); } - if( HPMHooks.count.HP_clif_pTradeCommit_post ) { + if (HPMHooks.count.HP_clif_pTradeCommit_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTradeCommit_post[hIndex].func; postHookFunc(fd, sd); } @@ -19315,14 +19341,14 @@ void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) { } void HP_clif_pStopAttack(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pStopAttack_pre ) { + if (HPMHooks.count.HP_clif_pStopAttack_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19330,9 +19356,9 @@ void HP_clif_pStopAttack(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pStopAttack(fd, sd); } - if( HPMHooks.count.HP_clif_pStopAttack_post ) { + if (HPMHooks.count.HP_clif_pStopAttack_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pStopAttack_post[hIndex].func; postHookFunc(fd, sd); } @@ -19341,14 +19367,14 @@ void HP_clif_pStopAttack(int fd, struct map_session_data *sd) { } void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPutItemToCart_pre ) { + if (HPMHooks.count.HP_clif_pPutItemToCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19356,9 +19382,9 @@ void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPutItemToCart(fd, sd); } - if( HPMHooks.count.HP_clif_pPutItemToCart_post ) { + if (HPMHooks.count.HP_clif_pPutItemToCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -19367,14 +19393,14 @@ void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) { } void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGetItemFromCart_pre ) { + if (HPMHooks.count.HP_clif_pGetItemFromCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19382,9 +19408,9 @@ void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGetItemFromCart(fd, sd); } - if( HPMHooks.count.HP_clif_pGetItemFromCart_post ) { + if (HPMHooks.count.HP_clif_pGetItemFromCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -19393,14 +19419,14 @@ void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) { } void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRemoveOption_pre ) { + if (HPMHooks.count.HP_clif_pRemoveOption_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19408,9 +19434,9 @@ void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRemoveOption(fd, sd); } - if( HPMHooks.count.HP_clif_pRemoveOption_post ) { + if (HPMHooks.count.HP_clif_pRemoveOption_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRemoveOption_post[hIndex].func; postHookFunc(fd, sd); } @@ -19419,14 +19445,14 @@ void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) { } void HP_clif_pChangeCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChangeCart_pre ) { + if (HPMHooks.count.HP_clif_pChangeCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19434,9 +19460,9 @@ void HP_clif_pChangeCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChangeCart(fd, sd); } - if( HPMHooks.count.HP_clif_pChangeCart_post ) { + if (HPMHooks.count.HP_clif_pChangeCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChangeCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -19445,14 +19471,14 @@ void HP_clif_pChangeCart(int fd, struct map_session_data *sd) { } void HP_clif_pStatusUp(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pStatusUp_pre ) { + if (HPMHooks.count.HP_clif_pStatusUp_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19460,9 +19486,9 @@ void HP_clif_pStatusUp(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pStatusUp(fd, sd); } - if( HPMHooks.count.HP_clif_pStatusUp_post ) { + if (HPMHooks.count.HP_clif_pStatusUp_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pStatusUp_post[hIndex].func; postHookFunc(fd, sd); } @@ -19471,14 +19497,14 @@ void HP_clif_pStatusUp(int fd, struct map_session_data *sd) { } void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSkillUp_pre ) { + if (HPMHooks.count.HP_clif_pSkillUp_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19486,9 +19512,9 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSkillUp(fd, sd); } - if( HPMHooks.count.HP_clif_pSkillUp_post ) { + if (HPMHooks.count.HP_clif_pSkillUp_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSkillUp_post[hIndex].func; postHookFunc(fd, sd); } @@ -19497,14 +19523,14 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { } void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToId_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19512,9 +19538,9 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseSkillToId(fd, sd); } - if( HPMHooks.count.HP_clif_pUseSkillToId_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_post[hIndex].func; postHookFunc(fd, sd); } @@ -19523,14 +19549,14 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { } void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToId_homun_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_homun_pre > 0) { void (*preHookFunc) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19538,9 +19564,9 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data { HPMHooks.source.clif.pUseSkillToId_homun(hd, sd, tick, skill_id, skill_lv, target_id); } - if( HPMHooks.count.HP_clif_pUseSkillToId_homun_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_homun_post > 0) { void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_post; hIndex++ ) { + 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); } @@ -19549,14 +19575,14 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data } void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre > 0) { void (*preHookFunc) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19564,9 +19590,9 @@ void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_sessi { HPMHooks.source.clif.pUseSkillToId_mercenary(md, sd, tick, skill_id, skill_lv, target_id); } - if( HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post > 0) { void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post; hIndex++ ) { + 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); } @@ -19575,14 +19601,14 @@ void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_sessi } void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToPos_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19590,9 +19616,9 @@ void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseSkillToPos(fd, sd); } - if( HPMHooks.count.HP_clif_pUseSkillToPos_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_post[hIndex].func; postHookFunc(fd, sd); } @@ -19601,14 +19627,14 @@ void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosSub_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19616,9 +19642,9 @@ void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill { HPMHooks.source.clif.pUseSkillToPosSub(fd, sd, skill_lv, skill_id, x, y, skillmoreinfo); } - if( HPMHooks.count.HP_clif_pUseSkillToPosSub_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosSub_post > 0) { 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++ ) { + 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); } @@ -19627,14 +19653,14 @@ void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill } void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre > 0) { void (*preHookFunc) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19642,9 +19668,9 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data { HPMHooks.source.clif.pUseSkillToPos_homun(hd, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo); } - if( HPMHooks.count.HP_clif_pUseSkillToPos_homun_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_homun_post > 0) { void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 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++ ) { + 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); } @@ -19653,14 +19679,14 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data } void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre > 0) { void (*preHookFunc) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19668,9 +19694,9 @@ void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_sess { HPMHooks.source.clif.pUseSkillToPos_mercenary(md, sd, tick, skill_id, skill_lv, x, y, skillmoreinfo); } - if( HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post > 0) { void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 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++ ) { + 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); } @@ -19679,14 +19705,14 @@ void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_sess } void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19694,9 +19720,9 @@ void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseSkillToPosMoreInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -19705,14 +19731,14 @@ void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { } void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseSkillMap_pre ) { + if (HPMHooks.count.HP_clif_pUseSkillMap_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19720,9 +19746,9 @@ void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseSkillMap(fd, sd); } - if( HPMHooks.count.HP_clif_pUseSkillMap_post ) { + if (HPMHooks.count.HP_clif_pUseSkillMap_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_post[hIndex].func; postHookFunc(fd, sd); } @@ -19731,14 +19757,14 @@ void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) { } void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRequestMemo_pre ) { + if (HPMHooks.count.HP_clif_pRequestMemo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19746,9 +19772,9 @@ void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRequestMemo(fd, sd); } - if( HPMHooks.count.HP_clif_pRequestMemo_post ) { + if (HPMHooks.count.HP_clif_pRequestMemo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRequestMemo_post[hIndex].func; postHookFunc(fd, sd); } @@ -19757,14 +19783,14 @@ void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) { } void HP_clif_pProduceMix(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pProduceMix_pre ) { + if (HPMHooks.count.HP_clif_pProduceMix_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19772,9 +19798,9 @@ void HP_clif_pProduceMix(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pProduceMix(fd, sd); } - if( HPMHooks.count.HP_clif_pProduceMix_post ) { + if (HPMHooks.count.HP_clif_pProduceMix_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pProduceMix_post[hIndex].func; postHookFunc(fd, sd); } @@ -19783,14 +19809,14 @@ void HP_clif_pProduceMix(int fd, struct map_session_data *sd) { } void HP_clif_pCooking(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCooking_pre ) { + if (HPMHooks.count.HP_clif_pCooking_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19798,9 +19824,9 @@ void HP_clif_pCooking(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCooking(fd, sd); } - if( HPMHooks.count.HP_clif_pCooking_post ) { + if (HPMHooks.count.HP_clif_pCooking_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCooking_post[hIndex].func; postHookFunc(fd, sd); } @@ -19809,14 +19835,14 @@ void HP_clif_pCooking(int fd, struct map_session_data *sd) { } void HP_clif_pRepairItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRepairItem_pre ) { + if (HPMHooks.count.HP_clif_pRepairItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19824,9 +19850,9 @@ void HP_clif_pRepairItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRepairItem(fd, sd); } - if( HPMHooks.count.HP_clif_pRepairItem_post ) { + if (HPMHooks.count.HP_clif_pRepairItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRepairItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -19835,14 +19861,14 @@ void HP_clif_pRepairItem(int fd, struct map_session_data *sd) { } void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pWeaponRefine_pre ) { + if (HPMHooks.count.HP_clif_pWeaponRefine_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19850,9 +19876,9 @@ void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pWeaponRefine(fd, sd); } - if( HPMHooks.count.HP_clif_pWeaponRefine_post ) { + if (HPMHooks.count.HP_clif_pWeaponRefine_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_post[hIndex].func; postHookFunc(fd, sd); } @@ -19861,14 +19887,14 @@ void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) { } void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcSelectMenu_pre ) { + if (HPMHooks.count.HP_clif_pNpcSelectMenu_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19876,9 +19902,9 @@ void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcSelectMenu(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcSelectMenu_post ) { + if (HPMHooks.count.HP_clif_pNpcSelectMenu_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_post[hIndex].func; postHookFunc(fd, sd); } @@ -19887,14 +19913,14 @@ void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) { } void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcNextClicked_pre ) { + if (HPMHooks.count.HP_clif_pNpcNextClicked_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19902,9 +19928,9 @@ void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcNextClicked(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcNextClicked_post ) { + if (HPMHooks.count.HP_clif_pNpcNextClicked_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_post[hIndex].func; postHookFunc(fd, sd); } @@ -19913,14 +19939,14 @@ void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) { } void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcAmountInput_pre ) { + if (HPMHooks.count.HP_clif_pNpcAmountInput_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19928,9 +19954,9 @@ void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcAmountInput(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcAmountInput_post ) { + if (HPMHooks.count.HP_clif_pNpcAmountInput_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_post[hIndex].func; postHookFunc(fd, sd); } @@ -19939,14 +19965,14 @@ void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) { } void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcStringInput_pre ) { + if (HPMHooks.count.HP_clif_pNpcStringInput_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19954,9 +19980,9 @@ void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcStringInput(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcStringInput_post ) { + if (HPMHooks.count.HP_clif_pNpcStringInput_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_post[hIndex].func; postHookFunc(fd, sd); } @@ -19965,14 +19991,14 @@ void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) { } void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNpcCloseClicked_pre ) { + if (HPMHooks.count.HP_clif_pNpcCloseClicked_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19980,9 +20006,9 @@ void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNpcCloseClicked(fd, sd); } - if( HPMHooks.count.HP_clif_pNpcCloseClicked_post ) { + if (HPMHooks.count.HP_clif_pNpcCloseClicked_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_post[hIndex].func; postHookFunc(fd, sd); } @@ -19991,14 +20017,14 @@ void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) { } void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pItemIdentify_pre ) { + if (HPMHooks.count.HP_clif_pItemIdentify_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20006,9 +20032,9 @@ void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pItemIdentify(fd, sd); } - if( HPMHooks.count.HP_clif_pItemIdentify_post ) { + if (HPMHooks.count.HP_clif_pItemIdentify_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pItemIdentify_post[hIndex].func; postHookFunc(fd, sd); } @@ -20017,14 +20043,14 @@ void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) { } void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSelectArrow_pre ) { + if (HPMHooks.count.HP_clif_pSelectArrow_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20032,9 +20058,9 @@ void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSelectArrow(fd, sd); } - if( HPMHooks.count.HP_clif_pSelectArrow_post ) { + if (HPMHooks.count.HP_clif_pSelectArrow_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSelectArrow_post[hIndex].func; postHookFunc(fd, sd); } @@ -20043,14 +20069,14 @@ void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) { } void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAutoSpell_pre ) { + if (HPMHooks.count.HP_clif_pAutoSpell_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20058,9 +20084,9 @@ void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAutoSpell(fd, sd); } - if( HPMHooks.count.HP_clif_pAutoSpell_post ) { + if (HPMHooks.count.HP_clif_pAutoSpell_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pAutoSpell_post[hIndex].func; postHookFunc(fd, sd); } @@ -20069,14 +20095,14 @@ void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) { } void HP_clif_pUseCard(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pUseCard_pre ) { + if (HPMHooks.count.HP_clif_pUseCard_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20084,9 +20110,9 @@ void HP_clif_pUseCard(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pUseCard(fd, sd); } - if( HPMHooks.count.HP_clif_pUseCard_post ) { + if (HPMHooks.count.HP_clif_pUseCard_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pUseCard_post[hIndex].func; postHookFunc(fd, sd); } @@ -20095,14 +20121,14 @@ void HP_clif_pUseCard(int fd, struct map_session_data *sd) { } void HP_clif_pInsertCard(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pInsertCard_pre ) { + if (HPMHooks.count.HP_clif_pInsertCard_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20110,9 +20136,9 @@ void HP_clif_pInsertCard(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pInsertCard(fd, sd); } - if( HPMHooks.count.HP_clif_pInsertCard_post ) { + if (HPMHooks.count.HP_clif_pInsertCard_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pInsertCard_post[hIndex].func; postHookFunc(fd, sd); } @@ -20121,14 +20147,14 @@ void HP_clif_pInsertCard(int fd, struct map_session_data *sd) { } void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSolveCharName_pre ) { + if (HPMHooks.count.HP_clif_pSolveCharName_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20136,9 +20162,9 @@ void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSolveCharName(fd, sd); } - if( HPMHooks.count.HP_clif_pSolveCharName_post ) { + if (HPMHooks.count.HP_clif_pSolveCharName_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSolveCharName_post[hIndex].func; postHookFunc(fd, sd); } @@ -20147,14 +20173,14 @@ void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) { } void HP_clif_pResetChar(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pResetChar_pre ) { + if (HPMHooks.count.HP_clif_pResetChar_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20162,9 +20188,9 @@ void HP_clif_pResetChar(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pResetChar(fd, sd); } - if( HPMHooks.count.HP_clif_pResetChar_post ) { + if (HPMHooks.count.HP_clif_pResetChar_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pResetChar_post[hIndex].func; postHookFunc(fd, sd); } @@ -20173,14 +20199,14 @@ void HP_clif_pResetChar(int fd, struct map_session_data *sd) { } void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pLocalBroadcast_pre ) { + if (HPMHooks.count.HP_clif_pLocalBroadcast_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20188,9 +20214,9 @@ void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pLocalBroadcast(fd, sd); } - if( HPMHooks.count.HP_clif_pLocalBroadcast_post ) { + if (HPMHooks.count.HP_clif_pLocalBroadcast_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_post[hIndex].func; postHookFunc(fd, sd); } @@ -20199,14 +20225,14 @@ void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) { } void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMoveToKafra_pre ) { + if (HPMHooks.count.HP_clif_pMoveToKafra_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20214,9 +20240,9 @@ void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMoveToKafra(fd, sd); } - if( HPMHooks.count.HP_clif_pMoveToKafra_post ) { + if (HPMHooks.count.HP_clif_pMoveToKafra_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_post[hIndex].func; postHookFunc(fd, sd); } @@ -20225,14 +20251,14 @@ void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) { } void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMoveFromKafra_pre ) { + if (HPMHooks.count.HP_clif_pMoveFromKafra_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20240,9 +20266,9 @@ void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMoveFromKafra(fd, sd); } - if( HPMHooks.count.HP_clif_pMoveFromKafra_post ) { + if (HPMHooks.count.HP_clif_pMoveFromKafra_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_post[hIndex].func; postHookFunc(fd, sd); } @@ -20251,14 +20277,14 @@ void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) { } void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre ) { + if (HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20266,9 +20292,9 @@ void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMoveToKafraFromCart(fd, sd); } - if( HPMHooks.count.HP_clif_pMoveToKafraFromCart_post ) { + if (HPMHooks.count.HP_clif_pMoveToKafraFromCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -20277,14 +20303,14 @@ void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) { } void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre ) { + if (HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20292,9 +20318,9 @@ void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMoveFromKafraToCart(fd, sd); } - if( HPMHooks.count.HP_clif_pMoveFromKafraToCart_post ) { + if (HPMHooks.count.HP_clif_pMoveFromKafraToCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -20303,14 +20329,14 @@ void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) { } void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCloseKafra_pre ) { + if (HPMHooks.count.HP_clif_pCloseKafra_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20318,9 +20344,9 @@ void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCloseKafra(fd, sd); } - if( HPMHooks.count.HP_clif_pCloseKafra_post ) { + if (HPMHooks.count.HP_clif_pCloseKafra_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCloseKafra_post[hIndex].func; postHookFunc(fd, sd); } @@ -20329,14 +20355,14 @@ void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) { } void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pStoragePassword_pre ) { + if (HPMHooks.count.HP_clif_pStoragePassword_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20344,9 +20370,9 @@ void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pStoragePassword(fd, sd); } - if( HPMHooks.count.HP_clif_pStoragePassword_post ) { + if (HPMHooks.count.HP_clif_pStoragePassword_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pStoragePassword_post[hIndex].func; postHookFunc(fd, sd); } @@ -20355,14 +20381,14 @@ void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) { } void HP_clif_pCreateParty(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCreateParty_pre ) { + if (HPMHooks.count.HP_clif_pCreateParty_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20370,9 +20396,9 @@ void HP_clif_pCreateParty(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCreateParty(fd, sd); } - if( HPMHooks.count.HP_clif_pCreateParty_post ) { + if (HPMHooks.count.HP_clif_pCreateParty_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCreateParty_post[hIndex].func; postHookFunc(fd, sd); } @@ -20381,14 +20407,14 @@ void HP_clif_pCreateParty(int fd, struct map_session_data *sd) { } void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCreateParty2_pre ) { + if (HPMHooks.count.HP_clif_pCreateParty2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20396,9 +20422,9 @@ void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCreateParty2(fd, sd); } - if( HPMHooks.count.HP_clif_pCreateParty2_post ) { + if (HPMHooks.count.HP_clif_pCreateParty2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCreateParty2_post[hIndex].func; postHookFunc(fd, sd); } @@ -20407,14 +20433,14 @@ void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) { } void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyInvite_pre ) { + if (HPMHooks.count.HP_clif_pPartyInvite_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20422,9 +20448,9 @@ void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyInvite(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyInvite_post ) { + if (HPMHooks.count.HP_clif_pPartyInvite_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyInvite_post[hIndex].func; postHookFunc(fd, sd); } @@ -20433,14 +20459,14 @@ void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) { } void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyInvite2_pre ) { + if (HPMHooks.count.HP_clif_pPartyInvite2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20448,9 +20474,9 @@ void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyInvite2(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyInvite2_post ) { + if (HPMHooks.count.HP_clif_pPartyInvite2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_post[hIndex].func; postHookFunc(fd, sd); } @@ -20459,14 +20485,14 @@ void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) { } void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReplyPartyInvite_pre ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20474,9 +20500,9 @@ void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReplyPartyInvite(fd, sd); } - if( HPMHooks.count.HP_clif_pReplyPartyInvite_post ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_post[hIndex].func; postHookFunc(fd, sd); } @@ -20485,14 +20511,14 @@ void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) { } void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReplyPartyInvite2_pre ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20500,9 +20526,9 @@ void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReplyPartyInvite2(fd, sd); } - if( HPMHooks.count.HP_clif_pReplyPartyInvite2_post ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_post[hIndex].func; postHookFunc(fd, sd); } @@ -20511,14 +20537,14 @@ void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) { } void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pLeaveParty_pre ) { + if (HPMHooks.count.HP_clif_pLeaveParty_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20526,9 +20552,9 @@ void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pLeaveParty(fd, sd); } - if( HPMHooks.count.HP_clif_pLeaveParty_post ) { + if (HPMHooks.count.HP_clif_pLeaveParty_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pLeaveParty_post[hIndex].func; postHookFunc(fd, sd); } @@ -20537,14 +20563,14 @@ void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) { } void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRemovePartyMember_pre ) { + if (HPMHooks.count.HP_clif_pRemovePartyMember_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20552,9 +20578,9 @@ void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRemovePartyMember(fd, sd); } - if( HPMHooks.count.HP_clif_pRemovePartyMember_post ) { + if (HPMHooks.count.HP_clif_pRemovePartyMember_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_post[hIndex].func; postHookFunc(fd, sd); } @@ -20563,14 +20589,14 @@ void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) { } void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyChangeOption_pre ) { + if (HPMHooks.count.HP_clif_pPartyChangeOption_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20578,9 +20604,9 @@ void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyChangeOption(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyChangeOption_post ) { + if (HPMHooks.count.HP_clif_pPartyChangeOption_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_post[hIndex].func; postHookFunc(fd, sd); } @@ -20589,14 +20615,14 @@ void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) { } void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyMessage_pre ) { + if (HPMHooks.count.HP_clif_pPartyMessage_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20604,9 +20630,9 @@ void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyMessage(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyMessage_post ) { + if (HPMHooks.count.HP_clif_pPartyMessage_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyMessage_post[hIndex].func; postHookFunc(fd, sd); } @@ -20615,14 +20641,14 @@ void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) { } void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyChangeLeader_pre ) { + if (HPMHooks.count.HP_clif_pPartyChangeLeader_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20630,9 +20656,9 @@ void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyChangeLeader(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyChangeLeader_post ) { + if (HPMHooks.count.HP_clif_pPartyChangeLeader_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_post[hIndex].func; postHookFunc(fd, sd); } @@ -20641,14 +20667,14 @@ void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20656,9 +20682,9 @@ void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingRegisterReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20667,14 +20693,14 @@ void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20682,9 +20708,9 @@ void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingSearchReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingSearchReq_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingSearchReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20693,14 +20719,14 @@ void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20708,9 +20734,9 @@ void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingDeleteReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20719,14 +20745,14 @@ void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20734,9 +20760,9 @@ void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingUpdateReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20745,14 +20771,14 @@ void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20760,9 +20786,9 @@ void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitRegisterReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post ) { + if (HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20771,14 +20797,14 @@ void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20786,9 +20812,9 @@ void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitSearchReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post ) { + if (HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20797,14 +20823,14 @@ void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20812,9 +20838,9 @@ void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitDeleteReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post ) { + if (HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20823,14 +20849,14 @@ void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) { } void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre ) { + if (HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20838,9 +20864,9 @@ void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitUpdateReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post ) { + if (HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20849,14 +20875,14 @@ void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) { } void HP_clif_pCloseVending(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCloseVending_pre ) { + if (HPMHooks.count.HP_clif_pCloseVending_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20864,9 +20890,9 @@ void HP_clif_pCloseVending(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCloseVending(fd, sd); } - if( HPMHooks.count.HP_clif_pCloseVending_post ) { + if (HPMHooks.count.HP_clif_pCloseVending_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCloseVending_post[hIndex].func; postHookFunc(fd, sd); } @@ -20875,14 +20901,14 @@ void HP_clif_pCloseVending(int fd, struct map_session_data *sd) { } void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pVendingListReq_pre ) { + if (HPMHooks.count.HP_clif_pVendingListReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20890,9 +20916,9 @@ void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pVendingListReq(fd, sd); } - if( HPMHooks.count.HP_clif_pVendingListReq_post ) { + if (HPMHooks.count.HP_clif_pVendingListReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pVendingListReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20901,14 +20927,14 @@ void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) { } void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPurchaseReq_pre ) { + if (HPMHooks.count.HP_clif_pPurchaseReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20916,9 +20942,9 @@ void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPurchaseReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPurchaseReq_post ) { + if (HPMHooks.count.HP_clif_pPurchaseReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -20927,14 +20953,14 @@ void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) { } void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPurchaseReq2_pre ) { + if (HPMHooks.count.HP_clif_pPurchaseReq2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20942,9 +20968,9 @@ void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPurchaseReq2(fd, sd); } - if( HPMHooks.count.HP_clif_pPurchaseReq2_post ) { + if (HPMHooks.count.HP_clif_pPurchaseReq2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_post[hIndex].func; postHookFunc(fd, sd); } @@ -20953,14 +20979,14 @@ void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) { } void HP_clif_pOpenVending(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pOpenVending_pre ) { + if (HPMHooks.count.HP_clif_pOpenVending_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20968,9 +20994,9 @@ void HP_clif_pOpenVending(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pOpenVending(fd, sd); } - if( HPMHooks.count.HP_clif_pOpenVending_post ) { + if (HPMHooks.count.HP_clif_pOpenVending_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pOpenVending_post[hIndex].func; postHookFunc(fd, sd); } @@ -20979,14 +21005,14 @@ void HP_clif_pOpenVending(int fd, struct map_session_data *sd) { } void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCreateGuild_pre ) { + if (HPMHooks.count.HP_clif_pCreateGuild_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20994,9 +21020,9 @@ void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCreateGuild(fd, sd); } - if( HPMHooks.count.HP_clif_pCreateGuild_post ) { + if (HPMHooks.count.HP_clif_pCreateGuild_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCreateGuild_post[hIndex].func; postHookFunc(fd, sd); } @@ -21005,14 +21031,14 @@ void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) { } void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildCheckMaster_pre ) { + if (HPMHooks.count.HP_clif_pGuildCheckMaster_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21020,9 +21046,9 @@ void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildCheckMaster(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildCheckMaster_post ) { + if (HPMHooks.count.HP_clif_pGuildCheckMaster_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_post[hIndex].func; postHookFunc(fd, sd); } @@ -21031,14 +21057,14 @@ void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) { } void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildRequestInfo_pre ) { + if (HPMHooks.count.HP_clif_pGuildRequestInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21046,9 +21072,9 @@ void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildRequestInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildRequestInfo_post ) { + if (HPMHooks.count.HP_clif_pGuildRequestInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -21057,14 +21083,14 @@ void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) { } void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre ) { + if (HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21072,9 +21098,9 @@ void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildChangePositionInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildChangePositionInfo_post ) { + if (HPMHooks.count.HP_clif_pGuildChangePositionInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -21083,14 +21109,14 @@ void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) { } void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre ) { + if (HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21098,9 +21124,9 @@ void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildChangeMemberPosition(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post ) { + if (HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_post[hIndex].func; postHookFunc(fd, sd); } @@ -21109,14 +21135,14 @@ void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) { } void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildRequestEmblem_pre ) { + if (HPMHooks.count.HP_clif_pGuildRequestEmblem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21124,9 +21150,9 @@ void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildRequestEmblem(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildRequestEmblem_post ) { + if (HPMHooks.count.HP_clif_pGuildRequestEmblem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_post[hIndex].func; postHookFunc(fd, sd); } @@ -21135,14 +21161,14 @@ void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) { } void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildChangeEmblem_pre ) { + if (HPMHooks.count.HP_clif_pGuildChangeEmblem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21150,9 +21176,9 @@ void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildChangeEmblem(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildChangeEmblem_post ) { + if (HPMHooks.count.HP_clif_pGuildChangeEmblem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_post[hIndex].func; postHookFunc(fd, sd); } @@ -21161,14 +21187,14 @@ void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) { } void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildChangeNotice_pre ) { + if (HPMHooks.count.HP_clif_pGuildChangeNotice_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21176,9 +21202,9 @@ void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildChangeNotice(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildChangeNotice_post ) { + if (HPMHooks.count.HP_clif_pGuildChangeNotice_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_post[hIndex].func; postHookFunc(fd, sd); } @@ -21187,14 +21213,14 @@ void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) { } void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildInvite_pre ) { + if (HPMHooks.count.HP_clif_pGuildInvite_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21202,9 +21228,9 @@ void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildInvite(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildInvite_post ) { + if (HPMHooks.count.HP_clif_pGuildInvite_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildInvite_post[hIndex].func; postHookFunc(fd, sd); } @@ -21213,14 +21239,14 @@ void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) { } void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildReplyInvite_pre ) { + if (HPMHooks.count.HP_clif_pGuildReplyInvite_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21228,9 +21254,9 @@ void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildReplyInvite(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildReplyInvite_post ) { + if (HPMHooks.count.HP_clif_pGuildReplyInvite_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_post[hIndex].func; postHookFunc(fd, sd); } @@ -21239,14 +21265,14 @@ void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) { } void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildLeave_pre ) { + if (HPMHooks.count.HP_clif_pGuildLeave_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21254,9 +21280,9 @@ void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildLeave(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildLeave_post ) { + if (HPMHooks.count.HP_clif_pGuildLeave_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildLeave_post[hIndex].func; postHookFunc(fd, sd); } @@ -21265,14 +21291,14 @@ void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) { } void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildExpulsion_pre ) { + if (HPMHooks.count.HP_clif_pGuildExpulsion_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21280,9 +21306,9 @@ void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildExpulsion(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildExpulsion_post ) { + if (HPMHooks.count.HP_clif_pGuildExpulsion_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_post[hIndex].func; postHookFunc(fd, sd); } @@ -21291,14 +21317,14 @@ void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) { } void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildMessage_pre ) { + if (HPMHooks.count.HP_clif_pGuildMessage_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21306,9 +21332,9 @@ void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildMessage(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildMessage_post ) { + if (HPMHooks.count.HP_clif_pGuildMessage_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildMessage_post[hIndex].func; postHookFunc(fd, sd); } @@ -21317,14 +21343,14 @@ void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) { } void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildRequestAlliance_pre ) { + if (HPMHooks.count.HP_clif_pGuildRequestAlliance_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21332,9 +21358,9 @@ void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildRequestAlliance(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildRequestAlliance_post ) { + if (HPMHooks.count.HP_clif_pGuildRequestAlliance_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_post[hIndex].func; postHookFunc(fd, sd); } @@ -21343,14 +21369,14 @@ void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) { } void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildReplyAlliance_pre ) { + if (HPMHooks.count.HP_clif_pGuildReplyAlliance_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21358,9 +21384,9 @@ void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildReplyAlliance(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildReplyAlliance_post ) { + if (HPMHooks.count.HP_clif_pGuildReplyAlliance_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_post[hIndex].func; postHookFunc(fd, sd); } @@ -21369,14 +21395,14 @@ void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) { } void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildDelAlliance_pre ) { + if (HPMHooks.count.HP_clif_pGuildDelAlliance_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21384,9 +21410,9 @@ void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildDelAlliance(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildDelAlliance_post ) { + if (HPMHooks.count.HP_clif_pGuildDelAlliance_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_post[hIndex].func; postHookFunc(fd, sd); } @@ -21395,14 +21421,14 @@ void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) { } void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildOpposition_pre ) { + if (HPMHooks.count.HP_clif_pGuildOpposition_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21410,9 +21436,9 @@ void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildOpposition(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildOpposition_post ) { + if (HPMHooks.count.HP_clif_pGuildOpposition_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_post[hIndex].func; postHookFunc(fd, sd); } @@ -21421,14 +21447,14 @@ void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) { } void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildBreak_pre ) { + if (HPMHooks.count.HP_clif_pGuildBreak_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21436,9 +21462,9 @@ void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildBreak(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildBreak_post ) { + if (HPMHooks.count.HP_clif_pGuildBreak_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildBreak_post[hIndex].func; postHookFunc(fd, sd); } @@ -21447,14 +21473,14 @@ void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) { } void HP_clif_pPetMenu(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPetMenu_pre ) { + if (HPMHooks.count.HP_clif_pPetMenu_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21462,9 +21488,9 @@ void HP_clif_pPetMenu(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPetMenu(fd, sd); } - if( HPMHooks.count.HP_clif_pPetMenu_post ) { + if (HPMHooks.count.HP_clif_pPetMenu_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPetMenu_post[hIndex].func; postHookFunc(fd, sd); } @@ -21473,14 +21499,14 @@ void HP_clif_pPetMenu(int fd, struct map_session_data *sd) { } void HP_clif_pCatchPet(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCatchPet_pre ) { + if (HPMHooks.count.HP_clif_pCatchPet_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21488,9 +21514,9 @@ void HP_clif_pCatchPet(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCatchPet(fd, sd); } - if( HPMHooks.count.HP_clif_pCatchPet_post ) { + if (HPMHooks.count.HP_clif_pCatchPet_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCatchPet_post[hIndex].func; postHookFunc(fd, sd); } @@ -21499,14 +21525,14 @@ void HP_clif_pCatchPet(int fd, struct map_session_data *sd) { } void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSelectEgg_pre ) { + if (HPMHooks.count.HP_clif_pSelectEgg_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21514,9 +21540,9 @@ void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSelectEgg(fd, sd); } - if( HPMHooks.count.HP_clif_pSelectEgg_post ) { + if (HPMHooks.count.HP_clif_pSelectEgg_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSelectEgg_post[hIndex].func; postHookFunc(fd, sd); } @@ -21525,14 +21551,14 @@ void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) { } void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSendEmotion_pre ) { + if (HPMHooks.count.HP_clif_pSendEmotion_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21540,9 +21566,9 @@ void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSendEmotion(fd, sd); } - if( HPMHooks.count.HP_clif_pSendEmotion_post ) { + if (HPMHooks.count.HP_clif_pSendEmotion_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSendEmotion_post[hIndex].func; postHookFunc(fd, sd); } @@ -21551,14 +21577,14 @@ void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) { } void HP_clif_pChangePetName(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChangePetName_pre ) { + if (HPMHooks.count.HP_clif_pChangePetName_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21566,9 +21592,9 @@ void HP_clif_pChangePetName(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChangePetName(fd, sd); } - if( HPMHooks.count.HP_clif_pChangePetName_post ) { + if (HPMHooks.count.HP_clif_pChangePetName_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChangePetName_post[hIndex].func; postHookFunc(fd, sd); } @@ -21577,14 +21603,14 @@ void HP_clif_pChangePetName(int fd, struct map_session_data *sd) { } void HP_clif_pGMKick(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMKick_pre ) { + if (HPMHooks.count.HP_clif_pGMKick_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21592,9 +21618,9 @@ void HP_clif_pGMKick(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMKick(fd, sd); } - if( HPMHooks.count.HP_clif_pGMKick_post ) { + if (HPMHooks.count.HP_clif_pGMKick_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMKick_post[hIndex].func; postHookFunc(fd, sd); } @@ -21603,14 +21629,14 @@ void HP_clif_pGMKick(int fd, struct map_session_data *sd) { } void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMKickAll_pre ) { + if (HPMHooks.count.HP_clif_pGMKickAll_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21618,9 +21644,9 @@ void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMKickAll(fd, sd); } - if( HPMHooks.count.HP_clif_pGMKickAll_post ) { + if (HPMHooks.count.HP_clif_pGMKickAll_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMKickAll_post[hIndex].func; postHookFunc(fd, sd); } @@ -21629,14 +21655,14 @@ void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) { } void HP_clif_pGMShift(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMShift_pre ) { + if (HPMHooks.count.HP_clif_pGMShift_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21644,9 +21670,9 @@ void HP_clif_pGMShift(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMShift(fd, sd); } - if( HPMHooks.count.HP_clif_pGMShift_post ) { + if (HPMHooks.count.HP_clif_pGMShift_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMShift_post[hIndex].func; postHookFunc(fd, sd); } @@ -21655,14 +21681,14 @@ void HP_clif_pGMShift(int fd, struct map_session_data *sd) { } void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMRemove2_pre ) { + if (HPMHooks.count.HP_clif_pGMRemove2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21670,9 +21696,9 @@ void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMRemove2(fd, sd); } - if( HPMHooks.count.HP_clif_pGMRemove2_post ) { + if (HPMHooks.count.HP_clif_pGMRemove2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMRemove2_post[hIndex].func; postHookFunc(fd, sd); } @@ -21681,14 +21707,14 @@ void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) { } void HP_clif_pGMRecall(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMRecall_pre ) { + if (HPMHooks.count.HP_clif_pGMRecall_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21696,9 +21722,9 @@ void HP_clif_pGMRecall(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMRecall(fd, sd); } - if( HPMHooks.count.HP_clif_pGMRecall_post ) { + if (HPMHooks.count.HP_clif_pGMRecall_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMRecall_post[hIndex].func; postHookFunc(fd, sd); } @@ -21707,14 +21733,14 @@ void HP_clif_pGMRecall(int fd, struct map_session_data *sd) { } void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMRecall2_pre ) { + if (HPMHooks.count.HP_clif_pGMRecall2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21722,9 +21748,9 @@ void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMRecall2(fd, sd); } - if( HPMHooks.count.HP_clif_pGMRecall2_post ) { + if (HPMHooks.count.HP_clif_pGMRecall2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMRecall2_post[hIndex].func; postHookFunc(fd, sd); } @@ -21733,14 +21759,14 @@ void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_pGM_Monster_Item_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21748,9 +21774,9 @@ void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGM_Monster_Item(fd, sd); } - if( HPMHooks.count.HP_clif_pGM_Monster_Item_post ) { + if (HPMHooks.count.HP_clif_pGM_Monster_Item_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_post; hIndex++ ) { + 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); } @@ -21759,14 +21785,14 @@ void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) { } void HP_clif_pGMHide(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMHide_pre ) { + if (HPMHooks.count.HP_clif_pGMHide_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21774,9 +21800,9 @@ void HP_clif_pGMHide(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMHide(fd, sd); } - if( HPMHooks.count.HP_clif_pGMHide_post ) { + if (HPMHooks.count.HP_clif_pGMHide_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMHide_post[hIndex].func; postHookFunc(fd, sd); } @@ -21785,14 +21811,14 @@ void HP_clif_pGMHide(int fd, struct map_session_data *sd) { } void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMReqNoChat_pre ) { + if (HPMHooks.count.HP_clif_pGMReqNoChat_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21800,9 +21826,9 @@ void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMReqNoChat(fd, sd); } - if( HPMHooks.count.HP_clif_pGMReqNoChat_post ) { + if (HPMHooks.count.HP_clif_pGMReqNoChat_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_post[hIndex].func; postHookFunc(fd, sd); } @@ -21811,14 +21837,14 @@ void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) { } void HP_clif_pGMRc(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMRc_pre ) { + if (HPMHooks.count.HP_clif_pGMRc_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21826,9 +21852,9 @@ void HP_clif_pGMRc(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMRc(fd, sd); } - if( HPMHooks.count.HP_clif_pGMRc_post ) { + if (HPMHooks.count.HP_clif_pGMRc_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMRc_post[hIndex].func; postHookFunc(fd, sd); } @@ -21837,14 +21863,14 @@ void HP_clif_pGMRc(int fd, struct map_session_data *sd) { } void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMReqAccountName_pre ) { + if (HPMHooks.count.HP_clif_pGMReqAccountName_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21852,9 +21878,9 @@ void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMReqAccountName(fd, sd); } - if( HPMHooks.count.HP_clif_pGMReqAccountName_post ) { + if (HPMHooks.count.HP_clif_pGMReqAccountName_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_post[hIndex].func; postHookFunc(fd, sd); } @@ -21863,14 +21889,14 @@ void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) { } void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMChangeMapType_pre ) { + if (HPMHooks.count.HP_clif_pGMChangeMapType_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21878,9 +21904,9 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMChangeMapType(fd, sd); } - if( HPMHooks.count.HP_clif_pGMChangeMapType_post ) { + if (HPMHooks.count.HP_clif_pGMChangeMapType_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_post[hIndex].func; postHookFunc(fd, sd); } @@ -21889,14 +21915,14 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { } void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMFullStrip_pre ) { + if (HPMHooks.count.HP_clif_pGMFullStrip_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21904,9 +21930,9 @@ void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMFullStrip(fd, sd); } - if( HPMHooks.count.HP_clif_pGMFullStrip_post ) { + if (HPMHooks.count.HP_clif_pGMFullStrip_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_post[hIndex].func; postHookFunc(fd, sd); } @@ -21915,14 +21941,14 @@ void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { } void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPMIgnore_pre ) { + if (HPMHooks.count.HP_clif_pPMIgnore_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21930,9 +21956,9 @@ void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPMIgnore(fd, sd); } - if( HPMHooks.count.HP_clif_pPMIgnore_post ) { + if (HPMHooks.count.HP_clif_pPMIgnore_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPMIgnore_post[hIndex].func; postHookFunc(fd, sd); } @@ -21941,14 +21967,14 @@ void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { } void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPMIgnoreAll_pre ) { + if (HPMHooks.count.HP_clif_pPMIgnoreAll_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21956,9 +21982,9 @@ void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPMIgnoreAll(fd, sd); } - if( HPMHooks.count.HP_clif_pPMIgnoreAll_post ) { + if (HPMHooks.count.HP_clif_pPMIgnoreAll_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_post[hIndex].func; postHookFunc(fd, sd); } @@ -21967,14 +21993,14 @@ void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) { } void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPMIgnoreList_pre ) { + if (HPMHooks.count.HP_clif_pPMIgnoreList_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21982,9 +22008,9 @@ void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPMIgnoreList(fd, sd); } - if( HPMHooks.count.HP_clif_pPMIgnoreList_post ) { + if (HPMHooks.count.HP_clif_pPMIgnoreList_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_post[hIndex].func; postHookFunc(fd, sd); } @@ -21993,14 +22019,14 @@ void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) { } void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNoviceDoriDori_pre ) { + if (HPMHooks.count.HP_clif_pNoviceDoriDori_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22008,9 +22034,9 @@ void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNoviceDoriDori(fd, sd); } - if( HPMHooks.count.HP_clif_pNoviceDoriDori_post ) { + if (HPMHooks.count.HP_clif_pNoviceDoriDori_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_post[hIndex].func; postHookFunc(fd, sd); } @@ -22019,14 +22045,14 @@ void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) { } void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre ) { + if (HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22034,9 +22060,9 @@ void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNoviceExplosionSpirits(fd, sd); } - if( HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post ) { + if (HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_post[hIndex].func; postHookFunc(fd, sd); } @@ -22045,14 +22071,14 @@ void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) { } void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pFriendsListAdd_pre ) { + if (HPMHooks.count.HP_clif_pFriendsListAdd_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22060,9 +22086,9 @@ void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pFriendsListAdd(fd, sd); } - if( HPMHooks.count.HP_clif_pFriendsListAdd_post ) { + if (HPMHooks.count.HP_clif_pFriendsListAdd_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_post[hIndex].func; postHookFunc(fd, sd); } @@ -22071,14 +22097,14 @@ void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) { } void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pFriendsListReply_pre ) { + if (HPMHooks.count.HP_clif_pFriendsListReply_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22086,9 +22112,9 @@ void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pFriendsListReply(fd, sd); } - if( HPMHooks.count.HP_clif_pFriendsListReply_post ) { + if (HPMHooks.count.HP_clif_pFriendsListReply_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_post[hIndex].func; postHookFunc(fd, sd); } @@ -22097,14 +22123,14 @@ void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) { } void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pFriendsListRemove_pre ) { + if (HPMHooks.count.HP_clif_pFriendsListRemove_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22112,9 +22138,9 @@ void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pFriendsListRemove(fd, sd); } - if( HPMHooks.count.HP_clif_pFriendsListRemove_post ) { + if (HPMHooks.count.HP_clif_pFriendsListRemove_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_post[hIndex].func; postHookFunc(fd, sd); } @@ -22123,14 +22149,14 @@ void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) { } void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPVPInfo_pre ) { + if (HPMHooks.count.HP_clif_pPVPInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22138,9 +22164,9 @@ void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPVPInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pPVPInfo_post ) { + if (HPMHooks.count.HP_clif_pPVPInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPVPInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -22149,14 +22175,14 @@ void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) { } void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBlacksmith_pre ) { + if (HPMHooks.count.HP_clif_pBlacksmith_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22164,9 +22190,9 @@ void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBlacksmith(fd, sd); } - if( HPMHooks.count.HP_clif_pBlacksmith_post ) { + if (HPMHooks.count.HP_clif_pBlacksmith_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBlacksmith_post[hIndex].func; postHookFunc(fd, sd); } @@ -22175,14 +22201,14 @@ void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) { } void HP_clif_pAlchemist(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAlchemist_pre ) { + if (HPMHooks.count.HP_clif_pAlchemist_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22190,9 +22216,9 @@ void HP_clif_pAlchemist(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAlchemist(fd, sd); } - if( HPMHooks.count.HP_clif_pAlchemist_post ) { + if (HPMHooks.count.HP_clif_pAlchemist_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pAlchemist_post[hIndex].func; postHookFunc(fd, sd); } @@ -22201,14 +22227,14 @@ void HP_clif_pAlchemist(int fd, struct map_session_data *sd) { } void HP_clif_pTaekwon(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pTaekwon_pre ) { + if (HPMHooks.count.HP_clif_pTaekwon_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22216,9 +22242,9 @@ void HP_clif_pTaekwon(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pTaekwon(fd, sd); } - if( HPMHooks.count.HP_clif_pTaekwon_post ) { + if (HPMHooks.count.HP_clif_pTaekwon_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pTaekwon_post[hIndex].func; postHookFunc(fd, sd); } @@ -22227,14 +22253,14 @@ void HP_clif_pTaekwon(int fd, struct map_session_data *sd) { } void HP_clif_pRankingPk(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRankingPk_pre ) { + if (HPMHooks.count.HP_clif_pRankingPk_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22242,9 +22268,9 @@ void HP_clif_pRankingPk(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRankingPk(fd, sd); } - if( HPMHooks.count.HP_clif_pRankingPk_post ) { + if (HPMHooks.count.HP_clif_pRankingPk_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRankingPk_post[hIndex].func; postHookFunc(fd, sd); } @@ -22253,14 +22279,14 @@ void HP_clif_pRankingPk(int fd, struct map_session_data *sd) { } void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pFeelSaveOk_pre ) { + if (HPMHooks.count.HP_clif_pFeelSaveOk_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22268,9 +22294,9 @@ void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pFeelSaveOk(fd, sd); } - if( HPMHooks.count.HP_clif_pFeelSaveOk_post ) { + if (HPMHooks.count.HP_clif_pFeelSaveOk_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_post[hIndex].func; postHookFunc(fd, sd); } @@ -22279,14 +22305,14 @@ void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) { } void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pChangeHomunculusName_pre ) { + if (HPMHooks.count.HP_clif_pChangeHomunculusName_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22294,9 +22320,9 @@ void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pChangeHomunculusName(fd, sd); } - if( HPMHooks.count.HP_clif_pChangeHomunculusName_post ) { + if (HPMHooks.count.HP_clif_pChangeHomunculusName_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_post[hIndex].func; postHookFunc(fd, sd); } @@ -22305,14 +22331,14 @@ void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) { } void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHomMoveToMaster_pre ) { + if (HPMHooks.count.HP_clif_pHomMoveToMaster_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22320,9 +22346,9 @@ void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHomMoveToMaster(fd, sd); } - if( HPMHooks.count.HP_clif_pHomMoveToMaster_post ) { + if (HPMHooks.count.HP_clif_pHomMoveToMaster_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_post[hIndex].func; postHookFunc(fd, sd); } @@ -22331,14 +22357,14 @@ void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) { } void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHomMoveTo_pre ) { + if (HPMHooks.count.HP_clif_pHomMoveTo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22346,9 +22372,9 @@ void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHomMoveTo(fd, sd); } - if( HPMHooks.count.HP_clif_pHomMoveTo_post ) { + if (HPMHooks.count.HP_clif_pHomMoveTo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_post[hIndex].func; postHookFunc(fd, sd); } @@ -22357,14 +22383,14 @@ void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) { } void HP_clif_pHomAttack(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHomAttack_pre ) { + if (HPMHooks.count.HP_clif_pHomAttack_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22372,9 +22398,9 @@ void HP_clif_pHomAttack(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHomAttack(fd, sd); } - if( HPMHooks.count.HP_clif_pHomAttack_post ) { + if (HPMHooks.count.HP_clif_pHomAttack_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHomAttack_post[hIndex].func; postHookFunc(fd, sd); } @@ -22383,14 +22409,14 @@ void HP_clif_pHomAttack(int fd, struct map_session_data *sd) { } void HP_clif_pHomMenu(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHomMenu_pre ) { + if (HPMHooks.count.HP_clif_pHomMenu_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22398,9 +22424,9 @@ void HP_clif_pHomMenu(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHomMenu(fd, sd); } - if( HPMHooks.count.HP_clif_pHomMenu_post ) { + if (HPMHooks.count.HP_clif_pHomMenu_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHomMenu_post[hIndex].func; postHookFunc(fd, sd); } @@ -22409,14 +22435,14 @@ void HP_clif_pHomMenu(int fd, struct map_session_data *sd) { } void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAutoRevive_pre ) { + if (HPMHooks.count.HP_clif_pAutoRevive_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22424,9 +22450,9 @@ void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAutoRevive(fd, sd); } - if( HPMHooks.count.HP_clif_pAutoRevive_post ) { + if (HPMHooks.count.HP_clif_pAutoRevive_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pAutoRevive_post[hIndex].func; postHookFunc(fd, sd); } @@ -22435,14 +22461,14 @@ void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) { } void HP_clif_pCheck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCheck_pre ) { + if (HPMHooks.count.HP_clif_pCheck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22450,9 +22476,9 @@ void HP_clif_pCheck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCheck(fd, sd); } - if( HPMHooks.count.HP_clif_pCheck_post ) { + if (HPMHooks.count.HP_clif_pCheck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCheck_post[hIndex].func; postHookFunc(fd, sd); } @@ -22461,14 +22487,14 @@ void HP_clif_pCheck(int fd, struct map_session_data *sd) { } void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_refreshinbox_pre ) { + if (HPMHooks.count.HP_clif_pMail_refreshinbox_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22476,9 +22502,9 @@ void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_refreshinbox(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_refreshinbox_post ) { + if (HPMHooks.count.HP_clif_pMail_refreshinbox_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_post; hIndex++ ) { + 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); } @@ -22487,14 +22513,14 @@ void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) { } void HP_clif_pMail_read(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_read_pre ) { + if (HPMHooks.count.HP_clif_pMail_read_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22502,9 +22528,9 @@ void HP_clif_pMail_read(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_read(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_read_post ) { + if (HPMHooks.count.HP_clif_pMail_read_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_post; hIndex++ ) { + 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); } @@ -22513,14 +22539,14 @@ void HP_clif_pMail_read(int fd, struct map_session_data *sd) { } void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_getattach_pre ) { + if (HPMHooks.count.HP_clif_pMail_getattach_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22528,9 +22554,9 @@ void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_getattach(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_getattach_post ) { + if (HPMHooks.count.HP_clif_pMail_getattach_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_post; hIndex++ ) { + 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); } @@ -22539,14 +22565,14 @@ void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) { } void HP_clif_pMail_delete(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_delete_pre ) { + if (HPMHooks.count.HP_clif_pMail_delete_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22554,9 +22580,9 @@ void HP_clif_pMail_delete(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_delete(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_delete_post ) { + if (HPMHooks.count.HP_clif_pMail_delete_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_post; hIndex++ ) { + 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); } @@ -22565,14 +22591,14 @@ void HP_clif_pMail_delete(int fd, struct map_session_data *sd) { } void HP_clif_pMail_return(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_return_pre ) { + if (HPMHooks.count.HP_clif_pMail_return_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22580,9 +22606,9 @@ void HP_clif_pMail_return(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_return(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_return_post ) { + if (HPMHooks.count.HP_clif_pMail_return_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_post; hIndex++ ) { + 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); } @@ -22591,14 +22617,14 @@ void HP_clif_pMail_return(int fd, struct map_session_data *sd) { } void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_setattach_pre ) { + if (HPMHooks.count.HP_clif_pMail_setattach_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22606,9 +22632,9 @@ void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_setattach(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_setattach_post ) { + if (HPMHooks.count.HP_clif_pMail_setattach_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_post; hIndex++ ) { + 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); } @@ -22617,14 +22643,14 @@ void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) { } void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_winopen_pre ) { + if (HPMHooks.count.HP_clif_pMail_winopen_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22632,9 +22658,9 @@ void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_winopen(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_winopen_post ) { + if (HPMHooks.count.HP_clif_pMail_winopen_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_post; hIndex++ ) { + 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); } @@ -22643,14 +22669,14 @@ void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) { } void HP_clif_pMail_send(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMail_send_pre ) { + if (HPMHooks.count.HP_clif_pMail_send_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22658,9 +22684,9 @@ void HP_clif_pMail_send(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMail_send(fd, sd); } - if( HPMHooks.count.HP_clif_pMail_send_post ) { + if (HPMHooks.count.HP_clif_pMail_send_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_post; hIndex++ ) { + 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); } @@ -22669,14 +22695,14 @@ void HP_clif_pMail_send(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_cancelreg_pre ) { + if (HPMHooks.count.HP_clif_pAuction_cancelreg_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22684,9 +22710,9 @@ void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_cancelreg(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_cancelreg_post ) { + if (HPMHooks.count.HP_clif_pAuction_cancelreg_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_post; hIndex++ ) { + 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); } @@ -22695,14 +22721,14 @@ void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_setitem_pre ) { + if (HPMHooks.count.HP_clif_pAuction_setitem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22710,9 +22736,9 @@ void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_setitem(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_setitem_post ) { + if (HPMHooks.count.HP_clif_pAuction_setitem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_post; hIndex++ ) { + 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); } @@ -22721,14 +22747,14 @@ void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_register(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_register_pre ) { + if (HPMHooks.count.HP_clif_pAuction_register_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22736,9 +22762,9 @@ void HP_clif_pAuction_register(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_register(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_register_post ) { + if (HPMHooks.count.HP_clif_pAuction_register_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_post; hIndex++ ) { + 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); } @@ -22747,14 +22773,14 @@ void HP_clif_pAuction_register(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_cancel_pre ) { + if (HPMHooks.count.HP_clif_pAuction_cancel_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22762,9 +22788,9 @@ void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_cancel(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_cancel_post ) { + if (HPMHooks.count.HP_clif_pAuction_cancel_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_post; hIndex++ ) { + 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); } @@ -22773,14 +22799,14 @@ void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_close(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_close_pre ) { + if (HPMHooks.count.HP_clif_pAuction_close_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22788,9 +22814,9 @@ void HP_clif_pAuction_close(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_close(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_close_post ) { + if (HPMHooks.count.HP_clif_pAuction_close_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_post; hIndex++ ) { + 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); } @@ -22799,14 +22825,14 @@ void HP_clif_pAuction_close(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_bid_pre ) { + if (HPMHooks.count.HP_clif_pAuction_bid_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22814,9 +22840,9 @@ void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_bid(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_bid_post ) { + if (HPMHooks.count.HP_clif_pAuction_bid_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_post; hIndex++ ) { + 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); } @@ -22825,14 +22851,14 @@ void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_search(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_search_pre ) { + if (HPMHooks.count.HP_clif_pAuction_search_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22840,9 +22866,9 @@ void HP_clif_pAuction_search(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_search(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_search_post ) { + if (HPMHooks.count.HP_clif_pAuction_search_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_post; hIndex++ ) { + 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); } @@ -22851,14 +22877,14 @@ void HP_clif_pAuction_search(int fd, struct map_session_data *sd) { } void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAuction_buysell_pre ) { + if (HPMHooks.count.HP_clif_pAuction_buysell_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22866,9 +22892,9 @@ void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAuction_buysell(fd, sd); } - if( HPMHooks.count.HP_clif_pAuction_buysell_post ) { + if (HPMHooks.count.HP_clif_pAuction_buysell_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_post; hIndex++ ) { + 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); } @@ -22877,14 +22903,14 @@ void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) { } void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pcashshop_buy_pre ) { + if (HPMHooks.count.HP_clif_pcashshop_buy_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22892,9 +22918,9 @@ void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pcashshop_buy(fd, sd); } - if( HPMHooks.count.HP_clif_pcashshop_buy_post ) { + if (HPMHooks.count.HP_clif_pcashshop_buy_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_post; hIndex++ ) { + 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); } @@ -22903,14 +22929,14 @@ void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) { } void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAdopt_request_pre ) { + if (HPMHooks.count.HP_clif_pAdopt_request_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22918,9 +22944,9 @@ void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAdopt_request(fd, sd); } - if( HPMHooks.count.HP_clif_pAdopt_request_post ) { + if (HPMHooks.count.HP_clif_pAdopt_request_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_post; hIndex++ ) { + 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); } @@ -22929,14 +22955,14 @@ void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) { } void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pAdopt_reply_pre ) { + if (HPMHooks.count.HP_clif_pAdopt_reply_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22944,9 +22970,9 @@ void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pAdopt_reply(fd, sd); } - if( HPMHooks.count.HP_clif_pAdopt_reply_post ) { + if (HPMHooks.count.HP_clif_pAdopt_reply_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_post; hIndex++ ) { + 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); } @@ -22955,14 +22981,14 @@ void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) { } void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pViewPlayerEquip_pre ) { + if (HPMHooks.count.HP_clif_pViewPlayerEquip_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22970,9 +22996,9 @@ void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pViewPlayerEquip(fd, sd); } - if( HPMHooks.count.HP_clif_pViewPlayerEquip_post ) { + if (HPMHooks.count.HP_clif_pViewPlayerEquip_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_post[hIndex].func; postHookFunc(fd, sd); } @@ -22981,14 +23007,14 @@ void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) { } void HP_clif_pEquipTick(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pEquipTick_pre ) { + if (HPMHooks.count.HP_clif_pEquipTick_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22996,9 +23022,9 @@ void HP_clif_pEquipTick(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pEquipTick(fd, sd); } - if( HPMHooks.count.HP_clif_pEquipTick_post ) { + if (HPMHooks.count.HP_clif_pEquipTick_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pEquipTick_post[hIndex].func; postHookFunc(fd, sd); } @@ -23007,14 +23033,14 @@ void HP_clif_pEquipTick(int fd, struct map_session_data *sd) { } void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pquestStateAck_pre ) { + if (HPMHooks.count.HP_clif_pquestStateAck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23022,9 +23048,9 @@ void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pquestStateAck(fd, sd); } - if( HPMHooks.count.HP_clif_pquestStateAck_post ) { + if (HPMHooks.count.HP_clif_pquestStateAck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pquestStateAck_post[hIndex].func; postHookFunc(fd, sd); } @@ -23033,14 +23059,14 @@ void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) { } void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pmercenary_action_pre ) { + if (HPMHooks.count.HP_clif_pmercenary_action_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23048,9 +23074,9 @@ void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pmercenary_action(fd, sd); } - if( HPMHooks.count.HP_clif_pmercenary_action_post ) { + if (HPMHooks.count.HP_clif_pmercenary_action_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_post; hIndex++ ) { + 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); } @@ -23059,14 +23085,14 @@ void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) { } void HP_clif_pBattleChat(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBattleChat_pre ) { + if (HPMHooks.count.HP_clif_pBattleChat_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23074,9 +23100,9 @@ void HP_clif_pBattleChat(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBattleChat(fd, sd); } - if( HPMHooks.count.HP_clif_pBattleChat_post ) { + if (HPMHooks.count.HP_clif_pBattleChat_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBattleChat_post[hIndex].func; postHookFunc(fd, sd); } @@ -23085,14 +23111,14 @@ void HP_clif_pBattleChat(int fd, struct map_session_data *sd) { } void HP_clif_pLessEffect(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pLessEffect_pre ) { + if (HPMHooks.count.HP_clif_pLessEffect_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23100,9 +23126,9 @@ void HP_clif_pLessEffect(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pLessEffect(fd, sd); } - if( HPMHooks.count.HP_clif_pLessEffect_post ) { + if (HPMHooks.count.HP_clif_pLessEffect_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pLessEffect_post[hIndex].func; postHookFunc(fd, sd); } @@ -23111,14 +23137,14 @@ void HP_clif_pLessEffect(int fd, struct map_session_data *sd) { } void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pItemListWindowSelected_pre ) { + if (HPMHooks.count.HP_clif_pItemListWindowSelected_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23126,9 +23152,9 @@ void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pItemListWindowSelected(fd, sd); } - if( HPMHooks.count.HP_clif_pItemListWindowSelected_post ) { + if (HPMHooks.count.HP_clif_pItemListWindowSelected_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_post[hIndex].func; postHookFunc(fd, sd); } @@ -23137,14 +23163,14 @@ void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) { } void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre ) { + if (HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23152,9 +23178,9 @@ void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReqOpenBuyingStore(fd, sd); } - if( HPMHooks.count.HP_clif_pReqOpenBuyingStore_post ) { + if (HPMHooks.count.HP_clif_pReqOpenBuyingStore_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_post[hIndex].func; postHookFunc(fd, sd); } @@ -23163,14 +23189,14 @@ void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) { } void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre ) { + if (HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23178,9 +23204,9 @@ void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReqCloseBuyingStore(fd, sd); } - if( HPMHooks.count.HP_clif_pReqCloseBuyingStore_post ) { + if (HPMHooks.count.HP_clif_pReqCloseBuyingStore_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_post[hIndex].func; postHookFunc(fd, sd); } @@ -23189,14 +23215,14 @@ void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) { } void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReqClickBuyingStore_pre ) { + if (HPMHooks.count.HP_clif_pReqClickBuyingStore_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23204,9 +23230,9 @@ void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReqClickBuyingStore(fd, sd); } - if( HPMHooks.count.HP_clif_pReqClickBuyingStore_post ) { + if (HPMHooks.count.HP_clif_pReqClickBuyingStore_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_post[hIndex].func; postHookFunc(fd, sd); } @@ -23215,14 +23241,14 @@ void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) { } void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre ) { + if (HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23230,9 +23256,9 @@ void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pReqTradeBuyingStore(fd, sd); } - if( HPMHooks.count.HP_clif_pReqTradeBuyingStore_post ) { + if (HPMHooks.count.HP_clif_pReqTradeBuyingStore_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_post[hIndex].func; postHookFunc(fd, sd); } @@ -23241,14 +23267,14 @@ void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) { } void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSearchStoreInfo_pre ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23256,9 +23282,9 @@ void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSearchStoreInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pSearchStoreInfo_post ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -23267,14 +23293,14 @@ void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) { } void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23282,9 +23308,9 @@ void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSearchStoreInfoNextPage(fd, sd); } - if( HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_post[hIndex].func; postHookFunc(fd, sd); } @@ -23293,14 +23319,14 @@ void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) { } void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre ) { + if (HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23308,9 +23334,9 @@ void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCloseSearchStoreInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post ) { + if (HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -23319,14 +23345,14 @@ void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) { } void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23334,9 +23360,9 @@ void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) { HPMHooks.source.clif.pSearchStoreInfoListItemClick(fd, sd); } - if( HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_post[hIndex].func; postHookFunc(fd, sd); } @@ -23345,14 +23371,14 @@ void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) } void HP_clif_pDebug(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pDebug_pre ) { + if (HPMHooks.count.HP_clif_pDebug_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23360,9 +23386,9 @@ void HP_clif_pDebug(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pDebug(fd, sd); } - if( HPMHooks.count.HP_clif_pDebug_post ) { + if (HPMHooks.count.HP_clif_pDebug_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pDebug_post[hIndex].func; postHookFunc(fd, sd); } @@ -23371,14 +23397,14 @@ void HP_clif_pDebug(int fd, struct map_session_data *sd) { } void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSkillSelectMenu_pre ) { + if (HPMHooks.count.HP_clif_pSkillSelectMenu_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23386,9 +23412,9 @@ void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSkillSelectMenu(fd, sd); } - if( HPMHooks.count.HP_clif_pSkillSelectMenu_post ) { + if (HPMHooks.count.HP_clif_pSkillSelectMenu_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_post[hIndex].func; postHookFunc(fd, sd); } @@ -23397,14 +23423,14 @@ void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) { } void HP_clif_pMoveItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pMoveItem_pre ) { + if (HPMHooks.count.HP_clif_pMoveItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23412,9 +23438,9 @@ void HP_clif_pMoveItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pMoveItem(fd, sd); } - if( HPMHooks.count.HP_clif_pMoveItem_post ) { + if (HPMHooks.count.HP_clif_pMoveItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pMoveItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -23423,14 +23449,14 @@ void HP_clif_pMoveItem(int fd, struct map_session_data *sd) { } void HP_clif_pDull(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pDull_pre ) { + if (HPMHooks.count.HP_clif_pDull_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23438,9 +23464,9 @@ void HP_clif_pDull(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pDull(fd, sd); } - if( HPMHooks.count.HP_clif_pDull_post ) { + if (HPMHooks.count.HP_clif_pDull_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pDull_post[hIndex].func; postHookFunc(fd, sd); } @@ -23449,14 +23475,14 @@ void HP_clif_pDull(int fd, struct map_session_data *sd) { } void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBGQueueRegister_pre ) { + if (HPMHooks.count.HP_clif_pBGQueueRegister_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23464,9 +23490,9 @@ void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBGQueueRegister(fd, sd); } - if( HPMHooks.count.HP_clif_pBGQueueRegister_post ) { + if (HPMHooks.count.HP_clif_pBGQueueRegister_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_post[hIndex].func; postHookFunc(fd, sd); } @@ -23475,14 +23501,14 @@ void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { } void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBGQueueCheckState_pre ) { + if (HPMHooks.count.HP_clif_pBGQueueCheckState_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23490,9 +23516,9 @@ void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBGQueueCheckState(fd, sd); } - if( HPMHooks.count.HP_clif_pBGQueueCheckState_post ) { + if (HPMHooks.count.HP_clif_pBGQueueCheckState_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_post[hIndex].func; postHookFunc(fd, sd); } @@ -23501,14 +23527,14 @@ void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) { } void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre ) { + if (HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23516,9 +23542,9 @@ void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBGQueueRevokeReq(fd, sd); } - if( HPMHooks.count.HP_clif_pBGQueueRevokeReq_post ) { + if (HPMHooks.count.HP_clif_pBGQueueRevokeReq_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_post[hIndex].func; postHookFunc(fd, sd); } @@ -23527,14 +23553,14 @@ void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) { } void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre ) { + if (HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23542,9 +23568,9 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBGQueueBattleBeginAck(fd, sd); } - if( HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post ) { + if (HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_post[hIndex].func; postHookFunc(fd, sd); } @@ -23553,14 +23579,14 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { } void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCashShopOpen_pre ) { + if (HPMHooks.count.HP_clif_pCashShopOpen_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23568,9 +23594,9 @@ void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCashShopOpen(fd, sd); } - if( HPMHooks.count.HP_clif_pCashShopOpen_post ) { + if (HPMHooks.count.HP_clif_pCashShopOpen_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_post[hIndex].func; postHookFunc(fd, sd); } @@ -23579,14 +23605,14 @@ void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { } void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCashShopClose_pre ) { + if (HPMHooks.count.HP_clif_pCashShopClose_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23594,9 +23620,9 @@ void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCashShopClose(fd, sd); } - if( HPMHooks.count.HP_clif_pCashShopClose_post ) { + if (HPMHooks.count.HP_clif_pCashShopClose_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCashShopClose_post[hIndex].func; postHookFunc(fd, sd); } @@ -23605,14 +23631,14 @@ void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) { } void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCashShopReqTab_pre ) { + if (HPMHooks.count.HP_clif_pCashShopReqTab_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23620,9 +23646,9 @@ void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCashShopReqTab(fd, sd); } - if( HPMHooks.count.HP_clif_pCashShopReqTab_post ) { + if (HPMHooks.count.HP_clif_pCashShopReqTab_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_post[hIndex].func; postHookFunc(fd, sd); } @@ -23631,14 +23657,14 @@ void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) { } void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCashShopSchedule_pre ) { + if (HPMHooks.count.HP_clif_pCashShopSchedule_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23646,9 +23672,9 @@ void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCashShopSchedule(fd, sd); } - if( HPMHooks.count.HP_clif_pCashShopSchedule_post ) { + if (HPMHooks.count.HP_clif_pCashShopSchedule_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_post[hIndex].func; postHookFunc(fd, sd); } @@ -23657,14 +23683,14 @@ void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) { } void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pCashShopBuy_pre ) { + if (HPMHooks.count.HP_clif_pCashShopBuy_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23672,9 +23698,9 @@ void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pCashShopBuy(fd, sd); } - if( HPMHooks.count.HP_clif_pCashShopBuy_post ) { + if (HPMHooks.count.HP_clif_pCashShopBuy_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_post[hIndex].func; postHookFunc(fd, sd); } @@ -23683,14 +23709,14 @@ void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) { } void HP_clif_pPartyTick(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyTick_pre ) { + if (HPMHooks.count.HP_clif_pPartyTick_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23698,9 +23724,9 @@ void HP_clif_pPartyTick(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyTick(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyTick_post ) { + if (HPMHooks.count.HP_clif_pPartyTick_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyTick_post[hIndex].func; postHookFunc(fd, sd); } @@ -23709,14 +23735,14 @@ void HP_clif_pPartyTick(int fd, struct map_session_data *sd) { } void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGuildInvite2_pre ) { + if (HPMHooks.count.HP_clif_pGuildInvite2_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23724,9 +23750,9 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGuildInvite2(fd, sd); } - if( HPMHooks.count.HP_clif_pGuildInvite2_post ) { + if (HPMHooks.count.HP_clif_pGuildInvite2_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_post[hIndex].func; postHookFunc(fd, sd); } @@ -23735,14 +23761,14 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23750,9 +23776,9 @@ void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingAddFilter(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingAddFilter_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_post[hIndex].func; postHookFunc(fd, sd); } @@ -23761,14 +23787,14 @@ void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23776,9 +23802,9 @@ void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingSubFilter(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingSubFilter_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingSubFilter_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_post[hIndex].func; postHookFunc(fd, sd); } @@ -23787,14 +23813,14 @@ void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23802,9 +23828,9 @@ void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingReqVolunteer(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_post[hIndex].func; postHookFunc(fd, sd); } @@ -23813,14 +23839,14 @@ void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23828,9 +23854,9 @@ void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingRefuseVolunteer(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_post[hIndex].func; postHookFunc(fd, sd); } @@ -23839,14 +23865,14 @@ void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { } void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre ) { + if (HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23854,9 +23880,9 @@ void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyBookingCancelVolunteer(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post ) { + if (HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_post[hIndex].func; postHookFunc(fd, sd); } @@ -23865,14 +23891,14 @@ void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { } void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankDeposit_pre ) { + if (HPMHooks.count.HP_clif_pBankDeposit_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankDeposit_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23880,9 +23906,9 @@ void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankDeposit(fd, sd); } - if( HPMHooks.count.HP_clif_pBankDeposit_post ) { + if (HPMHooks.count.HP_clif_pBankDeposit_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankDeposit_post[hIndex].func; postHookFunc(fd, sd); } @@ -23891,14 +23917,14 @@ void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) { } void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankWithdraw_pre ) { + if (HPMHooks.count.HP_clif_pBankWithdraw_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankWithdraw_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23906,9 +23932,9 @@ void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankWithdraw(fd, sd); } - if( HPMHooks.count.HP_clif_pBankWithdraw_post ) { + if (HPMHooks.count.HP_clif_pBankWithdraw_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankWithdraw_post[hIndex].func; postHookFunc(fd, sd); } @@ -23917,14 +23943,14 @@ void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) { } void HP_clif_pBankCheck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankCheck_pre ) { + if (HPMHooks.count.HP_clif_pBankCheck_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankCheck_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23932,9 +23958,9 @@ void HP_clif_pBankCheck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankCheck(fd, sd); } - if( HPMHooks.count.HP_clif_pBankCheck_post ) { + if (HPMHooks.count.HP_clif_pBankCheck_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankCheck_post[hIndex].func; postHookFunc(fd, sd); } @@ -23943,14 +23969,14 @@ void HP_clif_pBankCheck(int fd, struct map_session_data *sd) { } void HP_clif_pBankOpen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankOpen_pre ) { + if (HPMHooks.count.HP_clif_pBankOpen_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankOpen_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23958,9 +23984,9 @@ void HP_clif_pBankOpen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankOpen(fd, sd); } - if( HPMHooks.count.HP_clif_pBankOpen_post ) { + if (HPMHooks.count.HP_clif_pBankOpen_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankOpen_post[hIndex].func; postHookFunc(fd, sd); } @@ -23969,14 +23995,14 @@ void HP_clif_pBankOpen(int fd, struct map_session_data *sd) { } void HP_clif_pBankClose(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankClose_pre ) { + if (HPMHooks.count.HP_clif_pBankClose_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankClose_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23984,9 +24010,9 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankClose(fd, sd); } - if( HPMHooks.count.HP_clif_pBankClose_post ) { + if (HPMHooks.count.HP_clif_pBankClose_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankClose_post[hIndex].func; postHookFunc(fd, sd); } @@ -23995,14 +24021,14 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) { } void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteOpen_pre ) { + if (HPMHooks.count.HP_clif_pRouletteOpen_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24010,9 +24036,9 @@ void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteOpen(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteOpen_post ) { + if (HPMHooks.count.HP_clif_pRouletteOpen_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_post[hIndex].func; postHookFunc(fd, sd); } @@ -24021,14 +24047,14 @@ void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { } void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteInfo_pre ) { + if (HPMHooks.count.HP_clif_pRouletteInfo_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24036,9 +24062,9 @@ void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteInfo_post ) { + if (HPMHooks.count.HP_clif_pRouletteInfo_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_post[hIndex].func; postHookFunc(fd, sd); } @@ -24047,14 +24073,14 @@ void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { } void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteClose_pre ) { + if (HPMHooks.count.HP_clif_pRouletteClose_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteClose_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24062,9 +24088,9 @@ void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteClose(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteClose_post ) { + if (HPMHooks.count.HP_clif_pRouletteClose_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteClose_post[hIndex].func; postHookFunc(fd, sd); } @@ -24073,14 +24099,14 @@ void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { } void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteGenerate_pre ) { + if (HPMHooks.count.HP_clif_pRouletteGenerate_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24088,9 +24114,9 @@ void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteGenerate(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteGenerate_post ) { + if (HPMHooks.count.HP_clif_pRouletteGenerate_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_post[hIndex].func; postHookFunc(fd, sd); } @@ -24099,14 +24125,14 @@ void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { } void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteRecvItem_pre ) { + if (HPMHooks.count.HP_clif_pRouletteRecvItem_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24114,9 +24140,9 @@ void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteRecvItem(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteRecvItem_post ) { + if (HPMHooks.count.HP_clif_pRouletteRecvItem_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_post[hIndex].func; postHookFunc(fd, sd); } @@ -24125,14 +24151,14 @@ void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { } void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCShopClosed_pre ) { + if (HPMHooks.count.HP_clif_pNPCShopClosed_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCShopClosed_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24140,9 +24166,9 @@ void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCShopClosed(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCShopClosed_post ) { + if (HPMHooks.count.HP_clif_pNPCShopClosed_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCShopClosed_post[hIndex].func; postHookFunc(fd, sd); } @@ -24151,14 +24177,14 @@ void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { } void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCMarketClosed_pre ) { + if (HPMHooks.count.HP_clif_pNPCMarketClosed_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCMarketClosed_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24166,9 +24192,9 @@ void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCMarketClosed(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCMarketClosed_post ) { + if (HPMHooks.count.HP_clif_pNPCMarketClosed_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCMarketClosed_post[hIndex].func; postHookFunc(fd, sd); } @@ -24177,14 +24203,14 @@ void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) { } void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCMarketPurchase_pre ) { + if (HPMHooks.count.HP_clif_pNPCMarketPurchase_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCMarketPurchase_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24192,51 +24218,52 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCMarketPurchase(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCMarketPurchase_post ) { + if (HPMHooks.count.HP_clif_pNPCMarketPurchase_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCMarketPurchase_post[hIndex].func; postHookFunc(fd, sd); } } return; } -void HP_clif_add_random_options(unsigned char *buf, struct item *item) { +int HP_clif_add_item_options(struct ItemOptions *buf, const struct item *it) { int hIndex = 0; - if( HPMHooks.count.HP_clif_add_random_options_pre ) { - void (*preHookFunc) (unsigned char **buf, struct item **item); + int retVal___ = 0; + if (HPMHooks.count.HP_clif_add_item_options_pre > 0) { + int (*preHookFunc) (struct ItemOptions **buf, const struct item **it); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_add_random_options_pre[hIndex].func; - preHookFunc(&buf, &item); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_add_item_options_pre[hIndex].func; + retVal___ = preHookFunc(&buf, &it); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.clif.add_random_options(buf, item); + retVal___ = HPMHooks.source.clif.add_item_options(buf, it); } - if( HPMHooks.count.HP_clif_add_random_options_post ) { - void (*postHookFunc) (unsigned char *buf, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_add_random_options_post[hIndex].func; - postHookFunc(buf, item); + if (HPMHooks.count.HP_clif_add_item_options_post > 0) { + int (*postHookFunc) (int retVal___, struct ItemOptions *buf, const struct item *it); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_add_item_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, it); } } - return; + return retVal___; } void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHotkeyRowShift_pre ) { + if (HPMHooks.count.HP_clif_pHotkeyRowShift_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24244,9 +24271,9 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pHotkeyRowShift(fd, sd); } - if( HPMHooks.count.HP_clif_pHotkeyRowShift_post ) { + if (HPMHooks.count.HP_clif_pHotkeyRowShift_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_post[hIndex].func; postHookFunc(fd, sd); } @@ -24255,14 +24282,14 @@ void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { } void HP_clif_dressroom_open(struct map_session_data *sd, int view) { int hIndex = 0; - if( HPMHooks.count.HP_clif_dressroom_open_pre ) { + if (HPMHooks.count.HP_clif_dressroom_open_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *view); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_dressroom_open_pre[hIndex].func; preHookFunc(&sd, &view); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24270,9 +24297,9 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) { { HPMHooks.source.clif.dressroom_open(sd, view); } - if( HPMHooks.count.HP_clif_dressroom_open_post ) { + if (HPMHooks.count.HP_clif_dressroom_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int view); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dressroom_open_post[hIndex].func; postHookFunc(sd, view); } @@ -24281,14 +24308,14 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) { } void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre ) { + if (HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24296,9 +24323,9 @@ void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pOneClick_ItemIdentify(fd, sd); } - if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post ) { + if (HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_post[hIndex].func; postHookFunc(fd, sd); } @@ -24307,14 +24334,14 @@ void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { } void HP_clif_selectcart(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_selectcart_pre ) { + if (HPMHooks.count.HP_clif_selectcart_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_selectcart_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24322,9 +24349,9 @@ void HP_clif_selectcart(struct map_session_data *sd) { { HPMHooks.source.clif.selectcart(sd); } - if( HPMHooks.count.HP_clif_selectcart_post ) { + if (HPMHooks.count.HP_clif_selectcart_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_selectcart_post[hIndex].func; postHookFunc(sd); } @@ -24333,14 +24360,14 @@ void HP_clif_selectcart(struct map_session_data *sd) { } void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSelectCart_pre ) { + if (HPMHooks.count.HP_clif_pSelectCart_pre > 0) { void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSelectCart_pre[hIndex].func; preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24348,9 +24375,9 @@ void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSelectCart(fd, sd); } - if( HPMHooks.count.HP_clif_pSelectCart_post ) { + if (HPMHooks.count.HP_clif_pSelectCart_post > 0) { void (*postHookFunc) (int fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSelectCart_post[hIndex].func; postHookFunc(fd, sd); } @@ -24360,14 +24387,14 @@ void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { const char* HP_clif_get_bl_name(const struct block_list *bl) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_clif_get_bl_name_pre ) { + if (HPMHooks.count.HP_clif_get_bl_name_pre > 0) { const char* (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_get_bl_name_pre[hIndex].func; retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24375,26 +24402,728 @@ const char* HP_clif_get_bl_name(const struct block_list *bl) { { retVal___ = HPMHooks.source.clif.get_bl_name(bl); } - if( HPMHooks.count.HP_clif_get_bl_name_post ) { + if (HPMHooks.count.HP_clif_get_bl_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_get_bl_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } +void HP_clif_pRodexOpenWriteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexOpenWriteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenWriteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexOpenWriteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexOpenWriteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexOpenWriteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenWriteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexOpenWriteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_open_write_mail_pre > 0) { + void (*preHookFunc) (int *fd, const char **receiver_name, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_open_write_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_open_write_mail_pre[hIndex].func; + preHookFunc(&fd, &receiver_name, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_open_write_mail(fd, receiver_name, result); + } + if (HPMHooks.count.HP_clif_rodex_open_write_mail_post > 0) { + void (*postHookFunc) (int fd, const char *receiver_name, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_open_write_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_open_write_mail_post[hIndex].func; + postHookFunc(fd, receiver_name, result); + } + } + return; +} +void HP_clif_pRodexAddItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexAddItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexAddItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexAddItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexAddItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexAddItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexAddItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexAddItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_add_item_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_add_item_result(sd, idx, amount, result); + } + if (HPMHooks.count.HP_clif_rodex_add_item_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_post[hIndex].func; + postHookFunc(sd, idx, amount, result); + } + } + return; +} +void HP_clif_pRodexRemoveItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRemoveItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRemoveItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRemoveItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRemoveItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRemoveItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRemoveItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRemoveItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_remove_item_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_remove_item_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_remove_item_result_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_remove_item_result(sd, idx, amount); + } + if (HPMHooks.count.HP_clif_rodex_remove_item_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_remove_item_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_remove_item_result_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_clif_pRodexSendMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexSendMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexSendMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexSendMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexSendMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexSendMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexSendMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexSendMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mail_result_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mail_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mail_result_pre[hIndex].func; + preHookFunc(&fd, &sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mail_result(fd, sd, result); + } + if (HPMHooks.count.HP_clif_rodex_send_mail_result_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mail_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mail_result_post[hIndex].func; + postHookFunc(fd, sd, result); + } + } + return; +} +void HP_clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_type, int64 page_start) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_maillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *open_type, int64 *page_start); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_maillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_maillist_pre[hIndex].func; + preHookFunc(&fd, &sd, &open_type, &page_start); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_maillist(fd, sd, open_type, page_start); + } + if (HPMHooks.count.HP_clif_rodex_send_maillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_maillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_maillist_post[hIndex].func; + postHookFunc(fd, sd, open_type, page_start); + } + } + return; +} +void HP_clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_refresh_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_refresh_pre[hIndex].func; + preHookFunc(&fd, &sd, &open_type, &count); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_refresh(fd, sd, open_type, count); + } + if (HPMHooks.count.HP_clif_rodex_send_refresh_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 open_type, int count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_refresh_post[hIndex].func; + postHookFunc(fd, sd, open_type, count); + } + } + return; +} +void HP_clif_rodex_send_mails_all(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mails_all_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mails_all(fd, sd); + } + if (HPMHooks.count.HP_clif_rodex_send_mails_all_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexReadMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexReadMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexReadMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexReadMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexReadMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexReadMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexReadMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexReadMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_read_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_read_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_read_mail_pre[hIndex].func; + preHookFunc(&sd, &opentype, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_read_mail(sd, opentype, msg); + } + if (HPMHooks.count.HP_clif_rodex_read_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_read_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_read_mail_post[hIndex].func; + postHookFunc(sd, opentype, msg); + } + } + return; +} +void HP_clif_pRodexNextMaillist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexNextMaillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexNextMaillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexNextMaillist_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexNextMaillist(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexNextMaillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexNextMaillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexNextMaillist_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCloseMailbox(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCloseMailbox_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCloseMailbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCloseMailbox_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCloseMailbox(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCloseMailbox_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCloseMailbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCloseMailbox_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCancelWriteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCancelWriteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCancelWriteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCancelWriteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCancelWriteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCancelWriteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCancelWriteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCancelWriteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexOpenMailbox(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexOpenMailbox_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenMailbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexOpenMailbox_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexOpenMailbox(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexOpenMailbox_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenMailbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexOpenMailbox_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCheckName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCheckName_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCheckName_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCheckName(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCheckName_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCheckName_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCheckName_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func; + preHookFunc(&sd, &char_id, &class_, &base_level, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name); + } + if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func; + postHookFunc(sd, char_id, class_, base_level, name); + } + } + return; +} +void HP_clif_pRodexDeleteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexDeleteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexDeleteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexDeleteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexDeleteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexDeleteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexDeleteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexDeleteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_delete_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_delete_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_delete_mail_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_delete_mail(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_clif_rodex_delete_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_delete_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_delete_mail_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_clif_pRodexRefreshMaillist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRefreshMaillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRefreshMaillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRefreshMaillist_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRefreshMaillist(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRefreshMaillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRefreshMaillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRefreshMaillist_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexRequestZeny(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRequestZeny_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestZeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRequestZeny_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRequestZeny(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRequestZeny_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestZeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRequestZeny_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_request_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_request_zeny(sd, opentype, mail_id, result); + } + if (HPMHooks.count.HP_clif_rodex_request_zeny_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_post[hIndex].func; + postHookFunc(sd, opentype, mail_id, result); + } + } + return; +} +void HP_clif_pRodexRequestItems(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRequestItems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRequestItems_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRequestItems(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRequestItems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRequestItems_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_request_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_request_items_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_request_items(sd, opentype, mail_id, result); + } + if (HPMHooks.count.HP_clif_rodex_request_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_request_items_post[hIndex].func; + postHookFunc(sd, opentype, mail_id, result); + } + } + return; +} +void HP_clif_rodex_icon(int fd, bool show) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_icon_pre > 0) { + void (*preHookFunc) (int *fd, bool *show); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_icon_pre[hIndex].func; + preHookFunc(&fd, &show); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_icon(fd, show); + } + if (HPMHooks.count.HP_clif_rodex_icon_post > 0) { + void (*postHookFunc) (int fd, bool show); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_icon_post[hIndex].func; + postHookFunc(fd, show); + } + } + return; +} /* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24402,9 +25131,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -24413,14 +25142,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24428,9 +25157,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -24440,14 +25169,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24455,9 +25184,9 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } @@ -24467,14 +25196,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24482,9 +25211,9 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; retVal___ = postHookFunc(retVal___, argc, argv, options); } @@ -24494,14 +25223,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24509,9 +25238,9 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, current_arg, argc); } @@ -24521,14 +25250,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24536,9 +25265,9 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } @@ -24548,14 +25277,14 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { /* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24563,9 +25292,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -24574,14 +25303,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24589,9 +25318,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -24600,14 +25329,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24615,9 +25344,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -24626,14 +25355,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24641,9 +25370,9 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } @@ -24653,14 +25382,14 @@ void HP_console_display_gplnotice(void) { /* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24668,9 +25397,9 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } @@ -24681,14 +25410,14 @@ void HP_core_shutdown_callback(void) { enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24696,9 +25425,9 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -24708,14 +25437,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24723,9 +25452,9 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -24735,14 +25464,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24750,9 +25479,9 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -24762,14 +25491,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24777,9 +25506,9 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, options); } @@ -24789,14 +25518,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24804,9 +25533,9 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; retVal___ = postHookFunc(retVal___, which); } @@ -24816,14 +25545,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { + if (HPMHooks.count.HP_DB_alloc_pre > 0) { struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24831,9 +25560,9 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } @@ -24843,14 +25572,14 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT union DBKey HP_DB_i2key(int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2key_pre ) { + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24858,9 +25587,9 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24870,14 +25599,14 @@ union DBKey HP_DB_i2key(int key) { union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2key_pre ) { + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24885,9 +25614,9 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24897,14 +25626,14 @@ union DBKey HP_DB_ui2key(unsigned int key) { union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_str2key_pre ) { + if (HPMHooks.count.HP_DB_str2key_pre > 0) { union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24912,9 +25641,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24924,14 +25653,14 @@ union DBKey HP_DB_str2key(const char *key) { union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i642key_pre ) { + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24939,9 +25668,9 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24951,14 +25680,14 @@ union DBKey HP_DB_i642key(int64 key) { union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; union DBKey retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui642key_pre ) { + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24966,9 +25695,9 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24978,14 +25707,14 @@ union DBKey HP_DB_ui642key(uint64 key) { struct DBData HP_DB_i2data(int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_i2data_pre ) { + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24993,9 +25722,9 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25005,14 +25734,14 @@ struct DBData HP_DB_i2data(int data) { struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ui2data_pre ) { + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25020,9 +25749,9 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25032,14 +25761,14 @@ struct DBData HP_DB_ui2data(unsigned int data) { struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_DB_ptr2data_pre ) { + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25047,9 +25776,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25059,14 +25788,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { + if (HPMHooks.count.HP_DB_data2i_pre > 0) { int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25074,9 +25803,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25086,14 +25815,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25101,9 +25830,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25113,14 +25842,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25128,9 +25857,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -25139,14 +25868,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25154,9 +25883,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -25165,14 +25894,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25180,9 +25909,9 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } @@ -25192,14 +25921,14 @@ void HP_DB_final(void) { /* des_interface */ void HP_des_decrypt_block(struct des_bit64 *block) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_block_pre ) { + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { void (*preHookFunc) (struct des_bit64 **block); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; preHookFunc(&block); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25207,9 +25936,9 @@ void HP_des_decrypt_block(struct des_bit64 *block) { { HPMHooks.source.des.decrypt_block(block); } - if( HPMHooks.count.HP_des_decrypt_block_post ) { + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { void (*postHookFunc) (struct des_bit64 *block); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; postHookFunc(block); } @@ -25218,14 +25947,14 @@ void HP_des_decrypt_block(struct des_bit64 *block) { } void HP_des_decrypt(unsigned char *data, size_t size) { int hIndex = 0; - if( HPMHooks.count.HP_des_decrypt_pre ) { + if (HPMHooks.count.HP_des_decrypt_pre > 0) { void (*preHookFunc) (unsigned char **data, size_t *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; preHookFunc(&data, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25233,9 +25962,9 @@ void HP_des_decrypt(unsigned char *data, size_t size) { { HPMHooks.source.des.decrypt(data, size); } - if( HPMHooks.count.HP_des_decrypt_post ) { + if (HPMHooks.count.HP_des_decrypt_post > 0) { void (*postHookFunc) (unsigned char *data, size_t size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; postHookFunc(data, size); } @@ -25246,14 +25975,14 @@ void HP_des_decrypt(unsigned char *data, size_t size) { int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_duel_create_pre ) { + if (HPMHooks.count.HP_duel_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const unsigned int *maxpl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25261,9 +25990,9 @@ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { { retVal___ = HPMHooks.source.duel.create(sd, maxpl); } - if( HPMHooks.count.HP_duel_create_post ) { + if (HPMHooks.count.HP_duel_create_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const unsigned int maxpl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_post; hIndex++ ) { + 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); } @@ -25272,14 +26001,14 @@ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { } 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 ) { + if (HPMHooks.count.HP_duel_invite_pre > 0) { void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd, struct map_session_data **target_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25287,9 +26016,9 @@ void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct { HPMHooks.source.duel.invite(did, sd, target_sd); } - if( HPMHooks.count.HP_duel_invite_post ) { + if (HPMHooks.count.HP_duel_invite_post > 0) { 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++ ) { + 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); } @@ -25298,14 +26027,14 @@ void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct } void HP_duel_accept(const unsigned int did, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_duel_accept_pre ) { + if (HPMHooks.count.HP_duel_accept_pre > 0) { void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25313,9 +26042,9 @@ void HP_duel_accept(const unsigned int did, struct map_session_data *sd) { { HPMHooks.source.duel.accept(did, sd); } - if( HPMHooks.count.HP_duel_accept_post ) { + if (HPMHooks.count.HP_duel_accept_post > 0) { void (*postHookFunc) (const unsigned int did, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_accept_post[hIndex].func; postHookFunc(did, sd); } @@ -25324,14 +26053,14 @@ void HP_duel_accept(const unsigned int did, struct map_session_data *sd) { } void HP_duel_reject(const unsigned int did, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_duel_reject_pre ) { + if (HPMHooks.count.HP_duel_reject_pre > 0) { void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25339,9 +26068,9 @@ void HP_duel_reject(const unsigned int did, struct map_session_data *sd) { { HPMHooks.source.duel.reject(did, sd); } - if( HPMHooks.count.HP_duel_reject_post ) { + if (HPMHooks.count.HP_duel_reject_post > 0) { void (*postHookFunc) (const unsigned int did, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_reject_post[hIndex].func; postHookFunc(did, sd); } @@ -25350,14 +26079,14 @@ void HP_duel_reject(const unsigned int did, struct map_session_data *sd) { } void HP_duel_leave(const unsigned int did, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_duel_leave_pre ) { + if (HPMHooks.count.HP_duel_leave_pre > 0) { void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25365,9 +26094,9 @@ void HP_duel_leave(const unsigned int did, struct map_session_data *sd) { { HPMHooks.source.duel.leave(did, sd); } - if( HPMHooks.count.HP_duel_leave_post ) { + if (HPMHooks.count.HP_duel_leave_post > 0) { void (*postHookFunc) (const unsigned int did, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_leave_post[hIndex].func; postHookFunc(did, sd); } @@ -25376,14 +26105,14 @@ void HP_duel_leave(const unsigned int did, struct map_session_data *sd) { } void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_duel_showinfo_pre ) { + if (HPMHooks.count.HP_duel_showinfo_pre > 0) { void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25391,9 +26120,9 @@ void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { { HPMHooks.source.duel.showinfo(did, sd); } - if( HPMHooks.count.HP_duel_showinfo_post ) { + if (HPMHooks.count.HP_duel_showinfo_post > 0) { void (*postHookFunc) (const unsigned int did, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_showinfo_post[hIndex].func; postHookFunc(did, sd); } @@ -25403,14 +26132,14 @@ void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { int HP_duel_checktime(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_duel_checktime_pre ) { + if (HPMHooks.count.HP_duel_checktime_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25418,9 +26147,9 @@ int HP_duel_checktime(struct map_session_data *sd) { { retVal___ = HPMHooks.source.duel.checktime(sd); } - if( HPMHooks.count.HP_duel_checktime_post ) { + if (HPMHooks.count.HP_duel_checktime_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_checktime_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -25429,14 +26158,14 @@ int HP_duel_checktime(struct map_session_data *sd) { } void HP_duel_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_duel_init_pre ) { + if (HPMHooks.count.HP_duel_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25444,9 +26173,9 @@ void HP_duel_init(bool minimal) { { HPMHooks.source.duel.init(minimal); } - if( HPMHooks.count.HP_duel_init_post ) { + if (HPMHooks.count.HP_duel_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_init_post[hIndex].func; postHookFunc(minimal); } @@ -25455,14 +26184,14 @@ void HP_duel_init(bool minimal) { } void HP_duel_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_duel_final_pre ) { + if (HPMHooks.count.HP_duel_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25470,9 +26199,9 @@ void HP_duel_final(void) { { HPMHooks.source.duel.final(); } - if( HPMHooks.count.HP_duel_final_post ) { + if (HPMHooks.count.HP_duel_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_final_post[hIndex].func; postHookFunc(); } @@ -25483,14 +26212,14 @@ void HP_duel_final(void) { int HP_elemental_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_init_pre ) { + if (HPMHooks.count.HP_elemental_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25498,9 +26227,9 @@ int HP_elemental_init(bool minimal) { { retVal___ = HPMHooks.source.elemental.init(minimal); } - if( HPMHooks.count.HP_elemental_init_post ) { + if (HPMHooks.count.HP_elemental_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -25509,14 +26238,14 @@ int HP_elemental_init(bool minimal) { } void HP_elemental_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_final_pre ) { + if (HPMHooks.count.HP_elemental_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25524,9 +26253,9 @@ void HP_elemental_final(void) { { HPMHooks.source.elemental.final(); } - if( HPMHooks.count.HP_elemental_final_post ) { + if (HPMHooks.count.HP_elemental_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_final_post[hIndex].func; postHookFunc(); } @@ -25536,14 +26265,14 @@ void HP_elemental_final(void) { bool HP_elemental_class(int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_elemental_class_pre ) { + if (HPMHooks.count.HP_elemental_class_pre > 0) { bool (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25551,9 +26280,9 @@ bool HP_elemental_class(int class_) { { retVal___ = HPMHooks.source.elemental.class(class_); } - if( HPMHooks.count.HP_elemental_class_post ) { + if (HPMHooks.count.HP_elemental_class_post > 0) { bool (*postHookFunc) (bool retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_class_post[hIndex].func; retVal___ = postHookFunc(retVal___, class_); } @@ -25563,14 +26292,14 @@ bool HP_elemental_class(int class_) { 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 ) { + if (HPMHooks.count.HP_elemental_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25578,9 +26307,9 @@ struct view_data* HP_elemental_get_viewdata(int class_) { { retVal___ = HPMHooks.source.elemental.get_viewdata(class_); } - if( HPMHooks.count.HP_elemental_get_viewdata_post ) { + if (HPMHooks.count.HP_elemental_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_post; hIndex++ ) { + 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_); } @@ -25590,14 +26319,14 @@ struct view_data* HP_elemental_get_viewdata(int class_) { int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_create_pre ) { + if (HPMHooks.count.HP_elemental_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *class_, unsigned int *lifetime); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25605,9 +26334,9 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li { retVal___ = HPMHooks.source.elemental.create(sd, class_, lifetime); } - if( HPMHooks.count.HP_elemental_create_post ) { + if (HPMHooks.count.HP_elemental_create_post > 0) { 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++ ) { + 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); } @@ -25617,14 +26346,14 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_data_received_pre ) { + if (HPMHooks.count.HP_elemental_data_received_pre > 0) { int (*preHookFunc) (const struct s_elemental **ele, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25632,9 +26361,9 @@ int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { { retVal___ = HPMHooks.source.elemental.data_received(ele, flag); } - if( HPMHooks.count.HP_elemental_data_received_post ) { + if (HPMHooks.count.HP_elemental_data_received_post > 0) { int (*postHookFunc) (int retVal___, const struct s_elemental *ele, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_post; hIndex++ ) { + 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); } @@ -25644,14 +26373,14 @@ int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { int HP_elemental_save(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_save_pre ) { + if (HPMHooks.count.HP_elemental_save_pre > 0) { int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25659,9 +26388,9 @@ int HP_elemental_save(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.save(ed); } - if( HPMHooks.count.HP_elemental_save_post ) { + if (HPMHooks.count.HP_elemental_save_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25671,14 +26400,14 @@ int HP_elemental_save(struct elemental_data *ed) { int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_change_mode_ack_pre ) { + if (HPMHooks.count.HP_elemental_change_mode_ack_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, int *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25686,9 +26415,9 @@ int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { { retVal___ = HPMHooks.source.elemental.change_mode_ack(ed, mode); } - if( HPMHooks.count.HP_elemental_change_mode_ack_post ) { + if (HPMHooks.count.HP_elemental_change_mode_ack_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, int mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_post; hIndex++ ) { + 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); } @@ -25698,14 +26427,14 @@ int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { int HP_elemental_change_mode(struct elemental_data *ed, uint32 mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_change_mode_pre ) { + if (HPMHooks.count.HP_elemental_change_mode_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25713,9 +26442,9 @@ int HP_elemental_change_mode(struct elemental_data *ed, uint32 mode) { { retVal___ = HPMHooks.source.elemental.change_mode(ed, mode); } - if( HPMHooks.count.HP_elemental_change_mode_post ) { + if (HPMHooks.count.HP_elemental_change_mode_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint32 mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_post; hIndex++ ) { + 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); } @@ -25724,14 +26453,14 @@ int HP_elemental_change_mode(struct elemental_data *ed, uint32 mode) { } void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_heal_pre ) { + if (HPMHooks.count.HP_elemental_heal_pre > 0) { void (*preHookFunc) (struct elemental_data **ed, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25739,9 +26468,9 @@ void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { { HPMHooks.source.elemental.heal(ed, hp, sp); } - if( HPMHooks.count.HP_elemental_heal_post ) { + if (HPMHooks.count.HP_elemental_heal_post > 0) { void (*postHookFunc) (struct elemental_data *ed, int hp, int sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_heal_post[hIndex].func; postHookFunc(ed, hp, sp); } @@ -25751,14 +26480,14 @@ void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { int HP_elemental_dead(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_dead_pre ) { + if (HPMHooks.count.HP_elemental_dead_pre > 0) { int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25766,9 +26495,9 @@ int HP_elemental_dead(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.dead(ed); } - if( HPMHooks.count.HP_elemental_dead_post ) { + if (HPMHooks.count.HP_elemental_dead_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_dead_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25778,14 +26507,14 @@ int HP_elemental_dead(struct elemental_data *ed) { int HP_elemental_delete(struct elemental_data *ed, int reply) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_delete_pre ) { + if (HPMHooks.count.HP_elemental_delete_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, int *reply); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25793,9 +26522,9 @@ int HP_elemental_delete(struct elemental_data *ed, int reply) { { retVal___ = HPMHooks.source.elemental.delete(ed, reply); } - if( HPMHooks.count.HP_elemental_delete_post ) { + if (HPMHooks.count.HP_elemental_delete_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, int reply); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_post; hIndex++ ) { + 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); } @@ -25804,14 +26533,14 @@ int HP_elemental_delete(struct elemental_data *ed, int reply) { } void HP_elemental_summon_stop(struct elemental_data *ed) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_summon_stop_pre ) { + if (HPMHooks.count.HP_elemental_summon_stop_pre > 0) { void (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25819,9 +26548,9 @@ void HP_elemental_summon_stop(struct elemental_data *ed) { { HPMHooks.source.elemental.summon_stop(ed); } - if( HPMHooks.count.HP_elemental_summon_stop_post ) { + if (HPMHooks.count.HP_elemental_summon_stop_post > 0) { void (*postHookFunc) (struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_summon_stop_post[hIndex].func; postHookFunc(ed); } @@ -25831,14 +26560,14 @@ void HP_elemental_summon_stop(struct elemental_data *ed) { int HP_elemental_get_lifetime(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_get_lifetime_pre ) { + if (HPMHooks.count.HP_elemental_get_lifetime_pre > 0) { int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25846,9 +26575,9 @@ int HP_elemental_get_lifetime(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.get_lifetime(ed); } - if( HPMHooks.count.HP_elemental_get_lifetime_post ) { + if (HPMHooks.count.HP_elemental_get_lifetime_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_post; hIndex++ ) { + 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); } @@ -25858,14 +26587,14 @@ int HP_elemental_get_lifetime(struct elemental_data *ed) { int HP_elemental_unlocktarget(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_unlocktarget_pre ) { + if (HPMHooks.count.HP_elemental_unlocktarget_pre > 0) { int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25873,9 +26602,9 @@ int HP_elemental_unlocktarget(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.unlocktarget(ed); } - if( HPMHooks.count.HP_elemental_unlocktarget_post ) { + if (HPMHooks.count.HP_elemental_unlocktarget_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_unlocktarget_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25885,14 +26614,14 @@ int HP_elemental_unlocktarget(struct elemental_data *ed) { int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_skillnotok_pre ) { + if (HPMHooks.count.HP_elemental_skillnotok_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25900,9 +26629,9 @@ int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.skillnotok(skill_id, ed); } - if( HPMHooks.count.HP_elemental_skillnotok_post ) { + if (HPMHooks.count.HP_elemental_skillnotok_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_post; hIndex++ ) { + 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); } @@ -25912,14 +26641,14 @@ int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_set_target_pre ) { + if (HPMHooks.count.HP_elemental_set_target_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25927,9 +26656,9 @@ int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) { retVal___ = HPMHooks.source.elemental.set_target(sd, bl); } - if( HPMHooks.count.HP_elemental_set_target_post ) { + if (HPMHooks.count.HP_elemental_set_target_post > 0) { 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++ ) { + 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); } @@ -25939,14 +26668,14 @@ int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_clean_single_effect_pre ) { + if (HPMHooks.count.HP_elemental_clean_single_effect_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25954,9 +26683,9 @@ int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) { retVal___ = HPMHooks.source.elemental.clean_single_effect(ed, skill_id); } - if( HPMHooks.count.HP_elemental_clean_single_effect_post ) { + if (HPMHooks.count.HP_elemental_clean_single_effect_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_post; hIndex++ ) { + 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); } @@ -25966,14 +26695,14 @@ int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) int HP_elemental_clean_effect(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_clean_effect_pre ) { + if (HPMHooks.count.HP_elemental_clean_effect_pre > 0) { int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25981,9 +26710,9 @@ int HP_elemental_clean_effect(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.clean_effect(ed); } - if( HPMHooks.count.HP_elemental_clean_effect_post ) { + if (HPMHooks.count.HP_elemental_clean_effect_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_post; hIndex++ ) { + 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); } @@ -25993,14 +26722,14 @@ int HP_elemental_clean_effect(struct elemental_data *ed) { int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_action_pre ) { + if (HPMHooks.count.HP_elemental_action_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26008,9 +26737,9 @@ int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 { retVal___ = HPMHooks.source.elemental.action(ed, bl, tick); } - if( HPMHooks.count.HP_elemental_action_post ) { + if (HPMHooks.count.HP_elemental_action_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_post; hIndex++ ) { + 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); } @@ -26020,14 +26749,14 @@ int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; struct skill_condition retVal___ = { 0 }; - if( HPMHooks.count.HP_elemental_skill_get_requirements_pre ) { + if (HPMHooks.count.HP_elemental_skill_get_requirements_pre > 0) { struct skill_condition (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26035,9 +26764,9 @@ struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint { retVal___ = HPMHooks.source.elemental.skill_get_requirements(skill_id, skill_lv); } - if( HPMHooks.count.HP_elemental_skill_get_requirements_post ) { + if (HPMHooks.count.HP_elemental_skill_get_requirements_post > 0) { 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++ ) { + 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); } @@ -26047,14 +26776,14 @@ struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint int HP_elemental_read_skilldb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_read_skilldb_pre ) { + if (HPMHooks.count.HP_elemental_read_skilldb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26062,9 +26791,9 @@ int HP_elemental_read_skilldb(void) { { retVal___ = HPMHooks.source.elemental.read_skilldb(); } - if( HPMHooks.count.HP_elemental_read_skilldb_post ) { + if (HPMHooks.count.HP_elemental_read_skilldb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_post; hIndex++ ) { + 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___); } @@ -26073,14 +26802,14 @@ int HP_elemental_read_skilldb(void) { } void HP_elemental_reload_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_reload_db_pre ) { + if (HPMHooks.count.HP_elemental_reload_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26088,9 +26817,9 @@ void HP_elemental_reload_db(void) { { HPMHooks.source.elemental.reload_db(); } - if( HPMHooks.count.HP_elemental_reload_db_post ) { + if (HPMHooks.count.HP_elemental_reload_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_reload_db_post[hIndex].func; postHookFunc(); } @@ -26099,14 +26828,14 @@ void HP_elemental_reload_db(void) { } void HP_elemental_reload_skilldb(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_reload_skilldb_pre ) { + if (HPMHooks.count.HP_elemental_reload_skilldb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26114,9 +26843,9 @@ void HP_elemental_reload_skilldb(void) { { HPMHooks.source.elemental.reload_skilldb(); } - if( HPMHooks.count.HP_elemental_reload_skilldb_post ) { + if (HPMHooks.count.HP_elemental_reload_skilldb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_post[hIndex].func; postHookFunc(); } @@ -26126,14 +26855,14 @@ void HP_elemental_reload_skilldb(void) { int HP_elemental_search_index(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_search_index_pre ) { + if (HPMHooks.count.HP_elemental_search_index_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26141,9 +26870,9 @@ int HP_elemental_search_index(int class_) { { retVal___ = HPMHooks.source.elemental.search_index(class_); } - if( HPMHooks.count.HP_elemental_search_index_post ) { + if (HPMHooks.count.HP_elemental_search_index_post > 0) { int (*postHookFunc) (int retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_post; hIndex++ ) { + 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_); } @@ -26152,14 +26881,14 @@ int HP_elemental_search_index(int class_) { } void HP_elemental_summon_init(struct elemental_data *ed) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_summon_init_pre ) { + if (HPMHooks.count.HP_elemental_summon_init_pre > 0) { void (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26167,9 +26896,9 @@ void HP_elemental_summon_init(struct elemental_data *ed) { { HPMHooks.source.elemental.summon_init(ed); } - if( HPMHooks.count.HP_elemental_summon_init_post ) { + if (HPMHooks.count.HP_elemental_summon_init_post > 0) { void (*postHookFunc) (struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_summon_init_post[hIndex].func; postHookFunc(ed); } @@ -26179,14 +26908,14 @@ void HP_elemental_summon_init(struct elemental_data *ed) { int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) { + if (HPMHooks.count.HP_elemental_summon_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26194,9 +26923,9 @@ int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.elemental.summon_end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_elemental_summon_end_timer_post ) { + if (HPMHooks.count.HP_elemental_summon_end_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_post; hIndex++ ) { + 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); } @@ -26206,16 +26935,16 @@ int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26225,9 +26954,9 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post > 0) { 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++ ) { + 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); @@ -26239,14 +26968,14 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) { int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_pre > 0) { int (*preHookFunc) (struct elemental_data **ed, struct map_session_data **sd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26254,9 +26983,9 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data { retVal___ = HPMHooks.source.elemental.ai_sub_timer(ed, sd, tick); } - if( HPMHooks.count.HP_elemental_ai_sub_timer_post ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_post; hIndex++ ) { + 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); } @@ -26266,16 +26995,16 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre ) { + if (HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26285,9 +27014,9 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.elemental.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_elemental_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -26299,14 +27028,14 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_timer_pre ) { + if (HPMHooks.count.HP_elemental_ai_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26314,9 +27043,9 @@ int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.elemental.ai_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_elemental_ai_timer_post ) { + if (HPMHooks.count.HP_elemental_ai_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_post; hIndex++ ) { + 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); } @@ -26326,14 +27055,14 @@ int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { int HP_elemental_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_read_db_pre ) { + if (HPMHooks.count.HP_elemental_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26341,9 +27070,9 @@ int HP_elemental_read_db(void) { { retVal___ = HPMHooks.source.elemental.read_db(); } - if( HPMHooks.count.HP_elemental_read_db_post ) { + if (HPMHooks.count.HP_elemental_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_post; hIndex++ ) { + 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___); } @@ -26353,14 +27082,14 @@ int HP_elemental_read_db(void) { /* grfio_interface */ void HP_grfio_init(const char *fname) { int hIndex = 0; - if( HPMHooks.count.HP_grfio_init_pre ) { + if (HPMHooks.count.HP_grfio_init_pre > 0) { void (*preHookFunc) (const char **fname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_init_pre[hIndex].func; preHookFunc(&fname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26368,9 +27097,9 @@ void HP_grfio_init(const char *fname) { { HPMHooks.source.grfio.init(fname); } - if( HPMHooks.count.HP_grfio_init_post ) { + if (HPMHooks.count.HP_grfio_init_post > 0) { void (*postHookFunc) (const char *fname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_init_post[hIndex].func; postHookFunc(fname); } @@ -26379,14 +27108,14 @@ void HP_grfio_init(const char *fname) { } void HP_grfio_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_grfio_final_pre ) { + if (HPMHooks.count.HP_grfio_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26394,9 +27123,9 @@ void HP_grfio_final(void) { { HPMHooks.source.grfio.final(); } - if( HPMHooks.count.HP_grfio_final_post ) { + if (HPMHooks.count.HP_grfio_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_final_post[hIndex].func; postHookFunc(); } @@ -26406,14 +27135,14 @@ void HP_grfio_final(void) { void* HP_grfio_reads(const char *fname, int *size) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_grfio_reads_pre ) { + if (HPMHooks.count.HP_grfio_reads_pre > 0) { void* (*preHookFunc) (const char **fname, int **size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_reads_pre[hIndex].func; retVal___ = preHookFunc(&fname, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26421,9 +27150,9 @@ void* HP_grfio_reads(const char *fname, int *size) { { retVal___ = HPMHooks.source.grfio.reads(fname, size); } - if( HPMHooks.count.HP_grfio_reads_post ) { + if (HPMHooks.count.HP_grfio_reads_post > 0) { void* (*postHookFunc) (void* retVal___, const char *fname, int *size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_reads_post[hIndex].func; retVal___ = postHookFunc(retVal___, fname, size); } @@ -26433,14 +27162,14 @@ void* HP_grfio_reads(const char *fname, int *size) { const char* HP_grfio_find_file(const char *fname) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_grfio_find_file_pre ) { + if (HPMHooks.count.HP_grfio_find_file_pre > 0) { const char* (*preHookFunc) (const char **fname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_find_file_pre[hIndex].func; retVal___ = preHookFunc(&fname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26448,9 +27177,9 @@ const char* HP_grfio_find_file(const char *fname) { { retVal___ = HPMHooks.source.grfio.find_file(fname); } - if( HPMHooks.count.HP_grfio_find_file_post ) { + if (HPMHooks.count.HP_grfio_find_file_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *fname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_find_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, fname); } @@ -26460,14 +27189,14 @@ const char* HP_grfio_find_file(const char *fname) { unsigned long HP_grfio_crc32(const unsigned char *buf, unsigned int len) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_grfio_crc32_pre ) { + if (HPMHooks.count.HP_grfio_crc32_pre > 0) { unsigned long (*preHookFunc) (const unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_crc32_pre[hIndex].func; retVal___ = preHookFunc(&buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26475,9 +27204,9 @@ unsigned long HP_grfio_crc32(const unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.grfio.crc32(buf, len); } - if( HPMHooks.count.HP_grfio_crc32_post ) { + if (HPMHooks.count.HP_grfio_crc32_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___, const unsigned char *buf, unsigned int len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_crc32_post[hIndex].func; retVal___ = postHookFunc(retVal___, buf, len); } @@ -26487,14 +27216,14 @@ unsigned long HP_grfio_crc32(const unsigned char *buf, unsigned int len) { int HP_grfio_decode_zip(void *dest, unsigned long *dest_len, const void *source, unsigned long source_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_grfio_decode_zip_pre ) { + if (HPMHooks.count.HP_grfio_decode_zip_pre > 0) { int (*preHookFunc) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_decode_zip_pre[hIndex].func; retVal___ = preHookFunc(&dest, &dest_len, &source, &source_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26502,9 +27231,9 @@ int HP_grfio_decode_zip(void *dest, unsigned long *dest_len, const void *source, { retVal___ = HPMHooks.source.grfio.decode_zip(dest, dest_len, source, source_len); } - if( HPMHooks.count.HP_grfio_decode_zip_post ) { + if (HPMHooks.count.HP_grfio_decode_zip_post > 0) { int (*postHookFunc) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_decode_zip_post[hIndex].func; retVal___ = postHookFunc(retVal___, dest, dest_len, source, source_len); } @@ -26514,14 +27243,14 @@ int HP_grfio_decode_zip(void *dest, unsigned long *dest_len, const void *source, int HP_grfio_encode_zip(void *dest, unsigned long *dest_len, const void *source, unsigned long source_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_grfio_encode_zip_pre ) { + if (HPMHooks.count.HP_grfio_encode_zip_pre > 0) { int (*preHookFunc) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_grfio_encode_zip_pre[hIndex].func; retVal___ = preHookFunc(&dest, &dest_len, &source, &source_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26529,9 +27258,9 @@ int HP_grfio_encode_zip(void *dest, unsigned long *dest_len, const void *source, { retVal___ = HPMHooks.source.grfio.encode_zip(dest, dest_len, source, source_len); } - if( HPMHooks.count.HP_grfio_encode_zip_post ) { + if (HPMHooks.count.HP_grfio_encode_zip_post > 0) { int (*postHookFunc) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_grfio_encode_zip_post[hIndex].func; retVal___ = postHookFunc(retVal___, dest, dest_len, source, source_len); } @@ -26541,14 +27270,14 @@ int HP_grfio_encode_zip(void *dest, unsigned long *dest_len, const void *source, /* guild_interface */ void HP_guild_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_guild_init_pre ) { + if (HPMHooks.count.HP_guild_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26556,9 +27285,9 @@ void HP_guild_init(bool minimal) { { HPMHooks.source.guild.init(minimal); } - if( HPMHooks.count.HP_guild_init_post ) { + if (HPMHooks.count.HP_guild_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_init_post[hIndex].func; postHookFunc(minimal); } @@ -26567,14 +27296,14 @@ void HP_guild_init(bool minimal) { } void HP_guild_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_final_pre ) { + if (HPMHooks.count.HP_guild_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26582,9 +27311,9 @@ void HP_guild_final(void) { { HPMHooks.source.guild.final(); } - if( HPMHooks.count.HP_guild_final_post ) { + if (HPMHooks.count.HP_guild_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_final_post[hIndex].func; postHookFunc(); } @@ -26594,14 +27323,14 @@ void HP_guild_final(void) { int HP_guild_skill_get_max(int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skill_get_max_pre ) { + if (HPMHooks.count.HP_guild_skill_get_max_pre > 0) { int (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26609,9 +27338,9 @@ int HP_guild_skill_get_max(int id) { { retVal___ = HPMHooks.source.guild.skill_get_max(id); } - if( HPMHooks.count.HP_guild_skill_get_max_post ) { + if (HPMHooks.count.HP_guild_skill_get_max_post > 0) { int (*postHookFunc) (int retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_post; hIndex++ ) { + 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); } @@ -26621,14 +27350,14 @@ int HP_guild_skill_get_max(int id) { int HP_guild_checkskill(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_checkskill_pre ) { + if (HPMHooks.count.HP_guild_checkskill_pre > 0) { int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26636,9 +27365,9 @@ int HP_guild_checkskill(struct guild *g, int id) { { retVal___ = HPMHooks.source.guild.checkskill(g, id); } - if( HPMHooks.count.HP_guild_checkskill_post ) { + if (HPMHooks.count.HP_guild_checkskill_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_post; hIndex++ ) { + 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); } @@ -26648,14 +27377,14 @@ int HP_guild_checkskill(struct guild *g, int id) { int HP_guild_check_skill_require(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_skill_require_pre ) { + if (HPMHooks.count.HP_guild_check_skill_require_pre > 0) { int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26663,9 +27392,9 @@ int HP_guild_check_skill_require(struct guild *g, int id) { { retVal___ = HPMHooks.source.guild.check_skill_require(g, id); } - if( HPMHooks.count.HP_guild_check_skill_require_post ) { + if (HPMHooks.count.HP_guild_check_skill_require_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_post; hIndex++ ) { + 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); } @@ -26675,14 +27404,14 @@ int HP_guild_check_skill_require(struct guild *g, int id) { int HP_guild_checkcastles(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_checkcastles_pre ) { + if (HPMHooks.count.HP_guild_checkcastles_pre > 0) { int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26690,9 +27419,9 @@ int HP_guild_checkcastles(struct guild *g) { { retVal___ = HPMHooks.source.guild.checkcastles(g); } - if( HPMHooks.count.HP_guild_checkcastles_post ) { + if (HPMHooks.count.HP_guild_checkcastles_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_checkcastles_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -26702,14 +27431,14 @@ int HP_guild_checkcastles(struct guild *g) { bool HP_guild_isallied(int guild_id, int guild_id2) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_isallied_pre ) { + if (HPMHooks.count.HP_guild_isallied_pre > 0) { bool (*preHookFunc) (int *guild_id, int *guild_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26717,9 +27446,9 @@ bool HP_guild_isallied(int guild_id, int guild_id2) { { retVal___ = HPMHooks.source.guild.isallied(guild_id, guild_id2); } - if( HPMHooks.count.HP_guild_isallied_post ) { + if (HPMHooks.count.HP_guild_isallied_post > 0) { bool (*postHookFunc) (bool retVal___, int guild_id, int guild_id2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_post; hIndex++ ) { + 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); } @@ -26729,14 +27458,14 @@ bool HP_guild_isallied(int guild_id, int guild_id2) { struct guild* HP_guild_search(int guild_id) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_guild_search_pre ) { + if (HPMHooks.count.HP_guild_search_pre > 0) { struct guild* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26744,9 +27473,9 @@ struct guild* HP_guild_search(int guild_id) { { retVal___ = HPMHooks.source.guild.search(guild_id); } - if( HPMHooks.count.HP_guild_search_post ) { + if (HPMHooks.count.HP_guild_search_post > 0) { struct guild* (*postHookFunc) (struct guild* retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_post; hIndex++ ) { + 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); } @@ -26756,14 +27485,14 @@ struct guild* HP_guild_search(int guild_id) { struct guild* HP_guild_searchname(char *str) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_guild_searchname_pre ) { + if (HPMHooks.count.HP_guild_searchname_pre > 0) { struct guild* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26771,9 +27500,9 @@ struct guild* HP_guild_searchname(char *str) { { retVal___ = HPMHooks.source.guild.searchname(str); } - if( HPMHooks.count.HP_guild_searchname_post ) { + if (HPMHooks.count.HP_guild_searchname_post > 0) { struct guild* (*postHookFunc) (struct guild* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_searchname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -26783,14 +27512,14 @@ struct guild* HP_guild_searchname(char *str) { 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 ) { + if (HPMHooks.count.HP_guild_castle_search_pre > 0) { struct guild_castle* (*preHookFunc) (int *gcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26798,9 +27527,9 @@ struct guild_castle* HP_guild_castle_search(int gcid) { { retVal___ = HPMHooks.source.guild.castle_search(gcid); } - if( HPMHooks.count.HP_guild_castle_search_post ) { + if (HPMHooks.count.HP_guild_castle_search_post > 0) { struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int gcid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_post; hIndex++ ) { + 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); } @@ -26810,14 +27539,14 @@ struct guild_castle* HP_guild_castle_search(int gcid) { struct guild_castle* HP_guild_mapname2gc(const char *mapname) { int hIndex = 0; struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_guild_mapname2gc_pre ) { + if (HPMHooks.count.HP_guild_mapname2gc_pre > 0) { struct guild_castle* (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26825,9 +27554,9 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) { { retVal___ = HPMHooks.source.guild.mapname2gc(mapname); } - if( HPMHooks.count.HP_guild_mapname2gc_post ) { + if (HPMHooks.count.HP_guild_mapname2gc_post > 0) { struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_mapname2gc_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -26837,14 +27566,14 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) { struct guild_castle* HP_guild_mapindex2gc(short map_index) { int hIndex = 0; struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_guild_mapindex2gc_pre ) { + if (HPMHooks.count.HP_guild_mapindex2gc_pre > 0) { struct guild_castle* (*preHookFunc) (short *map_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func; retVal___ = preHookFunc(&map_index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26852,9 +27581,9 @@ struct guild_castle* HP_guild_mapindex2gc(short map_index) { { retVal___ = HPMHooks.source.guild.mapindex2gc(map_index); } - if( HPMHooks.count.HP_guild_mapindex2gc_post ) { + if (HPMHooks.count.HP_guild_mapindex2gc_post > 0) { struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short map_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_index); } @@ -26864,14 +27593,14 @@ struct guild_castle* HP_guild_mapindex2gc(short map_index) { 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 ) { + if (HPMHooks.count.HP_guild_getavailablesd_pre > 0) { struct map_session_data* (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26879,9 +27608,9 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) { { retVal___ = HPMHooks.source.guild.getavailablesd(g); } - if( HPMHooks.count.HP_guild_getavailablesd_post ) { + if (HPMHooks.count.HP_guild_getavailablesd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -26891,14 +27620,14 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) { int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getindex_pre ) { + if (HPMHooks.count.HP_guild_getindex_pre > 0) { int (*preHookFunc) (const struct guild **g, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26906,9 +27635,9 @@ int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { { retVal___ = HPMHooks.source.guild.getindex(g, account_id, char_id); } - if( HPMHooks.count.HP_guild_getindex_post ) { + if (HPMHooks.count.HP_guild_getindex_post > 0) { int (*postHookFunc) (int retVal___, const struct guild *g, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_post; hIndex++ ) { + 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); } @@ -26918,14 +27647,14 @@ int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getposition_pre ) { + if (HPMHooks.count.HP_guild_getposition_pre > 0) { int (*preHookFunc) (struct guild **g, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26933,26 +27662,26 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { { retVal___ = HPMHooks.source.guild.getposition(g, sd); } - if( HPMHooks.count.HP_guild_getposition_post ) { + if (HPMHooks.count.HP_guild_getposition_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_post; hIndex++ ) { + 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) { +uint64 HP_guild_payexp(struct map_session_data *sd, uint64 exp) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data **sd, unsigned int *exp); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_guild_payexp_pre > 0) { + uint64 (*preHookFunc) (struct map_session_data **sd, uint64 *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26960,9 +27689,9 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { { 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++ ) { + if (HPMHooks.count.HP_guild_payexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd, uint64 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); } @@ -26972,14 +27701,14 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { int HP_guild_getexp(struct map_session_data *sd, int exp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getexp_pre ) { + if (HPMHooks.count.HP_guild_getexp_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26987,9 +27716,9 @@ int HP_guild_getexp(struct map_session_data *sd, int exp) { { retVal___ = HPMHooks.source.guild.getexp(sd, exp); } - if( HPMHooks.count.HP_guild_getexp_post ) { + if (HPMHooks.count.HP_guild_getexp_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int exp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_post; hIndex++ ) { + 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); } @@ -26999,14 +27728,14 @@ int HP_guild_getexp(struct map_session_data *sd, int exp) { int HP_guild_create(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_create_pre ) { + if (HPMHooks.count.HP_guild_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27014,9 +27743,9 @@ int HP_guild_create(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.guild.create(sd, name); } - if( HPMHooks.count.HP_guild_create_post ) { + if (HPMHooks.count.HP_guild_create_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_post; hIndex++ ) { + 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); } @@ -27026,14 +27755,14 @@ int HP_guild_create(struct map_session_data *sd, const char *name) { int HP_guild_created(int account_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_created_pre ) { + if (HPMHooks.count.HP_guild_created_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27041,9 +27770,9 @@ int HP_guild_created(int account_id, int guild_id) { { retVal___ = HPMHooks.source.guild.created(account_id, guild_id); } - if( HPMHooks.count.HP_guild_created_post ) { + if (HPMHooks.count.HP_guild_created_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_post; hIndex++ ) { + 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); } @@ -27053,14 +27782,14 @@ int HP_guild_created(int account_id, int guild_id) { int HP_guild_request_info(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_request_info_pre ) { + if (HPMHooks.count.HP_guild_request_info_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27068,9 +27797,9 @@ int HP_guild_request_info(int guild_id) { { retVal___ = HPMHooks.source.guild.request_info(guild_id); } - if( HPMHooks.count.HP_guild_request_info_post ) { + if (HPMHooks.count.HP_guild_request_info_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_post; hIndex++ ) { + 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); } @@ -27080,14 +27809,14 @@ int HP_guild_request_info(int guild_id) { int HP_guild_recv_noinfo(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_recv_noinfo_pre ) { + if (HPMHooks.count.HP_guild_recv_noinfo_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27095,9 +27824,9 @@ int HP_guild_recv_noinfo(int guild_id) { { retVal___ = HPMHooks.source.guild.recv_noinfo(guild_id); } - if( HPMHooks.count.HP_guild_recv_noinfo_post ) { + if (HPMHooks.count.HP_guild_recv_noinfo_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_post; hIndex++ ) { + 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); } @@ -27107,14 +27836,14 @@ int HP_guild_recv_noinfo(int guild_id) { int HP_guild_recv_info(const struct guild *sg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_recv_info_pre ) { + if (HPMHooks.count.HP_guild_recv_info_pre > 0) { int (*preHookFunc) (const struct guild **sg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27122,9 +27851,9 @@ int HP_guild_recv_info(const struct guild *sg) { { retVal___ = HPMHooks.source.guild.recv_info(sg); } - if( HPMHooks.count.HP_guild_recv_info_post ) { + if (HPMHooks.count.HP_guild_recv_info_post > 0) { int (*postHookFunc) (int retVal___, const struct guild *sg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_post; hIndex++ ) { + 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); } @@ -27134,14 +27863,14 @@ int HP_guild_recv_info(const struct guild *sg) { int HP_guild_npc_request_info(int guild_id, const char *ev) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_npc_request_info_pre ) { + if (HPMHooks.count.HP_guild_npc_request_info_pre > 0) { int (*preHookFunc) (int *guild_id, const char **ev); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27149,9 +27878,9 @@ int HP_guild_npc_request_info(int guild_id, const char *ev) { { retVal___ = HPMHooks.source.guild.npc_request_info(guild_id, ev); } - if( HPMHooks.count.HP_guild_npc_request_info_post ) { + if (HPMHooks.count.HP_guild_npc_request_info_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, const char *ev); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_post; hIndex++ ) { + 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); } @@ -27161,14 +27890,14 @@ int HP_guild_npc_request_info(int guild_id, const char *ev) { int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_invite_pre ) { + if (HPMHooks.count.HP_guild_invite_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27176,9 +27905,9 @@ int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.guild.invite(sd, tsd); } - if( HPMHooks.count.HP_guild_invite_post ) { + if (HPMHooks.count.HP_guild_invite_post > 0) { 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++ ) { + 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); } @@ -27188,14 +27917,14 @@ int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reply_invite_pre ) { + if (HPMHooks.count.HP_guild_reply_invite_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27203,9 +27932,9 @@ int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { { retVal___ = HPMHooks.source.guild.reply_invite(sd, guild_id, flag); } - if( HPMHooks.count.HP_guild_reply_invite_post ) { + if (HPMHooks.count.HP_guild_reply_invite_post > 0) { 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++ ) { + 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); } @@ -27214,14 +27943,14 @@ int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { } void HP_guild_member_joined(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_guild_member_joined_pre ) { + if (HPMHooks.count.HP_guild_member_joined_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27229,9 +27958,9 @@ void HP_guild_member_joined(struct map_session_data *sd) { { HPMHooks.source.guild.member_joined(sd); } - if( HPMHooks.count.HP_guild_member_joined_post ) { + if (HPMHooks.count.HP_guild_member_joined_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_member_joined_post[hIndex].func; postHookFunc(sd); } @@ -27241,14 +27970,14 @@ void HP_guild_member_joined(struct map_session_data *sd) { int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_member_added_pre ) { + if (HPMHooks.count.HP_guild_member_added_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27256,9 +27985,9 @@ int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { { retVal___ = HPMHooks.source.guild.member_added(guild_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_guild_member_added_post ) { + if (HPMHooks.count.HP_guild_member_added_post > 0) { 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++ ) { + 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); } @@ -27268,14 +27997,14 @@ int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { 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___ = 0; - if( HPMHooks.count.HP_guild_leave_pre ) { + if (HPMHooks.count.HP_guild_leave_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27283,9 +28012,9 @@ int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, in { retVal___ = HPMHooks.source.guild.leave(sd, guild_id, account_id, char_id, mes); } - if( HPMHooks.count.HP_guild_leave_post ) { + if (HPMHooks.count.HP_guild_leave_post > 0) { 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++ ) { + 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); } @@ -27295,14 +28024,14 @@ int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, in 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___ = 0; - if( HPMHooks.count.HP_guild_member_withdraw_pre ) { + if (HPMHooks.count.HP_guild_member_withdraw_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27310,9 +28039,9 @@ int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag { retVal___ = HPMHooks.source.guild.member_withdraw(guild_id, account_id, char_id, flag, name, mes); } - if( HPMHooks.count.HP_guild_member_withdraw_post ) { + if (HPMHooks.count.HP_guild_member_withdraw_post > 0) { 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++ ) { + 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); } @@ -27322,14 +28051,14 @@ int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag 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___ = 0; - if( HPMHooks.count.HP_guild_expulsion_pre ) { + if (HPMHooks.count.HP_guild_expulsion_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27337,9 +28066,9 @@ int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id { retVal___ = HPMHooks.source.guild.expulsion(sd, guild_id, account_id, char_id, mes); } - if( HPMHooks.count.HP_guild_expulsion_post ) { + if (HPMHooks.count.HP_guild_expulsion_post > 0) { 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++ ) { + 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); } @@ -27349,14 +28078,14 @@ int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skillup_pre ) { + if (HPMHooks.count.HP_guild_skillup_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27364,9 +28093,9 @@ int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.guild.skillup(sd, skill_id); } - if( HPMHooks.count.HP_guild_skillup_post ) { + if (HPMHooks.count.HP_guild_skillup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_post; hIndex++ ) { + 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); } @@ -27375,14 +28104,14 @@ int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { } void HP_guild_block_skill(struct map_session_data *sd, int time) { int hIndex = 0; - if( HPMHooks.count.HP_guild_block_skill_pre ) { + if (HPMHooks.count.HP_guild_block_skill_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27390,9 +28119,9 @@ void HP_guild_block_skill(struct map_session_data *sd, int time) { { HPMHooks.source.guild.block_skill(sd, time); } - if( HPMHooks.count.HP_guild_block_skill_post ) { + if (HPMHooks.count.HP_guild_block_skill_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_post; hIndex++ ) { + 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); } @@ -27402,14 +28131,14 @@ void HP_guild_block_skill(struct map_session_data *sd, int time) { int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reqalliance_pre ) { + if (HPMHooks.count.HP_guild_reqalliance_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27417,9 +28146,9 @@ int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *t { retVal___ = HPMHooks.source.guild.reqalliance(sd, tsd); } - if( HPMHooks.count.HP_guild_reqalliance_post ) { + if (HPMHooks.count.HP_guild_reqalliance_post > 0) { 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++ ) { + 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); } @@ -27429,14 +28158,14 @@ int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *t int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reply_reqalliance_pre ) { + if (HPMHooks.count.HP_guild_reply_reqalliance_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27444,9 +28173,9 @@ int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int { retVal___ = HPMHooks.source.guild.reply_reqalliance(sd, account_id, flag); } - if( HPMHooks.count.HP_guild_reply_reqalliance_post ) { + if (HPMHooks.count.HP_guild_reply_reqalliance_post > 0) { 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++ ) { + 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); } @@ -27456,14 +28185,14 @@ int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int 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___ = 0; - if( HPMHooks.count.HP_guild_allianceack_pre ) { + if (HPMHooks.count.HP_guild_allianceack_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27471,9 +28200,9 @@ int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int acco { retVal___ = HPMHooks.source.guild.allianceack(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } - if( HPMHooks.count.HP_guild_allianceack_post ) { + if (HPMHooks.count.HP_guild_allianceack_post > 0) { 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++ ) { + 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); } @@ -27483,14 +28212,14 @@ int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int acco int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_delalliance_pre ) { + if (HPMHooks.count.HP_guild_delalliance_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27498,9 +28227,9 @@ int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { { retVal___ = HPMHooks.source.guild.delalliance(sd, guild_id, flag); } - if( HPMHooks.count.HP_guild_delalliance_post ) { + if (HPMHooks.count.HP_guild_delalliance_post > 0) { 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++ ) { + 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); } @@ -27510,14 +28239,14 @@ int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_opposition_pre ) { + if (HPMHooks.count.HP_guild_opposition_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27525,9 +28254,9 @@ int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *ts { retVal___ = HPMHooks.source.guild.opposition(sd, tsd); } - if( HPMHooks.count.HP_guild_opposition_post ) { + if (HPMHooks.count.HP_guild_opposition_post > 0) { 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++ ) { + 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); } @@ -27537,14 +28266,14 @@ int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *ts int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_alliance_pre ) { + if (HPMHooks.count.HP_guild_check_alliance_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27552,9 +28281,9 @@ int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { { retVal___ = HPMHooks.source.guild.check_alliance(guild_id1, guild_id2, flag); } - if( HPMHooks.count.HP_guild_check_alliance_post ) { + if (HPMHooks.count.HP_guild_check_alliance_post > 0) { int (*postHookFunc) (int retVal___, int guild_id1, int guild_id2, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_post; hIndex++ ) { + 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); } @@ -27564,14 +28293,14 @@ int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_memberinfoshort_pre ) { + if (HPMHooks.count.HP_guild_send_memberinfoshort_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27579,38 +28308,38 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { { retVal___ = HPMHooks.source.guild.send_memberinfoshort(sd, online); } - if( HPMHooks.count.HP_guild_send_memberinfoshort_post ) { + if (HPMHooks.count.HP_guild_send_memberinfoshort_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int online); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_post; hIndex++ ) { + 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 HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; - 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_); + if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + 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++ ) { + if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 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_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -27618,14 +28347,14 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, short idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_memberposition_pre ) { + if (HPMHooks.count.HP_guild_change_memberposition_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27633,9 +28362,9 @@ int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, sh { retVal___ = HPMHooks.source.guild.change_memberposition(guild_id, account_id, char_id, idx); } - if( HPMHooks.count.HP_guild_change_memberposition_post ) { + if (HPMHooks.count.HP_guild_change_memberposition_post > 0) { 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++ ) { + 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); } @@ -27645,14 +28374,14 @@ int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, sh int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_memberposition_changed_pre ) { + if (HPMHooks.count.HP_guild_memberposition_changed_pre > 0) { int (*preHookFunc) (struct guild **g, int *idx, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27660,9 +28389,9 @@ int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { { retVal___ = HPMHooks.source.guild.memberposition_changed(g, idx, pos); } - if( HPMHooks.count.HP_guild_memberposition_changed_post ) { + if (HPMHooks.count.HP_guild_memberposition_changed_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int idx, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_post; hIndex++ ) { + 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); } @@ -27672,14 +28401,14 @@ int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_position_pre ) { + if (HPMHooks.count.HP_guild_change_position_pre > 0) { int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27687,9 +28416,9 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons { retVal___ = HPMHooks.source.guild.change_position(guild_id, idx, mode, exp_mode, name); } - if( HPMHooks.count.HP_guild_change_position_post ) { + if (HPMHooks.count.HP_guild_change_position_post > 0) { 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++ ) { + 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); } @@ -27699,14 +28428,14 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons int HP_guild_position_changed(int guild_id, int idx, const struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_position_changed_pre ) { + if (HPMHooks.count.HP_guild_position_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *idx, const struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27714,9 +28443,9 @@ int HP_guild_position_changed(int guild_id, int idx, const struct guild_position { retVal___ = HPMHooks.source.guild.position_changed(guild_id, idx, p); } - if( HPMHooks.count.HP_guild_position_changed_post ) { + if (HPMHooks.count.HP_guild_position_changed_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int idx, const struct guild_position *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_post; hIndex++ ) { + 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); } @@ -27726,14 +28455,14 @@ int HP_guild_position_changed(int guild_id, int idx, const struct guild_position int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_notice_pre ) { + if (HPMHooks.count.HP_guild_change_notice_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27741,9 +28470,9 @@ int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char { retVal___ = HPMHooks.source.guild.change_notice(sd, guild_id, mes1, mes2); } - if( HPMHooks.count.HP_guild_change_notice_post ) { + if (HPMHooks.count.HP_guild_change_notice_post > 0) { 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++ ) { + 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); } @@ -27753,14 +28482,14 @@ int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_notice_changed_pre ) { + if (HPMHooks.count.HP_guild_notice_changed_pre > 0) { int (*preHookFunc) (int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27768,9 +28497,9 @@ int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { { retVal___ = HPMHooks.source.guild.notice_changed(guild_id, mes1, mes2); } - if( HPMHooks.count.HP_guild_notice_changed_post ) { + if (HPMHooks.count.HP_guild_notice_changed_post > 0) { 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++ ) { + 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); } @@ -27780,14 +28509,14 @@ int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_emblem_pre ) { + if (HPMHooks.count.HP_guild_change_emblem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *len, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27795,9 +28524,9 @@ int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *dat { retVal___ = HPMHooks.source.guild.change_emblem(sd, len, data); } - if( HPMHooks.count.HP_guild_change_emblem_post ) { + if (HPMHooks.count.HP_guild_change_emblem_post > 0) { 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++ ) { + 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); } @@ -27807,14 +28536,14 @@ int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *dat int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_emblem_changed_pre ) { + if (HPMHooks.count.HP_guild_emblem_changed_pre > 0) { int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27822,9 +28551,9 @@ int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *da { retVal___ = HPMHooks.source.guild.emblem_changed(len, guild_id, emblem_id, data); } - if( HPMHooks.count.HP_guild_emblem_changed_post ) { + if (HPMHooks.count.HP_guild_emblem_changed_post > 0) { 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++ ) { + 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); } @@ -27834,14 +28563,14 @@ int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *da int HP_guild_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_message_pre ) { + if (HPMHooks.count.HP_guild_send_message_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27849,9 +28578,9 @@ int HP_guild_send_message(struct map_session_data *sd, const char *mes) { { retVal___ = HPMHooks.source.guild.send_message(sd, mes); } - if( HPMHooks.count.HP_guild_send_message_post ) { + if (HPMHooks.count.HP_guild_send_message_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_post; hIndex++ ) { + 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); } @@ -27861,14 +28590,14 @@ int HP_guild_send_message(struct map_session_data *sd, const char *mes) { int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_recv_message_pre ) { + if (HPMHooks.count.HP_guild_recv_message_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27876,9 +28605,9 @@ int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len { retVal___ = HPMHooks.source.guild.recv_message(guild_id, account_id, mes, len); } - if( HPMHooks.count.HP_guild_recv_message_post ) { + if (HPMHooks.count.HP_guild_recv_message_post > 0) { 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++ ) { + 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); } @@ -27888,14 +28617,14 @@ int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len int HP_guild_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_dot_remove_pre ) { + if (HPMHooks.count.HP_guild_send_dot_remove_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27903,9 +28632,9 @@ int HP_guild_send_dot_remove(struct map_session_data *sd) { { retVal___ = HPMHooks.source.guild.send_dot_remove(sd); } - if( HPMHooks.count.HP_guild_send_dot_remove_post ) { + if (HPMHooks.count.HP_guild_send_dot_remove_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_post; hIndex++ ) { + 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); } @@ -27915,14 +28644,14 @@ int HP_guild_send_dot_remove(struct map_session_data *sd) { int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skillupack_pre ) { + if (HPMHooks.count.HP_guild_skillupack_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27930,9 +28659,9 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { { retVal___ = HPMHooks.source.guild.skillupack(guild_id, skill_id, account_id); } - if( HPMHooks.count.HP_guild_skillupack_post ) { + if (HPMHooks.count.HP_guild_skillupack_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, uint16 skill_id, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_post; hIndex++ ) { + 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); } @@ -27942,14 +28671,14 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int HP_guild_dobreak(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_dobreak_pre ) { + if (HPMHooks.count.HP_guild_dobreak_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27957,9 +28686,9 @@ int HP_guild_dobreak(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.guild.dobreak(sd, name); } - if( HPMHooks.count.HP_guild_dobreak_post ) { + if (HPMHooks.count.HP_guild_dobreak_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_post; hIndex++ ) { + 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); } @@ -27969,14 +28698,14 @@ int HP_guild_dobreak(struct map_session_data *sd, const char *name) { int HP_guild_broken(int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_broken_pre ) { + if (HPMHooks.count.HP_guild_broken_pre > 0) { int (*preHookFunc) (int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27984,38 +28713,38 @@ int HP_guild_broken(int guild_id, int flag) { { retVal___ = HPMHooks.source.guild.broken(guild_id, flag); } - if( HPMHooks.count.HP_guild_broken_post ) { + if (HPMHooks.count.HP_guild_broken_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_post; hIndex++ ) { + 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 HP_guild_gm_change(int guild_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_gm_change_pre ) { - int (*preHookFunc) (int *guild_id, struct map_session_data **sd); + if (HPMHooks.count.HP_guild_gm_change_pre > 0) { + int (*preHookFunc) (int *guild_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.gm_change(guild_id, sd); + retVal___ = HPMHooks.source.guild.gm_change(guild_id, char_id); } - 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++ ) { + if (HPMHooks.count.HP_guild_gm_change_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int char_id); + 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); + retVal___ = postHookFunc(retVal___, guild_id, char_id); } } return retVal___; @@ -28023,14 +28752,14 @@ int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_gm_changed_pre ) { + if (HPMHooks.count.HP_guild_gm_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28038,9 +28767,9 @@ int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.guild.gm_changed(guild_id, account_id, char_id); } - if( HPMHooks.count.HP_guild_gm_changed_post ) { + if (HPMHooks.count.HP_guild_gm_changed_post > 0) { 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++ ) { + 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); } @@ -28049,14 +28778,14 @@ int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { } void HP_guild_castle_map_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_castle_map_init_pre ) { + if (HPMHooks.count.HP_guild_castle_map_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28064,9 +28793,9 @@ void HP_guild_castle_map_init(void) { { HPMHooks.source.guild.castle_map_init(); } - if( HPMHooks.count.HP_guild_castle_map_init_post ) { + if (HPMHooks.count.HP_guild_castle_map_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_post; hIndex++ ) { + 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(); } @@ -28076,14 +28805,14 @@ void HP_guild_castle_map_init(void) { int HP_guild_castledatasave(int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castledatasave_pre ) { + if (HPMHooks.count.HP_guild_castledatasave_pre > 0) { int (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28091,9 +28820,9 @@ int HP_guild_castledatasave(int castle_id, int index, int value) { { retVal___ = HPMHooks.source.guild.castledatasave(castle_id, index, value); } - if( HPMHooks.count.HP_guild_castledatasave_post ) { + if (HPMHooks.count.HP_guild_castledatasave_post > 0) { int (*postHookFunc) (int retVal___, int castle_id, int index, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_post; hIndex++ ) { + 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); } @@ -28103,14 +28832,14 @@ int HP_guild_castledatasave(int castle_id, int index, int value) { int HP_guild_castledataloadack(int len, const struct guild_castle *gc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castledataloadack_pre ) { + if (HPMHooks.count.HP_guild_castledataloadack_pre > 0) { int (*preHookFunc) (int *len, const struct guild_castle **gc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28118,9 +28847,9 @@ int HP_guild_castledataloadack(int len, const struct guild_castle *gc) { { retVal___ = HPMHooks.source.guild.castledataloadack(len, gc); } - if( HPMHooks.count.HP_guild_castledataloadack_post ) { + if (HPMHooks.count.HP_guild_castledataloadack_post > 0) { int (*postHookFunc) (int retVal___, int len, const struct guild_castle *gc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_post; hIndex++ ) { + 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); } @@ -28129,14 +28858,14 @@ int HP_guild_castledataloadack(int len, const struct guild_castle *gc) { } void HP_guild_castle_reconnect(int castle_id, int index, int value) { int hIndex = 0; - if( HPMHooks.count.HP_guild_castle_reconnect_pre ) { + if (HPMHooks.count.HP_guild_castle_reconnect_pre > 0) { void (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28144,9 +28873,9 @@ void HP_guild_castle_reconnect(int castle_id, int index, int value) { { HPMHooks.source.guild.castle_reconnect(castle_id, index, value); } - if( HPMHooks.count.HP_guild_castle_reconnect_post ) { + if (HPMHooks.count.HP_guild_castle_reconnect_post > 0) { void (*postHookFunc) (int castle_id, int index, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_post; hIndex++ ) { + 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); } @@ -28155,14 +28884,14 @@ void HP_guild_castle_reconnect(int castle_id, int index, int value) { } void HP_guild_agit_start(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit_start_pre ) { + if (HPMHooks.count.HP_guild_agit_start_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28170,9 +28899,9 @@ void HP_guild_agit_start(void) { { HPMHooks.source.guild.agit_start(); } - if( HPMHooks.count.HP_guild_agit_start_post ) { + if (HPMHooks.count.HP_guild_agit_start_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit_start_post[hIndex].func; postHookFunc(); } @@ -28181,14 +28910,14 @@ void HP_guild_agit_start(void) { } void HP_guild_agit_end(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit_end_pre ) { + if (HPMHooks.count.HP_guild_agit_end_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28196,9 +28925,9 @@ void HP_guild_agit_end(void) { { HPMHooks.source.guild.agit_end(); } - if( HPMHooks.count.HP_guild_agit_end_post ) { + if (HPMHooks.count.HP_guild_agit_end_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit_end_post[hIndex].func; postHookFunc(); } @@ -28207,14 +28936,14 @@ void HP_guild_agit_end(void) { } void HP_guild_agit2_start(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit2_start_pre ) { + if (HPMHooks.count.HP_guild_agit2_start_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28222,9 +28951,9 @@ void HP_guild_agit2_start(void) { { HPMHooks.source.guild.agit2_start(); } - if( HPMHooks.count.HP_guild_agit2_start_post ) { + if (HPMHooks.count.HP_guild_agit2_start_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit2_start_post[hIndex].func; postHookFunc(); } @@ -28233,14 +28962,14 @@ void HP_guild_agit2_start(void) { } void HP_guild_agit2_end(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit2_end_pre ) { + if (HPMHooks.count.HP_guild_agit2_end_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28248,9 +28977,9 @@ void HP_guild_agit2_end(void) { { HPMHooks.source.guild.agit2_end(); } - if( HPMHooks.count.HP_guild_agit2_end_post ) { + if (HPMHooks.count.HP_guild_agit2_end_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit2_end_post[hIndex].func; postHookFunc(); } @@ -28259,14 +28988,14 @@ void HP_guild_agit2_end(void) { } void HP_guild_flag_add(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_guild_flag_add_pre ) { + if (HPMHooks.count.HP_guild_flag_add_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28274,9 +29003,9 @@ void HP_guild_flag_add(struct npc_data *nd) { { HPMHooks.source.guild.flag_add(nd); } - if( HPMHooks.count.HP_guild_flag_add_post ) { + if (HPMHooks.count.HP_guild_flag_add_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flag_add_post[hIndex].func; postHookFunc(nd); } @@ -28285,14 +29014,14 @@ void HP_guild_flag_add(struct npc_data *nd) { } void HP_guild_flag_remove(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_guild_flag_remove_pre ) { + if (HPMHooks.count.HP_guild_flag_remove_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28300,9 +29029,9 @@ void HP_guild_flag_remove(struct npc_data *nd) { { HPMHooks.source.guild.flag_remove(nd); } - if( HPMHooks.count.HP_guild_flag_remove_post ) { + if (HPMHooks.count.HP_guild_flag_remove_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flag_remove_post[hIndex].func; postHookFunc(nd); } @@ -28311,14 +29040,14 @@ void HP_guild_flag_remove(struct npc_data *nd) { } void HP_guild_flags_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_flags_clear_pre ) { + if (HPMHooks.count.HP_guild_flags_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28326,9 +29055,9 @@ void HP_guild_flags_clear(void) { { HPMHooks.source.guild.flags_clear(); } - if( HPMHooks.count.HP_guild_flags_clear_post ) { + if (HPMHooks.count.HP_guild_flags_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flags_clear_post[hIndex].func; postHookFunc(); } @@ -28337,14 +29066,14 @@ void HP_guild_flags_clear(void) { } 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 ) { + if (HPMHooks.count.HP_guild_aura_refresh_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28352,9 +29081,9 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 { HPMHooks.source.guild.aura_refresh(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_guild_aura_refresh_post ) { + if (HPMHooks.count.HP_guild_aura_refresh_post > 0) { 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++ ) { + 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); } @@ -28363,14 +29092,14 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 } void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_guild_retrieveitembound_pre ) { + if (HPMHooks.count.HP_guild_retrieveitembound_pre > 0) { void (*preHookFunc) (int *char_id, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_retrieveitembound_pre[hIndex].func; preHookFunc(&char_id, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28378,9 +29107,9 @@ void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { { HPMHooks.source.guild.retrieveitembound(char_id, aid, guild_id); } - if( HPMHooks.count.HP_guild_retrieveitembound_post ) { + if (HPMHooks.count.HP_guild_retrieveitembound_post > 0) { void (*postHookFunc) (int char_id, int aid, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_retrieveitembound_post[hIndex].func; postHookFunc(char_id, aid, guild_id); } @@ -28390,14 +29119,14 @@ void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_timer_pre ) { + if (HPMHooks.count.HP_guild_payexp_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28405,9 +29134,9 @@ int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.guild.payexp_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_guild_payexp_timer_post ) { + if (HPMHooks.count.HP_guild_payexp_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_post; hIndex++ ) { + 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); } @@ -28417,14 +29146,14 @@ int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_guild_sd_check_pre ) { + if (HPMHooks.count.HP_guild_sd_check_pre > 0) { struct map_session_data* (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28432,9 +29161,9 @@ struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int cha { retVal___ = HPMHooks.source.guild.sd_check(guild_id, account_id, char_id); } - if( HPMHooks.count.HP_guild_sd_check_post ) { + if (HPMHooks.count.HP_guild_sd_check_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int guild_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_post; hIndex++ ) { + 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); } @@ -28444,14 +29173,14 @@ struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int cha bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_read_guildskill_tree_db_pre ) { + if (HPMHooks.count.HP_guild_read_guildskill_tree_db_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28459,9 +29188,9 @@ bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.guild.read_guildskill_tree_db(split, columns, current); } - if( HPMHooks.count.HP_guild_read_guildskill_tree_db_post ) { + if (HPMHooks.count.HP_guild_read_guildskill_tree_db_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_post; hIndex++ ) { + 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); } @@ -28471,14 +29200,14 @@ bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { bool HP_guild_read_castledb(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_read_castledb_pre ) { + if (HPMHooks.count.HP_guild_read_castledb_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28486,9 +29215,9 @@ bool HP_guild_read_castledb(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.guild.read_castledb(str, columns, current); } - if( HPMHooks.count.HP_guild_read_castledb_post ) { + if (HPMHooks.count.HP_guild_read_castledb_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_post; hIndex++ ) { + 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); } @@ -28498,16 +29227,16 @@ bool HP_guild_read_castledb(char *str[], int columns, int current) { int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_timer_sub_pre ) { + if (HPMHooks.count.HP_guild_payexp_timer_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28517,9 +29246,9 @@ int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_payexp_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_post; hIndex++ ) { + 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); @@ -28531,16 +29260,16 @@ int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list ap) int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_xy_timer_sub_pre ) { + if (HPMHooks.count.HP_guild_send_xy_timer_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28550,9 +29279,9 @@ int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_send_xy_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_post; hIndex++ ) { + 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); @@ -28564,14 +29293,14 @@ int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_xy_timer_pre ) { + if (HPMHooks.count.HP_guild_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28579,9 +29308,9 @@ int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.guild.send_xy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_guild_send_xy_timer_post ) { + if (HPMHooks.count.HP_guild_send_xy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_post; hIndex++ ) { + 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); } @@ -28591,16 +29320,16 @@ int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_guild_create_expcache_pre ) { + if (HPMHooks.count.HP_guild_create_expcache_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28610,9 +29339,9 @@ struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { retVal___ = HPMHooks.source.guild.create_expcache(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_guild_create_expcache_post ) { + if (HPMHooks.count.HP_guild_create_expcache_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_post; hIndex++ ) { + 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); @@ -28624,16 +29353,16 @@ struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_eventlist_db_final_pre ) { + if (HPMHooks.count.HP_guild_eventlist_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28643,9 +29372,9 @@ int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_eventlist_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_post; hIndex++ ) { + 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); @@ -28657,16 +29386,16 @@ int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list ap int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_expcache_db_final_pre ) { + if (HPMHooks.count.HP_guild_expcache_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28676,9 +29405,9 @@ int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_expcache_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_post; hIndex++ ) { + 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); @@ -28690,16 +29419,16 @@ int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list ap) int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castle_db_final_pre ) { + if (HPMHooks.count.HP_guild_castle_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28709,9 +29438,9 @@ int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_castle_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_post; hIndex++ ) { + 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); @@ -28723,16 +29452,16 @@ int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_broken_sub_pre ) { + if (HPMHooks.count.HP_guild_broken_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28742,9 +29471,9 @@ int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.guild.broken_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_guild_broken_sub_post ) { + if (HPMHooks.count.HP_guild_broken_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_post; hIndex++ ) { + 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); @@ -28756,16 +29485,16 @@ int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castle_broken_sub_pre ) { + if (HPMHooks.count.HP_guild_castle_broken_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28775,9 +29504,9 @@ int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_guild_castle_broken_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_post; hIndex++ ) { + 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); @@ -28788,14 +29517,14 @@ int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list ap) } void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_guild_makemember_pre ) { + if (HPMHooks.count.HP_guild_makemember_pre > 0) { void (*preHookFunc) (struct guild_member **m, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28803,9 +29532,9 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { { HPMHooks.source.guild.makemember(m, sd); } - if( HPMHooks.count.HP_guild_makemember_post ) { + if (HPMHooks.count.HP_guild_makemember_post > 0) { void (*postHookFunc) (struct guild_member *m, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_makemember_post[hIndex].func; postHookFunc(m, sd); } @@ -28815,14 +29544,14 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { int HP_guild_check_member(const struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_member_pre ) { + if (HPMHooks.count.HP_guild_check_member_pre > 0) { int (*preHookFunc) (const struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28830,9 +29559,9 @@ int HP_guild_check_member(const struct guild *g) { { retVal___ = HPMHooks.source.guild.check_member(g); } - if( HPMHooks.count.HP_guild_check_member_post ) { + if (HPMHooks.count.HP_guild_check_member_post > 0) { int (*postHookFunc) (int retVal___, const struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_post; hIndex++ ) { + 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); } @@ -28842,14 +29571,14 @@ int HP_guild_check_member(const struct guild *g) { int HP_guild_get_alliance_count(struct guild *g, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_get_alliance_count_pre ) { + if (HPMHooks.count.HP_guild_get_alliance_count_pre > 0) { int (*preHookFunc) (struct guild **g, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28857,9 +29586,9 @@ int HP_guild_get_alliance_count(struct guild *g, int flag) { { retVal___ = HPMHooks.source.guild.get_alliance_count(g, flag); } - if( HPMHooks.count.HP_guild_get_alliance_count_post ) { + if (HPMHooks.count.HP_guild_get_alliance_count_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_post; hIndex++ ) { + 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); } @@ -28868,16 +29597,16 @@ int HP_guild_get_alliance_count(struct guild *g, int flag) { } 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 ) { + if (HPMHooks.count.HP_guild_castle_reconnect_sub_pre > 0) { void (*preHookFunc) (void **key, void **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28887,9 +29616,9 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { HPMHooks.source.guild.castle_reconnect_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_guild_castle_reconnect_sub_post ) { + if (HPMHooks.count.HP_guild_castle_reconnect_sub_post > 0) { void (*postHookFunc) (void *key, void *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_post; hIndex++ ) { + 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); @@ -28902,14 +29631,14 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { struct guild_storage* HP_gstorage_ensure(int guild_id) { int hIndex = 0; struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_ensure_pre ) { + if (HPMHooks.count.HP_gstorage_ensure_pre > 0) { struct guild_storage* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_ensure_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28917,9 +29646,9 @@ struct guild_storage* HP_gstorage_ensure(int guild_id) { { retVal___ = HPMHooks.source.gstorage.ensure(guild_id); } - if( HPMHooks.count.HP_gstorage_ensure_post ) { + if (HPMHooks.count.HP_gstorage_ensure_post > 0) { struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_ensure_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id); } @@ -28928,14 +29657,14 @@ struct guild_storage* HP_gstorage_ensure(int guild_id) { } void HP_gstorage_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_gstorage_init_pre ) { + if (HPMHooks.count.HP_gstorage_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28943,9 +29672,9 @@ void HP_gstorage_init(bool minimal) { { HPMHooks.source.gstorage.init(minimal); } - if( HPMHooks.count.HP_gstorage_init_post ) { + if (HPMHooks.count.HP_gstorage_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_init_post[hIndex].func; postHookFunc(minimal); } @@ -28954,14 +29683,14 @@ void HP_gstorage_init(bool minimal) { } void HP_gstorage_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_gstorage_final_pre ) { + if (HPMHooks.count.HP_gstorage_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28969,9 +29698,9 @@ void HP_gstorage_final(void) { { HPMHooks.source.gstorage.final(); } - if( HPMHooks.count.HP_gstorage_final_post ) { + if (HPMHooks.count.HP_gstorage_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_final_post[hIndex].func; postHookFunc(); } @@ -28981,14 +29710,14 @@ void HP_gstorage_final(void) { int HP_gstorage_delete(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_delete_pre ) { + if (HPMHooks.count.HP_gstorage_delete_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28996,9 +29725,9 @@ int HP_gstorage_delete(int guild_id) { { retVal___ = HPMHooks.source.gstorage.delete(guild_id); } - if( HPMHooks.count.HP_gstorage_delete_post ) { + if (HPMHooks.count.HP_gstorage_delete_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_post; hIndex++ ) { + 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); } @@ -29008,14 +29737,14 @@ int HP_gstorage_delete(int guild_id) { int HP_gstorage_open(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_open_pre ) { + if (HPMHooks.count.HP_gstorage_open_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29023,9 +29752,9 @@ int HP_gstorage_open(struct map_session_data *sd) { { retVal___ = HPMHooks.source.gstorage.open(sd); } - if( HPMHooks.count.HP_gstorage_open_post ) { + if (HPMHooks.count.HP_gstorage_open_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -29035,14 +29764,14 @@ int HP_gstorage_open(struct map_session_data *sd) { int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_additem_pre ) { + if (HPMHooks.count.HP_gstorage_additem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct guild_storage **stor, struct item **item_data, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29050,9 +29779,9 @@ int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, { retVal___ = HPMHooks.source.gstorage.additem(sd, stor, item_data, amount); } - if( HPMHooks.count.HP_gstorage_additem_post ) { + if (HPMHooks.count.HP_gstorage_additem_post > 0) { 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++ ) { + 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); } @@ -29062,14 +29791,14 @@ int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_delitem_pre ) { + if (HPMHooks.count.HP_gstorage_delitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct guild_storage **stor, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29077,9 +29806,9 @@ int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, { retVal___ = HPMHooks.source.gstorage.delitem(sd, stor, n, amount); } - if( HPMHooks.count.HP_gstorage_delitem_post ) { + if (HPMHooks.count.HP_gstorage_delitem_post > 0) { 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++ ) { + 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); } @@ -29089,14 +29818,14 @@ int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_add_pre ) { + if (HPMHooks.count.HP_gstorage_add_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29104,9 +29833,9 @@ int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.gstorage.add(sd, index, amount); } - if( HPMHooks.count.HP_gstorage_add_post ) { + if (HPMHooks.count.HP_gstorage_add_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_post; hIndex++ ) { + 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); } @@ -29116,14 +29845,14 @@ int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_get_pre ) { + if (HPMHooks.count.HP_gstorage_get_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29131,9 +29860,9 @@ int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.gstorage.get(sd, index, amount); } - if( HPMHooks.count.HP_gstorage_get_post ) { + if (HPMHooks.count.HP_gstorage_get_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_post; hIndex++ ) { + 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); } @@ -29143,14 +29872,14 @@ int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_addfromcart_pre ) { + if (HPMHooks.count.HP_gstorage_addfromcart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29158,9 +29887,9 @@ int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) { retVal___ = HPMHooks.source.gstorage.addfromcart(sd, index, amount); } - if( HPMHooks.count.HP_gstorage_addfromcart_post ) { + if (HPMHooks.count.HP_gstorage_addfromcart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_post; hIndex++ ) { + 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); } @@ -29170,14 +29899,14 @@ int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_gettocart_pre ) { + if (HPMHooks.count.HP_gstorage_gettocart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29185,9 +29914,9 @@ int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.gstorage.gettocart(sd, index, amount); } - if( HPMHooks.count.HP_gstorage_gettocart_post ) { + if (HPMHooks.count.HP_gstorage_gettocart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_post; hIndex++ ) { + 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); } @@ -29197,14 +29926,14 @@ int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { int HP_gstorage_close(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_close_pre ) { + if (HPMHooks.count.HP_gstorage_close_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29212,9 +29941,9 @@ int HP_gstorage_close(struct map_session_data *sd) { { retVal___ = HPMHooks.source.gstorage.close(sd); } - if( HPMHooks.count.HP_gstorage_close_post ) { + if (HPMHooks.count.HP_gstorage_close_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_close_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -29224,14 +29953,14 @@ int HP_gstorage_close(struct map_session_data *sd) { int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_pc_quit_pre ) { + if (HPMHooks.count.HP_gstorage_pc_quit_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29239,9 +29968,9 @@ int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { { retVal___ = HPMHooks.source.gstorage.pc_quit(sd, flag); } - if( HPMHooks.count.HP_gstorage_pc_quit_post ) { + if (HPMHooks.count.HP_gstorage_pc_quit_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_post; hIndex++ ) { + 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); } @@ -29251,14 +29980,14 @@ int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { int HP_gstorage_save(int account_id, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_save_pre ) { + if (HPMHooks.count.HP_gstorage_save_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29266,9 +29995,9 @@ int HP_gstorage_save(int account_id, int guild_id, int flag) { { retVal___ = HPMHooks.source.gstorage.save(account_id, guild_id, flag); } - if( HPMHooks.count.HP_gstorage_save_post ) { + if (HPMHooks.count.HP_gstorage_save_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int guild_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_post; hIndex++ ) { + 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); } @@ -29278,14 +30007,14 @@ int HP_gstorage_save(int account_id, int guild_id, int flag) { int HP_gstorage_saved(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_saved_pre ) { + if (HPMHooks.count.HP_gstorage_saved_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29293,9 +30022,9 @@ int HP_gstorage_saved(int guild_id) { { retVal___ = HPMHooks.source.gstorage.saved(guild_id); } - if( HPMHooks.count.HP_gstorage_saved_post ) { + if (HPMHooks.count.HP_gstorage_saved_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_post; hIndex++ ) { + 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); } @@ -29305,16 +30034,16 @@ int HP_gstorage_saved(int guild_id) { struct DBData HP_gstorage_create(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_gstorage_create_pre ) { + if (HPMHooks.count.HP_gstorage_create_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29324,9 +30053,9 @@ struct DBData HP_gstorage_create(union DBKey key, va_list args) { retVal___ = HPMHooks.source.gstorage.create(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_gstorage_create_post ) { + if (HPMHooks.count.HP_gstorage_create_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_post; hIndex++ ) { + 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); @@ -29338,14 +30067,14 @@ struct DBData HP_gstorage_create(union DBKey key, va_list args) { /* homunculus_interface */ void HP_homun_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_homun_init_pre ) { + if (HPMHooks.count.HP_homun_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29353,9 +30082,9 @@ void HP_homun_init(bool minimal) { { HPMHooks.source.homun.init(minimal); } - if( HPMHooks.count.HP_homun_init_post ) { + if (HPMHooks.count.HP_homun_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_init_post[hIndex].func; postHookFunc(minimal); } @@ -29364,14 +30093,14 @@ void HP_homun_init(bool minimal) { } void HP_homun_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_final_pre ) { + if (HPMHooks.count.HP_homun_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29379,9 +30108,9 @@ void HP_homun_final(void) { { HPMHooks.source.homun.final(); } - if( HPMHooks.count.HP_homun_final_post ) { + if (HPMHooks.count.HP_homun_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_final_post[hIndex].func; postHookFunc(); } @@ -29390,14 +30119,14 @@ void HP_homun_final(void) { } void HP_homun_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_reload_pre ) { + if (HPMHooks.count.HP_homun_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29405,9 +30134,9 @@ void HP_homun_reload(void) { { HPMHooks.source.homun.reload(); } - if( HPMHooks.count.HP_homun_reload_post ) { + if (HPMHooks.count.HP_homun_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_reload_post[hIndex].func; postHookFunc(); } @@ -29416,14 +30145,14 @@ void HP_homun_reload(void) { } void HP_homun_reload_skill(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_reload_skill_pre ) { + if (HPMHooks.count.HP_homun_reload_skill_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29431,9 +30160,9 @@ void HP_homun_reload_skill(void) { { HPMHooks.source.homun.reload_skill(); } - if( HPMHooks.count.HP_homun_reload_skill_post ) { + if (HPMHooks.count.HP_homun_reload_skill_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_reload_skill_post[hIndex].func; postHookFunc(); } @@ -29443,14 +30172,14 @@ void HP_homun_reload_skill(void) { 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 ) { + if (HPMHooks.count.HP_homun_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29458,9 +30187,9 @@ struct view_data* HP_homun_get_viewdata(int class_) { { retVal___ = HPMHooks.source.homun.get_viewdata(class_); } - if( HPMHooks.count.HP_homun_get_viewdata_post ) { + if (HPMHooks.count.HP_homun_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_post; hIndex++ ) { + 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_); } @@ -29470,14 +30199,14 @@ struct view_data* HP_homun_get_viewdata(int class_) { enum homun_type HP_homun_class2type(int class_) { int hIndex = 0; enum homun_type retVal___ = HT_INVALID; - if( HPMHooks.count.HP_homun_class2type_pre ) { + if (HPMHooks.count.HP_homun_class2type_pre > 0) { enum homun_type (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29485,9 +30214,9 @@ enum homun_type HP_homun_class2type(int class_) { { retVal___ = HPMHooks.source.homun.class2type(class_); } - if( HPMHooks.count.HP_homun_class2type_post ) { + if (HPMHooks.count.HP_homun_class2type_post > 0) { enum homun_type (*postHookFunc) (enum homun_type retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_class2type_post[hIndex].func; retVal___ = postHookFunc(retVal___, class_); } @@ -29496,14 +30225,14 @@ enum homun_type HP_homun_class2type(int class_) { } void HP_homun_damaged(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_damaged_pre ) { + if (HPMHooks.count.HP_homun_damaged_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29511,9 +30240,9 @@ void HP_homun_damaged(struct homun_data *hd) { { HPMHooks.source.homun.damaged(hd); } - if( HPMHooks.count.HP_homun_damaged_post ) { + if (HPMHooks.count.HP_homun_damaged_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_damaged_post[hIndex].func; postHookFunc(hd); } @@ -29523,14 +30252,14 @@ void HP_homun_damaged(struct homun_data *hd) { int HP_homun_dead(struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_dead_pre ) { + if (HPMHooks.count.HP_homun_dead_pre > 0) { int (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29538,9 +30267,9 @@ int HP_homun_dead(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.dead(hd); } - if( HPMHooks.count.HP_homun_dead_post ) { + if (HPMHooks.count.HP_homun_dead_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_dead_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -29550,14 +30279,14 @@ int HP_homun_dead(struct homun_data *hd) { int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_vaporize_pre ) { + if (HPMHooks.count.HP_homun_vaporize_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, enum homun_state *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29565,9 +30294,9 @@ int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { { retVal___ = HPMHooks.source.homun.vaporize(sd, flag); } - if( HPMHooks.count.HP_homun_vaporize_post ) { + if (HPMHooks.count.HP_homun_vaporize_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum homun_state flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_post; hIndex++ ) { + 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); } @@ -29577,14 +30306,14 @@ int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { int HP_homun_delete(struct homun_data *hd, int emote) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_delete_pre ) { + if (HPMHooks.count.HP_homun_delete_pre > 0) { int (*preHookFunc) (struct homun_data **hd, int *emote); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29592,9 +30321,9 @@ int HP_homun_delete(struct homun_data *hd, int emote) { { retVal___ = HPMHooks.source.homun.delete(hd, emote); } - if( HPMHooks.count.HP_homun_delete_post ) { + if (HPMHooks.count.HP_homun_delete_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, int emote); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_post; hIndex++ ) { + 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); } @@ -29604,14 +30333,14 @@ int HP_homun_delete(struct homun_data *hd, int emote) { int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_checkskill_pre ) { + if (HPMHooks.count.HP_homun_checkskill_pre > 0) { int (*preHookFunc) (struct homun_data **hd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29619,9 +30348,9 @@ int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { { retVal___ = HPMHooks.source.homun.checkskill(hd, skill_id); } - if( HPMHooks.count.HP_homun_checkskill_post ) { + if (HPMHooks.count.HP_homun_checkskill_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_post; hIndex++ ) { + 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); } @@ -29631,14 +30360,14 @@ int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_calc_skilltree_pre ) { + if (HPMHooks.count.HP_homun_calc_skilltree_pre > 0) { int (*preHookFunc) (struct homun_data **hd, int *flag_evolve); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29646,9 +30375,9 @@ int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { { retVal___ = HPMHooks.source.homun.calc_skilltree(hd, flag_evolve); } - if( HPMHooks.count.HP_homun_calc_skilltree_post ) { + if (HPMHooks.count.HP_homun_calc_skilltree_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, int flag_evolve); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_post; hIndex++ ) { + 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); } @@ -29658,14 +30387,14 @@ int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { int HP_homun_skill_tree_get_max(int id, int b_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_skill_tree_get_max_pre ) { + if (HPMHooks.count.HP_homun_skill_tree_get_max_pre > 0) { int (*preHookFunc) (int *id, int *b_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29673,9 +30402,9 @@ int HP_homun_skill_tree_get_max(int id, int b_class) { { retVal___ = HPMHooks.source.homun.skill_tree_get_max(id, b_class); } - if( HPMHooks.count.HP_homun_skill_tree_get_max_post ) { + if (HPMHooks.count.HP_homun_skill_tree_get_max_post > 0) { int (*postHookFunc) (int retVal___, int id, int b_class); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_post; hIndex++ ) { + 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); } @@ -29684,14 +30413,14 @@ int HP_homun_skill_tree_get_max(int id, int b_class) { } void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_homun_skillup_pre ) { + if (HPMHooks.count.HP_homun_skillup_pre > 0) { void (*preHookFunc) (struct homun_data **hd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29699,9 +30428,9 @@ void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { { HPMHooks.source.homun.skillup(hd, skill_id); } - if( HPMHooks.count.HP_homun_skillup_post ) { + if (HPMHooks.count.HP_homun_skillup_post > 0) { void (*postHookFunc) (struct homun_data *hd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_skillup_post[hIndex].func; postHookFunc(hd, skill_id); } @@ -29711,14 +30440,14 @@ void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { bool HP_homun_levelup(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_levelup_pre ) { + if (HPMHooks.count.HP_homun_levelup_pre > 0) { bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29726,9 +30455,9 @@ bool HP_homun_levelup(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.levelup(hd); } - if( HPMHooks.count.HP_homun_levelup_post ) { + if (HPMHooks.count.HP_homun_levelup_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_levelup_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -29738,14 +30467,14 @@ bool HP_homun_levelup(struct homun_data *hd) { int HP_homun_change_class(struct homun_data *hd, short class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_change_class_pre ) { + if (HPMHooks.count.HP_homun_change_class_pre > 0) { int (*preHookFunc) (struct homun_data **hd, short *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29753,9 +30482,9 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { { retVal___ = HPMHooks.source.homun.change_class(hd, class_); } - if( HPMHooks.count.HP_homun_change_class_post ) { + if (HPMHooks.count.HP_homun_change_class_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, short class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++ ) { + 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_); } @@ -29765,14 +30494,14 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { bool HP_homun_evolve(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_evolve_pre ) { + if (HPMHooks.count.HP_homun_evolve_pre > 0) { bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29780,9 +30509,9 @@ bool HP_homun_evolve(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.evolve(hd); } - if( HPMHooks.count.HP_homun_evolve_post ) { + if (HPMHooks.count.HP_homun_evolve_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_evolve_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -29792,14 +30521,14 @@ bool HP_homun_evolve(struct homun_data *hd) { bool HP_homun_mutate(struct homun_data *hd, int homun_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_mutate_pre ) { + if (HPMHooks.count.HP_homun_mutate_pre > 0) { bool (*preHookFunc) (struct homun_data **hd, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29807,9 +30536,9 @@ bool HP_homun_mutate(struct homun_data *hd, int homun_id) { { retVal___ = HPMHooks.source.homun.mutate(hd, homun_id); } - if( HPMHooks.count.HP_homun_mutate_post ) { + if (HPMHooks.count.HP_homun_mutate_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_post; hIndex++ ) { + 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); } @@ -29819,14 +30548,14 @@ bool HP_homun_mutate(struct homun_data *hd, int homun_id) { int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_gainexp_pre ) { + if (HPMHooks.count.HP_homun_gainexp_pre > 0) { int (*preHookFunc) (struct homun_data **hd, unsigned int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29834,9 +30563,9 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { { retVal___ = HPMHooks.source.homun.gainexp(hd, exp); } - if( HPMHooks.count.HP_homun_gainexp_post ) { + if (HPMHooks.count.HP_homun_gainexp_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int exp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_post; hIndex++ ) { + 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); } @@ -29846,14 +30575,14 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_homun_add_intimacy_pre ) { + if (HPMHooks.count.HP_homun_add_intimacy_pre > 0) { unsigned int (*preHookFunc) (struct homun_data **hd, unsigned int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29861,9 +30590,9 @@ unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { { retVal___ = HPMHooks.source.homun.add_intimacy(hd, value); } - if( HPMHooks.count.HP_homun_add_intimacy_post ) { + if (HPMHooks.count.HP_homun_add_intimacy_post > 0) { 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++ ) { + 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); } @@ -29873,14 +30602,14 @@ unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_homun_consume_intimacy_pre ) { + if (HPMHooks.count.HP_homun_consume_intimacy_pre > 0) { unsigned int (*preHookFunc) (struct homun_data **hd, unsigned int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29888,9 +30617,9 @@ unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value { retVal___ = HPMHooks.source.homun.consume_intimacy(hd, value); } - if( HPMHooks.count.HP_homun_consume_intimacy_post ) { + if (HPMHooks.count.HP_homun_consume_intimacy_post > 0) { 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++ ) { + 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); } @@ -29899,14 +30628,14 @@ unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value } void HP_homun_healed(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_healed_pre ) { + if (HPMHooks.count.HP_homun_healed_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29914,9 +30643,9 @@ void HP_homun_healed(struct homun_data *hd) { { HPMHooks.source.homun.healed(hd); } - if( HPMHooks.count.HP_homun_healed_post ) { + if (HPMHooks.count.HP_homun_healed_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_healed_post[hIndex].func; postHookFunc(hd); } @@ -29925,14 +30654,14 @@ void HP_homun_healed(struct homun_data *hd) { } void HP_homun_save(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_save_pre ) { + if (HPMHooks.count.HP_homun_save_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29940,9 +30669,9 @@ void HP_homun_save(struct homun_data *hd) { { HPMHooks.source.homun.save(hd); } - if( HPMHooks.count.HP_homun_save_post ) { + if (HPMHooks.count.HP_homun_save_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_save_post[hIndex].func; postHookFunc(hd); } @@ -29952,14 +30681,14 @@ void HP_homun_save(struct homun_data *hd) { unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_homun_menu_pre ) { + if (HPMHooks.count.HP_homun_menu_pre > 0) { unsigned char (*preHookFunc) (struct map_session_data **sd, unsigned char *menu_num); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29967,9 +30696,9 @@ unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) { retVal___ = HPMHooks.source.homun.menu(sd, menu_num); } - if( HPMHooks.count.HP_homun_menu_post ) { + if (HPMHooks.count.HP_homun_menu_post > 0) { 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++ ) { + 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); } @@ -29979,14 +30708,14 @@ unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_feed_pre ) { + if (HPMHooks.count.HP_homun_feed_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29994,9 +30723,9 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.feed(sd, hd); } - if( HPMHooks.count.HP_homun_feed_post ) { + if (HPMHooks.count.HP_homun_feed_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_post; hIndex++ ) { + 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); } @@ -30006,14 +30735,14 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_hunger_timer_pre ) { + if (HPMHooks.count.HP_homun_hunger_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30021,9 +30750,9 @@ int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.homun.hunger_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_homun_hunger_timer_post ) { + if (HPMHooks.count.HP_homun_hunger_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_post; hIndex++ ) { + 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); } @@ -30032,14 +30761,14 @@ int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_homun_hunger_timer_delete(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_hunger_timer_delete_pre ) { + if (HPMHooks.count.HP_homun_hunger_timer_delete_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30047,9 +30776,9 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) { { HPMHooks.source.homun.hunger_timer_delete(hd); } - if( HPMHooks.count.HP_homun_hunger_timer_delete_post ) { + if (HPMHooks.count.HP_homun_hunger_timer_delete_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_post; hIndex++ ) { + 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); } @@ -30059,14 +30788,14 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) { int HP_homun_change_name(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_change_name_pre ) { + if (HPMHooks.count.HP_homun_change_name_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30074,9 +30803,9 @@ int HP_homun_change_name(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.homun.change_name(sd, name); } - if( HPMHooks.count.HP_homun_change_name_post ) { + if (HPMHooks.count.HP_homun_change_name_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_post; hIndex++ ) { + 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); } @@ -30086,14 +30815,14 @@ int HP_homun_change_name(struct map_session_data *sd, const char *name) { bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_change_name_ack_pre ) { + if (HPMHooks.count.HP_homun_change_name_ack_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30101,9 +30830,9 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int { retVal___ = HPMHooks.source.homun.change_name_ack(sd, name, flag); } - if( HPMHooks.count.HP_homun_change_name_ack_post ) { + if (HPMHooks.count.HP_homun_change_name_ack_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *name, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_post; hIndex++ ) { + 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); } @@ -30113,14 +30842,14 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int int HP_homun_db_search(int key, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_db_search_pre ) { + if (HPMHooks.count.HP_homun_db_search_pre > 0) { int (*preHookFunc) (int *key, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30128,9 +30857,9 @@ int HP_homun_db_search(int key, int type) { { retVal___ = HPMHooks.source.homun.db_search(key, type); } - if( HPMHooks.count.HP_homun_db_search_post ) { + if (HPMHooks.count.HP_homun_db_search_post > 0) { int (*postHookFunc) (int retVal___, int key, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_post; hIndex++ ) { + 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); } @@ -30140,14 +30869,14 @@ int HP_homun_db_search(int key, int type) { bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_create_pre ) { + if (HPMHooks.count.HP_homun_create_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const struct s_homunculus **hom); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30155,9 +30884,9 @@ bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom { retVal___ = HPMHooks.source.homun.create(sd, hom); } - if( HPMHooks.count.HP_homun_create_post ) { + if (HPMHooks.count.HP_homun_create_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++ ) { + 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); } @@ -30166,14 +30895,14 @@ bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom } void HP_homun_init_timers(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_init_timers_pre ) { + if (HPMHooks.count.HP_homun_init_timers_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30181,9 +30910,9 @@ void HP_homun_init_timers(struct homun_data *hd) { { HPMHooks.source.homun.init_timers(hd); } - if( HPMHooks.count.HP_homun_init_timers_post ) { + if (HPMHooks.count.HP_homun_init_timers_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_init_timers_post[hIndex].func; postHookFunc(hd); } @@ -30193,14 +30922,14 @@ void HP_homun_init_timers(struct homun_data *hd) { bool HP_homun_call(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_call_pre ) { + if (HPMHooks.count.HP_homun_call_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30208,9 +30937,9 @@ bool HP_homun_call(struct map_session_data *sd) { { retVal___ = HPMHooks.source.homun.call(sd); } - if( HPMHooks.count.HP_homun_call_post ) { + if (HPMHooks.count.HP_homun_call_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_call_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -30220,14 +30949,14 @@ bool HP_homun_call(struct map_session_data *sd) { bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_recv_data_pre ) { + if (HPMHooks.count.HP_homun_recv_data_pre > 0) { bool (*preHookFunc) (int *account_id, const struct s_homunculus **sh, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30235,9 +30964,9 @@ bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) { retVal___ = HPMHooks.source.homun.recv_data(account_id, sh, flag); } - if( HPMHooks.count.HP_homun_recv_data_post ) { + if (HPMHooks.count.HP_homun_recv_data_post > 0) { bool (*postHookFunc) (bool retVal___, int account_id, const struct s_homunculus *sh, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_post; hIndex++ ) { + 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); } @@ -30247,14 +30976,14 @@ bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) bool HP_homun_creation_request(struct map_session_data *sd, int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_creation_request_pre ) { + if (HPMHooks.count.HP_homun_creation_request_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30262,9 +30991,9 @@ bool HP_homun_creation_request(struct map_session_data *sd, int class_) { { retVal___ = HPMHooks.source.homun.creation_request(sd, class_); } - if( HPMHooks.count.HP_homun_creation_request_post ) { + if (HPMHooks.count.HP_homun_creation_request_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_post; hIndex++ ) { + 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_); } @@ -30274,14 +31003,14 @@ bool HP_homun_creation_request(struct map_session_data *sd, int class_) { bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, short y) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_ressurect_pre ) { + if (HPMHooks.count.HP_homun_ressurect_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, unsigned char *per, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30289,9 +31018,9 @@ bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, { retVal___ = HPMHooks.source.homun.ressurect(sd, per, x, y); } - if( HPMHooks.count.HP_homun_ressurect_post ) { + if (HPMHooks.count.HP_homun_ressurect_post > 0) { 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++ ) { + 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); } @@ -30300,14 +31029,14 @@ bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, } void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) { int hIndex = 0; - if( HPMHooks.count.HP_homun_revive_pre ) { + if (HPMHooks.count.HP_homun_revive_pre > 0) { void (*preHookFunc) (struct homun_data **hd, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30315,9 +31044,9 @@ void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) { { HPMHooks.source.homun.revive(hd, hp, sp); } - if( HPMHooks.count.HP_homun_revive_post ) { + if (HPMHooks.count.HP_homun_revive_post > 0) { void (*postHookFunc) (struct homun_data *hd, unsigned int hp, unsigned int sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_revive_post[hIndex].func; postHookFunc(hd, hp, sp); } @@ -30326,14 +31055,14 @@ void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) { } void HP_homun_stat_reset(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_stat_reset_pre ) { + if (HPMHooks.count.HP_homun_stat_reset_pre > 0) { void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30341,9 +31070,9 @@ void HP_homun_stat_reset(struct homun_data *hd) { { HPMHooks.source.homun.stat_reset(hd); } - if( HPMHooks.count.HP_homun_stat_reset_post ) { + if (HPMHooks.count.HP_homun_stat_reset_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_stat_reset_post[hIndex].func; postHookFunc(hd); } @@ -30353,14 +31082,14 @@ void HP_homun_stat_reset(struct homun_data *hd) { bool HP_homun_shuffle(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_shuffle_pre ) { + if (HPMHooks.count.HP_homun_shuffle_pre > 0) { bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30368,9 +31097,9 @@ bool HP_homun_shuffle(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.shuffle(hd); } - if( HPMHooks.count.HP_homun_shuffle_post ) { + if (HPMHooks.count.HP_homun_shuffle_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_shuffle_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -30380,14 +31109,14 @@ bool HP_homun_shuffle(struct homun_data *hd) { bool HP_homun_read_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_read_db_sub_pre ) { + if (HPMHooks.count.HP_homun_read_db_sub_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30395,9 +31124,9 @@ bool HP_homun_read_db_sub(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.homun.read_db_sub(str, columns, current); } - if( HPMHooks.count.HP_homun_read_db_sub_post ) { + if (HPMHooks.count.HP_homun_read_db_sub_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_post; hIndex++ ) { + 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); } @@ -30406,14 +31135,14 @@ bool HP_homun_read_db_sub(char *str[], int columns, int current) { } void HP_homun_read_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_read_db_pre ) { + if (HPMHooks.count.HP_homun_read_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30421,9 +31150,9 @@ void HP_homun_read_db(void) { { HPMHooks.source.homun.read_db(); } - if( HPMHooks.count.HP_homun_read_db_post ) { + if (HPMHooks.count.HP_homun_read_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_read_db_post[hIndex].func; postHookFunc(); } @@ -30433,14 +31162,14 @@ void HP_homun_read_db(void) { bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_read_skill_db_sub_pre ) { + if (HPMHooks.count.HP_homun_read_skill_db_sub_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30448,9 +31177,9 @@ bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.homun.read_skill_db_sub(split, columns, current); } - if( HPMHooks.count.HP_homun_read_skill_db_sub_post ) { + if (HPMHooks.count.HP_homun_read_skill_db_sub_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_post; hIndex++ ) { + 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); } @@ -30459,14 +31188,14 @@ bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { } void HP_homun_skill_db_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_skill_db_read_pre ) { + if (HPMHooks.count.HP_homun_skill_db_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30474,9 +31203,9 @@ void HP_homun_skill_db_read(void) { { HPMHooks.source.homun.skill_db_read(); } - if( HPMHooks.count.HP_homun_skill_db_read_post ) { + if (HPMHooks.count.HP_homun_skill_db_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_post; hIndex++ ) { + 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(); } @@ -30485,14 +31214,14 @@ void HP_homun_skill_db_read(void) { } void HP_homun_exp_db_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_exp_db_read_pre ) { + if (HPMHooks.count.HP_homun_exp_db_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30500,9 +31229,9 @@ void HP_homun_exp_db_read(void) { { HPMHooks.source.homun.exp_db_read(); } - if( HPMHooks.count.HP_homun_exp_db_read_post ) { + if (HPMHooks.count.HP_homun_exp_db_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_post; hIndex++ ) { + 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(); } @@ -30511,14 +31240,14 @@ void HP_homun_exp_db_read(void) { } void HP_homun_addspiritball(struct homun_data *hd, int max) { int hIndex = 0; - if( HPMHooks.count.HP_homun_addspiritball_pre ) { + if (HPMHooks.count.HP_homun_addspiritball_pre > 0) { void (*preHookFunc) (struct homun_data **hd, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30526,9 +31255,9 @@ void HP_homun_addspiritball(struct homun_data *hd, int max) { { HPMHooks.source.homun.addspiritball(hd, max); } - if( HPMHooks.count.HP_homun_addspiritball_post ) { + if (HPMHooks.count.HP_homun_addspiritball_post > 0) { void (*postHookFunc) (struct homun_data *hd, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_addspiritball_post[hIndex].func; postHookFunc(hd, max); } @@ -30537,14 +31266,14 @@ void HP_homun_addspiritball(struct homun_data *hd, int max) { } void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { int hIndex = 0; - if( HPMHooks.count.HP_homun_delspiritball_pre ) { + if (HPMHooks.count.HP_homun_delspiritball_pre > 0) { void (*preHookFunc) (struct homun_data **hd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30552,9 +31281,9 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { { HPMHooks.source.homun.delspiritball(hd, count, type); } - if( HPMHooks.count.HP_homun_delspiritball_post ) { + if (HPMHooks.count.HP_homun_delspiritball_post > 0) { void (*postHookFunc) (struct homun_data *hd, int count, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_delspiritball_post[hIndex].func; postHookFunc(hd, count, type); } @@ -30564,14 +31293,14 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { int hIndex = 0; int8 retVal___ = 0; - if( HPMHooks.count.HP_homun_get_intimacy_grade_pre ) { + if (HPMHooks.count.HP_homun_get_intimacy_grade_pre > 0) { int8 (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_pre[hIndex].func; retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30579,9 +31308,9 @@ int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.get_intimacy_grade(hd); } - if( HPMHooks.count.HP_homun_get_intimacy_grade_post ) { + if (HPMHooks.count.HP_homun_get_intimacy_grade_post > 0) { int8 (*postHookFunc) (int8 retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -30591,14 +31320,14 @@ int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { /* instance_interface */ void HP_instance_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_instance_init_pre ) { + if (HPMHooks.count.HP_instance_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30606,9 +31335,9 @@ void HP_instance_init(bool minimal) { { HPMHooks.source.instance.init(minimal); } - if( HPMHooks.count.HP_instance_init_post ) { + if (HPMHooks.count.HP_instance_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_init_post[hIndex].func; postHookFunc(minimal); } @@ -30617,14 +31346,14 @@ void HP_instance_init(bool minimal) { } void HP_instance_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_instance_final_pre ) { + if (HPMHooks.count.HP_instance_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30632,9 +31361,9 @@ void HP_instance_final(void) { { HPMHooks.source.instance.final(); } - if( HPMHooks.count.HP_instance_final_post ) { + if (HPMHooks.count.HP_instance_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_final_post[hIndex].func; postHookFunc(); } @@ -30643,14 +31372,14 @@ void HP_instance_final(void) { } void HP_instance_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_instance_reload_pre ) { + if (HPMHooks.count.HP_instance_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30658,9 +31387,9 @@ void HP_instance_reload(void) { { HPMHooks.source.instance.reload(); } - if( HPMHooks.count.HP_instance_reload_post ) { + if (HPMHooks.count.HP_instance_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_reload_post[hIndex].func; postHookFunc(); } @@ -30670,14 +31399,14 @@ void HP_instance_reload(void) { int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_create_pre ) { + if (HPMHooks.count.HP_instance_create_pre > 0) { int (*preHookFunc) (int *party_id, const char **name, enum instance_owner_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30685,9 +31414,9 @@ int HP_instance_create(int party_id, const char *name, enum instance_owner_type { retVal___ = HPMHooks.source.instance.create(party_id, name, type); } - if( HPMHooks.count.HP_instance_create_post ) { + if (HPMHooks.count.HP_instance_create_post > 0) { 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++ ) { + 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); } @@ -30697,14 +31426,14 @@ int HP_instance_create(int party_id, const char *name, enum instance_owner_type int HP_instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_add_map_pre ) { + if (HPMHooks.count.HP_instance_add_map_pre > 0) { int (*preHookFunc) (const char **name, int *instance_id, bool *usebasename, const char **map_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30712,9 +31441,9 @@ int HP_instance_add_map(const char *name, int instance_id, bool usebasename, con { retVal___ = HPMHooks.source.instance.add_map(name, instance_id, usebasename, map_name); } - if( HPMHooks.count.HP_instance_add_map_post ) { + if (HPMHooks.count.HP_instance_add_map_post > 0) { 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++ ) { + 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); } @@ -30723,14 +31452,14 @@ int HP_instance_add_map(const char *name, int instance_id, bool usebasename, con } void HP_instance_del_map(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_instance_del_map_pre ) { + if (HPMHooks.count.HP_instance_del_map_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30738,9 +31467,9 @@ void HP_instance_del_map(int16 m) { { HPMHooks.source.instance.del_map(m); } - if( HPMHooks.count.HP_instance_del_map_post ) { + if (HPMHooks.count.HP_instance_del_map_post > 0) { void (*postHookFunc) (int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_del_map_post[hIndex].func; postHookFunc(m); } @@ -30750,14 +31479,14 @@ void HP_instance_del_map(int16 m) { int HP_instance_map2imap(int16 m, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_map2imap_pre ) { + if (HPMHooks.count.HP_instance_map2imap_pre > 0) { int (*preHookFunc) (int16 *m, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30765,9 +31494,9 @@ int HP_instance_map2imap(int16 m, int instance_id) { { retVal___ = HPMHooks.source.instance.map2imap(m, instance_id); } - if( HPMHooks.count.HP_instance_map2imap_post ) { + if (HPMHooks.count.HP_instance_map2imap_post > 0) { int (*postHookFunc) (int retVal___, int16 m, int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_post; hIndex++ ) { + 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); } @@ -30777,14 +31506,14 @@ int HP_instance_map2imap(int16 m, int instance_id) { int HP_instance_mapid2imapid(int16 m, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_mapid2imapid_pre ) { + if (HPMHooks.count.HP_instance_mapid2imapid_pre > 0) { int (*preHookFunc) (int16 *m, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30792,9 +31521,9 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) { { retVal___ = HPMHooks.source.instance.mapid2imapid(m, instance_id); } - if( HPMHooks.count.HP_instance_mapid2imapid_post ) { + if (HPMHooks.count.HP_instance_mapid2imapid_post > 0) { int (*postHookFunc) (int retVal___, int16 m, int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_post; hIndex++ ) { + 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); } @@ -30804,14 +31533,14 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) { int HP_instance_mapname2imap(const char *map_name, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_mapname2imap_pre ) { + if (HPMHooks.count.HP_instance_mapname2imap_pre > 0) { int (*preHookFunc) (const char **map_name, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_mapname2imap_pre[hIndex].func; retVal___ = preHookFunc(&map_name, &instance_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30819,9 +31548,9 @@ int HP_instance_mapname2imap(const char *map_name, int instance_id) { { retVal___ = HPMHooks.source.instance.mapname2imap(map_name, instance_id); } - if( HPMHooks.count.HP_instance_mapname2imap_post ) { + if (HPMHooks.count.HP_instance_mapname2imap_post > 0) { int (*postHookFunc) (int retVal___, const char *map_name, int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_mapname2imap_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_name, instance_id); } @@ -30831,16 +31560,16 @@ int HP_instance_mapname2imap(const char *map_name, int instance_id) { int HP_instance_map_npcsub(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_map_npcsub_pre ) { + if (HPMHooks.count.HP_instance_map_npcsub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_instance_map_npcsub_pre[hIndex].func; retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30850,9 +31579,9 @@ int HP_instance_map_npcsub(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.instance.map_npcsub(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_instance_map_npcsub_post ) { + if (HPMHooks.count.HP_instance_map_npcsub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_instance_map_npcsub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, args___copy); @@ -30864,16 +31593,16 @@ int HP_instance_map_npcsub(struct block_list *bl, va_list args) { int HP_instance_init_npc(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_init_npc_pre ) { + if (HPMHooks.count.HP_instance_init_npc_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_instance_init_npc_pre[hIndex].func; retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30883,9 +31612,9 @@ int HP_instance_init_npc(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.instance.init_npc(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_instance_init_npc_post ) { + if (HPMHooks.count.HP_instance_init_npc_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_instance_init_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, args___copy); @@ -30896,14 +31625,14 @@ int HP_instance_init_npc(struct block_list *bl, va_list args) { } void HP_instance_destroy(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_destroy_pre ) { + if (HPMHooks.count.HP_instance_destroy_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30911,9 +31640,9 @@ void HP_instance_destroy(int instance_id) { { HPMHooks.source.instance.destroy(instance_id); } - if( HPMHooks.count.HP_instance_destroy_post ) { + if (HPMHooks.count.HP_instance_destroy_post > 0) { void (*postHookFunc) (int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_destroy_post[hIndex].func; postHookFunc(instance_id); } @@ -30922,14 +31651,14 @@ void HP_instance_destroy(int instance_id) { } void HP_instance_start(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_start_pre ) { + if (HPMHooks.count.HP_instance_start_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30937,9 +31666,9 @@ void HP_instance_start(int instance_id) { { HPMHooks.source.instance.start(instance_id); } - if( HPMHooks.count.HP_instance_start_post ) { + if (HPMHooks.count.HP_instance_start_post > 0) { void (*postHookFunc) (int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_start_post[hIndex].func; postHookFunc(instance_id); } @@ -30948,14 +31677,14 @@ void HP_instance_start(int instance_id) { } void HP_instance_check_idle(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_check_idle_pre ) { + if (HPMHooks.count.HP_instance_check_idle_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30963,9 +31692,9 @@ void HP_instance_check_idle(int instance_id) { { HPMHooks.source.instance.check_idle(instance_id); } - if( HPMHooks.count.HP_instance_check_idle_post ) { + if (HPMHooks.count.HP_instance_check_idle_post > 0) { void (*postHookFunc) (int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_post; hIndex++ ) { + 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); } @@ -30974,14 +31703,14 @@ void HP_instance_check_idle(int instance_id) { } void HP_instance_check_kick(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_instance_check_kick_pre ) { + if (HPMHooks.count.HP_instance_check_kick_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30989,9 +31718,9 @@ void HP_instance_check_kick(struct map_session_data *sd) { { HPMHooks.source.instance.check_kick(sd); } - if( HPMHooks.count.HP_instance_check_kick_post ) { + if (HPMHooks.count.HP_instance_check_kick_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_check_kick_post[hIndex].func; postHookFunc(sd); } @@ -31000,14 +31729,14 @@ void HP_instance_check_kick(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_instance_set_timeout_pre > 0) { void (*preHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -31015,9 +31744,9 @@ void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, uns { HPMHooks.source.instance.set_timeout(instance_id, progress_timeout, idle_timeout); } - if( HPMHooks.count.HP_instance_set_timeout_post ) { + if (HPMHooks.count.HP_instance_set_timeout_post > 0) { 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++ ) { + 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); } @@ -31027,14 +31756,14 @@ void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, uns bool HP_instance_valid(int instance_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_instance_valid_pre ) { + if (HPMHooks.count.HP_instance_valid_pre > 0) { bool (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31042,9 +31771,9 @@ bool HP_instance_valid(int instance_id) { { retVal___ = HPMHooks.source.instance.valid(instance_id); } - if( HPMHooks.count.HP_instance_valid_post ) { + if (HPMHooks.count.HP_instance_valid_post > 0) { bool (*postHookFunc) (bool retVal___, int instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_post; hIndex++ ) { + 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); } @@ -31054,14 +31783,14 @@ bool HP_instance_valid(int instance_id) { int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_destroy_timer_pre ) { + if (HPMHooks.count.HP_instance_destroy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31069,9 +31798,9 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.instance.destroy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_instance_destroy_timer_post ) { + if (HPMHooks.count.HP_instance_destroy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_post; hIndex++ ) { + 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); } @@ -31082,14 +31811,14 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { int HP_intif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_parse_pre ) { + if (HPMHooks.count.HP_intif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31097,9 +31826,9 @@ int HP_intif_parse(int fd) { { retVal___ = HPMHooks.source.intif.parse(fd); } - if( HPMHooks.count.HP_intif_parse_post ) { + if (HPMHooks.count.HP_intif_parse_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -31109,14 +31838,14 @@ int HP_intif_parse(int fd) { 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 incubate, char *pet_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_create_pet_pre ) { + if (HPMHooks.count.HP_intif_create_pet_pre > 0) { 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 *incubate, char **pet_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++ ) { + 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, &incubate, &pet_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31124,9 +31853,9 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l { retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } - if( HPMHooks.count.HP_intif_create_pet_post ) { + if (HPMHooks.count.HP_intif_create_pet_post > 0) { 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 incubate, char *pet_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++ ) { + 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, incubate, pet_name); } @@ -31136,14 +31865,14 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l int HP_intif_broadcast(const char *mes, int len, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_broadcast_pre ) { + if (HPMHooks.count.HP_intif_broadcast_pre > 0) { int (*preHookFunc) (const char **mes, int *len, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31151,9 +31880,9 @@ int HP_intif_broadcast(const char *mes, int len, int type) { { retVal___ = HPMHooks.source.intif.broadcast(mes, len, type); } - if( HPMHooks.count.HP_intif_broadcast_post ) { + if (HPMHooks.count.HP_intif_broadcast_post > 0) { int (*postHookFunc) (int retVal___, const char *mes, int len, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast_post; hIndex++ ) { + 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); } @@ -31163,14 +31892,14 @@ int HP_intif_broadcast(const char *mes, int len, int type) { int HP_intif_broadcast2(const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_broadcast2_pre ) { + if (HPMHooks.count.HP_intif_broadcast2_pre > 0) { int (*preHookFunc) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31178,9 +31907,9 @@ int HP_intif_broadcast2(const char *mes, int len, unsigned int fontColor, short { retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY); } - if( HPMHooks.count.HP_intif_broadcast2_post ) { + if (HPMHooks.count.HP_intif_broadcast2_post > 0) { int (*postHookFunc) (int retVal___, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_broadcast2_post; hIndex++ ) { + 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); } @@ -31190,14 +31919,14 @@ int HP_intif_broadcast2(const char *mes, int len, unsigned int fontColor, short int HP_intif_main_message(struct map_session_data *sd, const char *message) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_main_message_pre ) { + if (HPMHooks.count.HP_intif_main_message_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31205,9 +31934,9 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) { { retVal___ = HPMHooks.source.intif.main_message(sd, message); } - if( HPMHooks.count.HP_intif_main_message_post ) { + if (HPMHooks.count.HP_intif_main_message_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_main_message_post; hIndex++ ) { + 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); } @@ -31217,14 +31946,14 @@ int HP_intif_main_message(struct map_session_data *sd, const char *message) { int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const char *mes, int mes_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_wis_message_pre ) { + if (HPMHooks.count.HP_intif_wis_message_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **nick, const char **mes, int *mes_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31232,9 +31961,9 @@ int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const ch { retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len); } - if( HPMHooks.count.HP_intif_wis_message_post ) { + if (HPMHooks.count.HP_intif_wis_message_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, int mes_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_post; hIndex++ ) { + 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); } @@ -31244,14 +31973,14 @@ int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const ch int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_wis_message_to_gm_pre ) { + if (HPMHooks.count.HP_intif_wis_message_to_gm_pre > 0) { int (*preHookFunc) (char **Wisp_name, int *permission, char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_wis_message_to_gm_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31259,9 +31988,9 @@ int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { { retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes); } - if( HPMHooks.count.HP_intif_wis_message_to_gm_post ) { + if (HPMHooks.count.HP_intif_wis_message_to_gm_post > 0) { 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++ ) { + 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); } @@ -31271,14 +32000,14 @@ int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { int HP_intif_saveregistry(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_saveregistry_pre ) { + if (HPMHooks.count.HP_intif_saveregistry_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31286,9 +32015,9 @@ int HP_intif_saveregistry(struct map_session_data *sd) { { retVal___ = HPMHooks.source.intif.saveregistry(sd); } - if( HPMHooks.count.HP_intif_saveregistry_post ) { + if (HPMHooks.count.HP_intif_saveregistry_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_saveregistry_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -31298,14 +32027,14 @@ int HP_intif_saveregistry(struct map_session_data *sd) { int HP_intif_request_registry(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_registry_pre ) { + if (HPMHooks.count.HP_intif_request_registry_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31313,26 +32042,78 @@ int HP_intif_request_registry(struct map_session_data *sd, int flag) { { retVal___ = HPMHooks.source.intif.request_registry(sd, flag); } - if( HPMHooks.count.HP_intif_request_registry_post ) { + if (HPMHooks.count.HP_intif_request_registry_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_registry_post; hIndex++ ) { + 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___; } +void HP_intif_request_account_storage(const struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_request_account_storage_pre > 0) { + void (*preHookFunc) (const struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_request_account_storage_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.request_account_storage(sd); + } + if (HPMHooks.count.HP_intif_request_account_storage_post > 0) { + void (*postHookFunc) (const struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_request_account_storage_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_intif_send_account_storage(const struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_send_account_storage_pre > 0) { + void (*preHookFunc) (const struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_send_account_storage_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.send_account_storage(sd); + } + if (HPMHooks.count.HP_intif_send_account_storage_post > 0) { + void (*postHookFunc) (const struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_send_account_storage_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} int HP_intif_request_guild_storage(int account_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_guild_storage_pre ) { + if (HPMHooks.count.HP_intif_request_guild_storage_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31340,9 +32121,9 @@ int HP_intif_request_guild_storage(int account_id, int guild_id) { { retVal___ = HPMHooks.source.intif.request_guild_storage(account_id, guild_id); } - if( HPMHooks.count.HP_intif_request_guild_storage_post ) { + if (HPMHooks.count.HP_intif_request_guild_storage_post > 0) { int (*postHookFunc) (int retVal___, int account_id, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_post; hIndex++ ) { + 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); } @@ -31352,14 +32133,14 @@ int HP_intif_request_guild_storage(int account_id, int guild_id) { int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_send_guild_storage_pre ) { + if (HPMHooks.count.HP_intif_send_guild_storage_pre > 0) { int (*preHookFunc) (int *account_id, struct guild_storage **gstor); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31367,9 +32148,9 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { { retVal___ = HPMHooks.source.intif.send_guild_storage(account_id, gstor); } - if( HPMHooks.count.HP_intif_send_guild_storage_post ) { + if (HPMHooks.count.HP_intif_send_guild_storage_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct guild_storage *gstor); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_post; hIndex++ ) { + 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); } @@ -31379,14 +32160,14 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { int HP_intif_create_party(struct party_member *member, const char *name, int item, int item2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_create_party_pre ) { + if (HPMHooks.count.HP_intif_create_party_pre > 0) { int (*preHookFunc) (struct party_member **member, const char **name, int *item, int *item2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31394,9 +32175,9 @@ int HP_intif_create_party(struct party_member *member, const char *name, int ite { retVal___ = HPMHooks.source.intif.create_party(member, name, item, item2); } - if( HPMHooks.count.HP_intif_create_party_post ) { + if (HPMHooks.count.HP_intif_create_party_post > 0) { int (*postHookFunc) (int retVal___, struct party_member *member, const char *name, int item, int item2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_post; hIndex++ ) { + 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); } @@ -31406,14 +32187,14 @@ int HP_intif_create_party(struct party_member *member, const char *name, int ite int HP_intif_request_partyinfo(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_partyinfo_pre ) { + if (HPMHooks.count.HP_intif_request_partyinfo_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31421,9 +32202,9 @@ int HP_intif_request_partyinfo(int party_id, int char_id) { { retVal___ = HPMHooks.source.intif.request_partyinfo(party_id, char_id); } - if( HPMHooks.count.HP_intif_request_partyinfo_post ) { + if (HPMHooks.count.HP_intif_request_partyinfo_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_post; hIndex++ ) { + 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); } @@ -31433,14 +32214,14 @@ int HP_intif_request_partyinfo(int party_id, int char_id) { int HP_intif_party_addmember(int party_id, struct party_member *member) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_addmember_pre ) { + if (HPMHooks.count.HP_intif_party_addmember_pre > 0) { int (*preHookFunc) (int *party_id, struct party_member **member); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31448,9 +32229,9 @@ int HP_intif_party_addmember(int party_id, struct party_member *member) { { retVal___ = HPMHooks.source.intif.party_addmember(party_id, member); } - if( HPMHooks.count.HP_intif_party_addmember_post ) { + if (HPMHooks.count.HP_intif_party_addmember_post > 0) { int (*postHookFunc) (int retVal___, int party_id, struct party_member *member); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_post; hIndex++ ) { + 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); } @@ -31460,14 +32241,14 @@ int HP_intif_party_addmember(int party_id, struct party_member *member) { int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_changeoption_pre ) { + if (HPMHooks.count.HP_intif_party_changeoption_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31475,9 +32256,9 @@ int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) { retVal___ = HPMHooks.source.intif.party_changeoption(party_id, account_id, exp, item); } - if( HPMHooks.count.HP_intif_party_changeoption_post ) { + if (HPMHooks.count.HP_intif_party_changeoption_post > 0) { 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++ ) { + 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); } @@ -31487,14 +32268,14 @@ int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) int HP_intif_party_leave(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_leave_pre ) { + if (HPMHooks.count.HP_intif_party_leave_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31502,9 +32283,9 @@ int HP_intif_party_leave(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.intif.party_leave(party_id, account_id, char_id); } - if( HPMHooks.count.HP_intif_party_leave_post ) { + if (HPMHooks.count.HP_intif_party_leave_post > 0) { 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++ ) { + 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); } @@ -31514,14 +32295,14 @@ int HP_intif_party_leave(int party_id, int account_id, int char_id) { int HP_intif_party_changemap(struct map_session_data *sd, int online) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_changemap_pre ) { + if (HPMHooks.count.HP_intif_party_changemap_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31529,9 +32310,9 @@ int HP_intif_party_changemap(struct map_session_data *sd, int online) { { retVal___ = HPMHooks.source.intif.party_changemap(sd, online); } - if( HPMHooks.count.HP_intif_party_changemap_post ) { + if (HPMHooks.count.HP_intif_party_changemap_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int online); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_post; hIndex++ ) { + 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); } @@ -31541,14 +32322,14 @@ int HP_intif_party_changemap(struct map_session_data *sd, int online) { int HP_intif_break_party(int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_break_party_pre ) { + if (HPMHooks.count.HP_intif_break_party_pre > 0) { int (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31556,9 +32337,9 @@ int HP_intif_break_party(int party_id) { { retVal___ = HPMHooks.source.intif.break_party(party_id); } - if( HPMHooks.count.HP_intif_break_party_post ) { + if (HPMHooks.count.HP_intif_break_party_post > 0) { int (*postHookFunc) (int retVal___, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_post; hIndex++ ) { + 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); } @@ -31568,14 +32349,14 @@ int HP_intif_break_party(int party_id) { int HP_intif_party_message(int party_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_message_pre ) { + if (HPMHooks.count.HP_intif_party_message_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31583,9 +32364,9 @@ int HP_intif_party_message(int party_id, int account_id, const char *mes, int le { retVal___ = HPMHooks.source.intif.party_message(party_id, account_id, mes, len); } - if( HPMHooks.count.HP_intif_party_message_post ) { + if (HPMHooks.count.HP_intif_party_message_post > 0) { 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++ ) { + 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); } @@ -31595,14 +32376,14 @@ int HP_intif_party_message(int party_id, int account_id, const char *mes, int le int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_leaderchange_pre ) { + if (HPMHooks.count.HP_intif_party_leaderchange_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31610,9 +32391,9 @@ int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.intif.party_leaderchange(party_id, account_id, char_id); } - if( HPMHooks.count.HP_intif_party_leaderchange_post ) { + if (HPMHooks.count.HP_intif_party_leaderchange_post > 0) { 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++ ) { + 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); } @@ -31622,14 +32403,14 @@ int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { int HP_intif_guild_create(const char *name, const struct guild_member *master) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_create_pre ) { + if (HPMHooks.count.HP_intif_guild_create_pre > 0) { int (*preHookFunc) (const char **name, const struct guild_member **master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31637,9 +32418,9 @@ int HP_intif_guild_create(const char *name, const struct guild_member *master) { { retVal___ = HPMHooks.source.intif.guild_create(name, master); } - if( HPMHooks.count.HP_intif_guild_create_post ) { + if (HPMHooks.count.HP_intif_guild_create_post > 0) { int (*postHookFunc) (int retVal___, const char *name, const struct guild_member *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_post; hIndex++ ) { + 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); } @@ -31649,14 +32430,14 @@ int HP_intif_guild_create(const char *name, const struct guild_member *master) { int HP_intif_guild_request_info(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_request_info_pre ) { + if (HPMHooks.count.HP_intif_guild_request_info_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31664,9 +32445,9 @@ int HP_intif_guild_request_info(int guild_id) { { retVal___ = HPMHooks.source.intif.guild_request_info(guild_id); } - if( HPMHooks.count.HP_intif_guild_request_info_post ) { + if (HPMHooks.count.HP_intif_guild_request_info_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_post; hIndex++ ) { + 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); } @@ -31676,14 +32457,14 @@ int HP_intif_guild_request_info(int guild_id) { int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_addmember_pre ) { + if (HPMHooks.count.HP_intif_guild_addmember_pre > 0) { int (*preHookFunc) (int *guild_id, struct guild_member **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31691,9 +32472,9 @@ int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { { retVal___ = HPMHooks.source.intif.guild_addmember(guild_id, m); } - if( HPMHooks.count.HP_intif_guild_addmember_post ) { + if (HPMHooks.count.HP_intif_guild_addmember_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, struct guild_member *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_post; hIndex++ ) { + 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); } @@ -31703,14 +32484,14 @@ int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_leave_pre ) { + if (HPMHooks.count.HP_intif_guild_leave_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31718,38 +32499,38 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co { retVal___ = HPMHooks.source.intif.guild_leave(guild_id, account_id, char_id, flag, mes); } - if( HPMHooks.count.HP_intif_guild_leave_post ) { + if (HPMHooks.count.HP_intif_guild_leave_post > 0) { 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++ ) { + 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 HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { int hIndex = 0; int retVal___ = 0; - 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_); + if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + 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++ ) { + if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 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_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -31757,14 +32538,14 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in int HP_intif_guild_break(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_break_pre ) { + if (HPMHooks.count.HP_intif_guild_break_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31772,9 +32553,9 @@ int HP_intif_guild_break(int guild_id) { { retVal___ = HPMHooks.source.intif.guild_break(guild_id); } - if( HPMHooks.count.HP_intif_guild_break_post ) { + if (HPMHooks.count.HP_intif_guild_break_post > 0) { int (*postHookFunc) (int retVal___, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_post; hIndex++ ) { + 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); } @@ -31784,14 +32565,14 @@ int HP_intif_guild_break(int guild_id) { int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_message_pre ) { + if (HPMHooks.count.HP_intif_guild_message_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31799,9 +32580,9 @@ int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int le { retVal___ = HPMHooks.source.intif.guild_message(guild_id, account_id, mes, len); } - if( HPMHooks.count.HP_intif_guild_message_post ) { + if (HPMHooks.count.HP_intif_guild_message_post > 0) { 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++ ) { + 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); } @@ -31811,14 +32592,14 @@ int HP_intif_guild_message(int guild_id, int account_id, const char *mes, int le int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_change_gm_pre ) { + if (HPMHooks.count.HP_intif_guild_change_gm_pre > 0) { int (*preHookFunc) (int *guild_id, const char **name, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31826,9 +32607,9 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { { retVal___ = HPMHooks.source.intif.guild_change_gm(guild_id, name, len); } - if( HPMHooks.count.HP_intif_guild_change_gm_post ) { + if (HPMHooks.count.HP_intif_guild_change_gm_post > 0) { 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++ ) { + 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); } @@ -31838,14 +32619,14 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_change_basicinfo_pre ) { + if (HPMHooks.count.HP_intif_guild_change_basicinfo_pre > 0) { int (*preHookFunc) (int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31853,9 +32634,9 @@ int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, in { retVal___ = HPMHooks.source.intif.guild_change_basicinfo(guild_id, type, data, len); } - if( HPMHooks.count.HP_intif_guild_change_basicinfo_post ) { + if (HPMHooks.count.HP_intif_guild_change_basicinfo_post > 0) { 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++ ) { + 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); } @@ -31865,14 +32646,14 @@ int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, in 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___ = 0; - if( HPMHooks.count.HP_intif_guild_change_memberinfo_pre ) { + if (HPMHooks.count.HP_intif_guild_change_memberinfo_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31880,9 +32661,9 @@ int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, { 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 ) { + if (HPMHooks.count.HP_intif_guild_change_memberinfo_post > 0) { 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++ ) { + 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); } @@ -31892,14 +32673,14 @@ int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_position_pre ) { + if (HPMHooks.count.HP_intif_guild_position_pre > 0) { int (*preHookFunc) (int *guild_id, int *idx, struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31907,9 +32688,9 @@ int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { { retVal___ = HPMHooks.source.intif.guild_position(guild_id, idx, p); } - if( HPMHooks.count.HP_intif_guild_position_post ) { + if (HPMHooks.count.HP_intif_guild_position_post > 0) { 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++ ) { + 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); } @@ -31919,14 +32700,14 @@ int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_skillup_pre ) { + if (HPMHooks.count.HP_intif_guild_skillup_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31934,9 +32715,9 @@ int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int ma { retVal___ = HPMHooks.source.intif.guild_skillup(guild_id, skill_id, account_id, max); } - if( HPMHooks.count.HP_intif_guild_skillup_post ) { + if (HPMHooks.count.HP_intif_guild_skillup_post > 0) { 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++ ) { + 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); } @@ -31946,14 +32727,14 @@ int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int ma int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_alliance_pre ) { + if (HPMHooks.count.HP_intif_guild_alliance_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31961,9 +32742,9 @@ int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a { retVal___ = HPMHooks.source.intif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag); } - if( HPMHooks.count.HP_intif_guild_alliance_post ) { + if (HPMHooks.count.HP_intif_guild_alliance_post > 0) { 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++ ) { + 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); } @@ -31973,14 +32754,14 @@ int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_notice_pre ) { + if (HPMHooks.count.HP_intif_guild_notice_pre > 0) { int (*preHookFunc) (int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31988,9 +32769,9 @@ int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { { retVal___ = HPMHooks.source.intif.guild_notice(guild_id, mes1, mes2); } - if( HPMHooks.count.HP_intif_guild_notice_post ) { + if (HPMHooks.count.HP_intif_guild_notice_post > 0) { 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++ ) { + 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); } @@ -32000,14 +32781,14 @@ int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { int HP_intif_guild_emblem(int guild_id, int len, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_emblem_pre ) { + if (HPMHooks.count.HP_intif_guild_emblem_pre > 0) { int (*preHookFunc) (int *guild_id, int *len, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32015,9 +32796,9 @@ int HP_intif_guild_emblem(int guild_id, int len, const char *data) { { retVal___ = HPMHooks.source.intif.guild_emblem(guild_id, len, data); } - if( HPMHooks.count.HP_intif_guild_emblem_post ) { + if (HPMHooks.count.HP_intif_guild_emblem_post > 0) { int (*postHookFunc) (int retVal___, int guild_id, int len, const char *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_post; hIndex++ ) { + 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); } @@ -32027,14 +32808,14 @@ int HP_intif_guild_emblem(int guild_id, int len, const char *data) { int HP_intif_guild_castle_dataload(int num, int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_castle_dataload_pre ) { + if (HPMHooks.count.HP_intif_guild_castle_dataload_pre > 0) { int (*preHookFunc) (int *num, int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32042,9 +32823,9 @@ int HP_intif_guild_castle_dataload(int num, int *castle_ids) { { retVal___ = HPMHooks.source.intif.guild_castle_dataload(num, castle_ids); } - if( HPMHooks.count.HP_intif_guild_castle_dataload_post ) { + if (HPMHooks.count.HP_intif_guild_castle_dataload_post > 0) { int (*postHookFunc) (int retVal___, int num, int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_post; hIndex++ ) { + 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); } @@ -32054,14 +32835,14 @@ int HP_intif_guild_castle_dataload(int num, int *castle_ids) { int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_castle_datasave_pre ) { + if (HPMHooks.count.HP_intif_guild_castle_datasave_pre > 0) { int (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32069,9 +32850,9 @@ int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { { retVal___ = HPMHooks.source.intif.guild_castle_datasave(castle_id, index, value); } - if( HPMHooks.count.HP_intif_guild_castle_datasave_post ) { + if (HPMHooks.count.HP_intif_guild_castle_datasave_post > 0) { int (*postHookFunc) (int retVal___, int castle_id, int index, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_post; hIndex++ ) { + 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); } @@ -32080,14 +32861,14 @@ int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { } void HP_intif_itembound_req(int char_id, int aid, int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_intif_itembound_req_pre ) { + if (HPMHooks.count.HP_intif_itembound_req_pre > 0) { void (*preHookFunc) (int *char_id, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_itembound_req_pre[hIndex].func; preHookFunc(&char_id, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32095,9 +32876,9 @@ void HP_intif_itembound_req(int char_id, int aid, int guild_id) { { HPMHooks.source.intif.itembound_req(char_id, aid, guild_id); } - if( HPMHooks.count.HP_intif_itembound_req_post ) { + if (HPMHooks.count.HP_intif_itembound_req_post > 0) { void (*postHookFunc) (int char_id, int aid, int guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_itembound_req_post[hIndex].func; postHookFunc(char_id, aid, guild_id); } @@ -32107,14 +32888,14 @@ void HP_intif_itembound_req(int char_id, int aid, int guild_id) { int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_petdata_pre ) { + if (HPMHooks.count.HP_intif_request_petdata_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32122,9 +32903,9 @@ int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { { retVal___ = HPMHooks.source.intif.request_petdata(account_id, char_id, pet_id); } - if( HPMHooks.count.HP_intif_request_petdata_post ) { + if (HPMHooks.count.HP_intif_request_petdata_post > 0) { 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++ ) { + 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); } @@ -32134,14 +32915,14 @@ int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { int HP_intif_save_petdata(int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_save_petdata_pre ) { + if (HPMHooks.count.HP_intif_save_petdata_pre > 0) { int (*preHookFunc) (int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32149,9 +32930,9 @@ int HP_intif_save_petdata(int account_id, struct s_pet *p) { { retVal___ = HPMHooks.source.intif.save_petdata(account_id, p); } - if( HPMHooks.count.HP_intif_save_petdata_post ) { + if (HPMHooks.count.HP_intif_save_petdata_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_post; hIndex++ ) { + 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); } @@ -32161,14 +32942,14 @@ int HP_intif_save_petdata(int account_id, struct s_pet *p) { int HP_intif_delete_petdata(int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_delete_petdata_pre ) { + if (HPMHooks.count.HP_intif_delete_petdata_pre > 0) { int (*preHookFunc) (int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32176,9 +32957,9 @@ int HP_intif_delete_petdata(int pet_id) { { retVal___ = HPMHooks.source.intif.delete_petdata(pet_id); } - if( HPMHooks.count.HP_intif_delete_petdata_post ) { + if (HPMHooks.count.HP_intif_delete_petdata_post > 0) { int (*postHookFunc) (int retVal___, int pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_post; hIndex++ ) { + 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); } @@ -32188,14 +32969,14 @@ int HP_intif_delete_petdata(int pet_id) { int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_rename_pre ) { + if (HPMHooks.count.HP_intif_rename_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32203,9 +32984,9 @@ int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { { retVal___ = HPMHooks.source.intif.rename(sd, type, name); } - if( HPMHooks.count.HP_intif_rename_post ) { + if (HPMHooks.count.HP_intif_rename_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_post; hIndex++ ) { + 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); } @@ -32215,14 +32996,14 @@ int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_create_pre ) { + if (HPMHooks.count.HP_intif_homunculus_create_pre > 0) { int (*preHookFunc) (int *account_id, struct s_homunculus **sh); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32230,9 +33011,9 @@ int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { { retVal___ = HPMHooks.source.intif.homunculus_create(account_id, sh); } - if( HPMHooks.count.HP_intif_homunculus_create_post ) { + if (HPMHooks.count.HP_intif_homunculus_create_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct s_homunculus *sh); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_post; hIndex++ ) { + 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); } @@ -32242,14 +33023,14 @@ int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { bool HP_intif_homunculus_requestload(int account_id, int homun_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_intif_homunculus_requestload_pre ) { + if (HPMHooks.count.HP_intif_homunculus_requestload_pre > 0) { bool (*preHookFunc) (int *account_id, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32257,9 +33038,9 @@ bool HP_intif_homunculus_requestload(int account_id, int homun_id) { { retVal___ = HPMHooks.source.intif.homunculus_requestload(account_id, homun_id); } - if( HPMHooks.count.HP_intif_homunculus_requestload_post ) { + if (HPMHooks.count.HP_intif_homunculus_requestload_post > 0) { bool (*postHookFunc) (bool retVal___, int account_id, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_post; hIndex++ ) { + 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); } @@ -32269,14 +33050,14 @@ bool HP_intif_homunculus_requestload(int account_id, int homun_id) { int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_requestsave_pre ) { + if (HPMHooks.count.HP_intif_homunculus_requestsave_pre > 0) { int (*preHookFunc) (int *account_id, struct s_homunculus **sh); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32284,9 +33065,9 @@ int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { { retVal___ = HPMHooks.source.intif.homunculus_requestsave(account_id, sh); } - if( HPMHooks.count.HP_intif_homunculus_requestsave_post ) { + if (HPMHooks.count.HP_intif_homunculus_requestsave_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct s_homunculus *sh); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_post; hIndex++ ) { + 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); } @@ -32296,14 +33077,14 @@ int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { int HP_intif_homunculus_requestdelete(int homun_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_requestdelete_pre ) { + if (HPMHooks.count.HP_intif_homunculus_requestdelete_pre > 0) { int (*preHookFunc) (int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32311,9 +33092,9 @@ int HP_intif_homunculus_requestdelete(int homun_id) { { retVal___ = HPMHooks.source.intif.homunculus_requestdelete(homun_id); } - if( HPMHooks.count.HP_intif_homunculus_requestdelete_post ) { + if (HPMHooks.count.HP_intif_homunculus_requestdelete_post > 0) { int (*postHookFunc) (int retVal___, int homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_post; hIndex++ ) { + 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); } @@ -32322,14 +33103,14 @@ int HP_intif_homunculus_requestdelete(int homun_id) { } void HP_intif_request_questlog(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_request_questlog_pre ) { + if (HPMHooks.count.HP_intif_request_questlog_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32337,9 +33118,9 @@ void HP_intif_request_questlog(struct map_session_data *sd) { { HPMHooks.source.intif.request_questlog(sd); } - if( HPMHooks.count.HP_intif_request_questlog_post ) { + if (HPMHooks.count.HP_intif_request_questlog_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_request_questlog_post[hIndex].func; postHookFunc(sd); } @@ -32349,14 +33130,14 @@ void HP_intif_request_questlog(struct map_session_data *sd) { int HP_intif_quest_save(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_quest_save_pre ) { + if (HPMHooks.count.HP_intif_quest_save_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32364,9 +33145,9 @@ int HP_intif_quest_save(struct map_session_data *sd) { { retVal___ = HPMHooks.source.intif.quest_save(sd); } - if( HPMHooks.count.HP_intif_quest_save_post ) { + if (HPMHooks.count.HP_intif_quest_save_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_post; hIndex++ ) { + 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); } @@ -32376,14 +33157,14 @@ int HP_intif_quest_save(struct map_session_data *sd) { int HP_intif_mercenary_create(struct s_mercenary *merc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_create_pre ) { + if (HPMHooks.count.HP_intif_mercenary_create_pre > 0) { int (*preHookFunc) (struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32391,9 +33172,9 @@ int HP_intif_mercenary_create(struct s_mercenary *merc) { { retVal___ = HPMHooks.source.intif.mercenary_create(merc); } - if( HPMHooks.count.HP_intif_mercenary_create_post ) { + if (HPMHooks.count.HP_intif_mercenary_create_post > 0) { int (*postHookFunc) (int retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_post; hIndex++ ) { + 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); } @@ -32403,14 +33184,14 @@ int HP_intif_mercenary_create(struct s_mercenary *merc) { int HP_intif_mercenary_request(int merc_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_request_pre ) { + if (HPMHooks.count.HP_intif_mercenary_request_pre > 0) { int (*preHookFunc) (int *merc_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32418,9 +33199,9 @@ int HP_intif_mercenary_request(int merc_id, int char_id) { { retVal___ = HPMHooks.source.intif.mercenary_request(merc_id, char_id); } - if( HPMHooks.count.HP_intif_mercenary_request_post ) { + if (HPMHooks.count.HP_intif_mercenary_request_post > 0) { int (*postHookFunc) (int retVal___, int merc_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_post; hIndex++ ) { + 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); } @@ -32430,14 +33211,14 @@ int HP_intif_mercenary_request(int merc_id, int char_id) { int HP_intif_mercenary_delete(int merc_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_delete_pre ) { + if (HPMHooks.count.HP_intif_mercenary_delete_pre > 0) { int (*preHookFunc) (int *merc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32445,9 +33226,9 @@ int HP_intif_mercenary_delete(int merc_id) { { retVal___ = HPMHooks.source.intif.mercenary_delete(merc_id); } - if( HPMHooks.count.HP_intif_mercenary_delete_post ) { + if (HPMHooks.count.HP_intif_mercenary_delete_post > 0) { int (*postHookFunc) (int retVal___, int merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_post; hIndex++ ) { + 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); } @@ -32457,14 +33238,14 @@ int HP_intif_mercenary_delete(int merc_id) { int HP_intif_mercenary_save(struct s_mercenary *merc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_save_pre ) { + if (HPMHooks.count.HP_intif_mercenary_save_pre > 0) { int (*preHookFunc) (struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32472,9 +33253,9 @@ int HP_intif_mercenary_save(struct s_mercenary *merc) { { retVal___ = HPMHooks.source.intif.mercenary_save(merc); } - if( HPMHooks.count.HP_intif_mercenary_save_post ) { + if (HPMHooks.count.HP_intif_mercenary_save_post > 0) { int (*postHookFunc) (int retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_post; hIndex++ ) { + 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); } @@ -32484,14 +33265,14 @@ int HP_intif_mercenary_save(struct s_mercenary *merc) { int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_requestinbox_pre ) { + if (HPMHooks.count.HP_intif_Mail_requestinbox_pre > 0) { int (*preHookFunc) (int *char_id, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32499,9 +33280,9 @@ int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { { retVal___ = HPMHooks.source.intif.Mail_requestinbox(char_id, flag); } - if( HPMHooks.count.HP_intif_Mail_requestinbox_post ) { + if (HPMHooks.count.HP_intif_Mail_requestinbox_post > 0) { int (*postHookFunc) (int retVal___, int char_id, unsigned char flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_post; hIndex++ ) { + 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); } @@ -32511,14 +33292,14 @@ int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { int HP_intif_Mail_read(int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_read_pre ) { + if (HPMHooks.count.HP_intif_Mail_read_pre > 0) { int (*preHookFunc) (int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32526,9 +33307,9 @@ int HP_intif_Mail_read(int mail_id) { { retVal___ = HPMHooks.source.intif.Mail_read(mail_id); } - if( HPMHooks.count.HP_intif_Mail_read_post ) { + if (HPMHooks.count.HP_intif_Mail_read_post > 0) { int (*postHookFunc) (int retVal___, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_post; hIndex++ ) { + 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); } @@ -32538,14 +33319,14 @@ int HP_intif_Mail_read(int mail_id) { int HP_intif_Mail_getattach(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_getattach_pre ) { + if (HPMHooks.count.HP_intif_Mail_getattach_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32553,9 +33334,9 @@ int HP_intif_Mail_getattach(int char_id, int mail_id) { { retVal___ = HPMHooks.source.intif.Mail_getattach(char_id, mail_id); } - if( HPMHooks.count.HP_intif_Mail_getattach_post ) { + if (HPMHooks.count.HP_intif_Mail_getattach_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_post; hIndex++ ) { + 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); } @@ -32565,14 +33346,14 @@ int HP_intif_Mail_getattach(int char_id, int mail_id) { int HP_intif_Mail_delete(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_delete_pre ) { + if (HPMHooks.count.HP_intif_Mail_delete_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32580,9 +33361,9 @@ int HP_intif_Mail_delete(int char_id, int mail_id) { { retVal___ = HPMHooks.source.intif.Mail_delete(char_id, mail_id); } - if( HPMHooks.count.HP_intif_Mail_delete_post ) { + if (HPMHooks.count.HP_intif_Mail_delete_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_post; hIndex++ ) { + 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); } @@ -32592,14 +33373,14 @@ int HP_intif_Mail_delete(int char_id, int mail_id) { int HP_intif_Mail_return(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_return_pre ) { + if (HPMHooks.count.HP_intif_Mail_return_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32607,9 +33388,9 @@ int HP_intif_Mail_return(int char_id, int mail_id) { { retVal___ = HPMHooks.source.intif.Mail_return(char_id, mail_id); } - if( HPMHooks.count.HP_intif_Mail_return_post ) { + if (HPMHooks.count.HP_intif_Mail_return_post > 0) { int (*postHookFunc) (int retVal___, int char_id, int mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_post; hIndex++ ) { + 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); } @@ -32619,14 +33400,14 @@ int HP_intif_Mail_return(int char_id, int mail_id) { int HP_intif_Mail_send(int account_id, struct mail_message *msg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_send_pre ) { + if (HPMHooks.count.HP_intif_Mail_send_pre > 0) { int (*preHookFunc) (int *account_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32634,9 +33415,9 @@ int HP_intif_Mail_send(int account_id, struct mail_message *msg) { { retVal___ = HPMHooks.source.intif.Mail_send(account_id, msg); } - if( HPMHooks.count.HP_intif_Mail_send_post ) { + if (HPMHooks.count.HP_intif_Mail_send_post > 0) { int (*postHookFunc) (int retVal___, int account_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_post; hIndex++ ) { + 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); } @@ -32646,14 +33427,14 @@ int HP_intif_Mail_send(int account_id, struct mail_message *msg) { int HP_intif_Auction_requestlist(int char_id, short type, int price, const char *searchtext, short page) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_requestlist_pre ) { + if (HPMHooks.count.HP_intif_Auction_requestlist_pre > 0) { int (*preHookFunc) (int *char_id, short *type, int *price, const char **searchtext, short *page); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32661,9 +33442,9 @@ int HP_intif_Auction_requestlist(int char_id, short type, int price, const char { retVal___ = HPMHooks.source.intif.Auction_requestlist(char_id, type, price, searchtext, page); } - if( HPMHooks.count.HP_intif_Auction_requestlist_post ) { + if (HPMHooks.count.HP_intif_Auction_requestlist_post > 0) { 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++ ) { + 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); } @@ -32673,14 +33454,14 @@ int HP_intif_Auction_requestlist(int char_id, short type, int price, const char int HP_intif_Auction_register(struct auction_data *auction) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_register_pre ) { + if (HPMHooks.count.HP_intif_Auction_register_pre > 0) { int (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32688,9 +33469,9 @@ int HP_intif_Auction_register(struct auction_data *auction) { { retVal___ = HPMHooks.source.intif.Auction_register(auction); } - if( HPMHooks.count.HP_intif_Auction_register_post ) { + if (HPMHooks.count.HP_intif_Auction_register_post > 0) { int (*postHookFunc) (int retVal___, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_post; hIndex++ ) { + 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); } @@ -32700,14 +33481,14 @@ int HP_intif_Auction_register(struct auction_data *auction) { int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_cancel_pre ) { + if (HPMHooks.count.HP_intif_Auction_cancel_pre > 0) { int (*preHookFunc) (int *char_id, unsigned int *auction_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32715,9 +33496,9 @@ int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { { retVal___ = HPMHooks.source.intif.Auction_cancel(char_id, auction_id); } - if( HPMHooks.count.HP_intif_Auction_cancel_post ) { + if (HPMHooks.count.HP_intif_Auction_cancel_post > 0) { int (*postHookFunc) (int retVal___, int char_id, unsigned int auction_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_post; hIndex++ ) { + 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); } @@ -32727,14 +33508,14 @@ int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { int HP_intif_Auction_close(int char_id, unsigned int auction_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_close_pre ) { + if (HPMHooks.count.HP_intif_Auction_close_pre > 0) { int (*preHookFunc) (int *char_id, unsigned int *auction_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32742,9 +33523,9 @@ int HP_intif_Auction_close(int char_id, unsigned int auction_id) { { retVal___ = HPMHooks.source.intif.Auction_close(char_id, auction_id); } - if( HPMHooks.count.HP_intif_Auction_close_post ) { + if (HPMHooks.count.HP_intif_Auction_close_post > 0) { int (*postHookFunc) (int retVal___, int char_id, unsigned int auction_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_post; hIndex++ ) { + 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); } @@ -32754,14 +33535,14 @@ int HP_intif_Auction_close(int char_id, unsigned int auction_id) { int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int bid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_bid_pre ) { + if (HPMHooks.count.HP_intif_Auction_bid_pre > 0) { int (*preHookFunc) (int *char_id, const char **name, unsigned int *auction_id, int *bid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32769,9 +33550,9 @@ int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, { retVal___ = HPMHooks.source.intif.Auction_bid(char_id, name, auction_id, bid); } - if( HPMHooks.count.HP_intif_Auction_bid_post ) { + if (HPMHooks.count.HP_intif_Auction_bid_post > 0) { 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++ ) { + 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); } @@ -32781,14 +33562,14 @@ int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int HP_intif_elemental_create(struct s_elemental *ele) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_create_pre ) { + if (HPMHooks.count.HP_intif_elemental_create_pre > 0) { int (*preHookFunc) (struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32796,9 +33577,9 @@ int HP_intif_elemental_create(struct s_elemental *ele) { { retVal___ = HPMHooks.source.intif.elemental_create(ele); } - if( HPMHooks.count.HP_intif_elemental_create_post ) { + if (HPMHooks.count.HP_intif_elemental_create_post > 0) { int (*postHookFunc) (int retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_post; hIndex++ ) { + 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); } @@ -32808,14 +33589,14 @@ int HP_intif_elemental_create(struct s_elemental *ele) { int HP_intif_elemental_request(int ele_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_request_pre ) { + if (HPMHooks.count.HP_intif_elemental_request_pre > 0) { int (*preHookFunc) (int *ele_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32823,9 +33604,9 @@ int HP_intif_elemental_request(int ele_id, int char_id) { { retVal___ = HPMHooks.source.intif.elemental_request(ele_id, char_id); } - if( HPMHooks.count.HP_intif_elemental_request_post ) { + if (HPMHooks.count.HP_intif_elemental_request_post > 0) { int (*postHookFunc) (int retVal___, int ele_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_post; hIndex++ ) { + 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); } @@ -32835,14 +33616,14 @@ int HP_intif_elemental_request(int ele_id, int char_id) { int HP_intif_elemental_delete(int ele_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_delete_pre ) { + if (HPMHooks.count.HP_intif_elemental_delete_pre > 0) { int (*preHookFunc) (int *ele_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32850,9 +33631,9 @@ int HP_intif_elemental_delete(int ele_id) { { retVal___ = HPMHooks.source.intif.elemental_delete(ele_id); } - if( HPMHooks.count.HP_intif_elemental_delete_post ) { + if (HPMHooks.count.HP_intif_elemental_delete_post > 0) { int (*postHookFunc) (int retVal___, int ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_post; hIndex++ ) { + 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); } @@ -32862,14 +33643,14 @@ int HP_intif_elemental_delete(int ele_id) { int HP_intif_elemental_save(struct s_elemental *ele) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_save_pre ) { + if (HPMHooks.count.HP_intif_elemental_save_pre > 0) { int (*preHookFunc) (struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32877,25 +33658,160 @@ int HP_intif_elemental_save(struct s_elemental *ele) { { retVal___ = HPMHooks.source.intif.elemental_save(ele); } - if( HPMHooks.count.HP_intif_elemental_save_post ) { + if (HPMHooks.count.HP_intif_elemental_save_post > 0) { int (*postHookFunc) (int retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_post; hIndex++ ) { + 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___; } +int HP_intif_rodex_requestinbox(int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_requestinbox_pre > 0) { + int (*preHookFunc) (int *char_id, int *account_id, int8 *flag, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_requestinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_requestinbox_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id, &flag, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_requestinbox(char_id, account_id, flag, opentype, mail_id); + } + if (HPMHooks.count.HP_intif_rodex_requestinbox_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_requestinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_requestinbox_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id, flag, opentype, mail_id); + } + } + return retVal___; +} +int HP_intif_rodex_checkhasnew(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_checkhasnew_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_checkhasnew_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_checkhasnew(sd); + } + if (HPMHooks.count.HP_intif_rodex_checkhasnew_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_checkhasnew_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_intif_rodex_updatemail(int64 mail_id, int8 flag) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) { + int (*preHookFunc) (int64 *mail_id, int8 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_updatemail(mail_id, flag); + } + if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) { + int (*postHookFunc) (int retVal___, int64 mail_id, int8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id, flag); + } + } + return retVal___; +} +int HP_intif_rodex_sendmail(struct rodex_message *msg) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_sendmail_pre > 0) { + int (*preHookFunc) (struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_sendmail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_sendmail_pre[hIndex].func; + retVal___ = preHookFunc(&msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_sendmail(msg); + } + if (HPMHooks.count.HP_intif_rodex_sendmail_post > 0) { + int (*postHookFunc) (int retVal___, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_sendmail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_sendmail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, msg); + } + } + return retVal___; +} +int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_checkname_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_checkname_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_checkname(sd, name); + } + if (HPMHooks.count.HP_intif_rodex_checkname_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_checkname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + 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 ) { + if (HPMHooks.count.HP_intif_request_accinfo_pre > 0) { void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32903,9 +33819,9 @@ void HP_intif_request_accinfo(int u_fd, int aid, int group_lv, char *query) { { HPMHooks.source.intif.request_accinfo(u_fd, aid, group_lv, query); } - if( HPMHooks.count.HP_intif_request_accinfo_post ) { + if (HPMHooks.count.HP_intif_request_accinfo_post > 0) { void (*postHookFunc) (int u_fd, int aid, int group_lv, char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_accinfo_post; hIndex++ ) { + 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); } @@ -32915,14 +33831,14 @@ void HP_intif_request_accinfo(int u_fd, int aid, int group_lv, char *query) { int HP_intif_CheckForCharServer(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_CheckForCharServer_pre ) { + if (HPMHooks.count.HP_intif_CheckForCharServer_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32930,9 +33846,9 @@ int HP_intif_CheckForCharServer(void) { { retVal___ = HPMHooks.source.intif.CheckForCharServer(); } - if( HPMHooks.count.HP_intif_CheckForCharServer_post ) { + if (HPMHooks.count.HP_intif_CheckForCharServer_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -32941,14 +33857,14 @@ int HP_intif_CheckForCharServer(void) { } void HP_intif_pWisMessage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisMessage_pre ) { + if (HPMHooks.count.HP_intif_pWisMessage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32956,9 +33872,9 @@ void HP_intif_pWisMessage(int fd) { { HPMHooks.source.intif.pWisMessage(fd); } - if( HPMHooks.count.HP_intif_pWisMessage_post ) { + if (HPMHooks.count.HP_intif_pWisMessage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pWisMessage_post[hIndex].func; postHookFunc(fd); } @@ -32967,14 +33883,14 @@ void HP_intif_pWisMessage(int fd) { } void HP_intif_pWisEnd(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisEnd_pre ) { + if (HPMHooks.count.HP_intif_pWisEnd_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32982,9 +33898,9 @@ void HP_intif_pWisEnd(int fd) { { HPMHooks.source.intif.pWisEnd(fd); } - if( HPMHooks.count.HP_intif_pWisEnd_post ) { + if (HPMHooks.count.HP_intif_pWisEnd_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pWisEnd_post[hIndex].func; postHookFunc(fd); } @@ -32994,16 +33910,16 @@ void HP_intif_pWisEnd(int fd) { int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_pWisToGM_sub_pre ) { + if (HPMHooks.count.HP_intif_pWisToGM_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list va); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -33013,9 +33929,9 @@ int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { retVal___ = HPMHooks.source.intif.pWisToGM_sub(sd, va___copy); va_end(va___copy); } - if( HPMHooks.count.HP_intif_pWisToGM_sub_post ) { + if (HPMHooks.count.HP_intif_pWisToGM_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_sub_post; hIndex++ ) { + 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); @@ -33026,14 +33942,14 @@ int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { } void HP_intif_pWisToGM(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisToGM_pre ) { + if (HPMHooks.count.HP_intif_pWisToGM_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33041,9 +33957,9 @@ void HP_intif_pWisToGM(int fd) { { HPMHooks.source.intif.pWisToGM(fd); } - if( HPMHooks.count.HP_intif_pWisToGM_post ) { + if (HPMHooks.count.HP_intif_pWisToGM_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pWisToGM_post[hIndex].func; postHookFunc(fd); } @@ -33052,14 +33968,14 @@ void HP_intif_pWisToGM(int fd) { } void HP_intif_pRegisters(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRegisters_pre ) { + if (HPMHooks.count.HP_intif_pRegisters_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33067,25 +33983,51 @@ void HP_intif_pRegisters(int fd) { { HPMHooks.source.intif.pRegisters(fd); } - if( HPMHooks.count.HP_intif_pRegisters_post ) { + if (HPMHooks.count.HP_intif_pRegisters_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_post; hIndex++ ) { + 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_pAccountStorage(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pAccountStorage_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pAccountStorage_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAccountStorage(fd); + } + if (HPMHooks.count.HP_intif_pAccountStorage_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pAccountStorage_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} void HP_intif_pChangeNameOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pChangeNameOk_pre ) { + if (HPMHooks.count.HP_intif_pChangeNameOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33093,9 +34035,9 @@ void HP_intif_pChangeNameOk(int fd) { { HPMHooks.source.intif.pChangeNameOk(fd); } - if( HPMHooks.count.HP_intif_pChangeNameOk_post ) { + if (HPMHooks.count.HP_intif_pChangeNameOk_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pChangeNameOk_post[hIndex].func; postHookFunc(fd); } @@ -33104,14 +34046,14 @@ void HP_intif_pChangeNameOk(int fd) { } void HP_intif_pMessageToFD(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMessageToFD_pre ) { + if (HPMHooks.count.HP_intif_pMessageToFD_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33119,25 +34061,51 @@ void HP_intif_pMessageToFD(int fd) { { HPMHooks.source.intif.pMessageToFD(fd); } - if( HPMHooks.count.HP_intif_pMessageToFD_post ) { + if (HPMHooks.count.HP_intif_pMessageToFD_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_post; hIndex++ ) { + 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_pAccountStorageSaveAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAccountStorageSaveAck(fd); + } + if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} void HP_intif_pLoadGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pLoadGuildStorage_pre ) { + if (HPMHooks.count.HP_intif_pLoadGuildStorage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33145,9 +34113,9 @@ void HP_intif_pLoadGuildStorage(int fd) { { HPMHooks.source.intif.pLoadGuildStorage(fd); } - if( HPMHooks.count.HP_intif_pLoadGuildStorage_post ) { + if (HPMHooks.count.HP_intif_pLoadGuildStorage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pLoadGuildStorage_post[hIndex].func; postHookFunc(fd); } @@ -33156,14 +34124,14 @@ void HP_intif_pLoadGuildStorage(int fd) { } void HP_intif_pSaveGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSaveGuildStorage_pre ) { + if (HPMHooks.count.HP_intif_pSaveGuildStorage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33171,9 +34139,9 @@ void HP_intif_pSaveGuildStorage(int fd) { { HPMHooks.source.intif.pSaveGuildStorage(fd); } - if( HPMHooks.count.HP_intif_pSaveGuildStorage_post ) { + if (HPMHooks.count.HP_intif_pSaveGuildStorage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pSaveGuildStorage_post[hIndex].func; postHookFunc(fd); } @@ -33182,14 +34150,14 @@ void HP_intif_pSaveGuildStorage(int fd) { } void HP_intif_pPartyCreated(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyCreated_pre ) { + if (HPMHooks.count.HP_intif_pPartyCreated_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33197,9 +34165,9 @@ void HP_intif_pPartyCreated(int fd) { { HPMHooks.source.intif.pPartyCreated(fd); } - if( HPMHooks.count.HP_intif_pPartyCreated_post ) { + if (HPMHooks.count.HP_intif_pPartyCreated_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyCreated_post[hIndex].func; postHookFunc(fd); } @@ -33208,14 +34176,14 @@ void HP_intif_pPartyCreated(int fd) { } void HP_intif_pPartyInfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyInfo_pre ) { + if (HPMHooks.count.HP_intif_pPartyInfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33223,9 +34191,9 @@ void HP_intif_pPartyInfo(int fd) { { HPMHooks.source.intif.pPartyInfo(fd); } - if( HPMHooks.count.HP_intif_pPartyInfo_post ) { + if (HPMHooks.count.HP_intif_pPartyInfo_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyInfo_post[hIndex].func; postHookFunc(fd); } @@ -33234,14 +34202,14 @@ void HP_intif_pPartyInfo(int fd) { } void HP_intif_pPartyMemberAdded(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMemberAdded_pre ) { + if (HPMHooks.count.HP_intif_pPartyMemberAdded_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33249,9 +34217,9 @@ void HP_intif_pPartyMemberAdded(int fd) { { HPMHooks.source.intif.pPartyMemberAdded(fd); } - if( HPMHooks.count.HP_intif_pPartyMemberAdded_post ) { + if (HPMHooks.count.HP_intif_pPartyMemberAdded_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyMemberAdded_post[hIndex].func; postHookFunc(fd); } @@ -33260,14 +34228,14 @@ void HP_intif_pPartyMemberAdded(int fd) { } void HP_intif_pPartyOptionChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyOptionChanged_pre ) { + if (HPMHooks.count.HP_intif_pPartyOptionChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33275,9 +34243,9 @@ void HP_intif_pPartyOptionChanged(int fd) { { HPMHooks.source.intif.pPartyOptionChanged(fd); } - if( HPMHooks.count.HP_intif_pPartyOptionChanged_post ) { + if (HPMHooks.count.HP_intif_pPartyOptionChanged_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyOptionChanged_post[hIndex].func; postHookFunc(fd); } @@ -33286,14 +34254,14 @@ void HP_intif_pPartyOptionChanged(int fd) { } void HP_intif_pPartyMemberWithdraw(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre ) { + if (HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33301,9 +34269,9 @@ void HP_intif_pPartyMemberWithdraw(int fd) { { HPMHooks.source.intif.pPartyMemberWithdraw(fd); } - if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_post ) { + if (HPMHooks.count.HP_intif_pPartyMemberWithdraw_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyMemberWithdraw_post[hIndex].func; postHookFunc(fd); } @@ -33312,14 +34280,14 @@ void HP_intif_pPartyMemberWithdraw(int fd) { } void HP_intif_pPartyMove(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMove_pre ) { + if (HPMHooks.count.HP_intif_pPartyMove_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33327,9 +34295,9 @@ void HP_intif_pPartyMove(int fd) { { HPMHooks.source.intif.pPartyMove(fd); } - if( HPMHooks.count.HP_intif_pPartyMove_post ) { + if (HPMHooks.count.HP_intif_pPartyMove_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyMove_post[hIndex].func; postHookFunc(fd); } @@ -33338,14 +34306,14 @@ void HP_intif_pPartyMove(int fd) { } void HP_intif_pPartyBroken(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyBroken_pre ) { + if (HPMHooks.count.HP_intif_pPartyBroken_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33353,9 +34321,9 @@ void HP_intif_pPartyBroken(int fd) { { HPMHooks.source.intif.pPartyBroken(fd); } - if( HPMHooks.count.HP_intif_pPartyBroken_post ) { + if (HPMHooks.count.HP_intif_pPartyBroken_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyBroken_post[hIndex].func; postHookFunc(fd); } @@ -33364,14 +34332,14 @@ void HP_intif_pPartyBroken(int fd) { } void HP_intif_pPartyMessage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMessage_pre ) { + if (HPMHooks.count.HP_intif_pPartyMessage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33379,9 +34347,9 @@ void HP_intif_pPartyMessage(int fd) { { HPMHooks.source.intif.pPartyMessage(fd); } - if( HPMHooks.count.HP_intif_pPartyMessage_post ) { + if (HPMHooks.count.HP_intif_pPartyMessage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pPartyMessage_post[hIndex].func; postHookFunc(fd); } @@ -33390,14 +34358,14 @@ void HP_intif_pPartyMessage(int fd) { } void HP_intif_pGuildCreated(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildCreated_pre ) { + if (HPMHooks.count.HP_intif_pGuildCreated_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33405,9 +34373,9 @@ void HP_intif_pGuildCreated(int fd) { { HPMHooks.source.intif.pGuildCreated(fd); } - if( HPMHooks.count.HP_intif_pGuildCreated_post ) { + if (HPMHooks.count.HP_intif_pGuildCreated_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildCreated_post[hIndex].func; postHookFunc(fd); } @@ -33416,14 +34384,14 @@ void HP_intif_pGuildCreated(int fd) { } void HP_intif_pGuildInfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildInfo_pre ) { + if (HPMHooks.count.HP_intif_pGuildInfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33431,9 +34399,9 @@ void HP_intif_pGuildInfo(int fd) { { HPMHooks.source.intif.pGuildInfo(fd); } - if( HPMHooks.count.HP_intif_pGuildInfo_post ) { + if (HPMHooks.count.HP_intif_pGuildInfo_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildInfo_post[hIndex].func; postHookFunc(fd); } @@ -33442,14 +34410,14 @@ void HP_intif_pGuildInfo(int fd) { } void HP_intif_pGuildMemberAdded(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberAdded_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberAdded_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33457,9 +34425,9 @@ void HP_intif_pGuildMemberAdded(int fd) { { HPMHooks.source.intif.pGuildMemberAdded(fd); } - if( HPMHooks.count.HP_intif_pGuildMemberAdded_post ) { + if (HPMHooks.count.HP_intif_pGuildMemberAdded_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMemberAdded_post[hIndex].func; postHookFunc(fd); } @@ -33468,14 +34436,14 @@ void HP_intif_pGuildMemberAdded(int fd) { } void HP_intif_pGuildMemberWithdraw(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33483,9 +34451,9 @@ void HP_intif_pGuildMemberWithdraw(int fd) { { HPMHooks.source.intif.pGuildMemberWithdraw(fd); } - if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_post ) { + if (HPMHooks.count.HP_intif_pGuildMemberWithdraw_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMemberWithdraw_post[hIndex].func; postHookFunc(fd); } @@ -33494,14 +34462,14 @@ void HP_intif_pGuildMemberWithdraw(int fd) { } void HP_intif_pGuildMemberInfoShort(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33509,9 +34477,9 @@ void HP_intif_pGuildMemberInfoShort(int fd) { { HPMHooks.source.intif.pGuildMemberInfoShort(fd); } - if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_post ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoShort_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoShort_post[hIndex].func; postHookFunc(fd); } @@ -33520,14 +34488,14 @@ void HP_intif_pGuildMemberInfoShort(int fd) { } void HP_intif_pGuildBroken(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildBroken_pre ) { + if (HPMHooks.count.HP_intif_pGuildBroken_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33535,9 +34503,9 @@ void HP_intif_pGuildBroken(int fd) { { HPMHooks.source.intif.pGuildBroken(fd); } - if( HPMHooks.count.HP_intif_pGuildBroken_post ) { + if (HPMHooks.count.HP_intif_pGuildBroken_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildBroken_post[hIndex].func; postHookFunc(fd); } @@ -33546,14 +34514,14 @@ void HP_intif_pGuildBroken(int fd) { } void HP_intif_pGuildMessage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMessage_pre ) { + if (HPMHooks.count.HP_intif_pGuildMessage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33561,9 +34529,9 @@ void HP_intif_pGuildMessage(int fd) { { HPMHooks.source.intif.pGuildMessage(fd); } - if( HPMHooks.count.HP_intif_pGuildMessage_post ) { + if (HPMHooks.count.HP_intif_pGuildMessage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMessage_post[hIndex].func; postHookFunc(fd); } @@ -33572,14 +34540,14 @@ void HP_intif_pGuildMessage(int fd) { } void HP_intif_pGuildBasicInfoChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33587,9 +34555,9 @@ void HP_intif_pGuildBasicInfoChanged(int fd) { { HPMHooks.source.intif.pGuildBasicInfoChanged(fd); } - if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post ) { + if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildBasicInfoChanged_post[hIndex].func; postHookFunc(fd); } @@ -33598,14 +34566,14 @@ void HP_intif_pGuildBasicInfoChanged(int fd) { } void HP_intif_pGuildMemberInfoChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33613,9 +34581,9 @@ void HP_intif_pGuildMemberInfoChanged(int fd) { { HPMHooks.source.intif.pGuildMemberInfoChanged(fd); } - if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMemberInfoChanged_post[hIndex].func; postHookFunc(fd); } @@ -33624,14 +34592,14 @@ void HP_intif_pGuildMemberInfoChanged(int fd) { } void HP_intif_pGuildPosition(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildPosition_pre ) { + if (HPMHooks.count.HP_intif_pGuildPosition_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33639,9 +34607,9 @@ void HP_intif_pGuildPosition(int fd) { { HPMHooks.source.intif.pGuildPosition(fd); } - if( HPMHooks.count.HP_intif_pGuildPosition_post ) { + if (HPMHooks.count.HP_intif_pGuildPosition_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildPosition_post[hIndex].func; postHookFunc(fd); } @@ -33650,14 +34618,14 @@ void HP_intif_pGuildPosition(int fd) { } void HP_intif_pGuildSkillUp(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildSkillUp_pre ) { + if (HPMHooks.count.HP_intif_pGuildSkillUp_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33665,9 +34633,9 @@ void HP_intif_pGuildSkillUp(int fd) { { HPMHooks.source.intif.pGuildSkillUp(fd); } - if( HPMHooks.count.HP_intif_pGuildSkillUp_post ) { + if (HPMHooks.count.HP_intif_pGuildSkillUp_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildSkillUp_post[hIndex].func; postHookFunc(fd); } @@ -33676,14 +34644,14 @@ void HP_intif_pGuildSkillUp(int fd) { } void HP_intif_pGuildAlliance(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildAlliance_pre ) { + if (HPMHooks.count.HP_intif_pGuildAlliance_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33691,9 +34659,9 @@ void HP_intif_pGuildAlliance(int fd) { { HPMHooks.source.intif.pGuildAlliance(fd); } - if( HPMHooks.count.HP_intif_pGuildAlliance_post ) { + if (HPMHooks.count.HP_intif_pGuildAlliance_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildAlliance_post[hIndex].func; postHookFunc(fd); } @@ -33702,14 +34670,14 @@ void HP_intif_pGuildAlliance(int fd) { } void HP_intif_pGuildNotice(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildNotice_pre ) { + if (HPMHooks.count.HP_intif_pGuildNotice_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33717,9 +34685,9 @@ void HP_intif_pGuildNotice(int fd) { { HPMHooks.source.intif.pGuildNotice(fd); } - if( HPMHooks.count.HP_intif_pGuildNotice_post ) { + if (HPMHooks.count.HP_intif_pGuildNotice_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildNotice_post[hIndex].func; postHookFunc(fd); } @@ -33728,14 +34696,14 @@ void HP_intif_pGuildNotice(int fd) { } void HP_intif_pGuildEmblem(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildEmblem_pre ) { + if (HPMHooks.count.HP_intif_pGuildEmblem_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33743,9 +34711,9 @@ void HP_intif_pGuildEmblem(int fd) { { HPMHooks.source.intif.pGuildEmblem(fd); } - if( HPMHooks.count.HP_intif_pGuildEmblem_post ) { + if (HPMHooks.count.HP_intif_pGuildEmblem_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildEmblem_post[hIndex].func; postHookFunc(fd); } @@ -33754,14 +34722,14 @@ void HP_intif_pGuildEmblem(int fd) { } void HP_intif_pGuildCastleDataLoad(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre ) { + if (HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33769,9 +34737,9 @@ void HP_intif_pGuildCastleDataLoad(int fd) { { HPMHooks.source.intif.pGuildCastleDataLoad(fd); } - if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_post ) { + if (HPMHooks.count.HP_intif_pGuildCastleDataLoad_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildCastleDataLoad_post[hIndex].func; postHookFunc(fd); } @@ -33780,14 +34748,14 @@ void HP_intif_pGuildCastleDataLoad(int fd) { } void HP_intif_pGuildMasterChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMasterChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildMasterChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33795,9 +34763,9 @@ void HP_intif_pGuildMasterChanged(int fd) { { HPMHooks.source.intif.pGuildMasterChanged(fd); } - if( HPMHooks.count.HP_intif_pGuildMasterChanged_post ) { + if (HPMHooks.count.HP_intif_pGuildMasterChanged_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pGuildMasterChanged_post[hIndex].func; postHookFunc(fd); } @@ -33806,14 +34774,14 @@ void HP_intif_pGuildMasterChanged(int fd) { } void HP_intif_pQuestLog(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pQuestLog_pre ) { + if (HPMHooks.count.HP_intif_pQuestLog_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33821,9 +34789,9 @@ void HP_intif_pQuestLog(int fd) { { HPMHooks.source.intif.pQuestLog(fd); } - if( HPMHooks.count.HP_intif_pQuestLog_post ) { + if (HPMHooks.count.HP_intif_pQuestLog_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pQuestLog_post[hIndex].func; postHookFunc(fd); } @@ -33832,14 +34800,14 @@ void HP_intif_pQuestLog(int fd) { } void HP_intif_pQuestSave(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pQuestSave_pre ) { + if (HPMHooks.count.HP_intif_pQuestSave_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33847,9 +34815,9 @@ void HP_intif_pQuestSave(int fd) { { HPMHooks.source.intif.pQuestSave(fd); } - if( HPMHooks.count.HP_intif_pQuestSave_post ) { + if (HPMHooks.count.HP_intif_pQuestSave_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pQuestSave_post[hIndex].func; postHookFunc(fd); } @@ -33858,14 +34826,14 @@ void HP_intif_pQuestSave(int fd) { } void HP_intif_pMailInboxReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailInboxReceived_pre ) { + if (HPMHooks.count.HP_intif_pMailInboxReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33873,9 +34841,9 @@ void HP_intif_pMailInboxReceived(int fd) { { HPMHooks.source.intif.pMailInboxReceived(fd); } - if( HPMHooks.count.HP_intif_pMailInboxReceived_post ) { + if (HPMHooks.count.HP_intif_pMailInboxReceived_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailInboxReceived_post[hIndex].func; postHookFunc(fd); } @@ -33884,14 +34852,14 @@ void HP_intif_pMailInboxReceived(int fd) { } void HP_intif_pMailNew(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailNew_pre ) { + if (HPMHooks.count.HP_intif_pMailNew_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33899,9 +34867,9 @@ void HP_intif_pMailNew(int fd) { { HPMHooks.source.intif.pMailNew(fd); } - if( HPMHooks.count.HP_intif_pMailNew_post ) { + if (HPMHooks.count.HP_intif_pMailNew_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailNew_post[hIndex].func; postHookFunc(fd); } @@ -33910,14 +34878,14 @@ void HP_intif_pMailNew(int fd) { } void HP_intif_pMailGetAttach(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailGetAttach_pre ) { + if (HPMHooks.count.HP_intif_pMailGetAttach_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33925,9 +34893,9 @@ void HP_intif_pMailGetAttach(int fd) { { HPMHooks.source.intif.pMailGetAttach(fd); } - if( HPMHooks.count.HP_intif_pMailGetAttach_post ) { + if (HPMHooks.count.HP_intif_pMailGetAttach_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailGetAttach_post[hIndex].func; postHookFunc(fd); } @@ -33936,14 +34904,14 @@ void HP_intif_pMailGetAttach(int fd) { } void HP_intif_pMailDelete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailDelete_pre ) { + if (HPMHooks.count.HP_intif_pMailDelete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33951,9 +34919,9 @@ void HP_intif_pMailDelete(int fd) { { HPMHooks.source.intif.pMailDelete(fd); } - if( HPMHooks.count.HP_intif_pMailDelete_post ) { + if (HPMHooks.count.HP_intif_pMailDelete_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailDelete_post[hIndex].func; postHookFunc(fd); } @@ -33962,14 +34930,14 @@ void HP_intif_pMailDelete(int fd) { } void HP_intif_pMailReturn(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailReturn_pre ) { + if (HPMHooks.count.HP_intif_pMailReturn_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33977,9 +34945,9 @@ void HP_intif_pMailReturn(int fd) { { HPMHooks.source.intif.pMailReturn(fd); } - if( HPMHooks.count.HP_intif_pMailReturn_post ) { + if (HPMHooks.count.HP_intif_pMailReturn_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailReturn_post[hIndex].func; postHookFunc(fd); } @@ -33988,14 +34956,14 @@ void HP_intif_pMailReturn(int fd) { } void HP_intif_pMailSend(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailSend_pre ) { + if (HPMHooks.count.HP_intif_pMailSend_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34003,9 +34971,9 @@ void HP_intif_pMailSend(int fd) { { HPMHooks.source.intif.pMailSend(fd); } - if( HPMHooks.count.HP_intif_pMailSend_post ) { + if (HPMHooks.count.HP_intif_pMailSend_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMailSend_post[hIndex].func; postHookFunc(fd); } @@ -34014,14 +34982,14 @@ void HP_intif_pMailSend(int fd) { } void HP_intif_pAuctionResults(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionResults_pre ) { + if (HPMHooks.count.HP_intif_pAuctionResults_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34029,9 +34997,9 @@ void HP_intif_pAuctionResults(int fd) { { HPMHooks.source.intif.pAuctionResults(fd); } - if( HPMHooks.count.HP_intif_pAuctionResults_post ) { + if (HPMHooks.count.HP_intif_pAuctionResults_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionResults_post[hIndex].func; postHookFunc(fd); } @@ -34040,14 +35008,14 @@ void HP_intif_pAuctionResults(int fd) { } void HP_intif_pAuctionRegister(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionRegister_pre ) { + if (HPMHooks.count.HP_intif_pAuctionRegister_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34055,9 +35023,9 @@ void HP_intif_pAuctionRegister(int fd) { { HPMHooks.source.intif.pAuctionRegister(fd); } - if( HPMHooks.count.HP_intif_pAuctionRegister_post ) { + if (HPMHooks.count.HP_intif_pAuctionRegister_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionRegister_post[hIndex].func; postHookFunc(fd); } @@ -34066,14 +35034,14 @@ void HP_intif_pAuctionRegister(int fd) { } void HP_intif_pAuctionCancel(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionCancel_pre ) { + if (HPMHooks.count.HP_intif_pAuctionCancel_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34081,9 +35049,9 @@ void HP_intif_pAuctionCancel(int fd) { { HPMHooks.source.intif.pAuctionCancel(fd); } - if( HPMHooks.count.HP_intif_pAuctionCancel_post ) { + if (HPMHooks.count.HP_intif_pAuctionCancel_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionCancel_post[hIndex].func; postHookFunc(fd); } @@ -34092,14 +35060,14 @@ void HP_intif_pAuctionCancel(int fd) { } void HP_intif_pAuctionClose(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionClose_pre ) { + if (HPMHooks.count.HP_intif_pAuctionClose_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34107,9 +35075,9 @@ void HP_intif_pAuctionClose(int fd) { { HPMHooks.source.intif.pAuctionClose(fd); } - if( HPMHooks.count.HP_intif_pAuctionClose_post ) { + if (HPMHooks.count.HP_intif_pAuctionClose_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionClose_post[hIndex].func; postHookFunc(fd); } @@ -34118,14 +35086,14 @@ void HP_intif_pAuctionClose(int fd) { } void HP_intif_pAuctionMessage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionMessage_pre ) { + if (HPMHooks.count.HP_intif_pAuctionMessage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34133,9 +35101,9 @@ void HP_intif_pAuctionMessage(int fd) { { HPMHooks.source.intif.pAuctionMessage(fd); } - if( HPMHooks.count.HP_intif_pAuctionMessage_post ) { + if (HPMHooks.count.HP_intif_pAuctionMessage_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionMessage_post[hIndex].func; postHookFunc(fd); } @@ -34144,14 +35112,14 @@ void HP_intif_pAuctionMessage(int fd) { } void HP_intif_pAuctionBid(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionBid_pre ) { + if (HPMHooks.count.HP_intif_pAuctionBid_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34159,9 +35127,9 @@ void HP_intif_pAuctionBid(int fd) { { HPMHooks.source.intif.pAuctionBid(fd); } - if( HPMHooks.count.HP_intif_pAuctionBid_post ) { + if (HPMHooks.count.HP_intif_pAuctionBid_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pAuctionBid_post[hIndex].func; postHookFunc(fd); } @@ -34170,14 +35138,14 @@ void HP_intif_pAuctionBid(int fd) { } void HP_intif_pItembound_ack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pItembound_ack_pre ) { + if (HPMHooks.count.HP_intif_pItembound_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_pItembound_ack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34185,9 +35153,9 @@ void HP_intif_pItembound_ack(int fd) { { HPMHooks.source.intif.pItembound_ack(fd); } - if( HPMHooks.count.HP_intif_pItembound_ack_post ) { + if (HPMHooks.count.HP_intif_pItembound_ack_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pItembound_ack_post[hIndex].func; postHookFunc(fd); } @@ -34196,14 +35164,14 @@ void HP_intif_pItembound_ack(int fd) { } void HP_intif_pMercenaryReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) { + if (HPMHooks.count.HP_intif_pMercenaryReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34211,9 +35179,9 @@ void HP_intif_pMercenaryReceived(int fd) { { HPMHooks.source.intif.pMercenaryReceived(fd); } - if( HPMHooks.count.HP_intif_pMercenaryReceived_post ) { + if (HPMHooks.count.HP_intif_pMercenaryReceived_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMercenaryReceived_post[hIndex].func; postHookFunc(fd); } @@ -34222,14 +35190,14 @@ void HP_intif_pMercenaryReceived(int fd) { } void HP_intif_pMercenaryDeleted(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenaryDeleted_pre ) { + if (HPMHooks.count.HP_intif_pMercenaryDeleted_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34237,9 +35205,9 @@ void HP_intif_pMercenaryDeleted(int fd) { { HPMHooks.source.intif.pMercenaryDeleted(fd); } - if( HPMHooks.count.HP_intif_pMercenaryDeleted_post ) { + if (HPMHooks.count.HP_intif_pMercenaryDeleted_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMercenaryDeleted_post[hIndex].func; postHookFunc(fd); } @@ -34248,14 +35216,14 @@ void HP_intif_pMercenaryDeleted(int fd) { } void HP_intif_pMercenarySaved(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenarySaved_pre ) { + if (HPMHooks.count.HP_intif_pMercenarySaved_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34263,9 +35231,9 @@ void HP_intif_pMercenarySaved(int fd) { { HPMHooks.source.intif.pMercenarySaved(fd); } - if( HPMHooks.count.HP_intif_pMercenarySaved_post ) { + if (HPMHooks.count.HP_intif_pMercenarySaved_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pMercenarySaved_post[hIndex].func; postHookFunc(fd); } @@ -34274,14 +35242,14 @@ void HP_intif_pMercenarySaved(int fd) { } void HP_intif_pElementalReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalReceived_pre ) { + if (HPMHooks.count.HP_intif_pElementalReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34289,9 +35257,9 @@ void HP_intif_pElementalReceived(int fd) { { HPMHooks.source.intif.pElementalReceived(fd); } - if( HPMHooks.count.HP_intif_pElementalReceived_post ) { + if (HPMHooks.count.HP_intif_pElementalReceived_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pElementalReceived_post[hIndex].func; postHookFunc(fd); } @@ -34300,14 +35268,14 @@ void HP_intif_pElementalReceived(int fd) { } void HP_intif_pElementalDeleted(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalDeleted_pre ) { + if (HPMHooks.count.HP_intif_pElementalDeleted_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34315,9 +35283,9 @@ void HP_intif_pElementalDeleted(int fd) { { HPMHooks.source.intif.pElementalDeleted(fd); } - if( HPMHooks.count.HP_intif_pElementalDeleted_post ) { + if (HPMHooks.count.HP_intif_pElementalDeleted_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pElementalDeleted_post[hIndex].func; postHookFunc(fd); } @@ -34326,14 +35294,14 @@ void HP_intif_pElementalDeleted(int fd) { } void HP_intif_pElementalSaved(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalSaved_pre ) { + if (HPMHooks.count.HP_intif_pElementalSaved_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34341,9 +35309,9 @@ void HP_intif_pElementalSaved(int fd) { { HPMHooks.source.intif.pElementalSaved(fd); } - if( HPMHooks.count.HP_intif_pElementalSaved_post ) { + if (HPMHooks.count.HP_intif_pElementalSaved_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pElementalSaved_post[hIndex].func; postHookFunc(fd); } @@ -34352,14 +35320,14 @@ void HP_intif_pElementalSaved(int fd) { } void HP_intif_pCreatePet(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pCreatePet_pre ) { + if (HPMHooks.count.HP_intif_pCreatePet_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34367,9 +35335,9 @@ void HP_intif_pCreatePet(int fd) { { HPMHooks.source.intif.pCreatePet(fd); } - if( HPMHooks.count.HP_intif_pCreatePet_post ) { + if (HPMHooks.count.HP_intif_pCreatePet_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pCreatePet_post[hIndex].func; postHookFunc(fd); } @@ -34378,14 +35346,14 @@ void HP_intif_pCreatePet(int fd) { } void HP_intif_pRecvPetData(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRecvPetData_pre ) { + if (HPMHooks.count.HP_intif_pRecvPetData_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34393,9 +35361,9 @@ void HP_intif_pRecvPetData(int fd) { { HPMHooks.source.intif.pRecvPetData(fd); } - if( HPMHooks.count.HP_intif_pRecvPetData_post ) { + if (HPMHooks.count.HP_intif_pRecvPetData_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pRecvPetData_post[hIndex].func; postHookFunc(fd); } @@ -34404,14 +35372,14 @@ void HP_intif_pRecvPetData(int fd) { } void HP_intif_pSavePetOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSavePetOk_pre ) { + if (HPMHooks.count.HP_intif_pSavePetOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34419,9 +35387,9 @@ void HP_intif_pSavePetOk(int fd) { { HPMHooks.source.intif.pSavePetOk(fd); } - if( HPMHooks.count.HP_intif_pSavePetOk_post ) { + if (HPMHooks.count.HP_intif_pSavePetOk_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pSavePetOk_post[hIndex].func; postHookFunc(fd); } @@ -34430,14 +35398,14 @@ void HP_intif_pSavePetOk(int fd) { } void HP_intif_pDeletePetOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pDeletePetOk_pre ) { + if (HPMHooks.count.HP_intif_pDeletePetOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34445,9 +35413,9 @@ void HP_intif_pDeletePetOk(int fd) { { HPMHooks.source.intif.pDeletePetOk(fd); } - if( HPMHooks.count.HP_intif_pDeletePetOk_post ) { + if (HPMHooks.count.HP_intif_pDeletePetOk_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pDeletePetOk_post[hIndex].func; postHookFunc(fd); } @@ -34456,14 +35424,14 @@ void HP_intif_pDeletePetOk(int fd) { } void HP_intif_pCreateHomunculus(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pCreateHomunculus_pre ) { + if (HPMHooks.count.HP_intif_pCreateHomunculus_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34471,9 +35439,9 @@ void HP_intif_pCreateHomunculus(int fd) { { HPMHooks.source.intif.pCreateHomunculus(fd); } - if( HPMHooks.count.HP_intif_pCreateHomunculus_post ) { + if (HPMHooks.count.HP_intif_pCreateHomunculus_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pCreateHomunculus_post[hIndex].func; postHookFunc(fd); } @@ -34482,14 +35450,14 @@ void HP_intif_pCreateHomunculus(int fd) { } void HP_intif_pRecvHomunculusData(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRecvHomunculusData_pre ) { + if (HPMHooks.count.HP_intif_pRecvHomunculusData_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34497,9 +35465,9 @@ void HP_intif_pRecvHomunculusData(int fd) { { HPMHooks.source.intif.pRecvHomunculusData(fd); } - if( HPMHooks.count.HP_intif_pRecvHomunculusData_post ) { + if (HPMHooks.count.HP_intif_pRecvHomunculusData_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pRecvHomunculusData_post[hIndex].func; postHookFunc(fd); } @@ -34508,14 +35476,14 @@ void HP_intif_pRecvHomunculusData(int fd) { } void HP_intif_pSaveHomunculusOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSaveHomunculusOk_pre ) { + if (HPMHooks.count.HP_intif_pSaveHomunculusOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34523,9 +35491,9 @@ void HP_intif_pSaveHomunculusOk(int fd) { { HPMHooks.source.intif.pSaveHomunculusOk(fd); } - if( HPMHooks.count.HP_intif_pSaveHomunculusOk_post ) { + if (HPMHooks.count.HP_intif_pSaveHomunculusOk_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pSaveHomunculusOk_post[hIndex].func; postHookFunc(fd); } @@ -34534,14 +35502,14 @@ void HP_intif_pSaveHomunculusOk(int fd) { } void HP_intif_pDeleteHomunculusOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre ) { + if (HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34549,26 +35517,130 @@ void HP_intif_pDeleteHomunculusOk(int fd) { { HPMHooks.source.intif.pDeleteHomunculusOk(fd); } - if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_post ) { + if (HPMHooks.count.HP_intif_pDeleteHomunculusOk_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pDeleteHomunculusOk_post[hIndex].func; postHookFunc(fd); } } return; } +void HP_intif_pRequestRodexOpenInbox(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRequestRodexOpenInbox_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRequestRodexOpenInbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRequestRodexOpenInbox_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRequestRodexOpenInbox(fd); + } + if (HPMHooks.count.HP_intif_pRequestRodexOpenInbox_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRequestRodexOpenInbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRequestRodexOpenInbox_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRodexHasNew(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexHasNew_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexHasNew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexHasNew_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexHasNew(fd); + } + if (HPMHooks.count.HP_intif_pRodexHasNew_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexHasNew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexHasNew_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRodexSendMail(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexSendMail_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexSendMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexSendMail_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexSendMail(fd); + } + if (HPMHooks.count.HP_intif_pRodexSendMail_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexSendMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexSendMail_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRodexCheckName(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexCheckName_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexCheckName_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexCheckName_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexCheckName(fd); + } + if (HPMHooks.count.HP_intif_pRodexCheckName_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexCheckName_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexCheckName_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} /* irc_bot_interface */ void HP_ircbot_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_init_pre ) { + if (HPMHooks.count.HP_ircbot_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34576,9 +35648,9 @@ void HP_ircbot_init(bool minimal) { { HPMHooks.source.ircbot.init(minimal); } - if( HPMHooks.count.HP_ircbot_init_post ) { + if (HPMHooks.count.HP_ircbot_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_init_post[hIndex].func; postHookFunc(minimal); } @@ -34587,14 +35659,14 @@ void HP_ircbot_init(bool minimal) { } void HP_ircbot_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_final_pre ) { + if (HPMHooks.count.HP_ircbot_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34602,9 +35674,9 @@ void HP_ircbot_final(void) { { HPMHooks.source.ircbot.final(); } - if( HPMHooks.count.HP_ircbot_final_post ) { + if (HPMHooks.count.HP_ircbot_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_final_post[hIndex].func; postHookFunc(); } @@ -34614,14 +35686,14 @@ void HP_ircbot_final(void) { int HP_ircbot_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_parse_pre ) { + if (HPMHooks.count.HP_ircbot_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34629,9 +35701,9 @@ int HP_ircbot_parse(int fd) { { retVal___ = HPMHooks.source.ircbot.parse(fd); } - if( HPMHooks.count.HP_ircbot_parse_post ) { + if (HPMHooks.count.HP_ircbot_parse_post > 0) { int (*postHookFunc) (int retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -34640,14 +35712,14 @@ int HP_ircbot_parse(int fd) { } void HP_ircbot_parse_sub(int fd, char *str) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_parse_sub_pre ) { + if (HPMHooks.count.HP_ircbot_parse_sub_pre > 0) { void (*preHookFunc) (int *fd, char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34655,9 +35727,9 @@ void HP_ircbot_parse_sub(int fd, char *str) { { HPMHooks.source.ircbot.parse_sub(fd, str); } - if( HPMHooks.count.HP_ircbot_parse_sub_post ) { + if (HPMHooks.count.HP_ircbot_parse_sub_post > 0) { void (*postHookFunc) (int fd, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_post; hIndex++ ) { + 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); } @@ -34666,14 +35738,14 @@ void HP_ircbot_parse_sub(int fd, char *str) { } void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_parse_source_pre ) { + if (HPMHooks.count.HP_ircbot_parse_source_pre > 0) { void (*preHookFunc) (char **source, char **nick, char **ident, char **host); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34681,9 +35753,9 @@ void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { { HPMHooks.source.ircbot.parse_source(source, nick, ident, host); } - if( HPMHooks.count.HP_ircbot_parse_source_post ) { + if (HPMHooks.count.HP_ircbot_parse_source_post > 0) { void (*postHookFunc) (char *source, char *nick, char *ident, char *host); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_post; hIndex++ ) { + 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); } @@ -34693,14 +35765,14 @@ void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { 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 ) { + if (HPMHooks.count.HP_ircbot_func_search_pre > 0) { struct irc_func* (*preHookFunc) (char **function_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34708,9 +35780,9 @@ struct irc_func* HP_ircbot_func_search(char *function_name) { { retVal___ = HPMHooks.source.ircbot.func_search(function_name); } - if( HPMHooks.count.HP_ircbot_func_search_post ) { + if (HPMHooks.count.HP_ircbot_func_search_post > 0) { struct irc_func* (*postHookFunc) (struct irc_func* retVal___, char *function_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_post; hIndex++ ) { + 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); } @@ -34720,14 +35792,14 @@ struct irc_func* HP_ircbot_func_search(char *function_name) { int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_connect_timer_pre ) { + if (HPMHooks.count.HP_ircbot_connect_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34735,9 +35807,9 @@ int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.connect_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_connect_timer_post ) { + if (HPMHooks.count.HP_ircbot_connect_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_post; hIndex++ ) { + 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); } @@ -34747,14 +35819,14 @@ int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_identify_timer_pre ) { + if (HPMHooks.count.HP_ircbot_identify_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34762,9 +35834,9 @@ int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.identify_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_identify_timer_post ) { + if (HPMHooks.count.HP_ircbot_identify_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_post; hIndex++ ) { + 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); } @@ -34774,14 +35846,14 @@ int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_join_timer_pre ) { + if (HPMHooks.count.HP_ircbot_join_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34789,9 +35861,9 @@ int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.join_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_join_timer_post ) { + if (HPMHooks.count.HP_ircbot_join_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_post; hIndex++ ) { + 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); } @@ -34801,14 +35873,14 @@ int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) { int HP_ircbot_queue_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_queue_timer_pre ) { + if (HPMHooks.count.HP_ircbot_queue_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_queue_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34816,9 +35888,9 @@ int HP_ircbot_queue_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.queue_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_queue_timer_post ) { + if (HPMHooks.count.HP_ircbot_queue_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_queue_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -34827,14 +35899,14 @@ int HP_ircbot_queue_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_ircbot_queue(char *str) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_queue_pre ) { + if (HPMHooks.count.HP_ircbot_queue_pre > 0) { void (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_queue_pre[hIndex].func; preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34842,9 +35914,9 @@ void HP_ircbot_queue(char *str) { { HPMHooks.source.ircbot.queue(str); } - if( HPMHooks.count.HP_ircbot_queue_post ) { + if (HPMHooks.count.HP_ircbot_queue_post > 0) { void (*postHookFunc) (char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_queue_post[hIndex].func; postHookFunc(str); } @@ -34853,14 +35925,14 @@ void HP_ircbot_queue(char *str) { } void HP_ircbot_send(char *str, bool force) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_send_pre ) { + if (HPMHooks.count.HP_ircbot_send_pre > 0) { void (*preHookFunc) (char **str, bool *force); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func; preHookFunc(&str, &force); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34868,9 +35940,9 @@ void HP_ircbot_send(char *str, bool force) { { HPMHooks.source.ircbot.send(str, force); } - if( HPMHooks.count.HP_ircbot_send_post ) { + if (HPMHooks.count.HP_ircbot_send_post > 0) { void (*postHookFunc) (char *str, bool force); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func; postHookFunc(str, force); } @@ -34879,14 +35951,14 @@ void HP_ircbot_send(char *str, bool force) { } void HP_ircbot_relay(const char *name, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_relay_pre ) { + if (HPMHooks.count.HP_ircbot_relay_pre > 0) { void (*preHookFunc) (const char **name, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34894,9 +35966,9 @@ void HP_ircbot_relay(const char *name, const char *msg) { { HPMHooks.source.ircbot.relay(name, msg); } - if( HPMHooks.count.HP_ircbot_relay_post ) { + if (HPMHooks.count.HP_ircbot_relay_post > 0) { void (*postHookFunc) (const char *name, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_relay_post[hIndex].func; postHookFunc(name, msg); } @@ -34905,14 +35977,14 @@ void HP_ircbot_relay(const char *name, const char *msg) { } void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_pong_pre ) { + if (HPMHooks.count.HP_ircbot_pong_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34920,9 +35992,9 @@ void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) { { HPMHooks.source.ircbot.pong(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_pong_post ) { + if (HPMHooks.count.HP_ircbot_pong_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_post; hIndex++ ) { + 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); } @@ -34931,14 +36003,14 @@ void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) { } void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_privmsg_pre ) { + if (HPMHooks.count.HP_ircbot_privmsg_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34946,9 +36018,9 @@ void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) { HPMHooks.source.ircbot.privmsg(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_privmsg_post ) { + if (HPMHooks.count.HP_ircbot_privmsg_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_post; hIndex++ ) { + 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); } @@ -34957,14 +36029,14 @@ void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) } void HP_ircbot_privmsg_ctcp(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_privmsg_ctcp_pre ) { + if (HPMHooks.count.HP_ircbot_privmsg_ctcp_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_pre[hIndex].func; preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34972,9 +36044,9 @@ void HP_ircbot_privmsg_ctcp(int fd, char *cmd, char *source, char *target, char { HPMHooks.source.ircbot.privmsg_ctcp(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_privmsg_ctcp_post ) { + if (HPMHooks.count.HP_ircbot_privmsg_ctcp_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_post[hIndex].func; postHookFunc(fd, cmd, source, target, msg); } @@ -34983,14 +36055,14 @@ void HP_ircbot_privmsg_ctcp(int fd, char *cmd, char *source, char *target, char } void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_userjoin_pre ) { + if (HPMHooks.count.HP_ircbot_userjoin_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34998,9 +36070,9 @@ void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg { HPMHooks.source.ircbot.userjoin(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_userjoin_post ) { + if (HPMHooks.count.HP_ircbot_userjoin_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_post; hIndex++ ) { + 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); } @@ -35009,14 +36081,14 @@ void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg } void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_userleave_pre ) { + if (HPMHooks.count.HP_ircbot_userleave_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35024,9 +36096,9 @@ void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *ms { HPMHooks.source.ircbot.userleave(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_userleave_post ) { + if (HPMHooks.count.HP_ircbot_userleave_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_post; hIndex++ ) { + 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); } @@ -35035,14 +36107,14 @@ void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *ms } void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_usernick_pre ) { + if (HPMHooks.count.HP_ircbot_usernick_pre > 0) { void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35050,9 +36122,9 @@ void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg { HPMHooks.source.ircbot.usernick(fd, cmd, source, target, msg); } - if( HPMHooks.count.HP_ircbot_usernick_post ) { + if (HPMHooks.count.HP_ircbot_usernick_post > 0) { void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_post; hIndex++ ) { + 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); } @@ -35062,14 +36134,14 @@ void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg /* itemdb_interface */ void HP_itemdb_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_init_pre ) { + if (HPMHooks.count.HP_itemdb_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35077,9 +36149,9 @@ void HP_itemdb_init(bool minimal) { { HPMHooks.source.itemdb.init(minimal); } - if( HPMHooks.count.HP_itemdb_init_post ) { + if (HPMHooks.count.HP_itemdb_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_init_post[hIndex].func; postHookFunc(minimal); } @@ -35088,14 +36160,14 @@ void HP_itemdb_init(bool minimal) { } void HP_itemdb_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_final_pre ) { + if (HPMHooks.count.HP_itemdb_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35103,9 +36175,9 @@ void HP_itemdb_final(void) { { HPMHooks.source.itemdb.final(); } - if( HPMHooks.count.HP_itemdb_final_post ) { + if (HPMHooks.count.HP_itemdb_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_final_post[hIndex].func; postHookFunc(); } @@ -35114,14 +36186,14 @@ void HP_itemdb_final(void) { } void HP_itemdb_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_reload_pre ) { + if (HPMHooks.count.HP_itemdb_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35129,9 +36201,9 @@ void HP_itemdb_reload(void) { { HPMHooks.source.itemdb.reload(); } - if( HPMHooks.count.HP_itemdb_reload_post ) { + if (HPMHooks.count.HP_itemdb_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_reload_post[hIndex].func; postHookFunc(); } @@ -35140,14 +36212,14 @@ void HP_itemdb_reload(void) { } void HP_itemdb_name_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_name_constants_pre ) { + if (HPMHooks.count.HP_itemdb_name_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35155,9 +36227,9 @@ void HP_itemdb_name_constants(void) { { HPMHooks.source.itemdb.name_constants(); } - if( HPMHooks.count.HP_itemdb_name_constants_post ) { + if (HPMHooks.count.HP_itemdb_name_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_name_constants_post[hIndex].func; postHookFunc(); } @@ -35166,14 +36238,14 @@ void HP_itemdb_name_constants(void) { } void HP_itemdb_read_groups(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_groups_pre ) { + if (HPMHooks.count.HP_itemdb_read_groups_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35181,9 +36253,9 @@ void HP_itemdb_read_groups(void) { { HPMHooks.source.itemdb.read_groups(); } - if( HPMHooks.count.HP_itemdb_read_groups_post ) { + if (HPMHooks.count.HP_itemdb_read_groups_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_groups_post[hIndex].func; postHookFunc(); } @@ -35192,14 +36264,14 @@ void HP_itemdb_read_groups(void) { } void HP_itemdb_read_chains(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_chains_pre ) { + if (HPMHooks.count.HP_itemdb_read_chains_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35207,9 +36279,9 @@ void HP_itemdb_read_chains(void) { { HPMHooks.source.itemdb.read_chains(); } - if( HPMHooks.count.HP_itemdb_read_chains_post ) { + if (HPMHooks.count.HP_itemdb_read_chains_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_chains_post[hIndex].func; postHookFunc(); } @@ -35218,14 +36290,14 @@ void HP_itemdb_read_chains(void) { } void HP_itemdb_read_packages(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_packages_pre ) { + if (HPMHooks.count.HP_itemdb_read_packages_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35233,25 +36305,51 @@ void HP_itemdb_read_packages(void) { { HPMHooks.source.itemdb.read_packages(); } - if( HPMHooks.count.HP_itemdb_read_packages_post ) { + if (HPMHooks.count.HP_itemdb_read_packages_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_post; hIndex++ ) { + 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_read_options(void) { + int hIndex = 0; + if (HPMHooks.count.HP_itemdb_read_options_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_options_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_options(); + } + if (HPMHooks.count.HP_itemdb_read_options_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_options_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 ) { + if (HPMHooks.count.HP_itemdb_write_cached_packages_pre > 0) { void (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35259,9 +36357,9 @@ void HP_itemdb_write_cached_packages(const char *config_filename) { { HPMHooks.source.itemdb.write_cached_packages(config_filename); } - if( HPMHooks.count.HP_itemdb_write_cached_packages_post ) { + if (HPMHooks.count.HP_itemdb_write_cached_packages_post > 0) { void (*postHookFunc) (const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_post; hIndex++ ) { + 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); } @@ -35271,14 +36369,14 @@ void HP_itemdb_write_cached_packages(const char *config_filename) { bool HP_itemdb_read_cached_packages(const char *config_filename) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_read_cached_packages_pre ) { + if (HPMHooks.count.HP_itemdb_read_cached_packages_pre > 0) { bool (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35286,9 +36384,9 @@ bool HP_itemdb_read_cached_packages(const char *config_filename) { { retVal___ = HPMHooks.source.itemdb.read_cached_packages(config_filename); } - if( HPMHooks.count.HP_itemdb_read_cached_packages_post ) { + if (HPMHooks.count.HP_itemdb_read_cached_packages_post > 0) { bool (*postHookFunc) (bool retVal___, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_post; hIndex++ ) { + 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); } @@ -35298,14 +36396,14 @@ bool HP_itemdb_read_cached_packages(const char *config_filename) { struct item_data* HP_itemdb_name2id(const char *str) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_name2id_pre ) { + if (HPMHooks.count.HP_itemdb_name2id_pre > 0) { struct item_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35313,9 +36411,9 @@ struct item_data* HP_itemdb_name2id(const char *str) { { retVal___ = HPMHooks.source.itemdb.name2id(str); } - if( HPMHooks.count.HP_itemdb_name2id_post ) { + if (HPMHooks.count.HP_itemdb_name2id_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -35325,14 +36423,14 @@ struct item_data* HP_itemdb_name2id(const char *str) { 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 ) { + if (HPMHooks.count.HP_itemdb_search_name_pre > 0) { struct item_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35340,9 +36438,9 @@ struct item_data* HP_itemdb_search_name(const char *name) { { retVal___ = HPMHooks.source.itemdb.search_name(name); } - if( HPMHooks.count.HP_itemdb_search_name_post ) { + if (HPMHooks.count.HP_itemdb_search_name_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_post; hIndex++ ) { + 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); } @@ -35352,14 +36450,14 @@ struct item_data* HP_itemdb_search_name(const char *name) { int HP_itemdb_search_name_array(struct item_data **data, int size, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_search_name_array_pre ) { + if (HPMHooks.count.HP_itemdb_search_name_array_pre > 0) { int (*preHookFunc) (struct item_data ***data, int *size, const char **str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35367,9 +36465,9 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s { retVal___ = HPMHooks.source.itemdb.search_name_array(data, size, str, flag); } - if( HPMHooks.count.HP_itemdb_search_name_array_post ) { + if (HPMHooks.count.HP_itemdb_search_name_array_post > 0) { 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++ ) { + 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); } @@ -35379,14 +36477,14 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s struct item_data* HP_itemdb_load(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_load_pre ) { + if (HPMHooks.count.HP_itemdb_load_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35394,9 +36492,9 @@ struct item_data* HP_itemdb_load(int nameid) { { retVal___ = HPMHooks.source.itemdb.load(nameid); } - if( HPMHooks.count.HP_itemdb_load_post ) { + if (HPMHooks.count.HP_itemdb_load_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_load_post[hIndex].func; retVal___ = postHookFunc(retVal___, nameid); } @@ -35406,14 +36504,14 @@ struct item_data* HP_itemdb_load(int nameid) { struct item_data* HP_itemdb_search(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_search_pre ) { + if (HPMHooks.count.HP_itemdb_search_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35421,9 +36519,9 @@ struct item_data* HP_itemdb_search(int nameid) { { retVal___ = HPMHooks.source.itemdb.search(nameid); } - if( HPMHooks.count.HP_itemdb_search_post ) { + if (HPMHooks.count.HP_itemdb_search_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, nameid); } @@ -35433,14 +36531,14 @@ struct item_data* HP_itemdb_search(int nameid) { struct item_data* HP_itemdb_exists(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_exists_pre ) { + if (HPMHooks.count.HP_itemdb_exists_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35448,26 +36546,53 @@ struct item_data* HP_itemdb_exists(int nameid) { { retVal___ = HPMHooks.source.itemdb.exists(nameid); } - if( HPMHooks.count.HP_itemdb_exists_post ) { + if (HPMHooks.count.HP_itemdb_exists_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_post; hIndex++ ) { + 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___; } +struct item_option* HP_itemdb_option_exists(int idx) { + int hIndex = 0; + struct item_option* retVal___ = NULL; + if (HPMHooks.count.HP_itemdb_option_exists_pre > 0) { + struct item_option* (*preHookFunc) (int *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_option_exists_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.option_exists(idx); + } + if (HPMHooks.count.HP_itemdb_option_exists_post > 0) { + struct item_option* (*postHookFunc) (struct item_option* retVal___, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_option_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx); + } + } + return retVal___; +} bool HP_itemdb_in_group(struct item_group *group, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_in_group_pre ) { + if (HPMHooks.count.HP_itemdb_in_group_pre > 0) { bool (*preHookFunc) (struct item_group **group, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35475,9 +36600,9 @@ bool HP_itemdb_in_group(struct item_group *group, int nameid) { { retVal___ = HPMHooks.source.itemdb.in_group(group, nameid); } - if( HPMHooks.count.HP_itemdb_in_group_post ) { + if (HPMHooks.count.HP_itemdb_in_group_post > 0) { bool (*postHookFunc) (bool retVal___, struct item_group *group, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_post; hIndex++ ) { + 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); } @@ -35487,14 +36612,14 @@ bool HP_itemdb_in_group(struct item_group *group, int nameid) { int HP_itemdb_group_item(struct item_group *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_group_item_pre ) { + if (HPMHooks.count.HP_itemdb_group_item_pre > 0) { int (*preHookFunc) (struct item_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35502,9 +36627,9 @@ int HP_itemdb_group_item(struct item_group *group) { { retVal___ = HPMHooks.source.itemdb.group_item(group); } - if( HPMHooks.count.HP_itemdb_group_item_post ) { + if (HPMHooks.count.HP_itemdb_group_item_post > 0) { int (*postHookFunc) (int retVal___, struct item_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_post; hIndex++ ) { + 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); } @@ -35514,14 +36639,14 @@ int HP_itemdb_group_item(struct item_group *group) { int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_chain_item_pre ) { + if (HPMHooks.count.HP_itemdb_chain_item_pre > 0) { int (*preHookFunc) (unsigned short *chain_id, int **rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35529,9 +36654,9 @@ int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { { retVal___ = HPMHooks.source.itemdb.chain_item(chain_id, rate); } - if( HPMHooks.count.HP_itemdb_chain_item_post ) { + if (HPMHooks.count.HP_itemdb_chain_item_post > 0) { int (*postHookFunc) (int retVal___, unsigned short chain_id, int *rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_post; hIndex++ ) { + 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); } @@ -35540,14 +36665,14 @@ int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { } 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 ) { + if (HPMHooks.count.HP_itemdb_package_item_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item_package **package); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35555,9 +36680,9 @@ void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *pa { HPMHooks.source.itemdb.package_item(sd, package); } - if( HPMHooks.count.HP_itemdb_package_item_post ) { + if (HPMHooks.count.HP_itemdb_package_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_package *package); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_post; hIndex++ ) { + 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); } @@ -35567,16 +36692,16 @@ void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *pa int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchname_sub_pre ) { + if (HPMHooks.count.HP_itemdb_searchname_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35586,9 +36711,9 @@ int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.itemdb.searchname_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_itemdb_searchname_sub_post ) { + if (HPMHooks.count.HP_itemdb_searchname_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_post; hIndex++ ) { + 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); @@ -35600,16 +36725,16 @@ int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchname_array_sub_pre ) { + if (HPMHooks.count.HP_itemdb_searchname_array_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35619,9 +36744,9 @@ int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list retVal___ = HPMHooks.source.itemdb.searchname_array_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_itemdb_searchname_array_sub_post ) { + if (HPMHooks.count.HP_itemdb_searchname_array_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_post; hIndex++ ) { + 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); @@ -35633,14 +36758,14 @@ int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list int HP_itemdb_searchrandomid(struct item_group *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchrandomid_pre ) { + if (HPMHooks.count.HP_itemdb_searchrandomid_pre > 0) { int (*preHookFunc) (struct item_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35648,9 +36773,9 @@ int HP_itemdb_searchrandomid(struct item_group *group) { { retVal___ = HPMHooks.source.itemdb.searchrandomid(group); } - if( HPMHooks.count.HP_itemdb_searchrandomid_post ) { + if (HPMHooks.count.HP_itemdb_searchrandomid_post > 0) { int (*postHookFunc) (int retVal___, struct item_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -35660,14 +36785,14 @@ int HP_itemdb_searchrandomid(struct item_group *group) { const char* HP_itemdb_typename(int type) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_typename_pre ) { + if (HPMHooks.count.HP_itemdb_typename_pre > 0) { const char* (*preHookFunc) (int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35675,9 +36800,9 @@ const char* HP_itemdb_typename(int type) { { retVal___ = HPMHooks.source.itemdb.typename(type); } - if( HPMHooks.count.HP_itemdb_typename_post ) { + if (HPMHooks.count.HP_itemdb_typename_post > 0) { const char* (*postHookFunc) (const char* retVal___, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_typename_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -35686,14 +36811,14 @@ const char* HP_itemdb_typename(int type) { } void HP_itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_jobmask2mapid_pre ) { + if (HPMHooks.count.HP_itemdb_jobmask2mapid_pre > 0) { void (*preHookFunc) (uint64 **bclass, uint64 *jobmask); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_jobmask2mapid_pre[hIndex].func; preHookFunc(&bclass, &jobmask); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35701,51 +36826,51 @@ void HP_itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { { HPMHooks.source.itemdb.jobmask2mapid(bclass, jobmask); } - if( HPMHooks.count.HP_itemdb_jobmask2mapid_post ) { + if (HPMHooks.count.HP_itemdb_jobmask2mapid_post > 0) { void (*postHookFunc) (uint64 *bclass, uint64 jobmask); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_jobmask2mapid_post[hIndex].func; postHookFunc(bclass, jobmask); } } return; } -void HP_itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) { +void HP_itemdb_jobid2mapid(uint64 *bclass, int job_class, bool enable) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) { - void (*preHookFunc) (uint64 **bclass, int *job_id, bool *enable); + if (HPMHooks.count.HP_itemdb_jobid2mapid_pre > 0) { + void (*preHookFunc) (uint64 **bclass, int *job_class, bool *enable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func; - preHookFunc(&bclass, &job_id, &enable); + preHookFunc(&bclass, &job_class, &enable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.itemdb.jobid2mapid(bclass, job_id, enable); + HPMHooks.source.itemdb.jobid2mapid(bclass, job_class, enable); } - if( HPMHooks.count.HP_itemdb_jobid2mapid_post ) { - void (*postHookFunc) (uint64 *bclass, int job_id, bool enable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_jobid2mapid_post > 0) { + void (*postHookFunc) (uint64 *bclass, int job_class, bool enable); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_post[hIndex].func; - postHookFunc(bclass, job_id, enable); + postHookFunc(bclass, job_class, enable); } } return; } void HP_itemdb_create_dummy_data(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_create_dummy_data_pre ) { + if (HPMHooks.count.HP_itemdb_create_dummy_data_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35753,9 +36878,9 @@ void HP_itemdb_create_dummy_data(void) { { HPMHooks.source.itemdb.create_dummy_data(); } - if( HPMHooks.count.HP_itemdb_create_dummy_data_post ) { + if (HPMHooks.count.HP_itemdb_create_dummy_data_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_post; hIndex++ ) { + 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(); } @@ -35765,14 +36890,14 @@ void HP_itemdb_create_dummy_data(void) { 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 ) { + if (HPMHooks.count.HP_itemdb_create_item_data_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35780,9 +36905,9 @@ struct item_data* HP_itemdb_create_item_data(int nameid) { { retVal___ = HPMHooks.source.itemdb.create_item_data(nameid); } - if( HPMHooks.count.HP_itemdb_create_item_data_post ) { + if (HPMHooks.count.HP_itemdb_create_item_data_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_post; hIndex++ ) { + 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); } @@ -35792,14 +36917,14 @@ struct item_data* HP_itemdb_create_item_data(int nameid) { int HP_itemdb_isequip(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isequip_pre ) { + if (HPMHooks.count.HP_itemdb_isequip_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35807,9 +36932,9 @@ int HP_itemdb_isequip(int nameid) { { retVal___ = HPMHooks.source.itemdb.isequip(nameid); } - if( HPMHooks.count.HP_itemdb_isequip_post ) { + if (HPMHooks.count.HP_itemdb_isequip_post > 0) { int (*postHookFunc) (int retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isequip_post[hIndex].func; retVal___ = postHookFunc(retVal___, nameid); } @@ -35819,14 +36944,14 @@ int HP_itemdb_isequip(int nameid) { int HP_itemdb_isequip2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isequip2_pre ) { + if (HPMHooks.count.HP_itemdb_isequip2_pre > 0) { int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35834,9 +36959,9 @@ int HP_itemdb_isequip2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isequip2(data); } - if( HPMHooks.count.HP_itemdb_isequip2_post ) { + if (HPMHooks.count.HP_itemdb_isequip2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isequip2_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -35846,14 +36971,14 @@ int HP_itemdb_isequip2(struct item_data *data) { int HP_itemdb_isstackable(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isstackable_pre ) { + if (HPMHooks.count.HP_itemdb_isstackable_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35861,9 +36986,9 @@ int HP_itemdb_isstackable(int nameid) { { retVal___ = HPMHooks.source.itemdb.isstackable(nameid); } - if( HPMHooks.count.HP_itemdb_isstackable_post ) { + if (HPMHooks.count.HP_itemdb_isstackable_post > 0) { int (*postHookFunc) (int retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isstackable_post[hIndex].func; retVal___ = postHookFunc(retVal___, nameid); } @@ -35873,14 +36998,14 @@ int HP_itemdb_isstackable(int nameid) { int HP_itemdb_isstackable2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isstackable2_pre ) { + if (HPMHooks.count.HP_itemdb_isstackable2_pre > 0) { int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35888,9 +37013,9 @@ int HP_itemdb_isstackable2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isstackable2(data); } - if( HPMHooks.count.HP_itemdb_isstackable2_post ) { + if (HPMHooks.count.HP_itemdb_isstackable2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isstackable2_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -35900,14 +37025,14 @@ int HP_itemdb_isstackable2(struct item_data *data) { int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isdropable_sub_pre ) { + if (HPMHooks.count.HP_itemdb_isdropable_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35915,9 +37040,9 @@ int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.isdropable_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_isdropable_sub_post ) { + if (HPMHooks.count.HP_itemdb_isdropable_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_post; hIndex++ ) { + 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); } @@ -35927,14 +37052,14 @@ int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cantrade_sub_pre ) { + if (HPMHooks.count.HP_itemdb_cantrade_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *gmlv2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35942,9 +37067,9 @@ int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { { retVal___ = HPMHooks.source.itemdb.cantrade_sub(item, gmlv, gmlv2); } - if( HPMHooks.count.HP_itemdb_cantrade_sub_post ) { + if (HPMHooks.count.HP_itemdb_cantrade_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int gmlv2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_post; hIndex++ ) { + 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); } @@ -35954,14 +37079,14 @@ int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre ) { + if (HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *gmlv2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35969,9 +37094,9 @@ int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { { retVal___ = HPMHooks.source.itemdb.canpartnertrade_sub(item, gmlv, gmlv2); } - if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_post ) { + if (HPMHooks.count.HP_itemdb_canpartnertrade_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int gmlv2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_post; hIndex++ ) { + 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); } @@ -35981,14 +37106,14 @@ int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cansell_sub_pre ) { + if (HPMHooks.count.HP_itemdb_cansell_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35996,9 +37121,9 @@ int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.cansell_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_cansell_sub_post ) { + if (HPMHooks.count.HP_itemdb_cansell_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_post; hIndex++ ) { + 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); } @@ -36008,14 +37133,14 @@ int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cancartstore_sub_pre ) { + if (HPMHooks.count.HP_itemdb_cancartstore_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36023,9 +37148,9 @@ int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.cancartstore_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_cancartstore_sub_post ) { + if (HPMHooks.count.HP_itemdb_cancartstore_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_post; hIndex++ ) { + 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); } @@ -36035,14 +37160,14 @@ int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canstore_sub_pre ) { + if (HPMHooks.count.HP_itemdb_canstore_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36050,9 +37175,9 @@ int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.canstore_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_canstore_sub_post ) { + if (HPMHooks.count.HP_itemdb_canstore_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_post; hIndex++ ) { + 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); } @@ -36062,14 +37187,14 @@ int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canguildstore_sub_pre ) { + if (HPMHooks.count.HP_itemdb_canguildstore_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36077,9 +37202,9 @@ int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.canguildstore_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_canguildstore_sub_post ) { + if (HPMHooks.count.HP_itemdb_canguildstore_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_post; hIndex++ ) { + 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); } @@ -36089,14 +37214,14 @@ int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canmail_sub_pre ) { + if (HPMHooks.count.HP_itemdb_canmail_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36104,9 +37229,9 @@ int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.canmail_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_canmail_sub_post ) { + if (HPMHooks.count.HP_itemdb_canmail_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_post; hIndex++ ) { + 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); } @@ -36116,14 +37241,14 @@ int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canauction_sub_pre ) { + if (HPMHooks.count.HP_itemdb_canauction_sub_pre > 0) { int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36131,9 +37256,9 @@ int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { { retVal___ = HPMHooks.source.itemdb.canauction_sub(item, gmlv, unused); } - if( HPMHooks.count.HP_itemdb_canauction_sub_post ) { + if (HPMHooks.count.HP_itemdb_canauction_sub_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *item, int gmlv, int unused); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_post; hIndex++ ) { + 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); } @@ -36143,14 +37268,14 @@ int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) (struct item_data *, int, int)) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isrestricted_pre ) { + if (HPMHooks.count.HP_itemdb_isrestricted_pre > 0) { int (*preHookFunc) (struct item **item, int *gmlv, int *gmlv2, int ( **func ) (struct item_data *, int, int)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36158,9 +37283,9 @@ int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) { retVal___ = HPMHooks.source.itemdb.isrestricted(item, gmlv, gmlv2, func); } - if( HPMHooks.count.HP_itemdb_isrestricted_post ) { + if (HPMHooks.count.HP_itemdb_isrestricted_post > 0) { 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++ ) { + 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); } @@ -36170,14 +37295,14 @@ int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) int HP_itemdb_isidentified(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isidentified_pre ) { + if (HPMHooks.count.HP_itemdb_isidentified_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36185,9 +37310,9 @@ int HP_itemdb_isidentified(int nameid) { { retVal___ = HPMHooks.source.itemdb.isidentified(nameid); } - if( HPMHooks.count.HP_itemdb_isidentified_post ) { + if (HPMHooks.count.HP_itemdb_isidentified_post > 0) { int (*postHookFunc) (int retVal___, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isidentified_post[hIndex].func; retVal___ = postHookFunc(retVal___, nameid); } @@ -36197,14 +37322,14 @@ int HP_itemdb_isidentified(int nameid) { int HP_itemdb_isidentified2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isidentified2_pre ) { + if (HPMHooks.count.HP_itemdb_isidentified2_pre > 0) { int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36212,9 +37337,9 @@ int HP_itemdb_isidentified2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isidentified2(data); } - if( HPMHooks.count.HP_itemdb_isidentified2_post ) { + if (HPMHooks.count.HP_itemdb_isidentified2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isidentified2_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -36224,14 +37349,14 @@ int HP_itemdb_isidentified2(struct item_data *data) { int HP_itemdb_combo_split_atoi(char *str, int *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_combo_split_atoi_pre ) { + if (HPMHooks.count.HP_itemdb_combo_split_atoi_pre > 0) { int (*preHookFunc) (char **str, int **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36239,9 +37364,9 @@ int HP_itemdb_combo_split_atoi(char *str, int *val) { { retVal___ = HPMHooks.source.itemdb.combo_split_atoi(str, val); } - if( HPMHooks.count.HP_itemdb_combo_split_atoi_post ) { + if (HPMHooks.count.HP_itemdb_combo_split_atoi_post > 0) { int (*postHookFunc) (int retVal___, char *str, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_combo_split_atoi_post; hIndex++ ) { + 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); } @@ -36250,14 +37375,14 @@ int HP_itemdb_combo_split_atoi(char *str, int *val) { } void HP_itemdb_read_combos(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_combos_pre ) { + if (HPMHooks.count.HP_itemdb_read_combos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36265,9 +37390,9 @@ void HP_itemdb_read_combos(void) { { HPMHooks.source.itemdb.read_combos(); } - if( HPMHooks.count.HP_itemdb_read_combos_post ) { + if (HPMHooks.count.HP_itemdb_read_combos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_combos_post[hIndex].func; postHookFunc(); } @@ -36277,14 +37402,14 @@ void HP_itemdb_read_combos(void) { int HP_itemdb_gendercheck(struct item_data *id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_gendercheck_pre ) { + if (HPMHooks.count.HP_itemdb_gendercheck_pre > 0) { int (*preHookFunc) (struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36292,9 +37417,9 @@ int HP_itemdb_gendercheck(struct item_data *id) { { retVal___ = HPMHooks.source.itemdb.gendercheck(id); } - if( HPMHooks.count.HP_itemdb_gendercheck_post ) { + if (HPMHooks.count.HP_itemdb_gendercheck_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_gendercheck_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -36304,14 +37429,14 @@ int HP_itemdb_gendercheck(struct item_data *id) { int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_validate_entry_pre ) { + if (HPMHooks.count.HP_itemdb_validate_entry_pre > 0) { int (*preHookFunc) (struct item_data **entry, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_validate_entry_pre[hIndex].func; retVal___ = preHookFunc(&entry, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36319,25 +37444,51 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) { retVal___ = HPMHooks.source.itemdb.validate_entry(entry, n, source); } - if( HPMHooks.count.HP_itemdb_validate_entry_post ) { + if (HPMHooks.count.HP_itemdb_validate_entry_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *entry, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_validate_entry_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry, n, source); } } return retVal___; } +void HP_itemdb_readdb_options_additional_fields(struct item_option *ito, struct config_setting_t *t, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre > 0) { + void (*preHookFunc) (struct item_option **ito, struct config_setting_t **t, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_pre[hIndex].func; + preHookFunc(&ito, &t, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.readdb_options_additional_fields(ito, t, source); + } + if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post > 0) { + void (*postHookFunc) (struct item_option *ito, struct config_setting_t *t, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_post[hIndex].func; + postHookFunc(ito, t, source); + } + } + return; +} void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, int n, const char *source) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_readdb_additional_fields_pre ) { + if (HPMHooks.count.HP_itemdb_readdb_additional_fields_pre > 0) { void (*preHookFunc) (int *itemid, struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_pre[hIndex].func; preHookFunc(&itemid, &it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36345,9 +37496,9 @@ void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, { HPMHooks.source.itemdb.readdb_additional_fields(itemid, it, n, source); } - if( HPMHooks.count.HP_itemdb_readdb_additional_fields_post ) { + if (HPMHooks.count.HP_itemdb_readdb_additional_fields_post > 0) { void (*postHookFunc) (int itemid, struct config_setting_t *it, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_post[hIndex].func; postHookFunc(itemid, it, n, source); } @@ -36356,14 +37507,14 @@ void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, } void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_readdb_job_sub_pre ) { + if (HPMHooks.count.HP_itemdb_readdb_job_sub_pre > 0) { void (*preHookFunc) (struct item_data **id, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_job_sub_pre[hIndex].func; preHookFunc(&id, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36371,9 +37522,9 @@ void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) { HPMHooks.source.itemdb.readdb_job_sub(id, t); } - if( HPMHooks.count.HP_itemdb_readdb_job_sub_post ) { + if (HPMHooks.count.HP_itemdb_readdb_job_sub_post > 0) { void (*postHookFunc) (struct item_data *id, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_job_sub_post[hIndex].func; postHookFunc(id, t); } @@ -36383,14 +37534,14 @@ void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_sub_pre[hIndex].func; retVal___ = preHookFunc(&it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36398,9 +37549,9 @@ int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const cha { retVal___ = HPMHooks.source.itemdb.readdb_libconfig_sub(it, n, source); } - if( HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *it, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, n, source); } @@ -36410,14 +37561,14 @@ int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const cha int HP_itemdb_readdb_libconfig(const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_pre > 0) { int (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_pre[hIndex].func; retVal___ = preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36425,9 +37576,9 @@ int HP_itemdb_readdb_libconfig(const char *filename) { { retVal___ = HPMHooks.source.itemdb.readdb_libconfig(filename); } - if( HPMHooks.count.HP_itemdb_readdb_libconfig_post ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_post > 0) { int (*postHookFunc) (int retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename); } @@ -36437,14 +37588,14 @@ int HP_itemdb_readdb_libconfig(const char *filename) { uint64 HP_itemdb_unique_id(struct map_session_data *sd) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_itemdb_unique_id_pre ) { + if (HPMHooks.count.HP_itemdb_unique_id_pre > 0) { uint64 (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36452,9 +37603,9 @@ uint64 HP_itemdb_unique_id(struct map_session_data *sd) { { retVal___ = HPMHooks.source.itemdb.unique_id(sd); } - if( HPMHooks.count.HP_itemdb_unique_id_post ) { + if (HPMHooks.count.HP_itemdb_unique_id_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) { + 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___, sd); } @@ -36463,14 +37614,14 @@ uint64 HP_itemdb_unique_id(struct map_session_data *sd) { } void HP_itemdb_read(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_pre ) { + if (HPMHooks.count.HP_itemdb_read_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_read_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36478,9 +37629,9 @@ void HP_itemdb_read(bool minimal) { { HPMHooks.source.itemdb.read(minimal); } - if( HPMHooks.count.HP_itemdb_read_post ) { + if (HPMHooks.count.HP_itemdb_read_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_post[hIndex].func; postHookFunc(minimal); } @@ -36489,14 +37640,14 @@ void HP_itemdb_read(bool minimal) { } 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 ) { + if (HPMHooks.count.HP_itemdb_destroy_item_data_pre > 0) { void (*preHookFunc) (struct item_data **self, int *free_self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36504,9 +37655,9 @@ void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) { { HPMHooks.source.itemdb.destroy_item_data(self, free_self); } - if( HPMHooks.count.HP_itemdb_destroy_item_data_post ) { + if (HPMHooks.count.HP_itemdb_destroy_item_data_post > 0) { void (*postHookFunc) (struct item_data *self, int free_self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_post; hIndex++ ) { + 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); } @@ -36516,16 +37667,16 @@ void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) { int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_final_sub_pre ) { + if (HPMHooks.count.HP_itemdb_final_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36535,9 +37686,9 @@ int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.itemdb.final_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_itemdb_final_sub_post ) { + if (HPMHooks.count.HP_itemdb_final_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_post; hIndex++ ) { + 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); @@ -36546,16 +37697,49 @@ int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { } return retVal___; } +int HP_itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_itemdb_options_final_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_options_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.options_final_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_itemdb_options_final_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_options_final_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_itemdb_clear(bool total) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_clear_pre ) { + if (HPMHooks.count.HP_itemdb_clear_pre > 0) { void (*preHookFunc) (bool *total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_clear_pre[hIndex].func; preHookFunc(&total); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36563,9 +37747,9 @@ void HP_itemdb_clear(bool total) { { HPMHooks.source.itemdb.clear(total); } - if( HPMHooks.count.HP_itemdb_clear_post ) { + if (HPMHooks.count.HP_itemdb_clear_post > 0) { void (*postHookFunc) (bool total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_clear_post[hIndex].func; postHookFunc(total); } @@ -36575,14 +37759,14 @@ void HP_itemdb_clear(bool total) { struct item_combo* HP_itemdb_id2combo(unsigned short id) { int hIndex = 0; struct item_combo* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_id2combo_pre ) { + if (HPMHooks.count.HP_itemdb_id2combo_pre > 0) { struct item_combo* (*preHookFunc) (unsigned short *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_id2combo_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36590,9 +37774,9 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { { retVal___ = HPMHooks.source.itemdb.id2combo(id); } - if( HPMHooks.count.HP_itemdb_id2combo_post ) { + if (HPMHooks.count.HP_itemdb_id2combo_post > 0) { struct item_combo* (*postHookFunc) (struct item_combo* retVal___, unsigned short id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_id2combo_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -36602,14 +37786,14 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { bool HP_itemdb_is_item_usable(struct item_data *item) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_is_item_usable_pre ) { + if (HPMHooks.count.HP_itemdb_is_item_usable_pre > 0) { bool (*preHookFunc) (struct item_data **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_pre[hIndex].func; retVal___ = preHookFunc(&item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36617,9 +37801,9 @@ bool HP_itemdb_is_item_usable(struct item_data *item) { { retVal___ = HPMHooks.source.itemdb.is_item_usable(item); } - if( HPMHooks.count.HP_itemdb_is_item_usable_post ) { + if (HPMHooks.count.HP_itemdb_is_item_usable_post > 0) { bool (*postHookFunc) (bool retVal___, struct item_data *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_post[hIndex].func; retVal___ = postHookFunc(retVal___, item); } @@ -36629,14 +37813,14 @@ bool HP_itemdb_is_item_usable(struct item_data *item) { bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_lookup_const_pre ) { + if (HPMHooks.count.HP_itemdb_lookup_const_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_lookup_const_pre[hIndex].func; retVal___ = preHookFunc(&it, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36644,27 +37828,54 @@ bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, { retVal___ = HPMHooks.source.itemdb.lookup_const(it, name, value); } - if( HPMHooks.count.HP_itemdb_lookup_const_post ) { + if (HPMHooks.count.HP_itemdb_lookup_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_lookup_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, name, value); } } return retVal___; } +bool HP_itemdb_lookup_const_mask(const struct config_setting_t *it, const char *name, int *value) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_lookup_const_mask_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_pre[hIndex].func; + retVal___ = preHookFunc(&it, &name, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.lookup_const_mask(it, name, value); + } + if (HPMHooks.count.HP_itemdb_lookup_const_mask_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, name, value); + } + } + return retVal___; +} /* libconfig_interface */ int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { + if (HPMHooks.count.HP_libconfig_read_pre > 0) { int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36672,9 +37883,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -36683,14 +37894,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { + if (HPMHooks.count.HP_libconfig_write_pre > 0) { void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36698,9 +37909,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -36709,14 +37920,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36724,9 +37935,9 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { void (*postHookFunc) (struct config_t *config, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; postHookFunc(config, options); } @@ -36736,14 +37947,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36751,9 +37962,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -36763,14 +37974,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36778,9 +37989,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -36790,14 +38001,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36805,9 +38016,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -36817,14 +38028,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36832,9 +38043,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -36843,14 +38054,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36858,9 +38069,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -36869,14 +38080,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36884,9 +38095,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -36895,14 +38106,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { + if (HPMHooks.count.HP_libconfig_init_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36910,9 +38121,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -36921,14 +38132,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36936,9 +38147,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -36948,14 +38159,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36963,26 +38174,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36990,9 +38201,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37002,14 +38213,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37017,9 +38228,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37029,14 +38240,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37044,9 +38255,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37056,14 +38267,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37071,9 +38282,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37083,14 +38294,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37098,9 +38309,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -37110,14 +38321,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37125,26 +38336,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t **setting, const char **name, long long **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37152,9 +38363,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37164,14 +38375,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37179,9 +38390,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37191,14 +38402,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37206,9 +38417,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37218,14 +38429,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37233,9 +38444,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37245,14 +38456,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37260,26 +38471,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t **setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37287,9 +38498,9 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -37299,14 +38510,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37314,9 +38525,9 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -37326,14 +38537,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37341,9 +38552,9 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -37353,14 +38564,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37368,9 +38579,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -37380,14 +38591,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37395,9 +38606,9 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, format); } @@ -37407,14 +38618,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37422,9 +38633,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37434,14 +38645,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37449,26 +38660,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t **setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37476,9 +38687,9 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -37488,14 +38699,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37503,9 +38714,9 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -37515,14 +38726,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37530,9 +38741,9 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -37542,14 +38753,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37557,9 +38768,9 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -37569,14 +38780,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37584,26 +38795,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37611,9 +38822,9 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, long long value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -37623,14 +38834,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37638,9 +38849,9 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -37650,14 +38861,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37665,9 +38876,9 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -37677,14 +38888,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37692,9 +38903,9 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx, value); } @@ -37704,14 +38915,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37719,9 +38930,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37731,14 +38942,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37746,9 +38957,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37758,14 +38969,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37773,9 +38984,9 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, idx); } @@ -37785,14 +38996,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37800,9 +39011,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -37812,14 +39023,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37827,9 +39038,9 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name, type); } @@ -37839,14 +39050,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37854,9 +39065,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -37866,14 +39077,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37881,9 +39092,9 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, idx); } @@ -37892,14 +39103,14 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37907,9 +39118,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -37919,14 +39130,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37934,9 +39145,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -37946,14 +39157,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37961,26 +39172,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t **config, const char **filepath, long long **value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37988,9 +39199,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -38000,14 +39211,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38015,9 +39226,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -38027,14 +39238,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38042,9 +39253,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -38054,14 +39265,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38069,9 +39280,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -38081,14 +39292,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38096,9 +39307,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -38107,14 +39318,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38122,9 +39333,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -38133,14 +39344,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38148,9 +39359,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -38159,14 +39370,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38174,9 +39385,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -38186,14 +39397,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38201,9 +39412,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -38213,14 +39424,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38228,9 +39439,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -38240,14 +39451,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38255,9 +39466,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -38267,14 +39478,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38282,9 +39493,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -38294,14 +39505,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38309,9 +39520,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -38321,14 +39532,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38336,9 +39547,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -38348,14 +39559,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38363,9 +39574,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -38375,14 +39586,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38390,9 +39601,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -38402,14 +39613,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38417,9 +39628,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -38429,14 +39640,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38444,9 +39655,9 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } @@ -38456,14 +39667,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38471,9 +39682,9 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, name, out, out_size); } @@ -38483,14 +39694,14 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char /* log_interface */ 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 ) { + if (HPMHooks.count.HP_logs_pick_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38498,9 +39709,9 @@ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amou { HPMHooks.source.logs.pick_pc(sd, type, amount, itm, data); } - if( HPMHooks.count.HP_logs_pick_pc_post ) { + if (HPMHooks.count.HP_logs_pick_pc_post > 0) { 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++ ) { + 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); } @@ -38509,14 +39720,14 @@ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amou } 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 ) { + if (HPMHooks.count.HP_logs_pick_mob_pre > 0) { void (*preHookFunc) (struct mob_data **md, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38524,9 +39735,9 @@ void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, str { HPMHooks.source.logs.pick_mob(md, type, amount, itm, data); } - if( HPMHooks.count.HP_logs_pick_mob_post ) { + if (HPMHooks.count.HP_logs_pick_mob_post > 0) { 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++ ) { + 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); } @@ -38535,14 +39746,14 @@ void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, str } 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 ) { + if (HPMHooks.count.HP_logs_zeny_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38550,9 +39761,9 @@ void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_ { HPMHooks.source.logs.zeny(sd, type, src_sd, amount); } - if( HPMHooks.count.HP_logs_zeny_post ) { + if (HPMHooks.count.HP_logs_zeny_post > 0) { 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++ ) { + 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); } @@ -38561,14 +39772,14 @@ void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_ } void HP_logs_npc(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_logs_npc_pre ) { + if (HPMHooks.count.HP_logs_npc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38576,9 +39787,9 @@ void HP_logs_npc(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.npc(sd, message); } - if( HPMHooks.count.HP_logs_npc_post ) { + if (HPMHooks.count.HP_logs_npc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func; postHookFunc(sd, message); } @@ -38587,14 +39798,14 @@ void HP_logs_npc(struct map_session_data *sd, const char *message) { } 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 ) { + if (HPMHooks.count.HP_logs_chat_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38602,9 +39813,9 @@ void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_acc { HPMHooks.source.logs.chat(type, type_id, src_charid, src_accid, mapname, x, y, dst_charname, message); } - if( HPMHooks.count.HP_logs_chat_post ) { + if (HPMHooks.count.HP_logs_chat_post > 0) { 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++ ) { + 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); } @@ -38613,14 +39824,14 @@ void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_acc } void HP_logs_atcommand(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_logs_atcommand_pre ) { + if (HPMHooks.count.HP_logs_atcommand_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38628,9 +39839,9 @@ void HP_logs_atcommand(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.atcommand(sd, message); } - if( HPMHooks.count.HP_logs_atcommand_post ) { + if (HPMHooks.count.HP_logs_atcommand_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func; postHookFunc(sd, message); } @@ -38639,14 +39850,14 @@ void HP_logs_atcommand(struct map_session_data *sd, const char *message) { } void HP_logs_branch(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_logs_branch_pre ) { + if (HPMHooks.count.HP_logs_branch_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38654,9 +39865,9 @@ void HP_logs_branch(struct map_session_data *sd) { { HPMHooks.source.logs.branch(sd); } - if( HPMHooks.count.HP_logs_branch_post ) { + if (HPMHooks.count.HP_logs_branch_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func; postHookFunc(sd); } @@ -38665,14 +39876,14 @@ void HP_logs_branch(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_logs_mvpdrop_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *monster_id, int **log_mvp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38680,9 +39891,9 @@ void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) { HPMHooks.source.logs.mvpdrop(sd, monster_id, log_mvp); } - if( HPMHooks.count.HP_logs_mvpdrop_post ) { + if (HPMHooks.count.HP_logs_mvpdrop_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int monster_id, int *log_mvp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_post; hIndex++ ) { + 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); } @@ -38691,14 +39902,14 @@ void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) } 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 ) { + if (HPMHooks.count.HP_logs_pick_sub_pre > 0) { void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38706,9 +39917,9 @@ void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct { HPMHooks.source.logs.pick_sub(id, m, type, amount, itm, data); } - if( HPMHooks.count.HP_logs_pick_sub_post ) { + if (HPMHooks.count.HP_logs_pick_sub_post > 0) { 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++ ) { + 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); } @@ -38717,14 +39928,14 @@ void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct } 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 ) { + if (HPMHooks.count.HP_logs_zeny_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38732,9 +39943,9 @@ void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct { HPMHooks.source.logs.zeny_sub(sd, type, src_sd, amount); } - if( HPMHooks.count.HP_logs_zeny_sub_post ) { + if (HPMHooks.count.HP_logs_zeny_sub_post > 0) { 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++ ) { + 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); } @@ -38743,14 +39954,14 @@ void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct } void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_logs_npc_sub_pre ) { + if (HPMHooks.count.HP_logs_npc_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38758,9 +39969,9 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.npc_sub(sd, message); } - if( HPMHooks.count.HP_logs_npc_sub_post ) { + if (HPMHooks.count.HP_logs_npc_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) { + 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); } @@ -38769,14 +39980,14 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { } 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 ) { + if (HPMHooks.count.HP_logs_chat_sub_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38784,9 +39995,9 @@ void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src { 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 ) { + if (HPMHooks.count.HP_logs_chat_sub_post > 0) { 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++ ) { + 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); } @@ -38795,14 +40006,14 @@ void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src } void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_logs_atcommand_sub_pre ) { + if (HPMHooks.count.HP_logs_atcommand_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38810,9 +40021,9 @@ void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.atcommand_sub(sd, message); } - if( HPMHooks.count.HP_logs_atcommand_sub_post ) { + if (HPMHooks.count.HP_logs_atcommand_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) { + 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); } @@ -38821,14 +40032,14 @@ void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { } void HP_logs_branch_sub(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_logs_branch_sub_pre ) { + if (HPMHooks.count.HP_logs_branch_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38836,9 +40047,9 @@ void HP_logs_branch_sub(struct map_session_data *sd) { { HPMHooks.source.logs.branch_sub(sd); } - if( HPMHooks.count.HP_logs_branch_sub_post ) { + if (HPMHooks.count.HP_logs_branch_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func; postHookFunc(sd); } @@ -38847,14 +40058,14 @@ void HP_logs_branch_sub(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_logs_mvpdrop_sub_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *monster_id, int **log_mvp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38862,9 +40073,9 @@ void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_m { HPMHooks.source.logs.mvpdrop_sub(sd, monster_id, log_mvp); } - if( HPMHooks.count.HP_logs_mvpdrop_sub_post ) { + if (HPMHooks.count.HP_logs_mvpdrop_sub_post > 0) { 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++ ) { + 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); } @@ -38874,14 +40085,14 @@ void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_m bool HP_logs_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_logs_config_read_pre ) { + if (HPMHooks.count.HP_logs_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38889,9 +40100,9 @@ bool HP_logs_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.logs.config_read(filename, imported); } - if( HPMHooks.count.HP_logs_config_read_post ) { + if (HPMHooks.count.HP_logs_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_post; hIndex++ ) { + 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___, filename, imported); } @@ -38900,14 +40111,14 @@ bool HP_logs_config_read(const char *filename, bool imported) { } void HP_logs_config_done(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_config_done_pre ) { + if (HPMHooks.count.HP_logs_config_done_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38915,9 +40126,9 @@ void HP_logs_config_done(void) { { HPMHooks.source.logs.config_done(); } - if( HPMHooks.count.HP_logs_config_done_post ) { + if (HPMHooks.count.HP_logs_config_done_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func; postHookFunc(); } @@ -38926,14 +40137,14 @@ void HP_logs_config_done(void) { } void HP_logs_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_init_pre ) { + if (HPMHooks.count.HP_logs_sql_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38941,9 +40152,9 @@ void HP_logs_sql_init(void) { { HPMHooks.source.logs.sql_init(); } - if( HPMHooks.count.HP_logs_sql_init_post ) { + if (HPMHooks.count.HP_logs_sql_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func; postHookFunc(); } @@ -38952,14 +40163,14 @@ void HP_logs_sql_init(void) { } void HP_logs_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_final_pre ) { + if (HPMHooks.count.HP_logs_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38967,9 +40178,9 @@ void HP_logs_sql_final(void) { { HPMHooks.source.logs.sql_final(); } - if( HPMHooks.count.HP_logs_sql_final_post ) { + if (HPMHooks.count.HP_logs_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func; postHookFunc(); } @@ -38979,14 +40190,14 @@ void HP_logs_sql_final(void) { char HP_logs_picktype2char(e_log_pick_type type) { int hIndex = 0; char retVal___ = 0; - if( HPMHooks.count.HP_logs_picktype2char_pre ) { + if (HPMHooks.count.HP_logs_picktype2char_pre > 0) { char (*preHookFunc) (e_log_pick_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38994,9 +40205,9 @@ char HP_logs_picktype2char(e_log_pick_type type) { { retVal___ = HPMHooks.source.logs.picktype2char(type); } - if( HPMHooks.count.HP_logs_picktype2char_post ) { + if (HPMHooks.count.HP_logs_picktype2char_post > 0) { char (*postHookFunc) (char retVal___, e_log_pick_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_picktype2char_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -39006,14 +40217,14 @@ char HP_logs_picktype2char(e_log_pick_type type) { char HP_logs_chattype2char(e_log_chat_type type) { int hIndex = 0; char retVal___ = 0; - if( HPMHooks.count.HP_logs_chattype2char_pre ) { + if (HPMHooks.count.HP_logs_chattype2char_pre > 0) { char (*preHookFunc) (e_log_chat_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39021,9 +40232,9 @@ char HP_logs_chattype2char(e_log_chat_type type) { { retVal___ = HPMHooks.source.logs.chattype2char(type); } - if( HPMHooks.count.HP_logs_chattype2char_post ) { + if (HPMHooks.count.HP_logs_chattype2char_post > 0) { char (*postHookFunc) (char retVal___, e_log_chat_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_chattype2char_post[hIndex].func; retVal___ = postHookFunc(retVal___, type); } @@ -39033,14 +40244,14 @@ char HP_logs_chattype2char(e_log_chat_type type) { bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_logs_should_log_item_pre ) { + if (HPMHooks.count.HP_logs_should_log_item_pre > 0) { bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39048,9 +40259,9 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat { retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); } - if( HPMHooks.count.HP_logs_should_log_item_post ) { + if (HPMHooks.count.HP_logs_should_log_item_post > 0) { 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++ ) { + 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); } @@ -39060,14 +40271,14 @@ bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_dat /* mail_interface */ void HP_mail_clear(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_mail_clear_pre ) { + if (HPMHooks.count.HP_mail_clear_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39075,9 +40286,9 @@ void HP_mail_clear(struct map_session_data *sd) { { HPMHooks.source.mail.clear(sd); } - if( HPMHooks.count.HP_mail_clear_post ) { + if (HPMHooks.count.HP_mail_clear_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func; postHookFunc(sd); } @@ -39087,14 +40298,14 @@ void HP_mail_clear(struct map_session_data *sd) { int HP_mail_removeitem(struct map_session_data *sd, short flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removeitem_pre ) { + if (HPMHooks.count.HP_mail_removeitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39102,9 +40313,9 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) { { retVal___ = HPMHooks.source.mail.removeitem(sd, flag); } - if( HPMHooks.count.HP_mail_removeitem_post ) { + if (HPMHooks.count.HP_mail_removeitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, short flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_post; hIndex++ ) { + 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); } @@ -39114,14 +40325,14 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) { int HP_mail_removezeny(struct map_session_data *sd, short flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removezeny_pre ) { + if (HPMHooks.count.HP_mail_removezeny_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39129,9 +40340,9 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) { { retVal___ = HPMHooks.source.mail.removezeny(sd, flag); } - if( HPMHooks.count.HP_mail_removezeny_post ) { + if (HPMHooks.count.HP_mail_removezeny_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, short flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_post; hIndex++ ) { + 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); } @@ -39141,14 +40352,14 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) { unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_mail_setitem_pre ) { + if (HPMHooks.count.HP_mail_setitem_pre > 0) { unsigned char (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39156,9 +40367,9 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { retVal___ = HPMHooks.source.mail.setitem(sd, idx, amount); } - if( HPMHooks.count.HP_mail_setitem_post ) { + if (HPMHooks.count.HP_mail_setitem_post > 0) { 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++ ) { + 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); } @@ -39168,14 +40379,14 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mail_setattachment_pre ) { + if (HPMHooks.count.HP_mail_setattachment_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39183,9 +40394,9 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg { retVal___ = HPMHooks.source.mail.setattachment(sd, msg); } - if( HPMHooks.count.HP_mail_setattachment_post ) { + if (HPMHooks.count.HP_mail_setattachment_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) { + 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); } @@ -39194,14 +40405,14 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg } void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_mail_getattachment_pre ) { + if (HPMHooks.count.HP_mail_getattachment_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *zeny, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39209,9 +40420,9 @@ void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *i { HPMHooks.source.mail.getattachment(sd, zeny, item); } - if( HPMHooks.count.HP_mail_getattachment_post ) { + if (HPMHooks.count.HP_mail_getattachment_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int zeny, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_getattachment_post[hIndex].func; postHookFunc(sd, zeny, item); } @@ -39221,14 +40432,14 @@ void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *i int HP_mail_openmail(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_openmail_pre ) { + if (HPMHooks.count.HP_mail_openmail_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39236,9 +40447,9 @@ int HP_mail_openmail(struct map_session_data *sd) { { retVal___ = HPMHooks.source.mail.openmail(sd); } - if( HPMHooks.count.HP_mail_openmail_post ) { + if (HPMHooks.count.HP_mail_openmail_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -39247,14 +40458,14 @@ int HP_mail_openmail(struct map_session_data *sd) { } void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mail_deliveryfail_pre ) { + if (HPMHooks.count.HP_mail_deliveryfail_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39262,9 +40473,9 @@ void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { HPMHooks.source.mail.deliveryfail(sd, msg); } - if( HPMHooks.count.HP_mail_deliveryfail_post ) { + if (HPMHooks.count.HP_mail_deliveryfail_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func; postHookFunc(sd, msg); } @@ -39274,14 +40485,14 @@ void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) bool HP_mail_invalid_operation(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mail_invalid_operation_pre ) { + if (HPMHooks.count.HP_mail_invalid_operation_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39289,399 +40500,26 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) { { retVal___ = HPMHooks.source.mail.invalid_operation(sd); } - if( HPMHooks.count.HP_mail_invalid_operation_post ) { + if (HPMHooks.count.HP_mail_invalid_operation_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) { + 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___; } -/* malloc_interface */ -void HP_iMalloc_init(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init(); - } - if( HPMHooks.count.HP_iMalloc_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_final(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.final(); - } - if( HPMHooks.count.HP_iMalloc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t num, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, num, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char **p, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char **p, size_t *size, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(&p, &size, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t size, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, size, file, line, func); - } - } - return retVal___; -} -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void **p, const char **file, int *line, const char **func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(&p, &file, &line, &func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.free(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, line, func); - } - } - return; -} -void HP_iMalloc_memory_check(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.memory_check(); - } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; - postHookFunc(); - } - } - return; -} -bool HP_iMalloc_verify_ptr(void *ptr) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void **ptr); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(&ptr); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); - } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); - } - } - return retVal___; -} -size_t HP_iMalloc_usage(void) { - int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.usage(); - } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; - retVal___ = postHookFunc(retVal___); - } - } - return retVal___; -} -void HP_iMalloc_post_shutdown(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.post_shutdown(); - } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_init_messages(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init_messages(); - } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; - postHookFunc(); - } - } - return; -} /* map_interface */ void HP_map_zone_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_init_pre ) { + if (HPMHooks.count.HP_map_zone_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39689,9 +40527,9 @@ void HP_map_zone_init(void) { { HPMHooks.source.map.zone_init(); } - if( HPMHooks.count.HP_map_zone_init_post ) { + if (HPMHooks.count.HP_map_zone_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_zone_init_post[hIndex].func; postHookFunc(); } @@ -39700,14 +40538,14 @@ void HP_map_zone_init(void) { } void HP_map_zone_remove(int m) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_remove_pre ) { + if (HPMHooks.count.HP_map_zone_remove_pre > 0) { void (*preHookFunc) (int *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39715,9 +40553,9 @@ void HP_map_zone_remove(int m) { { HPMHooks.source.map.zone_remove(m); } - if( HPMHooks.count.HP_map_zone_remove_post ) { + if (HPMHooks.count.HP_map_zone_remove_post > 0) { void (*postHookFunc) (int m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_zone_remove_post[hIndex].func; postHookFunc(m); } @@ -39726,14 +40564,14 @@ void HP_map_zone_remove(int m) { } 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 ) { + if (HPMHooks.count.HP_map_zone_apply_pre > 0) { void (*preHookFunc) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_apply_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39741,9 +40579,9 @@ void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, con { HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath); } - if( HPMHooks.count.HP_map_zone_apply_post ) { + if (HPMHooks.count.HP_map_zone_apply_post > 0) { 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++ ) { + 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); } @@ -39752,14 +40590,14 @@ void HP_map_zone_apply(int m, struct map_zone_data *zone, const char *start, con } 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 ) { + if (HPMHooks.count.HP_map_zone_change_pre > 0) { void (*preHookFunc) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39767,9 +40605,9 @@ void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, co { HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath); } - if( HPMHooks.count.HP_map_zone_change_post ) { + if (HPMHooks.count.HP_map_zone_change_post > 0) { 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++ ) { + 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); } @@ -39778,14 +40616,14 @@ void HP_map_zone_change(int m, struct map_zone_data *zone, const char *start, co } void HP_map_zone_change2(int m, struct map_zone_data *zone) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_change2_pre ) { + if (HPMHooks.count.HP_map_zone_change2_pre > 0) { void (*preHookFunc) (int *m, struct map_zone_data **zone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39793,9 +40631,9 @@ void HP_map_zone_change2(int m, struct map_zone_data *zone) { { HPMHooks.source.map.zone_change2(m, zone); } - if( HPMHooks.count.HP_map_zone_change2_post ) { + if (HPMHooks.count.HP_map_zone_change2_post > 0) { void (*postHookFunc) (int m, struct map_zone_data *zone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_change2_post; hIndex++ ) { + 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); } @@ -39805,14 +40643,14 @@ void HP_map_zone_change2(int m, struct map_zone_data *zone) { int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getcell_pre ) { + if (HPMHooks.count.HP_map_getcell_pre > 0) { int (*preHookFunc) (int16 *m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func; retVal___ = preHookFunc(&m, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39820,9 +40658,9 @@ int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_ { retVal___ = HPMHooks.source.map.getcell(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_getcell_post ) { + if (HPMHooks.count.HP_map_getcell_post > 0) { int (*postHookFunc) (int retVal___, int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_getcell_post[hIndex].func; retVal___ = postHookFunc(retVal___, m, bl, x, y, cellchk); } @@ -39831,14 +40669,14 @@ int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_ } void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { int hIndex = 0; - if( HPMHooks.count.HP_map_setgatcell_pre ) { + if (HPMHooks.count.HP_map_setgatcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39846,9 +40684,9 @@ void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { { HPMHooks.source.map.setgatcell(m, x, y, gat); } - if( HPMHooks.count.HP_map_setgatcell_post ) { + if (HPMHooks.count.HP_map_setgatcell_post > 0) { void (*postHookFunc) (int16 m, int16 x, int16 y, int gat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_post; hIndex++ ) { + 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); } @@ -39857,14 +40695,14 @@ void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { } void HP_map_cellfromcache(struct map_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_map_cellfromcache_pre ) { + if (HPMHooks.count.HP_map_cellfromcache_pre > 0) { void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39872,9 +40710,9 @@ void HP_map_cellfromcache(struct map_data *m) { { HPMHooks.source.map.cellfromcache(m); } - if( HPMHooks.count.HP_map_cellfromcache_post ) { + if (HPMHooks.count.HP_map_cellfromcache_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func; postHookFunc(m); } @@ -39883,14 +40721,14 @@ void HP_map_cellfromcache(struct map_data *m) { } void HP_map_setusers(int p1) { int hIndex = 0; - if( HPMHooks.count.HP_map_setusers_pre ) { + if (HPMHooks.count.HP_map_setusers_pre > 0) { void (*preHookFunc) (int *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39898,9 +40736,9 @@ void HP_map_setusers(int p1) { { HPMHooks.source.map.setusers(p1); } - if( HPMHooks.count.HP_map_setusers_post ) { + if (HPMHooks.count.HP_map_setusers_post > 0) { void (*postHookFunc) (int p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_setusers_post[hIndex].func; postHookFunc(p1); } @@ -39910,14 +40748,14 @@ void HP_map_setusers(int p1) { int HP_map_getusers(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getusers_pre ) { + if (HPMHooks.count.HP_map_getusers_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39925,9 +40763,9 @@ int HP_map_getusers(void) { { retVal___ = HPMHooks.source.map.getusers(); } - if( HPMHooks.count.HP_map_getusers_post ) { + if (HPMHooks.count.HP_map_getusers_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -39937,14 +40775,14 @@ int HP_map_getusers(void) { int HP_map_usercount(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_usercount_pre ) { + if (HPMHooks.count.HP_map_usercount_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39952,9 +40790,9 @@ int HP_map_usercount(void) { { retVal___ = HPMHooks.source.map.usercount(); } - if( HPMHooks.count.HP_map_usercount_post ) { + if (HPMHooks.count.HP_map_usercount_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -39964,14 +40802,14 @@ int HP_map_usercount(void) { int HP_map_freeblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_pre ) { + if (HPMHooks.count.HP_map_freeblock_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39979,9 +40817,9 @@ int HP_map_freeblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.freeblock(bl); } - if( HPMHooks.count.HP_map_freeblock_post ) { + if (HPMHooks.count.HP_map_freeblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -39991,14 +40829,14 @@ int HP_map_freeblock(struct block_list *bl) { int HP_map_freeblock_lock(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_lock_pre ) { + if (HPMHooks.count.HP_map_freeblock_lock_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40006,9 +40844,9 @@ int HP_map_freeblock_lock(void) { { retVal___ = HPMHooks.source.map.freeblock_lock(); } - if( HPMHooks.count.HP_map_freeblock_lock_post ) { + if (HPMHooks.count.HP_map_freeblock_lock_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) { + 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___); } @@ -40018,14 +40856,14 @@ int HP_map_freeblock_lock(void) { int HP_map_freeblock_unlock(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_unlock_pre ) { + if (HPMHooks.count.HP_map_freeblock_unlock_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40033,9 +40871,9 @@ int HP_map_freeblock_unlock(void) { { retVal___ = HPMHooks.source.map.freeblock_unlock(); } - if( HPMHooks.count.HP_map_freeblock_unlock_post ) { + if (HPMHooks.count.HP_map_freeblock_unlock_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) { + 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___); } @@ -40045,14 +40883,14 @@ int HP_map_freeblock_unlock(void) { int HP_map_addblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addblock_pre ) { + if (HPMHooks.count.HP_map_addblock_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40060,9 +40898,9 @@ int HP_map_addblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.addblock(bl); } - if( HPMHooks.count.HP_map_addblock_post ) { + if (HPMHooks.count.HP_map_addblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -40072,14 +40910,14 @@ int HP_map_addblock(struct block_list *bl) { int HP_map_delblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_delblock_pre ) { + if (HPMHooks.count.HP_map_delblock_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40087,9 +40925,9 @@ int HP_map_delblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.delblock(bl); } - if( HPMHooks.count.HP_map_delblock_post ) { + if (HPMHooks.count.HP_map_delblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -40099,14 +40937,14 @@ int HP_map_delblock(struct block_list *bl) { int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_moveblock_pre ) { + if (HPMHooks.count.HP_map_moveblock_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *x1, int *y1, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40114,9 +40952,9 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { { retVal___ = HPMHooks.source.map.moveblock(bl, x1, y1, tick); } - if( HPMHooks.count.HP_map_moveblock_post ) { + if (HPMHooks.count.HP_map_moveblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int x1, int y1, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) { + 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); } @@ -40126,14 +40964,14 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_count_oncell_pre ) { + if (HPMHooks.count.HP_map_count_oncell_pre > 0) { int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) { + 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, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40141,9 +40979,9 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { { retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type, flag); } - if( HPMHooks.count.HP_map_count_oncell_post ) { + if (HPMHooks.count.HP_map_count_oncell_post > 0) { int (*postHookFunc) (int retVal___, int16 m, int16 x, int16 y, int type, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_post; hIndex++ ) { + 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, flag); } @@ -40153,14 +40991,14 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { 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 ) { + if (HPMHooks.count.HP_map_find_skill_unit_oncell_pre > 0) { struct skill_unit* (*preHookFunc) (struct block_list **target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit **out_unit, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40168,9 +41006,9 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1 { 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 ) { + if (HPMHooks.count.HP_map_find_skill_unit_oncell_post > 0) { 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++ ) { + 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); } @@ -40180,14 +41018,14 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1 int HP_map_get_new_object_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_object_id_pre ) { + if (HPMHooks.count.HP_map_get_new_object_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40195,9 +41033,9 @@ int HP_map_get_new_object_id(void) { { retVal___ = HPMHooks.source.map.get_new_object_id(); } - if( HPMHooks.count.HP_map_get_new_object_id_post ) { + if (HPMHooks.count.HP_map_get_new_object_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) { + 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___); } @@ -40207,14 +41045,14 @@ int HP_map_get_new_object_id(void) { 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___ = 0; - if( HPMHooks.count.HP_map_search_freecell_pre ) { + if (HPMHooks.count.HP_map_search_freecell_pre > 0) { int (*preHookFunc) (struct block_list **src, int16 *m, int16 **x, int16 **y, int16 *rx, int16 *ry, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40222,9 +41060,9 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, { retVal___ = HPMHooks.source.map.search_freecell(src, m, x, y, rx, ry, flag); } - if( HPMHooks.count.HP_map_search_freecell_post ) { + if (HPMHooks.count.HP_map_search_freecell_post > 0) { 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++ ) { + 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); } @@ -40234,14 +41072,14 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_closest_freecell_pre ) { + if (HPMHooks.count.HP_map_closest_freecell_pre > 0) { bool (*preHookFunc) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_closest_freecell_pre[hIndex].func; retVal___ = preHookFunc(&m, &bl, &x, &y, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40249,9 +41087,9 @@ bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int { retVal___ = HPMHooks.source.map.closest_freecell(m, bl, x, y, type, flag); } - if( HPMHooks.count.HP_map_closest_freecell_post ) { + if (HPMHooks.count.HP_map_closest_freecell_post > 0) { bool (*postHookFunc) (bool retVal___, int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_closest_freecell_post[hIndex].func; retVal___ = postHookFunc(retVal___, m, bl, x, y, type, flag); } @@ -40261,14 +41099,14 @@ bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int int HP_map_quit(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_quit_pre ) { + if (HPMHooks.count.HP_map_quit_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40276,9 +41114,9 @@ int HP_map_quit(struct map_session_data *sd) { { retVal___ = HPMHooks.source.map.quit(sd); } - if( HPMHooks.count.HP_map_quit_post ) { + if (HPMHooks.count.HP_map_quit_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -40288,14 +41126,14 @@ int HP_map_quit(struct map_session_data *sd) { bool HP_map_addnpc(int16 m, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_addnpc_pre ) { + if (HPMHooks.count.HP_map_addnpc_pre > 0) { bool (*preHookFunc) (int16 *m, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40303,9 +41141,9 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) { { retVal___ = HPMHooks.source.map.addnpc(m, nd); } - if( HPMHooks.count.HP_map_addnpc_post ) { + if (HPMHooks.count.HP_map_addnpc_post > 0) { bool (*postHookFunc) (bool retVal___, int16 m, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_post; hIndex++ ) { + 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); } @@ -40315,14 +41153,14 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) { int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) { + if (HPMHooks.count.HP_map_clearflooritem_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40330,9 +41168,9 @@ int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_clearflooritem_timer_post ) { + if (HPMHooks.count.HP_map_clearflooritem_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) { + 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); } @@ -40342,14 +41180,14 @@ int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_timer_pre ) { + if (HPMHooks.count.HP_map_removemobs_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40357,9 +41195,9 @@ int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_removemobs_timer_post ) { + if (HPMHooks.count.HP_map_removemobs_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) { + 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); } @@ -40368,14 +41206,14 @@ int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_map_clearflooritem(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_map_clearflooritem_pre ) { + if (HPMHooks.count.HP_map_clearflooritem_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40383,9 +41221,9 @@ void HP_map_clearflooritem(struct block_list *bl) { { HPMHooks.source.map.clearflooritem(bl); } - if( HPMHooks.count.HP_map_clearflooritem_post ) { + if (HPMHooks.count.HP_map_clearflooritem_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_clearflooritem_post[hIndex].func; postHookFunc(bl); } @@ -40395,14 +41233,14 @@ void HP_map_clearflooritem(struct block_list *bl) { int HP_map_addflooritem(const struct block_list *bl, 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___ = 0; - if( HPMHooks.count.HP_map_addflooritem_pre ) { + if (HPMHooks.count.HP_map_addflooritem_pre > 0) { int (*preHookFunc) (const struct block_list **bl, struct item **item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func; retVal___ = preHookFunc(&bl, &item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40410,9 +41248,9 @@ int HP_map_addflooritem(const struct block_list *bl, struct item *item_data, int { retVal___ = HPMHooks.source.map.addflooritem(bl, item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); } - if( HPMHooks.count.HP_map_addflooritem_post ) { + if (HPMHooks.count.HP_map_addflooritem_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl, 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); } @@ -40421,14 +41259,14 @@ int HP_map_addflooritem(const struct block_list *bl, struct item *item_data, int } void HP_map_addnickdb(int charid, const char *nick) { int hIndex = 0; - if( HPMHooks.count.HP_map_addnickdb_pre ) { + if (HPMHooks.count.HP_map_addnickdb_pre > 0) { void (*preHookFunc) (int *charid, const char **nick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40436,9 +41274,9 @@ void HP_map_addnickdb(int charid, const char *nick) { { HPMHooks.source.map.addnickdb(charid, nick); } - if( HPMHooks.count.HP_map_addnickdb_post ) { + if (HPMHooks.count.HP_map_addnickdb_post > 0) { void (*postHookFunc) (int charid, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addnickdb_post[hIndex].func; postHookFunc(charid, nick); } @@ -40447,14 +41285,14 @@ void HP_map_addnickdb(int charid, const char *nick) { } void HP_map_delnickdb(int charid, const char *nick) { int hIndex = 0; - if( HPMHooks.count.HP_map_delnickdb_pre ) { + if (HPMHooks.count.HP_map_delnickdb_pre > 0) { void (*preHookFunc) (int *charid, const char **nick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40462,9 +41300,9 @@ void HP_map_delnickdb(int charid, const char *nick) { { HPMHooks.source.map.delnickdb(charid, nick); } - if( HPMHooks.count.HP_map_delnickdb_post ) { + if (HPMHooks.count.HP_map_delnickdb_post > 0) { void (*postHookFunc) (int charid, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_delnickdb_post[hIndex].func; postHookFunc(charid, nick); } @@ -40473,14 +41311,14 @@ void HP_map_delnickdb(int charid, const char *nick) { } void HP_map_reqnickdb(struct map_session_data *sd, int charid) { int hIndex = 0; - if( HPMHooks.count.HP_map_reqnickdb_pre ) { + if (HPMHooks.count.HP_map_reqnickdb_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40488,9 +41326,9 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) { { HPMHooks.source.map.reqnickdb(sd, charid); } - if( HPMHooks.count.HP_map_reqnickdb_post ) { + if (HPMHooks.count.HP_map_reqnickdb_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_reqnickdb_post[hIndex].func; postHookFunc(sd, charid); } @@ -40500,14 +41338,14 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) { const char* HP_map_charid2nick(int charid) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_map_charid2nick_pre ) { + if (HPMHooks.count.HP_map_charid2nick_pre > 0) { const char* (*preHookFunc) (int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40515,9 +41353,9 @@ const char* HP_map_charid2nick(int charid) { { retVal___ = HPMHooks.source.map.charid2nick(charid); } - if( HPMHooks.count.HP_map_charid2nick_post ) { + if (HPMHooks.count.HP_map_charid2nick_post > 0) { const char* (*postHookFunc) (const char* retVal___, int charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_charid2nick_post[hIndex].func; retVal___ = postHookFunc(retVal___, charid); } @@ -40527,14 +41365,14 @@ const char* HP_map_charid2nick(int charid) { 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 ) { + if (HPMHooks.count.HP_map_charid2sd_pre > 0) { struct map_session_data* (*preHookFunc) (int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40542,9 +41380,9 @@ struct map_session_data* HP_map_charid2sd(int charid) { { retVal___ = HPMHooks.source.map.charid2sd(charid); } - if( HPMHooks.count.HP_map_charid2sd_post ) { + if (HPMHooks.count.HP_map_charid2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int charid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_charid2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, charid); } @@ -40553,16 +41391,16 @@ struct map_session_data* HP_map_charid2sd(int charid) { } 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 ) { + if (HPMHooks.count.HP_map_vforeachpc_pre > 0) { void (*preHookFunc) (int ( **func ) (struct map_session_data *sd, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40572,9 +41410,9 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args) HPMHooks.source.map.vforeachpc(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachpc_post ) { + if (HPMHooks.count.HP_map_vforeachpc_post > 0) { 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++ ) { + 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); @@ -40585,16 +41423,16 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args) } 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 ) { + if (HPMHooks.count.HP_map_vforeachmob_pre > 0) { void (*preHookFunc) (int ( **func ) (struct mob_data *md, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40604,9 +41442,9 @@ void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_li HPMHooks.source.map.vforeachmob(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachmob_post ) { + if (HPMHooks.count.HP_map_vforeachmob_post > 0) { 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++ ) { + 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); @@ -40617,16 +41455,16 @@ void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_li } 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 ) { + if (HPMHooks.count.HP_map_vforeachnpc_pre > 0) { void (*preHookFunc) (int ( **func ) (struct npc_data *nd, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40636,9 +41474,9 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li HPMHooks.source.map.vforeachnpc(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachnpc_post ) { + if (HPMHooks.count.HP_map_vforeachnpc_post > 0) { 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++ ) { + 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); @@ -40649,16 +41487,16 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li } 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 ) { + if (HPMHooks.count.HP_map_vforeachregen_pre > 0) { void (*preHookFunc) (int ( **func ) (struct block_list *bl, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40668,9 +41506,9 @@ void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), v HPMHooks.source.map.vforeachregen(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachregen_post ) { + if (HPMHooks.count.HP_map_vforeachregen_post > 0) { 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++ ) { + 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); @@ -40681,16 +41519,16 @@ void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), v } 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 ) { + if (HPMHooks.count.HP_map_vforeachiddb_pre > 0) { void (*preHookFunc) (int ( **func ) (struct block_list *bl, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40700,9 +41538,9 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va HPMHooks.source.map.vforeachiddb(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachiddb_post ) { + if (HPMHooks.count.HP_map_vforeachiddb_post > 0) { 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++ ) { + 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); @@ -40714,16 +41552,16 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va 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___ = 0; - if( HPMHooks.count.HP_map_vforeachinrange_pre ) { + if (HPMHooks.count.HP_map_vforeachinrange_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) { + 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, ¢er, &range, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40733,9 +41571,9 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct retVal___ = HPMHooks.source.map.vforeachinrange(func, center, range, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforeachinrange_post ) { + if (HPMHooks.count.HP_map_vforeachinrange_post > 0) { 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++ ) { + 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); @@ -40747,16 +41585,16 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct 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___ = 0; - if( HPMHooks.count.HP_map_vforeachinshootrange_pre ) { + if (HPMHooks.count.HP_map_vforeachinshootrange_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) { + 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, ¢er, &range, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40766,9 +41604,9 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st retVal___ = HPMHooks.source.map.vforeachinshootrange(func, center, range, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforeachinshootrange_post ) { + if (HPMHooks.count.HP_map_vforeachinshootrange_post > 0) { 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++ ) { + 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); @@ -40780,16 +41618,16 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st 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___ = 0; - if( HPMHooks.count.HP_map_vforeachinarea_pre ) { + if (HPMHooks.count.HP_map_vforeachinarea_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40799,9 +41637,9 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, 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 ) { + if (HPMHooks.count.HP_map_vforeachinarea_post > 0) { 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++ ) { + 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); @@ -40813,16 +41651,16 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, 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___ = 0; - if( HPMHooks.count.HP_map_vforcountinrange_pre ) { + if (HPMHooks.count.HP_map_vforcountinrange_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *count, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) { + 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, ¢er, &range, &count, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40832,9 +41670,9 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct retVal___ = HPMHooks.source.map.vforcountinrange(func, center, range, count, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforcountinrange_post ) { + if (HPMHooks.count.HP_map_vforcountinrange_post > 0) { 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++ ) { + 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); @@ -40846,16 +41684,16 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct 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___ = 0; - if( HPMHooks.count.HP_map_vforcountinarea_pre ) { + if (HPMHooks.count.HP_map_vforcountinarea_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40865,9 +41703,9 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m 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 ) { + if (HPMHooks.count.HP_map_vforcountinarea_post > 0) { 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++ ) { + 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); @@ -40879,16 +41717,16 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m 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___ = 0; - if( HPMHooks.count.HP_map_vforeachinmovearea_pre ) { + if (HPMHooks.count.HP_map_vforeachinmovearea_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) { + 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, ¢er, &range, &dx, &dy, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40898,9 +41736,9 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru retVal___ = HPMHooks.source.map.vforeachinmovearea(func, center, range, dx, dy, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforeachinmovearea_post ) { + if (HPMHooks.count.HP_map_vforeachinmovearea_post > 0) { 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++ ) { + 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); @@ -40912,16 +41750,16 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru 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___ = 0; - if( HPMHooks.count.HP_map_vforeachincell_pre ) { + if (HPMHooks.count.HP_map_vforeachincell_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40931,9 +41769,9 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, retVal___ = HPMHooks.source.map.vforeachincell(func, m, x, y, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforeachincell_post ) { + if (HPMHooks.count.HP_map_vforeachincell_post > 0) { 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++ ) { + 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); @@ -40945,16 +41783,16 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, 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___ = 0; - if( HPMHooks.count.HP_map_vforeachinpath_pre ) { + if (HPMHooks.count.HP_map_vforeachinpath_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40964,9 +41802,9 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, 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 ) { + if (HPMHooks.count.HP_map_vforeachinpath_post > 0) { 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++ ) { + 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); @@ -40978,16 +41816,16 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinmap_pre ) { + if (HPMHooks.count.HP_map_vforeachinmap_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40997,9 +41835,9 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, retVal___ = HPMHooks.source.map.vforeachinmap(func, m, type, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachinmap_post ) { + if (HPMHooks.count.HP_map_vforeachinmap_post > 0) { 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++ ) { + 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); @@ -41011,16 +41849,16 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachininstance_pre ) { + if (HPMHooks.count.HP_map_vforeachininstance_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41030,9 +41868,9 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1 retVal___ = HPMHooks.source.map.vforeachininstance(func, instance_id, type, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_vforeachininstance_post ) { + if (HPMHooks.count.HP_map_vforeachininstance_post > 0) { 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++ ) { + 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); @@ -41044,14 +41882,14 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1 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 ) { + if (HPMHooks.count.HP_map_id2sd_pre > 0) { struct map_session_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41059,9 +41897,9 @@ struct map_session_data* HP_map_id2sd(int id) { { retVal___ = HPMHooks.source.map.id2sd(id); } - if( HPMHooks.count.HP_map_id2sd_post ) { + if (HPMHooks.count.HP_map_id2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41071,14 +41909,14 @@ struct map_session_data* HP_map_id2sd(int id) { struct npc_data* HP_map_id2nd(int id) { int hIndex = 0; struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2nd_pre ) { + if (HPMHooks.count.HP_map_id2nd_pre > 0) { struct npc_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41086,9 +41924,9 @@ struct npc_data* HP_map_id2nd(int id) { { retVal___ = HPMHooks.source.map.id2nd(id); } - if( HPMHooks.count.HP_map_id2nd_post ) { + if (HPMHooks.count.HP_map_id2nd_post > 0) { struct npc_data* (*postHookFunc) (struct npc_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2nd_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41098,14 +41936,14 @@ struct npc_data* HP_map_id2nd(int id) { struct mob_data* HP_map_id2md(int id) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2md_pre ) { + if (HPMHooks.count.HP_map_id2md_pre > 0) { struct mob_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41113,9 +41951,9 @@ struct mob_data* HP_map_id2md(int id) { { retVal___ = HPMHooks.source.map.id2md(id); } - if( HPMHooks.count.HP_map_id2md_post ) { + if (HPMHooks.count.HP_map_id2md_post > 0) { struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2md_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41125,14 +41963,14 @@ struct mob_data* HP_map_id2md(int id) { struct flooritem_data* HP_map_id2fi(int id) { int hIndex = 0; struct flooritem_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2fi_pre ) { + if (HPMHooks.count.HP_map_id2fi_pre > 0) { struct flooritem_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2fi_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41140,9 +41978,9 @@ struct flooritem_data* HP_map_id2fi(int id) { { retVal___ = HPMHooks.source.map.id2fi(id); } - if( HPMHooks.count.HP_map_id2fi_post ) { + if (HPMHooks.count.HP_map_id2fi_post > 0) { struct flooritem_data* (*postHookFunc) (struct flooritem_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2fi_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41152,14 +41990,14 @@ struct flooritem_data* HP_map_id2fi(int id) { struct chat_data* HP_map_id2cd(int id) { int hIndex = 0; struct chat_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2cd_pre ) { + if (HPMHooks.count.HP_map_id2cd_pre > 0) { struct chat_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41167,9 +42005,9 @@ struct chat_data* HP_map_id2cd(int id) { { retVal___ = HPMHooks.source.map.id2cd(id); } - if( HPMHooks.count.HP_map_id2cd_post ) { + if (HPMHooks.count.HP_map_id2cd_post > 0) { struct chat_data* (*postHookFunc) (struct chat_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2cd_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41179,14 +42017,14 @@ struct chat_data* HP_map_id2cd(int id) { struct skill_unit* HP_map_id2su(int id) { int hIndex = 0; struct skill_unit* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2su_pre ) { + if (HPMHooks.count.HP_map_id2su_pre > 0) { struct skill_unit* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2su_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41194,9 +42032,9 @@ struct skill_unit* HP_map_id2su(int id) { { retVal___ = HPMHooks.source.map.id2su(id); } - if( HPMHooks.count.HP_map_id2su_post ) { + if (HPMHooks.count.HP_map_id2su_post > 0) { struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2su_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41206,14 +42044,14 @@ struct skill_unit* HP_map_id2su(int id) { struct pet_data* HP_map_id2pd(int id) { int hIndex = 0; struct pet_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2pd_pre ) { + if (HPMHooks.count.HP_map_id2pd_pre > 0) { struct pet_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2pd_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41221,9 +42059,9 @@ struct pet_data* HP_map_id2pd(int id) { { retVal___ = HPMHooks.source.map.id2pd(id); } - if( HPMHooks.count.HP_map_id2pd_post ) { + if (HPMHooks.count.HP_map_id2pd_post > 0) { struct pet_data* (*postHookFunc) (struct pet_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2pd_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41233,14 +42071,14 @@ struct pet_data* HP_map_id2pd(int id) { struct homun_data* HP_map_id2hd(int id) { int hIndex = 0; struct homun_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2hd_pre ) { + if (HPMHooks.count.HP_map_id2hd_pre > 0) { struct homun_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41248,9 +42086,9 @@ struct homun_data* HP_map_id2hd(int id) { { retVal___ = HPMHooks.source.map.id2hd(id); } - if( HPMHooks.count.HP_map_id2hd_post ) { + if (HPMHooks.count.HP_map_id2hd_post > 0) { struct homun_data* (*postHookFunc) (struct homun_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2hd_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41260,14 +42098,14 @@ struct homun_data* HP_map_id2hd(int id) { struct mercenary_data* HP_map_id2mc(int id) { int hIndex = 0; struct mercenary_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2mc_pre ) { + if (HPMHooks.count.HP_map_id2mc_pre > 0) { struct mercenary_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41275,9 +42113,9 @@ struct mercenary_data* HP_map_id2mc(int id) { { retVal___ = HPMHooks.source.map.id2mc(id); } - if( HPMHooks.count.HP_map_id2mc_post ) { + if (HPMHooks.count.HP_map_id2mc_post > 0) { struct mercenary_data* (*postHookFunc) (struct mercenary_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2mc_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41287,14 +42125,14 @@ struct mercenary_data* HP_map_id2mc(int id) { struct elemental_data* HP_map_id2ed(int id) { int hIndex = 0; struct elemental_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2ed_pre ) { + if (HPMHooks.count.HP_map_id2ed_pre > 0) { struct elemental_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2ed_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41302,9 +42140,9 @@ struct elemental_data* HP_map_id2ed(int id) { { retVal___ = HPMHooks.source.map.id2ed(id); } - if( HPMHooks.count.HP_map_id2ed_post ) { + if (HPMHooks.count.HP_map_id2ed_post > 0) { struct elemental_data* (*postHookFunc) (struct elemental_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2ed_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41314,14 +42152,14 @@ struct elemental_data* HP_map_id2ed(int id) { struct block_list* HP_map_id2bl(int id) { int hIndex = 0; struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2bl_pre ) { + if (HPMHooks.count.HP_map_id2bl_pre > 0) { struct block_list* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41329,9 +42167,9 @@ struct block_list* HP_map_id2bl(int id) { { retVal___ = HPMHooks.source.map.id2bl(id); } - if( HPMHooks.count.HP_map_id2bl_post ) { + if (HPMHooks.count.HP_map_id2bl_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2bl_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41341,14 +42179,14 @@ struct block_list* HP_map_id2bl(int id) { bool HP_map_blid_exists(int id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_blid_exists_pre ) { + if (HPMHooks.count.HP_map_blid_exists_pre > 0) { bool (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41356,9 +42194,9 @@ bool HP_map_blid_exists(int id) { { retVal___ = HPMHooks.source.map.blid_exists(id); } - if( HPMHooks.count.HP_map_blid_exists_post ) { + if (HPMHooks.count.HP_map_blid_exists_post > 0) { bool (*postHookFunc) (bool retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_post; hIndex++ ) { + 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); } @@ -41368,14 +42206,14 @@ bool HP_map_blid_exists(int id) { int16 HP_map_mapindex2mapid(unsigned short map_index) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { + if (HPMHooks.count.HP_map_mapindex2mapid_pre > 0) { int16 (*preHookFunc) (unsigned short *map_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; retVal___ = preHookFunc(&map_index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41383,9 +42221,9 @@ int16 HP_map_mapindex2mapid(unsigned short map_index) { { retVal___ = HPMHooks.source.map.mapindex2mapid(map_index); } - if( HPMHooks.count.HP_map_mapindex2mapid_post ) { + if (HPMHooks.count.HP_map_mapindex2mapid_post > 0) { int16 (*postHookFunc) (int16 retVal___, unsigned short map_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_index); } @@ -41395,14 +42233,14 @@ int16 HP_map_mapindex2mapid(unsigned short map_index) { int16 HP_map_mapname2mapid(const char *name) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2mapid_pre ) { + if (HPMHooks.count.HP_map_mapname2mapid_pre > 0) { int16 (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41410,9 +42248,9 @@ int16 HP_map_mapname2mapid(const char *name) { { retVal___ = HPMHooks.source.map.mapname2mapid(name); } - if( HPMHooks.count.HP_map_mapname2mapid_post ) { + if (HPMHooks.count.HP_map_mapname2mapid_post > 0) { int16 (*postHookFunc) (int16 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -41422,14 +42260,14 @@ int16 HP_map_mapname2mapid(const char *name) { int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2ipport_pre ) { + if (HPMHooks.count.HP_map_mapname2ipport_pre > 0) { int (*preHookFunc) (unsigned short *name, uint32 **ip, uint16 **port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41437,9 +42275,9 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { { retVal___ = HPMHooks.source.map.mapname2ipport(name, ip, port); } - if( HPMHooks.count.HP_map_mapname2ipport_post ) { + if (HPMHooks.count.HP_map_mapname2ipport_post > 0) { int (*postHookFunc) (int retVal___, unsigned short name, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_post; hIndex++ ) { + 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); } @@ -41449,14 +42287,14 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_setipport_pre ) { + if (HPMHooks.count.HP_map_setipport_pre > 0) { int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; retVal___ = preHookFunc(&map_index, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41464,9 +42302,9 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.map.setipport(map_index, ip, port); } - if( HPMHooks.count.HP_map_setipport_post ) { + if (HPMHooks.count.HP_map_setipport_post > 0) { int (*postHookFunc) (int retVal___, unsigned short map_index, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_setipport_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_index, ip, port); } @@ -41476,14 +42314,14 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseipport_pre ) { + if (HPMHooks.count.HP_map_eraseipport_pre > 0) { int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; retVal___ = preHookFunc(&map_index, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41491,9 +42329,9 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port); } - if( HPMHooks.count.HP_map_eraseipport_post ) { + if (HPMHooks.count.HP_map_eraseipport_post > 0) { int (*postHookFunc) (int retVal___, unsigned short map_index, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_eraseipport_post[hIndex].func; retVal___ = postHookFunc(retVal___, map_index, ip, port); } @@ -41503,14 +42341,14 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { int HP_map_eraseallipport(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_pre ) { + if (HPMHooks.count.HP_map_eraseallipport_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41518,9 +42356,9 @@ int HP_map_eraseallipport(void) { { retVal___ = HPMHooks.source.map.eraseallipport(); } - if( HPMHooks.count.HP_map_eraseallipport_post ) { + if (HPMHooks.count.HP_map_eraseallipport_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -41529,14 +42367,14 @@ int HP_map_eraseallipport(void) { } void HP_map_addiddb(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_map_addiddb_pre ) { + if (HPMHooks.count.HP_map_addiddb_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41544,9 +42382,9 @@ void HP_map_addiddb(struct block_list *bl) { { HPMHooks.source.map.addiddb(bl); } - if( HPMHooks.count.HP_map_addiddb_post ) { + if (HPMHooks.count.HP_map_addiddb_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func; postHookFunc(bl); } @@ -41555,14 +42393,14 @@ void HP_map_addiddb(struct block_list *bl) { } void HP_map_deliddb(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_map_deliddb_pre ) { + if (HPMHooks.count.HP_map_deliddb_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41570,9 +42408,9 @@ void HP_map_deliddb(struct block_list *bl) { { HPMHooks.source.map.deliddb(bl); } - if( HPMHooks.count.HP_map_deliddb_post ) { + if (HPMHooks.count.HP_map_deliddb_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_deliddb_post[hIndex].func; postHookFunc(bl); } @@ -41582,14 +42420,14 @@ void HP_map_deliddb(struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_map_nick2sd_pre > 0) { struct map_session_data* (*preHookFunc) (const char **nick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41597,9 +42435,9 @@ struct map_session_data* HP_map_nick2sd(const char *nick) { { retVal___ = HPMHooks.source.map.nick2sd(nick); } - if( HPMHooks.count.HP_map_nick2sd_post ) { + if (HPMHooks.count.HP_map_nick2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, nick); } @@ -41609,14 +42447,14 @@ struct map_session_data* HP_map_nick2sd(const char *nick) { 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 ) { + if (HPMHooks.count.HP_map_getmob_boss_pre > 0) { struct mob_data* (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41624,9 +42462,9 @@ struct mob_data* HP_map_getmob_boss(int16 m) { { retVal___ = HPMHooks.source.map.getmob_boss(m); } - if( HPMHooks.count.HP_map_getmob_boss_post ) { + if (HPMHooks.count.HP_map_getmob_boss_post > 0) { struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_post; hIndex++ ) { + 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); } @@ -41636,14 +42474,14 @@ struct mob_data* HP_map_getmob_boss(int16 m) { struct mob_data* HP_map_id2boss(int id) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2boss_pre ) { + if (HPMHooks.count.HP_map_id2boss_pre > 0) { struct mob_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41651,9 +42489,9 @@ struct mob_data* HP_map_id2boss(int id) { { retVal___ = HPMHooks.source.map.id2boss(id); } - if( HPMHooks.count.HP_map_id2boss_post ) { + if (HPMHooks.count.HP_map_id2boss_post > 0) { struct mob_data* (*postHookFunc) (struct mob_data* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2boss_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -41663,14 +42501,14 @@ struct mob_data* HP_map_id2boss(int id) { uint32 HP_map_race_id2mask(int race) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_map_race_id2mask_pre ) { + if (HPMHooks.count.HP_map_race_id2mask_pre > 0) { uint32 (*preHookFunc) (int *race); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_race_id2mask_pre[hIndex].func; retVal___ = preHookFunc(&race); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41678,9 +42516,9 @@ uint32 HP_map_race_id2mask(int race) { { retVal___ = HPMHooks.source.map.race_id2mask(race); } - if( HPMHooks.count.HP_map_race_id2mask_post ) { + if (HPMHooks.count.HP_map_race_id2mask_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, int race); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_race_id2mask_post[hIndex].func; retVal___ = postHookFunc(retVal___, race); } @@ -41689,14 +42527,14 @@ uint32 HP_map_race_id2mask(int race) { } void HP_map_reloadnpc(bool clear) { int hIndex = 0; - if( HPMHooks.count.HP_map_reloadnpc_pre ) { + if (HPMHooks.count.HP_map_reloadnpc_pre > 0) { void (*preHookFunc) (bool *clear); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41704,9 +42542,9 @@ void HP_map_reloadnpc(bool clear) { { HPMHooks.source.map.reloadnpc(clear); } - if( HPMHooks.count.HP_map_reloadnpc_post ) { + if (HPMHooks.count.HP_map_reloadnpc_post > 0) { void (*postHookFunc) (bool clear); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_reloadnpc_post[hIndex].func; postHookFunc(clear); } @@ -41716,14 +42554,14 @@ void HP_map_reloadnpc(bool clear) { int HP_map_check_dir(int s_dir, int t_dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_check_dir_pre ) { + if (HPMHooks.count.HP_map_check_dir_pre > 0) { int (*preHookFunc) (int *s_dir, int *t_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41731,9 +42569,9 @@ int HP_map_check_dir(int s_dir, int t_dir) { { retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir); } - if( HPMHooks.count.HP_map_check_dir_post ) { + if (HPMHooks.count.HP_map_check_dir_post > 0) { int (*postHookFunc) (int retVal___, int s_dir, int t_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++ ) { + 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); } @@ -41743,14 +42581,14 @@ int HP_map_check_dir(int s_dir, int t_dir) { uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { int hIndex = 0; uint8 retVal___ = 0; - if( HPMHooks.count.HP_map_calc_dir_pre ) { + if (HPMHooks.count.HP_map_calc_dir_pre > 0) { uint8 (*preHookFunc) (struct block_list **src, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41758,9 +42596,9 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { { retVal___ = HPMHooks.source.map.calc_dir(src, x, y); } - if( HPMHooks.count.HP_map_calc_dir_post ) { + if (HPMHooks.count.HP_map_calc_dir_post > 0) { uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 x, int16 y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++ ) { + 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); } @@ -41770,14 +42608,14 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { int HP_map_random_dir(struct block_list *bl, short *x, short *y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_random_dir_pre ) { + if (HPMHooks.count.HP_map_random_dir_pre > 0) { int (*preHookFunc) (struct block_list **bl, short **x, short **y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41785,9 +42623,9 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) { { retVal___ = HPMHooks.source.map.random_dir(bl, x, y); } - if( HPMHooks.count.HP_map_random_dir_post ) { + if (HPMHooks.count.HP_map_random_dir_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) { + 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); } @@ -41797,16 +42635,16 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) { int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_sub_pre ) { + if (HPMHooks.count.HP_map_cleanup_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41816,9 +42654,9 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.cleanup_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_cleanup_sub_post ) { + if (HPMHooks.count.HP_map_cleanup_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) { + 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); @@ -41830,14 +42668,14 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { int HP_map_delmap(const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_delmap_pre ) { + if (HPMHooks.count.HP_map_delmap_pre > 0) { int (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41845,9 +42683,9 @@ int HP_map_delmap(const char *mapname) { { retVal___ = HPMHooks.source.map.delmap(mapname); } - if( HPMHooks.count.HP_map_delmap_post ) { + if (HPMHooks.count.HP_map_delmap_post > 0) { int (*postHookFunc) (int retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_delmap_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -41856,14 +42694,14 @@ int HP_map_delmap(const char *mapname) { } void HP_map_flags_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_flags_init_pre ) { + if (HPMHooks.count.HP_map_flags_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41871,9 +42709,9 @@ void HP_map_flags_init(void) { { HPMHooks.source.map.flags_init(); } - if( HPMHooks.count.HP_map_flags_init_post ) { + if (HPMHooks.count.HP_map_flags_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func; postHookFunc(); } @@ -41883,14 +42721,14 @@ void HP_map_flags_init(void) { 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___ = false; - if( HPMHooks.count.HP_map_iwall_set_pre ) { + if (HPMHooks.count.HP_map_iwall_set_pre > 0) { bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char **wall_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41898,9 +42736,9 @@ bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shoota { retVal___ = HPMHooks.source.map.iwall_set(m, x, y, size, dir, shootable, wall_name); } - if( HPMHooks.count.HP_map_iwall_set_post ) { + if (HPMHooks.count.HP_map_iwall_set_post > 0) { 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++ ) { + 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); } @@ -41909,14 +42747,14 @@ bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shoota } void HP_map_iwall_get(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_map_iwall_get_pre ) { + if (HPMHooks.count.HP_map_iwall_get_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41924,9 +42762,9 @@ void HP_map_iwall_get(struct map_session_data *sd) { { HPMHooks.source.map.iwall_get(sd); } - if( HPMHooks.count.HP_map_iwall_get_post ) { + if (HPMHooks.count.HP_map_iwall_get_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_iwall_get_post[hIndex].func; postHookFunc(sd); } @@ -41935,14 +42773,14 @@ void HP_map_iwall_get(struct map_session_data *sd) { } void HP_map_iwall_remove(const char *wall_name) { int hIndex = 0; - if( HPMHooks.count.HP_map_iwall_remove_pre ) { + if (HPMHooks.count.HP_map_iwall_remove_pre > 0) { void (*preHookFunc) (const char **wall_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41950,9 +42788,9 @@ void HP_map_iwall_remove(const char *wall_name) { { HPMHooks.source.map.iwall_remove(wall_name); } - if( HPMHooks.count.HP_map_iwall_remove_post ) { + if (HPMHooks.count.HP_map_iwall_remove_post > 0) { void (*postHookFunc) (const char *wall_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_post; hIndex++ ) { + 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); } @@ -41962,14 +42800,14 @@ void HP_map_iwall_remove(const char *wall_name) { int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmobtolist_pre ) { + if (HPMHooks.count.HP_map_addmobtolist_pre > 0) { int (*preHookFunc) (unsigned short *m, struct spawn_data **spawn); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41977,9 +42815,9 @@ int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { { retVal___ = HPMHooks.source.map.addmobtolist(m, spawn); } - if( HPMHooks.count.HP_map_addmobtolist_post ) { + if (HPMHooks.count.HP_map_addmobtolist_post > 0) { int (*postHookFunc) (int retVal___, unsigned short m, struct spawn_data *spawn); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_post; hIndex++ ) { + 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); } @@ -41988,14 +42826,14 @@ int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { } void HP_map_spawnmobs(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_map_spawnmobs_pre ) { + if (HPMHooks.count.HP_map_spawnmobs_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42003,9 +42841,9 @@ void HP_map_spawnmobs(int16 m) { { HPMHooks.source.map.spawnmobs(m); } - if( HPMHooks.count.HP_map_spawnmobs_post ) { + if (HPMHooks.count.HP_map_spawnmobs_post > 0) { void (*postHookFunc) (int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_spawnmobs_post[hIndex].func; postHookFunc(m); } @@ -42014,14 +42852,14 @@ void HP_map_spawnmobs(int16 m) { } void HP_map_removemobs(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemobs_pre ) { + if (HPMHooks.count.HP_map_removemobs_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42029,9 +42867,9 @@ void HP_map_removemobs(int16 m) { { HPMHooks.source.map.removemobs(m); } - if( HPMHooks.count.HP_map_removemobs_post ) { + if (HPMHooks.count.HP_map_removemobs_post > 0) { void (*postHookFunc) (int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_removemobs_post[hIndex].func; postHookFunc(m); } @@ -42040,14 +42878,14 @@ void HP_map_removemobs(int16 m) { } void HP_map_addmap2db(struct map_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_map_addmap2db_pre ) { + if (HPMHooks.count.HP_map_addmap2db_pre > 0) { void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42055,9 +42893,9 @@ void HP_map_addmap2db(struct map_data *m) { { HPMHooks.source.map.addmap2db(m); } - if( HPMHooks.count.HP_map_addmap2db_post ) { + if (HPMHooks.count.HP_map_addmap2db_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func; postHookFunc(m); } @@ -42066,14 +42904,14 @@ void HP_map_addmap2db(struct map_data *m) { } void HP_map_removemapdb(struct map_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemapdb_pre ) { + if (HPMHooks.count.HP_map_removemapdb_pre > 0) { void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42081,9 +42919,9 @@ void HP_map_removemapdb(struct map_data *m) { { HPMHooks.source.map.removemapdb(m); } - if( HPMHooks.count.HP_map_removemapdb_post ) { + if (HPMHooks.count.HP_map_removemapdb_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func; postHookFunc(m); } @@ -42092,14 +42930,14 @@ void HP_map_removemapdb(struct map_data *m) { } void HP_map_clean(int i) { int hIndex = 0; - if( HPMHooks.count.HP_map_clean_pre ) { + if (HPMHooks.count.HP_map_clean_pre > 0) { void (*preHookFunc) (int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42107,9 +42945,9 @@ void HP_map_clean(int i) { { HPMHooks.source.map.clean(i); } - if( HPMHooks.count.HP_map_clean_post ) { + if (HPMHooks.count.HP_map_clean_post > 0) { void (*postHookFunc) (int i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_clean_post[hIndex].func; postHookFunc(i); } @@ -42118,14 +42956,14 @@ void HP_map_clean(int i) { } void HP_map_do_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_do_shutdown_pre ) { + if (HPMHooks.count.HP_map_do_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42133,9 +42971,9 @@ void HP_map_do_shutdown(void) { { HPMHooks.source.map.do_shutdown(); } - if( HPMHooks.count.HP_map_do_shutdown_post ) { + if (HPMHooks.count.HP_map_do_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func; postHookFunc(); } @@ -42145,14 +42983,14 @@ void HP_map_do_shutdown(void) { int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_timer_pre ) { + if (HPMHooks.count.HP_map_freeblock_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42160,9 +42998,9 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_freeblock_timer_post ) { + if (HPMHooks.count.HP_map_freeblock_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) { + 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); } @@ -42172,14 +43010,14 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, int16 *y, int stack) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_searchrandfreecell_pre ) { + if (HPMHooks.count.HP_map_searchrandfreecell_pre > 0) { int (*preHookFunc) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *stack); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func; retVal___ = preHookFunc(&m, &bl, &x, &y, &stack); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42187,9 +43025,9 @@ int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, in { retVal___ = HPMHooks.source.map.searchrandfreecell(m, bl, x, y, stack); } - if( HPMHooks.count.HP_map_searchrandfreecell_post ) { + if (HPMHooks.count.HP_map_searchrandfreecell_post > 0) { int (*postHookFunc) (int retVal___, int16 m, const struct block_list *bl, int16 *x, int16 *y, int stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_searchrandfreecell_post[hIndex].func; retVal___ = postHookFunc(retVal___, m, bl, x, y, stack); } @@ -42199,16 +43037,16 @@ int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, in int HP_map_count_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_count_sub_pre ) { + if (HPMHooks.count.HP_map_count_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42218,9 +43056,9 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.count_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_count_sub_post ) { + if (HPMHooks.count.HP_map_count_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) { + 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); @@ -42232,16 +43070,16 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) { struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_map_create_charid2nick_pre ) { + if (HPMHooks.count.HP_map_create_charid2nick_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42251,9 +43089,9 @@ struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_create_charid2nick_post ) { + if (HPMHooks.count.HP_map_create_charid2nick_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) { + 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); @@ -42265,16 +43103,16 @@ struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_sub_pre ) { + if (HPMHooks.count.HP_map_removemobs_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42284,9 +43122,9 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.removemobs_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_removemobs_sub_post ) { + if (HPMHooks.count.HP_map_removemobs_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) { + 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); @@ -42298,14 +43136,14 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { struct mapcell HP_map_gat2cell(int gat) { int hIndex = 0; struct mapcell retVal___ = { 0 }; - if( HPMHooks.count.HP_map_gat2cell_pre ) { + if (HPMHooks.count.HP_map_gat2cell_pre > 0) { struct mapcell (*preHookFunc) (int *gat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42313,9 +43151,9 @@ struct mapcell HP_map_gat2cell(int gat) { { retVal___ = HPMHooks.source.map.gat2cell(gat); } - if( HPMHooks.count.HP_map_gat2cell_post ) { + if (HPMHooks.count.HP_map_gat2cell_post > 0) { struct mapcell (*postHookFunc) (struct mapcell retVal___, int gat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_gat2cell_post[hIndex].func; retVal___ = postHookFunc(retVal___, gat); } @@ -42325,14 +43163,14 @@ struct mapcell HP_map_gat2cell(int gat) { int HP_map_cell2gat(struct mapcell cell) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cell2gat_pre ) { + if (HPMHooks.count.HP_map_cell2gat_pre > 0) { int (*preHookFunc) (struct mapcell *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42340,9 +43178,9 @@ int HP_map_cell2gat(struct mapcell cell) { { retVal___ = HPMHooks.source.map.cell2gat(cell); } - if( HPMHooks.count.HP_map_cell2gat_post ) { + if (HPMHooks.count.HP_map_cell2gat_post > 0) { int (*postHookFunc) (int retVal___, struct mapcell cell); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_cell2gat_post[hIndex].func; retVal___ = postHookFunc(retVal___, cell); } @@ -42352,14 +43190,14 @@ int HP_map_cell2gat(struct mapcell cell) { int HP_map_getcellp(struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getcellp_pre ) { + if (HPMHooks.count.HP_map_getcellp_pre > 0) { int (*preHookFunc) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func; retVal___ = preHookFunc(&m, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42367,9 +43205,9 @@ int HP_map_getcellp(struct map_data *m, const struct block_list *bl, int16 x, in { retVal___ = HPMHooks.source.map.getcellp(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_getcellp_post ) { + if (HPMHooks.count.HP_map_getcellp_post > 0) { int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_getcellp_post[hIndex].func; retVal___ = postHookFunc(retVal___, m, bl, x, y, cellchk); } @@ -42378,14 +43216,14 @@ int HP_map_getcellp(struct map_data *m, const struct block_list *bl, int16 x, in } 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 ) { + if (HPMHooks.count.HP_map_setcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42393,9 +43231,9 @@ void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { { HPMHooks.source.map.setcell(m, x, y, cell, flag); } - if( HPMHooks.count.HP_map_setcell_post ) { + if (HPMHooks.count.HP_map_setcell_post > 0) { void (*postHookFunc) (int16 m, int16 x, int16 y, cell_t cell, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_post; hIndex++ ) { + 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); } @@ -42405,14 +43243,14 @@ void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { int HP_map_sub_getcellp(struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sub_getcellp_pre ) { + if (HPMHooks.count.HP_map_sub_getcellp_pre > 0) { int (*preHookFunc) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) { + 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, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42420,9 +43258,9 @@ int HP_map_sub_getcellp(struct map_data *m, const struct block_list *bl, int16 x { retVal___ = HPMHooks.source.map.sub_getcellp(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_sub_getcellp_post ) { + if (HPMHooks.count.HP_map_sub_getcellp_post > 0) { int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) { + 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, bl, x, y, cellchk); } @@ -42431,14 +43269,14 @@ int HP_map_sub_getcellp(struct map_data *m, const struct block_list *bl, int16 x } 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 ) { + if (HPMHooks.count.HP_map_sub_setcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42446,9 +43284,9 @@ void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { { HPMHooks.source.map.sub_setcell(m, x, y, cell, flag); } - if( HPMHooks.count.HP_map_sub_setcell_post ) { + if (HPMHooks.count.HP_map_sub_setcell_post > 0) { 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++ ) { + 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); } @@ -42457,14 +43295,14 @@ void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { } 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 ) { + if (HPMHooks.count.HP_map_iwall_nextxy_pre > 0) { void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 **x1, int16 **y1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42472,9 +43310,9 @@ void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 * { HPMHooks.source.map.iwall_nextxy(x, y, dir, pos, x1, y1); } - if( HPMHooks.count.HP_map_iwall_nextxy_post ) { + if (HPMHooks.count.HP_map_iwall_nextxy_post > 0) { 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++ ) { + 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); } @@ -42484,16 +43322,16 @@ void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 * struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) { + if (HPMHooks.count.HP_map_create_map_data_other_server_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42503,9 +43341,9 @@ struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list 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 ) { + if (HPMHooks.count.HP_map_create_map_data_other_server_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) { + 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); @@ -42517,16 +43355,16 @@ struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list args) int HP_map_eraseallipport_sub(union DBKey key, struct DBData *data, va_list va) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) { + if (HPMHooks.count.HP_map_eraseallipport_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list va); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42536,9 +43374,9 @@ int HP_map_eraseallipport_sub(union DBKey key, struct DBData *data, va_list va) retVal___ = HPMHooks.source.map.eraseallipport_sub(key, data, va___copy); va_end(va___copy); } - if( HPMHooks.count.HP_map_eraseallipport_sub_post ) { + if (HPMHooks.count.HP_map_eraseallipport_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) { + 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); @@ -42550,14 +43388,14 @@ int HP_map_eraseallipport_sub(union DBKey key, struct DBData *data, va_list va) char* HP_map_init_mapcache(FILE *fp) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_map_init_mapcache_pre ) { + if (HPMHooks.count.HP_map_init_mapcache_pre > 0) { char* (*preHookFunc) (FILE **fp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42565,9 +43403,9 @@ char* HP_map_init_mapcache(FILE *fp) { { retVal___ = HPMHooks.source.map.init_mapcache(fp); } - if( HPMHooks.count.HP_map_init_mapcache_post ) { + if (HPMHooks.count.HP_map_init_mapcache_post > 0) { char* (*postHookFunc) (char* retVal___, FILE *fp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_init_mapcache_post; hIndex++ ) { + 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); } @@ -42577,14 +43415,14 @@ char* HP_map_init_mapcache(FILE *fp) { int HP_map_readfromcache(struct map_data *m, char *buffer) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readfromcache_pre ) { + if (HPMHooks.count.HP_map_readfromcache_pre > 0) { int (*preHookFunc) (struct map_data **m, char **buffer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42592,9 +43430,9 @@ int HP_map_readfromcache(struct map_data *m, char *buffer) { { retVal___ = HPMHooks.source.map.readfromcache(m, buffer); } - if( HPMHooks.count.HP_map_readfromcache_post ) { + if (HPMHooks.count.HP_map_readfromcache_post > 0) { int (*postHookFunc) (int retVal___, struct map_data *m, char *buffer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++ ) { + 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); } @@ -42604,14 +43442,14 @@ int HP_map_readfromcache(struct map_data *m, char *buffer) { int HP_map_addmap(const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmap_pre ) { + if (HPMHooks.count.HP_map_addmap_pre > 0) { int (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42619,9 +43457,9 @@ int HP_map_addmap(const char *mapname) { { retVal___ = HPMHooks.source.map.addmap(mapname); } - if( HPMHooks.count.HP_map_addmap_post ) { + if (HPMHooks.count.HP_map_addmap_post > 0) { int (*postHookFunc) (int retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -42630,14 +43468,14 @@ int HP_map_addmap(const char *mapname) { } void HP_map_delmapid(int id) { int hIndex = 0; - if( HPMHooks.count.HP_map_delmapid_pre ) { + if (HPMHooks.count.HP_map_delmapid_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42645,9 +43483,9 @@ void HP_map_delmapid(int id) { { HPMHooks.source.map.delmapid(id); } - if( HPMHooks.count.HP_map_delmapid_post ) { + if (HPMHooks.count.HP_map_delmapid_post > 0) { void (*postHookFunc) (int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_delmapid_post[hIndex].func; postHookFunc(id); } @@ -42656,14 +43494,14 @@ void HP_map_delmapid(int id) { } void HP_map_zone_db_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_db_clear_pre ) { + if (HPMHooks.count.HP_map_zone_db_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42671,9 +43509,9 @@ void HP_map_zone_db_clear(void) { { HPMHooks.source.map.zone_db_clear(); } - if( HPMHooks.count.HP_map_zone_db_clear_post ) { + if (HPMHooks.count.HP_map_zone_db_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) { + 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(); } @@ -42682,14 +43520,14 @@ void HP_map_zone_db_clear(void) { } void HP_map_list_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_list_final_pre ) { + if (HPMHooks.count.HP_map_list_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42697,9 +43535,9 @@ void HP_map_list_final(void) { { HPMHooks.source.map.list_final(); } - if( HPMHooks.count.HP_map_list_final_post ) { + if (HPMHooks.count.HP_map_list_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func; postHookFunc(); } @@ -42709,14 +43547,14 @@ void HP_map_list_final(void) { int HP_map_waterheight(char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_waterheight_pre ) { + if (HPMHooks.count.HP_map_waterheight_pre > 0) { int (*preHookFunc) (char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42724,9 +43562,9 @@ int HP_map_waterheight(char *mapname) { { retVal___ = HPMHooks.source.map.waterheight(mapname); } - if( HPMHooks.count.HP_map_waterheight_post ) { + if (HPMHooks.count.HP_map_waterheight_post > 0) { int (*postHookFunc) (int retVal___, char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -42736,14 +43574,14 @@ int HP_map_waterheight(char *mapname) { int HP_map_readgat(struct map_data *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readgat_pre ) { + if (HPMHooks.count.HP_map_readgat_pre > 0) { int (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42751,9 +43589,9 @@ int HP_map_readgat(struct map_data *m) { { retVal___ = HPMHooks.source.map.readgat(m); } - if( HPMHooks.count.HP_map_readgat_post ) { + if (HPMHooks.count.HP_map_readgat_post > 0) { int (*postHookFunc) (int retVal___, struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func; retVal___ = postHookFunc(retVal___, m); } @@ -42763,14 +43601,14 @@ int HP_map_readgat(struct map_data *m) { int HP_map_readallmaps(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readallmaps_pre ) { + if (HPMHooks.count.HP_map_readallmaps_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42778,9 +43616,9 @@ int HP_map_readallmaps(void) { { retVal___ = HPMHooks.source.map.readallmaps(); } - if( HPMHooks.count.HP_map_readallmaps_post ) { + if (HPMHooks.count.HP_map_readallmaps_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_readallmaps_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -42790,14 +43628,14 @@ int HP_map_readallmaps(void) { bool HP_map_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_config_read_pre ) { + if (HPMHooks.count.HP_map_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42805,9 +43643,9 @@ bool HP_map_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.map.config_read(filename, imported); } - if( HPMHooks.count.HP_map_config_read_post ) { + if (HPMHooks.count.HP_map_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_post; hIndex++ ) { + 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___, filename, imported); } @@ -42817,14 +43655,14 @@ bool HP_map_config_read(const char *filename, bool imported) { bool HP_map_read_npclist(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_read_npclist_pre ) { + if (HPMHooks.count.HP_map_read_npclist_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_read_npclist_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42832,9 +43670,9 @@ bool HP_map_read_npclist(const char *filename, bool imported) { { retVal___ = HPMHooks.source.map.read_npclist(filename, imported); } - if( HPMHooks.count.HP_map_read_npclist_post ) { + if (HPMHooks.count.HP_map_read_npclist_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_read_npclist_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, imported); } @@ -42844,14 +43682,14 @@ bool HP_map_read_npclist(const char *filename, bool imported) { bool HP_map_inter_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_inter_config_read_pre ) { + if (HPMHooks.count.HP_map_inter_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_pre; hIndex++ ) { + 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(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42859,9 +43697,9 @@ bool HP_map_inter_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.map.inter_config_read(filename, imported); } - if( HPMHooks.count.HP_map_inter_config_read_post ) { + if (HPMHooks.count.HP_map_inter_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_post; hIndex++ ) { + 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___, filename, imported); } @@ -42871,14 +43709,14 @@ bool HP_map_inter_config_read(const char *filename, bool imported) { bool HP_map_inter_config_read_database_names(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_inter_config_read_database_names_pre ) { + if (HPMHooks.count.HP_map_inter_config_read_database_names_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42886,9 +43724,9 @@ bool HP_map_inter_config_read_database_names(const char *filename, const struct { retVal___ = HPMHooks.source.map.inter_config_read_database_names(filename, config, imported); } - if( HPMHooks.count.HP_map_inter_config_read_database_names_post ) { + if (HPMHooks.count.HP_map_inter_config_read_database_names_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -42898,14 +43736,14 @@ bool HP_map_inter_config_read_database_names(const char *filename, const struct bool HP_map_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_inter_config_read_connection_pre ) { + if (HPMHooks.count.HP_map_inter_config_read_connection_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42913,9 +43751,9 @@ bool HP_map_inter_config_read_connection(const char *filename, const struct conf { retVal___ = HPMHooks.source.map.inter_config_read_connection(filename, config, imported); } - if( HPMHooks.count.HP_map_inter_config_read_connection_post ) { + if (HPMHooks.count.HP_map_inter_config_read_connection_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, config, imported); } @@ -42925,14 +43763,14 @@ bool HP_map_inter_config_read_connection(const char *filename, const struct conf int HP_map_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_init_pre ) { + if (HPMHooks.count.HP_map_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42940,9 +43778,9 @@ int HP_map_sql_init(void) { { retVal___ = HPMHooks.source.map.sql_init(); } - if( HPMHooks.count.HP_map_sql_init_post ) { + if (HPMHooks.count.HP_map_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) { + 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___); } @@ -42952,14 +43790,14 @@ int HP_map_sql_init(void) { int HP_map_sql_close(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_close_pre ) { + if (HPMHooks.count.HP_map_sql_close_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42967,9 +43805,9 @@ int HP_map_sql_close(void) { { retVal___ = HPMHooks.source.map.sql_close(); } - if( HPMHooks.count.HP_map_sql_close_post ) { + if (HPMHooks.count.HP_map_sql_close_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) { + 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___); } @@ -42979,14 +43817,14 @@ int HP_map_sql_close(void) { bool HP_map_zone_mf_cache(int m, char *flag, char *params) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_zone_mf_cache_pre ) { + if (HPMHooks.count.HP_map_zone_mf_cache_pre > 0) { bool (*preHookFunc) (int *m, char **flag, char **params); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) { + 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, ¶ms); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42994,9 +43832,9 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) { { retVal___ = HPMHooks.source.map.zone_mf_cache(m, flag, params); } - if( HPMHooks.count.HP_map_zone_mf_cache_post ) { + if (HPMHooks.count.HP_map_zone_mf_cache_post > 0) { bool (*postHookFunc) (bool retVal___, int m, char *flag, char *params); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_post; hIndex++ ) { + 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); } @@ -43006,14 +43844,14 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) { unsigned short HP_map_zone_str2itemid(const char *name) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2itemid_pre ) { + if (HPMHooks.count.HP_map_zone_str2itemid_pre > 0) { unsigned short (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43021,9 +43859,9 @@ unsigned short HP_map_zone_str2itemid(const char *name) { { retVal___ = HPMHooks.source.map.zone_str2itemid(name); } - if( HPMHooks.count.HP_map_zone_str2itemid_post ) { + if (HPMHooks.count.HP_map_zone_str2itemid_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_post; hIndex++ ) { + 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); } @@ -43033,14 +43871,14 @@ unsigned short HP_map_zone_str2itemid(const char *name) { unsigned short HP_map_zone_str2skillid(const char *name) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2skillid_pre ) { + if (HPMHooks.count.HP_map_zone_str2skillid_pre > 0) { unsigned short (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43048,9 +43886,9 @@ unsigned short HP_map_zone_str2skillid(const char *name) { { retVal___ = HPMHooks.source.map.zone_str2skillid(name); } - if( HPMHooks.count.HP_map_zone_str2skillid_post ) { + if (HPMHooks.count.HP_map_zone_str2skillid_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) { + 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); } @@ -43060,14 +43898,14 @@ unsigned short HP_map_zone_str2skillid(const char *name) { enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) { int hIndex = 0; enum bl_type retVal___ = BL_NUL; - if( HPMHooks.count.HP_map_zone_bl_type_pre ) { + if (HPMHooks.count.HP_map_zone_bl_type_pre > 0) { enum bl_type (*preHookFunc) (const char **entry, enum map_zone_skill_subtype **subtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43075,9 +43913,9 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype { retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype); } - if( HPMHooks.count.HP_map_zone_bl_type_post ) { + if (HPMHooks.count.HP_map_zone_bl_type_post > 0) { 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++ ) { + 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); } @@ -43086,14 +43924,14 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype } void HP_map_read_zone_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_read_zone_db_pre ) { + if (HPMHooks.count.HP_map_read_zone_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43101,9 +43939,9 @@ void HP_map_read_zone_db(void) { { HPMHooks.source.map.read_zone_db(); } - if( HPMHooks.count.HP_map_read_zone_db_post ) { + if (HPMHooks.count.HP_map_read_zone_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) { + 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(); } @@ -43113,16 +43951,16 @@ void HP_map_read_zone_db(void) { int HP_map_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_db_final_pre ) { + if (HPMHooks.count.HP_map_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43132,9 +43970,9 @@ int HP_map_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.map.db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_db_final_post ) { + if (HPMHooks.count.HP_map_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) { + 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); @@ -43146,16 +43984,16 @@ int HP_map_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_nick_db_final_pre ) { + if (HPMHooks.count.HP_map_nick_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43165,9 +44003,9 @@ int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_map_nick_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) { + 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); @@ -43179,16 +44017,16 @@ int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list args) { int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list va) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) { + if (HPMHooks.count.HP_map_cleanup_db_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list va); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43198,9 +44036,9 @@ int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_map_cleanup_db_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) { + 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); @@ -43212,16 +44050,16 @@ int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list va) { int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_abort_sub_pre ) { + if (HPMHooks.count.HP_map_abort_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43231,9 +44069,9 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.map.abort_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_abort_sub_post ) { + if (HPMHooks.count.HP_map_abort_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) { + 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); @@ -43244,14 +44082,14 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { } void HP_map_update_cell_bl(struct block_list *bl, bool increase) { int hIndex = 0; - if( HPMHooks.count.HP_map_update_cell_bl_pre ) { + if (HPMHooks.count.HP_map_update_cell_bl_pre > 0) { void (*preHookFunc) (struct block_list **bl, bool *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_update_cell_bl_pre[hIndex].func; preHookFunc(&bl, &increase); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43259,9 +44097,9 @@ void HP_map_update_cell_bl(struct block_list *bl, bool increase) { { HPMHooks.source.map.update_cell_bl(bl, increase); } - if( HPMHooks.count.HP_map_update_cell_bl_post ) { + if (HPMHooks.count.HP_map_update_cell_bl_post > 0) { void (*postHookFunc) (struct block_list *bl, bool increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func; postHookFunc(bl, increase); } @@ -43271,14 +44109,14 @@ void HP_map_update_cell_bl(struct block_list *bl, bool increase) { int HP_map_get_new_bonus_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) { + if (HPMHooks.count.HP_map_get_new_bonus_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43286,9 +44124,9 @@ int HP_map_get_new_bonus_id(void) { { retVal___ = HPMHooks.source.map.get_new_bonus_id(); } - if( HPMHooks.count.HP_map_get_new_bonus_id_post ) { + if (HPMHooks.count.HP_map_get_new_bonus_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -43297,14 +44135,14 @@ int HP_map_get_new_bonus_id(void) { } void HP_map_add_questinfo(int m, struct questinfo *qi) { int hIndex = 0; - if( HPMHooks.count.HP_map_add_questinfo_pre ) { + if (HPMHooks.count.HP_map_add_questinfo_pre > 0) { void (*preHookFunc) (int *m, struct questinfo **qi); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func; preHookFunc(&m, &qi); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43312,9 +44150,9 @@ void HP_map_add_questinfo(int m, struct questinfo *qi) { { HPMHooks.source.map.add_questinfo(m, qi); } - if( HPMHooks.count.HP_map_add_questinfo_post ) { + if (HPMHooks.count.HP_map_add_questinfo_post > 0) { void (*postHookFunc) (int m, struct questinfo *qi); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func; postHookFunc(m, qi); } @@ -43324,14 +44162,14 @@ void HP_map_add_questinfo(int m, struct questinfo *qi) { bool HP_map_remove_questinfo(int m, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_remove_questinfo_pre ) { + if (HPMHooks.count.HP_map_remove_questinfo_pre > 0) { bool (*preHookFunc) (int *m, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func; retVal___ = preHookFunc(&m, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43339,9 +44177,9 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) { { retVal___ = HPMHooks.source.map.remove_questinfo(m, nd); } - if( HPMHooks.count.HP_map_remove_questinfo_post ) { + if (HPMHooks.count.HP_map_remove_questinfo_post > 0) { bool (*postHookFunc) (bool retVal___, int m, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_remove_questinfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, m, nd); } @@ -43351,14 +44189,14 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) { struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_zone_data *other) { int hIndex = 0; struct map_zone_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_merge_zone_pre ) { + if (HPMHooks.count.HP_map_merge_zone_pre > 0) { struct map_zone_data* (*preHookFunc) (struct map_zone_data **main, struct map_zone_data **other); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_merge_zone_pre[hIndex].func; retVal___ = preHookFunc(&main, &other); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43366,9 +44204,9 @@ struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_z { retVal___ = HPMHooks.source.map.merge_zone(main, other); } - if( HPMHooks.count.HP_map_merge_zone_post ) { + if (HPMHooks.count.HP_map_merge_zone_post > 0) { struct map_zone_data* (*postHookFunc) (struct map_zone_data* retVal___, struct map_zone_data *main, struct map_zone_data *other); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_merge_zone_post[hIndex].func; retVal___ = postHookFunc(retVal___, main, other); } @@ -43377,14 +44215,14 @@ struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_z } void HP_map_zone_clear_single(struct map_zone_data *zone) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_clear_single_pre ) { + if (HPMHooks.count.HP_map_zone_clear_single_pre > 0) { void (*preHookFunc) (struct map_zone_data **zone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_zone_clear_single_pre[hIndex].func; preHookFunc(&zone); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43392,9 +44230,9 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) { { HPMHooks.source.map.zone_clear_single(zone); } - if( HPMHooks.count.HP_map_zone_clear_single_post ) { + if (HPMHooks.count.HP_map_zone_clear_single_post > 0) { void (*postHookFunc) (struct map_zone_data *zone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_zone_clear_single_post[hIndex].func; postHookFunc(zone); } @@ -43405,14 +44243,14 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) { int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_init_pre ) { + if (HPMHooks.count.HP_mapindex_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43420,9 +44258,9 @@ int HP_mapindex_init(void) { { retVal___ = HPMHooks.source.mapindex.init(); } - if( HPMHooks.count.HP_mapindex_init_post ) { + if (HPMHooks.count.HP_mapindex_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -43431,14 +44269,14 @@ int HP_mapindex_init(void) { } void HP_mapindex_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_final_pre ) { + if (HPMHooks.count.HP_mapindex_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43446,9 +44284,9 @@ void HP_mapindex_final(void) { { HPMHooks.source.mapindex.final(); } - if( HPMHooks.count.HP_mapindex_final_post ) { + if (HPMHooks.count.HP_mapindex_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; postHookFunc(); } @@ -43458,14 +44296,14 @@ void HP_mapindex_final(void) { int HP_mapindex_addmap(int index, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_addmap_pre ) { + if (HPMHooks.count.HP_mapindex_addmap_pre > 0) { int (*preHookFunc) (int *index, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; retVal___ = preHookFunc(&index, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43473,9 +44311,9 @@ int HP_mapindex_addmap(int index, const char *name) { { retVal___ = HPMHooks.source.mapindex.addmap(index, name); } - if( HPMHooks.count.HP_mapindex_addmap_post ) { + if (HPMHooks.count.HP_mapindex_addmap_post > 0) { int (*postHookFunc) (int retVal___, int index, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; retVal___ = postHookFunc(retVal___, index, name); } @@ -43484,14 +44322,14 @@ int HP_mapindex_addmap(int index, const char *name) { } void HP_mapindex_removemap(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_removemap_pre ) { + if (HPMHooks.count.HP_mapindex_removemap_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43499,9 +44337,9 @@ void HP_mapindex_removemap(int index) { { HPMHooks.source.mapindex.removemap(index); } - if( HPMHooks.count.HP_mapindex_removemap_post ) { + if (HPMHooks.count.HP_mapindex_removemap_post > 0) { void (*postHookFunc) (int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; postHookFunc(index); } @@ -43511,14 +44349,14 @@ void HP_mapindex_removemap(int index) { const char* HP_mapindex_getmapname(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_pre ) { + if (HPMHooks.count.HP_mapindex_getmapname_pre > 0) { const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43526,9 +44364,9 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -43538,14 +44376,14 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { const char* HP_mapindex_getmapname_ext(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_pre > 0) { const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43553,9 +44391,9 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -43565,14 +44403,14 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { unsigned short HP_mapindex_name2id(const char *p1) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_mapindex_name2id_pre ) { + if (HPMHooks.count.HP_mapindex_name2id_pre > 0) { unsigned short (*preHookFunc) (const char **p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; retVal___ = preHookFunc(&p1); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43580,9 +44418,9 @@ unsigned short HP_mapindex_name2id(const char *p1) { { retVal___ = HPMHooks.source.mapindex.name2id(p1); } - if( HPMHooks.count.HP_mapindex_name2id_post ) { + if (HPMHooks.count.HP_mapindex_name2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, p1); } @@ -43592,14 +44430,14 @@ unsigned short HP_mapindex_name2id(const char *p1) { const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_id2name_pre ) { + if (HPMHooks.count.HP_mapindex_id2name_pre > 0) { const char* (*preHookFunc) (uint16 *id, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; retVal___ = preHookFunc(&id, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43607,9 +44445,9 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha { retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); } - if( HPMHooks.count.HP_mapindex_id2name_post ) { + if (HPMHooks.count.HP_mapindex_id2name_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint16 id, const char *file, int line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; retVal___ = postHookFunc(retVal___, id, file, line, func); } @@ -43619,14 +44457,14 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha bool HP_mapindex_check_default(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapindex_check_default_pre ) { + if (HPMHooks.count.HP_mapindex_check_default_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43634,9 +44472,9 @@ bool HP_mapindex_check_default(void) { { retVal___ = HPMHooks.source.mapindex.check_default(); } - if( HPMHooks.count.HP_mapindex_check_default_post ) { + if (HPMHooks.count.HP_mapindex_check_default_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -43647,14 +44485,14 @@ bool HP_mapindex_check_default(void) { 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 ) { + if (HPMHooks.count.HP_mapit_alloc_pre > 0) { struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43662,9 +44500,9 @@ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types { retVal___ = HPMHooks.source.mapit.alloc(flags, types); } - if( HPMHooks.count.HP_mapit_alloc_post ) { + if (HPMHooks.count.HP_mapit_alloc_post > 0) { 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++ ) { + 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); } @@ -43673,14 +44511,14 @@ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types } void HP_mapit_free(struct s_mapiterator *iter) { int hIndex = 0; - if( HPMHooks.count.HP_mapit_free_pre ) { + if (HPMHooks.count.HP_mapit_free_pre > 0) { void (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43688,9 +44526,9 @@ void HP_mapit_free(struct s_mapiterator *iter) { { HPMHooks.source.mapit.free(iter); } - if( HPMHooks.count.HP_mapit_free_post ) { + if (HPMHooks.count.HP_mapit_free_post > 0) { void (*postHookFunc) (struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func; postHookFunc(iter); } @@ -43700,14 +44538,14 @@ void HP_mapit_free(struct s_mapiterator *iter) { 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 ) { + if (HPMHooks.count.HP_mapit_first_pre > 0) { struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43715,9 +44553,9 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.first(iter); } - if( HPMHooks.count.HP_mapit_first_post ) { + if (HPMHooks.count.HP_mapit_first_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43727,14 +44565,14 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) { 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 ) { + if (HPMHooks.count.HP_mapit_last_pre > 0) { struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43742,9 +44580,9 @@ struct block_list* HP_mapit_last(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.last(iter); } - if( HPMHooks.count.HP_mapit_last_post ) { + if (HPMHooks.count.HP_mapit_last_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43754,14 +44592,14 @@ struct block_list* HP_mapit_last(struct s_mapiterator *iter) { 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 ) { + if (HPMHooks.count.HP_mapit_next_pre > 0) { struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43769,9 +44607,9 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.next(iter); } - if( HPMHooks.count.HP_mapit_next_post ) { + if (HPMHooks.count.HP_mapit_next_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43781,14 +44619,14 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) { 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 ) { + if (HPMHooks.count.HP_mapit_prev_pre > 0) { struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43796,9 +44634,9 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.prev(iter); } - if( HPMHooks.count.HP_mapit_prev_post ) { + if (HPMHooks.count.HP_mapit_prev_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43808,14 +44646,14 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { bool HP_mapit_exists(struct s_mapiterator *iter) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapit_exists_pre ) { + if (HPMHooks.count.HP_mapit_exists_pre > 0) { bool (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43823,9 +44661,9 @@ bool HP_mapit_exists(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.exists(iter); } - if( HPMHooks.count.HP_mapit_exists_post ) { + if (HPMHooks.count.HP_mapit_exists_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_exists_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43835,14 +44673,14 @@ bool HP_mapit_exists(struct s_mapiterator *iter) { /* mapreg_interface */ void HP_mapreg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_init_pre ) { + if (HPMHooks.count.HP_mapreg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43850,9 +44688,9 @@ void HP_mapreg_init(void) { { HPMHooks.source.mapreg.init(); } - if( HPMHooks.count.HP_mapreg_init_post ) { + if (HPMHooks.count.HP_mapreg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func; postHookFunc(); } @@ -43861,14 +44699,14 @@ void HP_mapreg_init(void) { } void HP_mapreg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_final_pre ) { + if (HPMHooks.count.HP_mapreg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43876,9 +44714,9 @@ void HP_mapreg_final(void) { { HPMHooks.source.mapreg.final(); } - if( HPMHooks.count.HP_mapreg_final_post ) { + if (HPMHooks.count.HP_mapreg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func; postHookFunc(); } @@ -43888,14 +44726,14 @@ void HP_mapreg_final(void) { int HP_mapreg_readreg(int64 uid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_readreg_pre ) { + if (HPMHooks.count.HP_mapreg_readreg_pre > 0) { int (*preHookFunc) (int64 *uid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43903,9 +44741,9 @@ int HP_mapreg_readreg(int64 uid) { { retVal___ = HPMHooks.source.mapreg.readreg(uid); } - if( HPMHooks.count.HP_mapreg_readreg_post ) { + if (HPMHooks.count.HP_mapreg_readreg_post > 0) { int (*postHookFunc) (int retVal___, int64 uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_readreg_post[hIndex].func; retVal___ = postHookFunc(retVal___, uid); } @@ -43915,14 +44753,14 @@ int HP_mapreg_readreg(int64 uid) { char* HP_mapreg_readregstr(int64 uid) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_mapreg_readregstr_pre ) { + if (HPMHooks.count.HP_mapreg_readregstr_pre > 0) { char* (*preHookFunc) (int64 *uid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43930,9 +44768,9 @@ char* HP_mapreg_readregstr(int64 uid) { { retVal___ = HPMHooks.source.mapreg.readregstr(uid); } - if( HPMHooks.count.HP_mapreg_readregstr_post ) { + if (HPMHooks.count.HP_mapreg_readregstr_post > 0) { char* (*postHookFunc) (char* retVal___, int64 uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_readregstr_post[hIndex].func; retVal___ = postHookFunc(retVal___, uid); } @@ -43942,14 +44780,14 @@ char* HP_mapreg_readregstr(int64 uid) { bool HP_mapreg_setreg(int64 uid, int val) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setreg_pre ) { + if (HPMHooks.count.HP_mapreg_setreg_pre > 0) { bool (*preHookFunc) (int64 *uid, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43957,9 +44795,9 @@ bool HP_mapreg_setreg(int64 uid, int val) { { retVal___ = HPMHooks.source.mapreg.setreg(uid, val); } - if( HPMHooks.count.HP_mapreg_setreg_post ) { + if (HPMHooks.count.HP_mapreg_setreg_post > 0) { bool (*postHookFunc) (bool retVal___, int64 uid, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) { + 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); } @@ -43969,14 +44807,14 @@ bool HP_mapreg_setreg(int64 uid, int val) { bool HP_mapreg_setregstr(int64 uid, const char *str) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setregstr_pre ) { + if (HPMHooks.count.HP_mapreg_setregstr_pre > 0) { bool (*preHookFunc) (int64 *uid, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43984,9 +44822,9 @@ bool HP_mapreg_setregstr(int64 uid, const char *str) { { retVal___ = HPMHooks.source.mapreg.setregstr(uid, str); } - if( HPMHooks.count.HP_mapreg_setregstr_post ) { + if (HPMHooks.count.HP_mapreg_setregstr_post > 0) { bool (*postHookFunc) (bool retVal___, int64 uid, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) { + 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); } @@ -43995,14 +44833,14 @@ bool HP_mapreg_setregstr(int64 uid, const char *str) { } void HP_mapreg_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_load_pre ) { + if (HPMHooks.count.HP_mapreg_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44010,9 +44848,9 @@ void HP_mapreg_load(void) { { HPMHooks.source.mapreg.load(); } - if( HPMHooks.count.HP_mapreg_load_post ) { + if (HPMHooks.count.HP_mapreg_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func; postHookFunc(); } @@ -44021,14 +44859,14 @@ void HP_mapreg_load(void) { } void HP_mapreg_save(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_save_pre ) { + if (HPMHooks.count.HP_mapreg_save_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44036,9 +44874,9 @@ void HP_mapreg_save(void) { { HPMHooks.source.mapreg.save(); } - if( HPMHooks.count.HP_mapreg_save_post ) { + if (HPMHooks.count.HP_mapreg_save_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func; postHookFunc(); } @@ -44048,14 +44886,14 @@ void HP_mapreg_save(void) { int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_save_timer_pre ) { + if (HPMHooks.count.HP_mapreg_save_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44063,9 +44901,9 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_mapreg_save_timer_post ) { + if (HPMHooks.count.HP_mapreg_save_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) { + 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); } @@ -44075,16 +44913,16 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_destroyreg_pre ) { + if (HPMHooks.count.HP_mapreg_destroyreg_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_mapreg_destroyreg_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44094,9 +44932,9 @@ int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.mapreg.destroyreg(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mapreg_destroyreg_post ) { + if (HPMHooks.count.HP_mapreg_destroyreg_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_mapreg_destroyreg_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -44107,14 +44945,14 @@ int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { } void HP_mapreg_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_reload_pre ) { + if (HPMHooks.count.HP_mapreg_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44122,9 +44960,9 @@ void HP_mapreg_reload(void) { { HPMHooks.source.mapreg.reload(); } - if( HPMHooks.count.HP_mapreg_reload_post ) { + if (HPMHooks.count.HP_mapreg_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_reload_post[hIndex].func; postHookFunc(); } @@ -44134,14 +44972,14 @@ void HP_mapreg_reload(void) { bool HP_mapreg_config_read(const char *filename, const struct config_setting_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_config_read_pre ) { + if (HPMHooks.count.HP_mapreg_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, const struct config_setting_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44149,9 +44987,9 @@ bool HP_mapreg_config_read(const char *filename, const struct config_setting_t * { retVal___ = HPMHooks.source.mapreg.config_read(filename, config, imported); } - if( HPMHooks.count.HP_mapreg_config_read_post ) { + if (HPMHooks.count.HP_mapreg_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_post; hIndex++ ) { + 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___, filename, config, imported); } @@ -44161,14 +44999,14 @@ bool HP_mapreg_config_read(const char *filename, const struct config_setting_t * /* md5_interface */ void HP_md5_string(const char *string, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_string_pre ) { + if (HPMHooks.count.HP_md5_string_pre > 0) { void (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44176,51 +45014,51 @@ void HP_md5_string(const char *string, char *output) { { HPMHooks.source.md5.string(string, output); } - if( HPMHooks.count.HP_md5_string_post ) { + if (HPMHooks.count.HP_md5_string_post > 0) { void (*postHookFunc) (const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; postHookFunc(string, output); } } return; } -void HP_md5_binary(const char *string, unsigned char *output) { +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_binary_pre ) { - void (*preHookFunc) (const char **string, unsigned char **output); + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; - preHookFunc(&string, &output); + preHookFunc(&buf, &buf_size, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.md5.binary(string, output); + HPMHooks.source.md5.binary(buf, buf_size, output); } - if( HPMHooks.count.HP_md5_binary_post ) { - void (*postHookFunc) (const char *string, unsigned char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++ ) { + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; - postHookFunc(string, output); + postHookFunc(buf, buf_size, output); } } return; } void HP_md5_salt(int len, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_md5_salt_pre ) { + if (HPMHooks.count.HP_md5_salt_pre > 0) { void (*preHookFunc) (int *len, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; preHookFunc(&len, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44228,9 +45066,9 @@ void HP_md5_salt(int len, char *output) { { HPMHooks.source.md5.salt(len, output); } - if( HPMHooks.count.HP_md5_salt_post ) { + if (HPMHooks.count.HP_md5_salt_post > 0) { void (*postHookFunc) (int len, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; postHookFunc(len, output); } @@ -44240,14 +45078,14 @@ void HP_md5_salt(int len, char *output) { /* mercenary_interface */ void HP_mercenary_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_init_pre ) { + if (HPMHooks.count.HP_mercenary_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44255,9 +45093,9 @@ void HP_mercenary_init(bool minimal) { { HPMHooks.source.mercenary.init(minimal); } - if( HPMHooks.count.HP_mercenary_init_post ) { + if (HPMHooks.count.HP_mercenary_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func; postHookFunc(minimal); } @@ -44267,14 +45105,14 @@ void HP_mercenary_init(bool minimal) { bool HP_mercenary_class(int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_class_pre ) { + if (HPMHooks.count.HP_mercenary_class_pre > 0) { bool (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44282,9 +45120,9 @@ bool HP_mercenary_class(int class_) { { retVal___ = HPMHooks.source.mercenary.class(class_); } - if( HPMHooks.count.HP_mercenary_class_post ) { + if (HPMHooks.count.HP_mercenary_class_post > 0) { bool (*postHookFunc) (bool retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_class_post[hIndex].func; retVal___ = postHookFunc(retVal___, class_); } @@ -44294,14 +45132,14 @@ bool HP_mercenary_class(int class_) { 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 ) { + if (HPMHooks.count.HP_mercenary_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44309,9 +45147,9 @@ struct view_data* HP_mercenary_get_viewdata(int class_) { { retVal___ = HPMHooks.source.mercenary.get_viewdata(class_); } - if( HPMHooks.count.HP_mercenary_get_viewdata_post ) { + if (HPMHooks.count.HP_mercenary_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_post; hIndex++ ) { + 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_); } @@ -44321,14 +45159,14 @@ struct view_data* HP_mercenary_get_viewdata(int class_) { int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_create_pre ) { + if (HPMHooks.count.HP_mercenary_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *class_, unsigned int *lifetime); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44336,9 +45174,9 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li { retVal___ = HPMHooks.source.mercenary.create(sd, class_, lifetime); } - if( HPMHooks.count.HP_mercenary_create_post ) { + if (HPMHooks.count.HP_mercenary_create_post > 0) { 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++ ) { + 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); } @@ -44348,14 +45186,14 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_data_received_pre ) { + if (HPMHooks.count.HP_mercenary_data_received_pre > 0) { int (*preHookFunc) (const struct s_mercenary **merc, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44363,9 +45201,9 @@ int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { { retVal___ = HPMHooks.source.mercenary.data_received(merc, flag); } - if( HPMHooks.count.HP_mercenary_data_received_post ) { + if (HPMHooks.count.HP_mercenary_data_received_post > 0) { int (*postHookFunc) (int retVal___, const struct s_mercenary *merc, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) { + 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); } @@ -44375,14 +45213,14 @@ int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { int HP_mercenary_save(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_save_pre ) { + if (HPMHooks.count.HP_mercenary_save_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44390,9 +45228,9 @@ int HP_mercenary_save(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.save(md); } - if( HPMHooks.count.HP_mercenary_save_post ) { + if (HPMHooks.count.HP_mercenary_save_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44401,14 +45239,14 @@ int HP_mercenary_save(struct mercenary_data *md) { } void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_heal_pre ) { + if (HPMHooks.count.HP_mercenary_heal_pre > 0) { void (*preHookFunc) (struct mercenary_data **md, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44416,9 +45254,9 @@ void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { { HPMHooks.source.mercenary.heal(md, hp, sp); } - if( HPMHooks.count.HP_mercenary_heal_post ) { + if (HPMHooks.count.HP_mercenary_heal_post > 0) { void (*postHookFunc) (struct mercenary_data *md, int hp, int sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_heal_post[hIndex].func; postHookFunc(md, hp, sp); } @@ -44428,14 +45266,14 @@ void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { int HP_mercenary_dead(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_dead_pre ) { + if (HPMHooks.count.HP_mercenary_dead_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44443,9 +45281,9 @@ int HP_mercenary_dead(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.dead(md); } - if( HPMHooks.count.HP_mercenary_dead_post ) { + if (HPMHooks.count.HP_mercenary_dead_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44455,14 +45293,14 @@ int HP_mercenary_dead(struct mercenary_data *md) { int HP_mercenary_delete(struct mercenary_data *md, int reply) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_delete_pre ) { + if (HPMHooks.count.HP_mercenary_delete_pre > 0) { int (*preHookFunc) (struct mercenary_data **md, int *reply); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44470,9 +45308,9 @@ int HP_mercenary_delete(struct mercenary_data *md, int reply) { { retVal___ = HPMHooks.source.mercenary.delete(md, reply); } - if( HPMHooks.count.HP_mercenary_delete_post ) { + if (HPMHooks.count.HP_mercenary_delete_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md, int reply); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_post; hIndex++ ) { + 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); } @@ -44481,14 +45319,14 @@ int HP_mercenary_delete(struct mercenary_data *md, int reply) { } void HP_mercenary_contract_stop(struct mercenary_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_contract_stop_pre ) { + if (HPMHooks.count.HP_mercenary_contract_stop_pre > 0) { void (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44496,9 +45334,9 @@ void HP_mercenary_contract_stop(struct mercenary_data *md) { { HPMHooks.source.mercenary.contract_stop(md); } - if( HPMHooks.count.HP_mercenary_contract_stop_post ) { + if (HPMHooks.count.HP_mercenary_contract_stop_post > 0) { void (*postHookFunc) (struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func; postHookFunc(md); } @@ -44508,14 +45346,14 @@ void HP_mercenary_contract_stop(struct mercenary_data *md) { int HP_mercenary_get_lifetime(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) { + if (HPMHooks.count.HP_mercenary_get_lifetime_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44523,9 +45361,9 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_lifetime(md); } - if( HPMHooks.count.HP_mercenary_get_lifetime_post ) { + if (HPMHooks.count.HP_mercenary_get_lifetime_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) { + 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); } @@ -44535,14 +45373,14 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) { int HP_mercenary_get_guild(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_guild_pre ) { + if (HPMHooks.count.HP_mercenary_get_guild_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44550,9 +45388,9 @@ int HP_mercenary_get_guild(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_guild(md); } - if( HPMHooks.count.HP_mercenary_get_guild_post ) { + if (HPMHooks.count.HP_mercenary_get_guild_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) { + 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); } @@ -44562,14 +45400,14 @@ int HP_mercenary_get_guild(struct mercenary_data *md) { int HP_mercenary_get_faith(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_faith_pre ) { + if (HPMHooks.count.HP_mercenary_get_faith_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44577,9 +45415,9 @@ int HP_mercenary_get_faith(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_faith(md); } - if( HPMHooks.count.HP_mercenary_get_faith_post ) { + if (HPMHooks.count.HP_mercenary_get_faith_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) { + 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); } @@ -44589,14 +45427,14 @@ int HP_mercenary_get_faith(struct mercenary_data *md) { int HP_mercenary_set_faith(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_faith_pre ) { + if (HPMHooks.count.HP_mercenary_set_faith_pre > 0) { int (*preHookFunc) (struct mercenary_data **md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44604,9 +45442,9 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) { { retVal___ = HPMHooks.source.mercenary.set_faith(md, value); } - if( HPMHooks.count.HP_mercenary_set_faith_post ) { + if (HPMHooks.count.HP_mercenary_set_faith_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_post; hIndex++ ) { + 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); } @@ -44616,14 +45454,14 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) { int HP_mercenary_get_calls(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_calls_pre ) { + if (HPMHooks.count.HP_mercenary_get_calls_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44631,9 +45469,9 @@ int HP_mercenary_get_calls(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_calls(md); } - if( HPMHooks.count.HP_mercenary_get_calls_post ) { + if (HPMHooks.count.HP_mercenary_get_calls_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) { + 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); } @@ -44643,14 +45481,14 @@ int HP_mercenary_get_calls(struct mercenary_data *md) { int HP_mercenary_set_calls(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_calls_pre ) { + if (HPMHooks.count.HP_mercenary_set_calls_pre > 0) { int (*preHookFunc) (struct mercenary_data **md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44658,9 +45496,9 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) { { retVal___ = HPMHooks.source.mercenary.set_calls(md, value); } - if( HPMHooks.count.HP_mercenary_set_calls_post ) { + if (HPMHooks.count.HP_mercenary_set_calls_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_post; hIndex++ ) { + 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); } @@ -44670,14 +45508,14 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) { int HP_mercenary_kills(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_kills_pre ) { + if (HPMHooks.count.HP_mercenary_kills_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44685,9 +45523,9 @@ int HP_mercenary_kills(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.kills(md); } - if( HPMHooks.count.HP_mercenary_kills_post ) { + if (HPMHooks.count.HP_mercenary_kills_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44697,14 +45535,14 @@ int HP_mercenary_kills(struct mercenary_data *md) { int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_checkskill_pre ) { + if (HPMHooks.count.HP_mercenary_checkskill_pre > 0) { int (*preHookFunc) (struct mercenary_data **md, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44712,9 +45550,9 @@ int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { { retVal___ = HPMHooks.source.mercenary.checkskill(md, skill_id); } - if( HPMHooks.count.HP_mercenary_checkskill_post ) { + if (HPMHooks.count.HP_mercenary_checkskill_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_post; hIndex++ ) { + 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); } @@ -44724,14 +45562,14 @@ int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { int HP_mercenary_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_db_pre ) { + if (HPMHooks.count.HP_mercenary_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44739,9 +45577,9 @@ int HP_mercenary_read_db(void) { { retVal___ = HPMHooks.source.mercenary.read_db(); } - if( HPMHooks.count.HP_mercenary_read_db_post ) { + if (HPMHooks.count.HP_mercenary_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) { + 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___); } @@ -44751,14 +45589,14 @@ int HP_mercenary_read_db(void) { int HP_mercenary_read_skilldb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) { + if (HPMHooks.count.HP_mercenary_read_skilldb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44766,9 +45604,9 @@ int HP_mercenary_read_skilldb(void) { { retVal___ = HPMHooks.source.mercenary.read_skilldb(); } - if( HPMHooks.count.HP_mercenary_read_skilldb_post ) { + if (HPMHooks.count.HP_mercenary_read_skilldb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) { + 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___); } @@ -44778,14 +45616,14 @@ int HP_mercenary_read_skilldb(void) { int HP_mercenary_killbonus(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_killbonus_pre ) { + if (HPMHooks.count.HP_mercenary_killbonus_pre > 0) { int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44793,9 +45631,9 @@ int HP_mercenary_killbonus(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.killbonus(md); } - if( HPMHooks.count.HP_mercenary_killbonus_post ) { + if (HPMHooks.count.HP_mercenary_killbonus_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44805,14 +45643,14 @@ int HP_mercenary_killbonus(struct mercenary_data *md) { int HP_mercenary_search_index(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_search_index_pre ) { + if (HPMHooks.count.HP_mercenary_search_index_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44820,9 +45658,9 @@ int HP_mercenary_search_index(int class_) { { retVal___ = HPMHooks.source.mercenary.search_index(class_); } - if( HPMHooks.count.HP_mercenary_search_index_post ) { + if (HPMHooks.count.HP_mercenary_search_index_post > 0) { int (*postHookFunc) (int retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_post; hIndex++ ) { + 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_); } @@ -44832,14 +45670,14 @@ int HP_mercenary_search_index(int class_) { int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) { + if (HPMHooks.count.HP_mercenary_contract_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44847,9 +45685,9 @@ int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { retVal___ = HPMHooks.source.mercenary.contract_end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_mercenary_contract_end_timer_post ) { + if (HPMHooks.count.HP_mercenary_contract_end_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) { + 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); } @@ -44859,14 +45697,14 @@ int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) { + if (HPMHooks.count.HP_mercenary_read_db_sub_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44874,9 +45712,9 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.mercenary.read_db_sub(str, columns, current); } - if( HPMHooks.count.HP_mercenary_read_db_sub_post ) { + if (HPMHooks.count.HP_mercenary_read_db_sub_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_post; hIndex++ ) { + 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); } @@ -44886,14 +45724,14 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) { + if (HPMHooks.count.HP_mercenary_read_skill_db_sub_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44901,9 +45739,9 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.mercenary.read_skill_db_sub(str, columns, current); } - if( HPMHooks.count.HP_mercenary_read_skill_db_sub_post ) { + if (HPMHooks.count.HP_mercenary_read_skill_db_sub_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_post; hIndex++ ) { + 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); } @@ -44914,14 +45752,14 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { int HP_mob_init(bool mimimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_init_pre ) { + if (HPMHooks.count.HP_mob_init_pre > 0) { int (*preHookFunc) (bool *mimimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func; retVal___ = preHookFunc(&mimimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44929,9 +45767,9 @@ int HP_mob_init(bool mimimal) { { retVal___ = HPMHooks.source.mob.init(mimimal); } - if( HPMHooks.count.HP_mob_init_post ) { + if (HPMHooks.count.HP_mob_init_post > 0) { int (*postHookFunc) (int retVal___, bool mimimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, mimimal); } @@ -44941,14 +45779,14 @@ int HP_mob_init(bool mimimal) { int HP_mob_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_final_pre ) { + if (HPMHooks.count.HP_mob_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44956,9 +45794,9 @@ int HP_mob_final(void) { { retVal___ = HPMHooks.source.mob.final(); } - if( HPMHooks.count.HP_mob_final_post ) { + if (HPMHooks.count.HP_mob_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -44967,14 +45805,14 @@ int HP_mob_final(void) { } void HP_mob_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_reload_pre ) { + if (HPMHooks.count.HP_mob_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44982,9 +45820,9 @@ void HP_mob_reload(void) { { HPMHooks.source.mob.reload(); } - if( HPMHooks.count.HP_mob_reload_post ) { + if (HPMHooks.count.HP_mob_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func; postHookFunc(); } @@ -44994,14 +45832,14 @@ void HP_mob_reload(void) { struct mob_db* HP_mob_db(int index) { int hIndex = 0; struct mob_db* retVal___ = NULL; - if( HPMHooks.count.HP_mob_db_pre ) { + if (HPMHooks.count.HP_mob_db_pre > 0) { struct mob_db* (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45009,9 +45847,9 @@ struct mob_db* HP_mob_db(int index) { { retVal___ = HPMHooks.source.mob.db(index); } - if( HPMHooks.count.HP_mob_db_post ) { + if (HPMHooks.count.HP_mob_db_post > 0) { struct mob_db* (*postHookFunc) (struct mob_db* retVal___, int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_db_post[hIndex].func; retVal___ = postHookFunc(retVal___, index); } @@ -45021,14 +45859,14 @@ struct mob_db* HP_mob_db(int index) { struct mob_chat* HP_mob_chat(short id) { int hIndex = 0; struct mob_chat* retVal___ = NULL; - if( HPMHooks.count.HP_mob_chat_pre ) { + if (HPMHooks.count.HP_mob_chat_pre > 0) { struct mob_chat* (*preHookFunc) (short *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45036,9 +45874,9 @@ struct mob_chat* HP_mob_chat(short id) { { retVal___ = HPMHooks.source.mob.chat(id); } - if( HPMHooks.count.HP_mob_chat_post ) { + if (HPMHooks.count.HP_mob_chat_post > 0) { struct mob_chat* (*postHookFunc) (struct mob_chat* retVal___, short id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_chat_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -45048,14 +45886,14 @@ struct mob_chat* HP_mob_chat(short id) { int HP_mob_makedummymobdb(int p1) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_makedummymobdb_pre ) { + if (HPMHooks.count.HP_mob_makedummymobdb_pre > 0) { int (*preHookFunc) (int *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45063,9 +45901,9 @@ int HP_mob_makedummymobdb(int p1) { { retVal___ = HPMHooks.source.mob.makedummymobdb(p1); } - if( HPMHooks.count.HP_mob_makedummymobdb_post ) { + if (HPMHooks.count.HP_mob_makedummymobdb_post > 0) { int (*postHookFunc) (int retVal___, int p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_makedummymobdb_post[hIndex].func; retVal___ = postHookFunc(retVal___, p1); } @@ -45075,14 +45913,14 @@ int HP_mob_makedummymobdb(int p1) { int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) { + if (HPMHooks.count.HP_mob_spawn_guardian_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45090,9 +45928,9 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.spawn_guardian_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_spawn_guardian_sub_post ) { + if (HPMHooks.count.HP_mob_spawn_guardian_sub_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) { + 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); } @@ -45102,14 +45940,14 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) { + if (HPMHooks.count.HP_mob_skill_id2skill_idx_pre > 0) { int (*preHookFunc) (int *class_, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45117,9 +45955,9 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { { retVal___ = HPMHooks.source.mob.skill_id2skill_idx(class_, skill_id); } - if( HPMHooks.count.HP_mob_skill_id2skill_idx_post ) { + if (HPMHooks.count.HP_mob_skill_id2skill_idx_post > 0) { int (*postHookFunc) (int retVal___, int class_, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_post; hIndex++ ) { + 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); } @@ -45129,14 +45967,14 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { int HP_mob_db_searchname(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_pre ) { + if (HPMHooks.count.HP_mob_db_searchname_pre > 0) { int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45144,9 +45982,9 @@ int HP_mob_db_searchname(const char *str) { { retVal___ = HPMHooks.source.mob.db_searchname(str); } - if( HPMHooks.count.HP_mob_db_searchname_post ) { + if (HPMHooks.count.HP_mob_db_searchname_post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) { + 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); } @@ -45156,14 +45994,14 @@ int HP_mob_db_searchname(const char *str) { int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { + if (HPMHooks.count.HP_mob_db_searchname_array_sub_pre > 0) { int (*preHookFunc) (struct mob_db **monster, const char **str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { + 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(&monster, &str, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45171,9 +46009,9 @@ int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int { retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag); } - if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { + if (HPMHooks.count.HP_mob_db_searchname_array_sub_post > 0) { int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { + 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___, monster, str, flag); } @@ -45182,14 +46020,14 @@ int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int } 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 ) { + if (HPMHooks.count.HP_mob_mvptomb_create_pre > 0) { void (*preHookFunc) (struct mob_data **md, char **killer, time_t *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45197,9 +46035,9 @@ void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { { HPMHooks.source.mob.mvptomb_create(md, killer, time); } - if( HPMHooks.count.HP_mob_mvptomb_create_post ) { + if (HPMHooks.count.HP_mob_mvptomb_create_post > 0) { void (*postHookFunc) (struct mob_data *md, char *killer, time_t time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_post; hIndex++ ) { + 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); } @@ -45208,14 +46046,14 @@ void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { } void HP_mob_mvptomb_destroy(struct mob_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_mob_mvptomb_destroy_pre ) { + if (HPMHooks.count.HP_mob_mvptomb_destroy_pre > 0) { void (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45223,9 +46061,9 @@ void HP_mob_mvptomb_destroy(struct mob_data *md) { { HPMHooks.source.mob.mvptomb_destroy(md); } - if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) { + if (HPMHooks.count.HP_mob_mvptomb_destroy_post > 0) { void (*postHookFunc) (struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func; postHookFunc(md); } @@ -45235,14 +46073,14 @@ void HP_mob_mvptomb_destroy(struct mob_data *md) { int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_pre ) { + if (HPMHooks.count.HP_mob_db_searchname_array_pre > 0) { int (*preHookFunc) (struct mob_db ***data, int *size, const char **str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45250,9 +46088,9 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, { retVal___ = HPMHooks.source.mob.db_searchname_array(data, size, str, flag); } - if( HPMHooks.count.HP_mob_db_searchname_array_post ) { + if (HPMHooks.count.HP_mob_db_searchname_array_post > 0) { 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++ ) { + 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); } @@ -45262,14 +46100,14 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int HP_mob_db_checkid(const int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_checkid_pre ) { + if (HPMHooks.count.HP_mob_db_checkid_pre > 0) { int (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45277,9 +46115,9 @@ int HP_mob_db_checkid(const int id) { { retVal___ = HPMHooks.source.mob.db_checkid(id); } - if( HPMHooks.count.HP_mob_db_checkid_post ) { + if (HPMHooks.count.HP_mob_db_checkid_post > 0) { int (*postHookFunc) (int retVal___, const int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_post; hIndex++ ) { + 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); } @@ -45289,14 +46127,14 @@ int HP_mob_db_checkid(const int id) { 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 ) { + if (HPMHooks.count.HP_mob_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45304,9 +46142,9 @@ struct view_data* HP_mob_get_viewdata(int class_) { { retVal___ = HPMHooks.source.mob.get_viewdata(class_); } - if( HPMHooks.count.HP_mob_get_viewdata_post ) { + if (HPMHooks.count.HP_mob_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_post; hIndex++ ) { + 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_); } @@ -45316,14 +46154,14 @@ struct view_data* HP_mob_get_viewdata(int class_) { int HP_mob_parse_dataset(struct spawn_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_parse_dataset_pre ) { + if (HPMHooks.count.HP_mob_parse_dataset_pre > 0) { int (*preHookFunc) (struct spawn_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45331,9 +46169,9 @@ int HP_mob_parse_dataset(struct spawn_data *data) { { retVal___ = HPMHooks.source.mob.parse_dataset(data); } - if( HPMHooks.count.HP_mob_parse_dataset_post ) { + if (HPMHooks.count.HP_mob_parse_dataset_post > 0) { int (*postHookFunc) (int retVal___, struct spawn_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) { + 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); } @@ -45343,14 +46181,14 @@ int HP_mob_parse_dataset(struct spawn_data *data) { 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 ) { + if (HPMHooks.count.HP_mob_spawn_dataset_pre > 0) { struct mob_data* (*preHookFunc) (struct spawn_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45358,9 +46196,9 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { { retVal___ = HPMHooks.source.mob.spawn_dataset(data); } - if( HPMHooks.count.HP_mob_spawn_dataset_post ) { + if (HPMHooks.count.HP_mob_spawn_dataset_post > 0) { struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++ ) { + 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); } @@ -45370,14 +46208,14 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { int HP_mob_get_random_id(int type, int flag, int lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_get_random_id_pre ) { + if (HPMHooks.count.HP_mob_get_random_id_pre > 0) { int (*preHookFunc) (int *type, int *flag, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45385,9 +46223,9 @@ int HP_mob_get_random_id(int type, int flag, int lv) { { retVal___ = HPMHooks.source.mob.get_random_id(type, flag, lv); } - if( HPMHooks.count.HP_mob_get_random_id_post ) { + if (HPMHooks.count.HP_mob_get_random_id_post > 0) { int (*postHookFunc) (int retVal___, int type, int flag, int lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_post; hIndex++ ) { + 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); } @@ -45397,14 +46235,14 @@ int HP_mob_get_random_id(int type, int flag, int lv) { bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_ksprotected_pre ) { + if (HPMHooks.count.HP_mob_ksprotected_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45412,9 +46250,9 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { { retVal___ = HPMHooks.source.mob.ksprotected(src, target); } - if( HPMHooks.count.HP_mob_ksprotected_post ) { + if (HPMHooks.count.HP_mob_ksprotected_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) { + 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); } @@ -45424,14 +46262,14 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { 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 ) { + if (HPMHooks.count.HP_mob_once_spawn_sub_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45439,9 +46277,9 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, { 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 ) { + if (HPMHooks.count.HP_mob_once_spawn_sub_post > 0) { 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++ ) { + 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); } @@ -45451,14 +46289,14 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, 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___ = 0; - if( HPMHooks.count.HP_mob_once_spawn_pre ) { + if (HPMHooks.count.HP_mob_once_spawn_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45466,9 +46304,9 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co { retVal___ = HPMHooks.source.mob.once_spawn(sd, m, x, y, mobname, class_, amount, event, size, ai); } - if( HPMHooks.count.HP_mob_once_spawn_post ) { + if (HPMHooks.count.HP_mob_once_spawn_post > 0) { 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++ ) { + 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); } @@ -45478,14 +46316,14 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co 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___ = 0; - if( HPMHooks.count.HP_mob_once_spawn_area_pre ) { + if (HPMHooks.count.HP_mob_once_spawn_area_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45493,9 +46331,9 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 { 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 ) { + if (HPMHooks.count.HP_mob_once_spawn_area_post > 0) { 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++ ) { + 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); } @@ -45505,14 +46343,14 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 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___ = 0; - if( HPMHooks.count.HP_mob_spawn_guardian_pre ) { + if (HPMHooks.count.HP_mob_spawn_guardian_pre > 0) { int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45520,9 +46358,9 @@ int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mob { retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); } - if( HPMHooks.count.HP_mob_spawn_guardian_post ) { + if (HPMHooks.count.HP_mob_spawn_guardian_post > 0) { 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++ ) { + 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); } @@ -45532,14 +46370,14 @@ int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mob 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___ = 0; - if( HPMHooks.count.HP_mob_spawn_bg_pre ) { + if (HPMHooks.count.HP_mob_spawn_bg_pre > 0) { int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45547,9 +46385,9 @@ int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, { retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); } - if( HPMHooks.count.HP_mob_spawn_bg_post ) { + if (HPMHooks.count.HP_mob_spawn_bg_post > 0) { 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++ ) { + 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); } @@ -45559,14 +46397,14 @@ int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_reach_pre ) { + if (HPMHooks.count.HP_mob_can_reach_pre > 0) { int (*preHookFunc) (struct mob_data **md, struct block_list **bl, int *range, int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45574,9 +46412,9 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int { retVal___ = HPMHooks.source.mob.can_reach(md, bl, range, state); } - if( HPMHooks.count.HP_mob_can_reach_post ) { + if (HPMHooks.count.HP_mob_can_reach_post > 0) { 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++ ) { + 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); } @@ -45586,16 +46424,16 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int int HP_mob_linksearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_linksearch_pre ) { + if (HPMHooks.count.HP_mob_linksearch_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45605,9 +46443,9 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_linksearch_post ) { + if (HPMHooks.count.HP_mob_linksearch_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) { + 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); @@ -45619,14 +46457,14 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) { int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_delayspawn_pre ) { + if (HPMHooks.count.HP_mob_delayspawn_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45634,9 +46472,9 @@ int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_delayspawn_post ) { + if (HPMHooks.count.HP_mob_delayspawn_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) { + 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); } @@ -45646,14 +46484,14 @@ int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { int HP_mob_setdelayspawn(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_setdelayspawn_pre ) { + if (HPMHooks.count.HP_mob_setdelayspawn_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45661,9 +46499,9 @@ int HP_mob_setdelayspawn(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.setdelayspawn(md); } - if( HPMHooks.count.HP_mob_setdelayspawn_post ) { + if (HPMHooks.count.HP_mob_setdelayspawn_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -45673,16 +46511,16 @@ int HP_mob_setdelayspawn(struct mob_data *md) { int HP_mob_count_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_count_sub_pre ) { + if (HPMHooks.count.HP_mob_count_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45692,9 +46530,9 @@ int HP_mob_count_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_count_sub_post ) { + if (HPMHooks.count.HP_mob_count_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) { + 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); @@ -45706,14 +46544,14 @@ int HP_mob_count_sub(struct block_list *bl, va_list ap) { int HP_mob_spawn(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_pre ) { + if (HPMHooks.count.HP_mob_spawn_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45721,9 +46559,9 @@ int HP_mob_spawn(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.spawn(md); } - if( HPMHooks.count.HP_mob_spawn_post ) { + if (HPMHooks.count.HP_mob_spawn_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -45733,14 +46571,14 @@ int HP_mob_spawn(struct mob_data *md) { int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list *target, uint32 mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_changetarget_pre ) { + if (HPMHooks.count.HP_mob_can_changetarget_pre > 0) { int (*preHookFunc) (const struct mob_data **md, const struct block_list **target, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45748,9 +46586,9 @@ int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list * { retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode); } - if( HPMHooks.count.HP_mob_can_changetarget_post ) { + if (HPMHooks.count.HP_mob_can_changetarget_post > 0) { int (*postHookFunc) (int retVal___, const struct mob_data *md, const struct block_list *target, uint32 mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) { + 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); } @@ -45760,14 +46598,14 @@ int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list * int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_target_pre ) { + if (HPMHooks.count.HP_mob_target_pre > 0) { int (*preHookFunc) (struct mob_data **md, struct block_list **bl, int *dist); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45775,9 +46613,9 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { { retVal___ = HPMHooks.source.mob.target(md, bl, dist); } - if( HPMHooks.count.HP_mob_target_post ) { + if (HPMHooks.count.HP_mob_target_post > 0) { 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++ ) { + 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); } @@ -45787,16 +46625,16 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45806,9 +46644,9 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post > 0) { 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++ ) { + 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); @@ -45820,16 +46658,16 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45839,9 +46677,9 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_changechase_post > 0) { 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++ ) { + 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); @@ -45853,16 +46691,16 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45872,9 +46710,9 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post > 0) { 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++ ) { + 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); @@ -45886,16 +46724,16 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45905,9 +46743,9 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post > 0) { 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++ ) { + 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); @@ -45919,16 +46757,16 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_sub_pre ) { + if (HPMHooks.count.HP_mob_warpchase_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45938,9 +46776,9 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_warpchase_sub_post ) { + if (HPMHooks.count.HP_mob_warpchase_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) { + 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); @@ -45952,14 +46790,14 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre > 0) { int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45967,9 +46805,9 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.ai_sub_hard_slavemob(md, tick); } - if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) { + 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); } @@ -45979,14 +46817,14 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_unlocktarget_pre ) { + if (HPMHooks.count.HP_mob_unlocktarget_pre > 0) { int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45994,9 +46832,9 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.unlocktarget(md, tick); } - if( HPMHooks.count.HP_mob_unlocktarget_post ) { + if (HPMHooks.count.HP_mob_unlocktarget_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) { + 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); } @@ -46006,14 +46844,14 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { int HP_mob_randomwalk(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_randomwalk_pre ) { + if (HPMHooks.count.HP_mob_randomwalk_pre > 0) { int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46021,9 +46859,9 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.randomwalk(md, tick); } - if( HPMHooks.count.HP_mob_randomwalk_post ) { + if (HPMHooks.count.HP_mob_randomwalk_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) { + 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); } @@ -46033,14 +46871,14 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) { int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_pre ) { + if (HPMHooks.count.HP_mob_warpchase_pre > 0) { int (*preHookFunc) (struct mob_data **md, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46048,9 +46886,9 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { { retVal___ = HPMHooks.source.mob.warpchase(md, target); } - if( HPMHooks.count.HP_mob_warpchase_post ) { + if (HPMHooks.count.HP_mob_warpchase_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) { + 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); } @@ -46060,14 +46898,14 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_pre > 0) { bool (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46075,9 +46913,9 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.ai_sub_hard(md, tick); } - if( HPMHooks.count.HP_mob_ai_sub_hard_post ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_post > 0) { bool (*postHookFunc) (bool retVal___, struct mob_data *md, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) { + 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); } @@ -46087,16 +46925,16 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_timer_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46106,9 +46944,9 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_timer_post > 0) { 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++ ) { + 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); @@ -46120,16 +46958,16 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_foreachclient_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46139,9 +46977,9 @@ int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_mob_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -46153,16 +46991,16 @@ int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) { + if (HPMHooks.count.HP_mob_ai_sub_lazy_pre > 0) { int (*preHookFunc) (struct mob_data **md, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46172,9 +47010,9 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) { + if (HPMHooks.count.HP_mob_ai_sub_lazy_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) { + 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); @@ -46186,14 +47024,14 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_lazy_pre ) { + if (HPMHooks.count.HP_mob_ai_lazy_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46201,9 +47039,9 @@ int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_ai_lazy_post ) { + if (HPMHooks.count.HP_mob_ai_lazy_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) { + 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); } @@ -46213,14 +47051,14 @@ int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_hard_pre ) { + if (HPMHooks.count.HP_mob_ai_hard_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46228,9 +47066,9 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_ai_hard_post ) { + if (HPMHooks.count.HP_mob_ai_hard_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) { + 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); } @@ -46240,14 +47078,14 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { 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 ) { + if (HPMHooks.count.HP_mob_setdropitem_pre > 0) { struct item_drop* (*preHookFunc) (int *nameid, int *qty, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46255,9 +47093,9 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data { retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); } - if( HPMHooks.count.HP_mob_setdropitem_post ) { + if (HPMHooks.count.HP_mob_setdropitem_post > 0) { 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++ ) { + 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); } @@ -46267,14 +47105,14 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data struct item_drop* HP_mob_setlootitem(struct item *item) { int hIndex = 0; struct item_drop* retVal___ = NULL; - if( HPMHooks.count.HP_mob_setlootitem_pre ) { + if (HPMHooks.count.HP_mob_setlootitem_pre > 0) { struct item_drop* (*preHookFunc) (struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46282,9 +47120,9 @@ struct item_drop* HP_mob_setlootitem(struct item *item) { { retVal___ = HPMHooks.source.mob.setlootitem(item); } - if( HPMHooks.count.HP_mob_setlootitem_post ) { + if (HPMHooks.count.HP_mob_setlootitem_post > 0) { struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, item); } @@ -46294,14 +47132,14 @@ struct item_drop* HP_mob_setlootitem(struct item *item) { int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_delay_item_drop_pre ) { + if (HPMHooks.count.HP_mob_delay_item_drop_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46309,9 +47147,9 @@ int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.delay_item_drop(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_delay_item_drop_post ) { + if (HPMHooks.count.HP_mob_delay_item_drop_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) { + 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); } @@ -46320,14 +47158,14 @@ int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_mob_item_drop_pre > 0) { void (*preHookFunc) (struct mob_data **md, struct item_drop_list **dlist, struct item_drop **ditem, int *loot, int *drop_rate, unsigned short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46335,9 +47173,9 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct { HPMHooks.source.mob.item_drop(md, dlist, ditem, loot, drop_rate, flag); } - if( HPMHooks.count.HP_mob_item_drop_post ) { + if (HPMHooks.count.HP_mob_item_drop_post > 0) { 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++ ) { + 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); } @@ -46347,14 +47185,14 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_timer_delete_pre ) { + if (HPMHooks.count.HP_mob_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46362,9 +47200,9 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_timer_delete_post ) { + if (HPMHooks.count.HP_mob_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) { + 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); } @@ -46374,16 +47212,16 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) { + if (HPMHooks.count.HP_mob_deleteslave_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46393,9 +47231,9 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_deleteslave_sub_post ) { + if (HPMHooks.count.HP_mob_deleteslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) { + 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); @@ -46407,14 +47245,14 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { int HP_mob_deleteslave(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_pre ) { + if (HPMHooks.count.HP_mob_deleteslave_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46422,9 +47260,9 @@ int HP_mob_deleteslave(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.deleteslave(md); } - if( HPMHooks.count.HP_mob_deleteslave_post ) { + if (HPMHooks.count.HP_mob_deleteslave_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -46434,14 +47272,14 @@ int HP_mob_deleteslave(struct mob_data *md) { int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_respawn_pre ) { + if (HPMHooks.count.HP_mob_respawn_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46449,9 +47287,9 @@ int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_respawn_post ) { + if (HPMHooks.count.HP_mob_respawn_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) { + 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); } @@ -46460,14 +47298,14 @@ int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_mob_log_damage_pre > 0) { void (*preHookFunc) (struct mob_data **md, struct block_list **src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46475,9 +47313,9 @@ void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) { HPMHooks.source.mob.log_damage(md, src, damage); } - if( HPMHooks.count.HP_mob_log_damage_post ) { + if (HPMHooks.count.HP_mob_log_damage_post > 0) { void (*postHookFunc) (struct mob_data *md, struct block_list *src, int damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_post; hIndex++ ) { + 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); } @@ -46486,14 +47324,14 @@ void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) } void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { int hIndex = 0; - if( HPMHooks.count.HP_mob_damage_pre ) { + if (HPMHooks.count.HP_mob_damage_pre > 0) { void (*preHookFunc) (struct mob_data **md, struct block_list **src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46501,9 +47339,9 @@ void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { { HPMHooks.source.mob.damage(md, src, damage); } - if( HPMHooks.count.HP_mob_damage_post ) { + if (HPMHooks.count.HP_mob_damage_post > 0) { void (*postHookFunc) (struct mob_data *md, struct block_list *src, int damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_damage_post[hIndex].func; postHookFunc(md, src, damage); } @@ -46513,14 +47351,14 @@ void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_dead_pre ) { + if (HPMHooks.count.HP_mob_dead_pre > 0) { int (*preHookFunc) (struct mob_data **md, struct block_list **src, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46528,9 +47366,9 @@ int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { { retVal___ = HPMHooks.source.mob.dead(md, src, type); } - if( HPMHooks.count.HP_mob_dead_post ) { + if (HPMHooks.count.HP_mob_dead_post > 0) { 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++ ) { + 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); } @@ -46539,14 +47377,14 @@ int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { } void HP_mob_revive(struct mob_data *md, unsigned int hp) { int hIndex = 0; - if( HPMHooks.count.HP_mob_revive_pre ) { + if (HPMHooks.count.HP_mob_revive_pre > 0) { void (*preHookFunc) (struct mob_data **md, unsigned int *hp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46554,9 +47392,9 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) { { HPMHooks.source.mob.revive(md, hp); } - if( HPMHooks.count.HP_mob_revive_post ) { + if (HPMHooks.count.HP_mob_revive_post > 0) { void (*postHookFunc) (struct mob_data *md, unsigned int hp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_revive_post[hIndex].func; postHookFunc(md, hp); } @@ -46566,14 +47404,14 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) { int HP_mob_guardian_guildchange(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) { + if (HPMHooks.count.HP_mob_guardian_guildchange_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46581,9 +47419,9 @@ int HP_mob_guardian_guildchange(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.guardian_guildchange(md); } - if( HPMHooks.count.HP_mob_guardian_guildchange_post ) { + if (HPMHooks.count.HP_mob_guardian_guildchange_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) { + 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); } @@ -46593,14 +47431,14 @@ int HP_mob_guardian_guildchange(struct mob_data *md) { int HP_mob_random_class(int *value, size_t count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_random_class_pre ) { + if (HPMHooks.count.HP_mob_random_class_pre > 0) { int (*preHookFunc) (int **value, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46608,9 +47446,9 @@ int HP_mob_random_class(int *value, size_t count) { { retVal___ = HPMHooks.source.mob.random_class(value, count); } - if( HPMHooks.count.HP_mob_random_class_post ) { + if (HPMHooks.count.HP_mob_random_class_post > 0) { int (*postHookFunc) (int retVal___, int *value, size_t count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_post; hIndex++ ) { + 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); } @@ -46620,14 +47458,14 @@ int HP_mob_random_class(int *value, size_t count) { int HP_mob_class_change(struct mob_data *md, int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_class_change_pre ) { + if (HPMHooks.count.HP_mob_class_change_pre > 0) { int (*preHookFunc) (struct mob_data **md, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46635,9 +47473,9 @@ int HP_mob_class_change(struct mob_data *md, int class_) { { retVal___ = HPMHooks.source.mob.class_change(md, class_); } - if( HPMHooks.count.HP_mob_class_change_post ) { + if (HPMHooks.count.HP_mob_class_change_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_post; hIndex++ ) { + 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_); } @@ -46646,14 +47484,14 @@ int HP_mob_class_change(struct mob_data *md, int class_) { } void HP_mob_heal(struct mob_data *md, unsigned int heal) { int hIndex = 0; - if( HPMHooks.count.HP_mob_heal_pre ) { + if (HPMHooks.count.HP_mob_heal_pre > 0) { void (*preHookFunc) (struct mob_data **md, unsigned int *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46661,9 +47499,9 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) { { HPMHooks.source.mob.heal(md, heal); } - if( HPMHooks.count.HP_mob_heal_post ) { + if (HPMHooks.count.HP_mob_heal_post > 0) { void (*postHookFunc) (struct mob_data *md, unsigned int heal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_heal_post[hIndex].func; postHookFunc(md, heal); } @@ -46673,16 +47511,16 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) { int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_sub_pre ) { + if (HPMHooks.count.HP_mob_warpslave_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46692,9 +47530,9 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_warpslave_sub_post ) { + if (HPMHooks.count.HP_mob_warpslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) { + 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); @@ -46706,14 +47544,14 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { int HP_mob_warpslave(struct block_list *bl, int range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_pre ) { + if (HPMHooks.count.HP_mob_warpslave_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46721,9 +47559,9 @@ int HP_mob_warpslave(struct block_list *bl, int range) { { retVal___ = HPMHooks.source.mob.warpslave(bl, range); } - if( HPMHooks.count.HP_mob_warpslave_post ) { + if (HPMHooks.count.HP_mob_warpslave_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int range); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_post; hIndex++ ) { + 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); } @@ -46733,16 +47571,16 @@ int HP_mob_warpslave(struct block_list *bl, int range) { int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_sub_pre ) { + if (HPMHooks.count.HP_mob_countslave_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46752,9 +47590,9 @@ int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_countslave_sub_post ) { + if (HPMHooks.count.HP_mob_countslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) { + 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); @@ -46766,14 +47604,14 @@ int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { int HP_mob_countslave(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_pre ) { + if (HPMHooks.count.HP_mob_countslave_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46781,9 +47619,9 @@ int HP_mob_countslave(struct block_list *bl) { { retVal___ = HPMHooks.source.mob.countslave(bl); } - if( HPMHooks.count.HP_mob_countslave_post ) { + if (HPMHooks.count.HP_mob_countslave_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -46793,14 +47631,14 @@ int HP_mob_countslave(struct block_list *bl) { int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_summonslave_pre ) { + if (HPMHooks.count.HP_mob_summonslave_pre > 0) { int (*preHookFunc) (struct mob_data **md2, int **value, int *amount, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46808,9 +47646,9 @@ int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skil { retVal___ = HPMHooks.source.mob.summonslave(md2, value, amount, skill_id); } - if( HPMHooks.count.HP_mob_summonslave_post ) { + if (HPMHooks.count.HP_mob_summonslave_post > 0) { 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++ ) { + 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); } @@ -46820,16 +47658,16 @@ int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skil int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) { + if (HPMHooks.count.HP_mob_getfriendhprate_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46839,9 +47677,9 @@ int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) { + if (HPMHooks.count.HP_mob_getfriendhprate_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) { + 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); @@ -46853,14 +47691,14 @@ int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { 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 ) { + if (HPMHooks.count.HP_mob_getfriendhprate_pre > 0) { struct block_list* (*preHookFunc) (struct mob_data **md, int *min_rate, int *max_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46868,9 +47706,9 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int { retVal___ = HPMHooks.source.mob.getfriendhprate(md, min_rate, max_rate); } - if( HPMHooks.count.HP_mob_getfriendhprate_post ) { + if (HPMHooks.count.HP_mob_getfriendhprate_post > 0) { 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++ ) { + 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); } @@ -46880,14 +47718,14 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int 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 ) { + if (HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre > 0) { struct block_list* (*preHookFunc) (struct mob_data **md, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46895,9 +47733,9 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { { retVal___ = HPMHooks.source.mob.getmasterhpltmaxrate(md, rate); } - if( HPMHooks.count.HP_mob_getmasterhpltmaxrate_post ) { + if (HPMHooks.count.HP_mob_getmasterhpltmaxrate_post > 0) { 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++ ) { + 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); } @@ -46907,16 +47745,16 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) { + if (HPMHooks.count.HP_mob_getfriendstatus_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46926,9 +47764,9 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) { + if (HPMHooks.count.HP_mob_getfriendstatus_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) { + 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); @@ -46940,14 +47778,14 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { 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 ) { + if (HPMHooks.count.HP_mob_getfriendstatus_pre > 0) { struct mob_data* (*preHookFunc) (struct mob_data **md, int *cond1, int *cond2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46955,9 +47793,9 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond { retVal___ = HPMHooks.source.mob.getfriendstatus(md, cond1, cond2); } - if( HPMHooks.count.HP_mob_getfriendstatus_post ) { + if (HPMHooks.count.HP_mob_getfriendstatus_post > 0) { 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++ ) { + 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); } @@ -46967,14 +47805,14 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_use_pre ) { + if (HPMHooks.count.HP_mob_skill_use_pre > 0) { int (*preHookFunc) (struct mob_data **md, int64 *tick, int *event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46982,9 +47820,9 @@ int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { { retVal___ = HPMHooks.source.mob.skill_use(md, tick, event); } - if( HPMHooks.count.HP_mob_skill_use_post ) { + if (HPMHooks.count.HP_mob_skill_use_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, int64 tick, int event); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) { + 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); } @@ -46994,14 +47832,14 @@ int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_event_pre ) { + if (HPMHooks.count.HP_mob_skill_event_pre > 0) { int (*preHookFunc) (struct mob_data **md, struct block_list **src, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47009,9 +47847,9 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, { retVal___ = HPMHooks.source.mob.skill_event(md, src, tick, flag); } - if( HPMHooks.count.HP_mob_skill_event_post ) { + if (HPMHooks.count.HP_mob_skill_event_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) { + 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); } @@ -47021,14 +47859,14 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int HP_mob_is_clone(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_is_clone_pre ) { + if (HPMHooks.count.HP_mob_is_clone_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47036,9 +47874,9 @@ int HP_mob_is_clone(int class_) { { retVal___ = HPMHooks.source.mob.is_clone(class_); } - if( HPMHooks.count.HP_mob_is_clone_post ) { + if (HPMHooks.count.HP_mob_is_clone_post > 0) { int (*postHookFunc) (int retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_post; hIndex++ ) { + 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_); } @@ -47048,14 +47886,14 @@ int HP_mob_is_clone(int class_) { int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 mode, int flag, unsigned int duration) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_clone_spawn_pre ) { + if (HPMHooks.count.HP_mob_clone_spawn_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y, const char **event, int *master_id, uint32 *mode, int *flag, unsigned int *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47063,9 +47901,9 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c { retVal___ = HPMHooks.source.mob.clone_spawn(sd, m, x, y, event, master_id, mode, flag, duration); } - if( HPMHooks.count.HP_mob_clone_spawn_post ) { + if (HPMHooks.count.HP_mob_clone_spawn_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 mode, int flag, unsigned int duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) { + 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); } @@ -47075,14 +47913,14 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c int HP_mob_clone_delete(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_clone_delete_pre ) { + if (HPMHooks.count.HP_mob_clone_delete_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47090,9 +47928,9 @@ int HP_mob_clone_delete(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.clone_delete(md); } - if( HPMHooks.count.HP_mob_clone_delete_post ) { + if (HPMHooks.count.HP_mob_clone_delete_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) { + 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); } @@ -47102,14 +47940,14 @@ int HP_mob_clone_delete(struct mob_data *md) { 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___ = 0; - if( HPMHooks.count.HP_mob_drop_adjust_pre ) { + if (HPMHooks.count.HP_mob_drop_adjust_pre > 0) { unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47117,9 +47955,9 @@ unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short ra { retVal___ = HPMHooks.source.mob.drop_adjust(baserate, rate_adjust, rate_min, rate_max); } - if( HPMHooks.count.HP_mob_drop_adjust_post ) { + if (HPMHooks.count.HP_mob_drop_adjust_post > 0) { 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++ ) { + 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); } @@ -47128,14 +47966,14 @@ unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short ra } 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 ) { + if (HPMHooks.count.HP_mob_item_dropratio_adjust_pre > 0) { void (*preHookFunc) (int *nameid, int *mob_id, int **rate_adjust); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47143,9 +47981,9 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { { HPMHooks.source.mob.item_dropratio_adjust(nameid, mob_id, rate_adjust); } - if( HPMHooks.count.HP_mob_item_dropratio_adjust_post ) { + if (HPMHooks.count.HP_mob_item_dropratio_adjust_post > 0) { void (*postHookFunc) (int nameid, int mob_id, int *rate_adjust); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_post; hIndex++ ) { + 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); } @@ -47154,14 +47992,14 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { } void HP_mob_readdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readdb_pre ) { + if (HPMHooks.count.HP_mob_readdb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47169,9 +48007,9 @@ void HP_mob_readdb(void) { { HPMHooks.source.mob.readdb(); } - if( HPMHooks.count.HP_mob_readdb_post ) { + if (HPMHooks.count.HP_mob_readdb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func; postHookFunc(); } @@ -47181,14 +48019,14 @@ void HP_mob_readdb(void) { bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_lookup_const_pre ) { + if (HPMHooks.count.HP_mob_lookup_const_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_lookup_const_pre[hIndex].func; retVal___ = preHookFunc(&it, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47196,9 +48034,9 @@ bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, in { retVal___ = HPMHooks.source.mob.lookup_const(it, name, value); } - if( HPMHooks.count.HP_mob_lookup_const_post ) { + if (HPMHooks.count.HP_mob_lookup_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_lookup_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, name, value); } @@ -47208,14 +48046,14 @@ bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, in bool HP_mob_get_const(const struct config_setting_t *it, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_get_const_pre ) { + if (HPMHooks.count.HP_mob_get_const_pre > 0) { bool (*preHookFunc) (const struct config_setting_t **it, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_get_const_pre[hIndex].func; retVal___ = preHookFunc(&it, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47223,9 +48061,9 @@ bool HP_mob_get_const(const struct config_setting_t *it, int *value) { { retVal___ = HPMHooks.source.mob.get_const(it, value); } - if( HPMHooks.count.HP_mob_get_const_post ) { + if (HPMHooks.count.HP_mob_get_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_get_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, value); } @@ -47235,14 +48073,14 @@ bool HP_mob_get_const(const struct config_setting_t *it, int *value) { int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_validate_entry_pre ) { + if (HPMHooks.count.HP_mob_db_validate_entry_pre > 0) { int (*preHookFunc) (struct mob_db **entry, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_db_validate_entry_pre[hIndex].func; retVal___ = preHookFunc(&entry, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47250,9 +48088,9 @@ int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { { retVal___ = HPMHooks.source.mob.db_validate_entry(entry, n, source); } - if( HPMHooks.count.HP_mob_db_validate_entry_post ) { + if (HPMHooks.count.HP_mob_db_validate_entry_post > 0) { int (*postHookFunc) (int retVal___, struct mob_db *entry, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_db_validate_entry_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry, n, source); } @@ -47262,14 +48100,14 @@ int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_libconfig_pre ) { + if (HPMHooks.count.HP_mob_read_libconfig_pre > 0) { int (*preHookFunc) (const char **filename, bool *ignore_missing); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_libconfig_pre[hIndex].func; retVal___ = preHookFunc(&filename, &ignore_missing); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47277,9 +48115,9 @@ int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { { retVal___ = HPMHooks.source.mob.read_libconfig(filename, ignore_missing); } - if( HPMHooks.count.HP_mob_read_libconfig_post ) { + if (HPMHooks.count.HP_mob_read_libconfig_post > 0) { int (*postHookFunc) (int retVal___, const char *filename, bool ignore_missing); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_libconfig_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename, ignore_missing); } @@ -47288,14 +48126,14 @@ int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { } void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_setting_t *it, int n, const char *source) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_additional_fields_pre ) { + if (HPMHooks.count.HP_mob_read_db_additional_fields_pre > 0) { void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_pre[hIndex].func; preHookFunc(&entry, &it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47303,9 +48141,9 @@ void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_settin { HPMHooks.source.mob.read_db_additional_fields(entry, it, n, source); } - if( HPMHooks.count.HP_mob_read_db_additional_fields_post ) { + if (HPMHooks.count.HP_mob_read_db_additional_fields_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *it, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_post[hIndex].func; postHookFunc(entry, it, n, source); } @@ -47315,14 +48153,14 @@ void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_settin int HP_mob_read_db_sub(struct config_setting_t *mobt, int id, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_db_sub_pre ) { + if (HPMHooks.count.HP_mob_read_db_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **mobt, int *id, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_sub_pre[hIndex].func; retVal___ = preHookFunc(&mobt, &id, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47330,9 +48168,9 @@ int HP_mob_read_db_sub(struct config_setting_t *mobt, int id, const char *source { retVal___ = HPMHooks.source.mob.read_db_sub(mobt, id, source); } - if( HPMHooks.count.HP_mob_read_db_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *mobt, int id, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, mobt, id, source); } @@ -47341,14 +48179,14 @@ int HP_mob_read_db_sub(struct config_setting_t *mobt, int id, const char *source } void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_drops_sub_pre ) { + if (HPMHooks.count.HP_mob_read_db_drops_sub_pre > 0) { void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_pre[hIndex].func; preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47356,9 +48194,9 @@ void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) { HPMHooks.source.mob.read_db_drops_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_drops_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_drops_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_post[hIndex].func; postHookFunc(entry, t); } @@ -47367,14 +48205,14 @@ void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) } void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre ) { + if (HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre > 0) { void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_pre[hIndex].func; preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47382,9 +48220,9 @@ void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t * { HPMHooks.source.mob.read_db_mvpdrops_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_post[hIndex].func; postHookFunc(entry, t); } @@ -47394,14 +48232,14 @@ void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t * uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_mob_read_db_mode_sub_pre ) { + if (HPMHooks.count.HP_mob_read_db_mode_sub_pre > 0) { uint32 (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_pre[hIndex].func; retVal___ = preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47409,9 +48247,9 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) { retVal___ = HPMHooks.source.mob.read_db_mode_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_mode_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_mode_sub_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry, t); } @@ -47420,14 +48258,14 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) } void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_stats_sub_pre ) { + if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) { void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_pre[hIndex].func; preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47435,9 +48273,9 @@ void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { HPMHooks.source.mob.read_db_stats_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_stats_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_stats_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_post[hIndex].func; postHookFunc(entry, t); } @@ -47446,14 +48284,14 @@ void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) } void HP_mob_name_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_name_constants_pre ) { + if (HPMHooks.count.HP_mob_name_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_name_constants_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47461,9 +48299,9 @@ void HP_mob_name_constants(void) { { HPMHooks.source.mob.name_constants(); } - if( HPMHooks.count.HP_mob_name_constants_post ) { + if (HPMHooks.count.HP_mob_name_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_name_constants_post[hIndex].func; postHookFunc(); } @@ -47473,14 +48311,14 @@ void HP_mob_name_constants(void) { bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) { + if (HPMHooks.count.HP_mob_readdb_mobavail_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47488,9 +48326,9 @@ bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); } - if( HPMHooks.count.HP_mob_readdb_mobavail_post ) { + if (HPMHooks.count.HP_mob_readdb_mobavail_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_mobavail_post; hIndex++ ) { + 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); } @@ -47500,14 +48338,14 @@ bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { int HP_mob_read_randommonster(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_randommonster_pre ) { + if (HPMHooks.count.HP_mob_read_randommonster_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47515,9 +48353,9 @@ int HP_mob_read_randommonster(void) { { retVal___ = HPMHooks.source.mob.read_randommonster(); } - if( HPMHooks.count.HP_mob_read_randommonster_post ) { + if (HPMHooks.count.HP_mob_read_randommonster_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) { + 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___); } @@ -47527,14 +48365,14 @@ int HP_mob_read_randommonster(void) { bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) { + if (HPMHooks.count.HP_mob_parse_row_chatdb_pre > 0) { bool (*preHookFunc) (char ***str, const char **source, int *line, int **last_msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47542,9 +48380,9 @@ bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last { retVal___ = HPMHooks.source.mob.parse_row_chatdb(str, source, line, last_msg_id); } - if( HPMHooks.count.HP_mob_parse_row_chatdb_post ) { + if (HPMHooks.count.HP_mob_parse_row_chatdb_post > 0) { 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++ ) { + 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); } @@ -47553,14 +48391,14 @@ bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last } void HP_mob_readchatdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readchatdb_pre ) { + if (HPMHooks.count.HP_mob_readchatdb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47568,9 +48406,9 @@ void HP_mob_readchatdb(void) { { HPMHooks.source.mob.readchatdb(); } - if( HPMHooks.count.HP_mob_readchatdb_post ) { + if (HPMHooks.count.HP_mob_readchatdb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_readchatdb_post[hIndex].func; postHookFunc(); } @@ -47580,14 +48418,14 @@ void HP_mob_readchatdb(void) { bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) { + if (HPMHooks.count.HP_mob_parse_row_mobskilldb_pre > 0) { bool (*preHookFunc) (char ***str, int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47595,9 +48433,9 @@ bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { { retVal___ = HPMHooks.source.mob.parse_row_mobskilldb(str, columns, current); } - if( HPMHooks.count.HP_mob_parse_row_mobskilldb_post ) { + if (HPMHooks.count.HP_mob_parse_row_mobskilldb_post > 0) { bool (*postHookFunc) (bool retVal___, char **str, int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_mobskilldb_post; hIndex++ ) { + 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); } @@ -47606,14 +48444,14 @@ bool HP_mob_parse_row_mobskilldb(char **str, int columns, int current) { } void HP_mob_readskilldb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readskilldb_pre ) { + if (HPMHooks.count.HP_mob_readskilldb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47621,9 +48459,9 @@ void HP_mob_readskilldb(void) { { HPMHooks.source.mob.readskilldb(); } - if( HPMHooks.count.HP_mob_readskilldb_post ) { + if (HPMHooks.count.HP_mob_readskilldb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func; postHookFunc(); } @@ -47633,14 +48471,14 @@ void HP_mob_readskilldb(void) { bool HP_mob_readdb_race2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_race2_pre ) { + if (HPMHooks.count.HP_mob_readdb_race2_pre > 0) { bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47648,9 +48486,9 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) { { retVal___ = HPMHooks.source.mob.readdb_race2(fields, columns, current); } - if( HPMHooks.count.HP_mob_readdb_race2_post ) { + if (HPMHooks.count.HP_mob_readdb_race2_post > 0) { bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_post; hIndex++ ) { + 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); } @@ -47660,14 +48498,14 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) { bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) { + if (HPMHooks.count.HP_mob_readdb_itemratio_pre > 0) { bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47675,9 +48513,9 @@ bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { { retVal___ = HPMHooks.source.mob.readdb_itemratio(str, columns, current); } - if( HPMHooks.count.HP_mob_readdb_itemratio_post ) { + if (HPMHooks.count.HP_mob_readdb_itemratio_post > 0) { bool (*postHookFunc) (bool retVal___, char *str[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_post; hIndex++ ) { + 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); } @@ -47686,14 +48524,14 @@ bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { } void HP_mob_load(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_mob_load_pre ) { + if (HPMHooks.count.HP_mob_load_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47701,9 +48539,9 @@ void HP_mob_load(bool minimal) { { HPMHooks.source.mob.load(minimal); } - if( HPMHooks.count.HP_mob_load_post ) { + if (HPMHooks.count.HP_mob_load_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func; postHookFunc(minimal); } @@ -47712,14 +48550,14 @@ void HP_mob_load(bool minimal) { } void HP_mob_clear_spawninfo(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) { + if (HPMHooks.count.HP_mob_clear_spawninfo_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47727,9 +48565,9 @@ void HP_mob_clear_spawninfo(void) { { HPMHooks.source.mob.clear_spawninfo(); } - if( HPMHooks.count.HP_mob_clear_spawninfo_post ) { + if (HPMHooks.count.HP_mob_clear_spawninfo_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func; postHookFunc(); } @@ -47738,14 +48576,14 @@ void HP_mob_clear_spawninfo(void) { } void HP_mob_destroy_mob_db(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mob_destroy_mob_db_pre ) { + if (HPMHooks.count.HP_mob_destroy_mob_db_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47753,9 +48591,9 @@ void HP_mob_destroy_mob_db(int index) { { HPMHooks.source.mob.destroy_mob_db(index); } - if( HPMHooks.count.HP_mob_destroy_mob_db_post ) { + if (HPMHooks.count.HP_mob_destroy_mob_db_post > 0) { void (*postHookFunc) (int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_post[hIndex].func; postHookFunc(index); } @@ -47766,14 +48604,14 @@ void HP_mob_destroy_mob_db(int index) { struct mutex_data* HP_mutex_create(void) { int hIndex = 0; struct mutex_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_create_pre ) { + if (HPMHooks.count.HP_mutex_create_pre > 0) { struct mutex_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47781,9 +48619,9 @@ struct mutex_data* HP_mutex_create(void) { { retVal___ = HPMHooks.source.mutex.create(); } - if( HPMHooks.count.HP_mutex_create_post ) { + if (HPMHooks.count.HP_mutex_create_post > 0) { struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -47792,14 +48630,14 @@ struct mutex_data* HP_mutex_create(void) { } void HP_mutex_destroy(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_destroy_pre ) { + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47807,9 +48645,9 @@ void HP_mutex_destroy(struct mutex_data *m) { { HPMHooks.source.mutex.destroy(m); } - if( HPMHooks.count.HP_mutex_destroy_post ) { + if (HPMHooks.count.HP_mutex_destroy_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; postHookFunc(m); } @@ -47818,14 +48656,14 @@ void HP_mutex_destroy(struct mutex_data *m) { } void HP_mutex_lock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_lock_pre ) { + if (HPMHooks.count.HP_mutex_lock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47833,9 +48671,9 @@ void HP_mutex_lock(struct mutex_data *m) { { HPMHooks.source.mutex.lock(m); } - if( HPMHooks.count.HP_mutex_lock_post ) { + if (HPMHooks.count.HP_mutex_lock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; postHookFunc(m); } @@ -47845,14 +48683,14 @@ void HP_mutex_lock(struct mutex_data *m) { bool HP_mutex_trylock(struct mutex_data *m) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mutex_trylock_pre ) { + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { bool (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47860,9 +48698,9 @@ bool HP_mutex_trylock(struct mutex_data *m) { { retVal___ = HPMHooks.source.mutex.trylock(m); } - if( HPMHooks.count.HP_mutex_trylock_post ) { + if (HPMHooks.count.HP_mutex_trylock_post > 0) { bool (*postHookFunc) (bool retVal___, struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; retVal___ = postHookFunc(retVal___, m); } @@ -47871,14 +48709,14 @@ bool HP_mutex_trylock(struct mutex_data *m) { } void HP_mutex_unlock(struct mutex_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_unlock_pre ) { + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { void (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47886,9 +48724,9 @@ void HP_mutex_unlock(struct mutex_data *m) { { HPMHooks.source.mutex.unlock(m); } - if( HPMHooks.count.HP_mutex_unlock_post ) { + if (HPMHooks.count.HP_mutex_unlock_post > 0) { void (*postHookFunc) (struct mutex_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; postHookFunc(m); } @@ -47898,14 +48736,14 @@ void HP_mutex_unlock(struct mutex_data *m) { struct cond_data* HP_mutex_cond_create(void) { int hIndex = 0; struct cond_data* retVal___ = NULL; - if( HPMHooks.count.HP_mutex_cond_create_pre ) { + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { struct cond_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47913,9 +48751,9 @@ struct cond_data* HP_mutex_cond_create(void) { { retVal___ = HPMHooks.source.mutex.cond_create(); } - if( HPMHooks.count.HP_mutex_cond_create_post ) { + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { struct cond_data* (*postHookFunc) (struct cond_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -47924,14 +48762,14 @@ struct cond_data* HP_mutex_cond_create(void) { } void HP_mutex_cond_destroy(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_destroy_pre ) { + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47939,9 +48777,9 @@ void HP_mutex_cond_destroy(struct cond_data *c) { { HPMHooks.source.mutex.cond_destroy(c); } - if( HPMHooks.count.HP_mutex_cond_destroy_post ) { + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; postHookFunc(c); } @@ -47950,14 +48788,14 @@ void HP_mutex_cond_destroy(struct cond_data *c) { } void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_wait_pre ) { + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; preHookFunc(&c, &m, &timeout_ticks); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47965,9 +48803,9 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou { HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); } - if( HPMHooks.count.HP_mutex_cond_wait_post ) { + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; postHookFunc(c, m, timeout_ticks); } @@ -47976,14 +48814,14 @@ void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeou } void HP_mutex_cond_signal(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_signal_pre ) { + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47991,9 +48829,9 @@ void HP_mutex_cond_signal(struct cond_data *c) { { HPMHooks.source.mutex.cond_signal(c); } - if( HPMHooks.count.HP_mutex_cond_signal_post ) { + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; postHookFunc(c); } @@ -48002,14 +48840,14 @@ void HP_mutex_cond_signal(struct cond_data *c) { } void HP_mutex_cond_broadcast(struct cond_data *c) { int hIndex = 0; - if( HPMHooks.count.HP_mutex_cond_broadcast_pre ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { void (*preHookFunc) (struct cond_data **c); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; preHookFunc(&c); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48017,9 +48855,9 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { { HPMHooks.source.mutex.cond_broadcast(c); } - if( HPMHooks.count.HP_mutex_cond_broadcast_post ) { + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { void (*postHookFunc) (struct cond_data *c); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; postHookFunc(c); } @@ -48030,16 +48868,16 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { int HP_npc_chat_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_chat_sub_pre ) { + if (HPMHooks.count.HP_npc_chat_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_npc_chat_sub_pre[hIndex].func; retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48049,9 +48887,9 @@ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc_chat.sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_chat_sub_post ) { + if (HPMHooks.count.HP_npc_chat_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_npc_chat_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -48062,14 +48900,14 @@ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { } void HP_npc_chat_finalize(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_finalize_pre ) { + if (HPMHooks.count.HP_npc_chat_finalize_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pre[hIndex].func; preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48077,9 +48915,9 @@ void HP_npc_chat_finalize(struct npc_data *nd) { { HPMHooks.source.npc_chat.finalize(nd); } - if( HPMHooks.count.HP_npc_chat_finalize_post ) { + if (HPMHooks.count.HP_npc_chat_finalize_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_finalize_post[hIndex].func; postHookFunc(nd); } @@ -48088,14 +48926,14 @@ void HP_npc_chat_finalize(struct npc_data *nd) { } void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern, const char *label) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_def_pattern_pre ) { + if (HPMHooks.count.HP_npc_chat_def_pattern_pre > 0) { void (*preHookFunc) (struct npc_data **nd, int *setid, const char **pattern, const char **label); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_pre[hIndex].func; preHookFunc(&nd, &setid, &pattern, &label); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48103,9 +48941,9 @@ void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern { HPMHooks.source.npc_chat.def_pattern(nd, setid, pattern, label); } - if( HPMHooks.count.HP_npc_chat_def_pattern_post ) { + if (HPMHooks.count.HP_npc_chat_def_pattern_post > 0) { void (*postHookFunc) (struct npc_data *nd, int setid, const char *pattern, const char *label); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_post[hIndex].func; postHookFunc(nd, setid, pattern, label); } @@ -48115,14 +48953,14 @@ void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set *set) { int hIndex = 0; struct pcrematch_entry* retVal___ = NULL; - if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre ) { + if (HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre > 0) { struct pcrematch_entry* (*preHookFunc) (struct pcrematch_set **set); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_pre[hIndex].func; retVal___ = preHookFunc(&set); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48130,9 +48968,9 @@ struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set { retVal___ = HPMHooks.source.npc_chat.create_pcrematch_entry(set); } - if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post ) { + if (HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post > 0) { struct pcrematch_entry* (*postHookFunc) (struct pcrematch_entry* retVal___, struct pcrematch_set *set); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_post[hIndex].func; retVal___ = postHookFunc(retVal___, set); } @@ -48141,14 +48979,14 @@ struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set } void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_delete_pcreset_pre ) { + if (HPMHooks.count.HP_npc_chat_delete_pcreset_pre > 0) { void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_pre[hIndex].func; preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48156,9 +48994,9 @@ void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.delete_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_delete_pcreset_post ) { + if (HPMHooks.count.HP_npc_chat_delete_pcreset_post > 0) { void (*postHookFunc) (struct npc_data *nd, int setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_post[hIndex].func; postHookFunc(nd, setid); } @@ -48167,14 +49005,14 @@ void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) { } void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre ) { + if (HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre > 0) { void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_pre[hIndex].func; preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48182,9 +49020,9 @@ void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.deactivate_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_post ) { + if (HPMHooks.count.HP_npc_chat_deactivate_pcreset_post > 0) { void (*postHookFunc) (struct npc_data *nd, int setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_post[hIndex].func; postHookFunc(nd, setid); } @@ -48193,14 +49031,14 @@ void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) { } void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_activate_pcreset_pre ) { + if (HPMHooks.count.HP_npc_chat_activate_pcreset_pre > 0) { void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_pre[hIndex].func; preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48208,9 +49046,9 @@ void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.activate_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_activate_pcreset_post ) { + if (HPMHooks.count.HP_npc_chat_activate_pcreset_post > 0) { void (*postHookFunc) (struct npc_data *nd, int setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_post[hIndex].func; postHookFunc(nd, setid); } @@ -48220,14 +49058,14 @@ void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; struct pcrematch_set* retVal___ = NULL; - if( HPMHooks.count.HP_npc_chat_lookup_pcreset_pre ) { + if (HPMHooks.count.HP_npc_chat_lookup_pcreset_pre > 0) { struct pcrematch_set* (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_pre[hIndex].func; retVal___ = preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48235,9 +49073,9 @@ struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) { retVal___ = HPMHooks.source.npc_chat.lookup_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_lookup_pcreset_post ) { + if (HPMHooks.count.HP_npc_chat_lookup_pcreset_post > 0) { struct pcrematch_set* (*postHookFunc) (struct pcrematch_set* retVal___, struct npc_data *nd, int setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, setid); } @@ -48246,14 +49084,14 @@ struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) } void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre ) { + if (HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre > 0) { void (*preHookFunc) (struct pcrematch_entry **e); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_pre[hIndex].func; preHookFunc(&e); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48261,9 +49099,9 @@ void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { { HPMHooks.source.npc_chat.finalize_pcrematch_entry(e); } - if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post ) { + if (HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post > 0) { void (*postHookFunc) (struct pcrematch_entry *e); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_post[hIndex].func; postHookFunc(e); } @@ -48274,14 +49112,14 @@ void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { int HP_npc_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_init_pre ) { + if (HPMHooks.count.HP_npc_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48289,9 +49127,9 @@ int HP_npc_init(bool minimal) { { retVal___ = HPMHooks.source.npc.init(minimal); } - if( HPMHooks.count.HP_npc_init_post ) { + if (HPMHooks.count.HP_npc_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -48301,14 +49139,14 @@ int HP_npc_init(bool minimal) { int HP_npc_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_final_pre ) { + if (HPMHooks.count.HP_npc_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48316,9 +49154,9 @@ int HP_npc_final(void) { { retVal___ = HPMHooks.source.npc.final(); } - if( HPMHooks.count.HP_npc_final_post ) { + if (HPMHooks.count.HP_npc_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -48328,14 +49166,14 @@ int HP_npc_final(void) { int HP_npc_get_new_npc_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) { + if (HPMHooks.count.HP_npc_get_new_npc_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48343,9 +49181,9 @@ int HP_npc_get_new_npc_id(void) { { retVal___ = HPMHooks.source.npc.get_new_npc_id(); } - if( HPMHooks.count.HP_npc_get_new_npc_id_post ) { + if (HPMHooks.count.HP_npc_get_new_npc_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) { + 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___); } @@ -48355,14 +49193,14 @@ int HP_npc_get_new_npc_id(void) { 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 ) { + if (HPMHooks.count.HP_npc_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48370,9 +49208,9 @@ struct view_data* HP_npc_get_viewdata(int class_) { { retVal___ = HPMHooks.source.npc.get_viewdata(class_); } - if( HPMHooks.count.HP_npc_get_viewdata_post ) { + if (HPMHooks.count.HP_npc_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_post; hIndex++ ) { + 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_); } @@ -48382,16 +49220,16 @@ struct view_data* HP_npc_get_viewdata(int class_) { int HP_npc_isnear_sub(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_isnear_sub_pre ) { + if (HPMHooks.count.HP_npc_isnear_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48401,9 +49239,9 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_isnear_sub_post ) { + if (HPMHooks.count.HP_npc_isnear_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) { + 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); @@ -48415,14 +49253,14 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) { bool HP_npc_isnear(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_isnear_pre ) { + if (HPMHooks.count.HP_npc_isnear_pre > 0) { bool (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48430,9 +49268,9 @@ bool HP_npc_isnear(struct block_list *bl) { { retVal___ = HPMHooks.source.npc.isnear(bl); } - if( HPMHooks.count.HP_npc_isnear_post ) { + if (HPMHooks.count.HP_npc_isnear_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -48442,14 +49280,14 @@ bool HP_npc_isnear(struct block_list *bl) { int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch_event_pre ) { + if (HPMHooks.count.HP_npc_ontouch_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48457,9 +49295,9 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd); } - if( HPMHooks.count.HP_npc_ontouch_event_post ) { + if (HPMHooks.count.HP_npc_ontouch_event_post > 0) { 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++ ) { + 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); } @@ -48469,14 +49307,14 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch2_event_pre ) { + if (HPMHooks.count.HP_npc_ontouch2_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48484,9 +49322,9 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd); } - if( HPMHooks.count.HP_npc_ontouch2_event_post ) { + if (HPMHooks.count.HP_npc_ontouch2_event_post > 0) { 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++ ) { + 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); } @@ -48496,14 +49334,14 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_onuntouch_event_pre ) { + if (HPMHooks.count.HP_npc_onuntouch_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func; retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48511,9 +49349,9 @@ int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd); } - if( HPMHooks.count.HP_npc_onuntouch_event_post ) { + if (HPMHooks.count.HP_npc_onuntouch_event_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nd); } @@ -48523,16 +49361,16 @@ int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_sub_pre ) { + if (HPMHooks.count.HP_npc_enable_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48542,9 +49380,9 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_enable_sub_post ) { + if (HPMHooks.count.HP_npc_enable_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) { + 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); @@ -48556,14 +49394,14 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int HP_npc_enable(const char *name, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_pre ) { + if (HPMHooks.count.HP_npc_enable_pre > 0) { int (*preHookFunc) (const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48571,9 +49409,9 @@ int HP_npc_enable(const char *name, int flag) { { retVal___ = HPMHooks.source.npc.enable(name, flag); } - if( HPMHooks.count.HP_npc_enable_post ) { + if (HPMHooks.count.HP_npc_enable_post > 0) { int (*postHookFunc) (int retVal___, const char *name, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_post; hIndex++ ) { + 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); } @@ -48583,14 +49421,14 @@ int HP_npc_enable(const char *name, int flag) { struct npc_data* HP_npc_name2id(const char *name) { int hIndex = 0; struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_name2id_pre ) { + if (HPMHooks.count.HP_npc_name2id_pre > 0) { struct npc_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48598,9 +49436,9 @@ struct npc_data* HP_npc_name2id(const char *name) { { retVal___ = HPMHooks.source.npc.name2id(name); } - if( HPMHooks.count.HP_npc_name2id_post ) { + if (HPMHooks.count.HP_npc_name2id_post > 0) { struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -48610,14 +49448,14 @@ struct npc_data* HP_npc_name2id(const char *name) { int HP_npc_event_dequeue(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_dequeue_pre ) { + if (HPMHooks.count.HP_npc_event_dequeue_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48625,9 +49463,9 @@ int HP_npc_event_dequeue(struct map_session_data *sd) { { retVal___ = HPMHooks.source.npc.event_dequeue(sd); } - if( HPMHooks.count.HP_npc_event_dequeue_post ) { + if (HPMHooks.count.HP_npc_event_dequeue_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) { + 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); } @@ -48637,16 +49475,16 @@ int HP_npc_event_dequeue(struct map_session_data *sd) { struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { int hIndex = 0; struct DBData retVal___ = { 0 }; - if( HPMHooks.count.HP_npc_event_export_create_pre ) { + if (HPMHooks.count.HP_npc_event_export_create_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48656,9 +49494,9 @@ struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_event_export_create_post ) { + if (HPMHooks.count.HP_npc_event_export_create_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) { + 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); @@ -48670,14 +49508,14 @@ struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { int HP_npc_event_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_export_pre ) { + if (HPMHooks.count.HP_npc_event_export_pre > 0) { int (*preHookFunc) (struct npc_data **nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48685,9 +49523,9 @@ int HP_npc_event_export(struct npc_data *nd, int i) { { retVal___ = HPMHooks.source.npc.event_export(nd, i); } - if( HPMHooks.count.HP_npc_event_export_post ) { + if (HPMHooks.count.HP_npc_event_export_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, int i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_post; hIndex++ ) { + 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); } @@ -48697,14 +49535,14 @@ int HP_npc_event_export(struct npc_data *nd, int i) { int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_sub_pre ) { + if (HPMHooks.count.HP_npc_event_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct event_data **ev, const char **eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48712,9 +49550,9 @@ int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const c { retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname); } - if( HPMHooks.count.HP_npc_event_sub_post ) { + if (HPMHooks.count.HP_npc_event_sub_post > 0) { 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++ ) { + 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); } @@ -48723,16 +49561,16 @@ int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const c } 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 ) { + if (HPMHooks.count.HP_npc_event_doall_sub_pre > 0) { void (*preHookFunc) (void **key, void **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48742,9 +49580,9 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { HPMHooks.source.npc.event_doall_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_event_doall_sub_post ) { + if (HPMHooks.count.HP_npc_event_doall_sub_post > 0) { void (*postHookFunc) (void *key, void *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) { + 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); @@ -48756,14 +49594,14 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { int HP_npc_event_do(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_pre ) { + if (HPMHooks.count.HP_npc_event_do_pre > 0) { int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48771,9 +49609,9 @@ int HP_npc_event_do(const char *name) { { retVal___ = HPMHooks.source.npc.event_do(name); } - if( HPMHooks.count.HP_npc_event_do_post ) { + if (HPMHooks.count.HP_npc_event_do_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) { + 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); } @@ -48783,14 +49621,14 @@ int HP_npc_event_do(const char *name) { int HP_npc_event_doall_id(const char *name, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_id_pre ) { + if (HPMHooks.count.HP_npc_event_doall_id_pre > 0) { int (*preHookFunc) (const char **name, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48798,9 +49636,9 @@ int HP_npc_event_doall_id(const char *name, int rid) { { retVal___ = HPMHooks.source.npc.event_doall_id(name, rid); } - if( HPMHooks.count.HP_npc_event_doall_id_post ) { + if (HPMHooks.count.HP_npc_event_doall_id_post > 0) { int (*postHookFunc) (int retVal___, const char *name, int rid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_post; hIndex++ ) { + 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); } @@ -48810,14 +49648,14 @@ int HP_npc_event_doall_id(const char *name, int rid) { int HP_npc_event_doall(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_pre ) { + if (HPMHooks.count.HP_npc_event_doall_pre > 0) { int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48825,9 +49663,9 @@ int HP_npc_event_doall(const char *name) { { retVal___ = HPMHooks.source.npc.event_doall(name); } - if( HPMHooks.count.HP_npc_event_doall_post ) { + if (HPMHooks.count.HP_npc_event_doall_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) { + 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); } @@ -48837,14 +49675,14 @@ int HP_npc_event_doall(const char *name) { int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_clock_pre ) { + if (HPMHooks.count.HP_npc_event_do_clock_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48852,9 +49690,9 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.npc.event_do_clock(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_event_do_clock_post ) { + if (HPMHooks.count.HP_npc_event_do_clock_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) { + 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); } @@ -48863,14 +49701,14 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { } void HP_npc_event_do_oninit(bool reload) { int hIndex = 0; - if( HPMHooks.count.HP_npc_event_do_oninit_pre ) { + if (HPMHooks.count.HP_npc_event_do_oninit_pre > 0) { void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) { + 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(&reload); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48878,9 +49716,9 @@ void HP_npc_event_do_oninit(bool reload) { { HPMHooks.source.npc.event_do_oninit(reload); } - if( HPMHooks.count.HP_npc_event_do_oninit_post ) { + if (HPMHooks.count.HP_npc_event_do_oninit_post > 0) { void (*postHookFunc) (bool reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) { + 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(reload); } @@ -48890,14 +49728,14 @@ void HP_npc_event_do_oninit(bool reload) { int HP_npc_timerevent_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_export_pre ) { + if (HPMHooks.count.HP_npc_timerevent_export_pre > 0) { int (*preHookFunc) (struct npc_data **nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48905,9 +49743,9 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) { { retVal___ = HPMHooks.source.npc.timerevent_export(nd, i); } - if( HPMHooks.count.HP_npc_timerevent_export_post ) { + if (HPMHooks.count.HP_npc_timerevent_export_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, int i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_post; hIndex++ ) { + 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); } @@ -48917,14 +49755,14 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) { int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_pre ) { + if (HPMHooks.count.HP_npc_timerevent_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48932,9 +49770,9 @@ int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_timerevent_post ) { + if (HPMHooks.count.HP_npc_timerevent_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) { + 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); } @@ -48944,14 +49782,14 @@ int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { int HP_npc_timerevent_start(struct npc_data *nd, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_start_pre ) { + if (HPMHooks.count.HP_npc_timerevent_start_pre > 0) { int (*preHookFunc) (struct npc_data **nd, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48959,9 +49797,9 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) { { retVal___ = HPMHooks.source.npc.timerevent_start(nd, rid); } - if( HPMHooks.count.HP_npc_timerevent_start_post ) { + if (HPMHooks.count.HP_npc_timerevent_start_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, int rid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_post; hIndex++ ) { + 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); } @@ -48971,14 +49809,14 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) { int HP_npc_timerevent_stop(struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_stop_pre ) { + if (HPMHooks.count.HP_npc_timerevent_stop_pre > 0) { int (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48986,9 +49824,9 @@ int HP_npc_timerevent_stop(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.timerevent_stop(nd); } - if( HPMHooks.count.HP_npc_timerevent_stop_post ) { + if (HPMHooks.count.HP_npc_timerevent_stop_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) { + 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); } @@ -48997,14 +49835,14 @@ int HP_npc_timerevent_stop(struct npc_data *nd) { } void HP_npc_timerevent_quit(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_timerevent_quit_pre ) { + if (HPMHooks.count.HP_npc_timerevent_quit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49012,9 +49850,9 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) { { HPMHooks.source.npc.timerevent_quit(sd); } - if( HPMHooks.count.HP_npc_timerevent_quit_post ) { + if (HPMHooks.count.HP_npc_timerevent_quit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func; postHookFunc(sd); } @@ -49024,14 +49862,14 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) { int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) { + if (HPMHooks.count.HP_npc_gettimerevent_tick_pre > 0) { int64 (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49039,9 +49877,9 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd); } - if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) { + if (HPMHooks.count.HP_npc_gettimerevent_tick_post > 0) { int64 (*postHookFunc) (int64 retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) { + 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); } @@ -49051,14 +49889,14 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) { + if (HPMHooks.count.HP_npc_settimerevent_tick_pre > 0) { int (*preHookFunc) (struct npc_data **nd, int *newtimer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49066,9 +49904,9 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { { retVal___ = HPMHooks.source.npc.settimerevent_tick(nd, newtimer); } - if( HPMHooks.count.HP_npc_settimerevent_tick_post ) { + if (HPMHooks.count.HP_npc_settimerevent_tick_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, int newtimer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_post; hIndex++ ) { + 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); } @@ -49078,14 +49916,14 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_pre ) { + if (HPMHooks.count.HP_npc_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **eventname, int *ontouch); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49093,9 +49931,9 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch { retVal___ = HPMHooks.source.npc.event(sd, eventname, ontouch); } - if( HPMHooks.count.HP_npc_event_post ) { + if (HPMHooks.count.HP_npc_event_post > 0) { 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++ ) { + 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); } @@ -49105,16 +49943,16 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) { + if (HPMHooks.count.HP_npc_touch_areanpc_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49124,9 +49962,9 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) { + if (HPMHooks.count.HP_npc_touch_areanpc_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) { + 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); @@ -49138,14 +49976,14 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) { + if (HPMHooks.count.HP_npc_touchnext_areanpc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, bool *leavemap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49153,9 +49991,9 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { { retVal___ = HPMHooks.source.npc.touchnext_areanpc(sd, leavemap); } - if( HPMHooks.count.HP_npc_touchnext_areanpc_post ) { + if (HPMHooks.count.HP_npc_touchnext_areanpc_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, bool leavemap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_post; hIndex++ ) { + 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); } @@ -49165,14 +50003,14 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_pre ) { + if (HPMHooks.count.HP_npc_touch_areanpc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49180,9 +50018,9 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { retVal___ = HPMHooks.source.npc.touch_areanpc(sd, m, x, y); } - if( HPMHooks.count.HP_npc_touch_areanpc_post ) { + if (HPMHooks.count.HP_npc_touch_areanpc_post > 0) { 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++ ) { + 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); } @@ -49192,14 +50030,14 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) { + if (HPMHooks.count.HP_npc_untouch_areanpc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func; retVal___ = preHookFunc(&sd, &m, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49207,9 +50045,9 @@ int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 { retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y); } - if( HPMHooks.count.HP_npc_untouch_areanpc_post ) { + if (HPMHooks.count.HP_npc_untouch_areanpc_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, m, x, y); } @@ -49219,14 +50057,14 @@ int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 int HP_npc_touch_areanpc2(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) { + if (HPMHooks.count.HP_npc_touch_areanpc2_pre > 0) { int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49234,9 +50072,9 @@ int HP_npc_touch_areanpc2(struct mob_data *md) { { retVal___ = HPMHooks.source.npc.touch_areanpc2(md); } - if( HPMHooks.count.HP_npc_touch_areanpc2_post ) { + if (HPMHooks.count.HP_npc_touch_areanpc2_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) { + 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); } @@ -49246,14 +50084,14 @@ int HP_npc_touch_areanpc2(struct mob_data *md) { int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_check_areanpc_pre ) { + if (HPMHooks.count.HP_npc_check_areanpc_pre > 0) { int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49261,9 +50099,9 @@ int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { { retVal___ = HPMHooks.source.npc.check_areanpc(flag, m, x, y, range); } - if( HPMHooks.count.HP_npc_check_areanpc_post ) { + if (HPMHooks.count.HP_npc_check_areanpc_post > 0) { 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++ ) { + 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); } @@ -49273,14 +50111,14 @@ int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { 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 ) { + if (HPMHooks.count.HP_npc_checknear_pre > 0) { struct npc_data* (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49288,9 +50126,9 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list { retVal___ = HPMHooks.source.npc.checknear(sd, bl); } - if( HPMHooks.count.HP_npc_checknear_post ) { + if (HPMHooks.count.HP_npc_checknear_post > 0) { 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++ ) { + 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); } @@ -49300,14 +50138,14 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list int HP_npc_globalmessage(const char *name, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_globalmessage_pre ) { + if (HPMHooks.count.HP_npc_globalmessage_pre > 0) { int (*preHookFunc) (const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49315,9 +50153,9 @@ int HP_npc_globalmessage(const char *name, const char *mes) { { retVal___ = HPMHooks.source.npc.globalmessage(name, mes); } - if( HPMHooks.count.HP_npc_globalmessage_post ) { + if (HPMHooks.count.HP_npc_globalmessage_post > 0) { int (*postHookFunc) (int retVal___, const char *name, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) { + 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); } @@ -49326,14 +50164,14 @@ int HP_npc_globalmessage(const char *name, const char *mes) { } 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 ) { + if (HPMHooks.count.HP_npc_run_tomb_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49341,9 +50179,9 @@ void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.npc.run_tomb(sd, nd); } - if( HPMHooks.count.HP_npc_run_tomb_post ) { + if (HPMHooks.count.HP_npc_run_tomb_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) { + 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); } @@ -49353,14 +50191,14 @@ void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_click_pre ) { + if (HPMHooks.count.HP_npc_click_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49368,9 +50206,9 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.click(sd, nd); } - if( HPMHooks.count.HP_npc_click_post ) { + if (HPMHooks.count.HP_npc_click_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) { + 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); } @@ -49380,14 +50218,14 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_scriptcont_pre ) { + if (HPMHooks.count.HP_npc_scriptcont_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *id, bool *closing); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49395,9 +50233,9 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { { retVal___ = HPMHooks.source.npc.scriptcont(sd, id, closing); } - if( HPMHooks.count.HP_npc_scriptcont_post ) { + if (HPMHooks.count.HP_npc_scriptcont_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int id, bool closing); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_post; hIndex++ ) { + 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); } @@ -49407,14 +50245,14 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buysellsel_pre ) { + if (HPMHooks.count.HP_npc_buysellsel_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49422,9 +50260,9 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { { retVal___ = HPMHooks.source.npc.buysellsel(sd, id, type); } - if( HPMHooks.count.HP_npc_buysellsel_post ) { + if (HPMHooks.count.HP_npc_buysellsel_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int id, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_post; hIndex++ ) { + 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); } @@ -49434,14 +50272,14 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) { + if (HPMHooks.count.HP_npc_cashshop_buylist_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *points, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) { + 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, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49449,9 +50287,9 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct item { retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, item_list); } - if( HPMHooks.count.HP_npc_cashshop_buylist_post ) { + if (HPMHooks.count.HP_npc_cashshop_buylist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int points, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) { + 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, item_list); } @@ -49461,14 +50299,14 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct item int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_sub_pre ) { + if (HPMHooks.count.HP_npc_buylist_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) { + 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, &item_list, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49476,9 +50314,9 @@ int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, { retVal___ = HPMHooks.source.npc.buylist_sub(sd, item_list, nd); } - if( HPMHooks.count.HP_npc_buylist_sub_post ) { + if (HPMHooks.count.HP_npc_buylist_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) { + 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, item_list, nd); } @@ -49488,14 +50326,14 @@ int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buy_pre ) { + if (HPMHooks.count.HP_npc_cashshop_buy_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49503,9 +50341,9 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int { retVal___ = HPMHooks.source.npc.cashshop_buy(sd, nameid, amount, points); } - if( HPMHooks.count.HP_npc_cashshop_buy_post ) { + if (HPMHooks.count.HP_npc_cashshop_buy_post > 0) { 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++ ) { + 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); } @@ -49515,14 +50353,14 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_pre ) { + if (HPMHooks.count.HP_npc_buylist_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func; retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49530,9 +50368,9 @@ int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { { retVal___ = HPMHooks.source.npc.buylist(sd, item_list); } - if( HPMHooks.count.HP_npc_buylist_post ) { + if (HPMHooks.count.HP_npc_buylist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -49542,14 +50380,14 @@ int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_sub_pre ) { + if (HPMHooks.count.HP_npc_selllist_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) { + 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, &item_list, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49557,9 +50395,9 @@ int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, { retVal___ = HPMHooks.source.npc.selllist_sub(sd, item_list, nd); } - if( HPMHooks.count.HP_npc_selllist_sub_post ) { + if (HPMHooks.count.HP_npc_selllist_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) { + 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, item_list, nd); } @@ -49569,14 +50407,14 @@ int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_pre ) { + if (HPMHooks.count.HP_npc_selllist_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func; retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49584,9 +50422,9 @@ int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { { retVal___ = HPMHooks.source.npc.selllist(sd, item_list); } - if( HPMHooks.count.HP_npc_selllist_post ) { + if (HPMHooks.count.HP_npc_selllist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -49596,14 +50434,14 @@ int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { int HP_npc_remove_map(struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_remove_map_pre ) { + if (HPMHooks.count.HP_npc_remove_map_pre > 0) { int (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49611,9 +50449,9 @@ int HP_npc_remove_map(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.remove_map(nd); } - if( HPMHooks.count.HP_npc_remove_map_post ) { + if (HPMHooks.count.HP_npc_remove_map_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) { + 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); } @@ -49623,16 +50461,16 @@ int HP_npc_remove_map(struct npc_data *nd) { int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_pre ) { + if (HPMHooks.count.HP_npc_unload_ev_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49642,9 +50480,9 @@ int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.npc.unload_ev(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_unload_ev_post ) { + if (HPMHooks.count.HP_npc_unload_ev_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) { + 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); @@ -49656,16 +50494,16 @@ int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list ap) { int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_label_pre ) { + if (HPMHooks.count.HP_npc_unload_ev_label_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49675,9 +50513,9 @@ int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_npc_unload_ev_label_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) { + 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); @@ -49689,16 +50527,16 @@ int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list ap) { int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) { + if (HPMHooks.count.HP_npc_unload_dup_sub_pre > 0) { int (*preHookFunc) (struct npc_data **nd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49708,9 +50546,9 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_unload_dup_sub_post ) { + if (HPMHooks.count.HP_npc_unload_dup_sub_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) { + 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); @@ -49721,14 +50559,14 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { } void HP_npc_unload_duplicates(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unload_duplicates_pre ) { + if (HPMHooks.count.HP_npc_unload_duplicates_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49736,9 +50574,9 @@ void HP_npc_unload_duplicates(struct npc_data *nd) { { HPMHooks.source.npc.unload_duplicates(nd); } - if( HPMHooks.count.HP_npc_unload_duplicates_post ) { + if (HPMHooks.count.HP_npc_unload_duplicates_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; postHookFunc(nd); } @@ -49748,14 +50586,14 @@ void HP_npc_unload_duplicates(struct npc_data *nd) { int HP_npc_unload(struct npc_data *nd, bool single) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_pre ) { + if (HPMHooks.count.HP_npc_unload_pre > 0) { int (*preHookFunc) (struct npc_data **nd, bool *single); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49763,9 +50601,9 @@ int HP_npc_unload(struct npc_data *nd, bool single) { { retVal___ = HPMHooks.source.npc.unload(nd, single); } - if( HPMHooks.count.HP_npc_unload_post ) { + if (HPMHooks.count.HP_npc_unload_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, bool single); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++ ) { + 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); } @@ -49774,14 +50612,14 @@ int HP_npc_unload(struct npc_data *nd, bool single) { } void HP_npc_clearsrcfile(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_clearsrcfile_pre ) { + if (HPMHooks.count.HP_npc_clearsrcfile_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49789,9 +50627,9 @@ void HP_npc_clearsrcfile(void) { { HPMHooks.source.npc.clearsrcfile(); } - if( HPMHooks.count.HP_npc_clearsrcfile_post ) { + if (HPMHooks.count.HP_npc_clearsrcfile_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func; postHookFunc(); } @@ -49800,14 +50638,14 @@ void HP_npc_clearsrcfile(void) { } void HP_npc_addsrcfile(const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_npc_addsrcfile_pre ) { + if (HPMHooks.count.HP_npc_addsrcfile_pre > 0) { void (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49815,9 +50653,9 @@ void HP_npc_addsrcfile(const char *name) { { HPMHooks.source.npc.addsrcfile(name); } - if( HPMHooks.count.HP_npc_addsrcfile_post ) { + if (HPMHooks.count.HP_npc_addsrcfile_post > 0) { void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func; postHookFunc(name); } @@ -49826,14 +50664,14 @@ void HP_npc_addsrcfile(const char *name) { } void HP_npc_delsrcfile(const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_npc_delsrcfile_pre ) { + if (HPMHooks.count.HP_npc_delsrcfile_pre > 0) { void (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49841,9 +50679,9 @@ void HP_npc_delsrcfile(const char *name) { { HPMHooks.source.npc.delsrcfile(name); } - if( HPMHooks.count.HP_npc_delsrcfile_post ) { + if (HPMHooks.count.HP_npc_delsrcfile_post > 0) { void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func; postHookFunc(name); } @@ -49853,14 +50691,14 @@ void HP_npc_delsrcfile(const char *name) { const char* HP_npc_retainpathreference(const char *filepath) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_retainpathreference_pre ) { + if (HPMHooks.count.HP_npc_retainpathreference_pre > 0) { const char* (*preHookFunc) (const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_retainpathreference_pre[hIndex].func; retVal___ = preHookFunc(&filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49868,9 +50706,9 @@ const char* HP_npc_retainpathreference(const char *filepath) { { retVal___ = HPMHooks.source.npc.retainpathreference(filepath); } - if( HPMHooks.count.HP_npc_retainpathreference_post ) { + if (HPMHooks.count.HP_npc_retainpathreference_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_retainpathreference_post[hIndex].func; retVal___ = postHookFunc(retVal___, filepath); } @@ -49879,14 +50717,14 @@ const char* HP_npc_retainpathreference(const char *filepath) { } void HP_npc_releasepathreference(const char *filepath) { int hIndex = 0; - if( HPMHooks.count.HP_npc_releasepathreference_pre ) { + if (HPMHooks.count.HP_npc_releasepathreference_pre > 0) { void (*preHookFunc) (const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_releasepathreference_pre[hIndex].func; preHookFunc(&filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49894,9 +50732,9 @@ void HP_npc_releasepathreference(const char *filepath) { { HPMHooks.source.npc.releasepathreference(filepath); } - if( HPMHooks.count.HP_npc_releasepathreference_post ) { + if (HPMHooks.count.HP_npc_releasepathreference_post > 0) { void (*postHookFunc) (const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_releasepathreference_post[hIndex].func; postHookFunc(filepath); } @@ -49905,14 +50743,14 @@ void HP_npc_releasepathreference(const char *filepath) { } 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 ) { + if (HPMHooks.count.HP_npc_parsename_pre > 0) { void (*preHookFunc) (struct npc_data **nd, const char **name, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49920,9 +50758,9 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, { HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath); } - if( HPMHooks.count.HP_npc_parsename_post ) { + if (HPMHooks.count.HP_npc_parsename_post > 0) { 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++ ) { + 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); } @@ -49932,14 +50770,14 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, int HP_npc_parseview(const char *w4, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_parseview_pre ) { + if (HPMHooks.count.HP_npc_parseview_pre > 0) { int (*preHookFunc) (const char **w4, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func; retVal___ = preHookFunc(&w4, &start, &buffer, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49947,9 +50785,9 @@ int HP_npc_parseview(const char *w4, const char *start, const char *buffer, cons { retVal___ = HPMHooks.source.npc.parseview(w4, start, buffer, filepath); } - if( HPMHooks.count.HP_npc_parseview_post ) { + if (HPMHooks.count.HP_npc_parseview_post > 0) { int (*postHookFunc) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parseview_post[hIndex].func; retVal___ = postHookFunc(retVal___, w4, start, buffer, filepath); } @@ -49959,14 +50797,14 @@ int HP_npc_parseview(const char *w4, const char *start, const char *buffer, cons bool HP_npc_viewisid(const char *viewid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_viewisid_pre ) { + if (HPMHooks.count.HP_npc_viewisid_pre > 0) { bool (*preHookFunc) (const char **viewid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func; retVal___ = preHookFunc(&viewid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49974,9 +50812,9 @@ bool HP_npc_viewisid(const char *viewid) { { retVal___ = HPMHooks.source.npc.viewisid(viewid); } - if( HPMHooks.count.HP_npc_viewisid_post ) { + if (HPMHooks.count.HP_npc_viewisid_post > 0) { bool (*postHookFunc) (bool retVal___, const char *viewid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_viewisid_post[hIndex].func; retVal___ = postHookFunc(retVal___, viewid); } @@ -49986,14 +50824,14 @@ bool HP_npc_viewisid(const char *viewid) { struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) { int hIndex = 0; struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_create_npc_pre ) { + if (HPMHooks.count.HP_npc_create_npc_pre > 0) { struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; retVal___ = preHookFunc(&subtype, &m, &x, &y, &dir, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50001,9 +50839,9 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y { retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_); } - if( HPMHooks.count.HP_npc_create_npc_post ) { + if (HPMHooks.count.HP_npc_create_npc_post > 0) { struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_); } @@ -50013,14 +50851,14 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y 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 ) { + if (HPMHooks.count.HP_npc_add_warp_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50028,9 +50866,9 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho { 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 ) { + if (HPMHooks.count.HP_npc_add_warp_post > 0) { 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++ ) { + 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); } @@ -50040,14 +50878,14 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_warp_pre ) { + if (HPMHooks.count.HP_npc_parse_warp_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50055,9 +50893,9 @@ const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, co { retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_warp_post ) { + if (HPMHooks.count.HP_npc_parse_warp_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) { + 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, retval); } @@ -50067,14 +50905,14 @@ const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, co const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_shop_pre ) { + if (HPMHooks.count.HP_npc_parse_shop_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50082,9 +50920,9 @@ const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, co { retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_shop_post ) { + if (HPMHooks.count.HP_npc_parse_shop_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) { + 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, retval); } @@ -50094,14 +50932,14 @@ const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, co const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) { + if (HPMHooks.count.HP_npc_parse_unknown_object_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func; retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50109,9 +50947,9 @@ const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const ch { retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_unknown_object_post ) { + if (HPMHooks.count.HP_npc_parse_unknown_object_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func; retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } @@ -50120,14 +50958,14 @@ const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const ch } 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 ) { + if (HPMHooks.count.HP_npc_convertlabel_db_pre > 0) { void (*preHookFunc) (struct npc_label_list **label_list, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50135,9 +50973,9 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep { HPMHooks.source.npc.convertlabel_db(label_list, filepath); } - if( HPMHooks.count.HP_npc_convertlabel_db_post ) { + if (HPMHooks.count.HP_npc_convertlabel_db_post > 0) { void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) { + 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); } @@ -50147,14 +50985,14 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_skip_script_pre ) { + if (HPMHooks.count.HP_npc_skip_script_pre > 0) { const char* (*preHookFunc) (const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50162,9 +51000,9 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char { retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_skip_script_post ) { + if (HPMHooks.count.HP_npc_skip_script_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) { + 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, retval); } @@ -50174,14 +51012,14 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_script_pre ) { + if (HPMHooks.count.HP_npc_parse_script_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) { + 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, &options, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50189,9 +51027,9 @@ const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, { retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_npc_parse_script_post ) { + if (HPMHooks.count.HP_npc_parse_script_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) { + 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, options, retval); } @@ -50200,14 +51038,14 @@ const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, } void HP_npc_add_to_location(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_add_to_location_pre ) { + if (HPMHooks.count.HP_npc_add_to_location_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_add_to_location_pre[hIndex].func; preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50215,9 +51053,9 @@ void HP_npc_add_to_location(struct npc_data *nd) { { HPMHooks.source.npc.add_to_location(nd); } - if( HPMHooks.count.HP_npc_add_to_location_post ) { + if (HPMHooks.count.HP_npc_add_to_location_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_add_to_location_post[hIndex].func; postHookFunc(nd); } @@ -50227,14 +51065,14 @@ void HP_npc_add_to_location(struct npc_data *nd) { bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_script_sub_pre ) { + if (HPMHooks.count.HP_npc_duplicate_script_sub_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_script_sub_pre[hIndex].func; retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50242,9 +51080,9 @@ bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd { retVal___ = HPMHooks.source.npc.duplicate_script_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_script_sub_post ) { + if (HPMHooks.count.HP_npc_duplicate_script_sub_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_script_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } @@ -50254,14 +51092,14 @@ bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_shop_sub_pre ) { + if (HPMHooks.count.HP_npc_duplicate_shop_sub_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_shop_sub_pre[hIndex].func; retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50269,9 +51107,9 @@ bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, { retVal___ = HPMHooks.source.npc.duplicate_shop_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_shop_sub_post ) { + if (HPMHooks.count.HP_npc_duplicate_shop_sub_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_shop_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } @@ -50281,14 +51119,14 @@ bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_warp_sub_pre ) { + if (HPMHooks.count.HP_npc_duplicate_warp_sub_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_warp_sub_pre[hIndex].func; retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50296,9 +51134,9 @@ bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, { retVal___ = HPMHooks.source.npc.duplicate_warp_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_warp_sub_post ) { + if (HPMHooks.count.HP_npc_duplicate_warp_sub_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_warp_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } @@ -50308,14 +51146,14 @@ bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_sub_pre ) { + if (HPMHooks.count.HP_npc_duplicate_sub_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_sub_pre[hIndex].func; retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50323,9 +51161,9 @@ bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int x { retVal___ = HPMHooks.source.npc.duplicate_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_sub_post ) { + if (HPMHooks.count.HP_npc_duplicate_sub_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } @@ -50335,14 +51173,14 @@ bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int x const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_duplicate_pre ) { + if (HPMHooks.count.HP_npc_parse_duplicate_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) { + 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, &options, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50350,9 +51188,9 @@ const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w { retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_npc_parse_duplicate_post ) { + if (HPMHooks.count.HP_npc_parse_duplicate_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) { + 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, options, retval); } @@ -50362,14 +51200,14 @@ const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_duplicate4instance_pre ) { + if (HPMHooks.count.HP_npc_duplicate4instance_pre > 0) { int (*preHookFunc) (struct npc_data **snd, int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50377,9 +51215,9 @@ int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { { retVal___ = HPMHooks.source.npc.duplicate4instance(snd, m); } - if( HPMHooks.count.HP_npc_duplicate4instance_post ) { + if (HPMHooks.count.HP_npc_duplicate4instance_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *snd, int16 m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_post; hIndex++ ) { + 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); } @@ -50388,14 +51226,14 @@ int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { } void HP_npc_setcells(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setcells_pre ) { + if (HPMHooks.count.HP_npc_setcells_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50403,9 +51241,9 @@ void HP_npc_setcells(struct npc_data *nd) { { HPMHooks.source.npc.setcells(nd); } - if( HPMHooks.count.HP_npc_setcells_post ) { + if (HPMHooks.count.HP_npc_setcells_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func; postHookFunc(nd); } @@ -50415,16 +51253,16 @@ void HP_npc_setcells(struct npc_data *nd) { int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) { + if (HPMHooks.count.HP_npc_unsetcells_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50434,9 +51272,9 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_unsetcells_sub_post ) { + if (HPMHooks.count.HP_npc_unsetcells_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) { + 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); @@ -50447,14 +51285,14 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { } void HP_npc_unsetcells(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unsetcells_pre ) { + if (HPMHooks.count.HP_npc_unsetcells_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50462,9 +51300,9 @@ void HP_npc_unsetcells(struct npc_data *nd) { { HPMHooks.source.npc.unsetcells(nd); } - if( HPMHooks.count.HP_npc_unsetcells_post ) { + if (HPMHooks.count.HP_npc_unsetcells_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func; postHookFunc(nd); } @@ -50473,14 +51311,14 @@ void HP_npc_unsetcells(struct npc_data *nd) { } void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { int hIndex = 0; - if( HPMHooks.count.HP_npc_movenpc_pre ) { + if (HPMHooks.count.HP_npc_movenpc_pre > 0) { void (*preHookFunc) (struct npc_data **nd, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50488,9 +51326,9 @@ void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { { HPMHooks.source.npc.movenpc(nd, x, y); } - if( HPMHooks.count.HP_npc_movenpc_post ) { + if (HPMHooks.count.HP_npc_movenpc_post > 0) { void (*postHookFunc) (struct npc_data *nd, int16 x, int16 y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_movenpc_post[hIndex].func; postHookFunc(nd, x, y); } @@ -50499,14 +51337,14 @@ void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { } void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setdisplayname_pre ) { + if (HPMHooks.count.HP_npc_setdisplayname_pre > 0) { void (*preHookFunc) (struct npc_data **nd, const char **newname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50514,9 +51352,9 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { { HPMHooks.source.npc.setdisplayname(nd, newname); } - if( HPMHooks.count.HP_npc_setdisplayname_post ) { + if (HPMHooks.count.HP_npc_setdisplayname_post > 0) { void (*postHookFunc) (struct npc_data *nd, const char *newname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setdisplayname_post[hIndex].func; postHookFunc(nd, newname); } @@ -50525,14 +51363,14 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { } void HP_npc_setclass(struct npc_data *nd, short class_) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setclass_pre ) { + if (HPMHooks.count.HP_npc_setclass_pre > 0) { void (*preHookFunc) (struct npc_data **nd, short *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50540,9 +51378,9 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { { HPMHooks.source.npc.setclass(nd, class_); } - if( HPMHooks.count.HP_npc_setclass_post ) { + if (HPMHooks.count.HP_npc_setclass_post > 0) { void (*postHookFunc) (struct npc_data *nd, short class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; postHookFunc(nd, class_); } @@ -50552,14 +51390,14 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { 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___ = 0; - if( HPMHooks.count.HP_npc_do_atcmd_event_pre ) { + if (HPMHooks.count.HP_npc_do_atcmd_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **command, const char **message, const char **eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50567,9 +51405,9 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons { retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname); } - if( HPMHooks.count.HP_npc_do_atcmd_event_post ) { + if (HPMHooks.count.HP_npc_do_atcmd_event_post > 0) { 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++ ) { + 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); } @@ -50579,14 +51417,14 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_function_pre ) { + if (HPMHooks.count.HP_npc_parse_function_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50594,9 +51432,9 @@ const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3 { retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_function_post ) { + if (HPMHooks.count.HP_npc_parse_function_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) { + 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, retval); } @@ -50605,14 +51443,14 @@ const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3 } void HP_npc_parse_mob2(struct spawn_data *mobspawn) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parse_mob2_pre ) { + if (HPMHooks.count.HP_npc_parse_mob2_pre > 0) { void (*preHookFunc) (struct spawn_data **mobspawn); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50620,9 +51458,9 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) { { HPMHooks.source.npc.parse_mob2(mobspawn); } - if( HPMHooks.count.HP_npc_parse_mob2_post ) { + if (HPMHooks.count.HP_npc_parse_mob2_post > 0) { void (*postHookFunc) (struct spawn_data *mobspawn); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func; postHookFunc(mobspawn); } @@ -50632,14 +51470,14 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) { const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mob_pre ) { + if (HPMHooks.count.HP_npc_parse_mob_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50647,9 +51485,9 @@ const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, con { retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_mob_post ) { + if (HPMHooks.count.HP_npc_parse_mob_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) { + 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, retval); } @@ -50659,14 +51497,14 @@ const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, con const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mapflag_pre ) { + if (HPMHooks.count.HP_npc_parse_mapflag_pre > 0) { const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50674,9 +51512,9 @@ const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, { retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_mapflag_post ) { + if (HPMHooks.count.HP_npc_parse_mapflag_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) { + 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, retval); } @@ -50685,14 +51523,14 @@ const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, } void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) { + if (HPMHooks.count.HP_npc_parse_unknown_mapflag_pre > 0) { void (*preHookFunc) (const char **name, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func; preHookFunc(&name, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50700,9 +51538,9 @@ void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char * { HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) { + if (HPMHooks.count.HP_npc_parse_unknown_mapflag_post > 0) { void (*postHookFunc) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func; postHookFunc(name, w3, w4, start, buffer, filepath, retval); } @@ -50712,14 +51550,14 @@ void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char * int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_parsesrcfile_pre ) { + if (HPMHooks.count.HP_npc_parsesrcfile_pre > 0) { int (*preHookFunc) (const char **filepath, bool *runOnInit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func; retVal___ = preHookFunc(&filepath, &runOnInit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50727,9 +51565,9 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { { retVal___ = HPMHooks.source.npc.parsesrcfile(filepath, runOnInit); } - if( HPMHooks.count.HP_npc_parsesrcfile_post ) { + if (HPMHooks.count.HP_npc_parsesrcfile_post > 0) { int (*postHookFunc) (int retVal___, const char *filepath, bool runOnInit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parsesrcfile_post[hIndex].func; retVal___ = postHookFunc(retVal___, filepath, runOnInit); } @@ -50739,14 +51577,14 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_script_event_pre ) { + if (HPMHooks.count.HP_npc_script_event_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, enum npce_event *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50754,9 +51592,9 @@ int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { { retVal___ = HPMHooks.source.npc.script_event(sd, type); } - if( HPMHooks.count.HP_npc_script_event_post ) { + if (HPMHooks.count.HP_npc_script_event_post > 0) { 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++ ) { + 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); } @@ -50765,14 +51603,14 @@ int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { } void HP_npc_read_event_script(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_read_event_script_pre ) { + if (HPMHooks.count.HP_npc_read_event_script_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50780,9 +51618,9 @@ void HP_npc_read_event_script(void) { { HPMHooks.source.npc.read_event_script(); } - if( HPMHooks.count.HP_npc_read_event_script_post ) { + if (HPMHooks.count.HP_npc_read_event_script_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) { + 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(); } @@ -50792,16 +51630,16 @@ void HP_npc_read_event_script(void) { int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) { + if (HPMHooks.count.HP_npc_path_db_clear_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50811,9 +51649,9 @@ int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_npc_path_db_clear_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) { + 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); @@ -50825,16 +51663,16 @@ int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list args) int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) { + if (HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50844,9 +51682,9 @@ int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list a 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 ) { + if (HPMHooks.count.HP_npc_ev_label_db_clear_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) { + 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); @@ -50858,14 +51696,14 @@ int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list a int HP_npc_reload(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_reload_pre ) { + if (HPMHooks.count.HP_npc_reload_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50873,9 +51711,9 @@ int HP_npc_reload(void) { { retVal___ = HPMHooks.source.npc.reload(); } - if( HPMHooks.count.HP_npc_reload_post ) { + if (HPMHooks.count.HP_npc_reload_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_reload_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -50885,14 +51723,14 @@ int HP_npc_reload(void) { bool HP_npc_unloadfile(const char *filepath) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_unloadfile_pre ) { + if (HPMHooks.count.HP_npc_unloadfile_pre > 0) { bool (*preHookFunc) (const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50900,9 +51738,9 @@ bool HP_npc_unloadfile(const char *filepath) { { retVal___ = HPMHooks.source.npc.unloadfile(filepath); } - if( HPMHooks.count.HP_npc_unloadfile_post ) { + if (HPMHooks.count.HP_npc_unloadfile_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; retVal___ = postHookFunc(retVal___, filepath); } @@ -50911,14 +51749,14 @@ bool HP_npc_unloadfile(const char *filepath) { } void HP_npc_do_clear_npc(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_do_clear_npc_pre ) { + if (HPMHooks.count.HP_npc_do_clear_npc_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50926,9 +51764,9 @@ void HP_npc_do_clear_npc(void) { { HPMHooks.source.npc.do_clear_npc(); } - if( HPMHooks.count.HP_npc_do_clear_npc_post ) { + if (HPMHooks.count.HP_npc_do_clear_npc_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) { + 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(); } @@ -50937,14 +51775,14 @@ void HP_npc_do_clear_npc(void) { } void HP_npc_debug_warps_sub(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_debug_warps_sub_pre ) { + if (HPMHooks.count.HP_npc_debug_warps_sub_pre > 0) { void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50952,9 +51790,9 @@ void HP_npc_debug_warps_sub(struct npc_data *nd) { { HPMHooks.source.npc.debug_warps_sub(nd); } - if( HPMHooks.count.HP_npc_debug_warps_sub_post ) { + if (HPMHooks.count.HP_npc_debug_warps_sub_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) { + 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); } @@ -50963,14 +51801,14 @@ void HP_npc_debug_warps_sub(struct npc_data *nd) { } void HP_npc_debug_warps(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_debug_warps_pre ) { + if (HPMHooks.count.HP_npc_debug_warps_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50978,9 +51816,9 @@ void HP_npc_debug_warps(void) { { HPMHooks.source.npc.debug_warps(); } - if( HPMHooks.count.HP_npc_debug_warps_post ) { + if (HPMHooks.count.HP_npc_debug_warps_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func; postHookFunc(); } @@ -50989,14 +51827,14 @@ void HP_npc_debug_warps(void) { } void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_count_funds_pre ) { + if (HPMHooks.count.HP_npc_trader_count_funds_pre > 0) { void (*preHookFunc) (struct npc_data **nd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_count_funds_pre[hIndex].func; preHookFunc(&nd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51004,9 +51842,9 @@ void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { HPMHooks.source.npc.trader_count_funds(nd, sd); } - if( HPMHooks.count.HP_npc_trader_count_funds_post ) { + if (HPMHooks.count.HP_npc_trader_count_funds_post > 0) { void (*postHookFunc) (struct npc_data *nd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_count_funds_post[hIndex].func; postHookFunc(nd, sd); } @@ -51016,14 +51854,14 @@ void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price, int points) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_pay_pre ) { + if (HPMHooks.count.HP_npc_trader_pay_pre > 0) { bool (*preHookFunc) (struct npc_data **nd, struct map_session_data **sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_pay_pre[hIndex].func; retVal___ = preHookFunc(&nd, &sd, &price, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51031,9 +51869,9 @@ bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int pri { retVal___ = HPMHooks.source.npc.trader_pay(nd, sd, price, points); } - if( HPMHooks.count.HP_npc_trader_pay_post ) { + if (HPMHooks.count.HP_npc_trader_pay_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_pay_post[hIndex].func; retVal___ = postHookFunc(retVal___, nd, sd, price, points); } @@ -51042,14 +51880,14 @@ bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int pri } void HP_npc_trader_update(int master) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_update_pre ) { + if (HPMHooks.count.HP_npc_trader_update_pre > 0) { void (*preHookFunc) (int *master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_update_pre[hIndex].func; preHookFunc(&master); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51057,9 +51895,9 @@ void HP_npc_trader_update(int master) { { HPMHooks.source.npc.trader_update(master); } - if( HPMHooks.count.HP_npc_trader_update_post ) { + if (HPMHooks.count.HP_npc_trader_update_post > 0) { void (*postHookFunc) (int master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_update_post[hIndex].func; postHookFunc(master); } @@ -51069,14 +51907,14 @@ void HP_npc_trader_update(int master) { int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_market_buylist_pre ) { + if (HPMHooks.count.HP_npc_market_buylist_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51084,9 +51922,9 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis { retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list); } - if( HPMHooks.count.HP_npc_market_buylist_post ) { + if (HPMHooks.count.HP_npc_market_buylist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -51096,14 +51934,14 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_open_pre ) { + if (HPMHooks.count.HP_npc_trader_open_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_open_pre[hIndex].func; retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51111,9 +51949,9 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.trader_open(sd, nd); } - if( HPMHooks.count.HP_npc_trader_open_post ) { + if (HPMHooks.count.HP_npc_trader_open_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nd); } @@ -51122,14 +51960,14 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { } void HP_npc_market_fromsql(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_fromsql_pre ) { + if (HPMHooks.count.HP_npc_market_fromsql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_fromsql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51137,9 +51975,9 @@ void HP_npc_market_fromsql(void) { { HPMHooks.source.npc.market_fromsql(); } - if( HPMHooks.count.HP_npc_market_fromsql_post ) { + if (HPMHooks.count.HP_npc_market_fromsql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_fromsql_post[hIndex].func; postHookFunc(); } @@ -51148,14 +51986,14 @@ void HP_npc_market_fromsql(void) { } void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_tosql_pre ) { + if (HPMHooks.count.HP_npc_market_tosql_pre > 0) { void (*preHookFunc) (struct npc_data **nd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func; preHookFunc(&nd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51163,9 +52001,9 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { { HPMHooks.source.npc.market_tosql(nd, index); } - if( HPMHooks.count.HP_npc_market_tosql_post ) { + if (HPMHooks.count.HP_npc_market_tosql_post > 0) { void (*postHookFunc) (struct npc_data *nd, unsigned short index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func; postHookFunc(nd, index); } @@ -51174,14 +52012,14 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { } void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_pre ) { + if (HPMHooks.count.HP_npc_market_delfromsql_pre > 0) { void (*preHookFunc) (struct npc_data **nd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func; preHookFunc(&nd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51189,9 +52027,9 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { { HPMHooks.source.npc.market_delfromsql(nd, index); } - if( HPMHooks.count.HP_npc_market_delfromsql_post ) { + if (HPMHooks.count.HP_npc_market_delfromsql_post > 0) { void (*postHookFunc) (struct npc_data *nd, unsigned short index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func; postHookFunc(nd, index); } @@ -51200,14 +52038,14 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { } void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) { + if (HPMHooks.count.HP_npc_market_delfromsql_sub_pre > 0) { void (*preHookFunc) (const char **npcname, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func; preHookFunc(&npcname, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51215,9 +52053,9 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { { HPMHooks.source.npc.market_delfromsql_sub(npcname, index); } - if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) { + if (HPMHooks.count.HP_npc_market_delfromsql_sub_post > 0) { void (*postHookFunc) (const char *npcname, unsigned short index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func; postHookFunc(npcname, index); } @@ -51227,14 +52065,14 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { bool HP_npc_db_checkid(const int id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_db_checkid_pre ) { + if (HPMHooks.count.HP_npc_db_checkid_pre > 0) { bool (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_db_checkid_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51242,26 +52080,52 @@ bool HP_npc_db_checkid(const int id) { { retVal___ = HPMHooks.source.npc.db_checkid(id); } - if( HPMHooks.count.HP_npc_db_checkid_post ) { + if (HPMHooks.count.HP_npc_db_checkid_post > 0) { bool (*postHookFunc) (bool retVal___, const int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_db_checkid_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } } return retVal___; } +void HP_npc_refresh(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_refresh_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.refresh(nd); + } + if (HPMHooks.count.HP_npc_refresh_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) { + if (HPMHooks.count.HP_npc_secure_timeout_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51269,9 +52133,9 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) { + if (HPMHooks.count.HP_npc_secure_timeout_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) { + 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); } @@ -51281,14 +52145,14 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { /* nullpo_interface */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51296,9 +52160,9 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; postHookFunc(file, line, func, targetname, title); } @@ -51308,14 +52172,14 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const /* party_interface */ void HP_party_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_party_init_pre ) { + if (HPMHooks.count.HP_party_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51323,9 +52187,9 @@ void HP_party_init(bool minimal) { { HPMHooks.source.party.init(minimal); } - if( HPMHooks.count.HP_party_init_post ) { + if (HPMHooks.count.HP_party_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func; postHookFunc(minimal); } @@ -51334,14 +52198,14 @@ void HP_party_init(bool minimal) { } void HP_party_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_party_final_pre ) { + if (HPMHooks.count.HP_party_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51349,9 +52213,9 @@ void HP_party_final(void) { { HPMHooks.source.party.final(); } - if( HPMHooks.count.HP_party_final_post ) { + if (HPMHooks.count.HP_party_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func; postHookFunc(); } @@ -51361,14 +52225,14 @@ void HP_party_final(void) { struct party_data* HP_party_search(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_search_pre ) { + if (HPMHooks.count.HP_party_search_pre > 0) { struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51376,9 +52240,9 @@ struct party_data* HP_party_search(int party_id) { { retVal___ = HPMHooks.source.party.search(party_id); } - if( HPMHooks.count.HP_party_search_post ) { + if (HPMHooks.count.HP_party_search_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_post; hIndex++ ) { + 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); } @@ -51388,14 +52252,14 @@ struct party_data* HP_party_search(int party_id) { struct party_data* HP_party_searchname(const char *str) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_searchname_pre ) { + if (HPMHooks.count.HP_party_searchname_pre > 0) { struct party_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51403,9 +52267,9 @@ struct party_data* HP_party_searchname(const char *str) { { retVal___ = HPMHooks.source.party.searchname(str); } - if( HPMHooks.count.HP_party_searchname_post ) { + if (HPMHooks.count.HP_party_searchname_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -51415,14 +52279,14 @@ struct party_data* HP_party_searchname(const char *str) { int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_getmemberid_pre ) { + if (HPMHooks.count.HP_party_getmemberid_pre > 0) { int (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51430,9 +52294,9 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.getmemberid(p, sd); } - if( HPMHooks.count.HP_party_getmemberid_post ) { + if (HPMHooks.count.HP_party_getmemberid_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) { + 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); } @@ -51442,14 +52306,14 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { 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 ) { + if (HPMHooks.count.HP_party_getavailablesd_pre > 0) { struct map_session_data* (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51457,9 +52321,9 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) { { retVal___ = HPMHooks.source.party.getavailablesd(p); } - if( HPMHooks.count.HP_party_getavailablesd_post ) { + if (HPMHooks.count.HP_party_getavailablesd_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -51469,14 +52333,14 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) { int HP_party_create(struct map_session_data *sd, const char *name, int item, int item2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_create_pre ) { + if (HPMHooks.count.HP_party_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name, int *item, int *item2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51484,9 +52348,9 @@ int HP_party_create(struct map_session_data *sd, const char *name, int item, int { retVal___ = HPMHooks.source.party.create(sd, name, item, item2); } - if( HPMHooks.count.HP_party_create_post ) { + if (HPMHooks.count.HP_party_create_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int item, int item2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) { + 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); } @@ -51495,14 +52359,14 @@ int HP_party_create(struct map_session_data *sd, const char *name, int item, int } void HP_party_created(int account_id, int char_id, int fail, int party_id, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_party_created_pre ) { + if (HPMHooks.count.HP_party_created_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51510,9 +52374,9 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, const { HPMHooks.source.party.created(account_id, char_id, fail, party_id, name); } - if( HPMHooks.count.HP_party_created_post ) { + if (HPMHooks.count.HP_party_created_post > 0) { void (*postHookFunc) (int account_id, int char_id, int fail, int party_id, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) { + 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); } @@ -51522,14 +52386,14 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, const int HP_party_request_info(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_request_info_pre ) { + if (HPMHooks.count.HP_party_request_info_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51537,9 +52401,9 @@ int HP_party_request_info(int party_id, int char_id) { { retVal___ = HPMHooks.source.party.request_info(party_id, char_id); } - if( HPMHooks.count.HP_party_request_info_post ) { + if (HPMHooks.count.HP_party_request_info_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_post; hIndex++ ) { + 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); } @@ -51549,14 +52413,14 @@ int HP_party_request_info(int party_id, int char_id) { int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_invite_pre ) { + if (HPMHooks.count.HP_party_invite_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51564,9 +52428,9 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.party.invite(sd, tsd); } - if( HPMHooks.count.HP_party_invite_post ) { + if (HPMHooks.count.HP_party_invite_post > 0) { 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++ ) { + 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); } @@ -51575,14 +52439,14 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { } void HP_party_member_joined(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_member_joined_pre ) { + if (HPMHooks.count.HP_party_member_joined_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51590,9 +52454,9 @@ void HP_party_member_joined(struct map_session_data *sd) { { HPMHooks.source.party.member_joined(sd); } - if( HPMHooks.count.HP_party_member_joined_post ) { + if (HPMHooks.count.HP_party_member_joined_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func; postHookFunc(sd); } @@ -51602,14 +52466,14 @@ void HP_party_member_joined(struct map_session_data *sd) { int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_member_added_pre ) { + if (HPMHooks.count.HP_party_member_added_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51617,9 +52481,9 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { { retVal___ = HPMHooks.source.party.member_added(party_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_party_member_added_post ) { + if (HPMHooks.count.HP_party_member_added_post > 0) { 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++ ) { + 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); } @@ -51629,14 +52493,14 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { int HP_party_leave(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_leave_pre ) { + if (HPMHooks.count.HP_party_leave_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51644,9 +52508,9 @@ int HP_party_leave(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.leave(sd); } - if( HPMHooks.count.HP_party_leave_post ) { + if (HPMHooks.count.HP_party_leave_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -51656,14 +52520,14 @@ int HP_party_leave(struct map_session_data *sd) { int HP_party_removemember(struct map_session_data *sd, int account_id, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_removemember_pre ) { + if (HPMHooks.count.HP_party_removemember_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51671,9 +52535,9 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, const cha { retVal___ = HPMHooks.source.party.removemember(sd, account_id, name); } - if( HPMHooks.count.HP_party_removemember_post ) { + if (HPMHooks.count.HP_party_removemember_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int account_id, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) { + 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); } @@ -51683,14 +52547,14 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, const cha int HP_party_member_withdraw(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_member_withdraw_pre ) { + if (HPMHooks.count.HP_party_member_withdraw_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51698,9 +52562,9 @@ int HP_party_member_withdraw(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.party.member_withdraw(party_id, account_id, char_id); } - if( HPMHooks.count.HP_party_member_withdraw_post ) { + if (HPMHooks.count.HP_party_member_withdraw_post > 0) { 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++ ) { + 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); } @@ -51709,14 +52573,14 @@ int HP_party_member_withdraw(int party_id, int account_id, int char_id) { } 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 ) { + if (HPMHooks.count.HP_party_reply_invite_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *party_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51724,9 +52588,9 @@ void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) { HPMHooks.source.party.reply_invite(sd, party_id, flag); } - if( HPMHooks.count.HP_party_reply_invite_post ) { + if (HPMHooks.count.HP_party_reply_invite_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int party_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_post; hIndex++ ) { + 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); } @@ -51736,14 +52600,14 @@ void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) int HP_party_recv_noinfo(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_noinfo_pre ) { + if (HPMHooks.count.HP_party_recv_noinfo_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51751,9 +52615,9 @@ int HP_party_recv_noinfo(int party_id, int char_id) { { retVal___ = HPMHooks.source.party.recv_noinfo(party_id, char_id); } - if( HPMHooks.count.HP_party_recv_noinfo_post ) { + if (HPMHooks.count.HP_party_recv_noinfo_post > 0) { int (*postHookFunc) (int retVal___, int party_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_post; hIndex++ ) { + 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); } @@ -51763,14 +52627,14 @@ int HP_party_recv_noinfo(int party_id, int char_id) { int HP_party_recv_info(const struct party *sp, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_info_pre ) { + if (HPMHooks.count.HP_party_recv_info_pre > 0) { int (*preHookFunc) (const struct party **sp, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51778,9 +52642,9 @@ int HP_party_recv_info(const struct party *sp, int char_id) { { retVal___ = HPMHooks.source.party.recv_info(sp, char_id); } - if( HPMHooks.count.HP_party_recv_info_post ) { + if (HPMHooks.count.HP_party_recv_info_post > 0) { int (*postHookFunc) (int retVal___, const struct party *sp, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) { + 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); } @@ -51790,14 +52654,14 @@ int HP_party_recv_info(const struct party *sp, int char_id) { 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___ = 0; - if( HPMHooks.count.HP_party_recv_movemap_pre ) { + if (HPMHooks.count.HP_party_recv_movemap_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51805,9 +52669,9 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh { retVal___ = HPMHooks.source.party.recv_movemap(party_id, account_id, char_id, mapid, online, lv); } - if( HPMHooks.count.HP_party_recv_movemap_post ) { + if (HPMHooks.count.HP_party_recv_movemap_post > 0) { 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++ ) { + 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); } @@ -51817,14 +52681,14 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh int HP_party_broken(int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_broken_pre ) { + if (HPMHooks.count.HP_party_broken_pre > 0) { int (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51832,9 +52696,9 @@ int HP_party_broken(int party_id) { { retVal___ = HPMHooks.source.party.broken(party_id); } - if( HPMHooks.count.HP_party_broken_post ) { + if (HPMHooks.count.HP_party_broken_post > 0) { int (*postHookFunc) (int retVal___, int party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_post; hIndex++ ) { + 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); } @@ -51844,14 +52708,14 @@ int HP_party_broken(int party_id) { int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_optionchanged_pre ) { + if (HPMHooks.count.HP_party_optionchanged_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51859,9 +52723,9 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int { retVal___ = HPMHooks.source.party.optionchanged(party_id, account_id, exp, item, flag); } - if( HPMHooks.count.HP_party_optionchanged_post ) { + if (HPMHooks.count.HP_party_optionchanged_post > 0) { 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++ ) { + 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); } @@ -51871,14 +52735,14 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_changeoption_pre ) { + if (HPMHooks.count.HP_party_changeoption_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51886,9 +52750,9 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { { retVal___ = HPMHooks.source.party.changeoption(sd, exp, item); } - if( HPMHooks.count.HP_party_changeoption_post ) { + if (HPMHooks.count.HP_party_changeoption_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int exp, int item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_post; hIndex++ ) { + 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); } @@ -51898,14 +52762,14 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_party_changeleader_pre ) { + if (HPMHooks.count.HP_party_changeleader_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, struct map_session_data **t_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51913,9 +52777,9 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data { retVal___ = HPMHooks.source.party.changeleader(sd, t_sd); } - if( HPMHooks.count.HP_party_changeleader_post ) { + if (HPMHooks.count.HP_party_changeleader_post > 0) { 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++ ) { + 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); } @@ -51924,14 +52788,14 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data } void HP_party_send_movemap(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_send_movemap_pre ) { + if (HPMHooks.count.HP_party_send_movemap_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51939,9 +52803,9 @@ void HP_party_send_movemap(struct map_session_data *sd) { { HPMHooks.source.party.send_movemap(sd); } - if( HPMHooks.count.HP_party_send_movemap_post ) { + if (HPMHooks.count.HP_party_send_movemap_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func; postHookFunc(sd); } @@ -51950,14 +52814,14 @@ void HP_party_send_movemap(struct map_session_data *sd) { } void HP_party_send_levelup(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_party_send_levelup_pre ) { + if (HPMHooks.count.HP_party_send_levelup_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51965,9 +52829,9 @@ void HP_party_send_levelup(struct map_session_data *sd) { { HPMHooks.source.party.send_levelup(sd); } - if( HPMHooks.count.HP_party_send_levelup_post ) { + if (HPMHooks.count.HP_party_send_levelup_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func; postHookFunc(sd); } @@ -51977,14 +52841,14 @@ void HP_party_send_levelup(struct map_session_data *sd) { int HP_party_send_logout(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_logout_pre ) { + if (HPMHooks.count.HP_party_send_logout_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51992,9 +52856,9 @@ int HP_party_send_logout(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.send_logout(sd); } - if( HPMHooks.count.HP_party_send_logout_post ) { + if (HPMHooks.count.HP_party_send_logout_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) { + 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); } @@ -52004,14 +52868,14 @@ int HP_party_send_logout(struct map_session_data *sd) { int HP_party_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_message_pre ) { + if (HPMHooks.count.HP_party_send_message_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52019,9 +52883,9 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes) { { retVal___ = HPMHooks.source.party.send_message(sd, mes); } - if( HPMHooks.count.HP_party_send_message_post ) { + if (HPMHooks.count.HP_party_send_message_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_post; hIndex++ ) { + 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); } @@ -52031,14 +52895,14 @@ int HP_party_send_message(struct map_session_data *sd, const char *mes) { int HP_party_recv_message(int party_id, int account_id, const char *mes, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_message_pre ) { + if (HPMHooks.count.HP_party_recv_message_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52046,9 +52910,9 @@ int HP_party_recv_message(int party_id, int account_id, const char *mes, int len { retVal___ = HPMHooks.source.party.recv_message(party_id, account_id, mes, len); } - if( HPMHooks.count.HP_party_recv_message_post ) { + if (HPMHooks.count.HP_party_recv_message_post > 0) { 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++ ) { + 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); } @@ -52058,14 +52922,14 @@ int HP_party_recv_message(int party_id, int account_id, const char *mes, int len int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_skill_check_pre ) { + if (HPMHooks.count.HP_party_skill_check_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52073,9 +52937,9 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill { retVal___ = HPMHooks.source.party.skill_check(sd, party_id, skill_id, skill_lv); } - if( HPMHooks.count.HP_party_skill_check_post ) { + if (HPMHooks.count.HP_party_skill_check_post > 0) { 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++ ) { + 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); } @@ -52085,14 +52949,14 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill int HP_party_send_xy_clear(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_clear_pre ) { + if (HPMHooks.count.HP_party_send_xy_clear_pre > 0) { int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52100,9 +52964,9 @@ int HP_party_send_xy_clear(struct party_data *p) { { retVal___ = HPMHooks.source.party.send_xy_clear(p); } - if( HPMHooks.count.HP_party_send_xy_clear_post ) { + if (HPMHooks.count.HP_party_send_xy_clear_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) { + 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); } @@ -52112,14 +52976,14 @@ int HP_party_send_xy_clear(struct party_data *p) { 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___ = 0; - if( HPMHooks.count.HP_party_exp_share_pre ) { + if (HPMHooks.count.HP_party_exp_share_pre > 0) { int (*preHookFunc) (struct party_data **p, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52127,9 +52991,9 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in { retVal___ = HPMHooks.source.party.exp_share(p, src, base_exp, job_exp, zeny); } - if( HPMHooks.count.HP_party_exp_share_post ) { + if (HPMHooks.count.HP_party_exp_share_post > 0) { 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++ ) { + 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); } @@ -52139,14 +53003,14 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in 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___ = 0; - if( HPMHooks.count.HP_party_share_loot_pre ) { + if (HPMHooks.count.HP_party_share_loot_pre > 0) { int (*preHookFunc) (struct party_data **p, struct map_session_data **sd, struct item **item_data, int *first_charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52154,9 +53018,9 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc { retVal___ = HPMHooks.source.party.share_loot(p, sd, item_data, first_charid); } - if( HPMHooks.count.HP_party_share_loot_post ) { + if (HPMHooks.count.HP_party_share_loot_post > 0) { 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++ ) { + 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); } @@ -52166,14 +53030,14 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc int HP_party_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_dot_remove_pre ) { + if (HPMHooks.count.HP_party_send_dot_remove_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52181,9 +53045,9 @@ int HP_party_send_dot_remove(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.send_dot_remove(sd); } - if( HPMHooks.count.HP_party_send_dot_remove_post ) { + if (HPMHooks.count.HP_party_send_dot_remove_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) { + 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); } @@ -52193,16 +53057,16 @@ int HP_party_send_dot_remove(struct map_session_data *sd) { int HP_party_sub_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_pre ) { + if (HPMHooks.count.HP_party_sub_count_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52212,9 +53076,9 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_sub_count_post ) { + if (HPMHooks.count.HP_party_sub_count_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) { + 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); @@ -52226,16 +53090,16 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_chorus_pre ) { + if (HPMHooks.count.HP_party_sub_count_chorus_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func; retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52245,9 +53109,9 @@ int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.party.sub_count_chorus(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_sub_count_chorus_post ) { + if (HPMHooks.count.HP_party_sub_count_chorus_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_party_sub_count_chorus_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -52258,14 +53122,14 @@ int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { } 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 ) { + if (HPMHooks.count.HP_party_booking_register_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, short **job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52273,9 +53137,9 @@ void HP_party_booking_register(struct map_session_data *sd, short level, short m { HPMHooks.source.party.booking_register(sd, level, mapid, job); } - if( HPMHooks.count.HP_party_booking_register_post ) { + if (HPMHooks.count.HP_party_booking_register_post > 0) { 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++ ) { + 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); } @@ -52284,14 +53148,14 @@ void HP_party_booking_register(struct map_session_data *sd, short level, short m } void HP_party_booking_update(struct map_session_data *sd, short *job) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_update_pre ) { + if (HPMHooks.count.HP_party_booking_update_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short **job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52299,9 +53163,9 @@ void HP_party_booking_update(struct map_session_data *sd, short *job) { { HPMHooks.source.party.booking_update(sd, job); } - if( HPMHooks.count.HP_party_booking_update_post ) { + if (HPMHooks.count.HP_party_booking_update_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short *job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { + 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); } @@ -52310,14 +53174,14 @@ void HP_party_booking_update(struct map_session_data *sd, short *job) { } 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 ) { + if (HPMHooks.count.HP_party_booking_search_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52325,9 +53189,9 @@ void HP_party_booking_search(struct map_session_data *sd, short level, short map { HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount); } - if( HPMHooks.count.HP_party_booking_search_post ) { + if (HPMHooks.count.HP_party_booking_search_post > 0) { 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++ ) { + 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); } @@ -52336,14 +53200,14 @@ void HP_party_booking_search(struct map_session_data *sd, short level, short map } 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 ) { + if (HPMHooks.count.HP_party_recruit_register_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *level, const char **notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) { + 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, ¬ice); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52351,9 +53215,9 @@ void HP_party_recruit_register(struct map_session_data *sd, short level, const c { HPMHooks.source.party.recruit_register(sd, level, notice); } - if( HPMHooks.count.HP_party_recruit_register_post ) { + if (HPMHooks.count.HP_party_recruit_register_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short level, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) { + 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); } @@ -52362,14 +53226,14 @@ void HP_party_recruit_register(struct map_session_data *sd, short level, const c } void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_update_pre ) { + if (HPMHooks.count.HP_party_recruit_update_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func; preHookFunc(&sd, ¬ice); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52377,9 +53241,9 @@ void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { { HPMHooks.source.party.recruit_update(sd, notice); } - if( HPMHooks.count.HP_party_recruit_update_post ) { + if (HPMHooks.count.HP_party_recruit_update_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) { + 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); } @@ -52388,14 +53252,14 @@ void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { } 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 ) { + if (HPMHooks.count.HP_party_recruit_search_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52403,9 +53267,9 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map { HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount); } - if( HPMHooks.count.HP_party_recruit_search_post ) { + if (HPMHooks.count.HP_party_recruit_search_post > 0) { 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++ ) { + 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); } @@ -52415,14 +53279,14 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map bool HP_party_booking_delete(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_party_booking_delete_pre ) { + if (HPMHooks.count.HP_party_booking_delete_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52430,9 +53294,9 @@ bool HP_party_booking_delete(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.booking_delete(sd); } - if( HPMHooks.count.HP_party_booking_delete_post ) { + if (HPMHooks.count.HP_party_booking_delete_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) { + 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); } @@ -52442,16 +53306,16 @@ bool HP_party_booking_delete(struct map_session_data *sd) { 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___ = 0; - if( HPMHooks.count.HP_party_vforeachsamemap_pre ) { + if (HPMHooks.count.HP_party_vforeachsamemap_pre > 0) { int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct map_session_data **sd, int *range, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52461,9 +53325,9 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc retVal___ = HPMHooks.source.party.vforeachsamemap(func, sd, range, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_vforeachsamemap_post ) { + if (HPMHooks.count.HP_party_vforeachsamemap_post > 0) { 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++ ) { + 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); @@ -52475,14 +53339,14 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_timer_pre ) { + if (HPMHooks.count.HP_party_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52490,9 +53354,9 @@ int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.party.send_xy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_party_send_xy_timer_post ) { + if (HPMHooks.count.HP_party_send_xy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) { + 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); } @@ -52501,14 +53365,14 @@ int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { } 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 ) { + if (HPMHooks.count.HP_party_fill_member_pre > 0) { void (*preHookFunc) (struct party_member **member, struct map_session_data **sd, unsigned int *leader); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52516,9 +53380,9 @@ void HP_party_fill_member(struct party_member *member, struct map_session_data * { HPMHooks.source.party.fill_member(member, sd, leader); } - if( HPMHooks.count.HP_party_fill_member_post ) { + if (HPMHooks.count.HP_party_fill_member_post > 0) { 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++ ) { + 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); } @@ -52528,14 +53392,14 @@ void HP_party_fill_member(struct party_member *member, struct map_session_data * struct map_session_data* HP_party_sd_check(int party_id, int account_id, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_sd_check_pre ) { + if (HPMHooks.count.HP_party_sd_check_pre > 0) { struct map_session_data* (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52543,9 +53407,9 @@ struct map_session_data* HP_party_sd_check(int party_id, int account_id, int cha { retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id); } - if( HPMHooks.count.HP_party_sd_check_post ) { + if (HPMHooks.count.HP_party_sd_check_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int party_id, int account_id, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) { + 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); } @@ -52554,14 +53418,14 @@ struct map_session_data* HP_party_sd_check(int party_id, int account_id, int cha } void HP_party_check_state(struct party_data *p) { int hIndex = 0; - if( HPMHooks.count.HP_party_check_state_pre ) { + if (HPMHooks.count.HP_party_check_state_pre > 0) { void (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52569,9 +53433,9 @@ void HP_party_check_state(struct party_data *p) { { HPMHooks.source.party.check_state(p); } - if( HPMHooks.count.HP_party_check_state_post ) { + if (HPMHooks.count.HP_party_check_state_post > 0) { void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func; postHookFunc(p); } @@ -52581,14 +53445,14 @@ void HP_party_check_state(struct party_data *p) { 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 ) { + if (HPMHooks.count.HP_party_create_booking_data_pre > 0) { struct party_booking_ad_info* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52596,9 +53460,9 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) { { retVal___ = HPMHooks.source.party.create_booking_data(); } - if( HPMHooks.count.HP_party_create_booking_data_post ) { + if (HPMHooks.count.HP_party_create_booking_data_post > 0) { 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++ ) { + 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___); } @@ -52608,16 +53472,16 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) { int HP_party_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_db_final_pre ) { + if (HPMHooks.count.HP_party_db_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52627,9 +53491,9 @@ int HP_party_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.party.db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_db_final_post ) { + if (HPMHooks.count.HP_party_db_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) { + 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); @@ -52642,14 +53506,14 @@ int HP_party_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_path_blownpos_pre ) { + if (HPMHooks.count.HP_path_blownpos_pre > 0) { int (*preHookFunc) (struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; retVal___ = preHookFunc(&bl, &m, &x0, &y0, &dx, &dy, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52657,9 +53521,9 @@ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 d { retVal___ = HPMHooks.source.path.blownpos(bl, m, x0, y0, dx, dy, count); } - if( HPMHooks.count.HP_path_blownpos_post ) { + if (HPMHooks.count.HP_path_blownpos_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_blownpos_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, m, x0, y0, dx, dy, count); } @@ -52669,14 +53533,14 @@ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 d bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_search_pre ) { + if (HPMHooks.count.HP_path_search_pre > 0) { bool (*preHookFunc) (struct walkpath_data **wpd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; retVal___ = preHookFunc(&wpd, &bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52684,9 +53548,9 @@ bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, i { retVal___ = HPMHooks.source.path.search(wpd, bl, m, x0, y0, x1, y1, flag, cell); } - if( HPMHooks.count.HP_path_search_post ) { + if (HPMHooks.count.HP_path_search_post > 0) { bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, struct block_list *bl, 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, wpd, bl, m, x0, y0, x1, y1, flag, cell); } @@ -52696,14 +53560,14 @@ bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, i bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_search_long_pre ) { + if (HPMHooks.count.HP_path_search_long_pre > 0) { bool (*preHookFunc) (struct shootpath_data **spd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { + 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, &bl, &m, &x0, &y0, &x1, &y1, &cell); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52711,9 +53575,9 @@ bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int1 { retVal___ = HPMHooks.source.path.search_long(spd, bl, m, x0, y0, x1, y1, cell); } - if( HPMHooks.count.HP_path_search_long_post ) { + if (HPMHooks.count.HP_path_search_long_post > 0) { bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, struct block_list *bl, 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++ ) { + 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, bl, m, x0, y0, x1, y1, cell); } @@ -52723,14 +53587,14 @@ bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int1 bool HP_path_check_distance(int dx, int dy, int distance) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_pre ) { + if (HPMHooks.count.HP_path_check_distance_pre > 0) { bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52738,9 +53602,9 @@ bool HP_path_check_distance(int dx, int dy, int distance) { { retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); } - if( HPMHooks.count.HP_path_check_distance_post ) { + if (HPMHooks.count.HP_path_check_distance_post > 0) { bool (*postHookFunc) (bool retVal___, int dx, int dy, int distance); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) { + 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); } @@ -52750,14 +53614,14 @@ bool HP_path_check_distance(int dx, int dy, int distance) { unsigned int HP_path_distance(int dx, int dy) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_pre ) { + if (HPMHooks.count.HP_path_distance_pre > 0) { unsigned int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52765,9 +53629,9 @@ unsigned int HP_path_distance(int dx, int dy) { { retVal___ = HPMHooks.source.path.distance(dx, dy); } - if( HPMHooks.count.HP_path_distance_post ) { + if (HPMHooks.count.HP_path_distance_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, int dx, int dy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_post; hIndex++ ) { + 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); } @@ -52777,14 +53641,14 @@ unsigned int HP_path_distance(int dx, int dy) { bool HP_path_check_distance_client(int dx, int dy, int distance) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_client_pre ) { + if (HPMHooks.count.HP_path_check_distance_client_pre > 0) { bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_check_distance_client_pre[hIndex].func; retVal___ = preHookFunc(&dx, &dy, &distance); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52792,9 +53656,9 @@ bool HP_path_check_distance_client(int dx, int dy, int distance) { { retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance); } - if( HPMHooks.count.HP_path_check_distance_client_post ) { + if (HPMHooks.count.HP_path_check_distance_client_post > 0) { bool (*postHookFunc) (bool retVal___, int dx, int dy, int distance); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_check_distance_client_post[hIndex].func; retVal___ = postHookFunc(retVal___, dx, dy, distance); } @@ -52804,14 +53668,14 @@ bool HP_path_check_distance_client(int dx, int dy, int distance) { int HP_path_distance_client(int dx, int dy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_client_pre ) { + if (HPMHooks.count.HP_path_distance_client_pre > 0) { int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_distance_client_pre[hIndex].func; retVal___ = preHookFunc(&dx, &dy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52819,9 +53683,9 @@ int HP_path_distance_client(int dx, int dy) { { retVal___ = HPMHooks.source.path.distance_client(dx, dy); } - if( HPMHooks.count.HP_path_distance_client_post ) { + if (HPMHooks.count.HP_path_distance_client_post > 0) { int (*postHookFunc) (int retVal___, int dx, int dy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_distance_client_post[hIndex].func; retVal___ = postHookFunc(retVal___, dx, dy); } @@ -52831,14 +53695,14 @@ int HP_path_distance_client(int dx, int dy) { /* pc_groups_interface */ void HP_pcg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_init_pre ) { + if (HPMHooks.count.HP_pcg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52846,9 +53710,9 @@ void HP_pcg_init(void) { { HPMHooks.source.pcg.init(); } - if( HPMHooks.count.HP_pcg_init_post ) { + if (HPMHooks.count.HP_pcg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_init_post[hIndex].func; postHookFunc(); } @@ -52857,14 +53721,14 @@ void HP_pcg_init(void) { } void HP_pcg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_final_pre ) { + if (HPMHooks.count.HP_pcg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52872,9 +53736,9 @@ void HP_pcg_final(void) { { HPMHooks.source.pcg.final(); } - if( HPMHooks.count.HP_pcg_final_post ) { + if (HPMHooks.count.HP_pcg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_final_post[hIndex].func; postHookFunc(); } @@ -52883,14 +53747,14 @@ void HP_pcg_final(void) { } void HP_pcg_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_reload_pre ) { + if (HPMHooks.count.HP_pcg_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52898,9 +53762,9 @@ void HP_pcg_reload(void) { { HPMHooks.source.pcg.reload(); } - if( HPMHooks.count.HP_pcg_reload_post ) { + if (HPMHooks.count.HP_pcg_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_reload_post[hIndex].func; postHookFunc(); } @@ -52910,14 +53774,14 @@ void HP_pcg_reload(void) { GroupSettings* HP_pcg_get_dummy_group(void) { int hIndex = 0; GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_dummy_group_pre ) { + if (HPMHooks.count.HP_pcg_get_dummy_group_pre > 0) { GroupSettings* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52925,9 +53789,9 @@ GroupSettings* HP_pcg_get_dummy_group(void) { { retVal___ = HPMHooks.source.pcg.get_dummy_group(); } - if( HPMHooks.count.HP_pcg_get_dummy_group_post ) { + if (HPMHooks.count.HP_pcg_get_dummy_group_post > 0) { GroupSettings* (*postHookFunc) (GroupSettings* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -52937,14 +53801,14 @@ GroupSettings* HP_pcg_get_dummy_group(void) { bool HP_pcg_exists(int group_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_exists_pre ) { + if (HPMHooks.count.HP_pcg_exists_pre > 0) { bool (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_exists_pre[hIndex].func; retVal___ = preHookFunc(&group_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52952,9 +53816,9 @@ bool HP_pcg_exists(int group_id) { { retVal___ = HPMHooks.source.pcg.exists(group_id); } - if( HPMHooks.count.HP_pcg_exists_post ) { + if (HPMHooks.count.HP_pcg_exists_post > 0) { bool (*postHookFunc) (bool retVal___, int group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_exists_post[hIndex].func; retVal___ = postHookFunc(retVal___, group_id); } @@ -52964,14 +53828,14 @@ bool HP_pcg_exists(int group_id) { GroupSettings* HP_pcg_id2group(int group_id) { int hIndex = 0; GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_id2group_pre ) { + if (HPMHooks.count.HP_pcg_id2group_pre > 0) { GroupSettings* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_id2group_pre[hIndex].func; retVal___ = preHookFunc(&group_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52979,9 +53843,9 @@ GroupSettings* HP_pcg_id2group(int group_id) { { retVal___ = HPMHooks.source.pcg.id2group(group_id); } - if( HPMHooks.count.HP_pcg_id2group_post ) { + if (HPMHooks.count.HP_pcg_id2group_post > 0) { GroupSettings* (*postHookFunc) (GroupSettings* retVal___, int group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_id2group_post[hIndex].func; retVal___ = postHookFunc(retVal___, group_id); } @@ -52991,14 +53855,14 @@ GroupSettings* HP_pcg_id2group(int group_id) { bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_has_permission_pre ) { + if (HPMHooks.count.HP_pcg_has_permission_pre > 0) { bool (*preHookFunc) (GroupSettings **group, unsigned int *permission); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_has_permission_pre[hIndex].func; retVal___ = preHookFunc(&group, &permission); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53006,9 +53870,9 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { { retVal___ = HPMHooks.source.pcg.has_permission(group, permission); } - if( HPMHooks.count.HP_pcg_has_permission_post ) { + if (HPMHooks.count.HP_pcg_has_permission_post > 0) { bool (*postHookFunc) (bool retVal___, GroupSettings *group, unsigned int permission); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_has_permission_post[hIndex].func; retVal___ = postHookFunc(retVal___, group, permission); } @@ -53018,14 +53882,14 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { bool HP_pcg_should_log_commands(GroupSettings *group) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_should_log_commands_pre ) { + if (HPMHooks.count.HP_pcg_should_log_commands_pre > 0) { bool (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_should_log_commands_pre[hIndex].func; retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53033,9 +53897,9 @@ bool HP_pcg_should_log_commands(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.should_log_commands(group); } - if( HPMHooks.count.HP_pcg_should_log_commands_post ) { + if (HPMHooks.count.HP_pcg_should_log_commands_post > 0) { bool (*postHookFunc) (bool retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_should_log_commands_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -53045,14 +53909,14 @@ bool HP_pcg_should_log_commands(GroupSettings *group) { const char* HP_pcg_get_name(GroupSettings *group) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_name_pre ) { + if (HPMHooks.count.HP_pcg_get_name_pre > 0) { const char* (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_name_pre[hIndex].func; retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53060,9 +53924,9 @@ const char* HP_pcg_get_name(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_name(group); } - if( HPMHooks.count.HP_pcg_get_name_post ) { + if (HPMHooks.count.HP_pcg_get_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -53072,14 +53936,14 @@ const char* HP_pcg_get_name(GroupSettings *group) { int HP_pcg_get_level(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_level_pre ) { + if (HPMHooks.count.HP_pcg_get_level_pre > 0) { int (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_level_pre[hIndex].func; retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53087,9 +53951,9 @@ int HP_pcg_get_level(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_level(group); } - if( HPMHooks.count.HP_pcg_get_level_post ) { + if (HPMHooks.count.HP_pcg_get_level_post > 0) { int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_level_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -53099,14 +53963,14 @@ int HP_pcg_get_level(GroupSettings *group) { int HP_pcg_get_idx(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_idx_pre ) { + if (HPMHooks.count.HP_pcg_get_idx_pre > 0) { int (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_idx_pre[hIndex].func; retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53114,9 +53978,9 @@ int HP_pcg_get_idx(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_idx(group); } - if( HPMHooks.count.HP_pcg_get_idx_post ) { + if (HPMHooks.count.HP_pcg_get_idx_post > 0) { int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_idx_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -53126,14 +53990,14 @@ int HP_pcg_get_idx(GroupSettings *group) { /* pc_interface */ void HP_pc_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_pc_init_pre ) { + if (HPMHooks.count.HP_pc_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -53141,9 +54005,9 @@ void HP_pc_init(bool minimal) { { HPMHooks.source.pc.init(minimal); } - if( HPMHooks.count.HP_pc_init_post ) { + if (HPMHooks.count.HP_pc_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func; postHookFunc(minimal); } @@ -53152,14 +54016,14 @@ void HP_pc_init(bool minimal) { } void HP_pc_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_final_pre ) { + if (HPMHooks.count.HP_pc_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -53167,9 +54031,9 @@ void HP_pc_final(void) { { HPMHooks.source.pc.final(); } - if( HPMHooks.count.HP_pc_final_post ) { + if (HPMHooks.count.HP_pc_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func; postHookFunc(); } @@ -53179,14 +54043,14 @@ void HP_pc_final(void) { 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 ) { + if (HPMHooks.count.HP_pc_get_dummy_sd_pre > 0) { struct map_session_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53194,38 +54058,38 @@ struct map_session_data* HP_pc_get_dummy_sd(void) { { retVal___ = HPMHooks.source.pc.get_dummy_sd(); } - if( HPMHooks.count.HP_pc_get_dummy_sd_post ) { + if (HPMHooks.count.HP_pc_get_dummy_sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) { + 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 HP_pc_class2idx(int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_class2idx_pre ) { - int (*preHookFunc) (int *class_); + if (HPMHooks.count.HP_pc_class2idx_pre > 0) { + int (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.class2idx(class_); + 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++ ) { + if (HPMHooks.count.HP_pc_class2idx_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -53233,14 +54097,14 @@ int HP_pc_class2idx(int class_) { bool HP_pc_can_talk(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_talk_pre ) { + if (HPMHooks.count.HP_pc_can_talk_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53248,9 +54112,9 @@ bool HP_pc_can_talk(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.can_talk(sd); } - if( HPMHooks.count.HP_pc_can_talk_post ) { + if (HPMHooks.count.HP_pc_can_talk_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53260,14 +54124,14 @@ bool HP_pc_can_talk(struct map_session_data *sd) { bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_attack_pre ) { + if (HPMHooks.count.HP_pc_can_attack_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func; retVal___ = preHookFunc(&sd, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53275,9 +54139,9 @@ bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { { retVal___ = HPMHooks.source.pc.can_attack(sd, target_id); } - if( HPMHooks.count.HP_pc_can_attack_post ) { + if (HPMHooks.count.HP_pc_can_attack_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, target_id); } @@ -53287,14 +54151,14 @@ bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_use_command_pre ) { + if (HPMHooks.count.HP_pc_can_use_command_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **command); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53302,9 +54166,9 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { { retVal___ = HPMHooks.source.pc.can_use_command(sd, command); } - if( HPMHooks.count.HP_pc_can_use_command_post ) { + if (HPMHooks.count.HP_pc_can_use_command_post > 0) { 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++ ) { + 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); } @@ -53314,14 +54178,14 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int HP_pc_set_group(struct map_session_data *sd, int group_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_group_pre ) { + if (HPMHooks.count.HP_pc_set_group_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53329,9 +54193,9 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) { { retVal___ = HPMHooks.source.pc.set_group(sd, group_id); } - if( HPMHooks.count.HP_pc_set_group_post ) { + if (HPMHooks.count.HP_pc_set_group_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_post; hIndex++ ) { + 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); } @@ -53341,14 +54205,14 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) { bool HP_pc_should_log_commands(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_should_log_commands_pre ) { + if (HPMHooks.count.HP_pc_should_log_commands_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53356,9 +54220,9 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.should_log_commands(sd); } - if( HPMHooks.count.HP_pc_should_log_commands_post ) { + if (HPMHooks.count.HP_pc_should_log_commands_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) { + 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); } @@ -53368,14 +54232,14 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) { int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setrestartvalue_pre ) { + if (HPMHooks.count.HP_pc_setrestartvalue_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53383,9 +54247,9 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.setrestartvalue(sd, type); } - if( HPMHooks.count.HP_pc_setrestartvalue_post ) { + if (HPMHooks.count.HP_pc_setrestartvalue_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_post; hIndex++ ) { + 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); } @@ -53395,14 +54259,14 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { int HP_pc_makesavestatus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_makesavestatus_pre ) { + if (HPMHooks.count.HP_pc_makesavestatus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53410,9 +54274,9 @@ int HP_pc_makesavestatus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.makesavestatus(sd); } - if( HPMHooks.count.HP_pc_makesavestatus_post ) { + if (HPMHooks.count.HP_pc_makesavestatus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_makesavestatus_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53421,14 +54285,14 @@ int HP_pc_makesavestatus(struct map_session_data *sd) { } void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { int hIndex = 0; - if( HPMHooks.count.HP_pc_respawn_pre ) { + if (HPMHooks.count.HP_pc_respawn_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -53436,9 +54300,9 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { { HPMHooks.source.pc.respawn(sd, clrtype); } - if( HPMHooks.count.HP_pc_respawn_post ) { + if (HPMHooks.count.HP_pc_respawn_post > 0) { void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_respawn_post[hIndex].func; postHookFunc(sd, clrtype); } @@ -53448,14 +54312,14 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { 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___ = 0; - if( HPMHooks.count.HP_pc_setnewpc_pre ) { + if (HPMHooks.count.HP_pc_setnewpc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53463,9 +54327,9 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int { retVal___ = HPMHooks.source.pc.setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd); } - if( HPMHooks.count.HP_pc_setnewpc_post ) { + if (HPMHooks.count.HP_pc_setnewpc_post > 0) { 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++ ) { + 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); } @@ -53475,14 +54339,14 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_authok_pre ) { + if (HPMHooks.count.HP_pc_authok_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53490,9 +54354,9 @@ bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_ { retVal___ = HPMHooks.source.pc.authok(sd, login_id2, expiration_time, group_id, st, changing_mapservers); } - if( HPMHooks.count.HP_pc_authok_post ) { + if (HPMHooks.count.HP_pc_authok_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) { + 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); } @@ -53501,14 +54365,14 @@ bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_ } void HP_pc_authfail(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_authfail_pre ) { + if (HPMHooks.count.HP_pc_authfail_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -53516,9 +54380,9 @@ void HP_pc_authfail(struct map_session_data *sd) { { HPMHooks.source.pc.authfail(sd); } - if( HPMHooks.count.HP_pc_authfail_post ) { + if (HPMHooks.count.HP_pc_authfail_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func; postHookFunc(sd); } @@ -53528,14 +54392,14 @@ void HP_pc_authfail(struct map_session_data *sd) { int HP_pc_reg_received(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_reg_received_pre ) { + if (HPMHooks.count.HP_pc_reg_received_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53543,9 +54407,9 @@ int HP_pc_reg_received(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.reg_received(sd); } - if( HPMHooks.count.HP_pc_reg_received_post ) { + if (HPMHooks.count.HP_pc_reg_received_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) { + 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); } @@ -53555,14 +54419,14 @@ int HP_pc_reg_received(struct map_session_data *sd) { int HP_pc_isequip(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_isequip_pre ) { + if (HPMHooks.count.HP_pc_isequip_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53570,9 +54434,9 @@ int HP_pc_isequip(struct map_session_data *sd, int n) { { retVal___ = HPMHooks.source.pc.isequip(sd, n); } - if( HPMHooks.count.HP_pc_isequip_post ) { + if (HPMHooks.count.HP_pc_isequip_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_post; hIndex++ ) { + 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); } @@ -53582,14 +54446,14 @@ int HP_pc_isequip(struct map_session_data *sd, int n) { int HP_pc_equippoint(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equippoint_pre ) { + if (HPMHooks.count.HP_pc_equippoint_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53597,26 +54461,53 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) { { retVal___ = HPMHooks.source.pc.equippoint(sd, n); } - if( HPMHooks.count.HP_pc_equippoint_post ) { + if (HPMHooks.count.HP_pc_equippoint_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_post; hIndex++ ) { + 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_item_equippoint(struct map_session_data *sd, struct item_data *id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_item_equippoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item_data **id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_item_equippoint_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.item_equippoint(sd, id); + } + if (HPMHooks.count.HP_pc_item_equippoint_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_item_equippoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, id); + } + } + return retVal___; +} int HP_pc_setinventorydata(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setinventorydata_pre ) { + if (HPMHooks.count.HP_pc_setinventorydata_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53624,9 +54515,9 @@ int HP_pc_setinventorydata(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.setinventorydata(sd); } - if( HPMHooks.count.HP_pc_setinventorydata_post ) { + if (HPMHooks.count.HP_pc_setinventorydata_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53636,14 +54527,14 @@ int HP_pc_setinventorydata(struct map_session_data *sd) { int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill_pre ) { + if (HPMHooks.count.HP_pc_checkskill_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53651,9 +54542,9 @@ int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.pc.checkskill(sd, skill_id); } - if( HPMHooks.count.HP_pc_checkskill_post ) { + if (HPMHooks.count.HP_pc_checkskill_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_post; hIndex++ ) { + 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); } @@ -53663,14 +54554,14 @@ int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill2_pre ) { + if (HPMHooks.count.HP_pc_checkskill2_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53678,9 +54569,9 @@ int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { { retVal___ = HPMHooks.source.pc.checkskill2(sd, index); } - if( HPMHooks.count.HP_pc_checkskill2_post ) { + if (HPMHooks.count.HP_pc_checkskill2_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_post; hIndex++ ) { + 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); } @@ -53690,14 +54581,14 @@ int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { int HP_pc_checkallowskill(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkallowskill_pre ) { + if (HPMHooks.count.HP_pc_checkallowskill_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53705,9 +54596,9 @@ int HP_pc_checkallowskill(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkallowskill(sd); } - if( HPMHooks.count.HP_pc_checkallowskill_post ) { + if (HPMHooks.count.HP_pc_checkallowskill_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53717,14 +54608,14 @@ int HP_pc_checkallowskill(struct map_session_data *sd) { int HP_pc_checkequip(struct map_session_data *sd, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkequip_pre ) { + if (HPMHooks.count.HP_pc_checkequip_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53732,9 +54623,9 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) { { retVal___ = HPMHooks.source.pc.checkequip(sd, pos); } - if( HPMHooks.count.HP_pc_checkequip_post ) { + if (HPMHooks.count.HP_pc_checkequip_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_post; hIndex++ ) { + 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); } @@ -53744,14 +54635,14 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) { int HP_pc_calc_skilltree(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_pre ) { + if (HPMHooks.count.HP_pc_calc_skilltree_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53759,9 +54650,9 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skilltree(sd); } - if( HPMHooks.count.HP_pc_calc_skilltree_post ) { + if (HPMHooks.count.HP_pc_calc_skilltree_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) { + 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); } @@ -53771,14 +54662,14 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) { int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) { + if (HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53786,9 +54677,9 @@ int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd); } - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) { + if (HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) { + 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); } @@ -53798,14 +54689,14 @@ int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int HP_pc_clean_skilltree(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_clean_skilltree_pre ) { + if (HPMHooks.count.HP_pc_clean_skilltree_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53813,9 +54704,9 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.clean_skilltree(sd); } - if( HPMHooks.count.HP_pc_clean_skilltree_post ) { + if (HPMHooks.count.HP_pc_clean_skilltree_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) { + 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); } @@ -53825,14 +54716,14 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setpos_pre ) { + if (HPMHooks.count.HP_pc_setpos_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; retVal___ = preHookFunc(&sd, &map_index, &x, &y, &clrtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53840,9 +54731,9 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i { retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); } - if( HPMHooks.count.HP_pc_setpos_post ) { + if (HPMHooks.count.HP_pc_setpos_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, clr_type clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setpos_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, map_index, x, y, clrtype); } @@ -53852,14 +54743,14 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setsavepoint_pre ) { + if (HPMHooks.count.HP_pc_setsavepoint_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, short *map_index, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; retVal___ = preHookFunc(&sd, &map_index, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53867,9 +54758,9 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int { retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y); } - if( HPMHooks.count.HP_pc_setsavepoint_post ) { + if (HPMHooks.count.HP_pc_setsavepoint_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, short map_index, int x, int y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setsavepoint_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, map_index, x, y); } @@ -53879,14 +54770,14 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_randomwarp_pre ) { + if (HPMHooks.count.HP_pc_randomwarp_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53894,9 +54785,9 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { { retVal___ = HPMHooks.source.pc.randomwarp(sd, type); } - if( HPMHooks.count.HP_pc_randomwarp_post ) { + if (HPMHooks.count.HP_pc_randomwarp_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, clr_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_post; hIndex++ ) { + 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); } @@ -53906,14 +54797,14 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { int HP_pc_memo(struct map_session_data *sd, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_memo_pre ) { + if (HPMHooks.count.HP_pc_memo_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53921,9 +54812,9 @@ int HP_pc_memo(struct map_session_data *sd, int pos) { { retVal___ = HPMHooks.source.pc.memo(sd, pos); } - if( HPMHooks.count.HP_pc_memo_post ) { + if (HPMHooks.count.HP_pc_memo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_post; hIndex++ ) { + 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); } @@ -53933,14 +54824,14 @@ int HP_pc_memo(struct map_session_data *sd, int pos) { int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkadditem_pre ) { + if (HPMHooks.count.HP_pc_checkadditem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53948,9 +54839,9 @@ int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { { retVal___ = HPMHooks.source.pc.checkadditem(sd, nameid, amount); } - if( HPMHooks.count.HP_pc_checkadditem_post ) { + if (HPMHooks.count.HP_pc_checkadditem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int nameid, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_post; hIndex++ ) { + 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); } @@ -53960,14 +54851,14 @@ int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { int HP_pc_inventoryblank(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventoryblank_pre ) { + if (HPMHooks.count.HP_pc_inventoryblank_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53975,9 +54866,9 @@ int HP_pc_inventoryblank(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.inventoryblank(sd); } - if( HPMHooks.count.HP_pc_inventoryblank_post ) { + if (HPMHooks.count.HP_pc_inventoryblank_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53987,14 +54878,14 @@ int HP_pc_inventoryblank(struct map_session_data *sd) { int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_search_inventory_pre ) { + if (HPMHooks.count.HP_pc_search_inventory_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54002,9 +54893,9 @@ int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { { retVal___ = HPMHooks.source.pc.search_inventory(sd, item_id); } - if( HPMHooks.count.HP_pc_search_inventory_post ) { + if (HPMHooks.count.HP_pc_search_inventory_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int item_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_post; hIndex++ ) { + 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); } @@ -54014,14 +54905,14 @@ int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { 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___ = 0; - if( HPMHooks.count.HP_pc_payzeny_pre ) { + if (HPMHooks.count.HP_pc_payzeny_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54029,9 +54920,9 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty { retVal___ = HPMHooks.source.pc.payzeny(sd, zeny, type, tsd); } - if( HPMHooks.count.HP_pc_payzeny_post ) { + if (HPMHooks.count.HP_pc_payzeny_post > 0) { 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++ ) { + 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); } @@ -54041,14 +54932,14 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty 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___ = 0; - if( HPMHooks.count.HP_pc_additem_pre ) { + if (HPMHooks.count.HP_pc_additem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54056,9 +54947,9 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun { retVal___ = HPMHooks.source.pc.additem(sd, item_data, amount, log_type); } - if( HPMHooks.count.HP_pc_additem_post ) { + if (HPMHooks.count.HP_pc_additem_post > 0) { 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++ ) { + 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); } @@ -54068,14 +54959,14 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun 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___ = 0; - if( HPMHooks.count.HP_pc_getzeny_pre ) { + if (HPMHooks.count.HP_pc_getzeny_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54083,9 +54974,9 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty { retVal___ = HPMHooks.source.pc.getzeny(sd, zeny, type, tsd); } - if( HPMHooks.count.HP_pc_getzeny_post ) { + if (HPMHooks.count.HP_pc_getzeny_post > 0) { 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++ ) { + 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); } @@ -54095,14 +54986,14 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty 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___ = 0; - if( HPMHooks.count.HP_pc_delitem_pre ) { + if (HPMHooks.count.HP_pc_delitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54110,9 +55001,9 @@ int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, shor { retVal___ = HPMHooks.source.pc.delitem(sd, n, amount, type, reason, log_type); } - if( HPMHooks.count.HP_pc_delitem_post ) { + if (HPMHooks.count.HP_pc_delitem_post > 0) { 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++ ) { + 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); } @@ -54122,14 +55013,14 @@ int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, shor int HP_pc_paycash(struct map_session_data *sd, int price, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_paycash_pre ) { + if (HPMHooks.count.HP_pc_paycash_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54137,9 +55028,9 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) { { retVal___ = HPMHooks.source.pc.paycash(sd, price, points); } - if( HPMHooks.count.HP_pc_paycash_post ) { + if (HPMHooks.count.HP_pc_paycash_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int price, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_post; hIndex++ ) { + 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); } @@ -54149,14 +55040,14 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) { int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getcash_pre ) { + if (HPMHooks.count.HP_pc_getcash_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *cash, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54164,9 +55055,9 @@ int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { { retVal___ = HPMHooks.source.pc.getcash(sd, cash, points); } - if( HPMHooks.count.HP_pc_getcash_post ) { + if (HPMHooks.count.HP_pc_getcash_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int cash, int points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_post; hIndex++ ) { + 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); } @@ -54176,14 +55067,14 @@ int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { 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___ = 0; - if( HPMHooks.count.HP_pc_cart_additem_pre ) { + if (HPMHooks.count.HP_pc_cart_additem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54191,9 +55082,9 @@ int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int { retVal___ = HPMHooks.source.pc.cart_additem(sd, item_data, amount, log_type); } - if( HPMHooks.count.HP_pc_cart_additem_post ) { + if (HPMHooks.count.HP_pc_cart_additem_post > 0) { 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++ ) { + 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); } @@ -54203,14 +55094,14 @@ int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int 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___ = 0; - if( HPMHooks.count.HP_pc_cart_delitem_pre ) { + if (HPMHooks.count.HP_pc_cart_delitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *type, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54218,9 +55109,9 @@ int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, { retVal___ = HPMHooks.source.pc.cart_delitem(sd, n, amount, type, log_type); } - if( HPMHooks.count.HP_pc_cart_delitem_post ) { + if (HPMHooks.count.HP_pc_cart_delitem_post > 0) { 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++ ) { + 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); } @@ -54230,14 +55121,14 @@ int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_putitemtocart_pre ) { + if (HPMHooks.count.HP_pc_putitemtocart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54245,9 +55136,9 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { { retVal___ = HPMHooks.source.pc.putitemtocart(sd, idx, amount); } - if( HPMHooks.count.HP_pc_putitemtocart_post ) { + if (HPMHooks.count.HP_pc_putitemtocart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int idx, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_post; hIndex++ ) { + 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); } @@ -54257,14 +55148,14 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getitemfromcart_pre ) { + if (HPMHooks.count.HP_pc_getitemfromcart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54272,9 +55163,9 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { { retVal___ = HPMHooks.source.pc.getitemfromcart(sd, idx, amount); } - if( HPMHooks.count.HP_pc_getitemfromcart_post ) { + if (HPMHooks.count.HP_pc_getitemfromcart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int idx, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_post; hIndex++ ) { + 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); } @@ -54284,14 +55175,14 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cartitem_amount_pre ) { + if (HPMHooks.count.HP_pc_cartitem_amount_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54299,9 +55190,9 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { { retVal___ = HPMHooks.source.pc.cartitem_amount(sd, idx, amount); } - if( HPMHooks.count.HP_pc_cartitem_amount_post ) { + if (HPMHooks.count.HP_pc_cartitem_amount_post > 0) { 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++ ) { + 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); } @@ -54311,14 +55202,14 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_takeitem_pre ) { + if (HPMHooks.count.HP_pc_takeitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54326,9 +55217,9 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { { retVal___ = HPMHooks.source.pc.takeitem(sd, fitem); } - if( HPMHooks.count.HP_pc_takeitem_post ) { + if (HPMHooks.count.HP_pc_takeitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) { + 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); } @@ -54338,14 +55229,14 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dropitem_pre ) { + if (HPMHooks.count.HP_pc_dropitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54353,9 +55244,9 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { { retVal___ = HPMHooks.source.pc.dropitem(sd, n, amount); } - if( HPMHooks.count.HP_pc_dropitem_post ) { + if (HPMHooks.count.HP_pc_dropitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_post; hIndex++ ) { + 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); } @@ -54365,14 +55256,14 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_isequipped_pre ) { + if (HPMHooks.count.HP_pc_isequipped_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54380,9 +55271,9 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.pc.isequipped(sd, nameid); } - if( HPMHooks.count.HP_pc_isequipped_post ) { + if (HPMHooks.count.HP_pc_isequipped_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_post; hIndex++ ) { + 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); } @@ -54392,14 +55283,14 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { 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___ = false; - if( HPMHooks.count.HP_pc_can_Adopt_pre ) { + if (HPMHooks.count.HP_pc_can_Adopt_pre > 0) { bool (*preHookFunc) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54407,9 +55298,9 @@ bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2 { retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_pc_can_Adopt_post ) { + if (HPMHooks.count.HP_pc_can_Adopt_post > 0) { 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++ ) { + 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); } @@ -54419,14 +55310,14 @@ bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2 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___ = false; - if( HPMHooks.count.HP_pc_adoption_pre ) { + if (HPMHooks.count.HP_pc_adoption_pre > 0) { bool (*preHookFunc) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54434,9 +55325,9 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_ { retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_pc_adoption_post ) { + if (HPMHooks.count.HP_pc_adoption_post > 0) { 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++ ) { + 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); } @@ -54446,14 +55337,14 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_ int HP_pc_updateweightstatus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_updateweightstatus_pre ) { + if (HPMHooks.count.HP_pc_updateweightstatus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54461,9 +55352,9 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.updateweightstatus(sd); } - if( HPMHooks.count.HP_pc_updateweightstatus_post ) { + if (HPMHooks.count.HP_pc_updateweightstatus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_updateweightstatus_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54473,14 +55364,14 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) { 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___ = 0; - if( HPMHooks.count.HP_pc_addautobonus_pre ) { + if (HPMHooks.count.HP_pc_addautobonus_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54488,9 +55379,9 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc { retVal___ = HPMHooks.source.pc.addautobonus(bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); } - if( HPMHooks.count.HP_pc_addautobonus_post ) { + if (HPMHooks.count.HP_pc_addautobonus_post > 0) { 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++ ) { + 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); } @@ -54500,14 +55391,14 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_exeautobonus_pre ) { + if (HPMHooks.count.HP_pc_exeautobonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct s_autobonus **bonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54515,9 +55406,9 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { { retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus); } - if( HPMHooks.count.HP_pc_exeautobonus_post ) { + if (HPMHooks.count.HP_pc_exeautobonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) { + 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); } @@ -54527,14 +55418,14 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_endautobonus_pre ) { + if (HPMHooks.count.HP_pc_endautobonus_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54542,9 +55433,9 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_endautobonus_post ) { + if (HPMHooks.count.HP_pc_endautobonus_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) { + 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); } @@ -54554,14 +55445,14 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_delautobonus_pre ) { + if (HPMHooks.count.HP_pc_delautobonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct s_autobonus **bonus, char *max, bool *restore); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54569,9 +55460,9 @@ int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, c { retVal___ = HPMHooks.source.pc.delautobonus(sd, bonus, max, restore); } - if( HPMHooks.count.HP_pc_delautobonus_post ) { + if (HPMHooks.count.HP_pc_delautobonus_post > 0) { 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++ ) { + 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); } @@ -54581,14 +55472,14 @@ int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, c int HP_pc_bonus(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_pre ) { + if (HPMHooks.count.HP_pc_bonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54596,9 +55487,9 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) { { retVal___ = HPMHooks.source.pc.bonus(sd, type, val); } - if( HPMHooks.count.HP_pc_bonus_post ) { + if (HPMHooks.count.HP_pc_bonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_post; hIndex++ ) { + 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); } @@ -54608,14 +55499,14 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) { int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus2_pre ) { + if (HPMHooks.count.HP_pc_bonus2_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54623,9 +55514,9 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { { retVal___ = HPMHooks.source.pc.bonus2(sd, type, type2, val); } - if( HPMHooks.count.HP_pc_bonus2_post ) { + if (HPMHooks.count.HP_pc_bonus2_post > 0) { 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++ ) { + 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); } @@ -54635,14 +55526,14 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus3_pre ) { + if (HPMHooks.count.HP_pc_bonus3_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54650,9 +55541,9 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in { retVal___ = HPMHooks.source.pc.bonus3(sd, type, type2, type3, val); } - if( HPMHooks.count.HP_pc_bonus3_post ) { + if (HPMHooks.count.HP_pc_bonus3_post > 0) { 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++ ) { + 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); } @@ -54662,14 +55553,14 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus4_pre ) { + if (HPMHooks.count.HP_pc_bonus4_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54677,9 +55568,9 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in { retVal___ = HPMHooks.source.pc.bonus4(sd, type, type2, type3, type4, val); } - if( HPMHooks.count.HP_pc_bonus4_post ) { + if (HPMHooks.count.HP_pc_bonus4_post > 0) { 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++ ) { + 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); } @@ -54689,14 +55580,14 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in 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___ = 0; - if( HPMHooks.count.HP_pc_bonus5_pre ) { + if (HPMHooks.count.HP_pc_bonus5_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54704,9 +55595,9 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in { retVal___ = HPMHooks.source.pc.bonus5(sd, type, type2, type3, type4, type5, val); } - if( HPMHooks.count.HP_pc_bonus5_post ) { + if (HPMHooks.count.HP_pc_bonus5_post > 0) { 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++ ) { + 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); } @@ -54716,14 +55607,14 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skill_pre ) { + if (HPMHooks.count.HP_pc_skill_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *id, int *level, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54731,9 +55622,9 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { { retVal___ = HPMHooks.source.pc.skill(sd, id, level, flag); } - if( HPMHooks.count.HP_pc_skill_post ) { + if (HPMHooks.count.HP_pc_skill_post > 0) { 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++ ) { + 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); } @@ -54743,14 +55634,14 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_insert_card_pre ) { + if (HPMHooks.count.HP_pc_insert_card_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54758,9 +55649,9 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { retVal___ = HPMHooks.source.pc.insert_card(sd, idx_card, idx_equip); } - if( HPMHooks.count.HP_pc_insert_card_post ) { + if (HPMHooks.count.HP_pc_insert_card_post > 0) { 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++ ) { + 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); } @@ -54770,14 +55661,14 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_pre ) { + if (HPMHooks.count.HP_pc_can_insert_card_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *idx_card); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_insert_card_pre[hIndex].func; retVal___ = preHookFunc(&sd, &idx_card); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54785,9 +55676,9 @@ bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { { retVal___ = HPMHooks.source.pc.can_insert_card(sd, idx_card); } - if( HPMHooks.count.HP_pc_can_insert_card_post ) { + if (HPMHooks.count.HP_pc_can_insert_card_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int idx_card); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_insert_card_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, idx_card); } @@ -54797,14 +55688,14 @@ bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_into_pre ) { + if (HPMHooks.count.HP_pc_can_insert_card_into_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_pre[hIndex].func; retVal___ = preHookFunc(&sd, &idx_card, &idx_equip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54812,9 +55703,9 @@ bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int i { retVal___ = HPMHooks.source.pc.can_insert_card_into(sd, idx_card, idx_equip); } - if( HPMHooks.count.HP_pc_can_insert_card_into_post ) { + if (HPMHooks.count.HP_pc_can_insert_card_into_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int idx_card, int idx_equip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, idx_card, idx_equip); } @@ -54824,14 +55715,14 @@ bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int i int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_item_pre ) { + if (HPMHooks.count.HP_pc_steal_item_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54839,9 +55730,9 @@ int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 { retVal___ = HPMHooks.source.pc.steal_item(sd, bl, skill_lv); } - if( HPMHooks.count.HP_pc_steal_item_post ) { + if (HPMHooks.count.HP_pc_steal_item_post > 0) { 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++ ) { + 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); } @@ -54851,14 +55742,14 @@ int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_coin_pre ) { + if (HPMHooks.count.HP_pc_steal_coin_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) { + 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, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54866,9 +55757,9 @@ int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl, uint16 { retVal___ = HPMHooks.source.pc.steal_coin(sd, bl, skill_lv); } - if( HPMHooks.count.HP_pc_steal_coin_post ) { + if (HPMHooks.count.HP_pc_steal_coin_post > 0) { 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_coin_post; hIndex++ ) { + 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, skill_lv); } @@ -54878,14 +55769,14 @@ int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl, uint16 int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) { + if (HPMHooks.count.HP_pc_modifybuyvalue_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54893,9 +55784,9 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { { retVal___ = HPMHooks.source.pc.modifybuyvalue(sd, orig_value); } - if( HPMHooks.count.HP_pc_modifybuyvalue_post ) { + if (HPMHooks.count.HP_pc_modifybuyvalue_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int orig_value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_post; hIndex++ ) { + 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); } @@ -54905,14 +55796,14 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifysellvalue_pre ) { + if (HPMHooks.count.HP_pc_modifysellvalue_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54920,9 +55811,9 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { { retVal___ = HPMHooks.source.pc.modifysellvalue(sd, orig_value); } - if( HPMHooks.count.HP_pc_modifysellvalue_post ) { + if (HPMHooks.count.HP_pc_modifysellvalue_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int orig_value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_post; hIndex++ ) { + 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); } @@ -54932,14 +55823,14 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { int HP_pc_follow(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_pre ) { + if (HPMHooks.count.HP_pc_follow_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54947,9 +55838,9 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) { { retVal___ = HPMHooks.source.pc.follow(sd, target_id); } - if( HPMHooks.count.HP_pc_follow_post ) { + if (HPMHooks.count.HP_pc_follow_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_post; hIndex++ ) { + 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); } @@ -54959,14 +55850,14 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) { int HP_pc_stop_following(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_stop_following_pre ) { + if (HPMHooks.count.HP_pc_stop_following_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54974,9 +55865,9 @@ int HP_pc_stop_following(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.stop_following(sd); } - if( HPMHooks.count.HP_pc_stop_following_post ) { + if (HPMHooks.count.HP_pc_stop_following_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) { + 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); } @@ -54986,14 +55877,14 @@ int HP_pc_stop_following(struct map_session_data *sd) { int HP_pc_maxbaselv(const struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxbaselv_pre ) { + if (HPMHooks.count.HP_pc_maxbaselv_pre > 0) { int (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55001,9 +55892,9 @@ int HP_pc_maxbaselv(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.maxbaselv(sd); } - if( HPMHooks.count.HP_pc_maxbaselv_post ) { + if (HPMHooks.count.HP_pc_maxbaselv_post > 0) { int (*postHookFunc) (int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_maxbaselv_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55013,14 +55904,14 @@ int HP_pc_maxbaselv(const struct map_session_data *sd) { int HP_pc_maxjoblv(const struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxjoblv_pre ) { + if (HPMHooks.count.HP_pc_maxjoblv_pre > 0) { int (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55028,9 +55919,9 @@ int HP_pc_maxjoblv(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.maxjoblv(sd); } - if( HPMHooks.count.HP_pc_maxjoblv_post ) { + if (HPMHooks.count.HP_pc_maxjoblv_post > 0) { int (*postHookFunc) (int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_maxjoblv_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55040,14 +55931,14 @@ int HP_pc_maxjoblv(const struct map_session_data *sd) { int HP_pc_checkbaselevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) { + if (HPMHooks.count.HP_pc_checkbaselevelup_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55055,9 +55946,9 @@ int HP_pc_checkbaselevelup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkbaselevelup(sd); } - if( HPMHooks.count.HP_pc_checkbaselevelup_post ) { + if (HPMHooks.count.HP_pc_checkbaselevelup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55067,14 +55958,14 @@ int HP_pc_checkbaselevelup(struct map_session_data *sd) { int HP_pc_checkjoblevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) { + if (HPMHooks.count.HP_pc_checkjoblevelup_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55082,26 +55973,26 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkjoblevelup(sd); } - if( HPMHooks.count.HP_pc_checkjoblevelup_post ) { + if (HPMHooks.count.HP_pc_checkjoblevelup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) { + 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___; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_gainexp_pre ) { - bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + if (HPMHooks.count.HP_pc_gainexp_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55109,26 +56000,26 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned { retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); } - if( HPMHooks.count.HP_pc_gainexp_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_pc_gainexp_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 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(const struct map_session_data *sd) { +uint64 HP_pc_nextbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextbaseexp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_nextbaseexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55136,26 +56027,26 @@ unsigned int HP_pc_nextbaseexp(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.nextbaseexp(sd); } - if( HPMHooks.count.HP_pc_nextbaseexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_nextbaseexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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(const struct map_session_data *sd) { +uint64 HP_pc_thisbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisbaseexp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_thisbaseexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55163,26 +56054,26 @@ unsigned int HP_pc_thisbaseexp(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.thisbaseexp(sd); } - if( HPMHooks.count.HP_pc_thisbaseexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_thisbaseexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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(const struct map_session_data *sd) { +uint64 HP_pc_nextjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextjobexp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_nextjobexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55190,26 +56081,26 @@ unsigned int HP_pc_nextjobexp(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.nextjobexp(sd); } - if( HPMHooks.count.HP_pc_nextjobexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_nextjobexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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(const struct map_session_data *sd) { +uint64 HP_pc_thisjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisjobexp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data **sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_thisjobexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55217,9 +56108,9 @@ unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.thisjobexp(sd); } - if( HPMHooks.count.HP_pc_thisjobexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_thisjobexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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); } @@ -55229,14 +56120,14 @@ unsigned int HP_pc_thisjobexp(const struct map_session_data *sd) { int HP_pc_gets_status_point(int level) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_gets_status_point_pre ) { + if (HPMHooks.count.HP_pc_gets_status_point_pre > 0) { int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55244,9 +56135,9 @@ int HP_pc_gets_status_point(int level) { { retVal___ = HPMHooks.source.pc.gets_status_point(level); } - if( HPMHooks.count.HP_pc_gets_status_point_post ) { + if (HPMHooks.count.HP_pc_gets_status_point_post > 0) { int (*postHookFunc) (int retVal___, int level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_post; hIndex++ ) { + 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); } @@ -55256,14 +56147,14 @@ int HP_pc_gets_status_point(int level) { int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_need_status_point_pre ) { + if (HPMHooks.count.HP_pc_need_status_point_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55271,9 +56162,9 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { { retVal___ = HPMHooks.source.pc.need_status_point(sd, type, val); } - if( HPMHooks.count.HP_pc_need_status_point_post ) { + if (HPMHooks.count.HP_pc_need_status_point_post > 0) { 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++ ) { + 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); } @@ -55283,14 +56174,14 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) { + if (HPMHooks.count.HP_pc_maxparameterincrease_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func; retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55298,9 +56189,9 @@ int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.maxparameterincrease(sd, type); } - if( HPMHooks.count.HP_pc_maxparameterincrease_post ) { + if (HPMHooks.count.HP_pc_maxparameterincrease_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, type); } @@ -55310,14 +56201,14 @@ int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_statusup_pre ) { + if (HPMHooks.count.HP_pc_statusup_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *type, int *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; retVal___ = preHookFunc(&sd, &type, &increase); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55325,9 +56216,9 @@ bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { { retVal___ = HPMHooks.source.pc.statusup(sd, type, increase); } - if( HPMHooks.count.HP_pc_statusup_post ) { + if (HPMHooks.count.HP_pc_statusup_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { + 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, increase); } @@ -55337,14 +56228,14 @@ bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_statusup2_pre ) { + if (HPMHooks.count.HP_pc_statusup2_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55352,9 +56243,9 @@ int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { { retVal___ = HPMHooks.source.pc.statusup2(sd, type, val); } - if( HPMHooks.count.HP_pc_statusup2_post ) { + if (HPMHooks.count.HP_pc_statusup2_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_post; hIndex++ ) { + 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); } @@ -55364,14 +56255,14 @@ int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillup_pre ) { + if (HPMHooks.count.HP_pc_skillup_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55379,9 +56270,9 @@ int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.pc.skillup(sd, skill_id); } - if( HPMHooks.count.HP_pc_skillup_post ) { + if (HPMHooks.count.HP_pc_skillup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_post; hIndex++ ) { + 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); } @@ -55391,14 +56282,14 @@ int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { int HP_pc_allskillup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_allskillup_pre ) { + if (HPMHooks.count.HP_pc_allskillup_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55406,9 +56297,9 @@ int HP_pc_allskillup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.allskillup(sd); } - if( HPMHooks.count.HP_pc_allskillup_post ) { + if (HPMHooks.count.HP_pc_allskillup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55418,14 +56309,14 @@ int HP_pc_allskillup(struct map_session_data *sd) { int HP_pc_resetlvl(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetlvl_pre ) { + if (HPMHooks.count.HP_pc_resetlvl_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55433,9 +56324,9 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.resetlvl(sd, type); } - if( HPMHooks.count.HP_pc_resetlvl_post ) { + if (HPMHooks.count.HP_pc_resetlvl_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_post; hIndex++ ) { + 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); } @@ -55445,14 +56336,14 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) { int HP_pc_resetstate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetstate_pre ) { + if (HPMHooks.count.HP_pc_resetstate_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55460,9 +56351,9 @@ int HP_pc_resetstate(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resetstate(sd); } - if( HPMHooks.count.HP_pc_resetstate_post ) { + if (HPMHooks.count.HP_pc_resetstate_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55472,14 +56363,14 @@ int HP_pc_resetstate(struct map_session_data *sd) { int HP_pc_resetskill(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetskill_pre ) { + if (HPMHooks.count.HP_pc_resetskill_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55487,9 +56378,9 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { { retVal___ = HPMHooks.source.pc.resetskill(sd, flag); } - if( HPMHooks.count.HP_pc_resetskill_post ) { + if (HPMHooks.count.HP_pc_resetskill_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_post; hIndex++ ) { + 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); } @@ -55499,14 +56390,14 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { int HP_pc_resetfeel(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetfeel_pre ) { + if (HPMHooks.count.HP_pc_resetfeel_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55514,9 +56405,9 @@ int HP_pc_resetfeel(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resetfeel(sd); } - if( HPMHooks.count.HP_pc_resetfeel_post ) { + if (HPMHooks.count.HP_pc_resetfeel_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55526,14 +56417,14 @@ int HP_pc_resetfeel(struct map_session_data *sd) { int HP_pc_resethate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resethate_pre ) { + if (HPMHooks.count.HP_pc_resethate_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55541,9 +56432,9 @@ int HP_pc_resethate(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resethate(sd); } - if( HPMHooks.count.HP_pc_resethate_post ) { + if (HPMHooks.count.HP_pc_resethate_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55553,14 +56444,14 @@ int HP_pc_resethate(struct map_session_data *sd) { int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equipitem_pre ) { + if (HPMHooks.count.HP_pc_equipitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *req_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55568,9 +56459,9 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { { retVal___ = HPMHooks.source.pc.equipitem(sd, n, req_pos); } - if( HPMHooks.count.HP_pc_equipitem_post ) { + if (HPMHooks.count.HP_pc_equipitem_post > 0) { 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++ ) { + 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); } @@ -55579,14 +56470,14 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { } void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_equipitem_pos_pre ) { + if (HPMHooks.count.HP_pc_equipitem_pos_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item_data **id, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func; preHookFunc(&sd, &id, &n, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55594,9 +56485,9 @@ void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int { HPMHooks.source.pc.equipitem_pos(sd, id, n, pos); } - if( HPMHooks.count.HP_pc_equipitem_pos_post ) { + if (HPMHooks.count.HP_pc_equipitem_pos_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int n, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func; postHookFunc(sd, id, n, pos); } @@ -55606,14 +56497,14 @@ void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_unequipitem_pre ) { + if (HPMHooks.count.HP_pc_unequipitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55621,9 +56512,9 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { { retVal___ = HPMHooks.source.pc.unequipitem(sd, n, flag); } - if( HPMHooks.count.HP_pc_unequipitem_post ) { + if (HPMHooks.count.HP_pc_unequipitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_post; hIndex++ ) { + 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); } @@ -55632,14 +56523,14 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { } void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_unequipitem_pos_pre ) { + if (HPMHooks.count.HP_pc_unequipitem_pos_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func; preHookFunc(&sd, &n, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55647,9 +56538,9 @@ void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { { HPMHooks.source.pc.unequipitem_pos(sd, n, pos); } - if( HPMHooks.count.HP_pc_unequipitem_pos_post ) { + if (HPMHooks.count.HP_pc_unequipitem_pos_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int n, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_post[hIndex].func; postHookFunc(sd, n, pos); } @@ -55659,14 +56550,14 @@ void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { int HP_pc_checkitem(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkitem_pre ) { + if (HPMHooks.count.HP_pc_checkitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55674,9 +56565,9 @@ int HP_pc_checkitem(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkitem(sd); } - if( HPMHooks.count.HP_pc_checkitem_post ) { + if (HPMHooks.count.HP_pc_checkitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55686,14 +56577,14 @@ int HP_pc_checkitem(struct map_session_data *sd) { int HP_pc_useitem(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_useitem_pre ) { + if (HPMHooks.count.HP_pc_useitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55701,9 +56592,9 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { { retVal___ = HPMHooks.source.pc.useitem(sd, n); } - if( HPMHooks.count.HP_pc_useitem_post ) { + if (HPMHooks.count.HP_pc_useitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_post; hIndex++ ) { + 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); } @@ -55713,14 +56604,14 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) { + if (HPMHooks.count.HP_pc_skillatk_bonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55728,9 +56619,9 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.pc.skillatk_bonus(sd, skill_id); } - if( HPMHooks.count.HP_pc_skillatk_bonus_post ) { + if (HPMHooks.count.HP_pc_skillatk_bonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_post; hIndex++ ) { + 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); } @@ -55740,14 +56631,14 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) { + if (HPMHooks.count.HP_pc_skillheal_bonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55755,9 +56646,9 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.pc.skillheal_bonus(sd, skill_id); } - if( HPMHooks.count.HP_pc_skillheal_bonus_post ) { + if (HPMHooks.count.HP_pc_skillheal_bonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_post; hIndex++ ) { + 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); } @@ -55767,14 +56658,14 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) { + if (HPMHooks.count.HP_pc_skillheal2_bonus_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55782,9 +56673,9 @@ int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.pc.skillheal2_bonus(sd, skill_id); } - if( HPMHooks.count.HP_pc_skillheal2_bonus_post ) { + if (HPMHooks.count.HP_pc_skillheal2_bonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_post; hIndex++ ) { + 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); } @@ -55793,14 +56684,14 @@ int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { } 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 ) { + if (HPMHooks.count.HP_pc_damage_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55808,9 +56699,9 @@ void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned { HPMHooks.source.pc.damage(sd, src, hp, sp); } - if( HPMHooks.count.HP_pc_damage_post ) { + if (HPMHooks.count.HP_pc_damage_post > 0) { 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++ ) { + 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); } @@ -55820,14 +56711,14 @@ void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dead_pre ) { + if (HPMHooks.count.HP_pc_dead_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55835,9 +56726,9 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { { retVal___ = HPMHooks.source.pc.dead(sd, src); } - if( HPMHooks.count.HP_pc_dead_post ) { + if (HPMHooks.count.HP_pc_dead_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) { + 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); } @@ -55846,14 +56737,14 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { } 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 ) { + if (HPMHooks.count.HP_pc_revive_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55861,9 +56752,9 @@ void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) { HPMHooks.source.pc.revive(sd, hp, sp); } - if( HPMHooks.count.HP_pc_revive_post ) { + if (HPMHooks.count.HP_pc_revive_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int hp, unsigned int sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_revive_post[hIndex].func; postHookFunc(sd, hp, sp); } @@ -55872,14 +56763,14 @@ void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) } 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 ) { + if (HPMHooks.count.HP_pc_heal_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55887,9 +56778,9 @@ void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, i { HPMHooks.source.pc.heal(sd, hp, sp, type); } - if( HPMHooks.count.HP_pc_heal_post ) { + if (HPMHooks.count.HP_pc_heal_post > 0) { 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++ ) { + 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); } @@ -55899,14 +56790,14 @@ void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, i int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_itemheal_pre ) { + if (HPMHooks.count.HP_pc_itemheal_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *itemid, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55914,9 +56805,9 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { { retVal___ = HPMHooks.source.pc.itemheal(sd, itemid, hp, sp); } - if( HPMHooks.count.HP_pc_itemheal_post ) { + if (HPMHooks.count.HP_pc_itemheal_post > 0) { 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++ ) { + 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); } @@ -55926,14 +56817,14 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_percentheal_pre ) { + if (HPMHooks.count.HP_pc_percentheal_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55941,38 +56832,38 @@ int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { { retVal___ = HPMHooks.source.pc.percentheal(sd, hp, sp); } - if( HPMHooks.count.HP_pc_percentheal_post ) { + if (HPMHooks.count.HP_pc_percentheal_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int hp, int sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_post; hIndex++ ) { + 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 HP_pc_jobchange(struct map_session_data *sd, int class, int upper) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *job, int *upper); + if (HPMHooks.count.HP_pc_jobchange_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class, int *upper); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &class, &upper); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); + retVal___ = HPMHooks.source.pc.jobchange(sd, class, 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++ ) { + if (HPMHooks.count.HP_pc_jobchange_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int class, 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); + retVal___ = postHookFunc(retVal___, sd, class, upper); } } return retVal___; @@ -55980,14 +56871,14 @@ int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { int HP_pc_setoption(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setoption_pre ) { + if (HPMHooks.count.HP_pc_setoption_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55995,9 +56886,9 @@ int HP_pc_setoption(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.setoption(sd, type); } - if( HPMHooks.count.HP_pc_setoption_post ) { + if (HPMHooks.count.HP_pc_setoption_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_post; hIndex++ ) { + 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); } @@ -56007,14 +56898,14 @@ int HP_pc_setoption(struct map_session_data *sd, int type) { int HP_pc_setcart(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setcart_pre ) { + if (HPMHooks.count.HP_pc_setcart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56022,9 +56913,9 @@ int HP_pc_setcart(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.setcart(sd, type); } - if( HPMHooks.count.HP_pc_setcart_post ) { + if (HPMHooks.count.HP_pc_setcart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_post; hIndex++ ) { + 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); } @@ -56033,14 +56924,14 @@ int HP_pc_setcart(struct map_session_data *sd, int type) { } void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setfalcon_pre ) { + if (HPMHooks.count.HP_pc_setfalcon_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56048,9 +56939,9 @@ void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setfalcon(sd, flag); } - if( HPMHooks.count.HP_pc_setfalcon_post ) { + if (HPMHooks.count.HP_pc_setfalcon_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func; postHookFunc(sd, flag); } @@ -56059,14 +56950,14 @@ void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { } void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingpeco_pre ) { + if (HPMHooks.count.HP_pc_setridingpeco_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingpeco_pre[hIndex].func; preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56074,9 +56965,9 @@ void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setridingpeco(sd, flag); } - if( HPMHooks.count.HP_pc_setridingpeco_post ) { + if (HPMHooks.count.HP_pc_setridingpeco_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingpeco_post[hIndex].func; postHookFunc(sd, flag); } @@ -56085,14 +56976,14 @@ void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { } void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setmadogear_pre ) { + if (HPMHooks.count.HP_pc_setmadogear_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56100,9 +56991,9 @@ void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setmadogear(sd, flag); } - if( HPMHooks.count.HP_pc_setmadogear_post ) { + if (HPMHooks.count.HP_pc_setmadogear_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func; postHookFunc(sd, flag); } @@ -56111,14 +57002,14 @@ void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { } void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingdragon_pre ) { + if (HPMHooks.count.HP_pc_setridingdragon_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingdragon_pre[hIndex].func; preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56126,9 +57017,9 @@ void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { { HPMHooks.source.pc.setridingdragon(sd, type); } - if( HPMHooks.count.HP_pc_setridingdragon_post ) { + if (HPMHooks.count.HP_pc_setridingdragon_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingdragon_post[hIndex].func; postHookFunc(sd, type); } @@ -56137,14 +57028,14 @@ void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { } void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingwug_pre ) { + if (HPMHooks.count.HP_pc_setridingwug_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingwug_pre[hIndex].func; preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56152,9 +57043,9 @@ void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setridingwug(sd, flag); } - if( HPMHooks.count.HP_pc_setridingwug_post ) { + if (HPMHooks.count.HP_pc_setridingwug_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingwug_post[hIndex].func; postHookFunc(sd, flag); } @@ -56164,14 +57055,14 @@ void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_changelook_pre ) { + if (HPMHooks.count.HP_pc_changelook_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56179,9 +57070,9 @@ int HP_pc_changelook(struct map_session_data *sd, int type, int val) { { retVal___ = HPMHooks.source.pc.changelook(sd, type, val); } - if( HPMHooks.count.HP_pc_changelook_post ) { + if (HPMHooks.count.HP_pc_changelook_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_post; hIndex++ ) { + 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); } @@ -56191,14 +57082,14 @@ int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int HP_pc_equiplookall(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equiplookall_pre ) { + if (HPMHooks.count.HP_pc_equiplookall_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56206,26 +57097,26 @@ int HP_pc_equiplookall(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.equiplookall(sd); } - if( HPMHooks.count.HP_pc_equiplookall_post ) { + if (HPMHooks.count.HP_pc_equiplookall_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) { + 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(const struct map_session_data *sd, int type) { +int64 HP_pc_readparam(const struct map_session_data *sd, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_readparam_pre ) { - int (*preHookFunc) (const struct map_session_data **sd, int *type); + int64 retVal___ = 0; + if (HPMHooks.count.HP_pc_readparam_pre > 0) { + int64 (*preHookFunc) (const struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56233,26 +57124,26 @@ int HP_pc_readparam(const struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.readparam(sd, type); } - if( HPMHooks.count.HP_pc_readparam_post ) { - int (*postHookFunc) (int retVal___, const struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_readparam_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const 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 HP_pc_setparam(struct map_session_data *sd, int type, int64 val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setparam_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); + if (HPMHooks.count.HP_pc_setparam_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int64 *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56260,9 +57151,9 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_setparam_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int64 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); } @@ -56272,14 +57163,14 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { int HP_pc_readreg(struct map_session_data *sd, int64 reg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readreg_pre ) { + if (HPMHooks.count.HP_pc_readreg_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func; retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56287,9 +57178,9 @@ int HP_pc_readreg(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readreg(sd, reg); } - if( HPMHooks.count.HP_pc_readreg_post ) { + if (HPMHooks.count.HP_pc_readreg_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) { + 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); } @@ -56298,14 +57189,14 @@ int HP_pc_readreg(struct map_session_data *sd, int64 reg) { } void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setreg_pre ) { + if (HPMHooks.count.HP_pc_setreg_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func; preHookFunc(&sd, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56313,9 +57204,9 @@ void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { { HPMHooks.source.pc.setreg(sd, reg, val); } - if( HPMHooks.count.HP_pc_setreg_post ) { + if (HPMHooks.count.HP_pc_setreg_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int64 reg, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func; postHookFunc(sd, reg, val); } @@ -56325,14 +57216,14 @@ void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregstr_pre ) { + if (HPMHooks.count.HP_pc_readregstr_pre > 0) { char* (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func; retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56340,9 +57231,9 @@ char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregstr(sd, reg); } - if( HPMHooks.count.HP_pc_readregstr_post ) { + if (HPMHooks.count.HP_pc_readregstr_post > 0) { char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) { + 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); } @@ -56351,14 +57242,14 @@ char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { } void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setregstr_pre ) { + if (HPMHooks.count.HP_pc_setregstr_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int64 *reg, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func; preHookFunc(&sd, ®, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56366,9 +57257,9 @@ void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { { HPMHooks.source.pc.setregstr(sd, reg, str); } - if( HPMHooks.count.HP_pc_setregstr_post ) { + if (HPMHooks.count.HP_pc_setregstr_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int64 reg, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func; postHookFunc(sd, reg, str); } @@ -56378,14 +57269,14 @@ void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readregistry_pre ) { + if (HPMHooks.count.HP_pc_readregistry_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func; retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56393,9 +57284,9 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregistry(sd, reg); } - if( HPMHooks.count.HP_pc_readregistry_post ) { + if (HPMHooks.count.HP_pc_readregistry_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) { + 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); } @@ -56405,14 +57296,14 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_pre ) { + if (HPMHooks.count.HP_pc_setregistry_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func; retVal___ = preHookFunc(&sd, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56420,9 +57311,9 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { { retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val); } - if( HPMHooks.count.HP_pc_setregistry_post ) { + if (HPMHooks.count.HP_pc_setregistry_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) { + 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); } @@ -56432,14 +57323,14 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregistry_str_pre ) { + if (HPMHooks.count.HP_pc_readregistry_str_pre > 0) { char* (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) { + 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, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56447,9 +57338,9 @@ char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg); } - if( HPMHooks.count.HP_pc_readregistry_str_post ) { + if (HPMHooks.count.HP_pc_readregistry_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) { + 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); } @@ -56459,14 +57350,14 @@ char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_str_pre ) { + if (HPMHooks.count.HP_pc_setregistry_str_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int64 *reg, const char **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) { + 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, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56474,9 +57365,9 @@ int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *va { retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val); } - if( HPMHooks.count.HP_pc_setregistry_str_post ) { + if (HPMHooks.count.HP_pc_setregistry_str_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg, const char *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) { + 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); } @@ -56486,14 +57377,14 @@ int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *va int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimer_pre ) { + if (HPMHooks.count.HP_pc_addeventtimer_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *tick, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56501,9 +57392,9 @@ int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { retVal___ = HPMHooks.source.pc.addeventtimer(sd, tick, name); } - if( HPMHooks.count.HP_pc_addeventtimer_post ) { + if (HPMHooks.count.HP_pc_addeventtimer_post > 0) { 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++ ) { + 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); } @@ -56513,14 +57404,14 @@ int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_deleventtimer_pre ) { + if (HPMHooks.count.HP_pc_deleventtimer_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56528,9 +57419,9 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.pc.deleventtimer(sd, name); } - if( HPMHooks.count.HP_pc_deleventtimer_post ) { + if (HPMHooks.count.HP_pc_deleventtimer_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) { + 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); } @@ -56540,14 +57431,14 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { int HP_pc_cleareventtimer(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cleareventtimer_pre ) { + if (HPMHooks.count.HP_pc_cleareventtimer_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56555,9 +57446,9 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.cleareventtimer(sd); } - if( HPMHooks.count.HP_pc_cleareventtimer_post ) { + if (HPMHooks.count.HP_pc_cleareventtimer_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -56567,14 +57458,14 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) { int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimercount_pre ) { + if (HPMHooks.count.HP_pc_addeventtimercount_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56582,9 +57473,9 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int { retVal___ = HPMHooks.source.pc.addeventtimercount(sd, name, tick); } - if( HPMHooks.count.HP_pc_addeventtimercount_post ) { + if (HPMHooks.count.HP_pc_addeventtimercount_post > 0) { 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++ ) { + 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); } @@ -56594,14 +57485,14 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int int HP_pc_calc_pvprank(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_pre ) { + if (HPMHooks.count.HP_pc_calc_pvprank_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56609,9 +57500,9 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_pvprank(sd); } - if( HPMHooks.count.HP_pc_calc_pvprank_post ) { + if (HPMHooks.count.HP_pc_calc_pvprank_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) { + 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); } @@ -56621,14 +57512,14 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) { int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) { + if (HPMHooks.count.HP_pc_calc_pvprank_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56636,9 +57527,9 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.calc_pvprank_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_calc_pvprank_timer_post ) { + if (HPMHooks.count.HP_pc_calc_pvprank_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) { + 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); } @@ -56648,14 +57539,14 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_ismarried(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_ismarried_pre ) { + if (HPMHooks.count.HP_pc_ismarried_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56663,9 +57554,9 @@ int HP_pc_ismarried(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.ismarried(sd); } - if( HPMHooks.count.HP_pc_ismarried_post ) { + if (HPMHooks.count.HP_pc_ismarried_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -56675,14 +57566,14 @@ int HP_pc_ismarried(struct map_session_data *sd) { int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_marriage_pre ) { + if (HPMHooks.count.HP_pc_marriage_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56690,9 +57581,9 @@ int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { retVal___ = HPMHooks.source.pc.marriage(sd, dstsd); } - if( HPMHooks.count.HP_pc_marriage_post ) { + if (HPMHooks.count.HP_pc_marriage_post > 0) { 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++ ) { + 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); } @@ -56702,14 +57593,14 @@ int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) int HP_pc_divorce(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_divorce_pre ) { + if (HPMHooks.count.HP_pc_divorce_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56717,9 +57608,9 @@ int HP_pc_divorce(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.divorce(sd); } - if( HPMHooks.count.HP_pc_divorce_post ) { + if (HPMHooks.count.HP_pc_divorce_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -56729,14 +57620,14 @@ int HP_pc_divorce(struct map_session_data *sd) { 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 ) { + if (HPMHooks.count.HP_pc_get_partner_pre > 0) { struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56744,9 +57635,9 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_partner(sd); } - if( HPMHooks.count.HP_pc_get_partner_post ) { + if (HPMHooks.count.HP_pc_get_partner_post > 0) { 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++ ) { + 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); } @@ -56756,14 +57647,14 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { 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 ) { + if (HPMHooks.count.HP_pc_get_father_pre > 0) { struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56771,9 +57662,9 @@ struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_father(sd); } - if( HPMHooks.count.HP_pc_get_father_post ) { + if (HPMHooks.count.HP_pc_get_father_post > 0) { 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++ ) { + 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); } @@ -56783,14 +57674,14 @@ struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { 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 ) { + if (HPMHooks.count.HP_pc_get_mother_pre > 0) { struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56798,9 +57689,9 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_mother(sd); } - if( HPMHooks.count.HP_pc_get_mother_post ) { + if (HPMHooks.count.HP_pc_get_mother_post > 0) { 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++ ) { + 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); } @@ -56810,14 +57701,14 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { 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 ) { + if (HPMHooks.count.HP_pc_get_child_pre > 0) { struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56825,9 +57716,9 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_child(sd); } - if( HPMHooks.count.HP_pc_get_child_post ) { + if (HPMHooks.count.HP_pc_get_child_post > 0) { 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++ ) { + 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); } @@ -56836,14 +57727,14 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { } void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bleeding_pre ) { + if (HPMHooks.count.HP_pc_bleeding_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56851,9 +57742,9 @@ void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { { HPMHooks.source.pc.bleeding(sd, diff_tick); } - if( HPMHooks.count.HP_pc_bleeding_post ) { + if (HPMHooks.count.HP_pc_bleeding_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int diff_tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bleeding_post[hIndex].func; postHookFunc(sd, diff_tick); } @@ -56862,14 +57753,14 @@ void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { } void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { int hIndex = 0; - if( HPMHooks.count.HP_pc_regen_pre ) { + if (HPMHooks.count.HP_pc_regen_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56877,9 +57768,9 @@ void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { { HPMHooks.source.pc.regen(sd, diff_tick); } - if( HPMHooks.count.HP_pc_regen_post ) { + if (HPMHooks.count.HP_pc_regen_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int diff_tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_regen_post[hIndex].func; postHookFunc(sd, diff_tick); } @@ -56888,14 +57779,14 @@ void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { } void HP_pc_setstand(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setstand_pre ) { + if (HPMHooks.count.HP_pc_setstand_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56903,9 +57794,9 @@ void HP_pc_setstand(struct map_session_data *sd) { { HPMHooks.source.pc.setstand(sd); } - if( HPMHooks.count.HP_pc_setstand_post ) { + if (HPMHooks.count.HP_pc_setstand_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func; postHookFunc(sd); } @@ -56915,14 +57806,14 @@ void HP_pc_setstand(struct map_session_data *sd) { int HP_pc_candrop(struct map_session_data *sd, struct item *item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_candrop_pre ) { + if (HPMHooks.count.HP_pc_candrop_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56930,38 +57821,38 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { { retVal___ = HPMHooks.source.pc.candrop(sd, item); } - if( HPMHooks.count.HP_pc_candrop_post ) { + if (HPMHooks.count.HP_pc_candrop_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) { + 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 HP_pc_jobid2mapid(int16 class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { - int (*preHookFunc) (unsigned short *b_class); + if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) { + int (*preHookFunc) (int16 *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; - retVal___ = preHookFunc(&b_class); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); + retVal___ = HPMHooks.source.pc.jobid2mapid(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++ ) { + if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) { + int (*postHookFunc) (int retVal___, int16 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); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -56969,14 +57860,14 @@ int HP_pc_jobid2mapid(unsigned short b_class) { int HP_pc_mapid2jobid(unsigned short class_, int sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_mapid2jobid_pre ) { + if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) { int (*preHookFunc) (unsigned short *class_, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56984,52 +57875,52 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) { { retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); } - if( HPMHooks.count.HP_pc_mapid2jobid_post ) { + if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) { int (*postHookFunc) (int retVal___, unsigned short class_, int sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++ ) { + 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_) { +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_); + if (HPMHooks.count.HP_pc_job_name_pre > 0) { + const char* (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.job_name(class_); + 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++ ) { + if (HPMHooks.count.HP_pc_job_name_post > 0) { + 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_); + 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 ) { + if (HPMHooks.count.HP_pc_setinvincibletimer_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57037,9 +57928,9 @@ void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { { HPMHooks.source.pc.setinvincibletimer(sd, val); } - if( HPMHooks.count.HP_pc_setinvincibletimer_post ) { + if (HPMHooks.count.HP_pc_setinvincibletimer_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_post[hIndex].func; postHookFunc(sd, val); } @@ -57048,14 +57939,14 @@ void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { } void HP_pc_delinvincibletimer(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_delinvincibletimer_pre ) { + if (HPMHooks.count.HP_pc_delinvincibletimer_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57063,9 +57954,9 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) { { HPMHooks.source.pc.delinvincibletimer(sd); } - if( HPMHooks.count.HP_pc_delinvincibletimer_post ) { + if (HPMHooks.count.HP_pc_delinvincibletimer_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func; postHookFunc(sd); } @@ -57075,14 +57966,14 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) { int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addspiritball_pre ) { + if (HPMHooks.count.HP_pc_addspiritball_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *interval, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57090,9 +57981,9 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { { retVal___ = HPMHooks.source.pc.addspiritball(sd, interval, max); } - if( HPMHooks.count.HP_pc_addspiritball_post ) { + if (HPMHooks.count.HP_pc_addspiritball_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int interval, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_post; hIndex++ ) { + 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); } @@ -57102,14 +57993,14 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_delspiritball_pre ) { + if (HPMHooks.count.HP_pc_delspiritball_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57117,9 +58008,9 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { { retVal___ = HPMHooks.source.pc.delspiritball(sd, count, type); } - if( HPMHooks.count.HP_pc_delspiritball_post ) { + if (HPMHooks.count.HP_pc_delspiritball_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int count, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_post; hIndex++ ) { + 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); } @@ -57129,14 +58020,14 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getmaxspiritball_pre ) { + if (HPMHooks.count.HP_pc_getmaxspiritball_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *min); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_pre[hIndex].func; retVal___ = preHookFunc(&sd, &min); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57144,64 +58035,91 @@ int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { { retVal___ = HPMHooks.source.pc.getmaxspiritball(sd, min); } - if( HPMHooks.count.HP_pc_getmaxspiritball_post ) { + if (HPMHooks.count.HP_pc_getmaxspiritball_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int min); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, min); } } return retVal___; } -void HP_pc_addfame(struct map_session_data *sd, int count) { +void HP_pc_addfame(struct map_session_data *sd, int ranktype, int count) { int hIndex = 0; - if( HPMHooks.count.HP_pc_addfame_pre ) { - void (*preHookFunc) (struct map_session_data **sd, int *count); + if (HPMHooks.count.HP_pc_addfame_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *ranktype, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func; - preHookFunc(&sd, &count); + preHookFunc(&sd, &ranktype, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.pc.addfame(sd, count); + HPMHooks.source.pc.addfame(sd, ranktype, 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++ ) { + if (HPMHooks.count.HP_pc_addfame_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int ranktype, 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); + postHookFunc(sd, ranktype, count); } } return; } -unsigned char HP_pc_famerank(int char_id, int job) { +int HP_pc_fame_rank(int char_id, int ranktype) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_pc_famerank_pre ) { - unsigned char (*preHookFunc) (int *char_id, int *job); + int retVal___ = 0; + if (HPMHooks.count.HP_pc_fame_rank_pre > 0) { + int (*preHookFunc) (int *char_id, int *ranktype); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_fame_rank_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &ranktype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.famerank(char_id, job); + retVal___ = HPMHooks.source.pc.fame_rank(char_id, ranktype); } - 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); + if (HPMHooks.count.HP_pc_fame_rank_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int ranktype); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_fame_rank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, ranktype); + } + } + return retVal___; +} +int HP_pc_famelist_type(uint16 job_mapid) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_famelist_type_pre > 0) { + int (*preHookFunc) (uint16 *job_mapid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_famelist_type_pre[hIndex].func; + retVal___ = preHookFunc(&job_mapid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.famelist_type(job_mapid); + } + if (HPMHooks.count.HP_pc_famelist_type_post > 0) { + int (*postHookFunc) (int retVal___, uint16 job_mapid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_famelist_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job_mapid); } } return retVal___; @@ -57209,14 +58127,14 @@ unsigned char HP_pc_famerank(int char_id, int job) { int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_hate_mob_pre ) { + if (HPMHooks.count.HP_pc_set_hate_mob_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *pos, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57224,9 +58142,9 @@ int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list * { retVal___ = HPMHooks.source.pc.set_hate_mob(sd, pos, bl); } - if( HPMHooks.count.HP_pc_set_hate_mob_post ) { + if (HPMHooks.count.HP_pc_set_hate_mob_post > 0) { 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++ ) { + 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); } @@ -57236,14 +58154,14 @@ int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list * int HP_pc_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readdb_pre ) { + if (HPMHooks.count.HP_pc_readdb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57251,9 +58169,9 @@ int HP_pc_readdb(void) { { retVal___ = HPMHooks.source.pc.readdb(); } - if( HPMHooks.count.HP_pc_readdb_post ) { + if (HPMHooks.count.HP_pc_readdb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -57263,14 +58181,14 @@ int HP_pc_readdb(void) { int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_day_timer_pre ) { + if (HPMHooks.count.HP_pc_map_day_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57278,9 +58196,9 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.map_day_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_map_day_timer_post ) { + if (HPMHooks.count.HP_pc_map_day_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) { + 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); } @@ -57290,14 +58208,14 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_night_timer_pre ) { + if (HPMHooks.count.HP_pc_map_night_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57305,9 +58223,9 @@ int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.map_night_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_map_night_timer_post ) { + if (HPMHooks.count.HP_pc_map_night_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) { + 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); } @@ -57316,14 +58234,14 @@ int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_pc_inventory_rentals(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_inventory_rentals_pre ) { + if (HPMHooks.count.HP_pc_inventory_rentals_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57331,9 +58249,9 @@ void HP_pc_inventory_rentals(struct map_session_data *sd) { { HPMHooks.source.pc.inventory_rentals(sd); } - if( HPMHooks.count.HP_pc_inventory_rentals_post ) { + if (HPMHooks.count.HP_pc_inventory_rentals_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func; postHookFunc(sd); } @@ -57343,14 +58261,14 @@ void HP_pc_inventory_rentals(struct map_session_data *sd) { int HP_pc_inventory_rental_clear(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) { + if (HPMHooks.count.HP_pc_inventory_rental_clear_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57358,9 +58276,9 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd); } - if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) { + if (HPMHooks.count.HP_pc_inventory_rental_clear_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) { + 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); } @@ -57369,14 +58287,14 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_pc_inventory_rental_add_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *seconds); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57384,38 +58302,38 @@ void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { { HPMHooks.source.pc.inventory_rental_add(sd, seconds); } - if( HPMHooks.count.HP_pc_inventory_rental_add_post ) { + if (HPMHooks.count.HP_pc_inventory_rental_add_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int seconds); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_post; hIndex++ ) { + 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 HP_pc_disguise(struct map_session_data *sd, int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_disguise_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *class_); + if (HPMHooks.count.HP_pc_disguise_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &class_); + retVal___ = preHookFunc(&sd, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.disguise(sd, class_); + 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++ ) { + if (HPMHooks.count.HP_pc_disguise_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, sd, class); } } return retVal___; @@ -57423,14 +58341,14 @@ int HP_pc_disguise(struct map_session_data *sd, int class_) { bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_isautolooting_pre ) { + if (HPMHooks.count.HP_pc_isautolooting_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57438,9 +58356,9 @@ bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.pc.isautolooting(sd, nameid); } - if( HPMHooks.count.HP_pc_isautolooting_post ) { + if (HPMHooks.count.HP_pc_isautolooting_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_post; hIndex++ ) { + 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); } @@ -57449,14 +58367,14 @@ bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { } void HP_pc_overheat(struct map_session_data *sd, int val) { int hIndex = 0; - if( HPMHooks.count.HP_pc_overheat_pre ) { + if (HPMHooks.count.HP_pc_overheat_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57464,9 +58382,9 @@ void HP_pc_overheat(struct map_session_data *sd, int val) { { HPMHooks.source.pc.overheat(sd, val); } - if( HPMHooks.count.HP_pc_overheat_post ) { + if (HPMHooks.count.HP_pc_overheat_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_overheat_post[hIndex].func; postHookFunc(sd, val); } @@ -57476,14 +58394,14 @@ void HP_pc_overheat(struct map_session_data *sd, int val) { int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_banding_pre ) { + if (HPMHooks.count.HP_pc_banding_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57491,9 +58409,9 @@ int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { { retVal___ = HPMHooks.source.pc.banding(sd, skill_lv); } - if( HPMHooks.count.HP_pc_banding_post ) { + if (HPMHooks.count.HP_pc_banding_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_post; hIndex++ ) { + 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); } @@ -57502,14 +58420,14 @@ int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { } void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { int hIndex = 0; - if( HPMHooks.count.HP_pc_itemcd_do_pre ) { + if (HPMHooks.count.HP_pc_itemcd_do_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, bool *load); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57517,9 +58435,9 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { { HPMHooks.source.pc.itemcd_do(sd, load); } - if( HPMHooks.count.HP_pc_itemcd_do_post ) { + if (HPMHooks.count.HP_pc_itemcd_do_post > 0) { void (*postHookFunc) (struct map_session_data *sd, bool load); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_post; hIndex++ ) { + 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); } @@ -57529,14 +58447,14 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { int HP_pc_load_combo(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_load_combo_pre ) { + if (HPMHooks.count.HP_pc_load_combo_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57544,9 +58462,9 @@ int HP_pc_load_combo(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.load_combo(sd); } - if( HPMHooks.count.HP_pc_load_combo_post ) { + if (HPMHooks.count.HP_pc_load_combo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) { + 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); } @@ -57555,14 +58473,14 @@ int HP_pc_load_combo(struct map_session_data *sd) { } void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_add_charm_pre ) { + if (HPMHooks.count.HP_pc_add_charm_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *interval, int *max, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; preHookFunc(&sd, &interval, &max, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57570,9 +58488,9 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ { HPMHooks.source.pc.add_charm(sd, interval, max, type); } - if( HPMHooks.count.HP_pc_add_charm_post ) { + if (HPMHooks.count.HP_pc_add_charm_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int interval, int max, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; postHookFunc(sd, interval, max, type); } @@ -57581,14 +58499,14 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ } void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_del_charm_pre ) { + if (HPMHooks.count.HP_pc_del_charm_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; preHookFunc(&sd, &count, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57596,9 +58514,9 @@ void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { { HPMHooks.source.pc.del_charm(sd, count, type); } - if( HPMHooks.count.HP_pc_del_charm_post ) { + if (HPMHooks.count.HP_pc_del_charm_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int count, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; postHookFunc(sd, count, type); } @@ -57607,14 +58525,14 @@ void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { } void HP_pc_baselevelchanged(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_baselevelchanged_pre ) { + if (HPMHooks.count.HP_pc_baselevelchanged_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57622,9 +58540,9 @@ void HP_pc_baselevelchanged(struct map_session_data *sd) { { HPMHooks.source.pc.baselevelchanged(sd); } - if( HPMHooks.count.HP_pc_baselevelchanged_post ) { + if (HPMHooks.count.HP_pc_baselevelchanged_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func; postHookFunc(sd); } @@ -57634,14 +58552,14 @@ void HP_pc_baselevelchanged(struct map_session_data *sd) { int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) { + if (HPMHooks.count.HP_pc_level_penalty_mod_pre > 0) { int (*preHookFunc) (int *diff, unsigned char *race, uint32 *mode, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57649,9 +58567,9 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) { retVal___ = HPMHooks.source.pc.level_penalty_mod(diff, race, mode, type); } - if( HPMHooks.count.HP_pc_level_penalty_mod_post ) { + if (HPMHooks.count.HP_pc_level_penalty_mod_post > 0) { int (*postHookFunc) (int retVal___, int diff, unsigned char race, uint32 mode, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) { + 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); } @@ -57661,14 +58579,14 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) int HP_pc_calc_skillpoint(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) { + if (HPMHooks.count.HP_pc_calc_skillpoint_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57676,9 +58594,9 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skillpoint(sd); } - if( HPMHooks.count.HP_pc_calc_skillpoint_post ) { + if (HPMHooks.count.HP_pc_calc_skillpoint_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) { + 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); } @@ -57688,14 +58606,14 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) { int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_invincible_timer_pre ) { + if (HPMHooks.count.HP_pc_invincible_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57703,9 +58621,9 @@ int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_invincible_timer_post ) { + if (HPMHooks.count.HP_pc_invincible_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) { + 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); } @@ -57715,14 +58633,14 @@ int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_spiritball_timer_pre ) { + if (HPMHooks.count.HP_pc_spiritball_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57730,9 +58648,9 @@ int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_spiritball_timer_post ) { + if (HPMHooks.count.HP_pc_spiritball_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) { + 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); } @@ -57742,16 +58660,16 @@ int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_check_banding(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_banding_pre ) { + if (HPMHooks.count.HP_pc_check_banding_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57761,9 +58679,9 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_check_banding_post ) { + if (HPMHooks.count.HP_pc_check_banding_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) { + 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); @@ -57775,14 +58693,14 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) { int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) { + if (HPMHooks.count.HP_pc_inventory_rental_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57790,9 +58708,9 @@ int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.inventory_rental_end(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_inventory_rental_end_post ) { + if (HPMHooks.count.HP_pc_inventory_rental_end_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) { + 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); } @@ -57801,14 +58719,14 @@ int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { } void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_pc_check_skilltree_pre ) { + if (HPMHooks.count.HP_pc_check_skilltree_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57816,9 +58734,9 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { { HPMHooks.source.pc.check_skilltree(sd, skill_id); } - if( HPMHooks.count.HP_pc_check_skilltree_post ) { + if (HPMHooks.count.HP_pc_check_skilltree_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_post; hIndex++ ) { + 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); } @@ -57828,14 +58746,14 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { 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___ = 0; - if( HPMHooks.count.HP_pc_bonus_autospell_pre ) { + if (HPMHooks.count.HP_pc_bonus_autospell_pre > 0) { int (*preHookFunc) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, short *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57843,9 +58761,9 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv { retVal___ = HPMHooks.source.pc.bonus_autospell(spell, max, id, lv, rate, flag, card_id); } - if( HPMHooks.count.HP_pc_bonus_autospell_post ) { + if (HPMHooks.count.HP_pc_bonus_autospell_post > 0) { 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++ ) { + 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); } @@ -57855,14 +58773,14 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv 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___ = 0; - if( HPMHooks.count.HP_pc_bonus_autospell_onskill_pre ) { + if (HPMHooks.count.HP_pc_bonus_autospell_onskill_pre > 0) { int (*preHookFunc) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, short *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57870,9 +58788,9 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ { 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 ) { + if (HPMHooks.count.HP_pc_bonus_autospell_onskill_post > 0) { 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++ ) { + 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); } @@ -57882,14 +58800,14 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_addeff_pre ) { + if (HPMHooks.count.HP_pc_bonus_addeff_pre > 0) { int (*preHookFunc) (struct s_addeffect **effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) { + 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, &duration); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57897,9 +58815,9 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int { retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag, duration); } - if( HPMHooks.count.HP_pc_bonus_addeff_post ) { + if (HPMHooks.count.HP_pc_bonus_addeff_post > 0) { int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { + 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, duration); } @@ -57909,14 +58827,14 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int 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___ = 0; - if( HPMHooks.count.HP_pc_bonus_addeff_onskill_pre ) { + if (HPMHooks.count.HP_pc_bonus_addeff_onskill_pre > 0) { int (*preHookFunc) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57924,9 +58842,9 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum { retVal___ = HPMHooks.source.pc.bonus_addeff_onskill(effect, max, id, rate, skill_id, target); } - if( HPMHooks.count.HP_pc_bonus_addeff_onskill_post ) { + if (HPMHooks.count.HP_pc_bonus_addeff_onskill_post > 0) { 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++ ) { + 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); } @@ -57936,14 +58854,14 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum 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___ = 0; - if( HPMHooks.count.HP_pc_bonus_item_drop_pre ) { + if (HPMHooks.count.HP_pc_bonus_item_drop_pre > 0) { int (*preHookFunc) (struct s_add_drop **drop, const short *max, short *id, short *group, int *race, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57951,25 +58869,25 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, short id, sh { retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate); } - if( HPMHooks.count.HP_pc_bonus_item_drop_post ) { + if (HPMHooks.count.HP_pc_bonus_item_drop_post > 0) { 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++ ) { + 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) { +void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *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); + if (HPMHooks.count.HP_pc_calcexp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57977,9 +58895,9 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned { 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++ ) { + if (HPMHooks.count.HP_pc_calcexp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *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); } @@ -57989,14 +58907,14 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_respawn_timer_pre ) { + if (HPMHooks.count.HP_pc_respawn_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58004,9 +58922,9 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_respawn_timer_post ) { + if (HPMHooks.count.HP_pc_respawn_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) { + 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); } @@ -58016,16 +58934,16 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) { + if (HPMHooks.count.HP_pc_jobchange_killclone_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58035,9 +58953,9 @@ int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_jobchange_killclone_post ) { + if (HPMHooks.count.HP_pc_jobchange_killclone_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) { + 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); @@ -58049,14 +58967,14 @@ int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { int HP_pc_getstat(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getstat_pre ) { + if (HPMHooks.count.HP_pc_getstat_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58064,9 +58982,9 @@ int HP_pc_getstat(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.getstat(sd, type); } - if( HPMHooks.count.HP_pc_getstat_post ) { + if (HPMHooks.count.HP_pc_getstat_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_post; hIndex++ ) { + 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); } @@ -58076,14 +58994,14 @@ int HP_pc_getstat(struct map_session_data *sd, int type) { int HP_pc_setstat(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setstat_pre ) { + if (HPMHooks.count.HP_pc_setstat_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58091,9 +59009,9 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) { { retVal___ = HPMHooks.source.pc.setstat(sd, type, val); } - if( HPMHooks.count.HP_pc_setstat_post ) { + if (HPMHooks.count.HP_pc_setstat_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_post; hIndex++ ) { + 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); } @@ -58103,14 +59021,14 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) { int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_eventtimer_pre ) { + if (HPMHooks.count.HP_pc_eventtimer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58118,9 +59036,9 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_eventtimer_post ) { + if (HPMHooks.count.HP_pc_eventtimer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) { + 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); } @@ -58130,16 +59048,16 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) { + if (HPMHooks.count.HP_pc_daynight_timer_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58149,9 +59067,9 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) { + if (HPMHooks.count.HP_pc_daynight_timer_sub_post > 0) { 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++ ) { + 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); @@ -58163,14 +59081,14 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_charm_timer_pre ) { + if (HPMHooks.count.HP_pc_charm_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58178,9 +59096,9 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_charm_timer_post ) { + if (HPMHooks.count.HP_pc_charm_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) { + 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); } @@ -58190,14 +59108,14 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) { + if (HPMHooks.count.HP_pc_readdb_levelpenalty_pre > 0) { bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58205,9 +59123,9 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { { retVal___ = HPMHooks.source.pc.readdb_levelpenalty(fields, columns, current); } - if( HPMHooks.count.HP_pc_readdb_levelpenalty_post ) { + if (HPMHooks.count.HP_pc_readdb_levelpenalty_post > 0) { bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_post; hIndex++ ) { + 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); } @@ -58217,14 +59135,14 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_autosave_pre ) { + if (HPMHooks.count.HP_pc_autosave_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58232,9 +59150,9 @@ int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_autosave_post ) { + if (HPMHooks.count.HP_pc_autosave_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) { + 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); } @@ -58244,14 +59162,14 @@ int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_timer_pre ) { + if (HPMHooks.count.HP_pc_follow_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58259,9 +59177,9 @@ int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_follow_timer_post ) { + if (HPMHooks.count.HP_pc_follow_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) { + 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); } @@ -58270,14 +59188,14 @@ int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_pc_read_skill_tree(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_read_skill_tree_pre ) { + if (HPMHooks.count.HP_pc_read_skill_tree_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58285,9 +59203,9 @@ void HP_pc_read_skill_tree(void) { { HPMHooks.source.pc.read_skill_tree(); } - if( HPMHooks.count.HP_pc_read_skill_tree_post ) { + if (HPMHooks.count.HP_pc_read_skill_tree_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) { + 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(); } @@ -58296,14 +59214,14 @@ void HP_pc_read_skill_tree(void) { } void HP_pc_clear_skill_tree(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_clear_skill_tree_pre ) { + if (HPMHooks.count.HP_pc_clear_skill_tree_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_clear_skill_tree_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58311,9 +59229,9 @@ void HP_pc_clear_skill_tree(void) { { HPMHooks.source.pc.clear_skill_tree(); } - if( HPMHooks.count.HP_pc_clear_skill_tree_post ) { + if (HPMHooks.count.HP_pc_clear_skill_tree_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_clear_skill_tree_post[hIndex].func; postHookFunc(); } @@ -58323,14 +59241,14 @@ void HP_pc_clear_skill_tree(void) { int HP_pc_isUseitem(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_isUseitem_pre ) { + if (HPMHooks.count.HP_pc_isUseitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58338,9 +59256,9 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) { { retVal___ = HPMHooks.source.pc.isUseitem(sd, n); } - if( HPMHooks.count.HP_pc_isUseitem_post ) { + if (HPMHooks.count.HP_pc_isUseitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_post; hIndex++ ) { + 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); } @@ -58350,16 +59268,16 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) { int HP_pc_show_steal(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_show_steal_pre ) { + if (HPMHooks.count.HP_pc_show_steal_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58369,9 +59287,9 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_show_steal_post ) { + if (HPMHooks.count.HP_pc_show_steal_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) { + 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); @@ -58383,14 +59301,14 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) { int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkcombo_pre ) { + if (HPMHooks.count.HP_pc_checkcombo_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58398,9 +59316,9 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { { retVal___ = HPMHooks.source.pc.checkcombo(sd, data); } - if( HPMHooks.count.HP_pc_checkcombo_post ) { + if (HPMHooks.count.HP_pc_checkcombo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) { + 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); } @@ -58410,14 +59328,14 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int HP_pc_calcweapontype(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calcweapontype_pre ) { + if (HPMHooks.count.HP_pc_calcweapontype_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58425,9 +59343,9 @@ int HP_pc_calcweapontype(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calcweapontype(sd); } - if( HPMHooks.count.HP_pc_calcweapontype_post ) { + if (HPMHooks.count.HP_pc_calcweapontype_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -58437,14 +59355,14 @@ int HP_pc_calcweapontype(struct map_session_data *sd) { int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_removecombo_pre ) { + if (HPMHooks.count.HP_pc_removecombo_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58452,9 +59370,9 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { { retVal___ = HPMHooks.source.pc.removecombo(sd, data); } - if( HPMHooks.count.HP_pc_removecombo_post ) { + if (HPMHooks.count.HP_pc_removecombo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) { + 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); } @@ -58463,14 +59381,14 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { } void HP_pc_bank_deposit(struct map_session_data *sd, int money) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_deposit_pre ) { + if (HPMHooks.count.HP_pc_bank_deposit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bank_deposit_pre[hIndex].func; preHookFunc(&sd, &money); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58478,9 +59396,9 @@ void HP_pc_bank_deposit(struct map_session_data *sd, int money) { { HPMHooks.source.pc.bank_deposit(sd, money); } - if( HPMHooks.count.HP_pc_bank_deposit_post ) { + if (HPMHooks.count.HP_pc_bank_deposit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bank_deposit_post[hIndex].func; postHookFunc(sd, money); } @@ -58489,14 +59407,14 @@ void HP_pc_bank_deposit(struct map_session_data *sd, int money) { } void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_withdraw_pre ) { + if (HPMHooks.count.HP_pc_bank_withdraw_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bank_withdraw_pre[hIndex].func; preHookFunc(&sd, &money); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58504,9 +59422,9 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { { HPMHooks.source.pc.bank_withdraw(sd, money); } - if( HPMHooks.count.HP_pc_bank_withdraw_post ) { + if (HPMHooks.count.HP_pc_bank_withdraw_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bank_withdraw_post[hIndex].func; postHookFunc(sd, money); } @@ -58515,14 +59433,14 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { } void HP_pc_rental_expire(struct map_session_data *sd, int i) { int hIndex = 0; - if( HPMHooks.count.HP_pc_rental_expire_pre ) { + if (HPMHooks.count.HP_pc_rental_expire_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func; preHookFunc(&sd, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58530,9 +59448,9 @@ void HP_pc_rental_expire(struct map_session_data *sd, int i) { { HPMHooks.source.pc.rental_expire(sd, i); } - if( HPMHooks.count.HP_pc_rental_expire_post ) { + if (HPMHooks.count.HP_pc_rental_expire_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func; postHookFunc(sd, i); } @@ -58541,14 +59459,14 @@ void HP_pc_rental_expire(struct map_session_data *sd, int i) { } void HP_pc_scdata_received(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_scdata_received_pre ) { + if (HPMHooks.count.HP_pc_scdata_received_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58556,9 +59474,9 @@ void HP_pc_scdata_received(struct map_session_data *sd) { { HPMHooks.source.pc.scdata_received(sd); } - if( HPMHooks.count.HP_pc_scdata_received_post ) { + if (HPMHooks.count.HP_pc_scdata_received_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func; postHookFunc(sd); } @@ -58567,14 +59485,14 @@ void HP_pc_scdata_received(struct map_session_data *sd) { } void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bound_clear_pre ) { + if (HPMHooks.count.HP_pc_bound_clear_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_item_bound_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func; preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58582,9 +59500,9 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { HPMHooks.source.pc.bound_clear(sd, type); } - if( HPMHooks.count.HP_pc_bound_clear_post ) { + if (HPMHooks.count.HP_pc_bound_clear_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bound_clear_post[hIndex].func; postHookFunc(sd, type); } @@ -58594,14 +59512,14 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_expiration_timer_pre ) { + if (HPMHooks.count.HP_pc_expiration_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58609,9 +59527,9 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_expiration_timer_post ) { + if (HPMHooks.count.HP_pc_expiration_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_expiration_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -58621,14 +59539,14 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) { + if (HPMHooks.count.HP_pc_global_expiration_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58636,9 +59554,9 @@ int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.global_expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_global_expiration_timer_post ) { + if (HPMHooks.count.HP_pc_global_expiration_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -58647,14 +59565,14 @@ int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_pc_expire_check(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_expire_check_pre ) { + if (HPMHooks.count.HP_pc_expire_check_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58662,52 +59580,52 @@ void HP_pc_expire_check(struct map_session_data *sd) { { HPMHooks.source.pc.expire_check(sd); } - if( HPMHooks.count.HP_pc_expire_check_post ) { + if (HPMHooks.count.HP_pc_expire_check_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_expire_check_post[hIndex].func; postHookFunc(sd); } } return; } -bool HP_pc_db_checkid(unsigned int class_) { +bool HP_pc_db_checkid(int class) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_db_checkid_pre ) { - bool (*preHookFunc) (unsigned int *class_); + if (HPMHooks.count.HP_pc_db_checkid_pre > 0) { + bool (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_db_checkid_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.db_checkid(class_); + retVal___ = HPMHooks.source.pc.db_checkid(class); } - if( HPMHooks.count.HP_pc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_db_checkid_post > 0) { + bool (*postHookFunc) (bool retVal___, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; } void HP_pc_validate_levels(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_validate_levels_pre ) { + if (HPMHooks.count.HP_pc_validate_levels_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_validate_levels_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58715,25 +59633,51 @@ void HP_pc_validate_levels(void) { { HPMHooks.source.pc.validate_levels(); } - if( HPMHooks.count.HP_pc_validate_levels_post ) { + if (HPMHooks.count.HP_pc_validate_levels_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_validate_levels_post[hIndex].func; postHookFunc(); } } return; } +void HP_pc_update_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_update_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_update_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.update_job_and_level(sd); + } + if (HPMHooks.count.HP_pc_update_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_update_job_and_level_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} void HP_pc_autotrade_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_load_pre ) { + if (HPMHooks.count.HP_pc_autotrade_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_load_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58741,9 +59685,9 @@ void HP_pc_autotrade_load(void) { { HPMHooks.source.pc.autotrade_load(); } - if( HPMHooks.count.HP_pc_autotrade_load_post ) { + if (HPMHooks.count.HP_pc_autotrade_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_load_post[hIndex].func; postHookFunc(); } @@ -58752,14 +59696,14 @@ void HP_pc_autotrade_load(void) { } void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update_action action) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_update_pre ) { + if (HPMHooks.count.HP_pc_autotrade_update_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_pc_autotrade_update_action *action); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_update_pre[hIndex].func; preHookFunc(&sd, &action); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58767,9 +59711,9 @@ void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_upd { HPMHooks.source.pc.autotrade_update(sd, action); } - if( HPMHooks.count.HP_pc_autotrade_update_post ) { + if (HPMHooks.count.HP_pc_autotrade_update_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action action); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_update_post[hIndex].func; postHookFunc(sd, action); } @@ -58778,14 +59722,14 @@ void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_upd } void HP_pc_autotrade_start(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_start_pre ) { + if (HPMHooks.count.HP_pc_autotrade_start_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_start_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58793,9 +59737,9 @@ void HP_pc_autotrade_start(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_start(sd); } - if( HPMHooks.count.HP_pc_autotrade_start_post ) { + if (HPMHooks.count.HP_pc_autotrade_start_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_start_post[hIndex].func; postHookFunc(sd); } @@ -58804,14 +59748,14 @@ void HP_pc_autotrade_start(struct map_session_data *sd) { } void HP_pc_autotrade_prepare(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_prepare_pre ) { + if (HPMHooks.count.HP_pc_autotrade_prepare_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58819,9 +59763,9 @@ void HP_pc_autotrade_prepare(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_prepare(sd); } - if( HPMHooks.count.HP_pc_autotrade_prepare_post ) { + if (HPMHooks.count.HP_pc_autotrade_prepare_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_post[hIndex].func; postHookFunc(sd); } @@ -58830,14 +59774,14 @@ void HP_pc_autotrade_prepare(struct map_session_data *sd) { } void HP_pc_autotrade_populate(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_populate_pre ) { + if (HPMHooks.count.HP_pc_autotrade_populate_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_populate_pre[hIndex].func; preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58845,9 +59789,9 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_populate(sd); } - if( HPMHooks.count.HP_pc_autotrade_populate_post ) { + if (HPMHooks.count.HP_pc_autotrade_populate_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_populate_post[hIndex].func; postHookFunc(sd); } @@ -58857,16 +59801,16 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_autotrade_final_pre ) { + if (HPMHooks.count.HP_pc_autotrade_final_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_pc_autotrade_final_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58876,9 +59820,9 @@ int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.pc.autotrade_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_autotrade_final_post ) { + if (HPMHooks.count.HP_pc_autotrade_final_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_pc_autotrade_final_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -58890,14 +59834,14 @@ int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { int HP_pc_check_job_name(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_job_name_pre ) { + if (HPMHooks.count.HP_pc_check_job_name_pre > 0) { int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_check_job_name_pre[hIndex].func; retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58905,9 +59849,9 @@ int HP_pc_check_job_name(const char *name) { { retVal___ = HPMHooks.source.pc.check_job_name(name); } - if( HPMHooks.count.HP_pc_check_job_name_post ) { + if (HPMHooks.count.HP_pc_check_job_name_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_check_job_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -58916,14 +59860,14 @@ int HP_pc_check_job_name(const char *name) { } void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_idletime type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_update_idle_time_pre ) { + if (HPMHooks.count.HP_pc_update_idle_time_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_battle_config_idletime *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_update_idle_time_pre[hIndex].func; preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58931,9 +59875,9 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id { HPMHooks.source.pc.update_idle_time(sd, type); } - if( HPMHooks.count.HP_pc_update_idle_time_post ) { + if (HPMHooks.count.HP_pc_update_idle_time_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_update_idle_time_post[hIndex].func; postHookFunc(sd, type); } @@ -58943,14 +59887,14 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id int HP_pc_have_magnifier(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_have_magnifier_pre ) { + if (HPMHooks.count.HP_pc_have_magnifier_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_have_magnifier_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58958,9 +59902,9 @@ int HP_pc_have_magnifier(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.have_magnifier(sd); } - if( HPMHooks.count.HP_pc_have_magnifier_post ) { + if (HPMHooks.count.HP_pc_have_magnifier_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_have_magnifier_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -58970,14 +59914,14 @@ int HP_pc_have_magnifier(struct map_session_data *sd) { bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_process_chat_message_pre ) { + if (HPMHooks.count.HP_pc_process_chat_message_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_process_chat_message_pre[hIndex].func; retVal___ = preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58985,9 +59929,9 @@ bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message { retVal___ = HPMHooks.source.pc.process_chat_message(sd, message); } - if( HPMHooks.count.HP_pc_process_chat_message_post ) { + if (HPMHooks.count.HP_pc_process_chat_message_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_process_chat_message_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, message); } @@ -58996,14 +59940,14 @@ bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message } void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *message) { int hIndex = 0; - if( HPMHooks.count.HP_pc_check_supernovice_call_pre ) { + if (HPMHooks.count.HP_pc_check_supernovice_call_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_check_supernovice_call_pre[hIndex].func; preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59011,27 +59955,54 @@ void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *messa { HPMHooks.source.pc.check_supernovice_call(sd, message); } - if( HPMHooks.count.HP_pc_check_supernovice_call_post ) { + if (HPMHooks.count.HP_pc_check_supernovice_call_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_check_supernovice_call_post[hIndex].func; postHookFunc(sd, message); } } return; } +bool HP_pc_check_basicskill(struct map_session_data *sd, int level) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_check_basicskill_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_basicskill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_check_basicskill_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.check_basicskill(sd, level); + } + if (HPMHooks.count.HP_pc_check_basicskill_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_basicskill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_check_basicskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, level); + } + } + return retVal___; +} /* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; pcre* retVal___ = NULL; - if( HPMHooks.count.HP_libpcre_compile_pre ) { + if (HPMHooks.count.HP_libpcre_compile_pre > 0) { pcre* (*preHookFunc) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_compile_pre[hIndex].func; retVal___ = preHookFunc(&pattern, &options, &errptr, &erroffset, &tableptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59039,9 +60010,9 @@ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, { retVal___ = HPMHooks.source.libpcre.compile(pattern, options, errptr, erroffset, tableptr); } - if( HPMHooks.count.HP_libpcre_compile_post ) { + if (HPMHooks.count.HP_libpcre_compile_post > 0) { pcre* (*postHookFunc) (pcre* retVal___, const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_compile_post[hIndex].func; retVal___ = postHookFunc(retVal___, pattern, options, errptr, erroffset, tableptr); } @@ -59051,14 +60022,14 @@ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) { int hIndex = 0; pcre_extra* retVal___ = NULL; - if( HPMHooks.count.HP_libpcre_study_pre ) { + if (HPMHooks.count.HP_libpcre_study_pre > 0) { pcre_extra* (*preHookFunc) (const pcre **code, int *options, const char ***errptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_study_pre[hIndex].func; retVal___ = preHookFunc(&code, &options, &errptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59066,9 +60037,9 @@ pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) { retVal___ = HPMHooks.source.libpcre.study(code, options, errptr); } - if( HPMHooks.count.HP_libpcre_study_post ) { + if (HPMHooks.count.HP_libpcre_study_post > 0) { pcre_extra* (*postHookFunc) (pcre_extra* retVal___, const pcre *code, int options, const char **errptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_study_post[hIndex].func; retVal___ = postHookFunc(retVal___, code, options, errptr); } @@ -59078,14 +60049,14 @@ pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, PCRE_SPTR subject, int length, int startoffset, int options, int *ovector, int ovecsize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_exec_pre ) { + if (HPMHooks.count.HP_libpcre_exec_pre > 0) { int (*preHookFunc) (const pcre **code, const pcre_extra **extra, PCRE_SPTR *subject, int *length, int *startoffset, int *options, int **ovector, int *ovecsize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_exec_pre[hIndex].func; retVal___ = preHookFunc(&code, &extra, &subject, &length, &startoffset, &options, &ovector, &ovecsize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59093,9 +60064,9 @@ int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, PCRE_SPTR subject { retVal___ = HPMHooks.source.libpcre.exec(code, extra, subject, length, startoffset, options, ovector, ovecsize); } - if( HPMHooks.count.HP_libpcre_exec_post ) { + if (HPMHooks.count.HP_libpcre_exec_post > 0) { int (*postHookFunc) (int retVal___, const pcre *code, const pcre_extra *extra, PCRE_SPTR subject, int length, int startoffset, int options, int *ovector, int ovecsize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_exec_post[hIndex].func; retVal___ = postHookFunc(retVal___, code, extra, subject, length, startoffset, options, ovector, ovecsize); } @@ -59104,14 +60075,14 @@ int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, PCRE_SPTR subject } void HP_libpcre_free(void *ptr) { int hIndex = 0; - if( HPMHooks.count.HP_libpcre_free_pre ) { + if (HPMHooks.count.HP_libpcre_free_pre > 0) { void (*preHookFunc) (void **ptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_free_pre[hIndex].func; preHookFunc(&ptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59119,9 +60090,9 @@ void HP_libpcre_free(void *ptr) { { HPMHooks.source.libpcre.free(ptr); } - if( HPMHooks.count.HP_libpcre_free_post ) { + if (HPMHooks.count.HP_libpcre_free_post > 0) { void (*postHookFunc) (void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_free_post[hIndex].func; postHookFunc(ptr); } @@ -59131,14 +60102,14 @@ void HP_libpcre_free(void *ptr) { int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_copy_substring_pre ) { + if (HPMHooks.count.HP_libpcre_copy_substring_pre > 0) { int (*preHookFunc) (const char **subject, int **ovector, int *stringcount, int *stringnumber, char **buffer, int *buffersize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_copy_substring_pre[hIndex].func; retVal___ = preHookFunc(&subject, &ovector, &stringcount, &stringnumber, &buffer, &buffersize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59146,9 +60117,9 @@ int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount { retVal___ = HPMHooks.source.libpcre.copy_substring(subject, ovector, stringcount, stringnumber, buffer, buffersize); } - if( HPMHooks.count.HP_libpcre_copy_substring_post ) { + if (HPMHooks.count.HP_libpcre_copy_substring_post > 0) { int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_copy_substring_post[hIndex].func; retVal___ = postHookFunc(retVal___, subject, ovector, stringcount, stringnumber, buffer, buffersize); } @@ -59157,14 +60128,14 @@ int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount } void HP_libpcre_free_substring(const char *stringptr) { int hIndex = 0; - if( HPMHooks.count.HP_libpcre_free_substring_pre ) { + if (HPMHooks.count.HP_libpcre_free_substring_pre > 0) { void (*preHookFunc) (const char **stringptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_free_substring_pre[hIndex].func; preHookFunc(&stringptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59172,9 +60143,9 @@ void HP_libpcre_free_substring(const char *stringptr) { { HPMHooks.source.libpcre.free_substring(stringptr); } - if( HPMHooks.count.HP_libpcre_free_substring_post ) { + if (HPMHooks.count.HP_libpcre_free_substring_post > 0) { void (*postHookFunc) (const char *stringptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_free_substring_post[hIndex].func; postHookFunc(stringptr); } @@ -59184,14 +60155,14 @@ void HP_libpcre_free_substring(const char *stringptr) { int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_copy_named_substring_pre ) { + if (HPMHooks.count.HP_libpcre_copy_named_substring_pre > 0) { int (*preHookFunc) (const pcre **code, const char **subject, int **ovector, int *stringcount, const char **stringname, char **buffer, int *buffersize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_pre[hIndex].func; retVal___ = preHookFunc(&code, &subject, &ovector, &stringcount, &stringname, &buffer, &buffersize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59199,9 +60170,9 @@ int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int * { retVal___ = HPMHooks.source.libpcre.copy_named_substring(code, subject, ovector, stringcount, stringname, buffer, buffersize); } - if( HPMHooks.count.HP_libpcre_copy_named_substring_post ) { + if (HPMHooks.count.HP_libpcre_copy_named_substring_post > 0) { int (*postHookFunc) (int retVal___, const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_post[hIndex].func; retVal___ = postHookFunc(retVal___, code, subject, ovector, stringcount, stringname, buffer, buffersize); } @@ -59211,14 +60182,14 @@ int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int * int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_get_substring_pre ) { + if (HPMHooks.count.HP_libpcre_get_substring_pre > 0) { int (*preHookFunc) (const char **subject, int **ovector, int *stringcount, int *stringnumber, const char ***stringptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_get_substring_pre[hIndex].func; retVal___ = preHookFunc(&subject, &ovector, &stringcount, &stringnumber, &stringptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59226,9 +60197,9 @@ int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, { retVal___ = HPMHooks.source.libpcre.get_substring(subject, ovector, stringcount, stringnumber, stringptr); } - if( HPMHooks.count.HP_libpcre_get_substring_post ) { + if (HPMHooks.count.HP_libpcre_get_substring_post > 0) { int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_get_substring_post[hIndex].func; retVal___ = postHookFunc(retVal___, subject, ovector, stringcount, stringnumber, stringptr); } @@ -59239,14 +60210,14 @@ int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, int HP_pet_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_init_pre ) { + if (HPMHooks.count.HP_pet_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59254,9 +60225,9 @@ int HP_pet_init(bool minimal) { { retVal___ = HPMHooks.source.pet.init(minimal); } - if( HPMHooks.count.HP_pet_init_post ) { + if (HPMHooks.count.HP_pet_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -59266,14 +60237,14 @@ int HP_pet_init(bool minimal) { int HP_pet_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_final_pre ) { + if (HPMHooks.count.HP_pet_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59281,9 +60252,9 @@ int HP_pet_final(void) { { retVal___ = HPMHooks.source.pet.final(); } - if( HPMHooks.count.HP_pet_final_post ) { + if (HPMHooks.count.HP_pet_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -59293,14 +60264,14 @@ int HP_pet_final(void) { int HP_pet_hungry_val(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_val_pre ) { + if (HPMHooks.count.HP_pet_hungry_val_pre > 0) { int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59308,9 +60279,9 @@ int HP_pet_hungry_val(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.hungry_val(pd); } - if( HPMHooks.count.HP_pet_hungry_val_post ) { + if (HPMHooks.count.HP_pet_hungry_val_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) { + 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); } @@ -59319,14 +60290,14 @@ int HP_pet_hungry_val(struct pet_data *pd) { } void HP_pet_set_intimate(struct pet_data *pd, int value) { int hIndex = 0; - if( HPMHooks.count.HP_pet_set_intimate_pre ) { + if (HPMHooks.count.HP_pet_set_intimate_pre > 0) { void (*preHookFunc) (struct pet_data **pd, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59334,9 +60305,9 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) { { HPMHooks.source.pet.set_intimate(pd, value); } - if( HPMHooks.count.HP_pet_set_intimate_post ) { + if (HPMHooks.count.HP_pet_set_intimate_post > 0) { void (*postHookFunc) (struct pet_data *pd, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_post; hIndex++ ) { + 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); } @@ -59346,14 +60317,14 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) { int HP_pet_create_egg(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_create_egg_pre ) { + if (HPMHooks.count.HP_pet_create_egg_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59361,9 +60332,9 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) { { retVal___ = HPMHooks.source.pet.create_egg(sd, item_id); } - if( HPMHooks.count.HP_pet_create_egg_post ) { + if (HPMHooks.count.HP_pet_create_egg_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int item_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_post; hIndex++ ) { + 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); } @@ -59373,14 +60344,14 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) { int HP_pet_unlocktarget(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_unlocktarget_pre ) { + if (HPMHooks.count.HP_pet_unlocktarget_pre > 0) { int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59388,9 +60359,9 @@ int HP_pet_unlocktarget(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.unlocktarget(pd); } - if( HPMHooks.count.HP_pet_unlocktarget_post ) { + if (HPMHooks.count.HP_pet_unlocktarget_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func; retVal___ = postHookFunc(retVal___, pd); } @@ -59400,14 +60371,14 @@ int HP_pet_unlocktarget(struct pet_data *pd) { int HP_pet_attackskill(struct pet_data *pd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_attackskill_pre ) { + if (HPMHooks.count.HP_pet_attackskill_pre > 0) { int (*preHookFunc) (struct pet_data **pd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59415,9 +60386,9 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) { { retVal___ = HPMHooks.source.pet.attackskill(pd, target_id); } - if( HPMHooks.count.HP_pet_attackskill_post ) { + if (HPMHooks.count.HP_pet_attackskill_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_post; hIndex++ ) { + 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); } @@ -59427,14 +60398,14 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) { int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_target_check_pre ) { + if (HPMHooks.count.HP_pet_target_check_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59442,9 +60413,9 @@ int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int { retVal___ = HPMHooks.source.pet.target_check(sd, bl, type); } - if( HPMHooks.count.HP_pet_target_check_post ) { + if (HPMHooks.count.HP_pet_target_check_post > 0) { 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++ ) { + 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); } @@ -59454,14 +60425,14 @@ int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int int HP_pet_sc_check(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_sc_check_pre ) { + if (HPMHooks.count.HP_pet_sc_check_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59469,9 +60440,9 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pet.sc_check(sd, type); } - if( HPMHooks.count.HP_pet_sc_check_post ) { + if (HPMHooks.count.HP_pet_sc_check_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_post; hIndex++ ) { + 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); } @@ -59481,14 +60452,14 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) { int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_pre ) { + if (HPMHooks.count.HP_pet_hungry_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59496,9 +60467,9 @@ int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_hungry_post ) { + if (HPMHooks.count.HP_pet_hungry_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) { + 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); } @@ -59508,14 +60479,14 @@ int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { int HP_pet_search_petDB_index(int key, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_search_petDB_index_pre ) { + if (HPMHooks.count.HP_pet_search_petDB_index_pre > 0) { int (*preHookFunc) (int *key, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59523,9 +60494,9 @@ int HP_pet_search_petDB_index(int key, int type) { { retVal___ = HPMHooks.source.pet.search_petDB_index(key, type); } - if( HPMHooks.count.HP_pet_search_petDB_index_post ) { + if (HPMHooks.count.HP_pet_search_petDB_index_post > 0) { int (*postHookFunc) (int retVal___, int key, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_post; hIndex++ ) { + 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); } @@ -59535,14 +60506,14 @@ int HP_pet_search_petDB_index(int key, int type) { int HP_pet_hungry_timer_delete(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) { + if (HPMHooks.count.HP_pet_hungry_timer_delete_pre > 0) { int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59550,9 +60521,9 @@ int HP_pet_hungry_timer_delete(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd); } - if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) { + if (HPMHooks.count.HP_pet_hungry_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) { + 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); } @@ -59562,14 +60533,14 @@ int HP_pet_hungry_timer_delete(struct pet_data *pd) { int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_performance_pre ) { + if (HPMHooks.count.HP_pet_performance_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59577,9 +60548,9 @@ int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.performance(sd, pd); } - if( HPMHooks.count.HP_pet_performance_post ) { + if (HPMHooks.count.HP_pet_performance_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) { + 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); } @@ -59589,14 +60560,14 @@ int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_return_egg_pre ) { + if (HPMHooks.count.HP_pet_return_egg_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59604,9 +60575,9 @@ int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.return_egg(sd, pd); } - if( HPMHooks.count.HP_pet_return_egg_post ) { + if (HPMHooks.count.HP_pet_return_egg_post > 0) { 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++ ) { + 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); } @@ -59616,14 +60587,14 @@ int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_data_init_pre ) { + if (HPMHooks.count.HP_pet_data_init_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct s_pet **petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59631,9 +60602,9 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { { retVal___ = HPMHooks.source.pet.data_init(sd, petinfo); } - if( HPMHooks.count.HP_pet_data_init_post ) { + if (HPMHooks.count.HP_pet_data_init_post > 0) { 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++ ) { + 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); } @@ -59643,14 +60614,14 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_birth_process_pre ) { + if (HPMHooks.count.HP_pet_birth_process_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct s_pet **petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59658,9 +60629,9 @@ int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { { retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo); } - if( HPMHooks.count.HP_pet_birth_process_post ) { + if (HPMHooks.count.HP_pet_birth_process_post > 0) { 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++ ) { + 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); } @@ -59670,14 +60641,14 @@ int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recv_petdata_pre ) { + if (HPMHooks.count.HP_pet_recv_petdata_pre > 0) { int (*preHookFunc) (int *account_id, struct s_pet **p, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59685,9 +60656,9 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { { retVal___ = HPMHooks.source.pet.recv_petdata(account_id, p, flag); } - if( HPMHooks.count.HP_pet_recv_petdata_post ) { + if (HPMHooks.count.HP_pet_recv_petdata_post > 0) { 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++ ) { + 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); } @@ -59697,14 +60668,14 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_select_egg_pre ) { + if (HPMHooks.count.HP_pet_select_egg_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, short *egg_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59712,9 +60683,9 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { { retVal___ = HPMHooks.source.pet.select_egg(sd, egg_index); } - if( HPMHooks.count.HP_pet_select_egg_post ) { + if (HPMHooks.count.HP_pet_select_egg_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, short egg_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_post; hIndex++ ) { + 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); } @@ -59724,14 +60695,14 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process1_pre ) { + if (HPMHooks.count.HP_pet_catch_process1_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *target_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59739,9 +60710,9 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { { retVal___ = HPMHooks.source.pet.catch_process1(sd, target_class); } - if( HPMHooks.count.HP_pet_catch_process1_post ) { + if (HPMHooks.count.HP_pet_catch_process1_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int target_class); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_post; hIndex++ ) { + 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); } @@ -59751,14 +60722,14 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process2_pre ) { + if (HPMHooks.count.HP_pet_catch_process2_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59766,9 +60737,9 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { { retVal___ = HPMHooks.source.pet.catch_process2(sd, target_id); } - if( HPMHooks.count.HP_pet_catch_process2_post ) { + if (HPMHooks.count.HP_pet_catch_process2_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_post; hIndex++ ) { + 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); } @@ -59778,14 +60749,14 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pet_get_egg_pre ) { + if (HPMHooks.count.HP_pet_get_egg_pre > 0) { bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) { + 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_class, &pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59793,9 +60764,9 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { { retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); } - if( HPMHooks.count.HP_pet_get_egg_post ) { + if (HPMHooks.count.HP_pet_get_egg_post > 0) { bool (*postHookFunc) (bool retVal___, int account_id, short pet_class, int pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) { + 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_class, pet_id); } @@ -59805,14 +60776,14 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_unequipitem_pre ) { + if (HPMHooks.count.HP_pet_unequipitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59820,9 +60791,9 @@ int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.unequipitem(sd, pd); } - if( HPMHooks.count.HP_pet_unequipitem_post ) { + if (HPMHooks.count.HP_pet_unequipitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) { + 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); } @@ -59832,14 +60803,14 @@ int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_food_pre ) { + if (HPMHooks.count.HP_pet_food_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59847,9 +60818,9 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.food(sd, pd); } - if( HPMHooks.count.HP_pet_food_post ) { + if (HPMHooks.count.HP_pet_food_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) { + 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); } @@ -59859,16 +60830,16 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59878,9 +60849,9 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post > 0) { 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++ ) { + 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); @@ -59892,14 +60863,14 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int HP_pet_menu(struct map_session_data *sd, int menunum) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_menu_pre ) { + if (HPMHooks.count.HP_pet_menu_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *menunum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59907,9 +60878,9 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) { { retVal___ = HPMHooks.source.pet.menu(sd, menunum); } - if( HPMHooks.count.HP_pet_menu_post ) { + if (HPMHooks.count.HP_pet_menu_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int menunum); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_post; hIndex++ ) { + 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); } @@ -59919,14 +60890,14 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) { int HP_pet_change_name(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_pre ) { + if (HPMHooks.count.HP_pet_change_name_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59934,9 +60905,9 @@ int HP_pet_change_name(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.pet.change_name(sd, name); } - if( HPMHooks.count.HP_pet_change_name_post ) { + if (HPMHooks.count.HP_pet_change_name_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) { + 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); } @@ -59946,14 +60917,14 @@ int HP_pet_change_name(struct map_session_data *sd, const char *name) { int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_ack_pre ) { + if (HPMHooks.count.HP_pet_change_name_ack_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59961,9 +60932,9 @@ int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int fl { retVal___ = HPMHooks.source.pet.change_name_ack(sd, name, flag); } - if( HPMHooks.count.HP_pet_change_name_ack_post ) { + if (HPMHooks.count.HP_pet_change_name_ack_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) { + 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); } @@ -59973,14 +60944,14 @@ int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int fl int HP_pet_equipitem(struct map_session_data *sd, int index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_equipitem_pre ) { + if (HPMHooks.count.HP_pet_equipitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59988,9 +60959,9 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) { { retVal___ = HPMHooks.source.pet.equipitem(sd, index); } - if( HPMHooks.count.HP_pet_equipitem_post ) { + if (HPMHooks.count.HP_pet_equipitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_post; hIndex++ ) { + 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); } @@ -60000,14 +60971,14 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) { int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_randomwalk_pre ) { + if (HPMHooks.count.HP_pet_randomwalk_pre > 0) { int (*preHookFunc) (struct pet_data **pd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60015,9 +60986,9 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { { retVal___ = HPMHooks.source.pet.randomwalk(pd, tick); } - if( HPMHooks.count.HP_pet_randomwalk_post ) { + if (HPMHooks.count.HP_pet_randomwalk_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) { + 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); } @@ -60027,14 +60998,14 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_pre > 0) { int (*preHookFunc) (struct pet_data **pd, struct map_session_data **sd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60042,9 +61013,9 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t { retVal___ = HPMHooks.source.pet.ai_sub_hard(pd, sd, tick); } - if( HPMHooks.count.HP_pet_ai_sub_hard_post ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) { + 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); } @@ -60054,16 +61025,16 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) { + if (HPMHooks.count.HP_pet_ai_sub_foreachclient_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60073,9 +61044,9 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_pet_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -60087,14 +61058,14 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_hard_pre ) { + if (HPMHooks.count.HP_pet_ai_hard_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60102,9 +61073,9 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_ai_hard_post ) { + if (HPMHooks.count.HP_pet_ai_hard_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) { + 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); } @@ -60114,14 +61085,14 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_delay_item_drop_pre ) { + if (HPMHooks.count.HP_pet_delay_item_drop_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60129,9 +61100,9 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.delay_item_drop(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_delay_item_drop_post ) { + if (HPMHooks.count.HP_pet_delay_item_drop_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) { + 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); } @@ -60141,14 +61112,14 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_lootitem_drop_pre ) { + if (HPMHooks.count.HP_pet_lootitem_drop_pre > 0) { int (*preHookFunc) (struct pet_data **pd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60156,9 +61127,9 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { { retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd); } - if( HPMHooks.count.HP_pet_lootitem_drop_post ) { + if (HPMHooks.count.HP_pet_lootitem_drop_post > 0) { 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++ ) { + 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); } @@ -60168,14 +61139,14 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) { + if (HPMHooks.count.HP_pet_skill_bonus_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60183,9 +61154,9 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.skill_bonus_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_skill_bonus_timer_post ) { + if (HPMHooks.count.HP_pet_skill_bonus_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) { + 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); } @@ -60195,14 +61166,14 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recovery_timer_pre ) { + if (HPMHooks.count.HP_pet_recovery_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60210,9 +61181,9 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_recovery_timer_post ) { + if (HPMHooks.count.HP_pet_recovery_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) { + 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); } @@ -60222,14 +61193,14 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_support_timer_pre ) { + if (HPMHooks.count.HP_pet_skill_support_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60237,9 +61208,9 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.skill_support_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_skill_support_timer_post ) { + if (HPMHooks.count.HP_pet_skill_support_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) { + 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); } @@ -60249,14 +61220,14 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pet_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_read_db_pre ) { + if (HPMHooks.count.HP_pet_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60264,9 +61235,9 @@ int HP_pet_read_db(void) { { retVal___ = HPMHooks.source.pet.read_db(); } - if( HPMHooks.count.HP_pet_read_db_post ) { + if (HPMHooks.count.HP_pet_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_post; hIndex++ ) { + 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___); } @@ -60276,14 +61247,14 @@ int HP_pet_read_db(void) { /* quest_interface */ void HP_quest_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_quest_init_pre ) { + if (HPMHooks.count.HP_quest_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60291,9 +61262,9 @@ void HP_quest_init(bool minimal) { { HPMHooks.source.quest.init(minimal); } - if( HPMHooks.count.HP_quest_init_post ) { + if (HPMHooks.count.HP_quest_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func; postHookFunc(minimal); } @@ -60302,14 +61273,14 @@ void HP_quest_init(bool minimal) { } void HP_quest_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_final_pre ) { + if (HPMHooks.count.HP_quest_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60317,9 +61288,9 @@ void HP_quest_final(void) { { HPMHooks.source.quest.final(); } - if( HPMHooks.count.HP_quest_final_post ) { + if (HPMHooks.count.HP_quest_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func; postHookFunc(); } @@ -60328,14 +61299,14 @@ void HP_quest_final(void) { } void HP_quest_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_reload_pre ) { + if (HPMHooks.count.HP_quest_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60343,9 +61314,9 @@ void HP_quest_reload(void) { { HPMHooks.source.quest.reload(); } - if( HPMHooks.count.HP_quest_reload_post ) { + if (HPMHooks.count.HP_quest_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func; postHookFunc(); } @@ -60355,14 +61326,14 @@ void HP_quest_reload(void) { struct quest_db* HP_quest_db(int quest_id) { int hIndex = 0; struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_db_pre ) { + if (HPMHooks.count.HP_quest_db_pre > 0) { struct quest_db* (*preHookFunc) (int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func; retVal___ = preHookFunc(&quest_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60370,9 +61341,9 @@ struct quest_db* HP_quest_db(int quest_id) { { retVal___ = HPMHooks.source.quest.db(quest_id); } - if( HPMHooks.count.HP_quest_db_post ) { + if (HPMHooks.count.HP_quest_db_post > 0) { struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func; retVal___ = postHookFunc(retVal___, quest_id); } @@ -60382,14 +61353,14 @@ struct quest_db* HP_quest_db(int quest_id) { int HP_quest_pc_login(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_pc_login_pre ) { + if (HPMHooks.count.HP_quest_pc_login_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60397,38 +61368,38 @@ int HP_quest_pc_login(struct map_session_data *sd) { { retVal___ = HPMHooks.source.quest.pc_login(sd); } - if( HPMHooks.count.HP_quest_pc_login_post ) { + if (HPMHooks.count.HP_quest_pc_login_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) { + 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(struct map_session_data *sd, int quest_id) { +int HP_quest_add(struct map_session_data *sd, int quest_id, unsigned int time_limit) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_add_pre ) { - int (*preHookFunc) (struct map_session_data **sd, int *quest_id); + if (HPMHooks.count.HP_quest_add_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &quest_id, &time_limit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.quest.add(sd, quest_id); + retVal___ = HPMHooks.source.quest.add(sd, quest_id, time_limit); } - if( HPMHooks.count.HP_quest_add_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_add_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); + 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); + retVal___ = postHookFunc(retVal___, sd, quest_id, time_limit); } } return retVal___; @@ -60436,14 +61407,14 @@ int HP_quest_add(struct map_session_data *sd, int quest_id) { int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_change_pre ) { + if (HPMHooks.count.HP_quest_change_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *qid1, int *qid2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60451,9 +61422,9 @@ int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { { retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2); } - if( HPMHooks.count.HP_quest_change_post ) { + if (HPMHooks.count.HP_quest_change_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int qid1, int qid2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) { + 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); } @@ -60463,14 +61434,14 @@ int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { int HP_quest_delete(struct map_session_data *sd, int quest_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_delete_pre ) { + if (HPMHooks.count.HP_quest_delete_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60478,9 +61449,9 @@ int HP_quest_delete(struct map_session_data *sd, int quest_id) { { retVal___ = HPMHooks.source.quest.delete(sd, quest_id); } - if( HPMHooks.count.HP_quest_delete_post ) { + if (HPMHooks.count.HP_quest_delete_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) { + 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); } @@ -60490,16 +61461,16 @@ int HP_quest_delete(struct map_session_data *sd, int quest_id) { int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_objective_sub_pre ) { + if (HPMHooks.count.HP_quest_update_objective_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60509,9 +61480,9 @@ int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_quest_update_objective_sub_post ) { + if (HPMHooks.count.HP_quest_update_objective_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) { + 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); @@ -60522,14 +61493,14 @@ int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { } void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { int hIndex = 0; - if( HPMHooks.count.HP_quest_update_objective_pre ) { + if (HPMHooks.count.HP_quest_update_objective_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *mob_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60537,9 +61508,9 @@ void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { { HPMHooks.source.quest.update_objective(sd, mob_id); } - if( HPMHooks.count.HP_quest_update_objective_post ) { + if (HPMHooks.count.HP_quest_update_objective_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int mob_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) { + 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); } @@ -60549,14 +61520,14 @@ void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest_state qs) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_status_pre ) { + if (HPMHooks.count.HP_quest_update_status_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *quest_id, enum quest_state *qs); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60564,9 +61535,9 @@ int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest { retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); } - if( HPMHooks.count.HP_quest_update_status_post ) { + if (HPMHooks.count.HP_quest_update_status_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, enum quest_state qs); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { + 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); } @@ -60576,14 +61547,14 @@ int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest int HP_quest_check(struct map_session_data *sd, int quest_id, enum quest_check_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_check_pre ) { + if (HPMHooks.count.HP_quest_check_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *quest_id, enum quest_check_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60591,9 +61562,9 @@ int HP_quest_check(struct map_session_data *sd, int quest_id, enum quest_check_t { retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); } - if( HPMHooks.count.HP_quest_check_post ) { + if (HPMHooks.count.HP_quest_check_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, enum quest_check_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { + 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); } @@ -60602,14 +61573,14 @@ int HP_quest_check(struct map_session_data *sd, int quest_id, enum quest_check_t } void HP_quest_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_clear_pre ) { + if (HPMHooks.count.HP_quest_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60617,9 +61588,9 @@ void HP_quest_clear(void) { { HPMHooks.source.quest.clear(); } - if( HPMHooks.count.HP_quest_clear_post ) { + if (HPMHooks.count.HP_quest_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func; postHookFunc(); } @@ -60629,14 +61600,14 @@ void HP_quest_clear(void) { int HP_quest_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_read_db_pre ) { + if (HPMHooks.count.HP_quest_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60644,9 +61615,9 @@ int HP_quest_read_db(void) { { retVal___ = HPMHooks.source.quest.read_db(); } - if( HPMHooks.count.HP_quest_read_db_post ) { + if (HPMHooks.count.HP_quest_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) { + 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___); } @@ -60656,14 +61627,14 @@ int HP_quest_read_db(void) { struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const char *source) { int hIndex = 0; struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_read_db_sub_pre ) { + if (HPMHooks.count.HP_quest_read_db_sub_pre > 0) { struct quest_db* (*preHookFunc) (struct config_setting_t **cs, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_read_db_sub_pre[hIndex].func; retVal___ = preHookFunc(&cs, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60671,9 +61642,9 @@ struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const { retVal___ = HPMHooks.source.quest.read_db_sub(cs, n, source); } - if( HPMHooks.count.HP_quest_read_db_sub_post ) { + if (HPMHooks.count.HP_quest_read_db_sub_post > 0) { struct quest_db* (*postHookFunc) (struct quest_db* retVal___, struct config_setting_t *cs, int n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_read_db_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, cs, n, source); } @@ -60683,14 +61654,14 @@ struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const /* rnd_interface */ void HP_rnd_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_init_pre ) { + if (HPMHooks.count.HP_rnd_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60698,9 +61669,9 @@ void HP_rnd_init(void) { { HPMHooks.source.rnd.init(); } - if( HPMHooks.count.HP_rnd_init_post ) { + if (HPMHooks.count.HP_rnd_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; postHookFunc(); } @@ -60709,14 +61680,14 @@ void HP_rnd_init(void) { } void HP_rnd_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_final_pre ) { + if (HPMHooks.count.HP_rnd_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60724,9 +61695,9 @@ void HP_rnd_final(void) { { HPMHooks.source.rnd.final(); } - if( HPMHooks.count.HP_rnd_final_post ) { + if (HPMHooks.count.HP_rnd_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; postHookFunc(); } @@ -60735,14 +61706,14 @@ void HP_rnd_final(void) { } void HP_rnd_seed(uint32 seed) { int hIndex = 0; - if( HPMHooks.count.HP_rnd_seed_pre ) { + if (HPMHooks.count.HP_rnd_seed_pre > 0) { void (*preHookFunc) (uint32 *seed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; preHookFunc(&seed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60750,9 +61721,9 @@ void HP_rnd_seed(uint32 seed) { { HPMHooks.source.rnd.seed(seed); } - if( HPMHooks.count.HP_rnd_seed_post ) { + if (HPMHooks.count.HP_rnd_seed_post > 0) { void (*postHookFunc) (uint32 seed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; postHookFunc(seed); } @@ -60762,14 +61733,14 @@ void HP_rnd_seed(uint32 seed) { int32 HP_rnd_random(void) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_random_pre ) { + if (HPMHooks.count.HP_rnd_random_pre > 0) { int32 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60777,9 +61748,9 @@ int32 HP_rnd_random(void) { { retVal___ = HPMHooks.source.rnd.random(); } - if( HPMHooks.count.HP_rnd_random_post ) { + if (HPMHooks.count.HP_rnd_random_post > 0) { int32 (*postHookFunc) (int32 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -60789,14 +61760,14 @@ int32 HP_rnd_random(void) { uint32 HP_rnd_roll(uint32 dice_faces) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_roll_pre ) { + if (HPMHooks.count.HP_rnd_roll_pre > 0) { uint32 (*preHookFunc) (uint32 *dice_faces); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; retVal___ = preHookFunc(&dice_faces); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60804,9 +61775,9 @@ uint32 HP_rnd_roll(uint32 dice_faces) { { retVal___ = HPMHooks.source.rnd.roll(dice_faces); } - if( HPMHooks.count.HP_rnd_roll_post ) { + if (HPMHooks.count.HP_rnd_roll_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; retVal___ = postHookFunc(retVal___, dice_faces); } @@ -60816,14 +61787,14 @@ uint32 HP_rnd_roll(uint32 dice_faces) { int32 HP_rnd_value(int32 min, int32 max) { int hIndex = 0; int32 retVal___ = 0; - if( HPMHooks.count.HP_rnd_value_pre ) { + if (HPMHooks.count.HP_rnd_value_pre > 0) { int32 (*preHookFunc) (int32 *min, int32 *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; retVal___ = preHookFunc(&min, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60831,9 +61802,9 @@ int32 HP_rnd_value(int32 min, int32 max) { { retVal___ = HPMHooks.source.rnd.value(min, max); } - if( HPMHooks.count.HP_rnd_value_post ) { + if (HPMHooks.count.HP_rnd_value_post > 0) { int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; retVal___ = postHookFunc(retVal___, min, max); } @@ -60843,14 +61814,14 @@ int32 HP_rnd_value(int32 min, int32 max) { double HP_rnd_uniform(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform_pre ) { + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60858,9 +61829,9 @@ double HP_rnd_uniform(void) { { retVal___ = HPMHooks.source.rnd.uniform(); } - if( HPMHooks.count.HP_rnd_uniform_post ) { + if (HPMHooks.count.HP_rnd_uniform_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -60870,14 +61841,14 @@ double HP_rnd_uniform(void) { double HP_rnd_uniform53(void) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_rnd_uniform53_pre ) { + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { double (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60885,26 +61856,472 @@ double HP_rnd_uniform53(void) { { retVal___ = HPMHooks.source.rnd.uniform53(); } - if( HPMHooks.count.HP_rnd_uniform53_post ) { + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { double (*postHookFunc) (double retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } +/* rodex_interface */ +void HP_rodex_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.init(minimal); + } + if (HPMHooks.count.HP_rodex_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_init_post[hIndex].func; + postHookFunc(minimal); + } + } + return; +} +void HP_rodex_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.final(); + } + if (HPMHooks.count.HP_rodex_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_rodex_isenabled(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_rodex_isenabled_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_isenabled_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_isenabled_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.isenabled(); + } + if (HPMHooks.count.HP_rodex_isenabled_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_isenabled_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_isenabled_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_open_pre[hIndex].func; + preHookFunc(&sd, &open_type, &first_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.open(sd, open_type, first_mail_id); + } + if (HPMHooks.count.HP_rodex_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_open_post[hIndex].func; + postHookFunc(sd, open_type, first_mail_id); + } + } + return; +} +void HP_rodex_next_page(struct map_session_data *sd, int8 open_type, int64 last_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_next_page_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_next_page_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_next_page_pre[hIndex].func; + preHookFunc(&sd, &open_type, &last_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.next_page(sd, open_type, last_mail_id); + } + if (HPMHooks.count.HP_rodex_next_page_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_next_page_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_next_page_post[hIndex].func; + postHookFunc(sd, open_type, last_mail_id); + } + } + return; +} +void HP_rodex_refresh(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_refresh_pre[hIndex].func; + preHookFunc(&sd, &open_type, &first_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.refresh(sd, open_type, first_mail_id); + } + if (HPMHooks.count.HP_rodex_refresh_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_refresh_post[hIndex].func; + postHookFunc(sd, open_type, first_mail_id); + } + } + return; +} +void HP_rodex_add_item(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_add_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_add_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_add_item_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.add_item(sd, idx, amount); + } + if (HPMHooks.count.HP_rodex_add_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_add_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_add_item_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_remove_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_remove_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_remove_item_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.remove_item(sd, idx, amount); + } + if (HPMHooks.count.HP_rodex_remove_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_remove_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_remove_item_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_check_player_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func; + preHookFunc(&sd, &name, &base_level, &char_id, &class); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class); + } + if (HPMHooks.count.HP_rodex_check_player_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func; + postHookFunc(sd, name, base_level, char_id, class); + } + } + return; +} +int HP_rodex_send_mail(struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_rodex_send_mail_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_send_mail_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &receiver_name, &body, &title, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.send_mail(sd, receiver_name, body, title, zeny); + } + if (HPMHooks.count.HP_rodex_send_mail_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_send_mail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, receiver_name, body, title, zeny); + } + } + return retVal___; +} +void HP_rodex_send_mail_result(struct map_session_data *ssd, struct map_session_data *rsd, bool result) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_send_mail_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_send_mail_result_pre[hIndex].func; + preHookFunc(&ssd, &rsd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.send_mail_result(ssd, rsd, result); + } + if (HPMHooks.count.HP_rodex_send_mail_result_post > 0) { + void (*postHookFunc) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_send_mail_result_post[hIndex].func; + postHookFunc(ssd, rsd, result); + } + } + return; +} +struct rodex_message* HP_rodex_get_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + struct rodex_message* retVal___ = NULL; + if (HPMHooks.count.HP_rodex_get_mail_pre > 0) { + struct rodex_message* (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_mail_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.get_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_get_mail_post > 0) { + struct rodex_message* (*postHookFunc) (struct rodex_message* retVal___, struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_mail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mail_id); + } + } + return retVal___; +} +void HP_rodex_read_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_read_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_read_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_read_mail_pre[hIndex].func; + preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.read_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_read_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_read_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_read_mail_post[hIndex].func; + postHookFunc(sd, mail_id); + } + } + return; +} +void HP_rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_get_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_zeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_zeny_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.get_zeny(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_rodex_get_zeny_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_zeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_zeny_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_rodex_get_items(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_get_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_items_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.get_items(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_rodex_get_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_items_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_rodex_delete_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_delete_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_delete_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_delete_mail_pre[hIndex].func; + preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.delete_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_delete_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_delete_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_delete_mail_post[hIndex].func; + postHookFunc(sd, mail_id); + } + } + return; +} +void HP_rodex_clean(struct map_session_data *sd, int8 flag) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_clean_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_clean_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_clean_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.clean(sd, flag); + } + if (HPMHooks.count.HP_rodex_clean_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_clean_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_clean_post[hIndex].func; + postHookFunc(sd, flag); + } + } + return; +} /* script_interface */ void HP_script_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_script_init_pre ) { + if (HPMHooks.count.HP_script_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60912,9 +62329,9 @@ void HP_script_init(bool minimal) { { HPMHooks.source.script.init(minimal); } - if( HPMHooks.count.HP_script_init_post ) { + if (HPMHooks.count.HP_script_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func; postHookFunc(minimal); } @@ -60923,14 +62340,14 @@ void HP_script_init(bool minimal) { } void HP_script_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_final_pre ) { + if (HPMHooks.count.HP_script_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60938,9 +62355,9 @@ void HP_script_final(void) { { HPMHooks.source.script.final(); } - if( HPMHooks.count.HP_script_final_post ) { + if (HPMHooks.count.HP_script_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func; postHookFunc(); } @@ -60950,14 +62367,14 @@ void HP_script_final(void) { int HP_script_reload(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reload_pre ) { + if (HPMHooks.count.HP_script_reload_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60965,9 +62382,9 @@ int HP_script_reload(void) { { retVal___ = HPMHooks.source.script.reload(); } - if( HPMHooks.count.HP_script_reload_post ) { + if (HPMHooks.count.HP_script_reload_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -60977,14 +62394,14 @@ int HP_script_reload(void) { struct script_code* HP_script_parse(const char *src, const char *file, int line, int options, int *retval) { int hIndex = 0; struct script_code* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_pre ) { + if (HPMHooks.count.HP_script_parse_pre > 0) { struct script_code* (*preHookFunc) (const char **src, const char **file, int *line, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) { + 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, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60992,9 +62409,9 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, { retVal___ = HPMHooks.source.script.parse(src, file, line, options, retval); } - if( HPMHooks.count.HP_script_parse_post ) { + if (HPMHooks.count.HP_script_parse_post > 0) { struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int line, int options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) { + 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, retval); } @@ -61004,14 +62421,14 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, bool HP_script_add_builtin(const struct script_function *buildin, bool override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_add_builtin_pre ) { + if (HPMHooks.count.HP_script_add_builtin_pre > 0) { bool (*preHookFunc) (const struct script_function **buildin, bool *override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; retVal___ = preHookFunc(&buildin, &override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61019,9 +62436,9 @@ bool HP_script_add_builtin(const struct script_function *buildin, bool override) { retVal___ = HPMHooks.source.script.add_builtin(buildin, override); } - if( HPMHooks.count.HP_script_add_builtin_post ) { + if (HPMHooks.count.HP_script_add_builtin_post > 0) { bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; retVal___ = postHookFunc(retVal___, buildin, override); } @@ -61030,14 +62447,14 @@ bool HP_script_add_builtin(const struct script_function *buildin, bool override) } void HP_script_parse_builtin(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_parse_builtin_pre ) { + if (HPMHooks.count.HP_script_parse_builtin_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61045,9 +62462,9 @@ void HP_script_parse_builtin(void) { { HPMHooks.source.script.parse_builtin(); } - if( HPMHooks.count.HP_script_parse_builtin_post ) { + if (HPMHooks.count.HP_script_parse_builtin_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func; postHookFunc(); } @@ -61057,14 +62474,14 @@ void HP_script_parse_builtin(void) { 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 ) { + if (HPMHooks.count.HP_script_parse_subexpr_pre > 0) { const char* (*preHookFunc) (const char **p, int *limit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61072,9 +62489,9 @@ const char* HP_script_parse_subexpr(const char *p, int limit) { { retVal___ = HPMHooks.source.script.parse_subexpr(p, limit); } - if( HPMHooks.count.HP_script_parse_subexpr_post ) { + if (HPMHooks.count.HP_script_parse_subexpr_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p, int limit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_post; hIndex++ ) { + 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); } @@ -61084,14 +62501,14 @@ const char* HP_script_parse_subexpr(const char *p, int limit) { const char* HP_script_skip_space(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_skip_space_pre ) { + if (HPMHooks.count.HP_script_skip_space_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61099,9 +62516,9 @@ const char* HP_script_skip_space(const char *p) { { retVal___ = HPMHooks.source.script.skip_space(p); } - if( HPMHooks.count.HP_script_skip_space_post ) { + if (HPMHooks.count.HP_script_skip_space_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) { + 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); } @@ -61110,14 +62527,14 @@ const char* HP_script_skip_space(const char *p) { } 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 ) { + if (HPMHooks.count.HP_script_error_pre > 0) { void (*preHookFunc) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61125,9 +62542,9 @@ void HP_script_error(const char *src, const char *file, int start_line, const ch { HPMHooks.source.script.error(src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_script_error_post ) { + if (HPMHooks.count.HP_script_error_post > 0) { 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++ ) { + 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); } @@ -61136,14 +62553,14 @@ void HP_script_error(const char *src, const char *file, int start_line, const ch } 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 ) { + if (HPMHooks.count.HP_script_warning_pre > 0) { void (*preHookFunc) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61151,9 +62568,9 @@ void HP_script_warning(const char *src, const char *file, int start_line, const { HPMHooks.source.script.warning(src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_script_warning_post ) { + if (HPMHooks.count.HP_script_warning_post > 0) { 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++ ) { + 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); } @@ -61163,14 +62580,14 @@ void HP_script_warning(const char *src, const char *file, int start_line, const bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_addScript_pre ) { + if (HPMHooks.count.HP_script_addScript_pre > 0) { bool (*preHookFunc) (char **name, char **args, bool ( **func ) (struct script_state *st), bool *isDeprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) { + 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, &isDeprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61178,9 +62595,9 @@ bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_s { retVal___ = HPMHooks.source.script.addScript(name, args, func, isDeprecated); } - if( HPMHooks.count.HP_script_addScript_post ) { + if (HPMHooks.count.HP_script_addScript_post > 0) { bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) { + 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, isDeprecated); } @@ -61190,14 +62607,14 @@ bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_s int HP_script_conv_num(struct script_state *st, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_conv_num_pre ) { + if (HPMHooks.count.HP_script_conv_num_pre > 0) { int (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61205,9 +62622,9 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) { { retVal___ = HPMHooks.source.script.conv_num(st, data); } - if( HPMHooks.count.HP_script_conv_num_post ) { + if (HPMHooks.count.HP_script_conv_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) { + 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); } @@ -61217,14 +62634,14 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) { 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 ) { + if (HPMHooks.count.HP_script_conv_str_pre > 0) { const char* (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61232,9 +62649,9 @@ const char* HP_script_conv_str(struct script_state *st, struct script_data *data { retVal___ = HPMHooks.source.script.conv_str(st, data); } - if( HPMHooks.count.HP_script_conv_str_post ) { + if (HPMHooks.count.HP_script_conv_str_post > 0) { 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++ ) { + 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); } @@ -61244,14 +62661,14 @@ const char* HP_script_conv_str(struct script_state *st, struct script_data *data struct map_session_data* HP_script_rid2sd(struct script_state *st) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_rid2sd_pre ) { + if (HPMHooks.count.HP_script_rid2sd_pre > 0) { struct map_session_data* (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61259,9 +62676,9 @@ struct map_session_data* HP_script_rid2sd(struct script_state *st) { { retVal___ = HPMHooks.source.script.rid2sd(st); } - if( HPMHooks.count.HP_script_rid2sd_post ) { + if (HPMHooks.count.HP_script_rid2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -61271,14 +62688,14 @@ struct map_session_data* HP_script_rid2sd(struct script_state *st) { struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_id2sd_pre ) { + if (HPMHooks.count.HP_script_id2sd_pre > 0) { struct map_session_data* (*preHookFunc) (struct script_state **st, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_id2sd_pre[hIndex].func; retVal___ = preHookFunc(&st, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61286,9 +62703,9 @@ struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id { retVal___ = HPMHooks.source.script.id2sd(st, account_id); } - if( HPMHooks.count.HP_script_id2sd_post ) { + if (HPMHooks.count.HP_script_id2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_id2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, account_id); } @@ -61298,14 +62715,14 @@ struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_charid2sd_pre ) { + if (HPMHooks.count.HP_script_charid2sd_pre > 0) { struct map_session_data* (*preHookFunc) (struct script_state **st, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_charid2sd_pre[hIndex].func; retVal___ = preHookFunc(&st, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61313,9 +62730,9 @@ struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_i { retVal___ = HPMHooks.source.script.charid2sd(st, char_id); } - if( HPMHooks.count.HP_script_charid2sd_post ) { + if (HPMHooks.count.HP_script_charid2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_charid2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, char_id); } @@ -61325,14 +62742,14 @@ struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_i struct map_session_data* HP_script_nick2sd(struct script_state *st, const char *name) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_nick2sd_pre ) { + if (HPMHooks.count.HP_script_nick2sd_pre > 0) { struct map_session_data* (*preHookFunc) (struct script_state **st, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_nick2sd_pre[hIndex].func; retVal___ = preHookFunc(&st, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61340,9 +62757,9 @@ struct map_session_data* HP_script_nick2sd(struct script_state *st, const char * { retVal___ = HPMHooks.source.script.nick2sd(st, name); } - if( HPMHooks.count.HP_script_nick2sd_post ) { + if (HPMHooks.count.HP_script_nick2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_nick2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name); } @@ -61351,14 +62768,14 @@ struct map_session_data* HP_script_nick2sd(struct script_state *st, const char * } void HP_script_detach_rid(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_detach_rid_pre ) { + if (HPMHooks.count.HP_script_detach_rid_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61366,9 +62783,9 @@ void HP_script_detach_rid(struct script_state *st) { { HPMHooks.source.script.detach_rid(st); } - if( HPMHooks.count.HP_script_detach_rid_post ) { + if (HPMHooks.count.HP_script_detach_rid_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func; postHookFunc(st); } @@ -61378,14 +62795,14 @@ void HP_script_detach_rid(struct script_state *st) { struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int64 val, struct reg_db *ref) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_val_pre ) { + if (HPMHooks.count.HP_script_push_val_pre > 0) { struct script_data* (*preHookFunc) (struct script_stack **stack, enum c_op *type, int64 *val, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61393,9 +62810,9 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ { retVal___ = HPMHooks.source.script.push_val(stack, type, val, ref); } - if( HPMHooks.count.HP_script_push_val_post ) { + if (HPMHooks.count.HP_script_push_val_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op type, int64 val, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) { + 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); } @@ -61405,14 +62822,14 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_pre ) { + if (HPMHooks.count.HP_script_get_val_pre > 0) { struct script_data* (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func; retVal___ = preHookFunc(&st, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61420,9 +62837,9 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat { retVal___ = HPMHooks.source.script.get_val(st, data); } - if( HPMHooks.count.HP_script_get_val_post ) { + if (HPMHooks.count.HP_script_get_val_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, data); } @@ -61432,14 +62849,14 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat char* HP_script_get_val_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_ref_str_pre ) { + if (HPMHooks.count.HP_script_get_val_ref_str_pre > 0) { char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_ref_str_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61447,26 +62864,53 @@ char* HP_script_get_val_ref_str(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_ref_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_ref_str_post ) { + if (HPMHooks.count.HP_script_get_val_ref_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_ref_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } } return retVal___; } +char* HP_script_get_val_pc_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + char* retVal___ = NULL; + if (HPMHooks.count.HP_script_get_val_pc_ref_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_str(st, n, data); + } + if (HPMHooks.count.HP_script_get_val_pc_ref_str_post > 0) { + char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_scope_str_pre ) { + if (HPMHooks.count.HP_script_get_val_scope_str_pre > 0) { char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_scope_str_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61474,9 +62918,9 @@ char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, str { retVal___ = HPMHooks.source.script.get_val_scope_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_scope_str_post ) { + if (HPMHooks.count.HP_script_get_val_scope_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_scope_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -61486,14 +62930,14 @@ char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, str char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_npc_str_pre ) { + if (HPMHooks.count.HP_script_get_val_npc_str_pre > 0) { char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_npc_str_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61501,9 +62945,9 @@ char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_npc_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_npc_str_post ) { + if (HPMHooks.count.HP_script_get_val_npc_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_npc_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -61513,14 +62957,14 @@ char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struc char* HP_script_get_val_instance_str(struct script_state *st, const char *name, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_instance_str_pre ) { + if (HPMHooks.count.HP_script_get_val_instance_str_pre > 0) { char* (*preHookFunc) (struct script_state **st, const char **name, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_instance_str_pre[hIndex].func; retVal___ = preHookFunc(&st, &name, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61528,9 +62972,9 @@ char* HP_script_get_val_instance_str(struct script_state *st, const char *name, { retVal___ = HPMHooks.source.script.get_val_instance_str(st, name, data); } - if( HPMHooks.count.HP_script_get_val_instance_str_post ) { + if (HPMHooks.count.HP_script_get_val_instance_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, const char *name, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_instance_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name, data); } @@ -61540,14 +62984,14 @@ char* HP_script_get_val_instance_str(struct script_state *st, const char *name, int HP_script_get_val_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_ref_num_pre ) { + if (HPMHooks.count.HP_script_get_val_ref_num_pre > 0) { int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_ref_num_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61555,26 +62999,53 @@ int HP_script_get_val_ref_num(struct script_state *st, struct reg_db *n, struct { retVal___ = HPMHooks.source.script.get_val_ref_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_ref_num_post ) { + if (HPMHooks.count.HP_script_get_val_ref_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_ref_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } } return retVal___; } +int HP_script_get_val_pc_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_get_val_pc_ref_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_num(st, n, data); + } + if (HPMHooks.count.HP_script_get_val_pc_ref_num_post > 0) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_scope_num_pre ) { + if (HPMHooks.count.HP_script_get_val_scope_num_pre > 0) { int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_scope_num_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61582,9 +63053,9 @@ int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_scope_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_scope_num_post ) { + if (HPMHooks.count.HP_script_get_val_scope_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_scope_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -61594,14 +63065,14 @@ int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struc int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_npc_num_pre ) { + if (HPMHooks.count.HP_script_get_val_npc_num_pre > 0) { int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_npc_num_pre[hIndex].func; retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61609,9 +63080,9 @@ int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct { retVal___ = HPMHooks.source.script.get_val_npc_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_npc_num_post ) { + if (HPMHooks.count.HP_script_get_val_npc_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_npc_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -61621,14 +63092,14 @@ int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct int HP_script_get_val_instance_num(struct script_state *st, const char *name, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_instance_num_pre ) { + if (HPMHooks.count.HP_script_get_val_instance_num_pre > 0) { int (*preHookFunc) (struct script_state **st, const char **name, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_instance_num_pre[hIndex].func; retVal___ = preHookFunc(&st, &name, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61636,9 +63107,9 @@ int HP_script_get_val_instance_num(struct script_state *st, const char *name, st { retVal___ = HPMHooks.source.script.get_val_instance_num(st, name, data); } - if( HPMHooks.count.HP_script_get_val_instance_num_post ) { + if (HPMHooks.count.HP_script_get_val_instance_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, const char *name, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_instance_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name, data); } @@ -61648,14 +63119,14 @@ int HP_script_get_val_instance_num(struct script_state *st, const char *name, st const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db *ref) { int hIndex = 0; const void* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val2_pre ) { + if (HPMHooks.count.HP_script_get_val2_pre > 0) { const void* (*preHookFunc) (struct script_state **st, int64 *uid, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61663,9 +63134,9 @@ const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db { retVal___ = HPMHooks.source.script.get_val2(st, uid, ref); } - if( HPMHooks.count.HP_script_get_val2_post ) { + if (HPMHooks.count.HP_script_get_val2_post > 0) { const void* (*postHookFunc) (const void* retVal___, struct script_state *st, int64 uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) { + 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); } @@ -61675,14 +63146,14 @@ const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db struct script_data* HP_script_push_str(struct script_stack *stack, char *str) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_str_pre ) { + if (HPMHooks.count.HP_script_push_str_pre > 0) { struct script_data* (*preHookFunc) (struct script_stack **stack, char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) { + 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, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61690,9 +63161,9 @@ struct script_data* HP_script_push_str(struct script_stack *stack, char *str) { { retVal___ = HPMHooks.source.script.push_str(stack, str); } - if( HPMHooks.count.HP_script_push_str_post ) { + if (HPMHooks.count.HP_script_push_str_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) { + 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, str); } @@ -61702,14 +63173,14 @@ struct script_data* HP_script_push_str(struct script_stack *stack, char *str) { struct script_data* HP_script_push_conststr(struct script_stack *stack, const char *str) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_conststr_pre ) { + if (HPMHooks.count.HP_script_push_conststr_pre > 0) { struct script_data* (*preHookFunc) (struct script_stack **stack, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_push_conststr_pre[hIndex].func; retVal___ = preHookFunc(&stack, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61717,9 +63188,9 @@ struct script_data* HP_script_push_conststr(struct script_stack *stack, const ch { retVal___ = HPMHooks.source.script.push_conststr(stack, str); } - if( HPMHooks.count.HP_script_push_conststr_post ) { + if (HPMHooks.count.HP_script_push_conststr_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_push_conststr_post[hIndex].func; retVal___ = postHookFunc(retVal___, stack, str); } @@ -61729,14 +63200,14 @@ struct script_data* HP_script_push_conststr(struct script_stack *stack, const ch 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 ) { + if (HPMHooks.count.HP_script_push_copy_pre > 0) { struct script_data* (*preHookFunc) (struct script_stack **stack, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61744,9 +63215,9 @@ struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { { retVal___ = HPMHooks.source.script.push_copy(stack, pos); } - if( HPMHooks.count.HP_script_push_copy_post ) { + if (HPMHooks.count.HP_script_push_copy_post > 0) { 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++ ) { + 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); } @@ -61755,14 +63226,14 @@ struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { } void HP_script_pop_stack(struct script_state *st, int start, int end) { int hIndex = 0; - if( HPMHooks.count.HP_script_pop_stack_pre ) { + if (HPMHooks.count.HP_script_pop_stack_pre > 0) { void (*preHookFunc) (struct script_state **st, int *start, int *end); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61770,9 +63241,9 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { { HPMHooks.source.script.pop_stack(st, start, end); } - if( HPMHooks.count.HP_script_pop_stack_post ) { + if (HPMHooks.count.HP_script_pop_stack_post > 0) { void (*postHookFunc) (struct script_state *st, int start, int end); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_post; hIndex++ ) { + 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); } @@ -61781,14 +63252,14 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { } void HP_script_set_constant(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant_pre ) { + if (HPMHooks.count.HP_script_set_constant_pre > 0) { void (*preHookFunc) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { + 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, &is_parameter, &is_deprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61796,9 +63267,9 @@ void HP_script_set_constant(const char *name, int value, bool is_parameter, bool { HPMHooks.source.script.set_constant(name, value, is_parameter, is_deprecated); } - if( HPMHooks.count.HP_script_set_constant_post ) { + if (HPMHooks.count.HP_script_set_constant_post > 0) { void (*postHookFunc) (const char *name, int value, bool is_parameter, bool is_deprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { + 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, is_parameter, is_deprecated); } @@ -61807,14 +63278,14 @@ void HP_script_set_constant(const char *name, int value, bool is_parameter, bool } void HP_script_set_constant2(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant2_pre ) { + if (HPMHooks.count.HP_script_set_constant2_pre > 0) { void (*preHookFunc) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { + 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, &is_parameter, &is_deprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61822,9 +63293,9 @@ void HP_script_set_constant2(const char *name, int value, bool is_parameter, boo { HPMHooks.source.script.set_constant2(name, value, is_parameter, is_deprecated); } - if( HPMHooks.count.HP_script_set_constant2_post ) { + if (HPMHooks.count.HP_script_set_constant2_post > 0) { void (*postHookFunc) (const char *name, int value, bool is_parameter, bool is_deprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { + 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, is_parameter, is_deprecated); } @@ -61834,14 +63305,14 @@ void HP_script_set_constant2(const char *name, int value, bool is_parameter, boo bool HP_script_get_constant(const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_get_constant_pre ) { + if (HPMHooks.count.HP_script_get_constant_pre > 0) { bool (*preHookFunc) (const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61849,9 +63320,9 @@ bool HP_script_get_constant(const char *name, int *value) { { retVal___ = HPMHooks.source.script.get_constant(name, value); } - if( HPMHooks.count.HP_script_get_constant_post ) { + if (HPMHooks.count.HP_script_get_constant_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) { + 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); } @@ -61860,14 +63331,14 @@ bool HP_script_get_constant(const char *name, int *value) { } void HP_script_label_add(int key, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_script_label_add_pre ) { + if (HPMHooks.count.HP_script_label_add_pre > 0) { void (*preHookFunc) (int *key, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61875,9 +63346,9 @@ void HP_script_label_add(int key, int pos) { { HPMHooks.source.script.label_add(key, pos); } - if( HPMHooks.count.HP_script_label_add_post ) { + if (HPMHooks.count.HP_script_label_add_post > 0) { void (*postHookFunc) (int key, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_post; hIndex++ ) { + 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); } @@ -61886,14 +63357,14 @@ void HP_script_label_add(int key, int pos) { } void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_pre ) { + if (HPMHooks.count.HP_script_run_pre > 0) { void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61901,9 +63372,9 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { { HPMHooks.source.script.run(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_run_post ) { + if (HPMHooks.count.HP_script_run_post > 0) { void (*postHookFunc) (struct script_code *rootscript, int pos, int rid, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_post; hIndex++ ) { + 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); } @@ -61912,14 +63383,14 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { } void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_npc_pre ) { + if (HPMHooks.count.HP_script_run_npc_pre > 0) { void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func; preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61927,9 +63398,9 @@ void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid { HPMHooks.source.script.run_npc(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_run_npc_post ) { + if (HPMHooks.count.HP_script_run_npc_post > 0) { void (*postHookFunc) (struct script_code *rootscript, int pos, int rid, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func; postHookFunc(rootscript, pos, rid, oid); } @@ -61938,14 +63409,14 @@ void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid } void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_pet_pre ) { + if (HPMHooks.count.HP_script_run_pet_pre > 0) { void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func; preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61953,9 +63424,9 @@ void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid { HPMHooks.source.script.run_pet(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_run_pet_post ) { + if (HPMHooks.count.HP_script_run_pet_post > 0) { void (*postHookFunc) (struct script_code *rootscript, int pos, int rid, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func; postHookFunc(rootscript, pos, rid, oid); } @@ -61964,14 +63435,14 @@ void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid } void HP_script_run_main(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_main_pre ) { + if (HPMHooks.count.HP_script_run_main_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61979,9 +63450,9 @@ void HP_script_run_main(struct script_state *st) { { HPMHooks.source.script.run_main(st); } - if( HPMHooks.count.HP_script_run_main_post ) { + if (HPMHooks.count.HP_script_run_main_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func; postHookFunc(st); } @@ -61991,14 +63462,14 @@ void HP_script_run_main(struct script_state *st) { int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_run_timer_pre ) { + if (HPMHooks.count.HP_script_run_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62006,9 +63477,9 @@ int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_script_run_timer_post ) { + if (HPMHooks.count.HP_script_run_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) { + 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); } @@ -62018,14 +63489,14 @@ int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_set_var_pre ) { + if (HPMHooks.count.HP_script_set_var_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, char **name, void **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62033,9 +63504,9 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { { retVal___ = HPMHooks.source.script.set_var(sd, name, val); } - if( HPMHooks.count.HP_script_set_var_post ) { + if (HPMHooks.count.HP_script_set_var_post > 0) { 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++ ) { + 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); } @@ -62044,14 +63515,14 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { } void HP_script_stop_instances(struct script_code *code) { int hIndex = 0; - if( HPMHooks.count.HP_script_stop_instances_pre ) { + if (HPMHooks.count.HP_script_stop_instances_pre > 0) { void (*preHookFunc) (struct script_code **code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62059,9 +63530,9 @@ void HP_script_stop_instances(struct script_code *code) { { HPMHooks.source.script.stop_instances(code); } - if( HPMHooks.count.HP_script_stop_instances_post ) { + if (HPMHooks.count.HP_script_stop_instances_post > 0) { void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func; postHookFunc(code); } @@ -62070,14 +63541,14 @@ void HP_script_stop_instances(struct script_code *code) { } void HP_script_free_code(struct script_code *code) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_code_pre ) { + if (HPMHooks.count.HP_script_free_code_pre > 0) { void (*preHookFunc) (struct script_code **code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62085,9 +63556,9 @@ void HP_script_free_code(struct script_code *code) { { HPMHooks.source.script.free_code(code); } - if( HPMHooks.count.HP_script_free_code_post ) { + if (HPMHooks.count.HP_script_free_code_post > 0) { void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func; postHookFunc(code); } @@ -62096,14 +63567,14 @@ void HP_script_free_code(struct script_code *code) { } void HP_script_free_vars(struct DBMap *var_storage) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_vars_pre ) { + if (HPMHooks.count.HP_script_free_vars_pre > 0) { void (*preHookFunc) (struct DBMap **var_storage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62111,9 +63582,9 @@ void HP_script_free_vars(struct DBMap *var_storage) { { HPMHooks.source.script.free_vars(var_storage); } - if( HPMHooks.count.HP_script_free_vars_post ) { + if (HPMHooks.count.HP_script_free_vars_post > 0) { void (*postHookFunc) (struct DBMap *var_storage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) { + 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); } @@ -62123,14 +63594,14 @@ void HP_script_free_vars(struct DBMap *var_storage) { 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 ) { + if (HPMHooks.count.HP_script_alloc_state_pre > 0) { struct script_state* (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62138,9 +63609,9 @@ struct script_state* HP_script_alloc_state(struct script_code *rootscript, int p { retVal___ = HPMHooks.source.script.alloc_state(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_alloc_state_post ) { + if (HPMHooks.count.HP_script_alloc_state_post > 0) { 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++ ) { + 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); } @@ -62149,14 +63620,14 @@ struct script_state* HP_script_alloc_state(struct script_code *rootscript, int p } void HP_script_free_state(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_free_state_pre ) { + if (HPMHooks.count.HP_script_free_state_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62164,9 +63635,9 @@ void HP_script_free_state(struct script_state *st) { { HPMHooks.source.script.free_state(st); } - if( HPMHooks.count.HP_script_free_state_post ) { + if (HPMHooks.count.HP_script_free_state_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func; postHookFunc(st); } @@ -62175,14 +63646,14 @@ void HP_script_free_state(struct script_state *st) { } void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_pending_ref_pre ) { + if (HPMHooks.count.HP_script_add_pending_ref_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func; preHookFunc(&st, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62190,9 +63661,9 @@ void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { { HPMHooks.source.script.add_pending_ref(st, ref); } - if( HPMHooks.count.HP_script_add_pending_ref_post ) { + if (HPMHooks.count.HP_script_add_pending_ref_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func; postHookFunc(st, ref); } @@ -62201,14 +63672,14 @@ void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { } void HP_script_run_autobonus(const char *autobonus, int id, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_autobonus_pre ) { + if (HPMHooks.count.HP_script_run_autobonus_pre > 0) { void (*preHookFunc) (const char **autobonus, int *id, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62216,9 +63687,9 @@ void HP_script_run_autobonus(const char *autobonus, int id, int pos) { { HPMHooks.source.script.run_autobonus(autobonus, id, pos); } - if( HPMHooks.count.HP_script_run_autobonus_post ) { + if (HPMHooks.count.HP_script_run_autobonus_post > 0) { void (*postHookFunc) (const char *autobonus, int id, int pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_post; hIndex++ ) { + 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); } @@ -62227,14 +63698,14 @@ void HP_script_run_autobonus(const char *autobonus, int id, int pos) { } 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 ) { + if (HPMHooks.count.HP_script_cleararray_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **varname, void **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62242,9 +63713,9 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v { HPMHooks.source.script.cleararray_pc(sd, varname, value); } - if( HPMHooks.count.HP_script_cleararray_pc_post ) { + if (HPMHooks.count.HP_script_cleararray_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) { + 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); } @@ -62253,14 +63724,14 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v } void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache) { int hIndex = 0; - if( HPMHooks.count.HP_script_setarray_pc_pre ) { + if (HPMHooks.count.HP_script_setarray_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **varname, uint32 *idx, void **value, int **refcache); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62268,9 +63739,9 @@ void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uin { HPMHooks.source.script.setarray_pc(sd, varname, idx, value, refcache); } - if( HPMHooks.count.HP_script_setarray_pc_post ) { + if (HPMHooks.count.HP_script_setarray_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) { + 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); } @@ -62280,14 +63751,14 @@ void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uin bool HP_script_config_read(const char *filename, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_config_read_pre ) { + if (HPMHooks.count.HP_script_config_read_pre > 0) { bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_config_read_pre[hIndex].func; retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62295,9 +63766,9 @@ bool HP_script_config_read(const char *filename, bool imported) { { retVal___ = HPMHooks.source.script.config_read(filename, imported); } - if( HPMHooks.count.HP_script_config_read_post ) { + if (HPMHooks.count.HP_script_config_read_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_post; hIndex++ ) { + 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___, filename, imported); } @@ -62307,14 +63778,14 @@ bool HP_script_config_read(const char *filename, bool imported) { int HP_script_add_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_str_pre ) { + if (HPMHooks.count.HP_script_add_str_pre > 0) { int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62322,9 +63793,9 @@ int HP_script_add_str(const char *p) { { retVal___ = HPMHooks.source.script.add_str(p); } - if( HPMHooks.count.HP_script_add_str_post ) { + if (HPMHooks.count.HP_script_add_str_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) { + 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); } @@ -62334,14 +63805,14 @@ int HP_script_add_str(const char *p) { const char* HP_script_get_str(int id) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_str_pre ) { + if (HPMHooks.count.HP_script_get_str_pre > 0) { const char* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62349,9 +63820,9 @@ const char* HP_script_get_str(int id) { { retVal___ = HPMHooks.source.script.get_str(id); } - if( HPMHooks.count.HP_script_get_str_post ) { + if (HPMHooks.count.HP_script_get_str_post > 0) { const char* (*postHookFunc) (const char* retVal___, int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_post; hIndex++ ) { + 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); } @@ -62361,14 +63832,14 @@ const char* HP_script_get_str(int id) { int HP_script_search_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_search_str_pre ) { + if (HPMHooks.count.HP_script_search_str_pre > 0) { int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62376,9 +63847,9 @@ int HP_script_search_str(const char *p) { { retVal___ = HPMHooks.source.script.search_str(p); } - if( HPMHooks.count.HP_script_search_str_post ) { + if (HPMHooks.count.HP_script_search_str_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) { + 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); } @@ -62387,14 +63858,14 @@ int HP_script_search_str(const char *p) { } void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_setd_sub_pre ) { + if (HPMHooks.count.HP_script_setd_sub_pre > 0) { void (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **varname, int *elem, const void **value, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62402,9 +63873,9 @@ void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, co { HPMHooks.source.script.setd_sub(st, sd, varname, elem, value, ref); } - if( HPMHooks.count.HP_script_setd_sub_post ) { + if (HPMHooks.count.HP_script_setd_sub_post > 0) { void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) { + 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); } @@ -62413,14 +63884,14 @@ void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, co } void HP_script_attach_state(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_attach_state_pre ) { + if (HPMHooks.count.HP_script_attach_state_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62428,9 +63899,9 @@ void HP_script_attach_state(struct script_state *st) { { HPMHooks.source.script.attach_state(st); } - if( HPMHooks.count.HP_script_attach_state_post ) { + if (HPMHooks.count.HP_script_attach_state_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func; postHookFunc(st); } @@ -62440,14 +63911,14 @@ void HP_script_attach_state(struct script_state *st) { struct script_queue* HP_script_queue(int idx) { int hIndex = 0; struct script_queue* retVal___ = NULL; - if( HPMHooks.count.HP_script_queue_pre ) { + if (HPMHooks.count.HP_script_queue_pre > 0) { struct script_queue* (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62455,9 +63926,9 @@ struct script_queue* HP_script_queue(int idx) { { retVal___ = HPMHooks.source.script.queue(idx); } - if( HPMHooks.count.HP_script_queue_post ) { + if (HPMHooks.count.HP_script_queue_post > 0) { struct script_queue* (*postHookFunc) (struct script_queue* retVal___, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_queue_post[hIndex].func; retVal___ = postHookFunc(retVal___, idx); } @@ -62467,14 +63938,14 @@ struct script_queue* HP_script_queue(int idx) { bool HP_script_queue_add(int idx, int var) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_add_pre ) { + if (HPMHooks.count.HP_script_queue_add_pre > 0) { bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62482,9 +63953,9 @@ bool HP_script_queue_add(int idx, int var) { { retVal___ = HPMHooks.source.script.queue_add(idx, var); } - if( HPMHooks.count.HP_script_queue_add_post ) { + if (HPMHooks.count.HP_script_queue_add_post > 0) { bool (*postHookFunc) (bool retVal___, int idx, int var); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_post; hIndex++ ) { + 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); } @@ -62494,14 +63965,14 @@ bool HP_script_queue_add(int idx, int var) { bool HP_script_queue_del(int idx) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_del_pre ) { + if (HPMHooks.count.HP_script_queue_del_pre > 0) { bool (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62509,9 +63980,9 @@ bool HP_script_queue_del(int idx) { { retVal___ = HPMHooks.source.script.queue_del(idx); } - if( HPMHooks.count.HP_script_queue_del_post ) { + if (HPMHooks.count.HP_script_queue_del_post > 0) { bool (*postHookFunc) (bool retVal___, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_post; hIndex++ ) { + 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); } @@ -62521,14 +63992,14 @@ bool HP_script_queue_del(int idx) { bool HP_script_queue_remove(int idx, int var) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_remove_pre ) { + if (HPMHooks.count.HP_script_queue_remove_pre > 0) { bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62536,9 +64007,9 @@ bool HP_script_queue_remove(int idx, int var) { { retVal___ = HPMHooks.source.script.queue_remove(idx, var); } - if( HPMHooks.count.HP_script_queue_remove_post ) { + if (HPMHooks.count.HP_script_queue_remove_post > 0) { bool (*postHookFunc) (bool retVal___, int idx, int var); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_post; hIndex++ ) { + 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); } @@ -62548,14 +64019,14 @@ bool HP_script_queue_remove(int idx, int var) { int HP_script_queue_create(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_queue_create_pre ) { + if (HPMHooks.count.HP_script_queue_create_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62563,9 +64034,9 @@ int HP_script_queue_create(void) { { retVal___ = HPMHooks.source.script.queue_create(); } - if( HPMHooks.count.HP_script_queue_create_post ) { + if (HPMHooks.count.HP_script_queue_create_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) { + 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___); } @@ -62575,14 +64046,14 @@ int HP_script_queue_create(void) { bool HP_script_queue_clear(int idx) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_clear_pre ) { + if (HPMHooks.count.HP_script_queue_clear_pre > 0) { bool (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func; retVal___ = preHookFunc(&idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62590,9 +64061,9 @@ bool HP_script_queue_clear(int idx) { { retVal___ = HPMHooks.source.script.queue_clear(idx); } - if( HPMHooks.count.HP_script_queue_clear_post ) { + if (HPMHooks.count.HP_script_queue_clear_post > 0) { bool (*postHookFunc) (bool retVal___, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func; retVal___ = postHookFunc(retVal___, idx); } @@ -62602,14 +64073,14 @@ bool HP_script_queue_clear(int idx) { 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 ) { + if (HPMHooks.count.HP_script_parse_curly_close_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62617,9 +64088,9 @@ const char* HP_script_parse_curly_close(const char *p) { { retVal___ = HPMHooks.source.script.parse_curly_close(p); } - if( HPMHooks.count.HP_script_parse_curly_close_post ) { + if (HPMHooks.count.HP_script_parse_curly_close_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) { + 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); } @@ -62629,14 +64100,14 @@ const char* HP_script_parse_curly_close(const char *p) { 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 ) { + if (HPMHooks.count.HP_script_parse_syntax_close_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62644,9 +64115,9 @@ const char* HP_script_parse_syntax_close(const char *p) { { retVal___ = HPMHooks.source.script.parse_syntax_close(p); } - if( HPMHooks.count.HP_script_parse_syntax_close_post ) { + if (HPMHooks.count.HP_script_parse_syntax_close_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) { + 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); } @@ -62656,14 +64127,14 @@ const char* HP_script_parse_syntax_close(const char *p) { 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 ) { + if (HPMHooks.count.HP_script_parse_syntax_close_sub_pre > 0) { const char* (*preHookFunc) (const char **p, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62671,9 +64142,9 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { { retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag); } - if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) { + if (HPMHooks.count.HP_script_parse_syntax_close_sub_post > 0) { 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++ ) { + 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); } @@ -62683,14 +64154,14 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { const char* HP_script_parse_syntax(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_syntax_pre ) { + if (HPMHooks.count.HP_script_parse_syntax_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62698,9 +64169,9 @@ const char* HP_script_parse_syntax(const char *p) { { retVal___ = HPMHooks.source.script.parse_syntax(p); } - if( HPMHooks.count.HP_script_parse_syntax_post ) { + if (HPMHooks.count.HP_script_parse_syntax_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) { + 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); } @@ -62710,14 +64181,14 @@ const char* HP_script_parse_syntax(const char *p) { c_op HP_script_get_com(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; c_op retVal___ = C_NOP; - if( HPMHooks.count.HP_script_get_com_pre ) { + if (HPMHooks.count.HP_script_get_com_pre > 0) { c_op (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62725,9 +64196,9 @@ c_op HP_script_get_com(const struct script_buf *scriptbuf, int *pos) { { retVal___ = HPMHooks.source.script.get_com(scriptbuf, pos); } - if( HPMHooks.count.HP_script_get_com_post ) { + if (HPMHooks.count.HP_script_get_com_post > 0) { c_op (*postHookFunc) (c_op retVal___, const struct script_buf *scriptbuf, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_post; hIndex++ ) { + 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); } @@ -62737,14 +64208,14 @@ c_op HP_script_get_com(const struct script_buf *scriptbuf, int *pos) { int HP_script_get_num(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_num_pre ) { + if (HPMHooks.count.HP_script_get_num_pre > 0) { int (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62752,9 +64223,9 @@ int HP_script_get_num(const struct script_buf *scriptbuf, int *pos) { { retVal___ = HPMHooks.source.script.get_num(scriptbuf, pos); } - if( HPMHooks.count.HP_script_get_num_post ) { + if (HPMHooks.count.HP_script_get_num_post > 0) { int (*postHookFunc) (int retVal___, const struct script_buf *scriptbuf, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_post; hIndex++ ) { + 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); } @@ -62764,14 +64235,14 @@ int HP_script_get_num(const struct script_buf *scriptbuf, int *pos) { const char* HP_script_op2name(int op) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_op2name_pre ) { + if (HPMHooks.count.HP_script_op2name_pre > 0) { const char* (*preHookFunc) (int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62779,9 +64250,9 @@ const char* HP_script_op2name(int op) { { retVal___ = HPMHooks.source.script.op2name(op); } - if( HPMHooks.count.HP_script_op2name_post ) { + if (HPMHooks.count.HP_script_op2name_post > 0) { const char* (*postHookFunc) (const char* retVal___, int op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_op2name_post[hIndex].func; retVal___ = postHookFunc(retVal___, op); } @@ -62790,14 +64261,14 @@ const char* HP_script_op2name(int op) { } void HP_script_reportsrc(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportsrc_pre ) { + if (HPMHooks.count.HP_script_reportsrc_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62805,9 +64276,9 @@ void HP_script_reportsrc(struct script_state *st) { { HPMHooks.source.script.reportsrc(st); } - if( HPMHooks.count.HP_script_reportsrc_post ) { + if (HPMHooks.count.HP_script_reportsrc_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func; postHookFunc(st); } @@ -62816,14 +64287,14 @@ void HP_script_reportsrc(struct script_state *st) { } void HP_script_reportdata(struct script_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportdata_pre ) { + if (HPMHooks.count.HP_script_reportdata_pre > 0) { void (*preHookFunc) (struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62831,9 +64302,9 @@ void HP_script_reportdata(struct script_data *data) { { HPMHooks.source.script.reportdata(data); } - if( HPMHooks.count.HP_script_reportdata_post ) { + if (HPMHooks.count.HP_script_reportdata_post > 0) { void (*postHookFunc) (struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func; postHookFunc(data); } @@ -62842,14 +64313,14 @@ void HP_script_reportdata(struct script_data *data) { } void HP_script_reportfunc(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportfunc_pre ) { + if (HPMHooks.count.HP_script_reportfunc_pre > 0) { void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62857,9 +64328,9 @@ void HP_script_reportfunc(struct script_state *st) { { HPMHooks.source.script.reportfunc(st); } - if( HPMHooks.count.HP_script_reportfunc_post ) { + if (HPMHooks.count.HP_script_reportfunc_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func; postHookFunc(st); } @@ -62868,14 +64339,14 @@ void HP_script_reportfunc(struct script_state *st) { } void HP_script_disp_warning_message(const char *mes, const char *pos) { int hIndex = 0; - if( HPMHooks.count.HP_script_disp_warning_message_pre ) { + if (HPMHooks.count.HP_script_disp_warning_message_pre > 0) { void (*preHookFunc) (const char **mes, const char **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62883,9 +64354,9 @@ void HP_script_disp_warning_message(const char *mes, const char *pos) { { HPMHooks.source.script.disp_warning_message(mes, pos); } - if( HPMHooks.count.HP_script_disp_warning_message_post ) { + if (HPMHooks.count.HP_script_disp_warning_message_post > 0) { void (*postHookFunc) (const char *mes, const char *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) { + 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); } @@ -62894,14 +64365,14 @@ void HP_script_disp_warning_message(const char *mes, const char *pos) { } void HP_script_check_event(struct script_state *st, const char *evt) { int hIndex = 0; - if( HPMHooks.count.HP_script_check_event_pre ) { + if (HPMHooks.count.HP_script_check_event_pre > 0) { void (*preHookFunc) (struct script_state **st, const char **evt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62909,9 +64380,9 @@ void HP_script_check_event(struct script_state *st, const char *evt) { { HPMHooks.source.script.check_event(st, evt); } - if( HPMHooks.count.HP_script_check_event_post ) { + if (HPMHooks.count.HP_script_check_event_post > 0) { void (*postHookFunc) (struct script_state *st, const char *evt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) { + 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); } @@ -62921,14 +64392,14 @@ void HP_script_check_event(struct script_state *st, const char *evt) { unsigned int HP_script_calc_hash(const char *p) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_pre ) { + if (HPMHooks.count.HP_script_calc_hash_pre > 0) { unsigned int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62936,9 +64407,9 @@ unsigned int HP_script_calc_hash(const char *p) { { retVal___ = HPMHooks.source.script.calc_hash(p); } - if( HPMHooks.count.HP_script_calc_hash_post ) { + if (HPMHooks.count.HP_script_calc_hash_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) { + 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); } @@ -62947,14 +64418,14 @@ unsigned int HP_script_calc_hash(const char *p) { } void HP_script_addb(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addb_pre ) { + if (HPMHooks.count.HP_script_addb_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62962,9 +64433,9 @@ void HP_script_addb(int a) { { HPMHooks.source.script.addb(a); } - if( HPMHooks.count.HP_script_addb_post ) { + if (HPMHooks.count.HP_script_addb_post > 0) { void (*postHookFunc) (int a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_addb_post[hIndex].func; postHookFunc(a); } @@ -62973,14 +64444,14 @@ void HP_script_addb(int a) { } void HP_script_addc(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addc_pre ) { + if (HPMHooks.count.HP_script_addc_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62988,9 +64459,9 @@ void HP_script_addc(int a) { { HPMHooks.source.script.addc(a); } - if( HPMHooks.count.HP_script_addc_post ) { + if (HPMHooks.count.HP_script_addc_post > 0) { void (*postHookFunc) (int a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_addc_post[hIndex].func; postHookFunc(a); } @@ -62999,14 +64470,14 @@ void HP_script_addc(int a) { } void HP_script_addi(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addi_pre ) { + if (HPMHooks.count.HP_script_addi_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63014,9 +64485,9 @@ void HP_script_addi(int a) { { HPMHooks.source.script.addi(a); } - if( HPMHooks.count.HP_script_addi_post ) { + if (HPMHooks.count.HP_script_addi_post > 0) { void (*postHookFunc) (int a); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_addi_post[hIndex].func; postHookFunc(a); } @@ -63025,14 +64496,14 @@ void HP_script_addi(int a) { } void HP_script_addl(int l) { int hIndex = 0; - if( HPMHooks.count.HP_script_addl_pre ) { + if (HPMHooks.count.HP_script_addl_pre > 0) { void (*preHookFunc) (int *l); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63040,9 +64511,9 @@ void HP_script_addl(int l) { { HPMHooks.source.script.addl(l); } - if( HPMHooks.count.HP_script_addl_post ) { + if (HPMHooks.count.HP_script_addl_post > 0) { void (*postHookFunc) (int l); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_addl_post[hIndex].func; postHookFunc(l); } @@ -63051,14 +64522,14 @@ void HP_script_addl(int l) { } void HP_script_set_label(int l, int pos, const char *script_pos) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_label_pre ) { + if (HPMHooks.count.HP_script_set_label_pre > 0) { void (*preHookFunc) (int *l, int *pos, const char **script_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63066,9 +64537,9 @@ void HP_script_set_label(int l, int pos, const char *script_pos) { { HPMHooks.source.script.set_label(l, pos, script_pos); } - if( HPMHooks.count.HP_script_set_label_post ) { + if (HPMHooks.count.HP_script_set_label_post > 0) { void (*postHookFunc) (int l, int pos, const char *script_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_post; hIndex++ ) { + 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); } @@ -63078,14 +64549,14 @@ void HP_script_set_label(int l, int pos, const char *script_pos) { const char* HP_script_skip_word(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_skip_word_pre ) { + if (HPMHooks.count.HP_script_skip_word_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63093,9 +64564,9 @@ const char* HP_script_skip_word(const char *p) { { retVal___ = HPMHooks.source.script.skip_word(p); } - if( HPMHooks.count.HP_script_skip_word_post ) { + if (HPMHooks.count.HP_script_skip_word_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) { + 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); } @@ -63105,14 +64576,14 @@ const char* HP_script_skip_word(const char *p) { int HP_script_add_word(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_word_pre ) { + if (HPMHooks.count.HP_script_add_word_pre > 0) { int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63120,9 +64591,9 @@ int HP_script_add_word(const char *p) { { retVal___ = HPMHooks.source.script.add_word(p); } - if( HPMHooks.count.HP_script_add_word_post ) { + if (HPMHooks.count.HP_script_add_word_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) { + 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); } @@ -63132,14 +64603,14 @@ int HP_script_add_word(const char *p) { 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 ) { + if (HPMHooks.count.HP_script_parse_callfunc_pre > 0) { const char* (*preHookFunc) (const char **p, int *require_paren, int *is_custom); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63147,9 +64618,9 @@ const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_cu { retVal___ = HPMHooks.source.script.parse_callfunc(p, require_paren, is_custom); } - if( HPMHooks.count.HP_script_parse_callfunc_post ) { + if (HPMHooks.count.HP_script_parse_callfunc_post > 0) { 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++ ) { + 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); } @@ -63158,14 +64629,14 @@ const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_cu } void HP_script_parse_nextline(bool first, const char *p) { int hIndex = 0; - if( HPMHooks.count.HP_script_parse_nextline_pre ) { + if (HPMHooks.count.HP_script_parse_nextline_pre > 0) { void (*preHookFunc) (bool *first, const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63173,9 +64644,9 @@ void HP_script_parse_nextline(bool first, const char *p) { { HPMHooks.source.script.parse_nextline(first, p); } - if( HPMHooks.count.HP_script_parse_nextline_post ) { + if (HPMHooks.count.HP_script_parse_nextline_post > 0) { void (*postHookFunc) (bool first, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_post; hIndex++ ) { + 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); } @@ -63185,14 +64656,14 @@ void HP_script_parse_nextline(bool first, const char *p) { const char* HP_script_parse_variable(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_variable_pre ) { + if (HPMHooks.count.HP_script_parse_variable_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63200,9 +64671,9 @@ const char* HP_script_parse_variable(const char *p) { { retVal___ = HPMHooks.source.script.parse_variable(p); } - if( HPMHooks.count.HP_script_parse_variable_post ) { + if (HPMHooks.count.HP_script_parse_variable_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) { + 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); } @@ -63212,14 +64683,14 @@ const char* HP_script_parse_variable(const char *p) { const char* HP_script_parse_simpleexpr(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_pre ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63227,9 +64698,9 @@ const char* HP_script_parse_simpleexpr(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) { + 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); } @@ -63239,14 +64710,14 @@ const char* HP_script_parse_simpleexpr(const char *p) { const char* HP_script_parse_simpleexpr_paren(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_paren_pre ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_paren_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_paren_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63254,9 +64725,9 @@ const char* HP_script_parse_simpleexpr_paren(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr_paren(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_paren_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_paren_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_paren_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -63266,14 +64737,14 @@ const char* HP_script_parse_simpleexpr_paren(const char *p) { const char* HP_script_parse_simpleexpr_number(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_number_pre ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_number_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_number_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63281,9 +64752,9 @@ const char* HP_script_parse_simpleexpr_number(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr_number(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_number_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_number_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_number_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -63293,14 +64764,14 @@ const char* HP_script_parse_simpleexpr_number(const char *p) { const char* HP_script_parse_simpleexpr_string(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_string_pre ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_string_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_string_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63308,9 +64779,9 @@ const char* HP_script_parse_simpleexpr_string(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr_string(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_string_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -63320,14 +64791,14 @@ const char* HP_script_parse_simpleexpr_string(const char *p) { const char* HP_script_parse_simpleexpr_name(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_simpleexpr_name_pre ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_name_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_name_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63335,9 +64806,9 @@ const char* HP_script_parse_simpleexpr_name(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr_name(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_name_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -63346,14 +64817,14 @@ const char* HP_script_parse_simpleexpr_name(const char *p) { } void HP_script_add_translatable_string(const struct script_string_buf *string, const char *start_point) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_translatable_string_pre ) { + if (HPMHooks.count.HP_script_add_translatable_string_pre > 0) { void (*preHookFunc) (const struct script_string_buf **string, const char **start_point); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_translatable_string_pre[hIndex].func; preHookFunc(&string, &start_point); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63361,9 +64832,9 @@ void HP_script_add_translatable_string(const struct script_string_buf *string, c { HPMHooks.source.script.add_translatable_string(string, start_point); } - if( HPMHooks.count.HP_script_add_translatable_string_post ) { + if (HPMHooks.count.HP_script_add_translatable_string_post > 0) { void (*postHookFunc) (const struct script_string_buf *string, const char *start_point); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_translatable_string_post[hIndex].func; postHookFunc(string, start_point); } @@ -63373,14 +64844,14 @@ void HP_script_add_translatable_string(const struct script_string_buf *string, c const char* HP_script_parse_expr(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_expr_pre ) { + if (HPMHooks.count.HP_script_parse_expr_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63388,9 +64859,9 @@ const char* HP_script_parse_expr(const char *p) { { retVal___ = HPMHooks.source.script.parse_expr(p); } - if( HPMHooks.count.HP_script_parse_expr_post ) { + if (HPMHooks.count.HP_script_parse_expr_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) { + 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); } @@ -63400,14 +64871,14 @@ const char* HP_script_parse_expr(const char *p) { const char* HP_script_parse_line(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_parse_line_pre ) { + if (HPMHooks.count.HP_script_parse_line_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63415,9 +64886,9 @@ const char* HP_script_parse_line(const char *p) { { retVal___ = HPMHooks.source.script.parse_line(p); } - if( HPMHooks.count.HP_script_parse_line_post ) { + if (HPMHooks.count.HP_script_parse_line_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) { + 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); } @@ -63426,14 +64897,14 @@ const char* HP_script_parse_line(const char *p) { } void HP_script_read_constdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_read_constdb_pre ) { + if (HPMHooks.count.HP_script_read_constdb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63441,9 +64912,9 @@ void HP_script_read_constdb(void) { { HPMHooks.source.script.read_constdb(); } - if( HPMHooks.count.HP_script_read_constdb_post ) { + if (HPMHooks.count.HP_script_read_constdb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; postHookFunc(); } @@ -63452,14 +64923,14 @@ void HP_script_read_constdb(void) { } void HP_script_constdb_comment(const char *comment) { int hIndex = 0; - if( HPMHooks.count.HP_script_constdb_comment_pre ) { + if (HPMHooks.count.HP_script_constdb_comment_pre > 0) { void (*preHookFunc) (const char **comment); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_constdb_comment_pre[hIndex].func; preHookFunc(&comment); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63467,9 +64938,9 @@ void HP_script_constdb_comment(const char *comment) { { HPMHooks.source.script.constdb_comment(comment); } - if( HPMHooks.count.HP_script_constdb_comment_post ) { + if (HPMHooks.count.HP_script_constdb_comment_post > 0) { void (*postHookFunc) (const char *comment); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_constdb_comment_post[hIndex].func; postHookFunc(comment); } @@ -63478,14 +64949,14 @@ void HP_script_constdb_comment(const char *comment) { } void HP_script_load_parameters(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_parameters_pre ) { + if (HPMHooks.count.HP_script_load_parameters_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_parameters_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63493,9 +64964,9 @@ void HP_script_load_parameters(void) { { HPMHooks.source.script.load_parameters(); } - if( HPMHooks.count.HP_script_load_parameters_post ) { + if (HPMHooks.count.HP_script_load_parameters_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_parameters_post[hIndex].func; postHookFunc(); } @@ -63505,14 +64976,14 @@ void HP_script_load_parameters(void) { 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 ) { + if (HPMHooks.count.HP_script_print_line_pre > 0) { const char* (*preHookFunc) (StringBuf **buf, const char **p, const char **mark, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63520,9 +64991,9 @@ const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark { retVal___ = HPMHooks.source.script.print_line(buf, p, mark, line); } - if( HPMHooks.count.HP_script_print_line_post ) { + if (HPMHooks.count.HP_script_print_line_post > 0) { 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++ ) { + 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); } @@ -63531,14 +65002,14 @@ const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark } 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 ) { + if (HPMHooks.count.HP_script_errorwarning_sub_pre > 0) { void (*preHookFunc) (StringBuf **buf, const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63546,9 +65017,9 @@ void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *fil { HPMHooks.source.script.errorwarning_sub(buf, src, file, start_line, error_msg, error_pos); } - if( HPMHooks.count.HP_script_errorwarning_sub_post ) { + if (HPMHooks.count.HP_script_errorwarning_sub_post > 0) { 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++ ) { + 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); } @@ -63558,14 +65029,14 @@ void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *fil int HP_script_set_reg(struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_set_reg_pre ) { + if (HPMHooks.count.HP_script_set_reg_pre > 0) { int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, int64 *num, const char **name, const void **value, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63573,9 +65044,9 @@ int HP_script_set_reg(struct script_state *st, struct map_session_data *sd, int6 { retVal___ = HPMHooks.source.script.set_reg(st, sd, num, name, value, ref); } - if( HPMHooks.count.HP_script_set_reg_post ) { + if (HPMHooks.count.HP_script_set_reg_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) { + 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); } @@ -63584,14 +65055,14 @@ int HP_script_set_reg(struct script_state *st, struct map_session_data *sd, int6 } void HP_script_set_reg_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_ref_str_pre ) { + if (HPMHooks.count.HP_script_set_reg_ref_str_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_ref_str_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63599,25 +65070,51 @@ void HP_script_set_reg_ref_str(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_ref_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_ref_str_post ) { + if (HPMHooks.count.HP_script_set_reg_ref_str_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_ref_str_post[hIndex].func; postHookFunc(st, n, num, name, str); } } return; } +void HP_script_set_reg_pc_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { + int hIndex = 0; + if (HPMHooks.count.HP_script_set_reg_pc_ref_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &str); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_str(st, n, num, name, str); + } + if (HPMHooks.count.HP_script_set_reg_pc_ref_str_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_post[hIndex].func; + postHookFunc(st, n, num, name, str); + } + } + return; +} void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_scope_str_pre ) { + if (HPMHooks.count.HP_script_set_reg_scope_str_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_scope_str_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63625,9 +65122,9 @@ void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int6 { HPMHooks.source.script.set_reg_scope_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_scope_str_post ) { + if (HPMHooks.count.HP_script_set_reg_scope_str_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_scope_str_post[hIndex].func; postHookFunc(st, n, num, name, str); } @@ -63636,14 +65133,14 @@ void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int6 } void HP_script_set_reg_npc_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_npc_str_pre ) { + if (HPMHooks.count.HP_script_set_reg_npc_str_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_npc_str_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63651,9 +65148,9 @@ void HP_script_set_reg_npc_str(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_npc_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_npc_str_post ) { + if (HPMHooks.count.HP_script_set_reg_npc_str_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_npc_str_post[hIndex].func; postHookFunc(st, n, num, name, str); } @@ -63662,14 +65159,14 @@ void HP_script_set_reg_npc_str(struct script_state *st, struct reg_db *n, int64 } void HP_script_set_reg_instance_str(struct script_state *st, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_instance_str_pre ) { + if (HPMHooks.count.HP_script_set_reg_instance_str_pre > 0) { void (*preHookFunc) (struct script_state **st, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_instance_str_pre[hIndex].func; preHookFunc(&st, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63677,9 +65174,9 @@ void HP_script_set_reg_instance_str(struct script_state *st, int64 num, const ch { HPMHooks.source.script.set_reg_instance_str(st, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_instance_str_post ) { + if (HPMHooks.count.HP_script_set_reg_instance_str_post > 0) { void (*postHookFunc) (struct script_state *st, int64 num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_instance_str_post[hIndex].func; postHookFunc(st, num, name, str); } @@ -63688,14 +65185,14 @@ void HP_script_set_reg_instance_str(struct script_state *st, int64 num, const ch } void HP_script_set_reg_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_ref_num_pre ) { + if (HPMHooks.count.HP_script_set_reg_ref_num_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_ref_num_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63703,25 +65200,51 @@ void HP_script_set_reg_ref_num(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_ref_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_ref_num_post ) { + if (HPMHooks.count.HP_script_set_reg_ref_num_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_ref_num_post[hIndex].func; postHookFunc(st, n, num, name, val); } } return; } +void HP_script_set_reg_pc_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { + int hIndex = 0; + if (HPMHooks.count.HP_script_set_reg_pc_ref_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &val); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_num(st, n, num, name, val); + } + if (HPMHooks.count.HP_script_set_reg_pc_ref_num_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_post[hIndex].func; + postHookFunc(st, n, num, name, val); + } + } + return; +} void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_scope_num_pre ) { + if (HPMHooks.count.HP_script_set_reg_scope_num_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_scope_num_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63729,9 +65252,9 @@ void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int6 { HPMHooks.source.script.set_reg_scope_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_scope_num_post ) { + if (HPMHooks.count.HP_script_set_reg_scope_num_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_scope_num_post[hIndex].func; postHookFunc(st, n, num, name, val); } @@ -63740,14 +65263,14 @@ void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int6 } void HP_script_set_reg_npc_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_npc_num_pre ) { + if (HPMHooks.count.HP_script_set_reg_npc_num_pre > 0) { void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_npc_num_pre[hIndex].func; preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63755,9 +65278,9 @@ void HP_script_set_reg_npc_num(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_npc_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_npc_num_post ) { + if (HPMHooks.count.HP_script_set_reg_npc_num_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_npc_num_post[hIndex].func; postHookFunc(st, n, num, name, val); } @@ -63766,14 +65289,14 @@ void HP_script_set_reg_npc_num(struct script_state *st, struct reg_db *n, int64 } void HP_script_set_reg_instance_num(struct script_state *st, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_instance_num_pre ) { + if (HPMHooks.count.HP_script_set_reg_instance_num_pre > 0) { void (*preHookFunc) (struct script_state **st, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_instance_num_pre[hIndex].func; preHookFunc(&st, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63781,9 +65304,9 @@ void HP_script_set_reg_instance_num(struct script_state *st, int64 num, const ch { HPMHooks.source.script.set_reg_instance_num(st, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_instance_num_post ) { + if (HPMHooks.count.HP_script_set_reg_instance_num_post > 0) { void (*postHookFunc) (struct script_state *st, int64 num, const char *name, int val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_instance_num_post[hIndex].func; postHookFunc(st, num, name, val); } @@ -63792,14 +65315,14 @@ void HP_script_set_reg_instance_num(struct script_state *st, int64 num, const ch } void HP_script_stack_expand(struct script_stack *stack) { int hIndex = 0; - if( HPMHooks.count.HP_script_stack_expand_pre ) { + if (HPMHooks.count.HP_script_stack_expand_pre > 0) { void (*preHookFunc) (struct script_stack **stack); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63807,9 +65330,9 @@ void HP_script_stack_expand(struct script_stack *stack) { { HPMHooks.source.script.stack_expand(stack); } - if( HPMHooks.count.HP_script_stack_expand_post ) { + if (HPMHooks.count.HP_script_stack_expand_post > 0) { void (*postHookFunc) (struct script_stack *stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func; postHookFunc(stack); } @@ -63819,14 +65342,14 @@ void HP_script_stack_expand(struct script_stack *stack) { struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_retinfo_pre ) { + if (HPMHooks.count.HP_script_push_retinfo_pre > 0) { struct script_data* (*preHookFunc) (struct script_stack **stack, struct script_retinfo **ri, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63834,9 +65357,9 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc { retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref); } - if( HPMHooks.count.HP_script_push_retinfo_post ) { + if (HPMHooks.count.HP_script_push_retinfo_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) { + 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); } @@ -63845,14 +65368,14 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc } void HP_script_op_3(struct script_state *st, int op) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_3_pre ) { + if (HPMHooks.count.HP_script_op_3_pre > 0) { void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63860,9 +65383,9 @@ void HP_script_op_3(struct script_state *st, int op) { { HPMHooks.source.script.op_3(st, op); } - if( HPMHooks.count.HP_script_op_3_post ) { + if (HPMHooks.count.HP_script_op_3_post > 0) { void (*postHookFunc) (struct script_state *st, int op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_post; hIndex++ ) { + 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); } @@ -63871,14 +65394,14 @@ void HP_script_op_3(struct script_state *st, int op) { } 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 ) { + if (HPMHooks.count.HP_script_op_2str_pre > 0) { void (*preHookFunc) (struct script_state **st, int *op, const char **s1, const char **s2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63886,9 +65409,9 @@ void HP_script_op_2str(struct script_state *st, int op, const char *s1, const ch { HPMHooks.source.script.op_2str(st, op, s1, s2); } - if( HPMHooks.count.HP_script_op_2str_post ) { + if (HPMHooks.count.HP_script_op_2str_post > 0) { 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++ ) { + 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); } @@ -63897,14 +65420,14 @@ void HP_script_op_2str(struct script_state *st, int op, const char *s1, const ch } 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 ) { + if (HPMHooks.count.HP_script_op_2num_pre > 0) { void (*preHookFunc) (struct script_state **st, int *op, int *i1, int *i2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63912,9 +65435,9 @@ void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { { HPMHooks.source.script.op_2num(st, op, i1, i2); } - if( HPMHooks.count.HP_script_op_2num_post ) { + if (HPMHooks.count.HP_script_op_2num_post > 0) { void (*postHookFunc) (struct script_state *st, int op, int i1, int i2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_post; hIndex++ ) { + 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); } @@ -63923,14 +65446,14 @@ void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { } void HP_script_op_2(struct script_state *st, int op) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_2_pre ) { + if (HPMHooks.count.HP_script_op_2_pre > 0) { void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63938,9 +65461,9 @@ void HP_script_op_2(struct script_state *st, int op) { { HPMHooks.source.script.op_2(st, op); } - if( HPMHooks.count.HP_script_op_2_post ) { + if (HPMHooks.count.HP_script_op_2_post > 0) { void (*postHookFunc) (struct script_state *st, int op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_post; hIndex++ ) { + 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); } @@ -63949,14 +65472,14 @@ void HP_script_op_2(struct script_state *st, int op) { } void HP_script_op_1(struct script_state *st, int op) { int hIndex = 0; - if( HPMHooks.count.HP_script_op_1_pre ) { + if (HPMHooks.count.HP_script_op_1_pre > 0) { void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63964,9 +65487,9 @@ void HP_script_op_1(struct script_state *st, int op) { { HPMHooks.source.script.op_1(st, op); } - if( HPMHooks.count.HP_script_op_1_post ) { + if (HPMHooks.count.HP_script_op_1_post > 0) { void (*postHookFunc) (struct script_state *st, int op); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_post; hIndex++ ) { + 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); } @@ -63976,14 +65499,14 @@ void HP_script_op_1(struct script_state *st, int op) { bool HP_script_check_buildin_argtype(struct script_state *st, int func) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_check_buildin_argtype_pre ) { + if (HPMHooks.count.HP_script_check_buildin_argtype_pre > 0) { bool (*preHookFunc) (struct script_state **st, int *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_pre[hIndex].func; retVal___ = preHookFunc(&st, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63991,9 +65514,9 @@ bool HP_script_check_buildin_argtype(struct script_state *st, int func) { { retVal___ = HPMHooks.source.script.check_buildin_argtype(st, func); } - if( HPMHooks.count.HP_script_check_buildin_argtype_post ) { + if (HPMHooks.count.HP_script_check_buildin_argtype_post > 0) { bool (*postHookFunc) (bool retVal___, struct script_state *st, int func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_check_buildin_argtype_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, func); } @@ -64002,14 +65525,14 @@ bool HP_script_check_buildin_argtype(struct script_state *st, int func) { } void HP_script_detach_state(struct script_state *st, bool dequeue_event) { int hIndex = 0; - if( HPMHooks.count.HP_script_detach_state_pre ) { + if (HPMHooks.count.HP_script_detach_state_pre > 0) { void (*preHookFunc) (struct script_state **st, bool *dequeue_event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64017,9 +65540,9 @@ void HP_script_detach_state(struct script_state *st, bool dequeue_event) { { HPMHooks.source.script.detach_state(st, dequeue_event); } - if( HPMHooks.count.HP_script_detach_state_post ) { + if (HPMHooks.count.HP_script_detach_state_post > 0) { void (*postHookFunc) (struct script_state *st, bool dequeue_event); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_post; hIndex++ ) { + 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); } @@ -64029,16 +65552,16 @@ void HP_script_detach_state(struct script_state *st, bool dequeue_event) { int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_db_free_code_sub_pre ) { + if (HPMHooks.count.HP_script_db_free_code_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64048,9 +65571,9 @@ int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_script_db_free_code_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) { + 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); @@ -64061,14 +65584,14 @@ int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list ap) } void HP_script_add_autobonus(const char *autobonus) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_autobonus_pre ) { + if (HPMHooks.count.HP_script_add_autobonus_pre > 0) { void (*preHookFunc) (const char **autobonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64076,9 +65599,9 @@ void HP_script_add_autobonus(const char *autobonus) { { HPMHooks.source.script.add_autobonus(autobonus); } - if( HPMHooks.count.HP_script_add_autobonus_post ) { + if (HPMHooks.count.HP_script_add_autobonus_post > 0) { void (*postHookFunc) (const char *autobonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func; postHookFunc(autobonus); } @@ -64088,14 +65611,14 @@ void HP_script_add_autobonus(const char *autobonus) { int HP_script_menu_countoptions(const char *str, int max_count, int *total) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_menu_countoptions_pre ) { + if (HPMHooks.count.HP_script_menu_countoptions_pre > 0) { int (*preHookFunc) (const char **str, int *max_count, int **total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64103,28 +65626,121 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) { { retVal___ = HPMHooks.source.script.menu_countoptions(str, max_count, total); } - if( HPMHooks.count.HP_script_menu_countoptions_post ) { + if (HPMHooks.count.HP_script_menu_countoptions_post > 0) { int (*postHookFunc) (int retVal___, const char *str, int max_count, int *total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_post; hIndex++ ) { + 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_recovery_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.buildin_recovery_sub(sd); + } + if (HPMHooks.count.HP_script_buildin_recovery_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_script_buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_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.script.buildin_recovery_pc_sub(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_recovery_bl_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_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_recovery_bl_sub(bl, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_areawarp_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64134,9 +65750,9 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) { + if (HPMHooks.count.HP_script_buildin_areawarp_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) { + 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); @@ -64148,16 +65764,16 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64167,9 +65783,9 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) { + if (HPMHooks.count.HP_script_buildin_areapercentheal_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) { + 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); @@ -64180,14 +65796,14 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { } 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 ) { + if (HPMHooks.count.HP_script_buildin_delitem_delete_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx, int **amount, bool *delete_items); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64195,9 +65811,9 @@ void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int { HPMHooks.source.script.buildin_delitem_delete(sd, idx, amount, delete_items); } - if( HPMHooks.count.HP_script_buildin_delitem_delete_post ) { + if (HPMHooks.count.HP_script_buildin_delitem_delete_post > 0) { 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++ ) { + 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); } @@ -64207,14 +65823,14 @@ void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) { + if (HPMHooks.count.HP_script_buildin_delitem_search_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, struct item **it, bool *exact_match); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64222,9 +65838,9 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item * { retVal___ = HPMHooks.source.script.buildin_delitem_search(sd, it, exact_match); } - if( HPMHooks.count.HP_script_buildin_delitem_search_post ) { + if (HPMHooks.count.HP_script_buildin_delitem_search_post > 0) { 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++ ) { + 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); } @@ -64234,16 +65850,16 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item * int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64253,9 +65869,9 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post > 0) { 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++ ) { + 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); @@ -64267,16 +65883,16 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64286,9 +65902,9 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) { + 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); @@ -64300,16 +65916,16 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64319,9 +65935,9 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post > 0) { 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++ ) { + 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); @@ -64333,16 +65949,16 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64352,9 +65968,9 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) { + 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); @@ -64366,16 +65982,16 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_announce_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64385,9 +66001,9 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_announce_sub_post ) { + if (HPMHooks.count.HP_script_buildin_announce_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) { + 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); @@ -64399,16 +66015,16 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_getareausers_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64418,9 +66034,9 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) { + if (HPMHooks.count.HP_script_buildin_getareausers_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) { + 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); @@ -64432,16 +66048,16 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64451,9 +66067,9 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) { + if (HPMHooks.count.HP_script_buildin_getareadropitem_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) { + 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); @@ -64465,16 +66081,16 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) { + if (HPMHooks.count.HP_script_mapflag_pvp_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64484,9 +66100,9 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) { + if (HPMHooks.count.HP_script_mapflag_pvp_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) { + 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); @@ -64498,16 +66114,16 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_pvpoff_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64517,9 +66133,9 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) { + if (HPMHooks.count.HP_script_buildin_pvpoff_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) { + 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); @@ -64531,16 +66147,16 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64550,9 +66166,9 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l 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 ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post > 0) { 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++ ) { + 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); @@ -64564,16 +66180,16 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64583,9 +66199,9 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a 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 ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post > 0) { 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++ ) { + 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); @@ -64597,16 +66213,16 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_mobcount_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64616,9 +66232,9 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) { + if (HPMHooks.count.HP_script_buildin_mobcount_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) { + 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); @@ -64630,16 +66246,16 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_sub_pre ) { + if (HPMHooks.count.HP_script_playbgm_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64649,9 +66265,9 @@ int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.playbgm_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_playbgm_sub_post ) { + if (HPMHooks.count.HP_script_playbgm_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_post; hIndex++ ) { + 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); @@ -64663,16 +66279,16 @@ int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre ) { + if (HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64682,9 +66298,9 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { retVal___ = HPMHooks.source.script.playbgm_foreachpc_sub(sd, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_post ) { + if (HPMHooks.count.HP_script_playbgm_foreachpc_sub_post > 0) { 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++ ) { + 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); @@ -64696,16 +66312,16 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_soundeffect_sub_pre ) { + if (HPMHooks.count.HP_script_soundeffect_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64715,9 +66331,9 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_soundeffect_sub_post ) { + if (HPMHooks.count.HP_script_soundeffect_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) { + 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); @@ -64729,14 +66345,14 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_query_sql_sub_pre > 0) { int (*preHookFunc) (struct script_state **st, struct Sql **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64744,9 +66360,9 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) { retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle); } - if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) { + if (HPMHooks.count.HP_script_buildin_query_sql_sub_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct Sql *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) { + 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); } @@ -64756,16 +66372,16 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64775,9 +66391,9 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_instance_warpall_sub_post > 0) { 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++ ) { + 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); @@ -64789,16 +66405,16 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) { + if (HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64808,9 +66424,9 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) { + if (HPMHooks.count.HP_script_buildin_mobuseskill_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) { + 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); @@ -64822,16 +66438,16 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) { + if (HPMHooks.count.HP_script_cleanfloor_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64841,9 +66457,9 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_cleanfloor_sub_post ) { + if (HPMHooks.count.HP_script_cleanfloor_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) { + 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); @@ -64855,14 +66471,14 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { int HP_script_run_func(struct script_state *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_run_func_pre ) { + if (HPMHooks.count.HP_script_run_func_pre > 0) { int (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64870,9 +66486,9 @@ int HP_script_run_func(struct script_state *st) { { retVal___ = HPMHooks.source.script.run_func(st); } - if( HPMHooks.count.HP_script_run_func_post ) { + if (HPMHooks.count.HP_script_run_func_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) { + 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); } @@ -64882,14 +66498,14 @@ int HP_script_run_func(struct script_state *st) { const char* HP_script_getfuncname(struct script_state *st) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_getfuncname_pre ) { + if (HPMHooks.count.HP_script_getfuncname_pre > 0) { const char* (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func; retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64897,9 +66513,9 @@ const char* HP_script_getfuncname(struct script_state *st) { { retVal___ = HPMHooks.source.script.getfuncname(st); } - if( HPMHooks.count.HP_script_getfuncname_post ) { + if (HPMHooks.count.HP_script_getfuncname_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_getfuncname_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -64909,14 +66525,14 @@ const char* HP_script_getfuncname(struct script_state *st) { unsigned int HP_script_calc_hash_ci(const char *p) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_ci_pre ) { + if (HPMHooks.count.HP_script_calc_hash_ci_pre > 0) { unsigned int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64924,9 +66540,9 @@ unsigned int HP_script_calc_hash_ci(const char *p) { { retVal___ = HPMHooks.source.script.calc_hash_ci(p); } - if( HPMHooks.count.HP_script_calc_hash_ci_post ) { + if (HPMHooks.count.HP_script_calc_hash_ci_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -64936,14 +66552,14 @@ unsigned int HP_script_calc_hash_ci(const char *p) { struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; struct reg_db* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_src_pre ) { + if (HPMHooks.count.HP_script_array_src_pre > 0) { struct reg_db* (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_src_pre[hIndex].func; retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64951,9 +66567,9 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d { retVal___ = HPMHooks.source.script.array_src(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_src_post ) { + if (HPMHooks.count.HP_script_array_src_post > 0) { struct reg_db* (*postHookFunc) (struct reg_db* retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -64962,14 +66578,14 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d } void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_update_pre ) { + if (HPMHooks.count.HP_script_array_update_pre > 0) { void (*preHookFunc) (struct reg_db **src, int64 *num, bool *empty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_update_pre[hIndex].func; preHookFunc(&src, &num, &empty); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64977,9 +66593,9 @@ void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { { HPMHooks.source.script.array_update(src, num, empty); } - if( HPMHooks.count.HP_script_array_update_post ) { + if (HPMHooks.count.HP_script_array_update_post > 0) { void (*postHookFunc) (struct reg_db *src, int64 num, bool empty); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_update_post[hIndex].func; postHookFunc(src, num, empty); } @@ -64988,14 +66604,14 @@ void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { } void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_delete_pre ) { + if (HPMHooks.count.HP_script_array_delete_pre > 0) { void (*preHookFunc) (struct reg_db **src, struct script_array **sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_delete_pre[hIndex].func; preHookFunc(&src, &sa); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65003,9 +66619,9 @@ void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { { HPMHooks.source.script.array_delete(src, sa); } - if( HPMHooks.count.HP_script_array_delete_post ) { + if (HPMHooks.count.HP_script_array_delete_post > 0) { void (*postHookFunc) (struct reg_db *src, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_delete_post[hIndex].func; postHookFunc(src, sa); } @@ -65014,14 +66630,14 @@ void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { } void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, unsigned int idx) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_remove_member_pre ) { + if (HPMHooks.count.HP_script_array_remove_member_pre > 0) { void (*preHookFunc) (struct reg_db **src, struct script_array **sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_remove_member_pre[hIndex].func; preHookFunc(&src, &sa, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65029,9 +66645,9 @@ void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, { HPMHooks.source.script.array_remove_member(src, sa, idx); } - if( HPMHooks.count.HP_script_array_remove_member_post ) { + if (HPMHooks.count.HP_script_array_remove_member_post > 0) { void (*postHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_remove_member_post[hIndex].func; postHookFunc(src, sa, idx); } @@ -65040,14 +66656,14 @@ void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, } void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_add_member_pre ) { + if (HPMHooks.count.HP_script_array_add_member_pre > 0) { void (*preHookFunc) (struct script_array **sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_add_member_pre[hIndex].func; preHookFunc(&sa, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65055,9 +66671,9 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { { HPMHooks.source.script.array_add_member(sa, idx); } - if( HPMHooks.count.HP_script_array_add_member_post ) { + if (HPMHooks.count.HP_script_array_add_member_post > 0) { void (*postHookFunc) (struct script_array *sa, unsigned int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_add_member_post[hIndex].func; postHookFunc(sa, idx); } @@ -65067,14 +66683,14 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { unsigned int HP_script_array_size(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_size_pre ) { + if (HPMHooks.count.HP_script_array_size_pre > 0) { unsigned int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_size_pre[hIndex].func; retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65082,9 +66698,9 @@ unsigned int HP_script_array_size(struct script_state *st, struct map_session_da { retVal___ = HPMHooks.source.script.array_size(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_size_post ) { + if (HPMHooks.count.HP_script_array_size_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_size_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -65094,14 +66710,14 @@ unsigned int HP_script_array_size(struct script_state *st, struct map_session_da unsigned int HP_script_array_highest_key(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_highest_key_pre ) { + if (HPMHooks.count.HP_script_array_highest_key_pre > 0) { unsigned int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_highest_key_pre[hIndex].func; retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65109,9 +66725,9 @@ unsigned int HP_script_array_highest_key(struct script_state *st, struct map_ses { retVal___ = HPMHooks.source.script.array_highest_key(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_highest_key_post ) { + if (HPMHooks.count.HP_script_array_highest_key_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_highest_key_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -65121,16 +66737,16 @@ unsigned int HP_script_array_highest_key(struct script_state *st, struct map_ses int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_array_free_db_pre ) { + if (HPMHooks.count.HP_script_array_free_db_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_array_free_db_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65140,9 +66756,9 @@ int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.script.array_free_db(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_array_free_db_post ) { + if (HPMHooks.count.HP_script_array_free_db_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_array_free_db_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -65153,14 +66769,14 @@ int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { } void HP_script_array_ensure_zero(struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_ensure_zero_pre ) { + if (HPMHooks.count.HP_script_array_ensure_zero_pre > 0) { void (*preHookFunc) (struct script_state **st, struct map_session_data **sd, int64 *uid, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_ensure_zero_pre[hIndex].func; preHookFunc(&st, &sd, &uid, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65168,9 +66784,9 @@ void HP_script_array_ensure_zero(struct script_state *st, struct map_session_dat { HPMHooks.source.script.array_ensure_zero(st, sd, uid, ref); } - if( HPMHooks.count.HP_script_array_ensure_zero_post ) { + if (HPMHooks.count.HP_script_array_ensure_zero_post > 0) { void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_ensure_zero_post[hIndex].func; postHookFunc(st, sd, uid, ref); } @@ -65179,14 +66795,14 @@ void HP_script_array_ensure_zero(struct script_state *st, struct map_session_dat } void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct script_reg_state *data) { int hIndex = 0; - if( HPMHooks.count.HP_script_reg_destroy_single_pre ) { + if (HPMHooks.count.HP_script_reg_destroy_single_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int64 *reg, struct script_reg_state **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_reg_destroy_single_pre[hIndex].func; preHookFunc(&sd, ®, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65194,9 +66810,9 @@ void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct { HPMHooks.source.script.reg_destroy_single(sd, reg, data); } - if( HPMHooks.count.HP_script_reg_destroy_single_post ) { + if (HPMHooks.count.HP_script_reg_destroy_single_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int64 reg, struct script_reg_state *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reg_destroy_single_post[hIndex].func; postHookFunc(sd, reg, data); } @@ -65206,16 +66822,16 @@ void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reg_destroy_pre ) { + if (HPMHooks.count.HP_script_reg_destroy_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_reg_destroy_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65225,9 +66841,9 @@ int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.script.reg_destroy(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_reg_destroy_post ) { + if (HPMHooks.count.HP_script_reg_destroy_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_reg_destroy_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -65238,14 +66854,14 @@ int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { } void HP_script_generic_ui_array_expand(unsigned int plus) { int hIndex = 0; - if( HPMHooks.count.HP_script_generic_ui_array_expand_pre ) { + if (HPMHooks.count.HP_script_generic_ui_array_expand_pre > 0) { void (*preHookFunc) (unsigned int *plus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_pre[hIndex].func; preHookFunc(&plus); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65253,9 +66869,9 @@ void HP_script_generic_ui_array_expand(unsigned int plus) { { HPMHooks.source.script.generic_ui_array_expand(plus); } - if( HPMHooks.count.HP_script_generic_ui_array_expand_post ) { + if (HPMHooks.count.HP_script_generic_ui_array_expand_post > 0) { void (*postHookFunc) (unsigned int plus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_post[hIndex].func; postHookFunc(plus); } @@ -65265,14 +66881,14 @@ void HP_script_generic_ui_array_expand(unsigned int plus) { unsigned int* HP_script_array_cpy_list(struct script_array *sa) { int hIndex = 0; unsigned int* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_cpy_list_pre ) { + if (HPMHooks.count.HP_script_array_cpy_list_pre > 0) { unsigned int* (*preHookFunc) (struct script_array **sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_cpy_list_pre[hIndex].func; retVal___ = preHookFunc(&sa); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65280,9 +66896,9 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) { { retVal___ = HPMHooks.source.script.array_cpy_list(sa); } - if( HPMHooks.count.HP_script_array_cpy_list_post ) { + if (HPMHooks.count.HP_script_array_cpy_list_post > 0) { unsigned int* (*postHookFunc) (unsigned int* retVal___, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_cpy_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, sa); } @@ -65291,14 +66907,14 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) { } void HP_script_hardcoded_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_hardcoded_constants_pre ) { + if (HPMHooks.count.HP_script_hardcoded_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_hardcoded_constants_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65306,9 +66922,9 @@ void HP_script_hardcoded_constants(void) { { HPMHooks.source.script.hardcoded_constants(); } - if( HPMHooks.count.HP_script_hardcoded_constants_post ) { + if (HPMHooks.count.HP_script_hardcoded_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_hardcoded_constants_post[hIndex].func; postHookFunc(); } @@ -65318,14 +66934,14 @@ void HP_script_hardcoded_constants(void) { unsigned short HP_script_mapindexname2id(struct script_state *st, const char *name) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_script_mapindexname2id_pre ) { + if (HPMHooks.count.HP_script_mapindexname2id_pre > 0) { unsigned short (*preHookFunc) (struct script_state **st, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_mapindexname2id_pre[hIndex].func; retVal___ = preHookFunc(&st, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65333,9 +66949,9 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na { retVal___ = HPMHooks.source.script.mapindexname2id(st, name); } - if( HPMHooks.count.HP_script_mapindexname2id_post ) { + if (HPMHooks.count.HP_script_mapindexname2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, struct script_state *st, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_mapindexname2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name); } @@ -65345,14 +66961,14 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na int HP_script_string_dup(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_string_dup_pre ) { + if (HPMHooks.count.HP_script_string_dup_pre > 0) { int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_string_dup_pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65360,9 +66976,9 @@ int HP_script_string_dup(char *str) { { retVal___ = HPMHooks.source.script.string_dup(str); } - if( HPMHooks.count.HP_script_string_dup_post ) { + if (HPMHooks.count.HP_script_string_dup_post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_string_dup_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -65371,14 +66987,14 @@ int HP_script_string_dup(char *str) { } void HP_script_load_translations(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_translations_pre ) { + if (HPMHooks.count.HP_script_load_translations_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translations_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65386,9 +67002,9 @@ void HP_script_load_translations(void) { { HPMHooks.source.script.load_translations(); } - if( HPMHooks.count.HP_script_load_translations_post ) { + if (HPMHooks.count.HP_script_load_translations_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translations_post[hIndex].func; postHookFunc(); } @@ -65398,14 +67014,14 @@ void HP_script_load_translations(void) { bool HP_script_load_translation_addstring(const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_load_translation_addstring_pre ) { + if (HPMHooks.count.HP_script_load_translation_addstring_pre > 0) { bool (*preHookFunc) (const char **file, uint8 *lang_id, const char **msgctxt, const struct script_string_buf **msgid, const struct script_string_buf **msgstr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translation_addstring_pre[hIndex].func; retVal___ = preHookFunc(&file, &lang_id, &msgctxt, &msgid, &msgstr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65413,9 +67029,9 @@ bool HP_script_load_translation_addstring(const char *file, uint8 lang_id, const { retVal___ = HPMHooks.source.script.load_translation_addstring(file, lang_id, msgctxt, msgid, msgstr); } - if( HPMHooks.count.HP_script_load_translation_addstring_post ) { + if (HPMHooks.count.HP_script_load_translation_addstring_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translation_addstring_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, lang_id, msgctxt, msgid, msgstr); } @@ -65425,14 +67041,14 @@ bool HP_script_load_translation_addstring(const char *file, uint8 lang_id, const int HP_script_load_translation(const char *file, uint8 lang_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_load_translation_pre ) { + if (HPMHooks.count.HP_script_load_translation_pre > 0) { int (*preHookFunc) (const char **file, uint8 *lang_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; retVal___ = preHookFunc(&file, &lang_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65440,9 +67056,9 @@ int HP_script_load_translation(const char *file, uint8 lang_id) { { retVal___ = HPMHooks.source.script.load_translation(file, lang_id); } - if( HPMHooks.count.HP_script_load_translation_post ) { + if (HPMHooks.count.HP_script_load_translation_post > 0) { int (*postHookFunc) (int retVal___, const char *file, uint8 lang_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, lang_id); } @@ -65452,16 +67068,16 @@ int HP_script_load_translation(const char *file, uint8 lang_id) { int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_translation_db_destroyer_pre ) { + if (HPMHooks.count.HP_script_translation_db_destroyer_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_pre[hIndex].func; retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65471,9 +67087,9 @@ int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_ retVal___ = HPMHooks.source.script.translation_db_destroyer(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_translation_db_destroyer_post ) { + if (HPMHooks.count.HP_script_translation_db_destroyer_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_post[hIndex].func; retVal___ = postHookFunc(retVal___, key, data, ap___copy); @@ -65484,14 +67100,14 @@ int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_ } void HP_script_clear_translations(bool reload) { int hIndex = 0; - if( HPMHooks.count.HP_script_clear_translations_pre ) { + if (HPMHooks.count.HP_script_clear_translations_pre > 0) { void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_clear_translations_pre[hIndex].func; preHookFunc(&reload); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65499,9 +67115,9 @@ void HP_script_clear_translations(bool reload) { { HPMHooks.source.script.clear_translations(reload); } - if( HPMHooks.count.HP_script_clear_translations_post ) { + if (HPMHooks.count.HP_script_clear_translations_post > 0) { void (*postHookFunc) (bool reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_clear_translations_post[hIndex].func; postHookFunc(reload); } @@ -65511,14 +67127,14 @@ void HP_script_clear_translations(bool reload) { int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_parse_cleanup_timer_pre ) { + if (HPMHooks.count.HP_script_parse_cleanup_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65526,9 +67142,9 @@ int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.script.parse_cleanup_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_script_parse_cleanup_timer_post ) { + if (HPMHooks.count.HP_script_parse_cleanup_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -65538,14 +67154,14 @@ int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { uint8 HP_script_add_language(const char *name) { int hIndex = 0; uint8 retVal___ = 0; - if( HPMHooks.count.HP_script_add_language_pre ) { + if (HPMHooks.count.HP_script_add_language_pre > 0) { uint8 (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_language_pre[hIndex].func; retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65553,9 +67169,9 @@ uint8 HP_script_add_language(const char *name) { { retVal___ = HPMHooks.source.script.add_language(name); } - if( HPMHooks.count.HP_script_add_language_post ) { + if (HPMHooks.count.HP_script_add_language_post > 0) { uint8 (*postHookFunc) (uint8 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_language_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -65565,14 +67181,14 @@ uint8 HP_script_add_language(const char *name) { const char* HP_script_get_translation_file_name(const char *file) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_translation_file_name_pre ) { + if (HPMHooks.count.HP_script_get_translation_file_name_pre > 0) { const char* (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_translation_file_name_pre[hIndex].func; retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65580,9 +67196,9 @@ const char* HP_script_get_translation_file_name(const char *file) { { retVal___ = HPMHooks.source.script.get_translation_file_name(file); } - if( HPMHooks.count.HP_script_get_translation_file_name_post ) { + if (HPMHooks.count.HP_script_get_translation_file_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_translation_file_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -65591,14 +67207,14 @@ const char* HP_script_get_translation_file_name(const char *file) { } void HP_script_parser_clean_leftovers(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_parser_clean_leftovers_pre ) { + if (HPMHooks.count.HP_script_parser_clean_leftovers_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65606,9 +67222,9 @@ void HP_script_parser_clean_leftovers(void) { { HPMHooks.source.script.parser_clean_leftovers(); } - if( HPMHooks.count.HP_script_parser_clean_leftovers_post ) { + if (HPMHooks.count.HP_script_parser_clean_leftovers_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_post[hIndex].func; postHookFunc(); } @@ -65617,14 +67233,14 @@ void HP_script_parser_clean_leftovers(void) { } void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_use_script_pre ) { + if (HPMHooks.count.HP_script_run_use_script_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func; preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65632,9 +67248,9 @@ void HP_script_run_use_script(struct map_session_data *sd, struct item_data *dat { HPMHooks.source.script.run_use_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_use_script_post ) { + if (HPMHooks.count.HP_script_run_use_script_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func; postHookFunc(sd, data, oid); } @@ -65643,14 +67259,14 @@ void HP_script_run_use_script(struct map_session_data *sd, struct item_data *dat } void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_equip_script_pre ) { + if (HPMHooks.count.HP_script_run_item_equip_script_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func; preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65658,9 +67274,9 @@ void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_da { HPMHooks.source.script.run_item_equip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_item_equip_script_post ) { + if (HPMHooks.count.HP_script_run_item_equip_script_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func; postHookFunc(sd, data, oid); } @@ -65669,14 +67285,14 @@ void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_da } void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) { + if (HPMHooks.count.HP_script_run_item_unequip_script_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func; preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65684,9 +67300,9 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_ { HPMHooks.source.script.run_item_unequip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_item_unequip_script_post ) { + if (HPMHooks.count.HP_script_run_item_unequip_script_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func; postHookFunc(sd, data, oid); } @@ -65697,14 +67313,14 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_open_pre ) { + if (HPMHooks.count.HP_searchstore_open_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65712,9 +67328,9 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne { retVal___ = HPMHooks.source.searchstore.open(sd, uses, effect); } - if( HPMHooks.count.HP_searchstore_open_post ) { + if (HPMHooks.count.HP_searchstore_open_post > 0) { 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++ ) { + 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); } @@ -65723,14 +67339,14 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne } 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 ) { + if (HPMHooks.count.HP_searchstore_query_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65738,9 +67354,9 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig { HPMHooks.source.searchstore.query(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); } - if( HPMHooks.count.HP_searchstore_query_post ) { + if (HPMHooks.count.HP_searchstore_query_post > 0) { 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++ ) { + 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); } @@ -65750,14 +67366,14 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig bool HP_searchstore_querynext(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_querynext_pre ) { + if (HPMHooks.count.HP_searchstore_querynext_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65765,9 +67381,9 @@ bool HP_searchstore_querynext(struct map_session_data *sd) { { retVal___ = HPMHooks.source.searchstore.querynext(sd); } - if( HPMHooks.count.HP_searchstore_querynext_post ) { + if (HPMHooks.count.HP_searchstore_querynext_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -65776,14 +67392,14 @@ bool HP_searchstore_querynext(struct map_session_data *sd) { } void HP_searchstore_next(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_next_pre ) { + if (HPMHooks.count.HP_searchstore_next_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65791,9 +67407,9 @@ void HP_searchstore_next(struct map_session_data *sd) { { HPMHooks.source.searchstore.next(sd); } - if( HPMHooks.count.HP_searchstore_next_post ) { + if (HPMHooks.count.HP_searchstore_next_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func; postHookFunc(sd); } @@ -65802,14 +67418,14 @@ void HP_searchstore_next(struct map_session_data *sd) { } void HP_searchstore_clear(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_clear_pre ) { + if (HPMHooks.count.HP_searchstore_clear_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65817,9 +67433,9 @@ void HP_searchstore_clear(struct map_session_data *sd) { { HPMHooks.source.searchstore.clear(sd); } - if( HPMHooks.count.HP_searchstore_clear_post ) { + if (HPMHooks.count.HP_searchstore_clear_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func; postHookFunc(sd); } @@ -65828,14 +67444,14 @@ void HP_searchstore_clear(struct map_session_data *sd) { } void HP_searchstore_close(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_close_pre ) { + if (HPMHooks.count.HP_searchstore_close_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65843,9 +67459,9 @@ void HP_searchstore_close(struct map_session_data *sd) { { HPMHooks.source.searchstore.close(sd); } - if( HPMHooks.count.HP_searchstore_close_post ) { + if (HPMHooks.count.HP_searchstore_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_close_post[hIndex].func; postHookFunc(sd); } @@ -65854,14 +67470,14 @@ void HP_searchstore_close(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_searchstore_click_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *store_id, unsigned short *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65869,9 +67485,9 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store { HPMHooks.source.searchstore.click(sd, account_id, store_id, nameid); } - if( HPMHooks.count.HP_searchstore_click_post ) { + if (HPMHooks.count.HP_searchstore_click_post > 0) { 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++ ) { + 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); } @@ -65881,14 +67497,14 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_queryremote_pre ) { + if (HPMHooks.count.HP_searchstore_queryremote_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65896,9 +67512,9 @@ bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { { retVal___ = HPMHooks.source.searchstore.queryremote(sd, account_id); } - if( HPMHooks.count.HP_searchstore_queryremote_post ) { + if (HPMHooks.count.HP_searchstore_queryremote_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_post; hIndex++ ) { + 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); } @@ -65907,14 +67523,14 @@ bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { } void HP_searchstore_clearremote(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_searchstore_clearremote_pre ) { + if (HPMHooks.count.HP_searchstore_clearremote_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65922,9 +67538,9 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { { HPMHooks.source.searchstore.clearremote(sd); } - if( HPMHooks.count.HP_searchstore_clearremote_post ) { + if (HPMHooks.count.HP_searchstore_clearremote_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_clearremote_post[hIndex].func; postHookFunc(sd); } @@ -65934,14 +67550,14 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { 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___ = false; - if( HPMHooks.count.HP_searchstore_result_pre ) { + if (HPMHooks.count.HP_searchstore_result_pre > 0) { 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65949,9 +67565,9 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i { retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine); } - if( HPMHooks.count.HP_searchstore_result_post ) { + if (HPMHooks.count.HP_searchstore_result_post > 0) { 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++ ) { + 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); } @@ -65961,14 +67577,14 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i /* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -65976,9 +67592,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -65987,14 +67603,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -66002,9 +67618,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -66013,14 +67629,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -66028,9 +67644,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -66040,16 +67656,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66059,9 +67675,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -66074,14 +67690,14 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { int HP_skill_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_init_pre ) { + if (HPMHooks.count.HP_skill_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66089,9 +67705,9 @@ int HP_skill_init(bool minimal) { { retVal___ = HPMHooks.source.skill.init(minimal); } - if( HPMHooks.count.HP_skill_init_post ) { + if (HPMHooks.count.HP_skill_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -66101,14 +67717,14 @@ int HP_skill_init(bool minimal) { int HP_skill_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_final_pre ) { + if (HPMHooks.count.HP_skill_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66116,9 +67732,9 @@ int HP_skill_final(void) { { retVal___ = HPMHooks.source.skill.final(); } - if( HPMHooks.count.HP_skill_final_post ) { + if (HPMHooks.count.HP_skill_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -66127,14 +67743,14 @@ int HP_skill_final(void) { } void HP_skill_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_skill_reload_pre ) { + if (HPMHooks.count.HP_skill_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -66142,9 +67758,9 @@ void HP_skill_reload(void) { { HPMHooks.source.skill.reload(); } - if( HPMHooks.count.HP_skill_reload_post ) { + if (HPMHooks.count.HP_skill_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func; postHookFunc(); } @@ -66153,14 +67769,14 @@ void HP_skill_reload(void) { } void HP_skill_read_db(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_skill_read_db_pre ) { + if (HPMHooks.count.HP_skill_read_db_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -66168,9 +67784,9 @@ void HP_skill_read_db(bool minimal) { { HPMHooks.source.skill.read_db(minimal); } - if( HPMHooks.count.HP_skill_read_db_post ) { + if (HPMHooks.count.HP_skill_read_db_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func; postHookFunc(minimal); } @@ -66180,14 +67796,14 @@ void HP_skill_read_db(bool minimal) { int HP_skill_get_index(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_index_pre ) { + if (HPMHooks.count.HP_skill_get_index_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66195,9 +67811,9 @@ int HP_skill_get_index(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_index(skill_id); } - if( HPMHooks.count.HP_skill_get_index_post ) { + if (HPMHooks.count.HP_skill_get_index_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_post; hIndex++ ) { + 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); } @@ -66207,14 +67823,14 @@ int HP_skill_get_index(uint16 skill_id) { int HP_skill_get_type(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_type_pre ) { + if (HPMHooks.count.HP_skill_get_type_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66222,9 +67838,9 @@ int HP_skill_get_type(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_type(skill_id); } - if( HPMHooks.count.HP_skill_get_type_post ) { + if (HPMHooks.count.HP_skill_get_type_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_post; hIndex++ ) { + 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); } @@ -66234,14 +67850,14 @@ int HP_skill_get_type(uint16 skill_id) { int HP_skill_get_hit(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hit_pre ) { + if (HPMHooks.count.HP_skill_get_hit_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66249,9 +67865,9 @@ int HP_skill_get_hit(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_hit(skill_id); } - if( HPMHooks.count.HP_skill_get_hit_post ) { + if (HPMHooks.count.HP_skill_get_hit_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_post; hIndex++ ) { + 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); } @@ -66261,14 +67877,14 @@ int HP_skill_get_hit(uint16 skill_id) { int HP_skill_get_inf(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf_pre ) { + if (HPMHooks.count.HP_skill_get_inf_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66276,9 +67892,9 @@ int HP_skill_get_inf(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_inf(skill_id); } - if( HPMHooks.count.HP_skill_get_inf_post ) { + if (HPMHooks.count.HP_skill_get_inf_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_post; hIndex++ ) { + 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); } @@ -66288,14 +67904,14 @@ int HP_skill_get_inf(uint16 skill_id) { int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ele_pre ) { + if (HPMHooks.count.HP_skill_get_ele_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66303,9 +67919,9 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_ele(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_ele_post ) { + if (HPMHooks.count.HP_skill_get_ele_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_post; hIndex++ ) { + 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); } @@ -66315,14 +67931,14 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_nk(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_nk_pre ) { + if (HPMHooks.count.HP_skill_get_nk_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66330,9 +67946,9 @@ int HP_skill_get_nk(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_nk(skill_id); } - if( HPMHooks.count.HP_skill_get_nk_post ) { + if (HPMHooks.count.HP_skill_get_nk_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_post; hIndex++ ) { + 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); } @@ -66342,14 +67958,14 @@ int HP_skill_get_nk(uint16 skill_id) { int HP_skill_get_max(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_max_pre ) { + if (HPMHooks.count.HP_skill_get_max_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66357,9 +67973,9 @@ int HP_skill_get_max(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_max(skill_id); } - if( HPMHooks.count.HP_skill_get_max_post ) { + if (HPMHooks.count.HP_skill_get_max_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_post; hIndex++ ) { + 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); } @@ -66369,14 +67985,14 @@ int HP_skill_get_max(uint16 skill_id) { int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range_pre ) { + if (HPMHooks.count.HP_skill_get_range_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66384,9 +68000,9 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_range(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_range_post ) { + if (HPMHooks.count.HP_skill_get_range_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_post; hIndex++ ) { + 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); } @@ -66396,14 +68012,14 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range2_pre ) { + if (HPMHooks.count.HP_skill_get_range2_pre > 0) { int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66411,9 +68027,9 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { retVal___ = HPMHooks.source.skill.get_range2(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_range2_post ) { + if (HPMHooks.count.HP_skill_get_range2_post > 0) { 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++ ) { + 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); } @@ -66423,14 +68039,14 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_splash_pre ) { + if (HPMHooks.count.HP_skill_get_splash_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66438,9 +68054,9 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_splash(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_splash_post ) { + if (HPMHooks.count.HP_skill_get_splash_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_post; hIndex++ ) { + 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); } @@ -66450,14 +68066,14 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hp_pre ) { + if (HPMHooks.count.HP_skill_get_hp_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66465,9 +68081,9 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_hp(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_hp_post ) { + if (HPMHooks.count.HP_skill_get_hp_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_post; hIndex++ ) { + 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); } @@ -66477,14 +68093,14 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_mhp_pre ) { + if (HPMHooks.count.HP_skill_get_mhp_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66492,9 +68108,9 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_mhp(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_mhp_post ) { + if (HPMHooks.count.HP_skill_get_mhp_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_post; hIndex++ ) { + 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); } @@ -66504,14 +68120,14 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_sp_pre ) { + if (HPMHooks.count.HP_skill_get_sp_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66519,9 +68135,9 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_sp(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_sp_post ) { + if (HPMHooks.count.HP_skill_get_sp_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_post; hIndex++ ) { + 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); } @@ -66531,14 +68147,14 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_state(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_state_pre ) { + if (HPMHooks.count.HP_skill_get_state_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66546,9 +68162,9 @@ int HP_skill_get_state(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_state(skill_id); } - if( HPMHooks.count.HP_skill_get_state_post ) { + if (HPMHooks.count.HP_skill_get_state_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_post; hIndex++ ) { + 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); } @@ -66558,14 +68174,14 @@ int HP_skill_get_state(uint16 skill_id) { int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_spiritball_pre ) { + if (HPMHooks.count.HP_skill_get_spiritball_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66573,9 +68189,9 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_spiritball(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_spiritball_post ) { + if (HPMHooks.count.HP_skill_get_spiritball_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_post; hIndex++ ) { + 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); } @@ -66585,14 +68201,14 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_zeny_pre ) { + if (HPMHooks.count.HP_skill_get_zeny_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66600,9 +68216,9 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_zeny(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_zeny_post ) { + if (HPMHooks.count.HP_skill_get_zeny_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_post; hIndex++ ) { + 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); } @@ -66612,14 +68228,14 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_num_pre ) { + if (HPMHooks.count.HP_skill_get_num_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66627,9 +68243,9 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_num(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_num_post ) { + if (HPMHooks.count.HP_skill_get_num_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_post; hIndex++ ) { + 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); } @@ -66639,14 +68255,14 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cast_pre ) { + if (HPMHooks.count.HP_skill_get_cast_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66654,9 +68270,9 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_cast(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_cast_post ) { + if (HPMHooks.count.HP_skill_get_cast_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_post; hIndex++ ) { + 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); } @@ -66666,14 +68282,14 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delay_pre ) { + if (HPMHooks.count.HP_skill_get_delay_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66681,9 +68297,9 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_delay(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_delay_post ) { + if (HPMHooks.count.HP_skill_get_delay_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_post; hIndex++ ) { + 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); } @@ -66693,14 +68309,14 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_walkdelay_pre ) { + if (HPMHooks.count.HP_skill_get_walkdelay_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66708,9 +68324,9 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_walkdelay(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_walkdelay_post ) { + if (HPMHooks.count.HP_skill_get_walkdelay_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_post; hIndex++ ) { + 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); } @@ -66720,14 +68336,14 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time_pre ) { + if (HPMHooks.count.HP_skill_get_time_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66735,9 +68351,9 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_time(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_time_post ) { + if (HPMHooks.count.HP_skill_get_time_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_post; hIndex++ ) { + 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); } @@ -66747,14 +68363,14 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time2_pre ) { + if (HPMHooks.count.HP_skill_get_time2_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66762,9 +68378,9 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_time2(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_time2_post ) { + if (HPMHooks.count.HP_skill_get_time2_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_post; hIndex++ ) { + 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); } @@ -66774,14 +68390,14 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castnodex_pre ) { + if (HPMHooks.count.HP_skill_get_castnodex_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66789,9 +68405,9 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_castnodex(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_castnodex_post ) { + if (HPMHooks.count.HP_skill_get_castnodex_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_post; hIndex++ ) { + 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); } @@ -66801,14 +68417,14 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delaynodex_pre ) { + if (HPMHooks.count.HP_skill_get_delaynodex_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66816,9 +68432,9 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_delaynodex(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_delaynodex_post ) { + if (HPMHooks.count.HP_skill_get_delaynodex_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_post; hIndex++ ) { + 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); } @@ -66828,14 +68444,14 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_castdef(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castdef_pre ) { + if (HPMHooks.count.HP_skill_get_castdef_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66843,9 +68459,9 @@ int HP_skill_get_castdef(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_castdef(skill_id); } - if( HPMHooks.count.HP_skill_get_castdef_post ) { + if (HPMHooks.count.HP_skill_get_castdef_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_post; hIndex++ ) { + 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); } @@ -66855,14 +68471,14 @@ int HP_skill_get_castdef(uint16 skill_id) { int HP_skill_get_weapontype(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_weapontype_pre ) { + if (HPMHooks.count.HP_skill_get_weapontype_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66870,9 +68486,9 @@ int HP_skill_get_weapontype(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_weapontype(skill_id); } - if( HPMHooks.count.HP_skill_get_weapontype_post ) { + if (HPMHooks.count.HP_skill_get_weapontype_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_post; hIndex++ ) { + 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); } @@ -66882,14 +68498,14 @@ int HP_skill_get_weapontype(uint16 skill_id) { int HP_skill_get_ammotype(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammotype_pre ) { + if (HPMHooks.count.HP_skill_get_ammotype_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66897,9 +68513,9 @@ int HP_skill_get_ammotype(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_ammotype(skill_id); } - if( HPMHooks.count.HP_skill_get_ammotype_post ) { + if (HPMHooks.count.HP_skill_get_ammotype_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_post; hIndex++ ) { + 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); } @@ -66909,14 +68525,14 @@ int HP_skill_get_ammotype(uint16 skill_id) { int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) { + if (HPMHooks.count.HP_skill_get_ammo_qty_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66924,9 +68540,9 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_ammo_qty(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_ammo_qty_post ) { + if (HPMHooks.count.HP_skill_get_ammo_qty_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_post; hIndex++ ) { + 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); } @@ -66936,14 +68552,14 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_unit_id(uint16 skill_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_id_pre ) { + if (HPMHooks.count.HP_skill_get_unit_id_pre > 0) { int (*preHookFunc) (uint16 *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66951,9 +68567,9 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) { { retVal___ = HPMHooks.source.skill.get_unit_id(skill_id, flag); } - if( HPMHooks.count.HP_skill_get_unit_id_post ) { + if (HPMHooks.count.HP_skill_get_unit_id_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_post; hIndex++ ) { + 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); } @@ -66963,14 +68579,14 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) { int HP_skill_get_inf2(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf2_pre ) { + if (HPMHooks.count.HP_skill_get_inf2_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66978,9 +68594,9 @@ int HP_skill_get_inf2(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_inf2(skill_id); } - if( HPMHooks.count.HP_skill_get_inf2_post ) { + if (HPMHooks.count.HP_skill_get_inf2_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_post; hIndex++ ) { + 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); } @@ -66990,14 +68606,14 @@ int HP_skill_get_inf2(uint16 skill_id) { int HP_skill_get_castcancel(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castcancel_pre ) { + if (HPMHooks.count.HP_skill_get_castcancel_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67005,9 +68621,9 @@ int HP_skill_get_castcancel(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_castcancel(skill_id); } - if( HPMHooks.count.HP_skill_get_castcancel_post ) { + if (HPMHooks.count.HP_skill_get_castcancel_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_post; hIndex++ ) { + 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); } @@ -67017,14 +68633,14 @@ int HP_skill_get_castcancel(uint16 skill_id) { int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_maxcount_pre ) { + if (HPMHooks.count.HP_skill_get_maxcount_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67032,9 +68648,9 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_maxcount(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_maxcount_post ) { + if (HPMHooks.count.HP_skill_get_maxcount_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_post; hIndex++ ) { + 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); } @@ -67044,14 +68660,14 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_blewcount_pre ) { + if (HPMHooks.count.HP_skill_get_blewcount_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67059,9 +68675,9 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_blewcount(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_blewcount_post ) { + if (HPMHooks.count.HP_skill_get_blewcount_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_post; hIndex++ ) { + 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); } @@ -67071,14 +68687,14 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_unit_flag(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_flag_pre ) { + if (HPMHooks.count.HP_skill_get_unit_flag_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67086,9 +68702,9 @@ int HP_skill_get_unit_flag(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_unit_flag(skill_id); } - if( HPMHooks.count.HP_skill_get_unit_flag_post ) { + if (HPMHooks.count.HP_skill_get_unit_flag_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_post; hIndex++ ) { + 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); } @@ -67098,14 +68714,14 @@ int HP_skill_get_unit_flag(uint16 skill_id) { int HP_skill_get_unit_target(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_target_pre ) { + if (HPMHooks.count.HP_skill_get_unit_target_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67113,9 +68729,9 @@ int HP_skill_get_unit_target(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_unit_target(skill_id); } - if( HPMHooks.count.HP_skill_get_unit_target_post ) { + if (HPMHooks.count.HP_skill_get_unit_target_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_post; hIndex++ ) { + 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); } @@ -67125,14 +68741,14 @@ int HP_skill_get_unit_target(uint16 skill_id) { int HP_skill_get_unit_interval(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_interval_pre ) { + if (HPMHooks.count.HP_skill_get_unit_interval_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67140,9 +68756,9 @@ int HP_skill_get_unit_interval(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_unit_interval(skill_id); } - if( HPMHooks.count.HP_skill_get_unit_interval_post ) { + if (HPMHooks.count.HP_skill_get_unit_interval_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_post; hIndex++ ) { + 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); } @@ -67152,14 +68768,14 @@ int HP_skill_get_unit_interval(uint16 skill_id) { int HP_skill_get_unit_bl_target(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) { + if (HPMHooks.count.HP_skill_get_unit_bl_target_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67167,9 +68783,9 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_unit_bl_target(skill_id); } - if( HPMHooks.count.HP_skill_get_unit_bl_target_post ) { + if (HPMHooks.count.HP_skill_get_unit_bl_target_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_post; hIndex++ ) { + 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); } @@ -67179,14 +68795,14 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) { int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) { + if (HPMHooks.count.HP_skill_get_unit_layout_type_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67194,9 +68810,9 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_unit_layout_type(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_unit_layout_type_post ) { + if (HPMHooks.count.HP_skill_get_unit_layout_type_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_post; hIndex++ ) { + 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); } @@ -67206,14 +68822,14 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_range_pre ) { + if (HPMHooks.count.HP_skill_get_unit_range_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67221,9 +68837,9 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_unit_range(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_unit_range_post ) { + if (HPMHooks.count.HP_skill_get_unit_range_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_post; hIndex++ ) { + 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); } @@ -67233,14 +68849,14 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cooldown_pre ) { + if (HPMHooks.count.HP_skill_get_cooldown_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67248,38 +68864,38 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_cooldown(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_cooldown_post ) { + if (HPMHooks.count.HP_skill_get_cooldown_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_post; hIndex++ ) { + 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 HP_skill_tree_get_max(uint16 skill_id, int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_tree_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *b_class); + if (HPMHooks.count.HP_skill_tree_get_max_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class); + retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, 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++ ) { + if (HPMHooks.count.HP_skill_tree_get_max_post > 0) { + int (*postHookFunc) (int retVal___, uint16 skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, class); } } return retVal___; @@ -67287,14 +68903,14 @@ int HP_skill_tree_get_max(uint16 skill_id, int b_class) { const char* HP_skill_get_name(uint16 skill_id) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_name_pre ) { + if (HPMHooks.count.HP_skill_get_name_pre > 0) { const char* (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67302,9 +68918,9 @@ const char* HP_skill_get_name(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_name(skill_id); } - if( HPMHooks.count.HP_skill_get_name_post ) { + if (HPMHooks.count.HP_skill_get_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_post; hIndex++ ) { + 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); } @@ -67314,14 +68930,14 @@ const char* HP_skill_get_name(uint16 skill_id) { const char* HP_skill_get_desc(uint16 skill_id) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_desc_pre ) { + if (HPMHooks.count.HP_skill_get_desc_pre > 0) { const char* (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67329,9 +68945,9 @@ const char* HP_skill_get_desc(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_desc(skill_id); } - if( HPMHooks.count.HP_skill_get_desc_post ) { + if (HPMHooks.count.HP_skill_get_desc_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_post; hIndex++ ) { + 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); } @@ -67340,14 +68956,14 @@ const char* HP_skill_get_desc(uint16 skill_id) { } void HP_skill_chk(uint16 *skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_skill_chk_pre ) { + if (HPMHooks.count.HP_skill_chk_pre > 0) { void (*preHookFunc) (uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67355,9 +68971,9 @@ void HP_skill_chk(uint16 *skill_id) { { HPMHooks.source.skill.chk(skill_id); } - if( HPMHooks.count.HP_skill_chk_post ) { + if (HPMHooks.count.HP_skill_chk_post > 0) { void (*postHookFunc) (uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_chk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_chk_post[hIndex].func; postHookFunc(skill_id); } @@ -67367,14 +68983,14 @@ void HP_skill_chk(uint16 *skill_id) { int HP_skill_get_casttype(uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype_pre ) { + if (HPMHooks.count.HP_skill_get_casttype_pre > 0) { int (*preHookFunc) (uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67382,9 +68998,9 @@ int HP_skill_get_casttype(uint16 skill_id) { { retVal___ = HPMHooks.source.skill.get_casttype(skill_id); } - if( HPMHooks.count.HP_skill_get_casttype_post ) { + if (HPMHooks.count.HP_skill_get_casttype_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_post; hIndex++ ) { + 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); } @@ -67394,14 +69010,14 @@ int HP_skill_get_casttype(uint16 skill_id) { int HP_skill_get_casttype2(uint16 index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype2_pre ) { + if (HPMHooks.count.HP_skill_get_casttype2_pre > 0) { int (*preHookFunc) (uint16 *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67409,9 +69025,9 @@ int HP_skill_get_casttype2(uint16 index) { { retVal___ = HPMHooks.source.skill.get_casttype2(index); } - if( HPMHooks.count.HP_skill_get_casttype2_post ) { + if (HPMHooks.count.HP_skill_get_casttype2_post > 0) { int (*postHookFunc) (int retVal___, uint16 index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_post; hIndex++ ) { + 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); } @@ -67421,14 +69037,14 @@ int HP_skill_get_casttype2(uint16 index) { bool HP_skill_is_combo(int skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_is_combo_pre ) { + if (HPMHooks.count.HP_skill_is_combo_pre > 0) { bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func; retVal___ = preHookFunc(&skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67436,9 +69052,9 @@ bool HP_skill_is_combo(int skill_id) { { retVal___ = HPMHooks.source.skill.is_combo(skill_id); } - if( HPMHooks.count.HP_skill_is_combo_post ) { + if (HPMHooks.count.HP_skill_is_combo_post > 0) { bool (*postHookFunc) (bool retVal___, int skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_is_combo_post[hIndex].func; retVal___ = postHookFunc(retVal___, skill_id); } @@ -67448,14 +69064,14 @@ bool HP_skill_is_combo(int skill_id) { int HP_skill_name2id(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_name2id_pre ) { + if (HPMHooks.count.HP_skill_name2id_pre > 0) { int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67463,9 +69079,9 @@ int HP_skill_name2id(const char *name) { { retVal___ = HPMHooks.source.skill.name2id(name); } - if( HPMHooks.count.HP_skill_name2id_post ) { + if (HPMHooks.count.HP_skill_name2id_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -67475,14 +69091,14 @@ int HP_skill_name2id(const char *name) { int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_isammotype_pre ) { + if (HPMHooks.count.HP_skill_isammotype_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67490,9 +69106,9 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { { retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id); } - if( HPMHooks.count.HP_skill_isammotype_post ) { + if (HPMHooks.count.HP_skill_isammotype_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { + 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_id); } @@ -67502,14 +69118,14 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_id_pre ) { + if (HPMHooks.count.HP_skill_castend_id_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67517,9 +69133,9 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_castend_id_post ) { + if (HPMHooks.count.HP_skill_castend_id_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) { + 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); } @@ -67529,14 +69145,14 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos_pre ) { + if (HPMHooks.count.HP_skill_castend_pos_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67544,9 +69160,9 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_castend_pos_post ) { + if (HPMHooks.count.HP_skill_castend_pos_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) { + 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); } @@ -67556,14 +69172,14 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_map_pre ) { + if (HPMHooks.count.HP_skill_castend_map_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67571,9 +69187,9 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha { retVal___ = HPMHooks.source.skill.castend_map(sd, skill_id, mapname); } - if( HPMHooks.count.HP_skill_castend_map_post ) { + if (HPMHooks.count.HP_skill_castend_map_post > 0) { 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++ ) { + 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); } @@ -67583,14 +69199,14 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha int HP_skill_cleartimerskill(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cleartimerskill_pre ) { + if (HPMHooks.count.HP_skill_cleartimerskill_pre > 0) { int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67598,9 +69214,9 @@ int HP_skill_cleartimerskill(struct block_list *src) { { retVal___ = HPMHooks.source.skill.cleartimerskill(src); } - if( HPMHooks.count.HP_skill_cleartimerskill_post ) { + if (HPMHooks.count.HP_skill_cleartimerskill_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, src); } @@ -67610,14 +69226,14 @@ int HP_skill_cleartimerskill(struct block_list *src) { int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_addtimerskill_pre ) { + if (HPMHooks.count.HP_skill_addtimerskill_pre > 0) { int (*preHookFunc) (struct block_list **src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67625,9 +69241,9 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x { retVal___ = HPMHooks.source.skill.addtimerskill(src, tick, target, x, y, skill_id, skill_lv, type, flag); } - if( HPMHooks.count.HP_skill_addtimerskill_post ) { + if (HPMHooks.count.HP_skill_addtimerskill_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, int64 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++ ) { + 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); } @@ -67637,14 +69253,14 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x 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, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_additional_effect_pre ) { + if (HPMHooks.count.HP_skill_additional_effect_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67652,9 +69268,9 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui { 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 ) { + if (HPMHooks.count.HP_skill_additional_effect_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) { + 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); } @@ -67664,14 +69280,14 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_counter_additional_effect_pre ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67679,9 +69295,9 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list { 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 ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) { + 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); } @@ -67691,14 +69307,14 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blown_pre ) { + if (HPMHooks.count.HP_skill_blown_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, int8 *dir, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67706,9 +69322,9 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, { retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag); } - if( HPMHooks.count.HP_skill_blown_post ) { + if (HPMHooks.count.HP_skill_blown_post > 0) { 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++ ) { + 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); } @@ -67718,14 +69334,14 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_break_equip_pre ) { + if (HPMHooks.count.HP_skill_break_equip_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned short *where, int *rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67733,9 +69349,9 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, { retVal___ = HPMHooks.source.skill.break_equip(bl, where, rate, flag); } - if( HPMHooks.count.HP_skill_break_equip_post ) { + if (HPMHooks.count.HP_skill_break_equip_post > 0) { 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++ ) { + 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); } @@ -67745,14 +69361,14 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_strip_equip_pre ) { + if (HPMHooks.count.HP_skill_strip_equip_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned short *where, int *rate, int *lv, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67760,9 +69376,9 @@ int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, { retVal___ = HPMHooks.source.skill.strip_equip(bl, where, rate, lv, time); } - if( HPMHooks.count.HP_skill_strip_equip_post ) { + if (HPMHooks.count.HP_skill_strip_equip_post > 0) { 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++ ) { + 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); } @@ -67772,14 +69388,14 @@ int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, 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 ) { + if (HPMHooks.count.HP_skill_id2group_pre > 0) { struct skill_unit_group* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67787,9 +69403,9 @@ struct skill_unit_group* HP_skill_id2group(int group_id) { { retVal___ = HPMHooks.source.skill.id2group(group_id); } - if( HPMHooks.count.HP_skill_id2group_post ) { + if (HPMHooks.count.HP_skill_id2group_post > 0) { struct skill_unit_group* (*postHookFunc) (struct skill_unit_group* retVal___, int group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_post; hIndex++ ) { + 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); } @@ -67799,14 +69415,14 @@ struct skill_unit_group* HP_skill_id2group(int group_id) { 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 ) { + if (HPMHooks.count.HP_skill_unitsetting_pre > 0) { struct skill_unit_group* (*preHookFunc) (struct block_list **src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67814,9 +69430,9 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski { retVal___ = HPMHooks.source.skill.unitsetting(src, skill_id, skill_lv, x, y, flag); } - if( HPMHooks.count.HP_skill_unitsetting_post ) { + if (HPMHooks.count.HP_skill_unitsetting_post > 0) { 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++ ) { + 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); } @@ -67826,14 +69442,14 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski 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 ) { + if (HPMHooks.count.HP_skill_initunit_pre > 0) { struct skill_unit* (*preHookFunc) (struct skill_unit_group **group, int *idx, int *x, int *y, int *val1, int *val2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67841,9 +69457,9 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in { retVal___ = HPMHooks.source.skill.initunit(group, idx, x, y, val1, val2); } - if( HPMHooks.count.HP_skill_initunit_post ) { + if (HPMHooks.count.HP_skill_initunit_post > 0) { 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++ ) { + 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); } @@ -67853,14 +69469,14 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in int HP_skill_delunit(struct skill_unit *su) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_delunit_pre ) { + if (HPMHooks.count.HP_skill_delunit_pre > 0) { int (*preHookFunc) (struct skill_unit **su); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67868,9 +69484,9 @@ int HP_skill_delunit(struct skill_unit *su) { { retVal___ = HPMHooks.source.skill.delunit(su); } - if( HPMHooks.count.HP_skill_delunit_post ) { + if (HPMHooks.count.HP_skill_delunit_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *su); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func; retVal___ = postHookFunc(retVal___, su); } @@ -67880,14 +69496,14 @@ int HP_skill_delunit(struct skill_unit *su) { 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 ) { + if (HPMHooks.count.HP_skill_init_unitgroup_pre > 0) { struct skill_unit_group* (*preHookFunc) (struct block_list **src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67895,9 +69511,9 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou { retVal___ = HPMHooks.source.skill.init_unitgroup(src, count, skill_id, skill_lv, unit_id, limit, interval); } - if( HPMHooks.count.HP_skill_init_unitgroup_post ) { + if (HPMHooks.count.HP_skill_init_unitgroup_post > 0) { 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++ ) { + 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); } @@ -67907,14 +69523,14 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_del_unitgroup_pre ) { + if (HPMHooks.count.HP_skill_del_unitgroup_pre > 0) { int (*preHookFunc) (struct skill_unit_group **group, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67922,9 +69538,9 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int { retVal___ = HPMHooks.source.skill.del_unitgroup(group, file, line, func); } - if( HPMHooks.count.HP_skill_del_unitgroup_post ) { + if (HPMHooks.count.HP_skill_del_unitgroup_post > 0) { 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++ ) { + 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); } @@ -67934,14 +69550,14 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int int HP_skill_clear_unitgroup(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) { + if (HPMHooks.count.HP_skill_clear_unitgroup_pre > 0) { int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67949,9 +69565,9 @@ int HP_skill_clear_unitgroup(struct block_list *src) { { retVal___ = HPMHooks.source.skill.clear_unitgroup(src); } - if( HPMHooks.count.HP_skill_clear_unitgroup_post ) { + if (HPMHooks.count.HP_skill_clear_unitgroup_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) { + 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); } @@ -67961,14 +69577,14 @@ int HP_skill_clear_unitgroup(struct block_list *src) { int HP_skill_clear_group(struct block_list *bl, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_group_pre ) { + if (HPMHooks.count.HP_skill_clear_group_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67976,9 +69592,9 @@ int HP_skill_clear_group(struct block_list *bl, int flag) { { retVal___ = HPMHooks.source.skill.clear_group(bl, flag); } - if( HPMHooks.count.HP_skill_clear_group_post ) { + if (HPMHooks.count.HP_skill_clear_group_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_post; hIndex++ ) { + 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); } @@ -67988,14 +69604,14 @@ int HP_skill_clear_group(struct block_list *bl, int flag) { int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_pre ) { + if (HPMHooks.count.HP_skill_unit_onplace_pre > 0) { int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68003,9 +69619,9 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t { retVal___ = HPMHooks.source.skill.unit_onplace(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onplace_post ) { + if (HPMHooks.count.HP_skill_unit_onplace_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) { + 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); } @@ -68015,14 +69631,14 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) { + if (HPMHooks.count.HP_skill_unit_ondamaged_pre > 0) { int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *damage, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68030,9 +69646,9 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 { retVal___ = HPMHooks.source.skill.unit_ondamaged(src, bl, damage, tick); } - if( HPMHooks.count.HP_skill_unit_ondamaged_post ) { + if (HPMHooks.count.HP_skill_unit_ondamaged_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) { + 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); } @@ -68042,14 +69658,14 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_pre ) { + if (HPMHooks.count.HP_skill_cast_fix_pre > 0) { int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68057,9 +69673,9 @@ int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.cast_fix(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_cast_fix_post ) { + if (HPMHooks.count.HP_skill_cast_fix_post > 0) { 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++ ) { + 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); } @@ -68069,14 +69685,14 @@ int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int HP_skill_cast_fix_sc(struct block_list *bl, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) { + if (HPMHooks.count.HP_skill_cast_fix_sc_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68084,9 +69700,9 @@ int HP_skill_cast_fix_sc(struct block_list *bl, int time) { { retVal___ = HPMHooks.source.skill.cast_fix_sc(bl, time); } - if( HPMHooks.count.HP_skill_cast_fix_sc_post ) { + if (HPMHooks.count.HP_skill_cast_fix_sc_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_post; hIndex++ ) { + 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); } @@ -68096,14 +69712,14 @@ int HP_skill_cast_fix_sc(struct block_list *bl, int time) { int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) { + if (HPMHooks.count.HP_skill_vf_cast_fix_pre > 0) { int (*preHookFunc) (struct block_list **bl, double *time, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68111,9 +69727,9 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui { retVal___ = HPMHooks.source.skill.vf_cast_fix(bl, time, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_vf_cast_fix_post ) { + if (HPMHooks.count.HP_skill_vf_cast_fix_post > 0) { 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++ ) { + 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); } @@ -68123,14 +69739,14 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_delay_fix_pre ) { + if (HPMHooks.count.HP_skill_delay_fix_pre > 0) { int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68138,9 +69754,9 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { retVal___ = HPMHooks.source.skill.delay_fix(bl, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_delay_fix_post ) { + if (HPMHooks.count.HP_skill_delay_fix_post > 0) { 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++ ) { + 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); } @@ -68150,14 +69766,14 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68165,9 +69781,9 @@ int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill { retVal___ = HPMHooks.source.skill.check_condition_castbegin(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_post > 0) { 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++ ) { + 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); } @@ -68177,14 +69793,14 @@ int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castend_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68192,9 +69808,9 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i { retVal___ = HPMHooks.source.skill.check_condition_castend(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_condition_castend_post ) { + if (HPMHooks.count.HP_skill_check_condition_castend_post > 0) { 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++ ) { + 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); } @@ -68204,14 +69820,14 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_consume_requirement_pre ) { + if (HPMHooks.count.HP_skill_consume_requirement_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68219,9 +69835,9 @@ int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, u { retVal___ = HPMHooks.source.skill.consume_requirement(sd, skill_id, skill_lv, type); } - if( HPMHooks.count.HP_skill_consume_requirement_post ) { + if (HPMHooks.count.HP_skill_consume_requirement_post > 0) { 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++ ) { + 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); } @@ -68231,14 +69847,14 @@ int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, u 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___ = { 0 }; - if( HPMHooks.count.HP_skill_get_requirement_pre ) { + if (HPMHooks.count.HP_skill_get_requirement_pre > 0) { struct skill_condition (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68246,9 +69862,9 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin { retVal___ = HPMHooks.source.skill.get_requirement(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_requirement_post ) { + if (HPMHooks.count.HP_skill_get_requirement_post > 0) { 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++ ) { + 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); } @@ -68258,14 +69874,14 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin 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___ = 0; - if( HPMHooks.count.HP_skill_check_pc_partner_pre ) { + if (HPMHooks.count.HP_skill_check_pc_partner_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 **skill_lv, int *range, int *cast_flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68273,9 +69889,9 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint { retVal___ = HPMHooks.source.skill.check_pc_partner(sd, skill_id, skill_lv, range, cast_flag); } - if( HPMHooks.count.HP_skill_check_pc_partner_post ) { + if (HPMHooks.count.HP_skill_check_pc_partner_post > 0) { 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++ ) { + 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); } @@ -68285,14 +69901,14 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_pre ) { + if (HPMHooks.count.HP_skill_unit_move_pre > 0) { int (*preHookFunc) (struct block_list **bl, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68300,9 +69916,9 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { { retVal___ = HPMHooks.source.skill.unit_move(bl, tick, flag); } - if( HPMHooks.count.HP_skill_unit_move_post ) { + if (HPMHooks.count.HP_skill_unit_move_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) { + 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); } @@ -68312,14 +69928,14 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onleft_pre ) { + if (HPMHooks.count.HP_skill_unit_onleft_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68327,9 +69943,9 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { { retVal___ = HPMHooks.source.skill.unit_onleft(skill_id, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onleft_post ) { + if (HPMHooks.count.HP_skill_unit_onleft_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct block_list *bl, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) { + 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); } @@ -68339,14 +69955,14 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onout_pre ) { + if (HPMHooks.count.HP_skill_unit_onout_pre > 0) { int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68354,9 +69970,9 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tic { retVal___ = HPMHooks.source.skill.unit_onout(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onout_post ) { + if (HPMHooks.count.HP_skill_unit_onout_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) { + 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); } @@ -68366,14 +69982,14 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tic int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) { + if (HPMHooks.count.HP_skill_unit_move_unit_group_pre > 0) { int (*preHookFunc) (struct skill_unit_group **group, int16 *m, int16 *dx, int16 *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68381,9 +69997,9 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 { retVal___ = HPMHooks.source.skill.unit_move_unit_group(group, m, dx, dy); } - if( HPMHooks.count.HP_skill_unit_move_unit_group_post ) { + if (HPMHooks.count.HP_skill_unit_move_unit_group_post > 0) { 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++ ) { + 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); } @@ -68393,14 +70009,14 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 int HP_skill_sit(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_pre ) { + if (HPMHooks.count.HP_skill_sit_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68408,9 +70024,9 @@ int HP_skill_sit(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.skill.sit(sd, type); } - if( HPMHooks.count.HP_skill_sit_post ) { + if (HPMHooks.count.HP_skill_sit_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_post; hIndex++ ) { + 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); } @@ -68419,14 +70035,14 @@ int HP_skill_sit(struct map_session_data *sd, int type) { } void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_pre ) { + if (HPMHooks.count.HP_skill_brandishspear_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68434,9 +70050,9 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1 { HPMHooks.source.skill.brandishspear(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_brandishspear_post ) { + if (HPMHooks.count.HP_skill_brandishspear_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) { + 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); } @@ -68445,14 +70061,14 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1 } void HP_skill_repairweapon(struct map_session_data *sd, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_skill_repairweapon_pre ) { + if (HPMHooks.count.HP_skill_repairweapon_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68460,9 +70076,9 @@ void HP_skill_repairweapon(struct map_session_data *sd, int idx) { { HPMHooks.source.skill.repairweapon(sd, idx); } - if( HPMHooks.count.HP_skill_repairweapon_post ) { + if (HPMHooks.count.HP_skill_repairweapon_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_repairweapon_post[hIndex].func; postHookFunc(sd, idx); } @@ -68471,14 +70087,14 @@ void HP_skill_repairweapon(struct map_session_data *sd, int idx) { } void HP_skill_identify(struct map_session_data *sd, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_skill_identify_pre ) { + if (HPMHooks.count.HP_skill_identify_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68486,9 +70102,9 @@ void HP_skill_identify(struct map_session_data *sd, int idx) { { HPMHooks.source.skill.identify(sd, idx); } - if( HPMHooks.count.HP_skill_identify_post ) { + if (HPMHooks.count.HP_skill_identify_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_identify_post[hIndex].func; postHookFunc(sd, idx); } @@ -68497,14 +70113,14 @@ void HP_skill_identify(struct map_session_data *sd, int idx) { } void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { int hIndex = 0; - if( HPMHooks.count.HP_skill_weaponrefine_pre ) { + if (HPMHooks.count.HP_skill_weaponrefine_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68512,9 +70128,9 @@ void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { { HPMHooks.source.skill.weaponrefine(sd, idx); } - if( HPMHooks.count.HP_skill_weaponrefine_post ) { + if (HPMHooks.count.HP_skill_weaponrefine_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_weaponrefine_post[hIndex].func; postHookFunc(sd, idx); } @@ -68524,14 +70140,14 @@ void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_autospell_pre ) { + if (HPMHooks.count.HP_skill_autospell_pre > 0) { int (*preHookFunc) (struct map_session_data **md, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68539,9 +70155,9 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { { retVal___ = HPMHooks.source.skill.autospell(md, skill_id); } - if( HPMHooks.count.HP_skill_autospell_post ) { + if (HPMHooks.count.HP_skill_autospell_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *md, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_post; hIndex++ ) { + 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); } @@ -68551,14 +70167,14 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { 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___ = 0; - if( HPMHooks.count.HP_skill_calc_heal_pre ) { + if (HPMHooks.count.HP_skill_calc_heal_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, bool *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68566,9 +70182,9 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 { retVal___ = HPMHooks.source.skill.calc_heal(src, target, skill_id, skill_lv, heal); } - if( HPMHooks.count.HP_skill_calc_heal_post ) { + if (HPMHooks.count.HP_skill_calc_heal_post > 0) { 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++ ) { + 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); } @@ -68578,14 +70194,14 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_cloaking_pre ) { + if (HPMHooks.count.HP_skill_check_cloaking_pre > 0) { bool (*preHookFunc) (struct block_list **bl, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68593,9 +70209,9 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry * { retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce); } - if( HPMHooks.count.HP_skill_check_cloaking_post ) { + if (HPMHooks.count.HP_skill_check_cloaking_post > 0) { 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++ ) { + 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); } @@ -68605,16 +70221,16 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry * int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) { + if (HPMHooks.count.HP_skill_check_cloaking_end_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func; retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68624,9 +70240,9 @@ int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_check_cloaking_end_post ) { + if (HPMHooks.count.HP_skill_check_cloaking_end_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -68638,14 +70254,14 @@ int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { bool HP_skill_can_cloak(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_can_cloak_pre ) { + if (HPMHooks.count.HP_skill_can_cloak_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func; retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68653,9 +70269,9 @@ bool HP_skill_can_cloak(struct map_session_data *sd) { { retVal___ = HPMHooks.source.skill.can_cloak(sd); } - if( HPMHooks.count.HP_skill_can_cloak_post ) { + if (HPMHooks.count.HP_skill_can_cloak_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -68665,14 +70281,14 @@ bool HP_skill_can_cloak(struct map_session_data *sd) { int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) { + if (HPMHooks.count.HP_skill_enchant_elemental_end_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68680,9 +70296,9 @@ int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { { retVal___ = HPMHooks.source.skill.enchant_elemental_end(bl, type); } - if( HPMHooks.count.HP_skill_enchant_elemental_end_post ) { + if (HPMHooks.count.HP_skill_enchant_elemental_end_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_post; hIndex++ ) { + 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); } @@ -68692,14 +70308,14 @@ int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_pre ) { + if (HPMHooks.count.HP_skill_not_ok_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68707,9 +70323,9 @@ int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { { retVal___ = HPMHooks.source.skill.not_ok(skill_id, sd); } - if( HPMHooks.count.HP_skill_not_ok_post ) { + if (HPMHooks.count.HP_skill_not_ok_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_post; hIndex++ ) { + 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); } @@ -68719,14 +70335,14 @@ int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { int HP_skill_not_ok_unknown(uint16 skill_id, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_unknown_pre ) { + if (HPMHooks.count.HP_skill_not_ok_unknown_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_not_ok_unknown_pre[hIndex].func; retVal___ = preHookFunc(&skill_id, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68734,9 +70350,9 @@ int HP_skill_not_ok_unknown(uint16 skill_id, struct map_session_data *sd) { { retVal___ = HPMHooks.source.skill.not_ok_unknown(skill_id, sd); } - if( HPMHooks.count.HP_skill_not_ok_unknown_post ) { + if (HPMHooks.count.HP_skill_not_ok_unknown_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_not_ok_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, skill_id, sd); } @@ -68746,14 +70362,14 @@ int HP_skill_not_ok_unknown(uint16 skill_id, struct map_session_data *sd) { int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_hom_pre ) { + if (HPMHooks.count.HP_skill_not_ok_hom_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68761,9 +70377,9 @@ int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { { retVal___ = HPMHooks.source.skill.not_ok_hom(skill_id, hd); } - if( HPMHooks.count.HP_skill_not_ok_hom_post ) { + if (HPMHooks.count.HP_skill_not_ok_hom_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_post; hIndex++ ) { + 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); } @@ -68773,14 +70389,14 @@ int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { int HP_skill_not_ok_hom_unknown(uint16 skill_id, struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_hom_unknown_pre ) { + if (HPMHooks.count.HP_skill_not_ok_hom_unknown_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_unknown_pre[hIndex].func; retVal___ = preHookFunc(&skill_id, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68788,9 +70404,9 @@ int HP_skill_not_ok_hom_unknown(uint16 skill_id, struct homun_data *hd) { { retVal___ = HPMHooks.source.skill.not_ok_hom_unknown(skill_id, hd); } - if( HPMHooks.count.HP_skill_not_ok_hom_unknown_post ) { + if (HPMHooks.count.HP_skill_not_ok_hom_unknown_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, skill_id, hd); } @@ -68800,14 +70416,14 @@ int HP_skill_not_ok_hom_unknown(uint16 skill_id, struct homun_data *hd) { int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) { + if (HPMHooks.count.HP_skill_not_ok_mercenary_pre > 0) { int (*preHookFunc) (uint16 *skill_id, struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68815,9 +70431,9 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { { retVal___ = HPMHooks.source.skill.not_ok_mercenary(skill_id, md); } - if( HPMHooks.count.HP_skill_not_ok_mercenary_post ) { + if (HPMHooks.count.HP_skill_not_ok_mercenary_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_post; hIndex++ ) { + 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); } @@ -68827,16 +70443,16 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) { + if (HPMHooks.count.HP_skill_chastle_mob_changetarget_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68846,9 +70462,9 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) { + if (HPMHooks.count.HP_skill_chastle_mob_changetarget_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) { + 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); @@ -68860,14 +70476,14 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_can_produce_mix_pre ) { + if (HPMHooks.count.HP_skill_can_produce_mix_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *trigger, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68875,9 +70491,9 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge { retVal___ = HPMHooks.source.skill.can_produce_mix(sd, nameid, trigger, qty); } - if( HPMHooks.count.HP_skill_can_produce_mix_post ) { + if (HPMHooks.count.HP_skill_can_produce_mix_post > 0) { 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++ ) { + 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); } @@ -68887,14 +70503,14 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge 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___ = 0; - if( HPMHooks.count.HP_skill_produce_mix_pre ) { + if (HPMHooks.count.HP_skill_produce_mix_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68902,9 +70518,9 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei { retVal___ = HPMHooks.source.skill.produce_mix(sd, skill_id, nameid, slot1, slot2, slot3, qty); } - if( HPMHooks.count.HP_skill_produce_mix_post ) { + if (HPMHooks.count.HP_skill_produce_mix_post > 0) { 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++ ) { + 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); } @@ -68914,14 +70530,14 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_arrow_create_pre ) { + if (HPMHooks.count.HP_skill_arrow_create_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68929,9 +70545,9 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.skill.arrow_create(sd, nameid); } - if( HPMHooks.count.HP_skill_arrow_create_post ) { + if (HPMHooks.count.HP_skill_arrow_create_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_post; hIndex++ ) { + 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); } @@ -68940,14 +70556,14 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { } void HP_skill_castend_type(int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_castend_type_pre ) { + if (HPMHooks.count.HP_skill_castend_type_pre > 0) { void (*preHookFunc) (int *type, struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_type_pre[hIndex].func; preHookFunc(&type, &src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68955,9 +70571,9 @@ void HP_skill_castend_type(int type, struct block_list *src, struct block_list * { HPMHooks.source.skill.castend_type(type, src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_type_post ) { + if (HPMHooks.count.HP_skill_castend_type_post > 0) { void (*postHookFunc) (int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_type_post[hIndex].func; postHookFunc(type, src, bl, skill_id, skill_lv, tick, flag); } @@ -68967,14 +70583,14 @@ void HP_skill_castend_type(int type, struct block_list *src, struct block_list * int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_nodamage_id_pre ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68982,9 +70598,9 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, { retVal___ = HPMHooks.source.skill.castend_nodamage_id(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) { + 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); } @@ -68994,14 +70610,14 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_damage_id_pre ) { + if (HPMHooks.count.HP_skill_castend_damage_id_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69009,9 +70625,9 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui { retVal___ = HPMHooks.source.skill.castend_damage_id(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_damage_id_post ) { + if (HPMHooks.count.HP_skill_castend_damage_id_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) { + 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); } @@ -69021,14 +70637,14 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos2_pre ) { + if (HPMHooks.count.HP_skill_castend_pos2_pre > 0) { int (*preHookFunc) (struct block_list **src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69036,9 +70652,9 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, { retVal___ = HPMHooks.source.skill.castend_pos2(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_pos2_post ) { + if (HPMHooks.count.HP_skill_castend_pos2_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) { + 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); } @@ -69048,14 +70664,14 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_start_pre ) { + if (HPMHooks.count.HP_skill_blockpc_start_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { + 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); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69063,9 +70679,9 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic { retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick); } - if( HPMHooks.count.HP_skill_blockpc_start_post ) { + if (HPMHooks.count.HP_skill_blockpc_start_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id, int tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) { + 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); } @@ -69075,14 +70691,14 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_start_pre ) { + if (HPMHooks.count.HP_skill_blockhomun_start_pre > 0) { int (*preHookFunc) (struct homun_data **hd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69090,9 +70706,9 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { retVal___ = HPMHooks.source.skill.blockhomun_start(hd, skill_id, tick); } - if( HPMHooks.count.HP_skill_blockhomun_start_post ) { + if (HPMHooks.count.HP_skill_blockhomun_start_post > 0) { 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++ ) { + 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); } @@ -69102,14 +70718,14 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_start_pre ) { + if (HPMHooks.count.HP_skill_blockmerc_start_pre > 0) { int (*preHookFunc) (struct mercenary_data **md, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69117,9 +70733,9 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic { retVal___ = HPMHooks.source.skill.blockmerc_start(md, skill_id, tick); } - if( HPMHooks.count.HP_skill_blockmerc_start_post ) { + if (HPMHooks.count.HP_skill_blockmerc_start_post > 0) { 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++ ) { + 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); } @@ -69129,14 +70745,14 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic 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, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_pre ) { + if (HPMHooks.count.HP_skill_attack_pre > 0) { int (*preHookFunc) (int *attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69144,9 +70760,9 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list * { retVal___ = HPMHooks.source.skill.attack(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_post ) { + if (HPMHooks.count.HP_skill_attack_post > 0) { 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, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) { + 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); } @@ -69156,16 +70772,16 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list * int HP_skill_attack_area(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_area_pre ) { + if (HPMHooks.count.HP_skill_attack_area_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69175,9 +70791,9 @@ int HP_skill_attack_area(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_attack_area_post ) { + if (HPMHooks.count.HP_skill_attack_area_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) { + 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); @@ -69189,16 +70805,16 @@ int HP_skill_attack_area(struct block_list *bl, va_list ap) { int HP_skill_area_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_area_sub_pre ) { + if (HPMHooks.count.HP_skill_area_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69208,9 +70824,9 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_area_sub_post ) { + if (HPMHooks.count.HP_skill_area_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) { + 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); @@ -69222,14 +70838,14 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) { int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_area_sub_count_pre ) { + if (HPMHooks.count.HP_skill_area_sub_count_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69237,9 +70853,9 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u { retVal___ = HPMHooks.source.skill.area_sub_count(src, target, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_area_sub_count_post ) { + if (HPMHooks.count.HP_skill_area_sub_count_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) { + 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); } @@ -69249,14 +70865,14 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u 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___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range_pre ) { + if (HPMHooks.count.HP_skill_check_unit_range_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69264,9 +70880,9 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_ { retVal___ = HPMHooks.source.skill.check_unit_range(bl, x, y, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_unit_range_post ) { + if (HPMHooks.count.HP_skill_check_unit_range_post > 0) { 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++ ) { + 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); } @@ -69276,16 +70892,16 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) { + if (HPMHooks.count.HP_skill_check_unit_range_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69295,9 +70911,9 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_unit_range_sub_post > 0) { 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++ ) { + 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); @@ -69309,14 +70925,14 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { 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___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range2_pre ) { + if (HPMHooks.count.HP_skill_check_unit_range2_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69324,9 +70940,9 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill { retVal___ = HPMHooks.source.skill.check_unit_range2(bl, x, y, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_unit_range2_post ) { + if (HPMHooks.count.HP_skill_check_unit_range2_post > 0) { 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++ ) { + 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); } @@ -69336,16 +70952,16 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) { + if (HPMHooks.count.HP_skill_check_unit_range2_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69355,9 +70971,9 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_unit_range2_sub_post > 0) { 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++ ) { + 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); @@ -69368,14 +70984,14 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { } void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_skill_toggle_magicpower_pre ) { + if (HPMHooks.count.HP_skill_toggle_magicpower_pre > 0) { void (*preHookFunc) (struct block_list **bl, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69383,9 +70999,9 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { { HPMHooks.source.skill.toggle_magicpower(bl, skill_id); } - if( HPMHooks.count.HP_skill_toggle_magicpower_post ) { + if (HPMHooks.count.HP_skill_toggle_magicpower_post > 0) { void (*postHookFunc) (struct block_list *bl, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_post; hIndex++ ) { + 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); } @@ -69395,14 +71011,14 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_magic_reflect_pre ) { + if (HPMHooks.count.HP_skill_magic_reflect_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69410,9 +71026,9 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty { retVal___ = HPMHooks.source.skill.magic_reflect(src, bl, type); } - if( HPMHooks.count.HP_skill_magic_reflect_post ) { + if (HPMHooks.count.HP_skill_magic_reflect_post > 0) { 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++ ) { + 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); } @@ -69422,14 +71038,14 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_onskillusage_pre ) { + if (HPMHooks.count.HP_skill_onskillusage_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_id, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69437,9 +71053,9 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui { retVal___ = HPMHooks.source.skill.onskillusage(sd, bl, skill_id, tick); } - if( HPMHooks.count.HP_skill_onskillusage_post ) { + if (HPMHooks.count.HP_skill_onskillusage_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) { + 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); } @@ -69449,16 +71065,16 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cell_overlap_pre ) { + if (HPMHooks.count.HP_skill_cell_overlap_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69468,9 +71084,9 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_cell_overlap_post ) { + if (HPMHooks.count.HP_skill_cell_overlap_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) { + 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); @@ -69482,14 +71098,14 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_timerskill_pre ) { + if (HPMHooks.count.HP_skill_timerskill_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69497,9 +71113,9 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_timerskill_post ) { + if (HPMHooks.count.HP_skill_timerskill_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) { + 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); } @@ -69509,16 +71125,16 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_trap_splash_pre ) { + if (HPMHooks.count.HP_skill_trap_splash_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69528,9 +71144,9 @@ int HP_skill_trap_splash(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_trap_splash_post ) { + if (HPMHooks.count.HP_skill_trap_splash_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) { + 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); @@ -69542,14 +71158,14 @@ int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) { + if (HPMHooks.count.HP_skill_check_condition_mercenary_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *skill_id, int *lv, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69557,9 +71173,9 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int { retVal___ = HPMHooks.source.skill.check_condition_mercenary(bl, skill_id, lv, type); } - if( HPMHooks.count.HP_skill_check_condition_mercenary_post ) { + if (HPMHooks.count.HP_skill_check_condition_mercenary_post > 0) { 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++ ) { + 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); } @@ -69569,14 +71185,14 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int 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 ) { + if (HPMHooks.count.HP_skill_locate_element_field_pre > 0) { struct skill_unit_group* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69584,9 +71200,9 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { { retVal___ = HPMHooks.source.skill.locate_element_field(bl); } - if( HPMHooks.count.HP_skill_locate_element_field_post ) { + if (HPMHooks.count.HP_skill_locate_element_field_post > 0) { 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++ ) { + 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); } @@ -69596,16 +71212,16 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_graffitiremover_pre ) { + if (HPMHooks.count.HP_skill_graffitiremover_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69615,9 +71231,9 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_graffitiremover_post ) { + if (HPMHooks.count.HP_skill_graffitiremover_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) { + 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); @@ -69629,16 +71245,16 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_activate_reverberation_pre ) { + if (HPMHooks.count.HP_skill_activate_reverberation_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69648,9 +71264,9 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_activate_reverberation_post ) { + if (HPMHooks.count.HP_skill_activate_reverberation_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) { + 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); @@ -69662,16 +71278,16 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) { + if (HPMHooks.count.HP_skill_dance_overlap_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69681,9 +71297,9 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) { + if (HPMHooks.count.HP_skill_dance_overlap_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) { + 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); @@ -69695,14 +71311,14 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { int HP_skill_dance_overlap(struct skill_unit *su, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_pre ) { + if (HPMHooks.count.HP_skill_dance_overlap_pre > 0) { int (*preHookFunc) (struct skill_unit **su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69710,9 +71326,9 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) { { retVal___ = HPMHooks.source.skill.dance_overlap(su, flag); } - if( HPMHooks.count.HP_skill_dance_overlap_post ) { + if (HPMHooks.count.HP_skill_dance_overlap_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *su, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_post; hIndex++ ) { + 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); } @@ -69722,14 +71338,14 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) { 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 ) { + if (HPMHooks.count.HP_skill_get_unit_layout_pre > 0) { struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list **src, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69737,9 +71353,9 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski { retVal___ = HPMHooks.source.skill.get_unit_layout(skill_id, skill_lv, src, x, y); } - if( HPMHooks.count.HP_skill_get_unit_layout_post ) { + if (HPMHooks.count.HP_skill_get_unit_layout_post > 0) { 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++ ) { + 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); } @@ -69749,16 +71365,16 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) { + if (HPMHooks.count.HP_skill_frostjoke_scream_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69768,9 +71384,9 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_frostjoke_scream_post ) { + if (HPMHooks.count.HP_skill_frostjoke_scream_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) { + 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); @@ -69782,16 +71398,16 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { int HP_skill_greed(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_greed_pre ) { + if (HPMHooks.count.HP_skill_greed_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69801,9 +71417,9 @@ int HP_skill_greed(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.greed(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_greed_post ) { + if (HPMHooks.count.HP_skill_greed_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) { + 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); @@ -69815,16 +71431,16 @@ int HP_skill_greed(struct block_list *bl, va_list ap) { int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_destroy_trap_pre ) { + if (HPMHooks.count.HP_skill_destroy_trap_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69834,9 +71450,9 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_destroy_trap_post ) { + if (HPMHooks.count.HP_skill_destroy_trap_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) { + 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); @@ -69848,14 +71464,14 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 tick) { int hIndex = 0; struct skill_unit_group_tickset* retVal___ = NULL; - if( HPMHooks.count.HP_skill_unitgrouptickset_search_pre ) { + if (HPMHooks.count.HP_skill_unitgrouptickset_search_pre > 0) { struct skill_unit_group_tickset* (*preHookFunc) (struct block_list **bl, struct skill_unit_group **group, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69863,9 +71479,9 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l { retVal___ = HPMHooks.source.skill.unitgrouptickset_search(bl, group, tick); } - if( HPMHooks.count.HP_skill_unitgrouptickset_search_post ) { + if (HPMHooks.count.HP_skill_unitgrouptickset_search_post > 0) { struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) { + 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); } @@ -69875,14 +71491,14 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l bool HP_skill_dance_switch(struct skill_unit *su, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_dance_switch_pre ) { + if (HPMHooks.count.HP_skill_dance_switch_pre > 0) { bool (*preHookFunc) (struct skill_unit **su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69890,9 +71506,9 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) { { retVal___ = HPMHooks.source.skill.dance_switch(su, flag); } - if( HPMHooks.count.HP_skill_dance_switch_post ) { + if (HPMHooks.count.HP_skill_dance_switch_post > 0) { bool (*postHookFunc) (bool retVal___, struct skill_unit *su, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_post; hIndex++ ) { + 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); } @@ -69902,16 +71518,16 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) { int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) { + if (HPMHooks.count.HP_skill_check_condition_char_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69921,9 +71537,9 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_condition_char_sub_post > 0) { 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++ ) { + 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); @@ -69935,16 +71551,16 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) { + if (HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69954,9 +71570,9 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_condition_mob_master_sub_post > 0) { 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++ ) { + 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); @@ -69967,14 +71583,14 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { } 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 ) { + if (HPMHooks.count.HP_skill_brandishspear_first_pre > 0) { void (*preHookFunc) (struct square **tc, uint8 *dir, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69982,9 +71598,9 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y { HPMHooks.source.skill.brandishspear_first(tc, dir, x, y); } - if( HPMHooks.count.HP_skill_brandishspear_first_post ) { + if (HPMHooks.count.HP_skill_brandishspear_first_post > 0) { void (*postHookFunc) (struct square *tc, uint8 dir, int16 x, int16 y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++ ) { + 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); } @@ -69993,14 +71609,14 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y } void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) { + if (HPMHooks.count.HP_skill_brandishspear_dir_pre > 0) { void (*preHookFunc) (struct square **tc, uint8 *dir, int *are); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70008,9 +71624,9 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { { HPMHooks.source.skill.brandishspear_dir(tc, dir, are); } - if( HPMHooks.count.HP_skill_brandishspear_dir_post ) { + if (HPMHooks.count.HP_skill_brandishspear_dir_post > 0) { void (*postHookFunc) (struct square *tc, uint8 dir, int are); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++ ) { + 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); } @@ -70020,14 +71636,14 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) { + if (HPMHooks.count.HP_skill_get_fixed_cast_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70035,9 +71651,9 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_fixed_cast(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_fixed_cast_post ) { + if (HPMHooks.count.HP_skill_get_fixed_cast_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_post; hIndex++ ) { + 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); } @@ -70047,16 +71663,16 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { int HP_skill_sit_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_count_pre ) { + if (HPMHooks.count.HP_skill_sit_count_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70066,9 +71682,9 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_count_post ) { + if (HPMHooks.count.HP_skill_sit_count_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) { + 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); @@ -70080,16 +71696,16 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) { int HP_skill_sit_in(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_in_pre ) { + if (HPMHooks.count.HP_skill_sit_in_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70099,9 +71715,9 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_in_post ) { + if (HPMHooks.count.HP_skill_sit_in_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) { + 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); @@ -70113,16 +71729,16 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) { int HP_skill_sit_out(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_out_pre ) { + if (HPMHooks.count.HP_skill_sit_out_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70132,9 +71748,9 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_out_post ) { + if (HPMHooks.count.HP_skill_sit_out_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) { + 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); @@ -70145,14 +71761,14 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) { } 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 ) { + if (HPMHooks.count.HP_skill_unitsetmapcell_pre > 0) { void (*preHookFunc) (struct skill_unit **src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70160,9 +71776,9 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski { HPMHooks.source.skill.unitsetmapcell(src, skill_id, skill_lv, cell, flag); } - if( HPMHooks.count.HP_skill_unitsetmapcell_post ) { + if (HPMHooks.count.HP_skill_unitsetmapcell_post > 0) { 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++ ) { + 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); } @@ -70172,14 +71788,14 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) { + if (HPMHooks.count.HP_skill_unit_onplace_timer_pre > 0) { int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70187,9 +71803,9 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, i { retVal___ = HPMHooks.source.skill.unit_onplace_timer(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onplace_timer_post ) { + if (HPMHooks.count.HP_skill_unit_onplace_timer_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) { + 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); } @@ -70198,14 +71814,14 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, i } void HP_skill_unit_onplace_timer_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre ) { + if (HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre > 0) { void (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_unknown_pre[hIndex].func; preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70213,9 +71829,9 @@ void HP_skill_unit_onplace_timer_unknown(struct skill_unit *src, struct block_li { HPMHooks.source.skill.unit_onplace_timer_unknown(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post ) { + if (HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post > 0) { void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_unknown_post[hIndex].func; postHookFunc(src, bl, tick); } @@ -70225,16 +71841,16 @@ void HP_skill_unit_onplace_timer_unknown(struct skill_unit *src, struct block_li int HP_skill_unit_effect(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_effect_pre ) { + if (HPMHooks.count.HP_skill_unit_effect_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70244,9 +71860,9 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_unit_effect_post ) { + if (HPMHooks.count.HP_skill_unit_effect_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) { + 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); @@ -70258,16 +71874,16 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) { int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70277,9 +71893,9 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_onplace_post > 0) { 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++ ) { + 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); @@ -70291,16 +71907,16 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_sub_pre ) { + if (HPMHooks.count.HP_skill_unit_move_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70310,9 +71926,9 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_unit_move_sub_post ) { + if (HPMHooks.count.HP_skill_unit_move_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) { + 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); @@ -70324,14 +71940,14 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_end_pre ) { + if (HPMHooks.count.HP_skill_blockpc_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70339,9 +71955,9 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockpc_end_post ) { + if (HPMHooks.count.HP_skill_blockpc_end_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) { + 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); } @@ -70351,14 +71967,14 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_end_pre ) { + if (HPMHooks.count.HP_skill_blockhomun_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70366,9 +71982,9 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockhomun_end_post ) { + if (HPMHooks.count.HP_skill_blockhomun_end_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) { + 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); } @@ -70378,14 +71994,14 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_end_pre ) { + if (HPMHooks.count.HP_skill_blockmerc_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70393,9 +72009,9 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockmerc_end_post ) { + if (HPMHooks.count.HP_skill_blockmerc_end_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) { + 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); } @@ -70405,14 +72021,14 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_split_atoi(char *str, int *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_split_atoi_pre ) { + if (HPMHooks.count.HP_skill_split_atoi_pre > 0) { int (*preHookFunc) (char **str, int **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70420,9 +72036,9 @@ int HP_skill_split_atoi(char *str, int *val) { { retVal___ = HPMHooks.source.skill.split_atoi(str, val); } - if( HPMHooks.count.HP_skill_split_atoi_post ) { + if (HPMHooks.count.HP_skill_split_atoi_post > 0) { int (*postHookFunc) (int retVal___, char *str, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) { + 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); } @@ -70432,14 +72048,14 @@ int HP_skill_split_atoi(char *str, int *val) { int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_pre ) { + if (HPMHooks.count.HP_skill_unit_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70447,9 +72063,9 @@ int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_unit_timer_post ) { + if (HPMHooks.count.HP_skill_unit_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) { + 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); } @@ -70459,16 +72075,16 @@ int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70478,9 +72094,9 @@ int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list 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 ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) { + 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); @@ -70491,14 +72107,14 @@ int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) { } void HP_skill_init_unit_layout(void) { int hIndex = 0; - if( HPMHooks.count.HP_skill_init_unit_layout_pre ) { + if (HPMHooks.count.HP_skill_init_unit_layout_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70506,9 +72122,9 @@ void HP_skill_init_unit_layout(void) { { HPMHooks.source.skill.init_unit_layout(); } - if( HPMHooks.count.HP_skill_init_unit_layout_post ) { + if (HPMHooks.count.HP_skill_init_unit_layout_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) { + 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(); } @@ -70517,14 +72133,14 @@ void HP_skill_init_unit_layout(void) { } void HP_skill_init_unit_layout_unknown(int skill_idx) { int hIndex = 0; - if( HPMHooks.count.HP_skill_init_unit_layout_unknown_pre ) { + if (HPMHooks.count.HP_skill_init_unit_layout_unknown_pre > 0) { void (*preHookFunc) (int *skill_idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_pre[hIndex].func; preHookFunc(&skill_idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70532,9 +72148,9 @@ void HP_skill_init_unit_layout_unknown(int skill_idx) { { HPMHooks.source.skill.init_unit_layout_unknown(skill_idx); } - if( HPMHooks.count.HP_skill_init_unit_layout_unknown_post ) { + if (HPMHooks.count.HP_skill_init_unit_layout_unknown_post > 0) { void (*postHookFunc) (int skill_idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_post[hIndex].func; postHookFunc(skill_idx); } @@ -70543,14 +72159,14 @@ void HP_skill_init_unit_layout_unknown(int skill_idx) { } void HP_skill_validate_hittype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_hittype_pre ) { + if (HPMHooks.count.HP_skill_validate_hittype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_hittype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70558,9 +72174,9 @@ void HP_skill_validate_hittype(struct config_setting_t *conf, struct s_skill_db { HPMHooks.source.skill.validate_hittype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_hittype_post ) { + if (HPMHooks.count.HP_skill_validate_hittype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_hittype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70569,14 +72185,14 @@ void HP_skill_validate_hittype(struct config_setting_t *conf, struct s_skill_db } void HP_skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_skilltype_pre ) { + if (HPMHooks.count.HP_skill_validate_skilltype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_skilltype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70584,9 +72200,9 @@ void HP_skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_d { HPMHooks.source.skill.validate_skilltype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_skilltype_post ) { + if (HPMHooks.count.HP_skill_validate_skilltype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_skilltype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70595,14 +72211,14 @@ void HP_skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_d } void HP_skill_validate_attacktype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_attacktype_pre ) { + if (HPMHooks.count.HP_skill_validate_attacktype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_attacktype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70610,9 +72226,9 @@ void HP_skill_validate_attacktype(struct config_setting_t *conf, struct s_skill_ { HPMHooks.source.skill.validate_attacktype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_attacktype_post ) { + if (HPMHooks.count.HP_skill_validate_attacktype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_attacktype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70621,14 +72237,14 @@ void HP_skill_validate_attacktype(struct config_setting_t *conf, struct s_skill_ } void HP_skill_validate_element(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_element_pre ) { + if (HPMHooks.count.HP_skill_validate_element_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_element_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70636,9 +72252,9 @@ void HP_skill_validate_element(struct config_setting_t *conf, struct s_skill_db { HPMHooks.source.skill.validate_element(conf, sk); } - if( HPMHooks.count.HP_skill_validate_element_post ) { + if (HPMHooks.count.HP_skill_validate_element_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_element_post[hIndex].func; postHookFunc(conf, sk); } @@ -70647,14 +72263,14 @@ void HP_skill_validate_element(struct config_setting_t *conf, struct s_skill_db } void HP_skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_skillinfo_pre ) { + if (HPMHooks.count.HP_skill_validate_skillinfo_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70662,9 +72278,9 @@ void HP_skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_d { HPMHooks.source.skill.validate_skillinfo(conf, sk); } - if( HPMHooks.count.HP_skill_validate_skillinfo_post ) { + if (HPMHooks.count.HP_skill_validate_skillinfo_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_post[hIndex].func; postHookFunc(conf, sk); } @@ -70673,14 +72289,14 @@ void HP_skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_d } void HP_skill_validate_damagetype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_damagetype_pre ) { + if (HPMHooks.count.HP_skill_validate_damagetype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_damagetype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70688,9 +72304,9 @@ void HP_skill_validate_damagetype(struct config_setting_t *conf, struct s_skill_ { HPMHooks.source.skill.validate_damagetype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_damagetype_post ) { + if (HPMHooks.count.HP_skill_validate_damagetype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_damagetype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70699,14 +72315,14 @@ void HP_skill_validate_damagetype(struct config_setting_t *conf, struct s_skill_ } void HP_skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_db *sk, bool delay) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_castnodex_pre ) { + if (HPMHooks.count.HP_skill_validate_castnodex_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk, bool *delay); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_castnodex_pre[hIndex].func; preHookFunc(&conf, &sk, &delay); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70714,9 +72330,9 @@ void HP_skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_d { HPMHooks.source.skill.validate_castnodex(conf, sk, delay); } - if( HPMHooks.count.HP_skill_validate_castnodex_post ) { + if (HPMHooks.count.HP_skill_validate_castnodex_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk, bool delay); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_castnodex_post[hIndex].func; postHookFunc(conf, sk, delay); } @@ -70725,14 +72341,14 @@ void HP_skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_d } void HP_skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_weapontype_pre ) { + if (HPMHooks.count.HP_skill_validate_weapontype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70740,9 +72356,9 @@ void HP_skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_ { HPMHooks.source.skill.validate_weapontype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_weapontype_post ) { + if (HPMHooks.count.HP_skill_validate_weapontype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70751,14 +72367,14 @@ void HP_skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_ } void HP_skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_ammotype_pre ) { + if (HPMHooks.count.HP_skill_validate_ammotype_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70766,9 +72382,9 @@ void HP_skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db { HPMHooks.source.skill.validate_ammotype(conf, sk); } - if( HPMHooks.count.HP_skill_validate_ammotype_post ) { + if (HPMHooks.count.HP_skill_validate_ammotype_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_post[hIndex].func; postHookFunc(conf, sk); } @@ -70777,14 +72393,14 @@ void HP_skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db } void HP_skill_validate_state(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_state_pre ) { + if (HPMHooks.count.HP_skill_validate_state_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_state_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70792,9 +72408,9 @@ void HP_skill_validate_state(struct config_setting_t *conf, struct s_skill_db *s { HPMHooks.source.skill.validate_state(conf, sk); } - if( HPMHooks.count.HP_skill_validate_state_post ) { + if (HPMHooks.count.HP_skill_validate_state_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_state_post[hIndex].func; postHookFunc(conf, sk); } @@ -70803,14 +72419,14 @@ void HP_skill_validate_state(struct config_setting_t *conf, struct s_skill_db *s } void HP_skill_validate_item_requirements(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_item_requirements_pre ) { + if (HPMHooks.count.HP_skill_validate_item_requirements_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70818,9 +72434,9 @@ void HP_skill_validate_item_requirements(struct config_setting_t *conf, struct s { HPMHooks.source.skill.validate_item_requirements(conf, sk); } - if( HPMHooks.count.HP_skill_validate_item_requirements_post ) { + if (HPMHooks.count.HP_skill_validate_item_requirements_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_post[hIndex].func; postHookFunc(conf, sk); } @@ -70829,14 +72445,14 @@ void HP_skill_validate_item_requirements(struct config_setting_t *conf, struct s } void HP_skill_validate_unit_target(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_unit_target_pre ) { + if (HPMHooks.count.HP_skill_validate_unit_target_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_unit_target_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70844,9 +72460,9 @@ void HP_skill_validate_unit_target(struct config_setting_t *conf, struct s_skill { HPMHooks.source.skill.validate_unit_target(conf, sk); } - if( HPMHooks.count.HP_skill_validate_unit_target_post ) { + if (HPMHooks.count.HP_skill_validate_unit_target_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_unit_target_post[hIndex].func; postHookFunc(conf, sk); } @@ -70855,14 +72471,14 @@ void HP_skill_validate_unit_target(struct config_setting_t *conf, struct s_skill } void HP_skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_unit_flag_pre ) { + if (HPMHooks.count.HP_skill_validate_unit_flag_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70870,9 +72486,9 @@ void HP_skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_d { HPMHooks.source.skill.validate_unit_flag(conf, sk); } - if( HPMHooks.count.HP_skill_validate_unit_flag_post ) { + if (HPMHooks.count.HP_skill_validate_unit_flag_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_post[hIndex].func; postHookFunc(conf, sk); } @@ -70881,14 +72497,14 @@ void HP_skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_d } void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s_skill_db *sk) { int hIndex = 0; - if( HPMHooks.count.HP_skill_validate_additional_fields_pre ) { + if (HPMHooks.count.HP_skill_validate_additional_fields_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_pre[hIndex].func; preHookFunc(&conf, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70896,9 +72512,9 @@ void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s { HPMHooks.source.skill.validate_additional_fields(conf, sk); } - if( HPMHooks.count.HP_skill_validate_additional_fields_post ) { + if (HPMHooks.count.HP_skill_validate_additional_fields_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_post[hIndex].func; postHookFunc(conf, sk); } @@ -70908,14 +72524,14 @@ void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_validate_skilldb_pre ) { + if (HPMHooks.count.HP_skill_validate_skilldb_pre > 0) { bool (*preHookFunc) (struct s_skill_db **skt, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_skilldb_pre[hIndex].func; retVal___ = preHookFunc(&skt, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70923,9 +72539,9 @@ bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) { { retVal___ = HPMHooks.source.skill.validate_skilldb(skt, source); } - if( HPMHooks.count.HP_skill_validate_skilldb_post ) { + if (HPMHooks.count.HP_skill_validate_skilldb_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_skill_db *skt, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_skilldb_post[hIndex].func; retVal___ = postHookFunc(retVal___, skt, source); } @@ -70935,14 +72551,14 @@ bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) { int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_validate_weapontype_sub_pre ) { + if (HPMHooks.count.HP_skill_validate_weapontype_sub_pre > 0) { int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_pre[hIndex].func; retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70950,9 +72566,9 @@ int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_d { retVal___ = HPMHooks.source.skill.validate_weapontype_sub(type, on, sk); } - if( HPMHooks.count.HP_skill_validate_weapontype_sub_post ) { + if (HPMHooks.count.HP_skill_validate_weapontype_sub_post > 0) { int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, on, sk); } @@ -70962,14 +72578,14 @@ int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_d int HP_skill_validate_ammotype_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_validate_ammotype_sub_pre ) { + if (HPMHooks.count.HP_skill_validate_ammotype_sub_pre > 0) { int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_pre[hIndex].func; retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70977,9 +72593,9 @@ int HP_skill_validate_ammotype_sub(const char *type, bool on, struct s_skill_db { retVal___ = HPMHooks.source.skill.validate_ammotype_sub(type, on, sk); } - if( HPMHooks.count.HP_skill_validate_ammotype_sub_post ) { + if (HPMHooks.count.HP_skill_validate_ammotype_sub_post > 0) { int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, on, sk); } @@ -70989,14 +72605,14 @@ int HP_skill_validate_ammotype_sub(const char *type, bool on, struct s_skill_db int HP_skill_validate_unit_flag_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_validate_unit_flag_sub_pre ) { + if (HPMHooks.count.HP_skill_validate_unit_flag_sub_pre > 0) { int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_pre[hIndex].func; retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71004,9 +72620,9 @@ int HP_skill_validate_unit_flag_sub(const char *type, bool on, struct s_skill_db { retVal___ = HPMHooks.source.skill.validate_unit_flag_sub(type, on, sk); } - if( HPMHooks.count.HP_skill_validate_unit_flag_sub_post ) { + if (HPMHooks.count.HP_skill_validate_unit_flag_sub_post > 0) { int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, type, on, sk); } @@ -71016,14 +72632,14 @@ int HP_skill_validate_unit_flag_sub(const char *type, bool on, struct s_skill_db bool HP_skill_read_skilldb(const char *filename) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_read_skilldb_pre ) { + if (HPMHooks.count.HP_skill_read_skilldb_pre > 0) { bool (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_read_skilldb_pre[hIndex].func; retVal___ = preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71031,9 +72647,9 @@ bool HP_skill_read_skilldb(const char *filename) { { retVal___ = HPMHooks.source.skill.read_skilldb(filename); } - if( HPMHooks.count.HP_skill_read_skilldb_post ) { + if (HPMHooks.count.HP_skill_read_skilldb_post > 0) { bool (*postHookFunc) (bool retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_read_skilldb_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename); } @@ -71042,14 +72658,14 @@ bool HP_skill_read_skilldb(const char *filename) { } void HP_skill_config_set_level(struct config_setting_t *conf, int *arr) { int hIndex = 0; - if( HPMHooks.count.HP_skill_config_set_level_pre ) { + if (HPMHooks.count.HP_skill_config_set_level_pre > 0) { void (*preHookFunc) (struct config_setting_t **conf, int **arr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_config_set_level_pre[hIndex].func; preHookFunc(&conf, &arr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71057,9 +72673,9 @@ void HP_skill_config_set_level(struct config_setting_t *conf, int *arr) { { HPMHooks.source.skill.config_set_level(conf, arr); } - if( HPMHooks.count.HP_skill_config_set_level_post ) { + if (HPMHooks.count.HP_skill_config_set_level_post > 0) { void (*postHookFunc) (struct config_setting_t *conf, int *arr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_config_set_level_post[hIndex].func; postHookFunc(conf, arr); } @@ -71068,14 +72684,14 @@ void HP_skill_config_set_level(struct config_setting_t *conf, int *arr) { } void HP_skill_level_set_value(int *arr, int value) { int hIndex = 0; - if( HPMHooks.count.HP_skill_level_set_value_pre ) { + if (HPMHooks.count.HP_skill_level_set_value_pre > 0) { void (*preHookFunc) (int **arr, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_level_set_value_pre[hIndex].func; preHookFunc(&arr, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71083,9 +72699,9 @@ void HP_skill_level_set_value(int *arr, int value) { { HPMHooks.source.skill.level_set_value(arr, value); } - if( HPMHooks.count.HP_skill_level_set_value_post ) { + if (HPMHooks.count.HP_skill_level_set_value_post > 0) { void (*postHookFunc) (int *arr, int value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_level_set_value_post[hIndex].func; postHookFunc(arr, value); } @@ -71095,14 +72711,14 @@ void HP_skill_level_set_value(int *arr, int value) { bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_producedb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71110,9 +72726,9 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.skill.parse_row_producedb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_producedb_post ) { + if (HPMHooks.count.HP_skill_parse_row_producedb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_post; hIndex++ ) { + 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); } @@ -71122,14 +72738,14 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_createarrowdb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71137,9 +72753,9 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.skill.parse_row_createarrowdb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_createarrowdb_post ) { + if (HPMHooks.count.HP_skill_parse_row_createarrowdb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_post; hIndex++ ) { + 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); } @@ -71149,14 +72765,14 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_abradb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71164,9 +72780,9 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.skill.parse_row_abradb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_abradb_post ) { + if (HPMHooks.count.HP_skill_parse_row_abradb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_post; hIndex++ ) { + 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); } @@ -71176,14 +72792,14 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_spellbookdb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71191,9 +72807,9 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.skill.parse_row_spellbookdb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_spellbookdb_post ) { + if (HPMHooks.count.HP_skill_parse_row_spellbookdb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_post; hIndex++ ) { + 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); } @@ -71203,14 +72819,14 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre > 0) { bool (*preHookFunc) (char **split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71218,9 +72834,9 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { retVal___ = HPMHooks.source.skill.parse_row_magicmushroomdb(split, column, current); } - if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post ) { + if (HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int column, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post; hIndex++ ) { + 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); } @@ -71230,14 +72846,14 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_reproducedb_pre > 0) { bool (*preHookFunc) (char **split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71245,9 +72861,9 @@ bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { { retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current); } - if( HPMHooks.count.HP_skill_parse_row_reproducedb_post ) { + if (HPMHooks.count.HP_skill_parse_row_reproducedb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int column, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++ ) { + 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); } @@ -71257,14 +72873,14 @@ bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_improvisedb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71272,9 +72888,9 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { { retVal___ = HPMHooks.source.skill.parse_row_improvisedb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_improvisedb_post ) { + if (HPMHooks.count.HP_skill_parse_row_improvisedb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_post; hIndex++ ) { + 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); } @@ -71284,14 +72900,14 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) { + if (HPMHooks.count.HP_skill_parse_row_changematerialdb_pre > 0) { bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71299,9 +72915,9 @@ bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current { retVal___ = HPMHooks.source.skill.parse_row_changematerialdb(split, columns, current); } - if( HPMHooks.count.HP_skill_parse_row_changematerialdb_post ) { + if (HPMHooks.count.HP_skill_parse_row_changematerialdb_post > 0) { bool (*postHookFunc) (bool retVal___, char *split[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_post; hIndex++ ) { + 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); } @@ -71310,14 +72926,14 @@ bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current } 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 ) { + if (HPMHooks.count.HP_skill_usave_add_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71325,9 +72941,9 @@ void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 ski { HPMHooks.source.skill.usave_add(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_usave_add_post ) { + if (HPMHooks.count.HP_skill_usave_add_post > 0) { 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++ ) { + 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); } @@ -71336,14 +72952,14 @@ void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 ski } void HP_skill_usave_trigger(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_skill_usave_trigger_pre ) { + if (HPMHooks.count.HP_skill_usave_trigger_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71351,9 +72967,9 @@ void HP_skill_usave_trigger(struct map_session_data *sd) { { HPMHooks.source.skill.usave_trigger(sd); } - if( HPMHooks.count.HP_skill_usave_trigger_post ) { + if (HPMHooks.count.HP_skill_usave_trigger_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func; postHookFunc(sd); } @@ -71362,14 +72978,14 @@ void HP_skill_usave_trigger(struct map_session_data *sd) { } void HP_skill_cooldown_load(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_skill_cooldown_load_pre ) { + if (HPMHooks.count.HP_skill_cooldown_load_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71377,9 +72993,9 @@ void HP_skill_cooldown_load(struct map_session_data *sd) { { HPMHooks.source.skill.cooldown_load(sd); } - if( HPMHooks.count.HP_skill_cooldown_load_post ) { + if (HPMHooks.count.HP_skill_cooldown_load_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func; postHookFunc(sd); } @@ -71389,14 +73005,14 @@ void HP_skill_cooldown_load(struct map_session_data *sd) { int HP_skill_spellbook(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_spellbook_pre ) { + if (HPMHooks.count.HP_skill_spellbook_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71404,9 +73020,9 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.skill.spellbook(sd, nameid); } - if( HPMHooks.count.HP_skill_spellbook_post ) { + if (HPMHooks.count.HP_skill_spellbook_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_post; hIndex++ ) { + 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); } @@ -71416,14 +73032,14 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) { int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_block_check_pre ) { + if (HPMHooks.count.HP_skill_block_check_pre > 0) { int (*preHookFunc) (struct block_list **bl, enum sc_type *type, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71431,9 +73047,9 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_ { retVal___ = HPMHooks.source.skill.block_check(bl, type, skill_id); } - if( HPMHooks.count.HP_skill_block_check_post ) { + if (HPMHooks.count.HP_skill_block_check_post > 0) { 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++ ) { + 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); } @@ -71443,16 +73059,16 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_ int HP_skill_detonator(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_detonator_pre ) { + if (HPMHooks.count.HP_skill_detonator_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71462,9 +73078,9 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_detonator_post ) { + if (HPMHooks.count.HP_skill_detonator_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) { + 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); @@ -71476,14 +73092,14 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) { bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_camouflage_pre ) { + if (HPMHooks.count.HP_skill_check_camouflage_pre > 0) { bool (*preHookFunc) (struct block_list **bl, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71491,9 +73107,9 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry { retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce); } - if( HPMHooks.count.HP_skill_check_camouflage_post ) { + if (HPMHooks.count.HP_skill_check_camouflage_post > 0) { 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++ ) { + 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); } @@ -71503,14 +73119,14 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_magicdecoy_pre ) { + if (HPMHooks.count.HP_skill_magicdecoy_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71518,9 +73134,9 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.skill.magicdecoy(sd, nameid); } - if( HPMHooks.count.HP_skill_magicdecoy_post ) { + if (HPMHooks.count.HP_skill_magicdecoy_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_post; hIndex++ ) { + 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); } @@ -71530,14 +73146,14 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_poisoningweapon_pre ) { + if (HPMHooks.count.HP_skill_poisoningweapon_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71545,9 +73161,9 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { { retVal___ = HPMHooks.source.skill.poisoningweapon(sd, nameid); } - if( HPMHooks.count.HP_skill_poisoningweapon_post ) { + if (HPMHooks.count.HP_skill_poisoningweapon_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_post; hIndex++ ) { + 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); } @@ -71557,14 +73173,14 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_select_menu_pre ) { + if (HPMHooks.count.HP_skill_select_menu_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71572,9 +73188,9 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { { retVal___ = HPMHooks.source.skill.select_menu(sd, skill_id); } - if( HPMHooks.count.HP_skill_select_menu_post ) { + if (HPMHooks.count.HP_skill_select_menu_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_post; hIndex++ ) { + 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); } @@ -71584,14 +73200,14 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_elementalanalysis_pre ) { + if (HPMHooks.count.HP_skill_elementalanalysis_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv, const struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func; retVal___ = preHookFunc(&sd, &skill_lv, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71599,9 +73215,9 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, con { retVal___ = HPMHooks.source.skill.elementalanalysis(sd, skill_lv, item_list); } - if( HPMHooks.count.HP_skill_elementalanalysis_post ) { + if (HPMHooks.count.HP_skill_elementalanalysis_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_elementalanalysis_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, skill_lv, item_list); } @@ -71611,14 +73227,14 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, con int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_changematerial_pre ) { + if (HPMHooks.count.HP_skill_changematerial_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func; retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71626,9 +73242,9 @@ int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist * { retVal___ = HPMHooks.source.skill.changematerial(sd, item_list); } - if( HPMHooks.count.HP_skill_changematerial_post ) { + if (HPMHooks.count.HP_skill_changematerial_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -71638,14 +73254,14 @@ int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist * int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_elemental_type_pre ) { + if (HPMHooks.count.HP_skill_get_elemental_type_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71653,9 +73269,9 @@ int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { { retVal___ = HPMHooks.source.skill.get_elemental_type(skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_get_elemental_type_post ) { + if (HPMHooks.count.HP_skill_get_elemental_type_post > 0) { int (*postHookFunc) (int retVal___, uint16 skill_id, uint16 skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_post; hIndex++ ) { + 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); } @@ -71664,14 +73280,14 @@ int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { } void HP_skill_cooldown_save(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_skill_cooldown_save_pre ) { + if (HPMHooks.count.HP_skill_cooldown_save_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71679,9 +73295,9 @@ void HP_skill_cooldown_save(struct map_session_data *sd) { { HPMHooks.source.skill.cooldown_save(sd); } - if( HPMHooks.count.HP_skill_cooldown_save_post ) { + if (HPMHooks.count.HP_skill_cooldown_save_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func; postHookFunc(sd); } @@ -71691,14 +73307,14 @@ void HP_skill_cooldown_save(struct map_session_data *sd) { int HP_skill_get_new_group_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_new_group_id_pre ) { + if (HPMHooks.count.HP_skill_get_new_group_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71706,9 +73322,9 @@ int HP_skill_get_new_group_id(void) { { retVal___ = HPMHooks.source.skill.get_new_group_id(); } - if( HPMHooks.count.HP_skill_get_new_group_id_post ) { + if (HPMHooks.count.HP_skill_get_new_group_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) { + 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___); } @@ -71718,14 +73334,14 @@ int HP_skill_get_new_group_id(void) { bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_shadowform_pre ) { + if (HPMHooks.count.HP_skill_check_shadowform_pre > 0) { bool (*preHookFunc) (struct block_list **bl, int64 *damage, int *hit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func; retVal___ = preHookFunc(&bl, &damage, &hit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71733,9 +73349,9 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { { retVal___ = HPMHooks.source.skill.check_shadowform(bl, damage, hit); } - if( HPMHooks.count.HP_skill_check_shadowform_post ) { + if (HPMHooks.count.HP_skill_check_shadowform_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 damage, int hit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, damage, hit); } @@ -71745,14 +73361,14 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_damage_id_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_data **tstatus, struct status_change **sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag, &tstatus, &sc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71760,9 +73376,9 @@ bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_lis { retVal___ = HPMHooks.source.skill.castend_damage_id_unknown(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_damage_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } @@ -71771,14 +73387,14 @@ bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_lis } void HP_skill_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_additional_effect_unknown_pre ) { + if (HPMHooks.count.HP_skill_additional_effect_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int **dmg_lv, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_pre[hIndex].func; preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71786,9 +73402,9 @@ void HP_skill_additional_effect_unknown(struct block_list *src, struct block_lis { HPMHooks.source.skill.additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } - if( HPMHooks.count.HP_skill_additional_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_additional_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_post[hIndex].func; postHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } @@ -71797,14 +73413,14 @@ void HP_skill_additional_effect_unknown(struct block_list *src, struct block_lis } void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_pre[hIndex].func; preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71812,9 +73428,9 @@ void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct b { HPMHooks.source.skill.counter_additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, tick); } - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_post[hIndex].func; postHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); } @@ -71823,14 +73439,14 @@ void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct b } void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo1_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_combo1_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_change_entry **sce, int **combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &sce, &combo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71838,9 +73454,9 @@ void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, st { HPMHooks.source.skill.attack_combo1_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } - if( HPMHooks.count.HP_skill_attack_combo1_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_combo1_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } @@ -71849,14 +73465,14 @@ void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, st } void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo2_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_combo2_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &combo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71864,9 +73480,9 @@ void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, st { HPMHooks.source.skill.attack_combo2_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } - if( HPMHooks.count.HP_skill_attack_combo2_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_combo2_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } @@ -71875,14 +73491,14 @@ void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, st } void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_display_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_display_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &type, &dmg, &damage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71890,9 +73506,9 @@ void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, s { HPMHooks.source.skill.attack_display_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } - if( HPMHooks.count.HP_skill_attack_display_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_display_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } @@ -71902,14 +73518,14 @@ void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, s int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_copy_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_copy_unknown_pre > 0) { int (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_pre[hIndex].func; retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71917,9 +73533,9 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc { retVal___ = HPMHooks.source.skill.attack_copy_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_copy_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_copy_unknown_post > 0) { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } @@ -71929,14 +73545,14 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_dir_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_dir_unknown_pre > 0) { int (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_pre[hIndex].func; retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71944,9 +73560,9 @@ int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct { retVal___ = HPMHooks.source.skill.attack_dir_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_dir_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_dir_unknown_post > 0) { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } @@ -71955,14 +73571,14 @@ int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct } void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_blow_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_blow_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, int8 **dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &type, &dmg, &damage, &dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71970,9 +73586,9 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru { HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } - if( HPMHooks.count.HP_skill_attack_blow_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_blow_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } @@ -71981,14 +73597,14 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru } void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_post_unknown_pre ) { + if (HPMHooks.count.HP_skill_attack_post_unknown_pre > 0) { void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_pre[hIndex].func; preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71996,9 +73612,9 @@ void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, stru { HPMHooks.source.skill.attack_post_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_post_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_post_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } @@ -72008,14 +73624,14 @@ void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, stru bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_pre ) { + if (HPMHooks.count.HP_skill_timerskill_dead_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72023,9 +73639,9 @@ bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data * { retVal___ = HPMHooks.source.skill.timerskill_dead_unknown(src, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_post ) { + if (HPMHooks.count.HP_skill_timerskill_dead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, ud, skl); } @@ -72034,14 +73650,14 @@ bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data * } void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_target_unknown_pre ) { + if (HPMHooks.count.HP_skill_timerskill_target_unknown_pre > 0) { void (*preHookFunc) (int *tid, int64 *tick, struct block_list **src, struct block_list **target, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_pre[hIndex].func; preHookFunc(&tid, &tick, &src, &target, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72049,9 +73665,9 @@ void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list * { HPMHooks.source.skill.timerskill_target_unknown(tid, tick, src, target, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_target_unknown_post ) { + if (HPMHooks.count.HP_skill_timerskill_target_unknown_post > 0) { void (*postHookFunc) (int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_post[hIndex].func; postHookFunc(tid, tick, src, target, ud, skl); } @@ -72060,14 +73676,14 @@ void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list * } void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre ) { + if (HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre > 0) { void (*preHookFunc) (int *tid, int64 *tick, struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_pre[hIndex].func; preHookFunc(&tid, &tick, &src, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72075,9 +73691,9 @@ void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list { HPMHooks.source.skill.timerskill_notarget_unknown(tid, tick, src, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_post ) { + if (HPMHooks.count.HP_skill_timerskill_notarget_unknown_post > 0) { void (*postHookFunc) (int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_post[hIndex].func; postHookFunc(tid, tick, src, ud, skl); } @@ -72087,14 +73703,14 @@ void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list bool HP_skill_cleartimerskill_exception(int skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_cleartimerskill_exception_pre ) { + if (HPMHooks.count.HP_skill_cleartimerskill_exception_pre > 0) { bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_pre[hIndex].func; retVal___ = preHookFunc(&skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72102,9 +73718,9 @@ bool HP_skill_cleartimerskill_exception(int skill_id) { { retVal___ = HPMHooks.source.skill.cleartimerskill_exception(skill_id); } - if( HPMHooks.count.HP_skill_cleartimerskill_exception_post ) { + if (HPMHooks.count.HP_skill_cleartimerskill_exception_post > 0) { bool (*postHookFunc) (bool retVal___, int skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_post[hIndex].func; retVal___ = postHookFunc(retVal___, skill_id); } @@ -72114,14 +73730,14 @@ bool HP_skill_cleartimerskill_exception(int skill_id) { bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, struct block_list *target) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_id_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_id_unknown_pre > 0) { bool (*preHookFunc) (struct unit_data **ud, struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_pre[hIndex].func; retVal___ = preHookFunc(&ud, &src, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72129,9 +73745,9 @@ bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, s { retVal___ = HPMHooks.source.skill.castend_id_unknown(ud, src, target); } - if( HPMHooks.count.HP_skill_castend_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct unit_data *ud, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, ud, src, target); } @@ -72141,14 +73757,14 @@ bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, s bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72156,9 +73772,9 @@ bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct bl { retVal___ = HPMHooks.source.skill.castend_nodamage_id_dead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -72168,14 +73784,14 @@ bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct bl bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72183,9 +73799,9 @@ bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct { retVal___ = HPMHooks.source.skill.castend_nodamage_id_undead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -72195,14 +73811,14 @@ bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72210,9 +73826,9 @@ bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct bl { retVal___ = HPMHooks.source.skill.castend_nodamage_id_mado_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -72222,14 +73838,14 @@ bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct bl bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72237,9 +73853,9 @@ bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_l { retVal___ = HPMHooks.source.skill.castend_nodamage_id_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -72248,14 +73864,14 @@ bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_l } void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_pre[hIndex].func; preHookFunc(&src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72263,9 +73879,9 @@ void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y { HPMHooks.source.skill.castend_pos2_effect_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_post[hIndex].func; postHookFunc(src, x, y, skill_id, skill_lv, tick, flag); } @@ -72275,14 +73891,14 @@ void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_pos2_unknown_pre ) { + if (HPMHooks.count.HP_skill_castend_pos2_unknown_pre > 0) { bool (*preHookFunc) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_pre[hIndex].func; retVal___ = preHookFunc(&src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72290,9 +73906,9 @@ bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint1 { retVal___ = HPMHooks.source.skill.castend_pos2_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_pos2_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_pos2_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, x, y, skill_id, skill_lv, tick, flag); } @@ -72301,14 +73917,14 @@ bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint1 } void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting1_unknown_pre ) { + if (HPMHooks.count.HP_skill_unitsetting1_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **val1, int **val2, int **val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_pre[hIndex].func; preHookFunc(&src, &skill_id, &skill_lv, &x, &y, &flag, &val1, &val2, &val3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72316,9 +73932,9 @@ void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uin { HPMHooks.source.skill.unitsetting1_unknown(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } - if( HPMHooks.count.HP_skill_unitsetting1_unknown_post ) { + if (HPMHooks.count.HP_skill_unitsetting1_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_post[hIndex].func; postHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } @@ -72327,14 +73943,14 @@ void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uin } void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting2_unknown_pre ) { + if (HPMHooks.count.HP_skill_unitsetting2_unknown_pre > 0) { void (*preHookFunc) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **unit_flag, int **val1, int **val2, int **val3, struct skill_unit_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_pre[hIndex].func; preHookFunc(&src, &skill_id, &skill_lv, &x, &y, &flag, &unit_flag, &val1, &val2, &val3, &group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72342,9 +73958,9 @@ void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uin { HPMHooks.source.skill.unitsetting2_unknown(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } - if( HPMHooks.count.HP_skill_unitsetting2_unknown_post ) { + if (HPMHooks.count.HP_skill_unitsetting2_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_post[hIndex].func; postHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } @@ -72353,14 +73969,14 @@ void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uin } void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unit_onplace_unknown_pre ) { + if (HPMHooks.count.HP_skill_unit_onplace_unknown_pre > 0) { void (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_pre[hIndex].func; preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72368,9 +73984,9 @@ void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl { HPMHooks.source.skill.unit_onplace_unknown(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onplace_unknown_post ) { + if (HPMHooks.count.HP_skill_unit_onplace_unknown_post > 0) { void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_post[hIndex].func; postHookFunc(src, bl, tick); } @@ -72380,14 +73996,14 @@ void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre > 0) { int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72395,9 +74011,9 @@ int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uin { retVal___ = HPMHooks.source.skill.check_condition_castbegin_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -72407,14 +74023,14 @@ int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uin int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre > 0) { int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72422,9 +74038,9 @@ int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, u { retVal___ = HPMHooks.source.skill.check_condition_castbegin_mount_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -72434,14 +74050,14 @@ int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, u int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre > 0) { int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72449,9 +74065,9 @@ int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc { retVal___ = HPMHooks.source.skill.check_condition_castbegin_madogear_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -72461,14 +74077,14 @@ int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre > 0) { int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72476,9 +74092,9 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 { retVal___ = HPMHooks.source.skill.check_condition_castbegin_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -72487,14 +74103,14 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 } void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_pre ) { + if (HPMHooks.count.HP_skill_check_condition_castend_unknown_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72502,9 +74118,9 @@ void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint1 { HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castend_unknown_post > 0) { void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; postHookFunc(sd, skill_id, skill_lv); } @@ -72514,14 +74130,14 @@ void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint1 bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_pre ) { + if (HPMHooks.count.HP_skill_get_requirement_off_unknown_pre > 0) { bool (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72529,9 +74145,9 @@ bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skil { retVal___ = HPMHooks.source.skill.get_requirement_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_off_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -72541,14 +74157,14 @@ bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skil bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_pre ) { + if (HPMHooks.count.HP_skill_get_requirement_item_unknown_pre > 0) { bool (*preHookFunc) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_pre[hIndex].func; retVal___ = preHookFunc(&sc, &sd, &skill_id, &skill_lv, &idx, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72556,9 +74172,9 @@ bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_ { retVal___ = HPMHooks.source.skill.get_requirement_item_unknown(sc, sd, skill_id, skill_lv, idx, i); } - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_item_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, sd, skill_id, skill_lv, idx, i); } @@ -72567,14 +74183,14 @@ bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_ } void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req) { int hIndex = 0; - if( HPMHooks.count.HP_skill_get_requirement_unknown_pre ) { + if (HPMHooks.count.HP_skill_get_requirement_unknown_pre > 0) { void (*preHookFunc) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, struct skill_condition **req); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_pre[hIndex].func; preHookFunc(&sc, &sd, &skill_id, &skill_lv, &req); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72582,9 +74198,9 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi { HPMHooks.source.skill.get_requirement_unknown(sc, sd, skill_id, skill_lv, req); } - if( HPMHooks.count.HP_skill_get_requirement_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_unknown_post > 0) { void (*postHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_post[hIndex].func; postHookFunc(sc, sd, skill_id, skill_lv, req); } @@ -72594,14 +74210,14 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi int HP_skill_splash_target(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_splash_target_pre ) { + if (HPMHooks.count.HP_skill_splash_target_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_splash_target_pre[hIndex].func; retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72609,9 +74225,9 @@ int HP_skill_splash_target(struct block_list *bl) { { retVal___ = HPMHooks.source.skill.splash_target(bl); } - if( HPMHooks.count.HP_skill_splash_target_post ) { + if (HPMHooks.count.HP_skill_splash_target_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_splash_target_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -72621,16 +74237,16 @@ int HP_skill_splash_target(struct block_list *bl) { int HP_skill_check_npc_chaospanic(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_npc_chaospanic_pre ) { + if (HPMHooks.count.HP_skill_check_npc_chaospanic_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_pre[hIndex].func; retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72640,9 +74256,9 @@ int HP_skill_check_npc_chaospanic(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.skill.check_npc_chaospanic(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_skill_check_npc_chaospanic_post ) { + if (HPMHooks.count.HP_skill_check_npc_chaospanic_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, args___copy); @@ -72654,16 +74270,16 @@ int HP_skill_check_npc_chaospanic(struct block_list *bl, va_list args) { int HP_skill_count_wos(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_count_wos_pre ) { + if (HPMHooks.count.HP_skill_count_wos_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_skill_count_wos_pre[hIndex].func; retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72673,9 +74289,9 @@ int HP_skill_count_wos(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.count_wos(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_count_wos_post ) { + if (HPMHooks.count.HP_skill_count_wos_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_skill_count_wos_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -72687,14 +74303,14 @@ int HP_skill_count_wos(struct block_list *bl, va_list ap) { /* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72702,9 +74318,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -72713,14 +74329,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72728,9 +74344,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -72740,14 +74356,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72755,9 +74371,9 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { int (*postHookFunc) (int retVal___, int next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, next); } @@ -72766,14 +74382,14 @@ int HP_sockt_perform(int next) { } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72781,9 +74397,9 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { void (*postHookFunc) (int fd, bool send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; postHookFunc(fd, send); } @@ -72793,14 +74409,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72808,9 +74424,9 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port); } @@ -72820,14 +74436,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72835,9 +74451,9 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, port, opt); } @@ -72847,14 +74463,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72862,9 +74478,9 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } @@ -72874,14 +74490,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72889,9 +74505,9 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, addition); } @@ -72901,14 +74517,14 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { int HP_sockt_wfifoset(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72916,9 +74532,9 @@ int HP_sockt_wfifoset(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -72928,14 +74544,14 @@ int HP_sockt_wfifoset(int fd, size_t len) { int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72943,9 +74559,9 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { int (*postHookFunc) (int retVal___, int fd, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, len); } @@ -72954,14 +74570,14 @@ int HP_sockt_rfifoskip(int fd, size_t len) { } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72969,9 +74585,9 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; postHookFunc(fd); } @@ -72981,14 +74597,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72996,9 +74612,9 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -73008,14 +74624,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73023,9 +74639,9 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { bool (*postHookFunc) (bool retVal___, int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd); } @@ -73034,14 +74650,14 @@ bool HP_sockt_session_is_active(int fd) { } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73049,9 +74665,9 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; postHookFunc(fd); } @@ -73060,14 +74676,14 @@ void HP_sockt_flush(int fd) { } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73075,9 +74691,9 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } @@ -73086,14 +74702,14 @@ void HP_sockt_flush_fifos(void) { } void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73101,9 +74717,9 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { void (*postHookFunc) (int fd, unsigned long yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; postHookFunc(fd, yes); } @@ -73112,14 +74728,14 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73127,9 +74743,9 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { void (*postHookFunc) (ParseFunc defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; postHookFunc(defaultparse); } @@ -73139,14 +74755,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73154,9 +74770,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -73166,14 +74782,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73181,9 +74797,9 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, ip_str); } @@ -73193,14 +74809,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73208,9 +74824,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -73220,14 +74836,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73235,9 +74851,9 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; retVal___ = postHookFunc(retVal___, netshort); } @@ -73247,14 +74863,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { + if (HPMHooks.count.HP_sockt_getips_pre > 0) { int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73262,9 +74878,9 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { int (*postHookFunc) (int retVal___, uint32 *ips, int max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; retVal___ = postHookFunc(retVal___, ips, max); } @@ -73273,14 +74889,14 @@ int HP_sockt_getips(uint32 *ips, int max) { } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73288,9 +74904,9 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { void (*postHookFunc) (int fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; postHookFunc(fd); } @@ -73300,14 +74916,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73315,9 +74931,9 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip, info); } @@ -73327,14 +74943,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73342,9 +74958,9 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -73354,14 +74970,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73369,9 +74985,9 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { bool (*postHookFunc) (bool retVal___, uint32 ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -73381,14 +74997,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73396,9 +75012,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -73407,14 +75023,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73422,9 +75038,9 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } @@ -73435,14 +75051,14 @@ void HP_sockt_net_config_read(const char *filename) { int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73450,9 +75066,9 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } @@ -73462,14 +75078,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73477,9 +75093,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -73489,14 +75105,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73504,9 +75120,9 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } @@ -73516,14 +75132,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73531,9 +75147,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -73543,14 +75159,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73558,9 +75174,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -73570,14 +75186,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73585,9 +75201,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -73597,14 +75213,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73612,9 +75228,9 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } @@ -73624,16 +75240,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73643,9 +75259,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -73657,14 +75273,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73672,9 +75288,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -73684,14 +75300,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73699,9 +75315,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -73711,14 +75327,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73726,9 +75342,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -73738,14 +75354,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73753,9 +75369,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -73765,14 +75381,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73780,9 +75396,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -73792,14 +75408,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73807,9 +75423,9 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } @@ -73818,14 +75434,14 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73833,9 +75449,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -73844,14 +75460,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73859,9 +75475,9 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -73870,14 +75486,14 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { + if (HPMHooks.count.HP_SQL_Free_pre > 0) { void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73885,9 +75501,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -73897,14 +75513,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73912,9 +75528,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -73924,14 +75540,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73939,9 +75555,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -73951,16 +75567,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73970,9 +75586,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -73984,14 +75600,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73999,9 +75615,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -74011,14 +75627,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74026,9 +75642,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74038,14 +75654,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74053,9 +75669,9 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } @@ -74065,14 +75681,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74080,9 +75696,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74092,14 +75708,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74107,9 +75723,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74119,14 +75735,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74134,9 +75750,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74146,14 +75762,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74161,9 +75777,9 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } @@ -74173,14 +75789,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74188,9 +75804,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74200,14 +75816,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74215,9 +75831,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -74226,14 +75842,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74241,9 +75857,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -74252,14 +75868,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74267,9 +75883,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -74278,14 +75894,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74293,9 +75909,9 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; postHookFunc(self, debug_file, debug_line); } @@ -74306,14 +75922,14 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u int HP_status_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_init_pre ) { + if (HPMHooks.count.HP_status_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74321,9 +75937,9 @@ int HP_status_init(bool minimal) { { retVal___ = HPMHooks.source.status.init(minimal); } - if( HPMHooks.count.HP_status_init_post ) { + if (HPMHooks.count.HP_status_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -74332,14 +75948,14 @@ int HP_status_init(bool minimal) { } void HP_status_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_final_pre ) { + if (HPMHooks.count.HP_status_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74347,38 +75963,38 @@ void HP_status_final(void) { { HPMHooks.source.status.final(); } - if( HPMHooks.count.HP_status_final_post ) { + if (HPMHooks.count.HP_status_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) { + 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 HP_status_get_refine_chance(enum refine_type wlv, int refine, enum refine_chance_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_refine_chance_pre ) { - int (*preHookFunc) (enum refine_type *wlv, int *refine); + if (HPMHooks.count.HP_status_get_refine_chance_pre > 0) { + int (*preHookFunc) (enum refine_type *wlv, int *refine, enum refine_chance_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_refine_chance_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&wlv, &refine, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine); + retVal___ = HPMHooks.source.status.get_refine_chance(wlv, refine, type); } - 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++ ) { + if (HPMHooks.count.HP_status_get_refine_chance_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine, enum refine_chance_type type); + 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); + retVal___ = postHookFunc(retVal___, wlv, refine, type); } } return retVal___; @@ -74386,14 +76002,14 @@ int HP_status_get_refine_chance(enum refine_type wlv, int refine) { sc_type HP_status_skill2sc(int skill_id) { int hIndex = 0; sc_type retVal___ = SC_NONE; - if( HPMHooks.count.HP_status_skill2sc_pre ) { + if (HPMHooks.count.HP_status_skill2sc_pre > 0) { sc_type (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74401,9 +76017,9 @@ sc_type HP_status_skill2sc(int skill_id) { { retVal___ = HPMHooks.source.status.skill2sc(skill_id); } - if( HPMHooks.count.HP_status_skill2sc_post ) { + if (HPMHooks.count.HP_status_skill2sc_post > 0) { sc_type (*postHookFunc) (sc_type retVal___, int skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_post; hIndex++ ) { + 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); } @@ -74413,14 +76029,14 @@ sc_type HP_status_skill2sc(int skill_id) { int HP_status_sc2skill(sc_type sc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2skill_pre ) { + if (HPMHooks.count.HP_status_sc2skill_pre > 0) { int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74428,9 +76044,9 @@ int HP_status_sc2skill(sc_type sc) { { retVal___ = HPMHooks.source.status.sc2skill(sc); } - if( HPMHooks.count.HP_status_sc2skill_post ) { + if (HPMHooks.count.HP_status_sc2skill_post > 0) { int (*postHookFunc) (int retVal___, sc_type sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_sc2skill_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc); } @@ -74440,14 +76056,14 @@ int HP_status_sc2skill(sc_type sc) { unsigned int HP_status_sc2scb_flag(sc_type sc) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2scb_flag_pre ) { + if (HPMHooks.count.HP_status_sc2scb_flag_pre > 0) { unsigned int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74455,9 +76071,9 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { { retVal___ = HPMHooks.source.status.sc2scb_flag(sc); } - if( HPMHooks.count.HP_status_sc2scb_flag_post ) { + if (HPMHooks.count.HP_status_sc2scb_flag_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, sc_type sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_post; hIndex++ ) { + 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); } @@ -74467,14 +76083,14 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { int HP_status_type2relevant_bl_types(int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) { + if (HPMHooks.count.HP_status_type2relevant_bl_types_pre > 0) { int (*preHookFunc) (int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74482,9 +76098,9 @@ int HP_status_type2relevant_bl_types(int type) { { retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); } - if( HPMHooks.count.HP_status_type2relevant_bl_types_post ) { + if (HPMHooks.count.HP_status_type2relevant_bl_types_post > 0) { int (*postHookFunc) (int retVal___, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_post; hIndex++ ) { + 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); } @@ -74494,14 +76110,14 @@ int HP_status_type2relevant_bl_types(int type) { int HP_status_get_sc_type(sc_type idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_type_pre ) { + if (HPMHooks.count.HP_status_get_sc_type_pre > 0) { int (*preHookFunc) (sc_type *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74509,9 +76125,9 @@ int HP_status_get_sc_type(sc_type idx) { { retVal___ = HPMHooks.source.status.get_sc_type(idx); } - if( HPMHooks.count.HP_status_get_sc_type_post ) { + if (HPMHooks.count.HP_status_get_sc_type_post > 0) { int (*postHookFunc) (int retVal___, sc_type idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_post; hIndex++ ) { + 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); } @@ -74521,14 +76137,14 @@ int HP_status_get_sc_type(sc_type idx) { 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___ = 0; - if( HPMHooks.count.HP_status_damage_pre ) { + if (HPMHooks.count.HP_status_damage_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, int64 *hp, int64 *sp, int *walkdelay, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74536,9 +76152,9 @@ int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp { retVal___ = HPMHooks.source.status.damage(src, target, hp, sp, walkdelay, flag); } - if( HPMHooks.count.HP_status_damage_post ) { + if (HPMHooks.count.HP_status_damage_post > 0) { 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++ ) { + 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); } @@ -74548,14 +76164,14 @@ int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_charge_pre ) { + if (HPMHooks.count.HP_status_charge_pre > 0) { int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74563,9 +76179,9 @@ int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { { retVal___ = HPMHooks.source.status.charge(bl, hp, sp); } - if( HPMHooks.count.HP_status_charge_post ) { + if (HPMHooks.count.HP_status_charge_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_post; hIndex++ ) { + 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); } @@ -74575,14 +76191,14 @@ int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { 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___ = 0; - if( HPMHooks.count.HP_status_percent_change_pre ) { + if (HPMHooks.count.HP_status_percent_change_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, signed char *hp_rate, signed char *sp_rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74590,9 +76206,9 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, { retVal___ = HPMHooks.source.status.percent_change(src, target, hp_rate, sp_rate, flag); } - if( HPMHooks.count.HP_status_percent_change_post ) { + if (HPMHooks.count.HP_status_percent_change_post > 0) { 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++ ) { + 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); } @@ -74602,14 +76218,14 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_set_hp_pre ) { + if (HPMHooks.count.HP_status_set_hp_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned int *hp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74617,9 +76233,9 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { { retVal___ = HPMHooks.source.status.set_hp(bl, hp, flag); } - if( HPMHooks.count.HP_status_set_hp_post ) { + if (HPMHooks.count.HP_status_set_hp_post > 0) { 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++ ) { + 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); } @@ -74629,14 +76245,14 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_set_sp_pre ) { + if (HPMHooks.count.HP_status_set_sp_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned int *sp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74644,9 +76260,9 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { { retVal___ = HPMHooks.source.status.set_sp(bl, sp, flag); } - if( HPMHooks.count.HP_status_set_sp_post ) { + if (HPMHooks.count.HP_status_set_sp_post > 0) { 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++ ) { + 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); } @@ -74656,14 +76272,14 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_heal_pre ) { + if (HPMHooks.count.HP_status_heal_pre > 0) { int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74671,9 +76287,9 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { { retVal___ = HPMHooks.source.status.heal(bl, hp, sp, flag); } - if( HPMHooks.count.HP_status_heal_post ) { + if (HPMHooks.count.HP_status_heal_post > 0) { 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++ ) { + 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); } @@ -74683,14 +76299,14 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_revive_pre ) { + if (HPMHooks.count.HP_status_revive_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned char *per_hp, unsigned char *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74698,9 +76314,9 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char { retVal___ = HPMHooks.source.status.revive(bl, per_hp, per_sp); } - if( HPMHooks.count.HP_status_revive_post ) { + if (HPMHooks.count.HP_status_revive_post > 0) { 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++ ) { + 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); } @@ -74710,14 +76326,14 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned int per_sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_fixed_revive_pre ) { + if (HPMHooks.count.HP_status_fixed_revive_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned int *per_hp, unsigned int *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func; retVal___ = preHookFunc(&bl, &per_hp, &per_sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74725,9 +76341,9 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned { retVal___ = HPMHooks.source.status.fixed_revive(bl, per_hp, per_sp); } - if( HPMHooks.count.HP_status_fixed_revive_post ) { + if (HPMHooks.count.HP_status_fixed_revive_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int per_hp, unsigned int per_sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_fixed_revive_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, per_hp, per_sp); } @@ -74737,14 +76353,14 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned 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 ) { + if (HPMHooks.count.HP_status_get_regen_data_pre > 0) { struct regen_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74752,9 +76368,9 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_regen_data(bl); } - if( HPMHooks.count.HP_status_get_regen_data_post ) { + if (HPMHooks.count.HP_status_get_regen_data_post > 0) { 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++ ) { + 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); } @@ -74764,14 +76380,14 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_status_get_status_data_pre > 0) { struct status_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74779,9 +76395,9 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_status_data(bl); } - if( HPMHooks.count.HP_status_get_status_data_post ) { + if (HPMHooks.count.HP_status_get_status_data_post > 0) { 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++ ) { + 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); } @@ -74791,14 +76407,14 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_status_get_base_status_pre > 0) { struct status_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74806,9 +76422,9 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_base_status(bl); } - if( HPMHooks.count.HP_status_get_base_status_post ) { + if (HPMHooks.count.HP_status_get_base_status_post > 0) { 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++ ) { + 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); } @@ -74818,14 +76434,14 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) { const char* HP_status_get_name(const struct block_list *bl) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_name_pre ) { + if (HPMHooks.count.HP_status_get_name_pre > 0) { const char* (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74833,9 +76449,9 @@ const char* HP_status_get_name(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_name(bl); } - if( HPMHooks.count.HP_status_get_name_post ) { + if (HPMHooks.count.HP_status_get_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) { + 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); } @@ -74845,14 +76461,14 @@ const char* HP_status_get_name(const struct block_list *bl) { int HP_status_get_class(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_class_pre ) { + if (HPMHooks.count.HP_status_get_class_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74860,9 +76476,9 @@ int HP_status_get_class(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_class(bl); } - if( HPMHooks.count.HP_status_get_class_post ) { + if (HPMHooks.count.HP_status_get_class_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) { + 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); } @@ -74872,14 +76488,14 @@ int HP_status_get_class(const struct block_list *bl) { int HP_status_get_lv(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_lv_pre ) { + if (HPMHooks.count.HP_status_get_lv_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74887,9 +76503,9 @@ int HP_status_get_lv(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_lv(bl); } - if( HPMHooks.count.HP_status_get_lv_post ) { + if (HPMHooks.count.HP_status_get_lv_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) { + 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); } @@ -74899,14 +76515,14 @@ int HP_status_get_lv(const struct block_list *bl) { defType HP_status_get_def(struct block_list *bl) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_get_def_pre ) { + if (HPMHooks.count.HP_status_get_def_pre > 0) { defType (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74914,9 +76530,9 @@ defType HP_status_get_def(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_def(bl); } - if( HPMHooks.count.HP_status_get_def_post ) { + if (HPMHooks.count.HP_status_get_def_post > 0) { defType (*postHookFunc) (defType retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) { + 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); } @@ -74926,14 +76542,14 @@ defType HP_status_get_def(struct block_list *bl) { unsigned short HP_status_get_speed(struct block_list *bl) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_get_speed_pre ) { + if (HPMHooks.count.HP_status_get_speed_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74941,9 +76557,9 @@ unsigned short HP_status_get_speed(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_speed(bl); } - if( HPMHooks.count.HP_status_get_speed_post ) { + if (HPMHooks.count.HP_status_get_speed_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) { + 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); } @@ -74953,14 +76569,14 @@ unsigned short HP_status_get_speed(struct block_list *bl) { unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_attack_element_pre ) { + if (HPMHooks.count.HP_status_calc_attack_element_pre > 0) { unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74968,9 +76584,9 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status { retVal___ = HPMHooks.source.status.calc_attack_element(bl, sc, element); } - if( HPMHooks.count.HP_status_calc_attack_element_post ) { + if (HPMHooks.count.HP_status_calc_attack_element_post > 0) { 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++ ) { + 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); } @@ -74980,14 +76596,14 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status int HP_status_get_party_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_party_id_pre ) { + if (HPMHooks.count.HP_status_get_party_id_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74995,9 +76611,9 @@ int HP_status_get_party_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_party_id(bl); } - if( HPMHooks.count.HP_status_get_party_id_post ) { + if (HPMHooks.count.HP_status_get_party_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) { + 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); } @@ -75007,14 +76623,14 @@ int HP_status_get_party_id(const struct block_list *bl) { int HP_status_get_guild_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_guild_id_pre ) { + if (HPMHooks.count.HP_status_get_guild_id_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75022,9 +76638,9 @@ int HP_status_get_guild_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_guild_id(bl); } - if( HPMHooks.count.HP_status_get_guild_id_post ) { + if (HPMHooks.count.HP_status_get_guild_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) { + 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); } @@ -75034,14 +76650,14 @@ int HP_status_get_guild_id(const struct block_list *bl) { int HP_status_get_emblem_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_emblem_id_pre ) { + if (HPMHooks.count.HP_status_get_emblem_id_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75049,9 +76665,9 @@ int HP_status_get_emblem_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_emblem_id(bl); } - if( HPMHooks.count.HP_status_get_emblem_id_post ) { + if (HPMHooks.count.HP_status_get_emblem_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) { + 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); } @@ -75061,14 +76677,14 @@ int HP_status_get_emblem_id(const struct block_list *bl) { int HP_status_get_mexp(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_mexp_pre ) { + if (HPMHooks.count.HP_status_get_mexp_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75076,9 +76692,9 @@ int HP_status_get_mexp(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_mexp(bl); } - if( HPMHooks.count.HP_status_get_mexp_post ) { + if (HPMHooks.count.HP_status_get_mexp_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) { + 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); } @@ -75088,14 +76704,14 @@ int HP_status_get_mexp(const struct block_list *bl) { int HP_status_get_race2(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_race2_pre ) { + if (HPMHooks.count.HP_status_get_race2_pre > 0) { int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75103,9 +76719,9 @@ int HP_status_get_race2(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_race2(bl); } - if( HPMHooks.count.HP_status_get_race2_post ) { + if (HPMHooks.count.HP_status_get_race2_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) { + 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); } @@ -75115,14 +76731,14 @@ int HP_status_get_race2(const struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_status_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75130,9 +76746,9 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_viewdata(bl); } - if( HPMHooks.count.HP_status_get_viewdata_post ) { + if (HPMHooks.count.HP_status_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) { + 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); } @@ -75141,14 +76757,14 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) { } void HP_status_set_viewdata(struct block_list *bl, int class_) { int hIndex = 0; - if( HPMHooks.count.HP_status_set_viewdata_pre ) { + if (HPMHooks.count.HP_status_set_viewdata_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75156,9 +76772,9 @@ void HP_status_set_viewdata(struct block_list *bl, int class_) { { HPMHooks.source.status.set_viewdata(bl, class_); } - if( HPMHooks.count.HP_status_set_viewdata_post ) { + if (HPMHooks.count.HP_status_set_viewdata_post > 0) { void (*postHookFunc) (struct block_list *bl, int class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_post; hIndex++ ) { + 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_); } @@ -75167,14 +76783,14 @@ void HP_status_set_viewdata(struct block_list *bl, int class_) { } void HP_status_change_init(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_status_change_init_pre ) { + if (HPMHooks.count.HP_status_change_init_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75182,9 +76798,9 @@ void HP_status_change_init(struct block_list *bl) { { HPMHooks.source.status.change_init(bl); } - if( HPMHooks.count.HP_status_change_init_post ) { + if (HPMHooks.count.HP_status_change_init_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func; postHookFunc(bl); } @@ -75194,14 +76810,14 @@ void HP_status_change_init(struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_status_get_sc_pre > 0) { struct status_change* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75209,9 +76825,9 @@ struct status_change* HP_status_get_sc(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_sc(bl); } - if( HPMHooks.count.HP_status_get_sc_post ) { + if (HPMHooks.count.HP_status_get_sc_post > 0) { struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) { + 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); } @@ -75221,14 +76837,14 @@ struct status_change* HP_status_get_sc(struct block_list *bl) { int HP_status_isdead(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_isdead_pre ) { + if (HPMHooks.count.HP_status_isdead_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75236,9 +76852,9 @@ int HP_status_isdead(struct block_list *bl) { { retVal___ = HPMHooks.source.status.isdead(bl); } - if( HPMHooks.count.HP_status_isdead_post ) { + if (HPMHooks.count.HP_status_isdead_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -75248,14 +76864,14 @@ int HP_status_isdead(struct block_list *bl) { int HP_status_isimmune(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_isimmune_pre ) { + if (HPMHooks.count.HP_status_isimmune_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75263,9 +76879,9 @@ int HP_status_isimmune(struct block_list *bl) { { retVal___ = HPMHooks.source.status.isimmune(bl); } - if( HPMHooks.count.HP_status_isimmune_post ) { + if (HPMHooks.count.HP_status_isimmune_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -75275,14 +76891,14 @@ int HP_status_isimmune(struct block_list *bl) { int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_def_pre ) { + if (HPMHooks.count.HP_status_get_sc_def_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { + 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(&src, &bl, &type, &rate, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75290,9 +76906,9 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_ { retVal___ = HPMHooks.source.status.get_sc_def(src, bl, type, rate, tick, flag); } - if( HPMHooks.count.HP_status_get_sc_def_post ) { + if (HPMHooks.count.HP_status_get_sc_def_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, 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++ ) { + 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___, src, bl, type, rate, tick, flag); } @@ -75302,14 +76918,14 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_ int HP_status_change_start(struct block_list *src, 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___ = 0; - if( HPMHooks.count.HP_status_change_start_pre ) { + if (HPMHooks.count.HP_status_change_start_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; retVal___ = preHookFunc(&src, &bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75317,9 +76933,9 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s { retVal___ = HPMHooks.source.status.change_start(src, bl, type, rate, val1, val2, val3, val4, tick, flag); } - if( HPMHooks.count.HP_status_change_start_post ) { + if (HPMHooks.count.HP_status_change_start_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, 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++ ) { + 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___, src, bl, type, rate, val1, val2, val3, val4, tick, flag); } @@ -75329,14 +76945,14 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s 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___ = 0; - if( HPMHooks.count.HP_status_change_end__pre ) { + if (HPMHooks.count.HP_status_change_end__pre > 0) { int (*preHookFunc) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75344,26 +76960,240 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con { retVal___ = HPMHooks.source.status.change_end_(bl, type, tid, file, line); } - if( HPMHooks.count.HP_status_change_end__post ) { + if (HPMHooks.count.HP_status_change_end__post > 0) { 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++ ) { + 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___; } +bool HP_status_is_immune_to_status(struct status_change *sc, enum sc_type type) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_is_immune_to_status_pre > 0) { + bool (*preHookFunc) (struct status_change **sc, enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_is_immune_to_status_pre[hIndex].func; + retVal___ = preHookFunc(&sc, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.is_immune_to_status(sc, type); + } + if (HPMHooks.count.HP_status_is_immune_to_status_post > 0) { + bool (*postHookFunc) (bool retVal___, struct status_change *sc, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_is_immune_to_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, type); + } + } + return retVal___; +} +bool HP_status_is_boss_resist_sc(enum sc_type type) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_is_boss_resist_sc_pre > 0) { + bool (*preHookFunc) (enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.is_boss_resist_sc(type); + } + if (HPMHooks.count.HP_status_is_boss_resist_sc_post > 0) { + bool (*postHookFunc) (bool retVal___, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} +bool HP_status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_end_sc_before_start_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_end_sc_before_start_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &st, &sc, &type, &undead_flag, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.end_sc_before_start(bl, st, sc, type, undead_flag, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_end_sc_before_start_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_end_sc_before_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, st, sc, type, undead_flag, val1, val2, val3, val4); + } + } + return retVal___; +} +void HP_status_change_start_stop_action(struct block_list *bl, enum sc_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_status_change_start_stop_action_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_stop_action_pre[hIndex].func; + preHookFunc(&bl, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.change_start_stop_action(bl, type); + } + if (HPMHooks.count.HP_status_change_start_stop_action_post > 0) { + void (*postHookFunc) (struct block_list *bl, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_stop_action_post[hIndex].func; + postHookFunc(bl, type); + } + } + return; +} +int HP_status_change_start_set_option(struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_change_start_set_option_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_set_option_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &sc, &type, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_set_option(bl, sc, type, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_change_start_set_option_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_set_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, type, val1, val2, val3, val4); + } + } + return retVal___; +} +int HP_status_get_val_flag(enum sc_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_get_val_flag_pre > 0) { + int (*preHookFunc) (enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_val_flag_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_val_flag(type); + } + if (HPMHooks.count.HP_status_get_val_flag_post > 0) { + int (*postHookFunc) (int retVal___, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_val_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} +void HP_status_change_start_display(struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4) { + int hIndex = 0; + if (HPMHooks.count.HP_status_change_start_display_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_display_pre[hIndex].func; + preHookFunc(&sd, &type, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.change_start_display(sd, type, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_change_start_display_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_display_post[hIndex].func; + postHookFunc(sd, type, val1, val2, val3, val4); + } + } + return; +} +bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_change_start_unknown_sc_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_pre[hIndex].func; + retVal___ = preHookFunc(&src, &bl, &type, &calc_flag, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag); + } + if (HPMHooks.count.HP_status_change_start_unknown_sc_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, tick, flag); + } + } + return retVal___; +} int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) { + if (HPMHooks.count.HP_status_kaahi_heal_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75371,9 +77201,9 @@ int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.status.kaahi_heal_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_status_kaahi_heal_timer_post ) { + if (HPMHooks.count.HP_status_kaahi_heal_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) { + 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); } @@ -75383,14 +77213,14 @@ int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_pre ) { + if (HPMHooks.count.HP_status_change_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75398,9 +77228,9 @@ int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_status_change_timer_post ) { + if (HPMHooks.count.HP_status_change_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) { + 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); } @@ -75410,16 +77240,16 @@ int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_sub_pre ) { + if (HPMHooks.count.HP_status_change_timer_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75429,9 +77259,9 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_status_change_timer_sub_post ) { + if (HPMHooks.count.HP_status_change_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) { + 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); @@ -75443,14 +77273,14 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { int HP_status_change_clear(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_pre ) { + if (HPMHooks.count.HP_status_change_clear_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75458,9 +77288,9 @@ int HP_status_change_clear(struct block_list *bl, int type) { { retVal___ = HPMHooks.source.status.change_clear(bl, type); } - if( HPMHooks.count.HP_status_change_clear_post ) { + if (HPMHooks.count.HP_status_change_clear_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_post; hIndex++ ) { + 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); } @@ -75470,14 +77300,14 @@ int HP_status_change_clear(struct block_list *bl, int type) { int HP_status_change_clear_buffs(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_buffs_pre ) { + if (HPMHooks.count.HP_status_change_clear_buffs_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75485,9 +77315,9 @@ int HP_status_change_clear_buffs(struct block_list *bl, int type) { { retVal___ = HPMHooks.source.status.change_clear_buffs(bl, type); } - if( HPMHooks.count.HP_status_change_clear_buffs_post ) { + if (HPMHooks.count.HP_status_change_clear_buffs_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_post; hIndex++ ) { + 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); } @@ -75496,14 +77326,14 @@ int HP_status_change_clear_buffs(struct block_list *bl, int type) { } void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_bl__pre ) { + if (HPMHooks.count.HP_status_calc_bl__pre > 0) { void (*preHookFunc) (struct block_list **bl, enum scb_flag *flag, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75511,9 +77341,9 @@ void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status { HPMHooks.source.status.calc_bl_(bl, flag, opt); } - if( HPMHooks.count.HP_status_calc_bl__post ) { + if (HPMHooks.count.HP_status_calc_bl__post > 0) { void (*postHookFunc) (struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) { + 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, opt); } @@ -75523,14 +77353,14 @@ void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mob__pre ) { + if (HPMHooks.count.HP_status_calc_mob__pre > 0) { int (*preHookFunc) (struct mob_data **md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75538,9 +77368,9 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_mob_(md, opt); } - if( HPMHooks.count.HP_status_calc_mob__post ) { + if (HPMHooks.count.HP_status_calc_mob__post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) { + 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, opt); } @@ -75550,14 +77380,14 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pet__pre ) { + if (HPMHooks.count.HP_status_calc_pet__pre > 0) { int (*preHookFunc) (struct pet_data **pd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75565,9 +77395,9 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_pet_(pd, opt); } - if( HPMHooks.count.HP_status_calc_pet__post ) { + if (HPMHooks.count.HP_status_calc_pet__post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) { + 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, opt); } @@ -75577,14 +77407,14 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pc__pre ) { + if (HPMHooks.count.HP_status_calc_pc__pre > 0) { int (*preHookFunc) (struct map_session_data **sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75592,9 +77422,9 @@ int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { retVal___ = HPMHooks.source.status.calc_pc_(sd, opt); } - if( HPMHooks.count.HP_status_calc_pc__post ) { + if (HPMHooks.count.HP_status_calc_pc__post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) { + 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, opt); } @@ -75603,14 +77433,14 @@ int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) } void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_pc_additional_pre ) { + if (HPMHooks.count.HP_status_calc_pc_additional_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_pc_additional_pre[hIndex].func; preHookFunc(&sd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75618,9 +77448,9 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal { HPMHooks.source.status.calc_pc_additional(sd, opt); } - if( HPMHooks.count.HP_status_calc_pc_additional_post ) { + if (HPMHooks.count.HP_status_calc_pc_additional_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_pc_additional_post[hIndex].func; postHookFunc(sd, opt); } @@ -75630,14 +77460,14 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_homunculus__pre ) { + if (HPMHooks.count.HP_status_calc_homunculus__pre > 0) { int (*preHookFunc) (struct homun_data **hd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75645,9 +77475,9 @@ int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt { retVal___ = HPMHooks.source.status.calc_homunculus_(hd, opt); } - if( HPMHooks.count.HP_status_calc_homunculus__post ) { + if (HPMHooks.count.HP_status_calc_homunculus__post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) { + 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, opt); } @@ -75657,14 +77487,14 @@ int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mercenary__pre ) { + if (HPMHooks.count.HP_status_calc_mercenary__pre > 0) { int (*preHookFunc) (struct mercenary_data **md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75672,9 +77502,9 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt { retVal___ = HPMHooks.source.status.calc_mercenary_(md, opt); } - if( HPMHooks.count.HP_status_calc_mercenary__post ) { + if (HPMHooks.count.HP_status_calc_mercenary__post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) { + 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, opt); } @@ -75684,14 +77514,14 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_elemental__pre ) { + if (HPMHooks.count.HP_status_calc_elemental__pre > 0) { int (*preHookFunc) (struct elemental_data **ed, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75699,9 +77529,9 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt { retVal___ = HPMHooks.source.status.calc_elemental_(ed, opt); } - if( HPMHooks.count.HP_status_calc_elemental__post ) { + if (HPMHooks.count.HP_status_calc_elemental__post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) { + 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, opt); } @@ -75710,14 +77540,14 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt } void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_misc_pre ) { + if (HPMHooks.count.HP_status_calc_misc_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct status_data **st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; preHookFunc(&bl, &st, &level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75725,9 +77555,9 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int leve { HPMHooks.source.status.calc_misc(bl, st, level); } - if( HPMHooks.count.HP_status_calc_misc_post ) { + if (HPMHooks.count.HP_status_calc_misc_post > 0) { void (*postHookFunc) (struct block_list *bl, struct status_data *st, int level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_misc_post[hIndex].func; postHookFunc(bl, st, level); } @@ -75736,14 +77566,14 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int leve } 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 ) { + if (HPMHooks.count.HP_status_calc_regen_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct status_data **st, struct regen_data **regen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) { + 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, ®en); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75751,9 +77581,9 @@ void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct { HPMHooks.source.status.calc_regen(bl, st, regen); } - if( HPMHooks.count.HP_status_calc_regen_post ) { + if (HPMHooks.count.HP_status_calc_regen_post > 0) { 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++ ) { + 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); } @@ -75762,14 +77592,14 @@ void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct } 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 ) { + if (HPMHooks.count.HP_status_calc_regen_rate_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct regen_data **regen, struct status_change **sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) { + 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, ®en, &sc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75777,9 +77607,9 @@ void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, { HPMHooks.source.status.calc_regen_rate(bl, regen, sc); } - if( HPMHooks.count.HP_status_calc_regen_rate_post ) { + if (HPMHooks.count.HP_status_calc_regen_rate_post > 0) { 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++ ) { + 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); } @@ -75789,14 +77619,14 @@ void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_skilluse_pre ) { + if (HPMHooks.count.HP_status_check_skilluse_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75804,9 +77634,9 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target, { retVal___ = HPMHooks.source.status.check_skilluse(src, target, skill_id, flag); } - if( HPMHooks.count.HP_status_check_skilluse_post ) { + if (HPMHooks.count.HP_status_check_skilluse_post > 0) { 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++ ) { + 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); } @@ -75816,14 +77646,14 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target, int HP_status_check_visibility(struct block_list *src, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_visibility_pre ) { + if (HPMHooks.count.HP_status_check_visibility_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75831,9 +77661,9 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target { retVal___ = HPMHooks.source.status.check_visibility(src, target); } - if( HPMHooks.count.HP_status_check_visibility_post ) { + if (HPMHooks.count.HP_status_check_visibility_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) { + 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); } @@ -75843,14 +77673,14 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target int HP_status_change_spread(struct block_list *src, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_spread_pre ) { + if (HPMHooks.count.HP_status_change_spread_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75858,9 +77688,9 @@ int HP_status_change_spread(struct block_list *src, struct block_list *bl) { { retVal___ = HPMHooks.source.status.change_spread(src, bl); } - if( HPMHooks.count.HP_status_change_spread_post ) { + if (HPMHooks.count.HP_status_change_spread_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) { + 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); } @@ -75870,14 +77700,14 @@ int HP_status_change_spread(struct block_list *src, struct block_list *bl) { defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def_pre ) { + if (HPMHooks.count.HP_status_calc_def_pre > 0) { defType (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *def, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75885,9 +77715,9 @@ defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int { retVal___ = HPMHooks.source.status.calc_def(bl, sc, def, viewable); } - if( HPMHooks.count.HP_status_calc_def_post ) { + if (HPMHooks.count.HP_status_calc_def_post > 0) { 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++ ) { + 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); } @@ -75897,14 +77727,14 @@ defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def2_pre ) { + if (HPMHooks.count.HP_status_calc_def2_pre > 0) { short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *def2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75912,9 +77742,9 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d { retVal___ = HPMHooks.source.status.calc_def2(bl, sc, def2, viewable); } - if( HPMHooks.count.HP_status_calc_def2_post ) { + if (HPMHooks.count.HP_status_calc_def2_post > 0) { 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++ ) { + 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); } @@ -75924,14 +77754,14 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef_pre ) { + if (HPMHooks.count.HP_status_calc_mdef_pre > 0) { defType (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *mdef, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75939,9 +77769,9 @@ defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int { retVal___ = HPMHooks.source.status.calc_mdef(bl, sc, mdef, viewable); } - if( HPMHooks.count.HP_status_calc_mdef_post ) { + if (HPMHooks.count.HP_status_calc_mdef_post > 0) { 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++ ) { + 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); } @@ -75951,14 +77781,14 @@ defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef2_pre ) { + if (HPMHooks.count.HP_status_calc_mdef2_pre > 0) { short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75966,9 +77796,9 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int { retVal___ = HPMHooks.source.status.calc_mdef2(bl, sc, mdef2, viewable); } - if( HPMHooks.count.HP_status_calc_mdef2_post ) { + if (HPMHooks.count.HP_status_calc_mdef2_post > 0) { 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++ ) { + 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); } @@ -75978,14 +77808,14 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_batk_pre ) { + if (HPMHooks.count.HP_status_calc_batk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75993,9 +77823,9 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * { retVal___ = HPMHooks.source.status.calc_batk(bl, sc, batk, viewable); } - if( HPMHooks.count.HP_status_calc_batk_post ) { + if (HPMHooks.count.HP_status_calc_batk_post > 0) { 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++ ) { + 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); } @@ -76005,14 +77835,14 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_matk_pre ) { + if (HPMHooks.count.HP_status_base_matk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; retVal___ = preHookFunc(&bl, &st, &level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76020,9 +77850,9 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da { retVal___ = HPMHooks.source.status.base_matk(bl, st, level); } - if( HPMHooks.count.HP_status_base_matk_post ) { + if (HPMHooks.count.HP_status_base_matk_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) { + 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___, bl, st, level); } @@ -76032,14 +77862,14 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_weapon_atk_pre ) { + if (HPMHooks.count.HP_status_get_weapon_atk_pre > 0) { int (*preHookFunc) (struct block_list **src, struct weapon_atk **watk, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76047,9 +77877,9 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in { retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag); } - if( HPMHooks.count.HP_status_get_weapon_atk_post ) { + if (HPMHooks.count.HP_status_get_weapon_atk_post > 0) { 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++ ) { + 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); } @@ -76059,14 +77889,14 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in int HP_status_get_total_mdef(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_mdef_pre ) { + if (HPMHooks.count.HP_status_get_total_mdef_pre > 0) { int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76074,9 +77904,9 @@ int HP_status_get_total_mdef(struct block_list *src) { { retVal___ = HPMHooks.source.status.get_total_mdef(src); } - if( HPMHooks.count.HP_status_get_total_mdef_post ) { + if (HPMHooks.count.HP_status_get_total_mdef_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) { + 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); } @@ -76086,14 +77916,14 @@ int HP_status_get_total_mdef(struct block_list *src) { int HP_status_get_total_def(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_def_pre ) { + if (HPMHooks.count.HP_status_get_total_def_pre > 0) { int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76101,9 +77931,9 @@ int HP_status_get_total_def(struct block_list *src) { { retVal___ = HPMHooks.source.status.get_total_def(src); } - if( HPMHooks.count.HP_status_get_total_def_post ) { + if (HPMHooks.count.HP_status_get_total_def_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) { + 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); } @@ -76113,14 +77943,14 @@ int HP_status_get_total_def(struct block_list *src) { int HP_status_get_matk(struct block_list *src, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_matk_pre ) { + if (HPMHooks.count.HP_status_get_matk_pre > 0) { int (*preHookFunc) (struct block_list **src, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76128,9 +77958,9 @@ int HP_status_get_matk(struct block_list *src, int flag) { { retVal___ = HPMHooks.source.status.get_matk(src, flag); } - if( HPMHooks.count.HP_status_get_matk_post ) { + if (HPMHooks.count.HP_status_get_matk_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_post; hIndex++ ) { + 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); } @@ -76139,14 +77969,14 @@ int HP_status_get_matk(struct block_list *src, int flag) { } void HP_status_update_matk(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_status_update_matk_pre ) { + if (HPMHooks.count.HP_status_update_matk_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_update_matk_pre[hIndex].func; preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -76154,9 +77984,9 @@ void HP_status_update_matk(struct block_list *bl) { { HPMHooks.source.status.update_matk(bl); } - if( HPMHooks.count.HP_status_update_matk_post ) { + if (HPMHooks.count.HP_status_update_matk_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_update_matk_post[hIndex].func; postHookFunc(bl); } @@ -76166,14 +77996,14 @@ void HP_status_update_matk(struct block_list *bl) { int HP_status_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_pre ) { + if (HPMHooks.count.HP_status_readdb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76181,9 +78011,9 @@ int HP_status_readdb(void) { { retVal___ = HPMHooks.source.status.readdb(); } - if( HPMHooks.count.HP_status_readdb_post ) { + if (HPMHooks.count.HP_status_readdb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76192,14 +78022,14 @@ int HP_status_readdb(void) { } void HP_status_initChangeTables(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_initChangeTables_pre ) { + if (HPMHooks.count.HP_status_initChangeTables_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -76207,9 +78037,9 @@ void HP_status_initChangeTables(void) { { HPMHooks.source.status.initChangeTables(); } - if( HPMHooks.count.HP_status_initChangeTables_post ) { + if (HPMHooks.count.HP_status_initChangeTables_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func; postHookFunc(); } @@ -76218,14 +78048,14 @@ void HP_status_initChangeTables(void) { } void HP_status_initDummyData(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_initDummyData_pre ) { + if (HPMHooks.count.HP_status_initDummyData_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -76233,9 +78063,9 @@ void HP_status_initDummyData(void) { { HPMHooks.source.status.initDummyData(); } - if( HPMHooks.count.HP_status_initDummyData_post ) { + if (HPMHooks.count.HP_status_initDummyData_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func; postHookFunc(); } @@ -76245,14 +78075,14 @@ void HP_status_initDummyData(void) { int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_base_amotion_pc_pre ) { + if (HPMHooks.count.HP_status_base_amotion_pc_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76260,9 +78090,9 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s { retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st); } - if( HPMHooks.count.HP_status_base_amotion_pc_post ) { + if (HPMHooks.count.HP_status_base_amotion_pc_post > 0) { 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++ ) { + 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); } @@ -76272,14 +78102,14 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s unsigned short HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_atk_pre ) { + if (HPMHooks.count.HP_status_base_atk_pre > 0) { unsigned short (*preHookFunc) (const struct block_list **bl, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76287,9 +78117,9 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat { retVal___ = HPMHooks.source.status.base_atk(bl, st); } - if( HPMHooks.count.HP_status_base_atk_post ) { + if (HPMHooks.count.HP_status_base_atk_post > 0) { 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++ ) { + 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); } @@ -76299,14 +78129,14 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxhp_pre ) { + if (HPMHooks.count.HP_status_get_base_maxhp_pre > 0) { unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_base_maxhp_pre[hIndex].func; retVal___ = preHookFunc(&sd, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76314,9 +78144,9 @@ unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const s { retVal___ = HPMHooks.source.status.get_base_maxhp(sd, st); } - if( HPMHooks.count.HP_status_get_base_maxhp_post ) { + if (HPMHooks.count.HP_status_get_base_maxhp_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_base_maxhp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } @@ -76326,14 +78156,14 @@ unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const s unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxsp_pre ) { + if (HPMHooks.count.HP_status_get_base_maxsp_pre > 0) { unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_base_maxsp_pre[hIndex].func; retVal___ = preHookFunc(&sd, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76341,9 +78171,9 @@ unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const s { retVal___ = HPMHooks.source.status.get_base_maxsp(sd, st); } - if( HPMHooks.count.HP_status_get_base_maxsp_post ) { + if (HPMHooks.count.HP_status_get_base_maxsp_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_base_maxsp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } @@ -76353,14 +78183,14 @@ unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const s int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_npc__pre ) { + if (HPMHooks.count.HP_status_calc_npc__pre > 0) { int (*preHookFunc) (struct npc_data **nd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) { + 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, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76368,9 +78198,9 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_npc_(nd, opt); } - if( HPMHooks.count.HP_status_calc_npc__post ) { + if (HPMHooks.count.HP_status_calc_npc__post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, enum e_status_calc_opt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) { + 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, opt); } @@ -76380,14 +78210,14 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_str_pre ) { + if (HPMHooks.count.HP_status_calc_str_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76395,9 +78225,9 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_str(bl, sc, str); } - if( HPMHooks.count.HP_status_calc_str_post ) { + if (HPMHooks.count.HP_status_calc_str_post > 0) { 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++ ) { + 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); } @@ -76407,14 +78237,14 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_agi_pre ) { + if (HPMHooks.count.HP_status_calc_agi_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *agi); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76422,9 +78252,9 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_agi(bl, sc, agi); } - if( HPMHooks.count.HP_status_calc_agi_post ) { + if (HPMHooks.count.HP_status_calc_agi_post > 0) { 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++ ) { + 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); } @@ -76434,14 +78264,14 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_vit_pre ) { + if (HPMHooks.count.HP_status_calc_vit_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *vit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76449,9 +78279,9 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_vit(bl, sc, vit); } - if( HPMHooks.count.HP_status_calc_vit_post ) { + if (HPMHooks.count.HP_status_calc_vit_post > 0) { 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++ ) { + 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); } @@ -76461,14 +78291,14 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_int_pre ) { + if (HPMHooks.count.HP_status_calc_int_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *int_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76476,9 +78306,9 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_int(bl, sc, int_); } - if( HPMHooks.count.HP_status_calc_int_post ) { + if (HPMHooks.count.HP_status_calc_int_post > 0) { 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++ ) { + 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_); } @@ -76488,14 +78318,14 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dex_pre ) { + if (HPMHooks.count.HP_status_calc_dex_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *dex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76503,9 +78333,9 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_dex(bl, sc, dex); } - if( HPMHooks.count.HP_status_calc_dex_post ) { + if (HPMHooks.count.HP_status_calc_dex_post > 0) { 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++ ) { + 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); } @@ -76515,14 +78345,14 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_luk_pre ) { + if (HPMHooks.count.HP_status_calc_luk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *luk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76530,9 +78360,9 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_luk(bl, sc, luk); } - if( HPMHooks.count.HP_status_calc_luk_post ) { + if (HPMHooks.count.HP_status_calc_luk_post > 0) { 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++ ) { + 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); } @@ -76542,14 +78372,14 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_watk_pre ) { + if (HPMHooks.count.HP_status_calc_watk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76557,9 +78387,9 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * { retVal___ = HPMHooks.source.status.calc_watk(bl, sc, watk, viewable); } - if( HPMHooks.count.HP_status_calc_watk_post ) { + if (HPMHooks.count.HP_status_calc_watk_post > 0) { 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++ ) { + 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); } @@ -76569,14 +78399,14 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_matk_pre ) { + if (HPMHooks.count.HP_status_calc_matk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76584,9 +78414,9 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * { retVal___ = HPMHooks.source.status.calc_matk(bl, sc, matk, viewable); } - if( HPMHooks.count.HP_status_calc_matk_post ) { + if (HPMHooks.count.HP_status_calc_matk_post > 0) { 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++ ) { + 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); } @@ -76596,14 +78426,14 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { int hIndex = 0; signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_hit_pre ) { + if (HPMHooks.count.HP_status_calc_hit_pre > 0) { signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76611,9 +78441,9 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, { retVal___ = HPMHooks.source.status.calc_hit(bl, sc, hit, viewable); } - if( HPMHooks.count.HP_status_calc_hit_post ) { + if (HPMHooks.count.HP_status_calc_hit_post > 0) { 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++ ) { + 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); } @@ -76623,14 +78453,14 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, signed short HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { int hIndex = 0; signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_critical_pre ) { + if (HPMHooks.count.HP_status_calc_critical_pre > 0) { signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76638,9 +78468,9 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change { retVal___ = HPMHooks.source.status.calc_critical(bl, sc, critical, viewable); } - if( HPMHooks.count.HP_status_calc_critical_post ) { + if (HPMHooks.count.HP_status_calc_critical_post > 0) { 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++ ) { + 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); } @@ -76650,14 +78480,14 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { int hIndex = 0; signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee_pre ) { + if (HPMHooks.count.HP_status_calc_flee_pre > 0) { signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76665,9 +78495,9 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc { retVal___ = HPMHooks.source.status.calc_flee(bl, sc, flee, viewable); } - if( HPMHooks.count.HP_status_calc_flee_post ) { + if (HPMHooks.count.HP_status_calc_flee_post > 0) { 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++ ) { + 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); } @@ -76677,14 +78507,14 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { int hIndex = 0; signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee2_pre ) { + if (HPMHooks.count.HP_status_calc_flee2_pre > 0) { signed short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76692,9 +78522,9 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_flee2(bl, sc, flee2, viewable); } - if( HPMHooks.count.HP_status_calc_flee2_post ) { + if (HPMHooks.count.HP_status_calc_flee2_post > 0) { 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++ ) { + 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); } @@ -76704,14 +78534,14 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_speed_pre ) { + if (HPMHooks.count.HP_status_calc_speed_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *speed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76719,9 +78549,9 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change { retVal___ = HPMHooks.source.status.calc_speed(bl, sc, speed); } - if( HPMHooks.count.HP_status_calc_speed_post ) { + if (HPMHooks.count.HP_status_calc_speed_post > 0) { 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++ ) { + 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); } @@ -76731,14 +78561,14 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) { + if (HPMHooks.count.HP_status_calc_aspd_rate_pre > 0) { short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *aspd_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76746,9 +78576,9 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, { retVal___ = HPMHooks.source.status.calc_aspd_rate(bl, sc, aspd_rate); } - if( HPMHooks.count.HP_status_calc_aspd_rate_post ) { + if (HPMHooks.count.HP_status_calc_aspd_rate_post > 0) { 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++ ) { + 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); } @@ -76758,14 +78588,14 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dmotion_pre ) { + if (HPMHooks.count.HP_status_calc_dmotion_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *dmotion); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76773,9 +78603,9 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang { retVal___ = HPMHooks.source.status.calc_dmotion(bl, sc, dmotion); } - if( HPMHooks.count.HP_status_calc_dmotion_post ) { + if (HPMHooks.count.HP_status_calc_dmotion_post > 0) { 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++ ) { + 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); } @@ -76785,14 +78615,14 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_pre ) { + if (HPMHooks.count.HP_status_calc_aspd_pre > 0) { short (*preHookFunc) (struct block_list **bl, struct status_change **sc, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76800,9 +78630,9 @@ short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short { retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag); } - if( HPMHooks.count.HP_status_calc_aspd_post ) { + if (HPMHooks.count.HP_status_calc_aspd_post > 0) { 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++ ) { + 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); } @@ -76812,14 +78642,14 @@ short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) { + if (HPMHooks.count.HP_status_calc_fix_aspd_pre > 0) { short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *aspd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76827,9 +78657,9 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i { retVal___ = HPMHooks.source.status.calc_fix_aspd(bl, sc, aspd); } - if( HPMHooks.count.HP_status_calc_fix_aspd_post ) { + if (HPMHooks.count.HP_status_calc_fix_aspd_post > 0) { 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++ ) { + 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); } @@ -76839,14 +78669,14 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxhp_pre ) { + if (HPMHooks.count.HP_status_calc_maxhp_pre > 0) { unsigned int (*preHookFunc) (struct block_list **bl, struct status_change **sc, uint64 *maxhp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76854,9 +78684,9 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_maxhp(bl, sc, maxhp); } - if( HPMHooks.count.HP_status_calc_maxhp_post ) { + if (HPMHooks.count.HP_status_calc_maxhp_post > 0) { 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++ ) { + 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); } @@ -76866,14 +78696,14 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxsp_pre ) { + if (HPMHooks.count.HP_status_calc_maxsp_pre > 0) { unsigned int (*preHookFunc) (struct block_list **bl, struct status_change **sc, unsigned int *maxsp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76881,9 +78711,9 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s { retVal___ = HPMHooks.source.status.calc_maxsp(bl, sc, maxsp); } - if( HPMHooks.count.HP_status_calc_maxsp_post ) { + if (HPMHooks.count.HP_status_calc_maxsp_post > 0) { 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++ ) { + 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); } @@ -76893,14 +78723,14 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_pre ) { + if (HPMHooks.count.HP_status_calc_element_pre > 0) { unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76908,9 +78738,9 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change { retVal___ = HPMHooks.source.status.calc_element(bl, sc, element); } - if( HPMHooks.count.HP_status_calc_element_post ) { + if (HPMHooks.count.HP_status_calc_element_post > 0) { 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++ ) { + 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); } @@ -76920,14 +78750,14 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_lv_pre ) { + if (HPMHooks.count.HP_status_calc_element_lv_pre > 0) { unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76935,9 +78765,9 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha { retVal___ = HPMHooks.source.status.calc_element_lv(bl, sc, lv); } - if( HPMHooks.count.HP_status_calc_element_lv_post ) { + if (HPMHooks.count.HP_status_calc_element_lv_post > 0) { 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++ ) { + 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); } @@ -76947,14 +78777,14 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_change *sc, uint32 mode) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mode_pre ) { + if (HPMHooks.count.HP_status_calc_mode_pre > 0) { uint32 (*preHookFunc) (const struct block_list **bl, const struct status_change **sc, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76962,9 +78792,9 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan { retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode); } - if( HPMHooks.count.HP_status_calc_mode_post ) { + if (HPMHooks.count.HP_status_calc_mode_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) { + 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); } @@ -76974,14 +78804,14 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_ematk_pre ) { + if (HPMHooks.count.HP_status_calc_ematk_pre > 0) { unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76989,9 +78819,9 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change { retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); } - if( HPMHooks.count.HP_status_calc_ematk_post ) { + if (HPMHooks.count.HP_status_calc_ematk_post > 0) { 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++ ) { + 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); } @@ -77000,14 +78830,14 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change } void HP_status_calc_bl_main(struct block_list *bl, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_bl_main_pre ) { + if (HPMHooks.count.HP_status_calc_bl_main_pre > 0) { void (*preHookFunc) (struct block_list **bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77015,9 +78845,9 @@ void HP_status_calc_bl_main(struct block_list *bl, int flag) { { HPMHooks.source.status.calc_bl_main(bl, flag); } - if( HPMHooks.count.HP_status_calc_bl_main_post ) { + if (HPMHooks.count.HP_status_calc_bl_main_post > 0) { void (*postHookFunc) (struct block_list *bl, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_post; hIndex++ ) { + 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); } @@ -77026,14 +78856,14 @@ void HP_status_calc_bl_main(struct block_list *bl, int flag) { } 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 ) { + if (HPMHooks.count.HP_status_display_add_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77041,9 +78871,9 @@ void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int d { HPMHooks.source.status.display_add(sd, type, dval1, dval2, dval3); } - if( HPMHooks.count.HP_status_display_add_post ) { + if (HPMHooks.count.HP_status_display_add_post > 0) { 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++ ) { + 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); } @@ -77052,14 +78882,14 @@ void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int d } 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 ) { + if (HPMHooks.count.HP_status_display_remove_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77067,9 +78897,9 @@ void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { { HPMHooks.source.status.display_remove(sd, type); } - if( HPMHooks.count.HP_status_display_remove_post ) { + if (HPMHooks.count.HP_status_display_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd, enum sc_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_post; hIndex++ ) { + 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); } @@ -77079,16 +78909,16 @@ void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { int HP_status_natural_heal(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_pre ) { + if (HPMHooks.count.HP_status_natural_heal_pre > 0) { int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77098,9 +78928,9 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_status_natural_heal_post ) { + if (HPMHooks.count.HP_status_natural_heal_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) { + 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); @@ -77112,14 +78942,14 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) { int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_timer_pre ) { + if (HPMHooks.count.HP_status_natural_heal_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77127,9 +78957,9 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.status.natural_heal_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_status_natural_heal_timer_post ) { + if (HPMHooks.count.HP_status_natural_heal_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) { + 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); } @@ -77139,14 +78969,14 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { bool HP_status_readdb_job2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_job2_pre ) { + if (HPMHooks.count.HP_status_readdb_job2_pre > 0) { bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77154,9 +78984,9 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) { { retVal___ = HPMHooks.source.status.readdb_job2(fields, columns, current); } - if( HPMHooks.count.HP_status_readdb_job2_post ) { + if (HPMHooks.count.HP_status_readdb_job2_post > 0) { bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_post; hIndex++ ) { + 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); } @@ -77166,14 +78996,14 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) { bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_sizefix_pre ) { + if (HPMHooks.count.HP_status_readdb_sizefix_pre > 0) { bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77181,9 +79011,9 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { { retVal___ = HPMHooks.source.status.readdb_sizefix(fields, columns, current); } - if( HPMHooks.count.HP_status_readdb_sizefix_post ) { + if (HPMHooks.count.HP_status_readdb_sizefix_post > 0) { bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_post; hIndex++ ) { + 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); } @@ -77193,14 +79023,14 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { int HP_status_readdb_refine_libconfig(const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_refine_libconfig_pre ) { + if (HPMHooks.count.HP_status_readdb_refine_libconfig_pre > 0) { int (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_pre[hIndex].func; retVal___ = preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77208,9 +79038,9 @@ int HP_status_readdb_refine_libconfig(const char *filename) { { retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename); } - if( HPMHooks.count.HP_status_readdb_refine_libconfig_post ) { + if (HPMHooks.count.HP_status_readdb_refine_libconfig_post > 0) { int (*postHookFunc) (int retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename); } @@ -77220,14 +79050,14 @@ int HP_status_readdb_refine_libconfig(const char *filename) { int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre ) { + if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre > 0) { int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func; retVal___ = preHookFunc(&r, &name, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77235,9 +79065,9 @@ int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char { retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source); } - if( HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post ) { + if (HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, r, name, source); } @@ -77247,14 +79077,14 @@ int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_scconfig_pre ) { + if (HPMHooks.count.HP_status_readdb_scconfig_pre > 0) { bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_pre; hIndex++ ) { + 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, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77262,9 +79092,9 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { { retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); } - if( HPMHooks.count.HP_status_readdb_scconfig_post ) { + if (HPMHooks.count.HP_status_readdb_scconfig_post > 0) { bool (*postHookFunc) (bool retVal___, char *fields[], int columns, int current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_scconfig_post; hIndex++ ) { + 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); } @@ -77273,14 +79103,14 @@ bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { } void HP_status_read_job_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_pre ) { + if (HPMHooks.count.HP_status_read_job_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_read_job_db_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77288,9 +79118,9 @@ void HP_status_read_job_db(void) { { HPMHooks.source.status.read_job_db(); } - if( HPMHooks.count.HP_status_read_job_db_post ) { + if (HPMHooks.count.HP_status_read_job_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_read_job_db_post[hIndex].func; postHookFunc(); } @@ -77299,14 +79129,14 @@ void HP_status_read_job_db(void) { } void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_t *jdb) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_sub_pre ) { + if (HPMHooks.count.HP_status_read_job_db_sub_pre > 0) { void (*preHookFunc) (int *idx, const char **name, struct config_setting_t **jdb); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func; preHookFunc(&idx, &name, &jdb); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77314,9 +79144,9 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ { HPMHooks.source.status.read_job_db_sub(idx, name, jdb); } - if( HPMHooks.count.HP_status_read_job_db_sub_post ) { + if (HPMHooks.count.HP_status_read_job_db_sub_post > 0) { void (*postHookFunc) (int idx, const char *name, struct config_setting_t *jdb); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func; postHookFunc(idx, name, jdb); } @@ -77325,14 +79155,14 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ } void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { int hIndex = 0; - if( HPMHooks.count.HP_status_set_sc_pre ) { + if (HPMHooks.count.HP_status_set_sc_pre > 0) { void (*preHookFunc) (uint16 *skill_id, sc_type *sc, int *icon, unsigned int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func; preHookFunc(&skill_id, &sc, &icon, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77340,9 +79170,9 @@ void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) { HPMHooks.source.status.set_sc(skill_id, sc, icon, flag); } - if( HPMHooks.count.HP_status_set_sc_post ) { + if (HPMHooks.count.HP_status_set_sc_post > 0) { void (*postHookFunc) (uint16 skill_id, sc_type sc, int icon, unsigned int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func; postHookFunc(skill_id, sc, icon, flag); } @@ -77351,14 +79181,14 @@ void HP_status_set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) } void HP_status_copy(struct status_data *a, const struct status_data *b) { int hIndex = 0; - if( HPMHooks.count.HP_status_copy_pre ) { + if (HPMHooks.count.HP_status_copy_pre > 0) { void (*preHookFunc) (struct status_data **a, const struct status_data **b); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_copy_pre[hIndex].func; preHookFunc(&a, &b); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77366,9 +79196,9 @@ void HP_status_copy(struct status_data *a, const struct status_data *b) { { HPMHooks.source.status.copy(a, b); } - if( HPMHooks.count.HP_status_copy_post ) { + if (HPMHooks.count.HP_status_copy_post > 0) { void (*postHookFunc) (struct status_data *a, const struct status_data *b); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_copy_post[hIndex].func; postHookFunc(a, b); } @@ -77378,14 +79208,14 @@ void HP_status_copy(struct status_data *a, const struct status_data *b) { unsigned short HP_status_base_matk_min(const struct status_data *st) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_matk_min_pre ) { + if (HPMHooks.count.HP_status_base_matk_min_pre > 0) { unsigned short (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func; retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77393,9 +79223,9 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { { retVal___ = HPMHooks.source.status.base_matk_min(st); } - if( HPMHooks.count.HP_status_base_matk_min_post ) { + if (HPMHooks.count.HP_status_base_matk_min_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -77405,14 +79235,14 @@ unsigned short HP_status_base_matk_min(const struct status_data *st) { unsigned short HP_status_base_matk_max(const struct status_data *st) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_matk_max_pre ) { + if (HPMHooks.count.HP_status_base_matk_max_pre > 0) { unsigned short (*preHookFunc) (const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func; retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77420,9 +79250,9 @@ unsigned short HP_status_base_matk_max(const struct status_data *st) { { retVal___ = HPMHooks.source.status.base_matk_max(st); } - if( HPMHooks.count.HP_status_base_matk_max_post ) { + if (HPMHooks.count.HP_status_base_matk_max_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -77432,14 +79262,14 @@ unsigned short HP_status_base_matk_max(const struct status_data *st) { /* storage_interface */ void HP_storage_reconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_storage_reconnect_pre ) { + if (HPMHooks.count.HP_storage_reconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77447,9 +79277,9 @@ void HP_storage_reconnect(void) { { HPMHooks.source.storage.reconnect(); } - if( HPMHooks.count.HP_storage_reconnect_post ) { + if (HPMHooks.count.HP_storage_reconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func; postHookFunc(); } @@ -77459,14 +79289,14 @@ void HP_storage_reconnect(void) { int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_delitem_pre ) { + if (HPMHooks.count.HP_storage_delitem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77474,9 +79304,9 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { { retVal___ = HPMHooks.source.storage.delitem(sd, n, amount); } - if( HPMHooks.count.HP_storage_delitem_post ) { + if (HPMHooks.count.HP_storage_delitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int n, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_post; hIndex++ ) { + 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); } @@ -77486,14 +79316,14 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { int HP_storage_open(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_open_pre ) { + if (HPMHooks.count.HP_storage_open_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77501,9 +79331,9 @@ int HP_storage_open(struct map_session_data *sd) { { retVal___ = HPMHooks.source.storage.open(sd); } - if( HPMHooks.count.HP_storage_open_post ) { + if (HPMHooks.count.HP_storage_open_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -77513,14 +79343,14 @@ int HP_storage_open(struct map_session_data *sd) { int HP_storage_add(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_add_pre ) { + if (HPMHooks.count.HP_storage_add_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77528,9 +79358,9 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.storage.add(sd, index, amount); } - if( HPMHooks.count.HP_storage_add_post ) { + if (HPMHooks.count.HP_storage_add_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_post; hIndex++ ) { + 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); } @@ -77540,14 +79370,14 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) { int HP_storage_get(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_get_pre ) { + if (HPMHooks.count.HP_storage_get_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77555,9 +79385,9 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.storage.get(sd, index, amount); } - if( HPMHooks.count.HP_storage_get_post ) { + if (HPMHooks.count.HP_storage_get_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_post; hIndex++ ) { + 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); } @@ -77567,14 +79397,14 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) { int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_additem_pre ) { + if (HPMHooks.count.HP_storage_additem_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77582,9 +79412,9 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int { retVal___ = HPMHooks.source.storage.additem(sd, item_data, amount); } - if( HPMHooks.count.HP_storage_additem_post ) { + if (HPMHooks.count.HP_storage_additem_post > 0) { 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++ ) { + 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); } @@ -77594,14 +79424,14 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_addfromcart_pre ) { + if (HPMHooks.count.HP_storage_addfromcart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77609,9 +79439,9 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.storage.addfromcart(sd, index, amount); } - if( HPMHooks.count.HP_storage_addfromcart_post ) { + if (HPMHooks.count.HP_storage_addfromcart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_post; hIndex++ ) { + 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); } @@ -77621,14 +79451,14 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_gettocart_pre ) { + if (HPMHooks.count.HP_storage_gettocart_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77636,9 +79466,9 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { { retVal___ = HPMHooks.source.storage.gettocart(sd, index, amount); } - if( HPMHooks.count.HP_storage_gettocart_post ) { + if (HPMHooks.count.HP_storage_gettocart_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, int index, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_post; hIndex++ ) { + 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); } @@ -77647,14 +79477,14 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { } void HP_storage_close(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_storage_close_pre ) { + if (HPMHooks.count.HP_storage_close_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77662,9 +79492,9 @@ void HP_storage_close(struct map_session_data *sd) { { HPMHooks.source.storage.close(sd); } - if( HPMHooks.count.HP_storage_close_post ) { + if (HPMHooks.count.HP_storage_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func; postHookFunc(sd); } @@ -77673,14 +79503,14 @@ void HP_storage_close(struct map_session_data *sd) { } void HP_storage_pc_quit(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_storage_pc_quit_pre ) { + if (HPMHooks.count.HP_storage_pc_quit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77688,9 +79518,9 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) { { HPMHooks.source.storage.pc_quit(sd, flag); } - if( HPMHooks.count.HP_storage_pc_quit_post ) { + if (HPMHooks.count.HP_storage_pc_quit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_post; hIndex++ ) { + 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); } @@ -77700,14 +79530,14 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) { int HP_storage_comp_item(const void *i1_, const void *i2_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_comp_item_pre ) { + if (HPMHooks.count.HP_storage_comp_item_pre > 0) { int (*preHookFunc) (const void **i1_, const void **i2_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77715,9 +79545,9 @@ int HP_storage_comp_item(const void *i1_, const void *i2_) { { retVal___ = HPMHooks.source.storage.comp_item(i1_, i2_); } - if( HPMHooks.count.HP_storage_comp_item_post ) { + if (HPMHooks.count.HP_storage_comp_item_post > 0) { int (*postHookFunc) (int retVal___, const void *i1_, const void *i2_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) { + 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_); } @@ -77726,14 +79556,14 @@ int HP_storage_comp_item(const void *i1_, const void *i2_) { } void HP_storage_sortitem(struct item *items, unsigned int size) { int hIndex = 0; - if( HPMHooks.count.HP_storage_sortitem_pre ) { + if (HPMHooks.count.HP_storage_sortitem_pre > 0) { void (*preHookFunc) (struct item **items, unsigned int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77741,9 +79571,9 @@ void HP_storage_sortitem(struct item *items, unsigned int size) { { HPMHooks.source.storage.sortitem(items, size); } - if( HPMHooks.count.HP_storage_sortitem_post ) { + if (HPMHooks.count.HP_storage_sortitem_post > 0) { void (*postHookFunc) (struct item *items, unsigned int size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_sortitem_post[hIndex].func; postHookFunc(items, size); } @@ -77753,16 +79583,16 @@ void HP_storage_sortitem(struct item *items, unsigned int size) { int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_reconnect_sub_pre ) { + if (HPMHooks.count.HP_storage_reconnect_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77772,9 +79602,9 @@ int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.storage.reconnect_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_storage_reconnect_sub_post ) { + if (HPMHooks.count.HP_storage_reconnect_sub_post > 0) { int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) { + 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); @@ -77787,14 +79617,14 @@ int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list ap) { StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77802,9 +79632,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77813,14 +79643,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77828,9 +79658,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -77840,16 +79670,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77859,9 +79689,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -77873,14 +79703,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77888,9 +79718,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -77900,14 +79730,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77915,9 +79745,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -77927,14 +79757,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77942,9 +79772,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -77954,14 +79784,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77969,9 +79799,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -77980,14 +79810,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77995,9 +79825,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -78006,14 +79836,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78021,9 +79851,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -78032,14 +79862,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78047,9 +79877,9 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } @@ -78060,14 +79890,14 @@ void HP_StrBuf_Free(StringBuf *self) { char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78075,9 +79905,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -78087,14 +79917,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78102,9 +79932,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -78114,14 +79944,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78129,9 +79959,9 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt, size); } @@ -78141,14 +79971,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78156,9 +79986,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -78168,14 +79998,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { + if (HPMHooks.count.HP_strlib_trim__pre > 0) { char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78183,9 +80013,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -78195,14 +80025,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78210,9 +80040,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -78222,14 +80052,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78237,9 +80067,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -78249,14 +80079,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78264,9 +80094,9 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -78276,14 +80106,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78291,9 +80121,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -78303,14 +80133,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78318,9 +80148,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -78330,14 +80160,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78345,9 +80175,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -78357,14 +80187,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78372,9 +80202,9 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; retVal___ = postHookFunc(retVal___, dst, src, n); } @@ -78384,14 +80214,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78399,9 +80229,9 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; retVal___ = postHookFunc(retVal___, string, maxlen); } @@ -78411,14 +80241,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { + if (HPMHooks.count.HP_strlib_strline__pre > 0) { int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78426,9 +80256,9 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { int (*postHookFunc) (int retVal___, const char *str, size_t pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, pos); } @@ -78438,14 +80268,14 @@ int HP_strlib_strline_(const char *str, size_t pos) { bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78453,9 +80283,9 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; retVal___ = postHookFunc(retVal___, output, input, count); } @@ -78466,14 +80296,14 @@ bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78481,9 +80311,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -78493,14 +80323,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { + if (HPMHooks.count.HP_sv_parse_pre > 0) { int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78508,9 +80338,9 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } @@ -78520,14 +80350,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { + if (HPMHooks.count.HP_sv_split_pre > 0) { int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78535,9 +80365,9 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { + if (HPMHooks.count.HP_sv_split_post > 0) { int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } @@ -78547,14 +80377,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78562,9 +80392,9 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } @@ -78574,14 +80404,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78589,9 +80419,9 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, out_dest, src, len); } @@ -78601,14 +80431,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78616,9 +80446,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -78628,14 +80458,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { + if (HPMHooks.count.HP_sv_readdb_pre > 0) { bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78643,9 +80473,9 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } @@ -78656,14 +80486,14 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78671,9 +80501,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78683,14 +80513,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78698,9 +80528,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78710,14 +80540,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78725,9 +80555,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78737,14 +80567,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78752,9 +80582,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78764,14 +80594,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78779,9 +80609,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78791,14 +80621,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78806,9 +80636,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78818,14 +80648,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78833,9 +80663,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78845,14 +80675,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78860,9 +80690,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78872,14 +80702,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78887,9 +80717,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78899,14 +80729,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78914,9 +80744,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78926,14 +80756,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78941,9 +80771,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78953,14 +80783,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78968,9 +80798,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -78980,14 +80810,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78995,9 +80825,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79007,14 +80837,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79022,9 +80852,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79033,14 +80863,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79048,9 +80878,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -79060,14 +80890,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79075,9 +80905,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79086,14 +80916,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79101,9 +80931,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -79112,14 +80942,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79127,9 +80957,9 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } @@ -79139,14 +80969,14 @@ void HP_sysinfo_final(void) { /* thread_interface */ void HP_thread_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_init_pre ) { + if (HPMHooks.count.HP_thread_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79154,9 +80984,9 @@ void HP_thread_init(void) { { HPMHooks.source.thread.init(); } - if( HPMHooks.count.HP_thread_init_post ) { + if (HPMHooks.count.HP_thread_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; postHookFunc(); } @@ -79165,14 +80995,14 @@ void HP_thread_init(void) { } void HP_thread_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_final_pre ) { + if (HPMHooks.count.HP_thread_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79180,9 +81010,9 @@ void HP_thread_final(void) { { HPMHooks.source.thread.final(); } - if( HPMHooks.count.HP_thread_final_post ) { + if (HPMHooks.count.HP_thread_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; postHookFunc(); } @@ -79192,14 +81022,14 @@ void HP_thread_final(void) { struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_pre ) { + if (HPMHooks.count.HP_thread_create_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79207,9 +81037,9 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { { retVal___ = HPMHooks.source.thread.create(entry_point, param); } - if( HPMHooks.count.HP_thread_create_post ) { + if (HPMHooks.count.HP_thread_create_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param); } @@ -79219,14 +81049,14 @@ struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_create_opt_pre ) { + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79234,9 +81064,9 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, { retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); } - if( HPMHooks.count.HP_thread_create_opt_post ) { + if (HPMHooks.count.HP_thread_create_opt_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); } @@ -79245,14 +81075,14 @@ struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, } void HP_thread_destroy(struct thread_handle *handle) { int hIndex = 0; - if( HPMHooks.count.HP_thread_destroy_pre ) { + if (HPMHooks.count.HP_thread_destroy_pre > 0) { void (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79260,9 +81090,9 @@ void HP_thread_destroy(struct thread_handle *handle) { { HPMHooks.source.thread.destroy(handle); } - if( HPMHooks.count.HP_thread_destroy_post ) { + if (HPMHooks.count.HP_thread_destroy_post > 0) { void (*postHookFunc) (struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; postHookFunc(handle); } @@ -79272,14 +81102,14 @@ void HP_thread_destroy(struct thread_handle *handle) { struct thread_handle* HP_thread_self(void) { int hIndex = 0; struct thread_handle* retVal___ = NULL; - if( HPMHooks.count.HP_thread_self_pre ) { + if (HPMHooks.count.HP_thread_self_pre > 0) { struct thread_handle* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79287,9 +81117,9 @@ struct thread_handle* HP_thread_self(void) { { retVal___ = HPMHooks.source.thread.self(); } - if( HPMHooks.count.HP_thread_self_post ) { + if (HPMHooks.count.HP_thread_self_post > 0) { struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79299,14 +81129,14 @@ struct thread_handle* HP_thread_self(void) { int HP_thread_get_tid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_thread_get_tid_pre ) { + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79314,9 +81144,9 @@ int HP_thread_get_tid(void) { { retVal___ = HPMHooks.source.thread.get_tid(); } - if( HPMHooks.count.HP_thread_get_tid_post ) { + if (HPMHooks.count.HP_thread_get_tid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79326,14 +81156,14 @@ int HP_thread_get_tid(void) { bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_thread_wait_pre ) { + if (HPMHooks.count.HP_thread_wait_pre > 0) { bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; retVal___ = preHookFunc(&handle, &out_exit_code); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79341,9 +81171,9 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { { retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); } - if( HPMHooks.count.HP_thread_wait_post ) { + if (HPMHooks.count.HP_thread_wait_post > 0) { bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle, out_exit_code); } @@ -79352,14 +81182,14 @@ bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { } void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { int hIndex = 0; - if( HPMHooks.count.HP_thread_prio_set_pre ) { + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; preHookFunc(&handle, &prio); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79367,9 +81197,9 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { HPMHooks.source.thread.prio_set(handle, prio); } - if( HPMHooks.count.HP_thread_prio_set_post ) { + if (HPMHooks.count.HP_thread_prio_set_post > 0) { void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; postHookFunc(handle, prio); } @@ -79379,14 +81209,14 @@ void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { int hIndex = 0; enum thread_priority retVal___ = THREADPRIO_NORMAL; - if( HPMHooks.count.HP_thread_prio_get_pre ) { + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { enum thread_priority (*preHookFunc) (struct thread_handle **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; retVal___ = preHookFunc(&handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79394,9 +81224,9 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { { retVal___ = HPMHooks.source.thread.prio_get(handle); } - if( HPMHooks.count.HP_thread_prio_get_post ) { + if (HPMHooks.count.HP_thread_prio_get_post > 0) { enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, handle); } @@ -79405,14 +81235,14 @@ enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { } void HP_thread_yield(void) { int hIndex = 0; - if( HPMHooks.count.HP_thread_yield_pre ) { + if (HPMHooks.count.HP_thread_yield_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79420,9 +81250,9 @@ void HP_thread_yield(void) { { HPMHooks.source.thread.yield(); } - if( HPMHooks.count.HP_thread_yield_post ) { + if (HPMHooks.count.HP_thread_yield_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; postHookFunc(); } @@ -79433,14 +81263,14 @@ void HP_thread_yield(void) { int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79448,9 +81278,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79460,14 +81290,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79475,9 +81305,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79487,14 +81317,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79502,9 +81332,9 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { + if (HPMHooks.count.HP_timer_add_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data); } @@ -79514,14 +81344,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79529,9 +81359,9 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } @@ -79541,14 +81371,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79556,9 +81386,9 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { + if (HPMHooks.count.HP_timer_get_post > 0) { const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid); } @@ -79568,14 +81398,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79583,9 +81413,9 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, int tid, TimerFunc func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, func); } @@ -79595,14 +81425,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79610,9 +81440,9 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -79622,14 +81452,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79637,9 +81467,9 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick); } @@ -79649,14 +81479,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79664,9 +81494,9 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { int (*postHookFunc) (int retVal___, TimerFunc func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, func, name); } @@ -79676,14 +81506,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79691,9 +81521,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -79703,14 +81533,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79718,9 +81548,9 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { int (*postHookFunc) (int retVal___, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; retVal___ = postHookFunc(retVal___, tick); } @@ -79729,14 +81559,14 @@ int HP_timer_perform(int64 tick) { } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79744,9 +81574,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -79755,14 +81585,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79770,9 +81600,9 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } @@ -79782,14 +81612,14 @@ void HP_timer_final(void) { /* trade_interface */ 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 ) { + if (HPMHooks.count.HP_trade_request_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **target_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79797,9 +81627,9 @@ void HP_trade_request(struct map_session_data *sd, struct map_session_data *targ { HPMHooks.source.trade.request(sd, target_sd); } - if( HPMHooks.count.HP_trade_request_post ) { + if (HPMHooks.count.HP_trade_request_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_request_post[hIndex].func; postHookFunc(sd, target_sd); } @@ -79808,14 +81638,14 @@ void HP_trade_request(struct map_session_data *sd, struct map_session_data *targ } void HP_trade_ack(struct map_session_data *sd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_trade_ack_pre ) { + if (HPMHooks.count.HP_trade_ack_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79823,9 +81653,9 @@ void HP_trade_ack(struct map_session_data *sd, int type) { { HPMHooks.source.trade.ack(sd, type); } - if( HPMHooks.count.HP_trade_ack_post ) { + if (HPMHooks.count.HP_trade_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_ack_post[hIndex].func; postHookFunc(sd, type); } @@ -79835,14 +81665,14 @@ void HP_trade_ack(struct map_session_data *sd, int type) { int HP_trade_check_impossible(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_trade_check_impossible_pre ) { + if (HPMHooks.count.HP_trade_check_impossible_pre > 0) { int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79850,9 +81680,9 @@ int HP_trade_check_impossible(struct map_session_data *sd) { { retVal___ = HPMHooks.source.trade.check_impossible(sd); } - if( HPMHooks.count.HP_trade_check_impossible_post ) { + if (HPMHooks.count.HP_trade_check_impossible_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_post; hIndex++ ) { + 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); } @@ -79862,14 +81692,14 @@ int HP_trade_check_impossible(struct map_session_data *sd) { int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_trade_check_pre ) { + if (HPMHooks.count.HP_trade_check_pre > 0) { int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79877,9 +81707,9 @@ int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.trade.check(sd, tsd); } - if( HPMHooks.count.HP_trade_check_post ) { + if (HPMHooks.count.HP_trade_check_post > 0) { 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++ ) { + 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); } @@ -79888,14 +81718,14 @@ int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { } void HP_trade_additem(struct map_session_data *sd, short index, short amount) { int hIndex = 0; - if( HPMHooks.count.HP_trade_additem_pre ) { + if (HPMHooks.count.HP_trade_additem_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, short *index, short *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79903,9 +81733,9 @@ void HP_trade_additem(struct map_session_data *sd, short index, short amount) { { HPMHooks.source.trade.additem(sd, index, amount); } - if( HPMHooks.count.HP_trade_additem_post ) { + if (HPMHooks.count.HP_trade_additem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short index, short amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_additem_post[hIndex].func; postHookFunc(sd, index, amount); } @@ -79914,14 +81744,14 @@ void HP_trade_additem(struct map_session_data *sd, short index, short amount) { } void HP_trade_addzeny(struct map_session_data *sd, int amount) { int hIndex = 0; - if( HPMHooks.count.HP_trade_addzeny_pre ) { + if (HPMHooks.count.HP_trade_addzeny_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79929,9 +81759,9 @@ void HP_trade_addzeny(struct map_session_data *sd, int amount) { { HPMHooks.source.trade.addzeny(sd, amount); } - if( HPMHooks.count.HP_trade_addzeny_post ) { + if (HPMHooks.count.HP_trade_addzeny_post > 0) { void (*postHookFunc) (struct map_session_data *sd, int amount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_addzeny_post[hIndex].func; postHookFunc(sd, amount); } @@ -79940,14 +81770,14 @@ void HP_trade_addzeny(struct map_session_data *sd, int amount) { } void HP_trade_ok(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_trade_ok_pre ) { + if (HPMHooks.count.HP_trade_ok_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79955,9 +81785,9 @@ void HP_trade_ok(struct map_session_data *sd) { { HPMHooks.source.trade.ok(sd); } - if( HPMHooks.count.HP_trade_ok_post ) { + if (HPMHooks.count.HP_trade_ok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_ok_post[hIndex].func; postHookFunc(sd); } @@ -79966,14 +81796,14 @@ void HP_trade_ok(struct map_session_data *sd) { } void HP_trade_cancel(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_trade_cancel_pre ) { + if (HPMHooks.count.HP_trade_cancel_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79981,9 +81811,9 @@ void HP_trade_cancel(struct map_session_data *sd) { { HPMHooks.source.trade.cancel(sd); } - if( HPMHooks.count.HP_trade_cancel_post ) { + if (HPMHooks.count.HP_trade_cancel_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_cancel_post[hIndex].func; postHookFunc(sd); } @@ -79992,14 +81822,14 @@ void HP_trade_cancel(struct map_session_data *sd) { } void HP_trade_commit(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_trade_commit_pre ) { + if (HPMHooks.count.HP_trade_commit_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -80007,9 +81837,9 @@ void HP_trade_commit(struct map_session_data *sd) { { HPMHooks.source.trade.commit(sd); } - if( HPMHooks.count.HP_trade_commit_post ) { + if (HPMHooks.count.HP_trade_commit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_commit_post[hIndex].func; postHookFunc(sd); } @@ -80020,14 +81850,14 @@ void HP_trade_commit(struct map_session_data *sd) { int HP_unit_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_init_pre ) { + if (HPMHooks.count.HP_unit_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80035,9 +81865,9 @@ int HP_unit_init(bool minimal) { { retVal___ = HPMHooks.source.unit.init(minimal); } - if( HPMHooks.count.HP_unit_init_post ) { + if (HPMHooks.count.HP_unit_init_post > 0) { int (*postHookFunc) (int retVal___, bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_init_post[hIndex].func; retVal___ = postHookFunc(retVal___, minimal); } @@ -80047,14 +81877,14 @@ int HP_unit_init(bool minimal) { int HP_unit_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_final_pre ) { + if (HPMHooks.count.HP_unit_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80062,9 +81892,9 @@ int HP_unit_final(void) { { retVal___ = HPMHooks.source.unit.final(); } - if( HPMHooks.count.HP_unit_final_post ) { + if (HPMHooks.count.HP_unit_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -80074,14 +81904,14 @@ int HP_unit_final(void) { 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 ) { + if (HPMHooks.count.HP_unit_bl2ud_pre > 0) { struct unit_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80089,9 +81919,9 @@ struct unit_data* HP_unit_bl2ud(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.bl2ud(bl); } - if( HPMHooks.count.HP_unit_bl2ud_post ) { + if (HPMHooks.count.HP_unit_bl2ud_post > 0) { struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_bl2ud_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -80101,14 +81931,14 @@ struct unit_data* HP_unit_bl2ud(struct block_list *bl) { 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 ) { + if (HPMHooks.count.HP_unit_bl2ud2_pre > 0) { struct unit_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80116,9 +81946,9 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.bl2ud2(bl); } - if( HPMHooks.count.HP_unit_bl2ud2_post ) { + if (HPMHooks.count.HP_unit_bl2ud2_post > 0) { struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_bl2ud2_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -80127,14 +81957,14 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) { } void HP_unit_init_ud(struct unit_data *ud) { int hIndex = 0; - if( HPMHooks.count.HP_unit_init_ud_pre ) { + if (HPMHooks.count.HP_unit_init_ud_pre > 0) { void (*preHookFunc) (struct unit_data **ud); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_init_ud_pre[hIndex].func; preHookFunc(&ud); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -80142,9 +81972,9 @@ void HP_unit_init_ud(struct unit_data *ud) { { HPMHooks.source.unit.init_ud(ud); } - if( HPMHooks.count.HP_unit_init_ud_post ) { + if (HPMHooks.count.HP_unit_init_ud_post > 0) { void (*postHookFunc) (struct unit_data *ud); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_init_ud_post[hIndex].func; postHookFunc(ud); } @@ -80154,14 +81984,14 @@ void HP_unit_init_ud(struct unit_data *ud) { int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_timer_pre ) { + if (HPMHooks.count.HP_unit_attack_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80169,9 +81999,9 @@ int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.attack_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_attack_timer_post ) { + if (HPMHooks.count.HP_unit_attack_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_post; hIndex++ ) { + 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); } @@ -80181,14 +82011,14 @@ int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) { + if (HPMHooks.count.HP_unit_walktoxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80196,9 +82026,9 @@ int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_walktoxy_timer_post ) { + if (HPMHooks.count.HP_unit_walktoxy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_post; hIndex++ ) { + 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); } @@ -80208,14 +82038,14 @@ int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { int HP_unit_walktoxy_sub(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_sub_pre ) { + if (HPMHooks.count.HP_unit_walktoxy_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80223,9 +82053,9 @@ int HP_unit_walktoxy_sub(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.walktoxy_sub(bl); } - if( HPMHooks.count.HP_unit_walktoxy_sub_post ) { + if (HPMHooks.count.HP_unit_walktoxy_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_post; hIndex++ ) { + 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); } @@ -80235,14 +82065,14 @@ int HP_unit_walktoxy_sub(struct block_list *bl) { int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) { + if (HPMHooks.count.HP_unit_delay_walktoxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80250,9 +82080,9 @@ int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_delay_walktoxy_timer_post ) { + if (HPMHooks.count.HP_unit_delay_walktoxy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_post; hIndex++ ) { + 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); } @@ -80262,14 +82092,14 @@ int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_pre ) { + if (HPMHooks.count.HP_unit_walktoxy_pre > 0) { int (*preHookFunc) (struct block_list **bl, short *x, short *y, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80277,9 +82107,9 @@ int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { { retVal___ = HPMHooks.source.unit.walktoxy(bl, x, y, flag); } - if( HPMHooks.count.HP_unit_walktoxy_post ) { + if (HPMHooks.count.HP_unit_walktoxy_post > 0) { 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++ ) { + 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); } @@ -80289,14 +82119,14 @@ int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktobl_sub_pre ) { + if (HPMHooks.count.HP_unit_walktobl_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80304,9 +82134,9 @@ int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_walktobl_sub_post ) { + if (HPMHooks.count.HP_unit_walktobl_sub_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_post; hIndex++ ) { + 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); } @@ -80316,14 +82146,14 @@ int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktobl_pre ) { + if (HPMHooks.count.HP_unit_walktobl_pre > 0) { int (*preHookFunc) (struct block_list **bl, struct block_list **tbl, int *range, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80331,9 +82161,9 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i { retVal___ = HPMHooks.source.unit.walktobl(bl, tbl, range, flag); } - if( HPMHooks.count.HP_unit_walktobl_post ) { + if (HPMHooks.count.HP_unit_walktobl_post > 0) { 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++ ) { + 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); } @@ -80343,14 +82173,14 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_type type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_unit_run_pre ) { + if (HPMHooks.count.HP_unit_run_pre > 0) { bool (*preHookFunc) (struct block_list **bl, struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_run_pre[hIndex].func; retVal___ = preHookFunc(&bl, &sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80358,9 +82188,9 @@ bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_typ { retVal___ = HPMHooks.source.unit.run(bl, sd, type); } - if( HPMHooks.count.HP_unit_run_post ) { + if (HPMHooks.count.HP_unit_run_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct map_session_data *sd, enum sc_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_run_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, sd, type); } @@ -80369,14 +82199,14 @@ bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_typ } void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type) { int hIndex = 0; - if( HPMHooks.count.HP_unit_run_hit_pre ) { + if (HPMHooks.count.HP_unit_run_hit_pre > 0) { void (*preHookFunc) (struct block_list **bl, struct status_change **sc, struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_run_hit_pre[hIndex].func; preHookFunc(&bl, &sc, &sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -80384,9 +82214,9 @@ void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map { HPMHooks.source.unit.run_hit(bl, sc, sd, type); } - if( HPMHooks.count.HP_unit_run_hit_post ) { + if (HPMHooks.count.HP_unit_run_hit_post > 0) { void (*postHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_run_hit_post[hIndex].func; postHookFunc(bl, sc, sd, type); } @@ -80396,14 +82226,14 @@ void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_escape_pre ) { + if (HPMHooks.count.HP_unit_escape_pre > 0) { int (*preHookFunc) (struct block_list **bl, struct block_list **target, short *dist); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80411,9 +82241,9 @@ int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) { retVal___ = HPMHooks.source.unit.escape(bl, target, dist); } - if( HPMHooks.count.HP_unit_escape_post ) { + if (HPMHooks.count.HP_unit_escape_post > 0) { 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++ ) { + 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); } @@ -80423,14 +82253,14 @@ int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_movepos_pre ) { + if (HPMHooks.count.HP_unit_movepos_pre > 0) { int (*preHookFunc) (struct block_list **bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80438,9 +82268,9 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b { retVal___ = HPMHooks.source.unit.movepos(bl, dst_x, dst_y, easy, checkpath); } - if( HPMHooks.count.HP_unit_movepos_post ) { + if (HPMHooks.count.HP_unit_movepos_post > 0) { 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++ ) { + 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); } @@ -80450,14 +82280,14 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b int HP_unit_setdir(struct block_list *bl, unsigned char dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_setdir_pre ) { + if (HPMHooks.count.HP_unit_setdir_pre > 0) { int (*preHookFunc) (struct block_list **bl, unsigned char *dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80465,9 +82295,9 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) { { retVal___ = HPMHooks.source.unit.setdir(bl, dir); } - if( HPMHooks.count.HP_unit_setdir_post ) { + if (HPMHooks.count.HP_unit_setdir_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_post; hIndex++ ) { + 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); } @@ -80477,14 +82307,14 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) { uint8 HP_unit_getdir(struct block_list *bl) { int hIndex = 0; uint8 retVal___ = 0; - if( HPMHooks.count.HP_unit_getdir_pre ) { + if (HPMHooks.count.HP_unit_getdir_pre > 0) { uint8 (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80492,9 +82322,9 @@ uint8 HP_unit_getdir(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.getdir(bl); } - if( HPMHooks.count.HP_unit_getdir_post ) { + if (HPMHooks.count.HP_unit_getdir_post > 0) { uint8 (*postHookFunc) (uint8 retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_getdir_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -80504,14 +82334,14 @@ uint8 HP_unit_getdir(struct block_list *bl) { int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_blown_pre ) { + if (HPMHooks.count.HP_unit_blown_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *dx, int *dy, int *count, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80519,9 +82349,9 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { { retVal___ = HPMHooks.source.unit.blown(bl, dx, dy, count, flag); } - if( HPMHooks.count.HP_unit_blown_post ) { + if (HPMHooks.count.HP_unit_blown_post > 0) { 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++ ) { + 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); } @@ -80531,14 +82361,14 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_warp_pre ) { + if (HPMHooks.count.HP_unit_warp_pre > 0) { int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80546,9 +82376,9 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type { retVal___ = HPMHooks.source.unit.warp(bl, m, x, y, type); } - if( HPMHooks.count.HP_unit_warp_post ) { + if (HPMHooks.count.HP_unit_warp_post > 0) { 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++ ) { + 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); } @@ -80558,14 +82388,14 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type int HP_unit_stop_walking(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_stop_walking_pre ) { + if (HPMHooks.count.HP_unit_stop_walking_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80573,9 +82403,9 @@ int HP_unit_stop_walking(struct block_list *bl, int type) { { retVal___ = HPMHooks.source.unit.stop_walking(bl, type); } - if( HPMHooks.count.HP_unit_stop_walking_post ) { + if (HPMHooks.count.HP_unit_stop_walking_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_post; hIndex++ ) { + 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); } @@ -80585,14 +82415,14 @@ int HP_unit_stop_walking(struct block_list *bl, int type) { int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_skilluse_id_pre ) { + if (HPMHooks.count.HP_unit_skilluse_id_pre > 0) { int (*preHookFunc) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80600,9 +82430,9 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, { retVal___ = HPMHooks.source.unit.skilluse_id(src, target_id, skill_id, skill_lv); } - if( HPMHooks.count.HP_unit_skilluse_id_post ) { + if (HPMHooks.count.HP_unit_skilluse_id_post > 0) { 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++ ) { + 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); } @@ -80612,14 +82442,14 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_step_timer_pre ) { + if (HPMHooks.count.HP_unit_step_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_step_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80627,9 +82457,9 @@ int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.step_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_step_timer_post ) { + if (HPMHooks.count.HP_unit_step_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_step_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } @@ -80638,14 +82468,14 @@ int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { } void HP_unit_stop_stepaction(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_unit_stop_stepaction_pre ) { + if (HPMHooks.count.HP_unit_stop_stepaction_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_stop_stepaction_pre[hIndex].func; preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -80653,9 +82483,9 @@ void HP_unit_stop_stepaction(struct block_list *bl) { { HPMHooks.source.unit.stop_stepaction(bl); } - if( HPMHooks.count.HP_unit_stop_stepaction_post ) { + if (HPMHooks.count.HP_unit_stop_stepaction_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_stop_stepaction_post[hIndex].func; postHookFunc(bl); } @@ -80665,14 +82495,14 @@ void HP_unit_stop_stepaction(struct block_list *bl) { int HP_unit_is_walking(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_is_walking_pre ) { + if (HPMHooks.count.HP_unit_is_walking_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80680,9 +82510,9 @@ int HP_unit_is_walking(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.is_walking(bl); } - if( HPMHooks.count.HP_unit_is_walking_post ) { + if (HPMHooks.count.HP_unit_is_walking_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_post; hIndex++ ) { + 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); } @@ -80692,14 +82522,14 @@ int HP_unit_is_walking(struct block_list *bl) { int HP_unit_can_move(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_can_move_pre ) { + if (HPMHooks.count.HP_unit_can_move_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80707,9 +82537,9 @@ int HP_unit_can_move(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.can_move(bl); } - if( HPMHooks.count.HP_unit_can_move_post ) { + if (HPMHooks.count.HP_unit_can_move_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_post; hIndex++ ) { + 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); } @@ -80719,14 +82549,14 @@ int HP_unit_can_move(struct block_list *bl) { int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_resume_running_pre ) { + if (HPMHooks.count.HP_unit_resume_running_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80734,9 +82564,9 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.resume_running(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_resume_running_post ) { + if (HPMHooks.count.HP_unit_resume_running_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_post; hIndex++ ) { + 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); } @@ -80746,14 +82576,14 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_set_walkdelay_pre ) { + if (HPMHooks.count.HP_unit_set_walkdelay_pre > 0) { int (*preHookFunc) (struct block_list **bl, int64 *tick, int *delay, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80761,9 +82591,9 @@ int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type { retVal___ = HPMHooks.source.unit.set_walkdelay(bl, tick, delay, type); } - if( HPMHooks.count.HP_unit_set_walkdelay_post ) { + if (HPMHooks.count.HP_unit_set_walkdelay_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int64 tick, int delay, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_post; hIndex++ ) { + 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); } @@ -80773,14 +82603,14 @@ int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type 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___ = 0; - if( HPMHooks.count.HP_unit_skilluse_id2_pre ) { + if (HPMHooks.count.HP_unit_skilluse_id2_pre > 0) { int (*preHookFunc) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80788,9 +82618,9 @@ int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, { retVal___ = HPMHooks.source.unit.skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel); } - if( HPMHooks.count.HP_unit_skilluse_id2_post ) { + if (HPMHooks.count.HP_unit_skilluse_id2_post > 0) { 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++ ) { + 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); } @@ -80800,14 +82630,14 @@ int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, 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___ = 0; - if( HPMHooks.count.HP_unit_skilluse_pos_pre ) { + if (HPMHooks.count.HP_unit_skilluse_pos_pre > 0) { int (*preHookFunc) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80815,9 +82645,9 @@ int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, u { retVal___ = HPMHooks.source.unit.skilluse_pos(src, skill_x, skill_y, skill_id, skill_lv); } - if( HPMHooks.count.HP_unit_skilluse_pos_post ) { + if (HPMHooks.count.HP_unit_skilluse_pos_post > 0) { 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++ ) { + 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); } @@ -80827,14 +82657,14 @@ int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, u 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___ = 0; - if( HPMHooks.count.HP_unit_skilluse_pos2_pre ) { + if (HPMHooks.count.HP_unit_skilluse_pos2_pre > 0) { int (*preHookFunc) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80842,9 +82672,9 @@ int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, { 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 ) { + if (HPMHooks.count.HP_unit_skilluse_pos2_post > 0) { 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++ ) { + 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); } @@ -80854,14 +82684,14 @@ int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, int HP_unit_set_target(struct unit_data *ud, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_set_target_pre ) { + if (HPMHooks.count.HP_unit_set_target_pre > 0) { int (*preHookFunc) (struct unit_data **ud, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80869,9 +82699,9 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) { { retVal___ = HPMHooks.source.unit.set_target(ud, target_id); } - if( HPMHooks.count.HP_unit_set_target_post ) { + if (HPMHooks.count.HP_unit_set_target_post > 0) { int (*postHookFunc) (int retVal___, struct unit_data *ud, int target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_post; hIndex++ ) { + 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); } @@ -80880,14 +82710,14 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) { } void HP_unit_stop_attack(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_unit_stop_attack_pre ) { + if (HPMHooks.count.HP_unit_stop_attack_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func; preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -80895,9 +82725,9 @@ void HP_unit_stop_attack(struct block_list *bl) { { HPMHooks.source.unit.stop_attack(bl); } - if( HPMHooks.count.HP_unit_stop_attack_post ) { + if (HPMHooks.count.HP_unit_stop_attack_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func; postHookFunc(bl); } @@ -80907,14 +82737,14 @@ void HP_unit_stop_attack(struct block_list *bl) { int HP_unit_unattackable(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_unattackable_pre ) { + if (HPMHooks.count.HP_unit_unattackable_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80922,9 +82752,9 @@ int HP_unit_unattackable(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.unattackable(bl); } - if( HPMHooks.count.HP_unit_unattackable_post ) { + if (HPMHooks.count.HP_unit_unattackable_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_unattackable_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -80934,14 +82764,14 @@ int HP_unit_unattackable(struct block_list *bl) { int HP_unit_attack(struct block_list *src, int target_id, int continuous) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_pre ) { + if (HPMHooks.count.HP_unit_attack_pre > 0) { int (*preHookFunc) (struct block_list **src, int *target_id, int *continuous); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80949,9 +82779,9 @@ int HP_unit_attack(struct block_list *src, int target_id, int continuous) { { retVal___ = HPMHooks.source.unit.attack(src, target_id, continuous); } - if( HPMHooks.count.HP_unit_attack_post ) { + if (HPMHooks.count.HP_unit_attack_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, int target_id, int continuous); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_post; hIndex++ ) { + 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); } @@ -80961,14 +82791,14 @@ int HP_unit_attack(struct block_list *src, int target_id, int continuous) { int HP_unit_cancel_combo(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_cancel_combo_pre ) { + if (HPMHooks.count.HP_unit_cancel_combo_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -80976,9 +82806,9 @@ int HP_unit_cancel_combo(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.cancel_combo(bl); } - if( HPMHooks.count.HP_unit_cancel_combo_post ) { + if (HPMHooks.count.HP_unit_cancel_combo_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_post; hIndex++ ) { + 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); } @@ -80988,14 +82818,14 @@ int HP_unit_cancel_combo(struct block_list *bl) { bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_unit_can_reach_pos_pre ) { + if (HPMHooks.count.HP_unit_can_reach_pos_pre > 0) { bool (*preHookFunc) (struct block_list **bl, int *x, int *y, int *easy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81003,9 +82833,9 @@ bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { { retVal___ = HPMHooks.source.unit.can_reach_pos(bl, x, y, easy); } - if( HPMHooks.count.HP_unit_can_reach_pos_post ) { + if (HPMHooks.count.HP_unit_can_reach_pos_post > 0) { 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++ ) { + 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); } @@ -81015,14 +82845,14 @@ bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { 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___ = false; - if( HPMHooks.count.HP_unit_can_reach_bl_pre ) { + if (HPMHooks.count.HP_unit_can_reach_bl_pre > 0) { bool (*preHookFunc) (struct block_list **bl, struct block_list **tbl, int *range, int *easy, short **x, short **y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81030,9 +82860,9 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran { retVal___ = HPMHooks.source.unit.can_reach_bl(bl, tbl, range, easy, x, y); } - if( HPMHooks.count.HP_unit_can_reach_bl_post ) { + if (HPMHooks.count.HP_unit_can_reach_bl_post > 0) { 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++ ) { + 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); } @@ -81042,14 +82872,14 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_calc_pos_pre ) { + if (HPMHooks.count.HP_unit_calc_pos_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, uint8 *dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81057,9 +82887,9 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { { retVal___ = HPMHooks.source.unit.calc_pos(bl, tx, ty, dir); } - if( HPMHooks.count.HP_unit_calc_pos_post ) { + if (HPMHooks.count.HP_unit_calc_pos_post > 0) { 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++ ) { + 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); } @@ -81069,14 +82899,14 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) { + if (HPMHooks.count.HP_unit_attack_timer_sub_pre > 0) { int (*preHookFunc) (struct block_list **src, int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81084,9 +82914,9 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { { retVal___ = HPMHooks.source.unit.attack_timer_sub(src, tid, tick); } - if( HPMHooks.count.HP_unit_attack_timer_sub_post ) { + if (HPMHooks.count.HP_unit_attack_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, int tid, int64 tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_post; hIndex++ ) { + 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); } @@ -81096,14 +82926,14 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { int HP_unit_skillcastcancel(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_skillcastcancel_pre ) { + if (HPMHooks.count.HP_unit_skillcastcancel_pre > 0) { int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81111,9 +82941,9 @@ int HP_unit_skillcastcancel(struct block_list *bl, int type) { { retVal___ = HPMHooks.source.unit.skillcastcancel(bl, type); } - if( HPMHooks.count.HP_unit_skillcastcancel_post ) { + if (HPMHooks.count.HP_unit_skillcastcancel_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, int type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_post; hIndex++ ) { + 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); } @@ -81122,14 +82952,14 @@ int HP_unit_skillcastcancel(struct block_list *bl, int type) { } void HP_unit_dataset(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_unit_dataset_pre ) { + if (HPMHooks.count.HP_unit_dataset_pre > 0) { void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81137,9 +82967,9 @@ void HP_unit_dataset(struct block_list *bl) { { HPMHooks.source.unit.dataset(bl); } - if( HPMHooks.count.HP_unit_dataset_post ) { + if (HPMHooks.count.HP_unit_dataset_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_dataset_post[hIndex].func; postHookFunc(bl); } @@ -81149,14 +82979,14 @@ void HP_unit_dataset(struct block_list *bl) { int HP_unit_counttargeted(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_counttargeted_pre ) { + if (HPMHooks.count.HP_unit_counttargeted_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81164,9 +82994,9 @@ int HP_unit_counttargeted(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.counttargeted(bl); } - if( HPMHooks.count.HP_unit_counttargeted_post ) { + if (HPMHooks.count.HP_unit_counttargeted_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_counttargeted_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -81176,14 +83006,14 @@ int HP_unit_counttargeted(struct block_list *bl) { int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_fixdamage_pre ) { + if (HPMHooks.count.HP_unit_fixdamage_pre > 0) { int (*preHookFunc) (struct block_list **src, struct block_list **target, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func; retVal___ = preHookFunc(&src, &target, &sdelay, &ddelay, &damage, &div, &type, &damage2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81191,9 +83021,9 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sde { retVal___ = HPMHooks.source.unit.fixdamage(src, target, sdelay, ddelay, damage, div, type, damage2); } - if( HPMHooks.count.HP_unit_fixdamage_post ) { + if (HPMHooks.count.HP_unit_fixdamage_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_post; hIndex++ ) { + 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, sdelay, ddelay, damage, div, type, damage2); } @@ -81203,14 +83033,14 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sde int HP_unit_changeviewsize(struct block_list *bl, short size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_changeviewsize_pre ) { + if (HPMHooks.count.HP_unit_changeviewsize_pre > 0) { int (*preHookFunc) (struct block_list **bl, short *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81218,9 +83048,9 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) { { retVal___ = HPMHooks.source.unit.changeviewsize(bl, size); } - if( HPMHooks.count.HP_unit_changeviewsize_post ) { + if (HPMHooks.count.HP_unit_changeviewsize_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, short size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_post; hIndex++ ) { + 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); } @@ -81230,14 +83060,14 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) { 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___ = 0; - if( HPMHooks.count.HP_unit_remove_map_pre ) { + if (HPMHooks.count.HP_unit_remove_map_pre > 0) { int (*preHookFunc) (struct block_list **bl, clr_type *clrtype, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81245,9 +83075,9 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file { retVal___ = HPMHooks.source.unit.remove_map(bl, clrtype, file, line, func); } - if( HPMHooks.count.HP_unit_remove_map_post ) { + if (HPMHooks.count.HP_unit_remove_map_post > 0) { 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++ ) { + 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); } @@ -81256,14 +83086,14 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file } 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 ) { + if (HPMHooks.count.HP_unit_remove_map_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81271,9 +83101,9 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { { HPMHooks.source.unit.remove_map_pc(sd, clrtype); } - if( HPMHooks.count.HP_unit_remove_map_pc_post ) { + if (HPMHooks.count.HP_unit_remove_map_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, clr_type clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_post; hIndex++ ) { + 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); } @@ -81282,14 +83112,14 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { } void HP_unit_free_pc(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_unit_free_pc_pre ) { + if (HPMHooks.count.HP_unit_free_pc_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81297,9 +83127,9 @@ void HP_unit_free_pc(struct map_session_data *sd) { { HPMHooks.source.unit.free_pc(sd); } - if( HPMHooks.count.HP_unit_free_pc_post ) { + if (HPMHooks.count.HP_unit_free_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_free_pc_post[hIndex].func; postHookFunc(sd); } @@ -81309,14 +83139,14 @@ void HP_unit_free_pc(struct map_session_data *sd) { int HP_unit_free(struct block_list *bl, clr_type clrtype) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_free_pre ) { + if (HPMHooks.count.HP_unit_free_pre > 0) { int (*preHookFunc) (struct block_list **bl, clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81324,9 +83154,9 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) { { retVal___ = HPMHooks.source.unit.free(bl, clrtype); } - if( HPMHooks.count.HP_unit_free_post ) { + if (HPMHooks.count.HP_unit_free_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, clr_type clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_post; hIndex++ ) { + 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); } @@ -81336,14 +83166,14 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) { /* vending_interface */ void HP_vending_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_vending_init_pre ) { + if (HPMHooks.count.HP_vending_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81351,9 +83181,9 @@ void HP_vending_init(bool minimal) { { HPMHooks.source.vending.init(minimal); } - if( HPMHooks.count.HP_vending_init_post ) { + if (HPMHooks.count.HP_vending_init_post > 0) { void (*postHookFunc) (bool minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_init_post[hIndex].func; postHookFunc(minimal); } @@ -81362,14 +83192,14 @@ void HP_vending_init(bool minimal) { } void HP_vending_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_vending_final_pre ) { + if (HPMHooks.count.HP_vending_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81377,9 +83207,9 @@ void HP_vending_final(void) { { HPMHooks.source.vending.final(); } - if( HPMHooks.count.HP_vending_final_post ) { + if (HPMHooks.count.HP_vending_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_final_post[hIndex].func; postHookFunc(); } @@ -81388,14 +83218,14 @@ void HP_vending_final(void) { } void HP_vending_close(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_vending_close_pre ) { + if (HPMHooks.count.HP_vending_close_pre > 0) { void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81403,9 +83233,9 @@ void HP_vending_close(struct map_session_data *sd) { { HPMHooks.source.vending.close(sd); } - if( HPMHooks.count.HP_vending_close_post ) { + if (HPMHooks.count.HP_vending_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_close_post[hIndex].func; postHookFunc(sd); } @@ -81414,14 +83244,14 @@ void HP_vending_close(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_vending_open_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, const char **message, const uint8 **data, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81429,9 +83259,9 @@ void HP_vending_open(struct map_session_data *sd, const char *message, const uin { HPMHooks.source.vending.open(sd, message, data, count); } - if( HPMHooks.count.HP_vending_open_post ) { + if (HPMHooks.count.HP_vending_open_post > 0) { 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++ ) { + 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); } @@ -81440,14 +83270,14 @@ void HP_vending_open(struct map_session_data *sd, const char *message, const uin } void HP_vending_list(struct map_session_data *sd, unsigned int id) { int hIndex = 0; - if( HPMHooks.count.HP_vending_list_pre ) { + if (HPMHooks.count.HP_vending_list_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, unsigned int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81455,9 +83285,9 @@ void HP_vending_list(struct map_session_data *sd, unsigned int id) { { HPMHooks.source.vending.list(sd, id); } - if( HPMHooks.count.HP_vending_list_post ) { + if (HPMHooks.count.HP_vending_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd, unsigned int id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_list_post[hIndex].func; postHookFunc(sd, id); } @@ -81466,14 +83296,14 @@ void HP_vending_list(struct map_session_data *sd, unsigned int id) { } 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 ) { + if (HPMHooks.count.HP_vending_purchase_pre > 0) { void (*preHookFunc) (struct map_session_data **sd, int *aid, unsigned int *uid, const uint8 **data, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -81481,9 +83311,9 @@ void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, { HPMHooks.source.vending.purchase(sd, aid, uid, data, count); } - if( HPMHooks.count.HP_vending_purchase_post ) { + if (HPMHooks.count.HP_vending_purchase_post > 0) { 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++ ) { + 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); } @@ -81493,14 +83323,14 @@ void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_vending_search_pre ) { + if (HPMHooks.count.HP_vending_search_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, unsigned short *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81508,9 +83338,9 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { { retVal___ = HPMHooks.source.vending.search(sd, nameid); } - if( HPMHooks.count.HP_vending_search_post ) { + if (HPMHooks.count.HP_vending_search_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned short nameid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_post; hIndex++ ) { + 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); } @@ -81520,14 +83350,14 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_vending_searchall_pre ) { + if (HPMHooks.count.HP_vending_searchall_pre > 0) { bool (*preHookFunc) (struct map_session_data **sd, const struct s_search_store_search **s); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -81535,9 +83365,9 @@ bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_sto { retVal___ = HPMHooks.source.vending.searchall(sd, s); } - if( HPMHooks.count.HP_vending_searchall_post ) { + if (HPMHooks.count.HP_vending_searchall_post > 0) { 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++ ) { + 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); } diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index 54861ed6f..ada63e53d 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2017 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,67 +25,67 @@ /* GENERATED FILE DO NOT EDIT */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -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.channel, channel, sizeof(struct channel_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.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); -memcpy(&HPMHooks.source.des, des, sizeof(struct des_interface)); -memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface)); -memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface)); -memcpy(&HPMHooks.source.grfio, grfio, sizeof(struct grfio_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.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface)); -memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface)); -memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface)); -memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface)); -memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface)); -memcpy(&HPMHooks.source.md5, md5, sizeof(struct md5_interface)); -memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface)); -memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface)); -memcpy(&HPMHooks.source.mutex, mutex, sizeof(struct mutex_interface)); -memcpy(&HPMHooks.source.npc_chat, npc_chat, sizeof(struct npc_chat_interface)); -memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface)); -memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface)); -memcpy(&HPMHooks.source.pcg, pcg, sizeof(struct pc_groups_interface)); -memcpy(&HPMHooks.source.pc, pc, sizeof(struct pc_interface)); -memcpy(&HPMHooks.source.libpcre, libpcre, sizeof(struct pcre_interface)); -memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface)); -memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface)); -memcpy(&HPMHooks.source.rnd, rnd, sizeof(struct rnd_interface)); -memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface)); -memcpy(&HPMHooks.source.searchstore, searchstore, sizeof(struct searchstore_interface)); -memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface)); -memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.thread, thread, sizeof(struct thread_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_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)); +HPMHooks.source.HCache = *HCache; +HPMHooks.source.atcommand = *atcommand; +HPMHooks.source.battle = *battle; +HPMHooks.source.bg = *bg; +HPMHooks.source.buyingstore = *buyingstore; +HPMHooks.source.channel = *channel; +HPMHooks.source.chat = *chat; +HPMHooks.source.chrif = *chrif; +HPMHooks.source.clif = *clif; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.duel = *duel; +HPMHooks.source.elemental = *elemental; +HPMHooks.source.grfio = *grfio; +HPMHooks.source.guild = *guild; +HPMHooks.source.gstorage = *gstorage; +HPMHooks.source.homun = *homun; +HPMHooks.source.instance = *instance; +HPMHooks.source.intif = *intif; +HPMHooks.source.ircbot = *ircbot; +HPMHooks.source.itemdb = *itemdb; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.logs = *logs; +HPMHooks.source.mail = *mail; +HPMHooks.source.map = *map; +HPMHooks.source.mapindex = *mapindex; +HPMHooks.source.mapit = *mapit; +HPMHooks.source.mapreg = *mapreg; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mercenary = *mercenary; +HPMHooks.source.mob = *mob; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.npc_chat = *npc_chat; +HPMHooks.source.npc = *npc; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.party = *party; +HPMHooks.source.path = *path; +HPMHooks.source.pcg = *pcg; +HPMHooks.source.pc = *pc; +HPMHooks.source.libpcre = *libpcre; +HPMHooks.source.pet = *pet; +HPMHooks.source.quest = *quest; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.rodex = *rodex; +HPMHooks.source.script = *script; +HPMHooks.source.searchstore = *searchstore; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.skill = *skill; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.status = *status; +HPMHooks.source.storage = *storage; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; +HPMHooks.source.trade = *trade; +HPMHooks.source.unit = *unit; +HPMHooks.source.vending = *vending; diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index af5ab99af..38e5ead5d 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -255,6 +255,9 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // type StrBuf->Printf(&buf, "'%d',", it->flag.delay_consume ? IT_DELAYCONSUME : it->type); + // subtype + StrBuf->Printf(&buf, "'%d',", it->subtype); + // price_buy StrBuf->Printf(&buf, "'%d',", it->value_buy); @@ -294,10 +297,11 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) StrBuf->Printf(&buf, "'%"PRIu64"',", ui64); // equip_upper - if (libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0) + if (itemdb->lookup_const_mask(entry, "Upper", &i32) && i32 >= 0) ui32 = (uint32)i32; else ui32 = ITEMUPPER_ALL; + StrBuf->Printf(&buf, "'%u',", ui32); // equip_genders @@ -321,8 +325,11 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // refineable StrBuf->Printf(&buf, "'%d',", it->flag.no_refine?0:1); - // view - StrBuf->Printf(&buf, "'%d',", it->look); + // disable_options + StrBuf->Printf(&buf, "'%d',", it->flag.no_options?1:0); + + // view_sprite + StrBuf->Printf(&buf, "'%d',", it->view_sprite); // bindonequip StrBuf->Printf(&buf, "'%d',", it->flag.bindonequip?1:0); @@ -446,6 +453,7 @@ void itemdb2sql_tableheader(void) " `name_english` varchar(50) NOT NULL DEFAULT '',\n" " `name_japanese` varchar(50) NOT NULL DEFAULT '',\n" " `type` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',\n" + " `subtype` tinyint(2) UNSIGNED DEFAULT NULL,\n" " `price_buy` mediumint(10) DEFAULT NULL,\n" " `price_sell` mediumint(10) DEFAULT NULL,\n" " `weight` smallint(5) UNSIGNED DEFAULT NULL,\n" @@ -457,12 +465,13 @@ void itemdb2sql_tableheader(void) " `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL,\n" " `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL,\n" " `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL,\n" - " `equip_locations` smallint(4) UNSIGNED DEFAULT NULL,\n" + " `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL,\n" " `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL,\n" " `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,\n" " `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,\n" " `refineable` tinyint(1) UNSIGNED DEFAULT NULL,\n" - " `view` smallint(3) UNSIGNED DEFAULT NULL,\n" + " `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,\n" + " `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,\n" " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,\n" diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index cf8be0901..78517419f 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify diff --git a/src/test/Makefile.in b/src/test/Makefile.in index c8006e5cf..3e7549943 100644 --- a/src/test/Makefile.in +++ b/src/test/Makefile.in @@ -87,8 +87,8 @@ $(TESTS_ALL): test_%: ../../test_%@EXEEXT@ ../../test_%@EXEEXT@: obj/test_%.o $(TEST_DEPENDS) Makefile @echo " LD $(notdir $@)" - @$(CC) @STATIC@ @LDFLAGS@ -o $@ $< $(COMMON_D)/obj_sql/common_sql.a \ - $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + @$(CC) @STATIC@ @LDFLAGS@ -o $@ $< $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \ + $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ # object files diff --git a/src/test/test_libconfig.c b/src/test/test_libconfig.c index e0a470e21..e1a767195 100644 --- a/src/test/test_libconfig.c +++ b/src/test/test_libconfig.c @@ -86,6 +86,8 @@ static const char *test_libconfig_init_destroy(void) static const char *test_libconfig_read_file_src(void) { struct config_t config; + libconfig->init(&config); + #define FILENAME "src/test/libconfig/test.conf" if (libconfig->read_file_src(&config, FILENAME) == CONFIG_FALSE) { libconfig->destroy(&config); @@ -108,6 +110,9 @@ static const char *test_libconfig_read(void) if (!fp) { return "File not found: '" FILENAME "'."; } + + libconfig->init(&config); + if (libconfig->read(&config, fp) == CONFIG_FALSE) { fclose(fp); libconfig->destroy(&config); @@ -154,6 +159,8 @@ static const char *test_libconfig_write_file(void) static const char *test_libconfig_read_string(void) { struct config_t config; + libconfig->init(&config); + if (libconfig->read_string(&config, "") == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to read from string."; @@ -180,6 +187,8 @@ static const char *test_libconfig_syntax(void) "Setting_List: ( );\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to read from string."; @@ -216,6 +225,8 @@ static const char *test_libconfig_lookup(void) "Setting_List: ( );\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -278,6 +289,8 @@ static const char *test_libconfig_setting_get(void) "Setting_List: ( );\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -366,8 +379,8 @@ static const char *test_libconfig_setting_get(void) static const char *test_libconfig_set(void) { - //int (*setting_set_int) (struct config_setting_t *setting ,int value); - //int (*setting_set_int64) (struct config_setting_t *setting, long long value); + //int (*setting_set_int) (struct config_setting_t *setting, int value); + //int (*setting_set_int64) (struct config_setting_t *setting, int64 value); //int (*setting_set_float) (struct config_setting_t *setting, double value); //int (*setting_set_bool) (struct config_setting_t *setting, int value); //int (*setting_set_string) (struct config_setting_t *setting, const char *value); @@ -392,6 +405,8 @@ static const char *test_libconfig_setting_lookup(void) "Setting_List: ( );\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -442,6 +457,8 @@ static const char *test_libconfig_setting_types(void) "Setting_List: ( );\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -536,6 +553,8 @@ static const char *test_libconfig_values(void) "Setting_IntSignedMax: 0x7fffffff;\n" "/* End test file */\n"; + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -599,6 +618,9 @@ static const char *test_libconfig_path_lookup(void) " 10,\n" ");\n" "/* End test file */\n"; + + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -669,28 +691,34 @@ static const char *test_libconfig_setting_names(void) struct config_t config; int32 i32; const char *input = "/* Test File */\n" - "Setting'with'apostrophes: 1;\n" + "1st_setting_with_numbers: 1;\n" "Setting.with.periods: 2;\n" "Setting: {\n" " with: {\n" " periods: 3;\n" + " 2nested: {\n" + " numbers1: 4;\n" + " };\n" " };\n" " nested: {\n" " in: {\n" - " groups: 4;\n" + " groups: 5;\n" " };\n" " };\n" "};\n" - "1st_setting_with_numbers: 5;\n" + "Setting_with_2_numbers_000: 6;\n" "/* End test file */\n"; + + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; } - if (libconfig->lookup_int(&config, "Setting'with'apostrophes", &i32) == CONFIG_FALSE || i32 != 1) { + if (libconfig->lookup_int(&config, "1st_setting_with_numbers", &i32) == CONFIG_FALSE || i32 != 1) { libconfig->destroy(&config); - return "Setting'with'apostrophes failed."; + return "1st_setting_with_numbers failed."; } if (libconfig->lookup_int(&config, "Setting.with.periods", &i32) == CONFIG_FALSE || i32 != 2) { @@ -703,19 +731,24 @@ static const char *test_libconfig_setting_names(void) return "Setting:with:periods failed."; } - if (libconfig->lookup_int(&config, "Setting:nested:in:groups", &i32) == CONFIG_FALSE || i32 != 4) { + if (libconfig->lookup_int(&config, "Setting/with/2nested/numbers1", &i32) == CONFIG_FALSE || i32 != 4) { + libconfig->destroy(&config); + return "Setting/with/2nested/numbers1 failed."; + } + + if (libconfig->lookup_int(&config, "Setting:nested:in:groups", &i32) == CONFIG_FALSE || i32 != 5) { libconfig->destroy(&config); return "Setting:nested:in:groups failed."; } - if (libconfig->lookup_int(&config, "Setting/nested/in/groups", &i32) == CONFIG_FALSE || i32 != 4) { + if (libconfig->lookup_int(&config, "Setting/nested/in/groups", &i32) == CONFIG_FALSE || i32 != 5) { libconfig->destroy(&config); return "Setting/nested/in/groups failed."; } - if (libconfig->lookup_int(&config, "1st_setting_with_numbers", &i32) == CONFIG_FALSE || i32 != 5) { + if (libconfig->lookup_int(&config, "Setting_with_2_numbers_000", &i32) == CONFIG_FALSE || i32 != 6) { libconfig->destroy(&config); - return "1st_setting_with_numbers failed."; + return "Setting_with_2_numbers_000 failed."; } libconfig->destroy(&config); @@ -736,6 +769,9 @@ static const char *test_libconfig_duplicate_keys(void) " Duplicate: 4;\n" "};\n" "/* End test file */\n"; + + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -780,6 +816,9 @@ static const char *test_libconfig_special_string_syntax(void) const char *input = "/* Test File */\n" "SpecialString: <\"This is an \"Item_Script\" Special String\n\tWith a line-break inside.\">;\n" "/* End test file */\n"; + + libconfig->init(&config); + if (libconfig->read_string(&config, input) == CONFIG_FALSE) { libconfig->destroy(&config); return "Unable to parse configuration."; @@ -818,7 +857,7 @@ int do_init(int argc, char **argv) //int (*setting_set_format) (struct config_setting_t *setting, short format); //short (*setting_get_format) (const struct config_setting_t *setting); //struct config_setting_t * (*setting_set_int_elem) (struct config_setting_t *setting, int idx, int value); - //struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, long long value); + //struct config_setting_t * (*setting_set_int64_elem) (struct config_setting_t *setting, int idx, int64 value); //struct config_setting_t * (*setting_set_float_elem) (struct config_setting_t *setting, int idx, double value); //struct config_setting_t * (*setting_set_bool_elem) (struct config_setting_t *setting, int idx, int value); //struct config_setting_t * (*setting_set_string_elem) (struct config_setting_t *setting, int idx, const char *value); diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c index 34102a845..1c0390d66 100644 --- a/src/test/test_spinlock.c +++ b/src/test/test_spinlock.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -81,6 +81,7 @@ int do_init(int argc, char **argv) for(i =0; i < THRC; i++){ t[i] = thread->create_opt(worker, NULL, 1024*512, THREADPRIO_NORMAL); } + (void)t; while(1){ if(InterlockedCompareExchange(&done_threads, THRC, THRC) == THRC) @@ -100,14 +101,13 @@ int do_init(int argc, char **argv) } - if(ok != LOOPS){ + if (ok != LOOPS) { ShowFatalError("Test failed.\n"); exit(1); - }else{ - ShowStatus("Test passed.\n"); - exit(0); } - return 0; + + core->runflag = CORE_ST_STOP; + return EXIT_SUCCESS; }//end: do_init() void do_abort(void) { @@ -118,6 +118,8 @@ void set_server_type(void) { }//end: set_server_type() int do_final(void) { + ShowStatus("Test passed.\n"); + return EXIT_SUCCESS; }//end: do_final() diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in index eb1362780..6e8643c56 100644 --- a/src/tool/Makefile.in +++ b/src/tool/Makefile.in @@ -39,7 +39,7 @@ LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \ MAPCACHE_OBJ = obj_all/mapcache.o MAPCACHE_C = mapcache.c MAPCACHE_H = -MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ $(SYSINFO_INC)) +MAPCACHE_DEPENDS = $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ) $(SYSINFO_INC) @SET_MAKE@ @@ -55,7 +55,7 @@ mapcache: ../../mapcache@EXEEXT@ ../../mapcache@EXEEXT@: $(MAPCACHE_DEPENDS) Makefile @echo " LD $(notdir $@)" - @$(CC) @STATIC@ @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_DEPENDS) @LIBS@ + @$(CC) @STATIC@ @LDFLAGS@ -o ../../mapcache@EXEEXT@ $(MAPCACHE_OBJ) $(COMMON_D)/obj_all/common_mini.a $(LIBCONFIG_OBJ) @LIBS@ buildclean: @echo " CLEAN tool (build temp files)" diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index 7bb2f4465..5eb0843aa 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify |