vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Sat May 25, 2013 5:03 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: HP/MP/SP Recover Bug
PostPosted: Fri Sep 28, 2007 9:48 pm 
+7 Claymore of Slaying

Joined: Thu Dec 21, 2006 6:24 pm
Posts: 594
Location: Land made of long cloud. Wait no its Land of white clouds. Actually i think its New Zealand.
I found out that ur HP/MP/SP recovers more than the max hp/mp/sp.

It doesn't automatically change the overloaded HP/MP/SP back to the max amount.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 29, 2007 7:23 am 
Arithmophobia

Joined: Thu Sep 20, 2007 5:54 pm
Posts: 328
Location: Los Angeles
On the Server in General.bas under "Server_Update_Users" inside of
Code:
With UserList(UserIndex).Stats

add:
Code:
If .BaseStat(SID.MinHP) > .ModStat(SID.MaxHP) Then .BaseStat(SID.MinHP) = .ModStat(SID.MaxHP)
If .BaseStat(SID.MinSTA) > .ModStat(SID.MaxSTA) Then .BaseStat(SID.MinSTA) = .ModStat(SID.MaxSTA)
If .BaseStat(SID.MinMAN) > .ModStat(SID.MaxMAN) Then .BaseStat(SID.MinMAN) = .ModStat(SID.MaxMAN)

You will still be healed for more then your max hp/mp/sp, but as soon as the next natural update comes around it'll lower back to your max.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 29, 2007 7:54 am 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Uhm, it actually does:

Code:
Public Property Let ModStat(ByVal StatID As Byte, ByVal Value As Long)

    Log "Let ModStat(" & StatID & "," & Value & ")", CodeTracker '//\\LOGLINE//\\

    'Check for a reference to a stat that can not be modded
    If StatID < FirstModStat Then
        Log "ModStat(Let): Invalid stat ID (" & StatID & ") was referenced for ModStat. This stat does not use a mod value.", CriticalError '//\\LOGLINE//\\
        Exit Property
    End If
   
    'Let the stat value
    If ModStat(StatID) = Value Then Exit Property
    ModStats(StatID) = Value
    UpdateModStats(StatID) = 1
   
    'Apply limit on HP/Mana/Stamina
    If BaseStat(SID.MinHP) > ModStat(SID.MaxHP) Then BaseStat(SID.MinHP) = ModStat(SID.MaxHP)
    If BaseStat(SID.MinMAN) > ModStat(SID.MaxMAN) Then BaseStat(SID.MinMAN) = ModStat(SID.MaxMAN)
    If BaseStat(SID.MinSTA) > ModStat(SID.MaxSTA) Then BaseStat(SID.MinSTA) = ModStat(SID.MaxSTA)
   
    'Keep the HP, Mana and Stamina above or equal to 0
    If BaseStat(SID.MinHP) < 0 Then BaseStat(SID.MinHP) = 0
    If BaseStat(SID.MinMAN) < 0 Then BaseStat(SID.MinMAN) = 0
    If BaseStat(SID.MinSTA) < 0 Then BaseStat(SID.MinSTA) = 0
   
End Property


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 29, 2007 9:50 am 
Arithmophobia

Joined: Thu Sep 20, 2007 5:54 pm
Posts: 328
Location: Los Angeles
well hell, there ya go.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 29, 2007 11:22 am 
+7 Claymore of Slaying

Joined: Thu Dec 21, 2006 6:24 pm
Posts: 594
Location: Land made of long cloud. Wait no its Land of white clouds. Actually i think its New Zealand.
Thx.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group