summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf63
-rw-r--r--doc/script_commands.txt4
-rw-r--r--npc/merchants/hair_dyer.txt8
-rw-r--r--npc/merchants/hair_style.txt12
-rw-r--r--npc/re/quests/eden/91-99.txt4
-rw-r--r--src/map/atcommand.c3
-rw-r--r--src/map/clif.c17
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/itemdb.h2
-rw-r--r--src/map/packets.h7
-rw-r--r--src/map/pc.c16
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c41
-rw-r--r--src/map/status.c8
-rw-r--r--src/map/unit.c16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc53
-rwxr-xr-xtools/constdbconverter.pl4
19 files changed, 220 insertions, 51 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 0709cd758..98de6ac98 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -777,22 +777,6 @@ constants_db: {
EQI_SHADOW_ACC_R: 19
EQI_SHADOW_ACC_L: 20
- /** Look */
- LOOK_BASE: 0
- LOOK_HAIR: 1
- LOOK_WEAPON: 2
- LOOK_HEAD_BOTTOM: 3
- LOOK_HEAD_TOP: 4
- LOOK_HEAD_MID: 5
- LOOK_HAIR_COLOR: 6
- LOOK_CLOTHES_COLOR: 7
- LOOK_SHIELD: 8
- LOOK_SHOES: 9
- LOOK_BODY: 10
- LOOK_FLOOR: 11
- LOOK_ROBE: 12
- LOOK_BODY2: 13
-
/** Status effects */
Eff_Stone: 0
Eff_Freeze: 1
@@ -3678,16 +3662,43 @@ constants_db: {
FW_EXTRABOLD: 800
FW_HEAVY: 900
- /** setlook */
- VAR_HEAD: 1
- VAR_WEAPON: 2
- VAR_HEAD_TOP: 3
- VAR_HEAD_MID: 4
- VAR_HEAD_BOTTOM: 5
- VAR_HEADPALETTE: 6
- VAR_BODYPALETTE: 7
- VAR_SHIELD: 8
- VAR_SHOES: 9
+ /** old setlook (use LOOK_* constants instead) */
+ VAR_HEAD: {
+ Value: 1
+ Deprecated: true // Use LOOK_HAIR
+ }
+ VAR_WEAPON: {
+ Value: 2
+ Deprecated: true // Use LOOK_WEAPON
+ }
+ VAR_HEAD_TOP: {
+ Value: 3
+ Deprecated: true // Use LOOK_HEAD_TOP
+ }
+ VAR_HEAD_MID: {
+ Value: 4
+ Deprecated: true // Use LOOK_HEAD_MID
+ }
+ VAR_HEAD_BOTTOM: {
+ Value: 5
+ Deprecated: true // Use LOOK_HEAD_BOTTOM
+ }
+ VAR_HEADPALETTE: {
+ Value: 6
+ Deprecated: true // Use LOOK_HAIR_COLOR
+ }
+ VAR_BODYPALETTE: {
+ Value: 7
+ Deprecated: true // Use LOOK_CLOTHES_COLOR
+ }
+ VAR_SHIELD: {
+ Value: 8
+ Deprecated: true // Use LOOK_SHIELD
+ }
+ VAR_SHOES: {
+ Value: 9
+ Deprecated: true // Use LOOK_SHOES
+ }
/** Directions */
DIR_NORTH: 0
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 130e5b5f6..709aa39dd 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4530,13 +4530,13 @@ the look value).
// This will change your hair(6), so that it uses palette 8, what ever
// your palette 8 is, your hair will use that color.
- setlook VAR_HEADPALETTE, 8;
+ setlook LOOK_HAIR_COLOR, 8;
// This will change your clothes(7), so they are using palette 1,
// whatever your palette 1 is, your clothes will then use that set of
// colors.
- setlook VAR_BODYPALETTE,1;
+ setlook LOOK_CLOTHES_COLOR, 1;
Here are the possible look types:
diff --git a/npc/merchants/hair_dyer.txt b/npc/merchants/hair_dyer.txt
index db261c215..1a786b415 100644
--- a/npc/merchants/hair_dyer.txt
+++ b/npc/merchants/hair_dyer.txt
@@ -97,7 +97,7 @@ prt_in,243,168,4 script Jovovich 4_F_02,{
close;
}
- if (.@headpalette == getlook(VAR_HEADPALETTE)) {
+ if (.@headpalette == getlook(LOOK_HAIR_COLOR)) {
mes "[Hairdresser Jovovich]";
mes "Eh? But that's the hair color you already have. Please choose a different color.";
next;
@@ -130,7 +130,7 @@ prt_in,243,168,4 script Jovovich 4_F_02,{
case 8: delitem Scarlet_Dyestuffs,1; break;
}
Zeny -= 1000;
- setlook VAR_HEADPALETTE,.@headpalette;
+ setlook LOOK_HAIR_COLOR,.@headpalette;
.@choose_success = 1;
break;
}
@@ -275,7 +275,7 @@ lhz_in02,100,134,3 script Hair Dyer#lich 4_F_EINWOMAN,{
}
break;
}
- if (getlook(VAR_HEADPALETTE) == .@headpalette) {
+ if (getlook(LOOK_HAIR_COLOR) == .@headpalette) {
mes "[Rossa]";
mes "Hmm, your hair color";
mes "is still fine, so there's";
@@ -388,7 +388,7 @@ lhz_in02,100,134,3 script Hair Dyer#lich 4_F_EINWOMAN,{
else if (.@headpalette == 6) delitem White_Dyestuffs,1;
else if (.@headpalette == 7) delitem Black_Dyestuffs,1;
Zeny -= 1000;
- setlook VAR_HEADPALETTE,.@headpalette;
+ setlook LOOK_HAIR_COLOR,.@headpalette;
.@choose_success = 1;
break;
}
diff --git a/npc/merchants/hair_style.txt b/npc/merchants/hair_style.txt
index 7bfefadf4..2d61d02db 100644
--- a/npc/merchants/hair_style.txt
+++ b/npc/merchants/hair_style.txt
@@ -995,7 +995,7 @@ lhz_in02,100,143,3 script Hair Dresser#li 2_M_DYEINGER,{
mes "you soooooooo beautiful!";
close;
}
- else if (getlook(VAR_HEAD) == .@input) {
+ else if (getlook(LOOK_HAIR) == .@input) {
mes "[Prince Shammi]";
mes "Oh dear me, you're not";
mes "going to waste money for";
@@ -1017,7 +1017,7 @@ lhz_in02,100,143,3 script Hair Dresser#li 2_M_DYEINGER,{
next;
switch(select("Yes.:No.")) {
case 1:
- if (getlook(VAR_HEADPALETTE) == 0) {
+ if (getlook(LOOK_HAIR_COLOR) == 0) {
mes "[Prince Shammi]";
mes "Oh, Sweet Christmas,";
mes "I almost forgot! Would";
@@ -1072,8 +1072,8 @@ lhz_in02,100,143,3 script Hair Dresser#li 2_M_DYEINGER,{
delitem Long_Hair,100;
delitem Golden_Hair,100;
delitem Glossy_Hair,100;
- setlook VAR_HEAD,.@input;
- setlook VAR_HEADPALETTE,.@headpalette;
+ setlook LOOK_HAIR,.@input;
+ setlook LOOK_HAIR_COLOR,.@headpalette;
mes "[Prince Shammi]";
mes "Well, we're all finished!";
mes "And my, oh my, you look even";
@@ -1272,8 +1272,8 @@ lhz_in02,91,155,5 script Assistant Beautician#li 4_F_LGTGIRL,{
mes "^333333*Pant Pant Pant*^000000";
next;
Zeny -= 250000;
- setlook VAR_HEAD,.@style_r;
- setlook VAR_HEADPALETTE,.@color_r;
+ setlook LOOK_HAIR,.@style_r;
+ setlook LOOK_HAIR_COLOR,.@color_r;
mes "[Assistant Beautician]";
mes "Bwahahaha! Success!";
if (.@input == .@style_r) {
diff --git a/npc/re/quests/eden/91-99.txt b/npc/re/quests/eden/91-99.txt
index e5c82022d..7384c4f5c 100644
--- a/npc/re/quests/eden/91-99.txt
+++ b/npc/re/quests/eden/91-99.txt
@@ -206,11 +206,11 @@ L_Quest:
setquest .@quest2;
// Job Experience calculation.
- if (JobLevel > 50 && JobLevel < 56) .@jexp = 67000;
+ if (JobLevel < 56) .@jexp = 67000;
else if (JobLevel > 55 && JobLevel < 61) .@jexp = 94000;
else if (JobLevel > 60 && JobLevel < 66) .@jexp = 141000;
else if (JobLevel > 65 && JobLevel < 69) .@jexp = 212000;
- else if (JobLevel == 69) .@jexp = 311000;
+ else if (JobLevel >= 69) .@jexp = 311000;
getexp getarg(2),.@jexp;
close;
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e223f698c..08119457d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8414,6 +8414,7 @@ ACMD(charcommands)
atcommand->commands_sub(sd, fd, COMMAND_CHARCOMMAND);
return true;
}
+
/* for new mounts */
ACMD(cashmount)
{
@@ -8425,7 +8426,7 @@ ACMD(cashmount)
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,0,-1);
+ sc_start(NULL,&sd->bl,SC_ALL_RIDING,100,25,-1);
} else {
clif->message(sd->fd,msg_fd(fd,1364)); // You have released your mount.
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
diff --git a/src/map/clif.c b/src/map/clif.c
index 1cd18b68d..3b15265f7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11484,6 +11484,22 @@ void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
clif_menuskill_clear(sd);
}
+/// Identifying item with right-click (CZ_REQ_ONECLICK_ITEMIDENTIFY).
+/// 0A35 <index>.W
+void clif_parse_OneClick_ItemIdentify(int fd, struct map_session_data *sd)
+{
+ int cmd = RFIFOW(fd,0);
+ short idx = RFIFOW(fd, packet_db[cmd].pos[0]) - 2;
+ int n;
+
+ if (idx < 0 || idx >= MAX_INVENTORY || sd->inventory_data[idx] == NULL || sd->status.inventory[idx].nameid <= 0)
+ return;
+
+ if ((n = pc->have_magnifier(sd) ) != INDEX_NOT_FOUND &&
+ pc->delitem(sd, n, 1, 0, DELITEM_NORMAL, LOG_TYPE_OTHER) == 0)
+ skill->identify(sd, idx);
+}
+
void clif_parse_SelectArrow(int fd,struct map_session_data *sd) __attribute__((nonnull (2)));
/// Answer to arrow crafting item selection dialog (CZ_REQ_MAKINGARROW).
/// 01ae <name id>.W
@@ -19707,4 +19723,5 @@ void clif_defaults(void) {
clif->add_random_options = clif_add_random_options;
clif->pHotkeyRowShift = clif_parse_HotkeyRowShift;
clif->dressroom_open = clif_dressroom_open;
+ clif->pOneClick_ItemIdentify = clif_parse_OneClick_ItemIdentify;
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 250689e90..3d43b064c 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1338,6 +1338,7 @@ struct clif_interface {
void (*add_random_options) (unsigned char* buf, struct item* item);
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);
/* Cart Deco */
void(*selectcart) (struct map_session_data *sd);
void(*pSelectCart) (int fd, struct map_session_data *sd);
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index cde73f3b4..8a0ec389d 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -64,6 +64,7 @@ enum item_itemid {
ITEMID_BRANCH_OF_DEAD_TREE = 604,
ITEMID_ANODYNE = 605,
ITEMID_ALOEBERA = 606,
+ ITEMID_MAGNIFIER = 611,
ITEMID_POISON_BOTTLE = 678,
ITEMID_EMPTY_BOTTLE = 713,
ITEMID_EMPERIUM = 714,
@@ -136,6 +137,7 @@ 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,
diff --git a/src/map/packets.h b/src/map/packets.h
index 6174d76d2..0badd94f5 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2910,9 +2910,10 @@ packet(0x96e,-1,clif->ackmergeitems);
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(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);
#endif
#if PACKETVER >= 20150805 // RagexeRE
diff --git a/src/map/pc.c b/src/map/pc.c
index 2dfd9519b..491584385 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -11479,6 +11479,20 @@ bool pc_db_checkid(unsigned int class_)
|| (class_ >= JOB_REBELLION && class_ < JOB_MAX );
}
+/**
+ * checks if player have any kind of magnifier in inventory
+ * @param sd map_session_data of Player
+ * @return index of magnifer, INDEX_NOT_FOUND if it is not found
+ */
+int pc_have_magnifier(struct map_session_data *sd)
+{
+ int n;
+ n = pc->search_inventory(sd, ITEMID_MAGNIFIER);
+ if (n == INDEX_NOT_FOUND)
+ n = pc->search_inventory(sd, ITEMID_NOVICE_MAGNIFIER);
+ return n;
+}
+
void do_final_pc(void) {
db_destroy(pc->itemcd_db);
pc->at_db->destroy(pc->at_db,pc->autotrade_final);
@@ -11846,4 +11860,6 @@ void pc_defaults(void) {
pc->check_job_name = pc_check_job_name;
pc->update_idle_time = pc_update_idle_time;
+
+ pc->have_magnifier = pc_have_magnifier;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 23b46a631..06bc5e5ae 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1088,6 +1088,8 @@ END_ZEROED_BLOCK; /* End */
int (*check_job_name) (const char *name);
void (*update_idle_time) (struct map_session_data* sd, enum e_battle_config_idletime type);
+
+ int (*have_magnifier) (struct map_session_data *sd);
};
#ifdef HERCULES_CORE
diff --git a/src/map/script.c b/src/map/script.c
index 35a71868a..5a3d1507f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -18490,7 +18490,7 @@ BUILDIN(setcashmount)
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, 0, -1);
+ sc_start(NULL,&sd->bl, SC_ALL_RIDING, 100, 25, -1);
script_pushint(st,1);//in both cases, return 1.
}
return true;
@@ -20898,6 +20898,45 @@ void script_hardcoded_constants(void)
script->set_constant("BG_AREA_WOS",BG_AREA_WOS,false, false);
script->set_constant("BG_QUEUE",BG_QUEUE,false, false);
+ /* LOOK_ constants, use in setlook/changelook script commands */
+ script->set_constant("LOOK_BASE", LOOK_BASE, false, false);
+ script->set_constant("LOOK_HAIR", LOOK_HAIR, false, false);
+ script->set_constant("LOOK_WEAPON", LOOK_WEAPON, false, false);
+ script->set_constant("LOOK_HEAD_BOTTOM", LOOK_HEAD_BOTTOM, false, false);
+ script->set_constant("LOOK_HEAD_TOP", LOOK_HEAD_TOP, false, false);
+ script->set_constant("LOOK_HEAD_MID", LOOK_HEAD_MID, false, false);
+ script->set_constant("LOOK_HAIR_COLOR", LOOK_HAIR_COLOR, false, false);
+ script->set_constant("LOOK_CLOTHES_COLOR", LOOK_CLOTHES_COLOR, false, false);
+ script->set_constant("LOOK_SHIELD", LOOK_SHIELD, false, false);
+ script->set_constant("LOOK_SHOES", LOOK_SHOES, false, false);
+ script->set_constant("LOOK_BODY", LOOK_BODY, false, false);
+ script->set_constant("LOOK_FLOOR", LOOK_FLOOR, false, false);
+ script->set_constant("LOOK_ROBE", LOOK_ROBE, false, false);
+ script->set_constant("LOOK_BODY2", LOOK_BODY2, false, false);
+
+ /* Equip Position in Bits, use with *getiteminfo type 5, or @inventorylist_equip */
+ script->set_constant("EQP_HEAD_LOW", EQP_HEAD_LOW, false, false);
+ script->set_constant("EQP_HEAD_MID", EQP_HEAD_MID, false, false);
+ script->set_constant("EQP_HEAD_TOP", EQP_HEAD_TOP, false, false);
+ script->set_constant("EQP_HAND_R", EQP_HAND_R, false, false);
+ script->set_constant("EQP_HAND_L", EQP_HAND_L, false, false);
+ script->set_constant("EQP_ARMOR", EQP_ARMOR, false, false);
+ script->set_constant("EQP_SHOES", EQP_SHOES, false, false);
+ script->set_constant("EQP_GARMENT", EQP_GARMENT, false, false);
+ script->set_constant("EQP_ACC_L", EQP_ACC_L, false, false);
+ script->set_constant("EQP_ACC_R", EQP_ACC_R, false, false);
+ script->set_constant("EQP_COSTUME_HEAD_TOP", EQP_COSTUME_HEAD_TOP, false, false);
+ script->set_constant("EQP_COSTUME_HEAD_MID", EQP_COSTUME_HEAD_MID, false, false);
+ script->set_constant("EQP_COSTUME_HEAD_LOW", EQP_COSTUME_HEAD_LOW, false, false);
+ script->set_constant("EQP_COSTUME_GARMENT", EQP_COSTUME_GARMENT, false, false);
+ script->set_constant("EQP_AMMO", EQP_AMMO, false, false);
+ script->set_constant("EQP_SHADOW_ARMOR", EQP_SHADOW_ARMOR, false, false);
+ script->set_constant("EQP_SHADOW_WEAPON", EQP_SHADOW_WEAPON, false, false);
+ script->set_constant("EQP_SHADOW_SHIELD", EQP_SHADOW_SHIELD, false, false);
+ 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);
+
/* Renewal */
#ifdef RENEWAL
script->set_constant("RENEWAL", 1, false, false);
diff --git a/src/map/status.c b/src/map/status.c
index db8c0d6c5..879f10efb 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5542,8 +5542,10 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc
if(sc->data[SC_FUSION]) {
val = 25;
} else if (sd) {
- if (pc_isridingpeco(sd) || pc_isridingdragon(sd) || sd->sc.data[SC_ALL_RIDING])
+ if (pc_isridingpeco(sd) || pc_isridingdragon(sd))
val = 25;//Same bonus
+ else if (sd->sc.data[SC_ALL_RIDING])
+ val = sd->sc.data[SC_ALL_RIDING]->val1;
else if (pc_isridingwug(sd))
val = 15 + 5 * pc->checkskill(sd, RA_WUGRIDER);
else if (pc_ismadogear(sd)) {
@@ -8981,8 +8983,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
tick_time = 3000; // [GodLesZ] tick time
break;
case SC_CLOAKINGEXCEED:
- val2 = ( val1 + 1 ) / 2; // Hits
- val3 = 90 + val1 * 10; // Walk speed
+ val2 = (val1 + 1) / 2; // Hits
+ val3 = (val1 - 1) * 10; // Walk speed
if (bl->type == BL_PC)
val4 |= battle_config.pc_cloak_check_type&7;
else
diff --git a/src/map/unit.c b/src/map/unit.c
index 26104e4e0..bea0913d2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1976,6 +1976,7 @@ bool unit_can_reach_pos(struct block_list *bl,int x,int y, int easy)
bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range, int easy, short *x, short *y)
{
short dx,dy;
+ struct walkpath_data wpd;
nullpo_retr(false, bl);
nullpo_retr(false, tbl);
@@ -2005,7 +2006,20 @@ bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range,
if (x) *x = tbl->x-dx;
if (y) *y = tbl->y-dy;
- return path->search(NULL,bl,bl->m,bl->x,bl->y,tbl->x-dx,tbl->y-dy,easy,CELL_CHKNOREACH);
+
+ if (!path->search(&wpd,bl,bl->m,bl->x,bl->y,tbl->x-dx,tbl->y-dy,easy,CELL_CHKNOREACH))
+ return false;
+
+#ifdef OFFICIAL_WALKPATH
+ if( !path->search_long(NULL, bl, bl->m, bl->x, bl->y, tbl->x-dx, tbl->y-dy, CELL_CHKNOPASS) // Check if there is an obstacle between
+ && wpd.path_len > 14 // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett]
+ && (bl->type != BL_NPC) ) // If type is a NPC, please disregard.
+ return false;
+#endif
+
+ return true;
+
+
}
/*==========================================
* Calculates position of Pet/Mercenary/Homunculus/Elemental
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index e0c5a4df3..d909e9892 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1848,6 +1848,8 @@ struct {
struct HPMHookPoint *HP_clif_pHotkeyRowShift_post;
struct HPMHookPoint *HP_clif_dressroom_open_pre;
struct HPMHookPoint *HP_clif_dressroom_open_post;
+ struct HPMHookPoint *HP_clif_pOneClick_ItemIdentify_pre;
+ struct HPMHookPoint *HP_clif_pOneClick_ItemIdentify_post;
struct HPMHookPoint *HP_clif_selectcart_pre;
struct HPMHookPoint *HP_clif_selectcart_post;
struct HPMHookPoint *HP_clif_pSelectCart_pre;
@@ -4322,6 +4324,8 @@ struct {
struct HPMHookPoint *HP_pc_check_job_name_post;
struct HPMHookPoint *HP_pc_update_idle_time_pre;
struct HPMHookPoint *HP_pc_update_idle_time_post;
+ struct HPMHookPoint *HP_pc_have_magnifier_pre;
+ struct HPMHookPoint *HP_pc_have_magnifier_post;
struct HPMHookPoint *HP_libpcre_compile_pre;
struct HPMHookPoint *HP_libpcre_compile_post;
struct HPMHookPoint *HP_libpcre_study_pre;
@@ -7689,6 +7693,8 @@ struct {
int HP_clif_pHotkeyRowShift_post;
int HP_clif_dressroom_open_pre;
int HP_clif_dressroom_open_post;
+ int HP_clif_pOneClick_ItemIdentify_pre;
+ int HP_clif_pOneClick_ItemIdentify_post;
int HP_clif_selectcart_pre;
int HP_clif_selectcart_post;
int HP_clif_pSelectCart_pre;
@@ -10163,6 +10169,8 @@ struct {
int HP_pc_check_job_name_post;
int HP_pc_update_idle_time_pre;
int HP_pc_update_idle_time_post;
+ int HP_pc_have_magnifier_pre;
+ int HP_pc_have_magnifier_post;
int HP_libpcre_compile_pre;
int HP_libpcre_compile_post;
int HP_libpcre_study_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 5bbad878a..db30c8c02 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -944,6 +944,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->add_random_options, HP_clif_add_random_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) },
/* cmdline */
@@ -2211,6 +2212,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->autotrade_final, HP_pc_autotrade_final) },
{ HP_POP(pc->check_job_name, HP_pc_check_job_name) },
{ HP_POP(pc->update_idle_time, HP_pc_update_idle_time) },
+ { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) },
/* libpcre */
{ HP_POP(libpcre->compile, HP_libpcre_compile) },
{ HP_POP(libpcre->study, HP_libpcre_study) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 87d85cc6c..11bf66481 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -24067,6 +24067,32 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) {
}
return;
}
+void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre ) {
+ void (*preHookFunc) (int *fd, struct map_session_data *sd);
+ *HPMforce_return = false;
+ 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 ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.clif.pOneClick_ItemIdentify(fd, sd);
+ }
+ if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post ) {
+ void (*postHookFunc) (int *fd, struct map_session_data *sd);
+ 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);
+ }
+ }
+ return;
+}
void HP_clif_selectcart(struct map_session_data *sd) {
int hIndex = 0;
if( HPMHooks.count.HP_clif_selectcart_pre ) {
@@ -57623,6 +57649,33 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id
}
return;
}
+int HP_pc_have_magnifier(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_pc_have_magnifier_pre ) {
+ int (*preHookFunc) (struct map_session_data *sd);
+ *HPMforce_return = false;
+ 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 ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.have_magnifier(sd);
+ }
+ if( HPMHooks.count.HP_pc_have_magnifier_post ) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ 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);
+ }
+ }
+ return retVal___;
+}
/* libpcre */
pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) {
int hIndex = 0;
diff --git a/tools/constdbconverter.pl b/tools/constdbconverter.pl
index 31e84abef..b534eba70 100755
--- a/tools/constdbconverter.pl
+++ b/tools/constdbconverter.pl
@@ -24,7 +24,7 @@
use strict;
use warnings;
-sub parse_questdb (@) {
+sub parse_constdb (@) {
my @input = @_;
foreach (@input) {
chomp $_;
@@ -109,6 +109,6 @@ constants_db: {
EOF
-parse_questdb(<>);
+parse_constdb(<>);
print "}\n";