I am looking for a src that adds a permanent hit to all the mobs spawned in my server. I wanted to apply this since I'm running a high rate hunting server.
Upon researching I found something to change it via src. I already forgot where I got this idea to change mob spawn stats.
on mob.c under int mob_spawn (struct mob_data *md)
It was working as i've wanted, but just now I realized the that hit is being recalculated when the mob changed property, and setting the status.hit to it's default hit.
Now I wanted it to function again and increase all mobs hit on spawn, but I don't know where should I apply it now or how to fix this issue.
I was thinking that it is not working now because of this fix so I tried to replace md->status.hit with md->base_status->hit. It doesn't have any compilation errors or map-server errors. But whenever I start the server, it's always crashing the map-server.
Maybe someone here can help me how can I add permanent hit on ALL mobs during spawn?
Question
Technoken
I am looking for a src that adds a permanent hit to all the mobs spawned in my server. I wanted to apply this since I'm running a high rate hunting server.
Upon researching I found something to change it via src. I already forgot where I got this idea to change mob spawn stats.
on mob.c under int mob_spawn (struct mob_data *md)
memset(&md->state, 0, sizeof(md->state)); status_calc_mob(md, SCO_FIRST); + if( !mob_is_clone(md->mob_id) ) // Increase mob's HIT except clones + md->status.hit = (md->status.hit * 250) / 100; md->attacked_id = 0; md->norm_attacked_id = 0; md->target_id = 0; md->move_fail_count = 0; md->ud.state.attack_continue = 0; md->ud.target_to = 0;
It was working as i've wanted, but just now I realized the that hit is being recalculated when the mob changed property, and setting the status.hit to it's default hit.
And it is somehow related to the issue i posted on github https://github.com/rathena/rathena/issues/1903
Now I wanted it to function again and increase all mobs hit on spawn, but I don't know where should I apply it now or how to fix this issue.
I was thinking that it is not working now because of this fix so I tried to replace md->status.hit with md->base_status->hit. It doesn't have any compilation errors or map-server errors. But whenever I start the server, it's always crashing the map-server.
Maybe someone here can help me how can I add permanent hit on ALL mobs during spawn?
Thank you!
Link to comment
Share on other sites
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.