Jump to content
  • 0

Homunculus HP/SP problem


RagnaDev

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  05/05/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  05/05/17
  • Last Seen:  

bump

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   0
  • Joined:  12/10/14
  • Last Seen:  

I have the same problem. Help please.

Link to comment
Share on other sites

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