How can I make the plants from Biocannibalize skill to be resummoned (kill the previous one and relocate the new one) without having to kill the plant to place another one.
I think we need to change it here, but I don't know what exactly to touch.
case AM_CANNIBALIZE:
{
int summons[5] = { MOBID_G_MANDRAGORA, MOBID_G_HYDRA, MOBID_G_FLORA, MOBID_G_PARASITE, MOBID_G_GEOGRAPHER };
int class_ = skill_id==AM_SPHEREMINE?MOBID_MARINE_SPHERE:summons[skill_lv-1];
enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
struct mob_data *md;
// Correct info, don't change any of this! [celest]
md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src), class_, "", SZ_SMALL, ai);
if (md) {
md->master_id = src->id;
md->special_state.ai = ai;
if( md->deletetimer != INVALID_TIMER )
delete_timer(md->deletetimer, mob_timer_delete);
md->deletetimer = add_timer (gettick() + skill_get_time(skill_id,skill_lv), mob_timer_delete, md->bl.id, 0);
mob_spawn (md); //Now it is ready for spawning.
}
}
break;
Question
Vyserion
Hello community,
How can I make the plants from Biocannibalize skill to be resummoned (kill the previous one and relocate the new one) without having to kill the plant to place another one.
I think we need to change it here, but I don't know what exactly to touch.
case AM_CANNIBALIZE: { int summons[5] = { MOBID_G_MANDRAGORA, MOBID_G_HYDRA, MOBID_G_FLORA, MOBID_G_PARASITE, MOBID_G_GEOGRAPHER }; int class_ = skill_id==AM_SPHEREMINE?MOBID_MARINE_SPHERE:summons[skill_lv-1]; enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA; struct mob_data *md; // Correct info, don't change any of this! [celest] md = mob_once_spawn_sub(src, src->m, x, y, status_get_name(src), class_, "", SZ_SMALL, ai); if (md) { md->master_id = src->id; md->special_state.ai = ai; if( md->deletetimer != INVALID_TIMER ) delete_timer(md->deletetimer, mob_timer_delete); md->deletetimer = add_timer (gettick() + skill_get_time(skill_id,skill_lv), mob_timer_delete, md->bl.id, 0); mob_spawn (md); //Now it is ready for spawning. } } break;
Anyone could help?
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.