Jump to content

Question

7 answers to this question

Recommended Posts

Posted

 

All parts works Fine just the following one brings mapserver to Crash when heal undead ! like before! but Looks much better with names of chars thx^^

 

 

Try replacing ...

	if (src->type == BL_PC) {
		sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
		clif_displaymessage(sd->fd, str);
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}

With:

	if (src->type == BL_PC) {
		if (target->type == BL_PC) {
			sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
			clif_displaymessage(sd->fd, str);
		}
		else {
			sprintf(str, "Target healed for %dhp!", hp);
			clif_displaymessage(sd->fd, str);
		}
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}
  • Upvote 1
  • Like 1
Posted

There's probably a better way to do this but until someone does it...

 

In skill.c after

int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal) {
	int skill, hp = 0;
	struct map_session_data *sd = BL_CAST(BL_PC, src);
	struct map_session_data *tsd = BL_CAST(BL_PC, target);
	struct status_change *sc, *tsc;

Add

	char str[255];

Then before

	return hp;
}

Add

	if (src->type == BL_PC) {
		if (target->type == BL_PC) {
			sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
			clif_displaymessage(sd->fd, str);
		}
		else {
			sprintf(str, "Target healed for %dhp!", hp);
			clif_displaymessage(sd->fd, str);
		}
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}
Posted

Great that what iam searched for :D thanks ! but iam intrested what "way" you are talking about !^^


OHHHH my mapserver crashes now if iam using Heal on an Undead !!! 

 

 

There's probably a better way to do this but until someone does it...

 

Posted

 

Great that what iam searched for :D thanks ! but iam intrested what "way" you are talking about !^^

OHHHH my mapserver crashes now if iam using Heal on an Undead !!! 

 

 

 

I actually tested to see if that would happen... and it didn't on my server but try this...

 

Replace:

	sprintf(str, "You've healed %d!", hp);
	clif_displaymessage (sd->fd, str);
	sprintf(str, "You've been healed %d!", hp);
	clif_displaymessage (tsd->fd, str);

With:

	if (src->type == BL_PC) {
		sprintf(str, "You've healed %s for %dhp!", tsd->status.name, hp);
		clif_displaymessage(sd->fd, str);
	}
	if (target->type == BL_PC && target->id != src->id) {
		sprintf(str, "You've been healed for %dhp by %s!", hp, sd->status.name);
		clif_displaymessage(tsd->fd, str);
	}

And change...

char str[32];

To

char str[255];
Posted (edited)

 

I actually tested to see if that would happen... and it didn't on my server but try this...

 

 

All parts works Fine just the following one brings mapserver to Crash when heal undead ! like before! but Looks much better with names of chars thx^^

Edited by Skorm
Posted (edited)

After all the time i reconized that if an Mob trys to use his heal tested on Fallen Bishop and Beelzebub it crashes mapserver ! after deleting it  mapserver works fine !  Maybe you or someonelse have an Solution.!?

i think sd&& tsd&& must be integrated but dunno right where!

Edited by GmHeathcliff

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...