Before I forget for the nth time.
Regarding HPM Function Overloading, is it possible *or would it be possible if it doesnt already* to have Hercule's core functions be loaded together with the plugin functions or would the plugin overwrite them?
Scenario: The PK Plugin checks if sd->state.pk is enabled (which would go under battle_check_target), while Faction system plugin would check for like sd->status.faction value to see wether target is friend or foe. If both plugins overwrite battle->check_target, would both checks remai or would one overwrite the other? And each one overwrite the original battle_check_target's code?
Edit: Also in case the functions are not overwritten, would the new custom battle_check_target have to be completely the same as the original one? or could I just add the pieces of code as I need them? Like for instance, could I simply do
Code:
int my_battle_check_target( struct block_list *src, struct block_list *target,int flag){ int16 m; //map int state = 0; //Initial state none int strip_enemy = 1; //Flag which marks whether to remove the BCT_ENEMY status if it's also friend/ally. struct block_list *s_bl = src, *t_bl = target; nullpo_ret(src); nullpo_ret(target); if (s_bl->type == BL_PC && !((TBL_PC*)s_bl)->state.pk) return false;}
for the PK plugin?