summaryrefslogtreecommitdiff
path: root/src/plugins/HPMHooking
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-22 17:11:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-02 14:23:22 +0300
commit727c785081bd045f2f3e7ccb8f2d825d1a777998 (patch)
tree1c5c267fdecc440004d4d0facd1562f6ed002cad /src/plugins/HPMHooking
parente697df2275b17694436d0efe05ebaf5bb8617361 (diff)
downloadhercules-727c785081bd045f2f3e7ccb8f2d825d1a777998.tar.gz
hercules-727c785081bd045f2f3e7ccb8f2d825d1a777998.tar.bz2
hercules-727c785081bd045f2f3e7ccb8f2d825d1a777998.tar.xz
hercules-727c785081bd045f2f3e7ccb8f2d825d1a777998.zip
update HPM hooks.
Diffstat (limited to 'src/plugins/HPMHooking')
-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.inc52
3 files changed, 62 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 9c616ba00..5448186d0 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -3697,8 +3697,12 @@ struct {
struct HPMHookPoint *HP_pc_resethate_post;
struct HPMHookPoint *HP_pc_equipitem_pre;
struct HPMHookPoint *HP_pc_equipitem_post;
+ struct HPMHookPoint *HP_pc_equipitem_pos_pre;
+ struct HPMHookPoint *HP_pc_equipitem_pos_post;
struct HPMHookPoint *HP_pc_unequipitem_pre;
struct HPMHookPoint *HP_pc_unequipitem_post;
+ struct HPMHookPoint *HP_pc_unequipitem_pos_pre;
+ struct HPMHookPoint *HP_pc_unequipitem_pos_post;
struct HPMHookPoint *HP_pc_checkitem_pre;
struct HPMHookPoint *HP_pc_checkitem_post;
struct HPMHookPoint *HP_pc_useitem_pre;
@@ -8760,8 +8764,12 @@ struct {
int HP_pc_resethate_post;
int HP_pc_equipitem_pre;
int HP_pc_equipitem_post;
+ int HP_pc_equipitem_pos_pre;
+ int HP_pc_equipitem_pos_post;
int HP_pc_unequipitem_pre;
int HP_pc_unequipitem_post;
+ int HP_pc_unequipitem_pos_pre;
+ int HP_pc_unequipitem_pos_post;
int HP_pc_checkitem_pre;
int HP_pc_checkitem_post;
int HP_pc_useitem_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 545f07d01..af376fe05 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1879,7 +1879,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->resetfeel, HP_pc_resetfeel) },
{ HP_POP(pc->resethate, HP_pc_resethate) },
{ HP_POP(pc->equipitem, HP_pc_equipitem) },
+ { HP_POP(pc->equipitem_pos, HP_pc_equipitem_pos) },
{ HP_POP(pc->unequipitem, HP_pc_unequipitem) },
+ { HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) },
{ HP_POP(pc->checkitem, HP_pc_checkitem) },
{ HP_POP(pc->useitem, HP_pc_useitem) },
{ HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 35e98693c..954436e94 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -49467,6 +49467,32 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) {
}
return retVal___;
}
+void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_pc_equipitem_pos_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos);
+ *HPMforce_return = false;
+ 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, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.equipitem_pos(sd, id, pos);
+ }
+ if( HPMHooks.count.HP_pc_equipitem_pos_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos);
+ 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, &pos);
+ }
+ }
+ return;
+}
int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) {
int hIndex = 0;
int retVal___ = 0;
@@ -49494,6 +49520,32 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) {
}
return retVal___;
}
+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 ) {
+ 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++ ) {
+ preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func;
+ preHookFunc(sd, &n, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.pc.unequipitem_pos(sd, n, pos);
+ }
+ if( HPMHooks.count.HP_pc_unequipitem_pos_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos);
+ 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);
+ }
+ }
+ return;
+}
int HP_pc_checkitem(struct map_session_data *sd) {
int hIndex = 0;
int retVal___ = 0;