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.)
Question
Humble_Bee
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.)
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.