Jump to content
  • 0
Humble_Bee

Regen for mobs

Question

Posted (edited)

I'm looking to add regen for mobs. I think I've changed everything I need to except for one piece:

 * Gets the regeneration info of the given bl
 * @param bl: Object whose regen info to get [PC|HOM|MER|ELEM] //mob added AP
 * @return regen data or NULL if any other bl->type than noted above
 */
struct regen_data *status_get_regen_data(struct block_list *bl)
{
	nullpo_retr(NULL, bl);
	switch (bl->type) {
		case BL_PC:	return &((TBL_PC*)bl)->regen;
		case BL_HOM:	return &((TBL_HOM*)bl)->regen;
		case BL_MER:	return &((TBL_MER*)bl)->regen;
		case BL_ELEM:	return &((TBL_ELEM*)bl)->regen;
		case BL_MOB:    return &((TBL_MOB*)bl)->regen;
		default:
			return NULL;
	}
}

 

The compiler is saying that regen is not a member/part of TBL_MOB.  How do I add regen to TBL_MOB? Anyone know? I'm not familiar with C++, so my weak attempts have failed. (The above code is found in status.cpp.)

 

Edited by Humble_Bee
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.