@
@raPalooza~
Thank you for the info
I'll just create the new mapflag. I just wanted to know where should I put the src that increases a monster's attack & skill damage.
Anyway can you tell me what part of mob.c should I put those? Should I put it under
int64 c = 0; ?
/*========================================== * Mob spawning. Initialization is also variously here. *------------------------------------------*/int mob_spawn (struct mob_data *md){ int i=0; int64 tick = timer->gettick(); int64 c = 0; md->last_thinktime = tick; if (md->bl.prev != NULL) unit->remove_map(&md->bl,CLR_RESPAWN,ALC_MARK); else if (md->spawn && md->class_ != md->spawn->class_) { md->class_ = md->spawn->class_; status->set_viewdata(&md->bl, md->class_); md->db = mob->db(md->class_); memcpy(md->name,md->spawn->name,NAME_LENGTH); } if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) { //Monster can be spawned on an area. if( !map->search_freecell(&md->bl, -1, &md->bl.x, &md->bl.y, md->spawn->xs, md->spawn->ys, battle_config.no_spawn_on_player?4:0) ) { // retry again later if( md->spawn_timer != INVALID_TIMER ) timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); return 1; } } else if( battle_config.no_spawn_on_player > 99 && map->foreachinrange(mob->count_sub, &md->bl, AREA_SIZE, BL_PC) ) { // retry again later (players on sight) if( md->spawn_timer != INVALID_TIMER ) timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = timer->add(tick+5000,mob->delayspawn,md->bl.id,0); return 1; } } memset(&md->state, 0, sizeof(md->state)); status_calc_mob(md, SCO_FIRST); md->attacked_id = 0; md->target_id = 0; md->move_fail_count = 0; md->ud.state.attack_continue = 0; md->ud.target_to = 0; md->ud.dir = 0; if( md->spawn_timer != INVALID_TIMER ) { timer->delete(md->spawn_timer, mob->delayspawn); md->spawn_timer = INVALID_TIMER; } //md->master_id = 0; md->master_dist = 0; md->state.aggressive = (md->status.mode&MD_ANGRY) ? 1 : 0; md->state.skillstate = MSS_IDLE; md->next_walktime = tick+rnd()%1000+MIN_RANDOMWALKTIME; md->last_linktime = tick; md->dmgtick = tick - 5000; md->last_pcneartime = 0; for (i = 0, c = tick-MOB_MAX_DELAY; i < MAX_MOBSKILL; i++) md->skilldelay
= c; memset(md->dmglog, 0, sizeof(md->dmglog)); md->tdmg = 0; if (md->lootitem) memset(md->lootitem, 0, sizeof(*md->lootitem)); md->lootitem_count = 0; if(md->db->option) // Added for carts, falcons and pecos for cloned monsters. [Valaris] md->sc.option = md->db->option; // MvP tomb [GreenBox] if ( md->tomb_nid ) mob->mvptomb_destroy(md); map->addblock(&md->bl); if( map->list[md->bl.m].users ) clif->spawn(&md->bl); skill->unit_move(&md->bl,tick,1); mob->skill_use(md, tick, MSC_SPAWN); return 0;}
And can you explain these to me? What are those for?
md->attacked_id = 0;
md->target_id = 0;
md->move_fail_count = 0;
Thank you so much.