Page 2 of 2
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Sat May 28, 2016 4:21 am
by Gangrenous
Well damn why is my duration going crazy.
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Tue May 31, 2016 3:44 pm
by Gangrenous
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;
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Tue May 31, 2016 4:17 pm
by Jabantiz
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.
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Tue Jun 07, 2016 7:15 pm
by Jabantiz
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.
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Tue Jun 07, 2016 8:10 pm
by Gangrenous
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.
Re: SetMaxHP(Target, (GetMaxHP(Target) + 50))
Posted: Sun Jun 24, 2018 9:32 pm
by Cynnar
Moving to archives this week.