Jump to content
  • 0

Homunculus HP/SP problem


Hi, every time I relog, homunculus HP and SP are fully restored.

After review int_homun.c , I realized that all values are loaded and set to the homun (Lvl, Name, Stats, etc...) but hd->hp and hd->sp are not updating the value ingame.

On database, homunculus table values are:

HP: 5000
MAX HP: 10000;
SP: 100
MAX SP: 500;

int_homun.c fragment of atois after sql query

Sql_GetData(sql_handle, 15, &data, NULL); hd->hp = atoi(data);
Sql_GetData(sql_handle, 16, &data, NULL); hd->max_hp = atoi(data);
Sql_GetData(sql_handle, 17, &data, NULL); hd->sp = atoi(data);
Sql_GetData(sql_handle, 18, &data, NULL); hd->max_sp = atoi(data);

And to verify the values:

ShowInfo("Homunculus loaded (HP: %d / MHP: %d - SP: %d / MSP: %d).\n", hd->hp, hd->max_hp, hd->sp, hd->max_sp);

Prints: Homunculus loaded (HP: 5000 / MHP: 10000 - SP: 100 / MSP: 500).

So, data is being loaded, but is not being applied.
Any help will be appreciated.


Link to comment
Share on other sites

2 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.

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.