Jump to content
  • 0

Adding HIT on spawned mob globally


Technoken

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

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

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...