Rebel Posted January 15, 2018 Posted January 15, 2018 // Market Clone [AnnieRuru/Dastgir] int mob_clone_spawn_market( struct map_session_data *sd, int16 m, int16 x, int16 y, char market_title[], char market_msg[] ) { //Copy of mob_clone_spawn with some modification. int mob_id; struct mob_data *md; struct mob_db* db; struct status_data *mstatus; struct chat_data* cd; ARR_FIND( MOB_CLONE_START, MOB_CLONE_END, mob_id, mob_db_data[mob_id] == NULL ); if ( mob_id >= MOB_CLONE_END ) return 0; db = mob_db_data[mob_id] = (struct mob_db*)aCalloc( 1, sizeof(struct mob_db) ); mstatus = &db->status; safestrncpy( db->sprite, sd->status.name, NAME_LENGTH ); safestrncpy( db->name, sd->status.name, NAME_LENGTH ); safestrncpy( db->jname, sd->status.name, NAME_LENGTH ); db->lv = status_get_lv(&sd->bl); memcpy( mstatus, &sd->base_status, sizeof( struct status_data ) ); mstatus->rhw.atk = mstatus->rhw.atk2 = mstatus->lhw.atk = mstatus->lhw.atk2 = mstatus->hp = mstatus->max_hp = mstatus->sp = mstatus->max_sp = 1; mstatus->mode = 0; memcpy( &db->vd, &sd->vd, sizeof( struct view_data ) ); db->base_exp = db->job_exp = db->range2 = db->range3 = 1; db->option = 0; md = mob_once_spawn_sub( &sd->bl, m, x, y, sd->status.name, mob_id, "", SZ_SMALL, AI_NONE ); if ( !md ) return 0; md->special_state.clone = 1; mob_spawn(md); unit_setdir( &md->bl, unit_getdir(&sd->bl) ); cd = chat_createchat( &md->bl, market_title, "", 1, false, 0, "", 0, 1, MAX_LEVEL ); if ( !cd ) return 0; md->market_chat_id = cd->bl.id; safestrncpy( md->market_message, market_msg, CHAT_SIZE_MAX ); clif_dispchat( cd, 0 ); if ( sd->vd.dead_sit == 2 ) clif_sitting( &md->bl ); return md->bl.id; } Anyone can help me. I tried the market clone by AnnieRuru/Dastgir in the latest rA commit but it has error when compiling.. Hoping that someone can help me. Quote
Question
Rebel
Anyone can help me. I tried the market clone by AnnieRuru/Dastgir in the latest rA commit but it has error when compiling..
Hoping that someone can help me.
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.