SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post in this forum if you found any bugs with server functionality.

Moderator: Team Members

Forum rules
READ THE STICKY ON PROPER BUG SUBMISSION FORMAT BEFORE POSTING.
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Gangrenous » Sat May 28, 2016 4:21 am

Well damn why is my duration going crazy.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Gangrenous » Tue May 31, 2016 3:44 pm

Could you explain this fix a little better for me, the more I know then the more I can help other people in the future.

Code: Select all

bonus->tier = spell ? spell->spell->GetSpellTier() : 0;
Resident Dirty Hippy

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Jabantiz » Tue May 31, 2016 4:17 pm

SetMaxHP used add spell bonus with no spell, however the code assumed spell was always valid and therefor when it hit the line spell->spell->GetSpellTier() it crashed as spell was null, the line of code you posted is the exact same thing as

Code: Select all

if (spell)
    bonus->tier = spell->spell->GetSpellTier();
else
    bonus->tier = 0;
it is just nice and neat on a single line instead of 4 lines of code.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Jabantiz » Tue Jun 07, 2016 7:15 pm

I tried to tackle the buff issue mentioned in this thread again and it seems to have revealed a deeper issue with timed buffs, if left alone they seems to work fine but if a buff is reapplied early it seems to break that buff where the icon will never disappear from the spell effects window but it only lasts in the maintained window for about half a sec then vanishes taking the actual spell effect with it.

So this is going to take longer to find and fix then I originally thought, just wanted to give an update to let you know I am still working on it when I get the time.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Gangrenous » Tue Jun 07, 2016 8:10 pm

Oh now worry, and I did figure out the problem I mentioned before on the buffs have random timers. If I do not put the buff duration in BuffDuration and BuffDuration2 it does act randomly. If I put the value in both the problem appears okay. I am in no super rush, there are so many things that have to be done I can skip certain aspects and move on to other things.
Resident Dirty Hippy

User avatar
Cynnar
Project Leader
Posts: 738
Joined: Sat Sep 27, 2014 1:22 am
EQ2Emu Server: Eq2emulator
Characters: Vlash
Veinlash
Taragak
Cynnar

Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))

Post by Cynnar » Sun Jun 24, 2018 9:32 pm

Moving to archives this week.
[ 01000011 01111001 01101110 01101110 01100001 01110010 ]

Follow on:
Twitter Facebook

Contact me:
PM Discord chat email

Hardware: the parts of a computer that can be kicked

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests