azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.43k stars 2.58k forks source link

Creature_template DamageModifier doesn't affect summons #9291

Open T1ti opened 2 years ago

T1ti commented 2 years ago

Current Behaviour

Tested with Hunter's Snake trap, creature Viper entry 19921. Changing the the DamageModifier in creature_template, it has no effect on the summons damages.

Expected Blizzlike Behaviour

We should be able to set the damage values of summons, if this issue affects all summons, this means all summons are currently forced to use default template dmg.

Source

No response

Steps to reproduce the problem

  1. Change DamageModifier of any summoned creature in creature_template.
  2. Compare if the summons damage is different.

Extra Notes

This might have been caused when we changed the creature damage system to CLS from flat value earlier this year, maybe the summons dmg formula wasn't updated to use DamageModifier .

AC rev. hash/commit

3b1b80cbaae35dbbd2ec909a046beb44d3a6aa10

Operating system

Windows 10 x64

Custom changes or Modules

None

Algorak commented 2 years ago

Affects general pets such as Army of the Dead, Ghoul, and Felguard, which currently don't even get the 20% AP from the glyph. So you should look at the pets in general. Hunter pets and other pets get the damage adjustment, but the base strength etc should be higher when looking at the wolf on our core and on the Trinity core. You will see that you are significantly higher up on the Trinity core.

duncrafter commented 2 years ago

Global modifier from worldserver.conf also doesn't seem to apply

Algorak commented 2 years ago

Companions like the Hunter that are switched quickly retain the old talents, even if the new animal hasn't trained those talents.

The core doesn't calculate anything correctly at the moment, everything that increases the damage takes forever to be properly calculated. You can see it well in Icecrown, where the pet gets the % buff, only at a certain point do the adjustments come! Even if the pet leaves Totems and comes back again, the stats will not be recalculated immediately! And that's why the Hunter and the demo here aren't doing the dmg they should be doing!

duncrafter commented 2 years ago

Currently looking for a solution, probably missing code for modifiers in Pet.cpp

duncrafter commented 2 years ago

I may have found a solution. Global modifiers are sorted by creature rank (Normal, Elite etc.) and a certain modfier is only applied when a creature possesses the correct rank.

I found this line in Creature.cpp before the code for modifiers: uint32 rank = IsPet() ? 0 : cInfo->rank; My knowledge of coding is limited, but I think this means the creature's rank is only pulled from the database when it isn't a pet.

So all pets would have no applicable rank information and the following lines of code would go unused.

Dreathean commented 1 week ago

Can confirm this still an issue for proc summons, they are not affected by damage and health modifiers currently.