I'm currently use setunitdata to change str,min attk and max attk of a mob like this:
// Save current mob data
getunitdata .GID, .@por_arr;
// Cache origin value of mob for the first time to calculate anger later
if (!.origin_sch_data) {
copyarray .origin_sch_data[0], .@por_arr[0], getarraysize(.@por_arr);
}
set .@newminatk, .origin_sch_data[UMOB_ATKMIN] + .anger_arr[1] * 2;
set .@newmaxatk, .origin_sch_data[UMOB_ATKMAX] + .anger_arr[1] * 2;
setunitdata .GID,UMOB_STR,.origin_sch_data[UMOB_STR] + .anger_arr[1];
setunitdata .GID,UMOB_ATKMIN,.@newminatk;
setunitdata .GID,UMOB_ATKMAX,.@newmaxatk;
But as i log through the command line, i can see that the atk of mob is decreasing instead of increasing:
This is small piece of code i put into setunitdata source code to log:
if(calc_status){
status_calc_bl(&md->bl, SCB_BATTLE);ShowDebug("log current min-maxatk: %d %d\n", md->status.rhw.atk, md->status.rhw.atk2);}
Also this is the stat of the mob i spawn:
Is there any wrong with command "setunitdata" for atk calculating?
Another try: When i increase int, the matk is increase too.
Question
nguyenhuy123
I'm currently use setunitdata to change str,min attk and max attk of a mob like this:
But as i log through the command line, i can see that the atk of mob is decreasing instead of increasing:
This is small piece of code i put into setunitdata source code to log:
Also this is the stat of the mob i spawn:
Is there any wrong with command "setunitdata" for atk calculating?
Another try: When i increase int, the matk is increase too.
Edited by nguyenhuy1232 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.