Jump to content

[Mangos-0.12] Wrong calculating bonus after recent backportings !


Recommended Posts

Posted

Maybe wrong coeff in table... As i known MiLk13 prepare updated content for table.

I will look if this core related. But note: we currently not have fully backported all spell_bonus changes so some bug from old master code possible not yet fixed.

Master code req. lot less data in table also.

Posted

in fact caused GetSpellDuration(spellProto) result .

it's -1

Unit.cpp

       if(damagetype == DOT)
       {
           int32 DotDuration = GetSpellDuration(spellProto);
           // 200% limit
           if(DotDuration > 0)
           {
               if(DotDuration > 30000) DotDuration = 30000;
               if(!IsChanneledSpell(spellProto)) DotFactor = DotDuration / 15000.0f;
               int x = 0;
               for(int j = 0; j < 3; j++)
               {
                   if( spellProto->Effect[j] == SPELL_EFFECT_APPLY_AURA && (
                       spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_DAMAGE ||
                       spellProto->EffectApplyAuraName[j] == SPELL_AURA_PERIODIC_LEECH) )
                   {
                       x = j;
                       break;
                   }
               }
               int32 DotTicks = 6;
               if(spellProto->EffectAmplitude[x] != 0)
                   DotTicks = DotDuration / spellProto->EffectAmplitude[x];
               if(DotTicks)
               {
                   DoneAdvertisedBenefit /= DotTicks*int32(stack);
                   TakenAdvertisedBenefit /= DotTicks*int32(stack);
               }
           }
       }

can you any fast solution or i must rollback own server ? :(

Posted

emergency patch

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b5abcb9..7b49835 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7830,7 +7830,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
                    DoneAdvertisedBenefit /= DotTicks*int32(stack);
                    TakenAdvertisedBenefit /= DotTicks*int32(stack);
                }
-            }
+            }else
+                return healamount;
        }
        // Distribute Damage over multiple effects, reduce by AoE
        CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );

Posted

I guess the only way is to manage all the spells manually :S

For the example in this thread:

INSERT INTO `mangos`.`spell_bonus_data`(`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`comments`) VALUES 
( '10461','0','0','0','Shaman - Healing Stream Totem Rank 5'),
( '10460','0','0','0','Shaman - Healing Stream Totem Rank 4'),
( '6372','0','0','0','Shaman - Healing Stream Totem Rank 3'),
( '6371','0','0','0','Shaman - Healing Stream Totem Rank 2'),
( '5672','0','0','0','Shaman - Healing Stream Totem Rank 1');

At least I guess ! Milk13 will do this better than me.

Posted

Merci pour ton travail Milk13, je te dirais si je constate d'autres sorts à ajouter à la liste.

Thank you for you work, Milk13, I'll tell you if I found more data to add to the table.

Posted

this can help to found missed spells :)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b5abcb9..7b49835 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7830,7 +7830,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
                    DoneAdvertisedBenefit /= DotTicks*int32(stack);
                    TakenAdvertisedBenefit /= DotTicks*int32(stack);
                }
-            }
+            }else
+                sLog.outError("Missed spell_bonus_data : %u",spellProto->Id);
        }
        // Distribute Damage over multiple effects, reduce by AoE
        CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use