Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO]HP Bar not changing


Wortel Angels
 Share

Recommended Posts

Hi
I found an Bug…

Here you can see my hp is at 321
[![](http://www7.pic-upload.de/thumb/25.03.12/78x6okcaqujf.png)](http://www.pic-upload.de/view-13488475/Unbenannt.png.html)
Then im using Heal…
Im HP is full but the HP bar
[![](http://www7.pic-upload.de/thumb/25.03.12/miz6vedillf.png)](http://www.pic-upload.de/view-13488481/Unbenannt1.png.html)
Link to comment
Share on other sites

It's not a bug, it's just refresh lag (I do believe)
Look around in modCombat, you could add something like UpdateVitals or w.e. the sub is that refreshes the health bar after every Hot, Dot and Initial spell cast.
Link to comment
Share on other sites

I guess we should just add the call updatestats and  mp/hp updates to things that need it like L said.. I recently tried to do this to the buff system ryoku posted but it didn't work ou.t. I haven't tried to do it for other things though.. I guess I will try when I get home today unless someone else can point us in a better direction
Link to comment
Share on other sites

The server will force update vitals every 5 seconds. However, an immediate update may be desired in some cases.

So whenever you want to force a vital update:
```
Call SendVital(index, Vitals.HP) ' force HP
Call SendVital(index, Vitals.MP) ' force MP

```
So, bug fix time. Yaaaay.

* * *

**Server-side:**

Find:
```
Public Sub SpellPlayer_Effect(ByVal Vital As Byte, ByVal increment As Boolean, ByVal index As Long, ByVal Damage As Long, ByVal spellnum As Long)

```
Now, **right before the last End If** add:
```
SendVital index, Vital

```
**Fixing HoTs**

First find:
```
Public Sub HandleHoT_Player(ByVal index As Long, ByVal hotNum As Long)

```
and under:
```
Player(index).Vital(Vitals.HP) = Player(index).Vital(Vitals.HP) + Spell(.Spell).Vital

```
add:
```
SendVital index, Vitals.HP

```

>! If you're using the bug fix that [I have here](http://www.touchofdeathforums.com/smf/index.php/topic,78899.msg846249.html#msg846249), instead follow these steps:
>! Find:
```
If Spell(.Spell).Type = SPELL_TYPE_HEALHP Then
  SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32
  SetPlayerVital index, Vitals.HP, GetPlayerVital(index, Vitals.HP) + Spell(.Spell).Vital
Else
  SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightBlue, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32
  SetPlayerVital index, Vitals.MP, GetPlayerVital(index, Vitals.MP) + Spell(.Spell).Vital
End If
>! ```
and change it to:
```
If Spell(.Spell).Type = SPELL_TYPE_HEALHP Then
  SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightGreen, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32
  SetPlayerVital index, Vitals.HP, GetPlayerVital(index, Vitals.HP) + Spell(.Spell).Vital
  SendVital index, Vitals.HP
Else
  SendActionMsg Player(index).Map, "+" & Spell(.Spell).Vital, BrightBlue, ACTIONMSG_SCROLL, Player(index).x * 32, Player(index).y * 32
  SetPlayerVital index, Vitals.MP, GetPlayerVital(index, Vitals.MP) + Spell(.Spell).Vital
  SendVital index, Vitals.MP
End If
>! ```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...