Amrod Posted January 23, 2014 Posted January 23, 2014 (edited) When I was rebuilding this error appeared battle.c 1>..\src\map\battle.c(6581): error C2039: 'class_' : is not a member of 'mob_data' 1> c:\users\jeancriv\desktop\rathena\src\map\mob.h(116) : see declaration of 'mob_data' Has something to do with KoEH. I went into the file battle.c. This is what it was pertaining to /*========================================== * Checks the state between two targets * (enemy, friend, party, guild, etc) *------------------------------------------ * Usage: * See battle.h for possible values/combinations * to be used here (BCT_* constants) * Return value is: * 1: flag holds true (is enemy, party, etc) * -1: flag fails * 0: Invalid target (non-targetable ever) * * Credits: * Original coder unknown * Rewritten by Skoltex */ int 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); m = target->m; //t_bl/s_bl hold the 'master' of the attack, while src/target are the actual //objects involved. if( (t_bl = battle_get_master(target)) == NULL ) t_bl = target; if( (s_bl = battle_get_master(src)) == NULL ) s_bl = src; if ( s_bl->type == BL_PC && t_bl->type == BL_MOB ) { struct map_session_data *sd = BL_CAST(BL_PC, s_bl); if ( ( ((TBL_MOB*)target)->class_ == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "guild_vs1" ) ) && ( sd->status.guild_id == mapreg_readreg( add_str("$KOEGUILD") ) || battle_getcurrentskill(src) > 0 ) ) return 0; } if ( s_bl->type == BL_PC ) { switch( t_bl->type ) { case BL_MOB: // Source => PC, Target => MOB if ( pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVM) ) return 0; break; case BL_PC: if (pc_has_permission((TBL_PC*)s_bl, PC_PERM_DISABLE_PVP)) return 0; break; default:/* anything else goes */ break; } } The one in green is line 6591 This is mob.h and the area the error is pertaining to /*========================================== * Mob is searched with a name. *------------------------------------------*/ int mobdb_searchname(const char *str) { int i; for(i=0;i<=MAX_MOB_DB;i++){ struct mob_db *mob = mob_db(i); if(mob == mob_dummy) //Skip dummy mobs. continue; if(strcmpi(mob->name,str)==0 || strcmpi(mob->jname,str)==0 || strcmpi(mob->sprite,str)==0) return i; } return 0; } static int mobdb_searchname_array_sub(struct mob_db* mob, const char *str) { if (mob == mob_dummy) return 1; if(!mob->base_exp && !mob->job_exp && mob->spawn[0].qty < 1) return 1; // Monsters with no base/job exp and no spawn point are, by this criteria, considered "slave mobs" and excluded from search results if(stristr(mob->jname,str)) return 0; if(stristr(mob->name,str)) return 0; return strcmpi(mob->jname,str); } /** * Create and display a tombstone on the map * @author [GreenBox] * @param md : the mob to create a tombstone for * @param killer : name of who has killed the mob * @param time : time at wich the killed happen */ void mvptomb_create(struct mob_data *md, char *killer, time_t time) { struct npc_data *nd; if ( md->tomb_nid ) mvptomb_destroy(md); CREATE(nd, struct npc_data, 1); nd->bl.id = md->tomb_nid = npc_get_new_npc_id(); nd->ud.dir = md->ud.dir; nd->bl.m = md->bl.m; nd->bl.x = md->bl.x; nd->bl.y = md->bl.y; nd->bl.type = BL_NPC; safestrncpy(nd->name, msg_txt(NULL,656), sizeof(nd->name)); nd->class_ = 565; nd->speed = 200; nd->subtype = TOMB; nd->u.tomb.md = md; nd->u.tomb.kill_time = time; if (killer) safestrncpy(nd->u.tomb.killer_name, killer, NAME_LENGTH); else nd->u.tomb.killer_name[0] = '\0'; map_addnpc(nd->bl.m, nd); if(map_addblock(&nd->bl)) return; status_set_viewdata(&nd->bl, nd->class_); status_change_init(&nd->bl); unit_dataset(&nd->bl); clif_spawn(&nd->bl); } void mvptomb_destroy(struct mob_data *md) { struct npc_data *nd; if ( (nd = map_id2nd(md->tomb_nid)) ) { int16 m, i; m = nd->bl.m; clif_clearunit_area(&nd->bl,CLR_OUTSIGHT); map_delblock(&nd->bl); ARR_FIND( 0, map[m].npc_num, i, map[m].npc == nd ); if( !(i == map[m].npc_num) ) { map[m].npc_num--; map[m].npc = map[m].npc[map[m].npc_num]; map[m].npc[map[m].npc_num] = NULL; } map_deliddb(&nd->bl); aFree(nd); } md->tomb_nid = 0; } Again the one in green is line 116 Any help would be appreciated Edited January 23, 2014 by Amrod Quote
AnnieRuru Posted January 23, 2014 Posted January 23, 2014 https://github.com/rathena/rathena/commit/dae81222a85f07455bd57276b5eafc6d407f33d0 https://github.com/rathena/rathena/blob/master/src/map/mob.h#L152 Quote
Amrod Posted January 24, 2014 Author Posted January 24, 2014 (edited) Annie what exactly do I change the line to? It only occurs when I apply the patch. For not hitting your own emperium. Edited January 24, 2014 by Amrod Quote
AnnieRuru Posted January 25, 2014 Posted January 25, 2014 I thought you can read source .... since you can quote those functions 'md->class_' replaced by 'md->mob_id'isn't that's the answer already ? I already made updated patch here http://rathena.org/board/topic/91479-how-to-change-the-time-of-koe-event-every-saturday/?p=240761 Quote
Amrod Posted January 27, 2014 Author Posted January 27, 2014 Ahh thanks I had fixed it <3 Much love Annie xD Quote
Question
Amrod
Edited by Amrod
4 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.