int HPM_map_reqnickdb(struct map_session_data * sd, int *char_id) { int i = *char_id; if( !sd ) return 0; if( reserved_costume_id && reserved_costume_id == i ) { clif->solved_charname(sd->fd, i, sd->status.name); } hookStop(); return 1; }
void parse_noafk_mapflag(const char *name, char *w3, char *w4, const char* start, const char* buffer, const char* filepath, int *retval){ int16 m = map->mapname2mapid(name); if (!strcmpi(w3,"noafk")){ struct plugin_mapflag *mf_data; if ( !( mf_data = getFromMAPD(&map->list[m], 0) ) ) { CREATE(mf_data,struct plugin_mapflag,1); mf_data->noafk = 1; addToMAPD(&map->list[m], mf_data, 0, true); } mf_data->noafk = 1; hookStop(); }
void npc_parse_unknown_mapflag_pre(const char **name, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval) { int16 m = map->mapname2mapid(*name); if (strcmpi(*w3, "noafk") == 0) { struct plugin_mapflag *mf_data; if ((mf_data = getFromMAPD(&map->list[m], 0)) == NULL) { CREATE(mf_data, struct plugin_mapflag, 1); mf_data->noafk = 1; addToMAPD(&map->list[m], mf_data, 0, true); } mf_data->noafk = 1; hookStop(); }
/* to set the bonus */ int pc_bonus_preHook(struct map_session_data *sd,int *type,int *val) { if( *type == bCoolDownRateID ) { struct s_cooldown_rate *data; if( !(data = getFromMSD(sd,0)) ) {/* don't have, create */ CREATE(data,struct s_cooldown_rate,1);/* alloc */ data->rate = 100;/* 100% -- default */ addToMSD(sd,data,0,true);/* link to sd */ } data->rate += *val; hookStop();/* don't need to run the original */ }