azerothcore/mod-autobalance

Bug: valithria dreamwalker icc appears with 100% life

Fireevil opened this issue · 5 comments

Current Behaviour

the dragon appears with all her life with autobalance

278090944-c3df8e29-2271-4adb-adf1-1a457ce1704a

Expected Behaviour

She should have 1/2 life and we must cure her 100%

Steps to reproduce the problem

.

Extra Notes

No response

AutoBalance Debug Commands

No response

AC rev. hash/commit

41dba1affbb5a24457a894bf3d503f4aa6303a1b

Operating system

windows 10

Custom changes or Modules

mod-autobalance

kjack9 commented

Confirmed, I will work on this.

kjack9 commented

I think this is a side effect of how the boss script is written.

AutoBalance is correctly adjusting the creature health when scaling:

AutoBalance::getStatModifiers: Map Icecrown Citadel (631-4) | Creature Valithria Dreamwalker (83->83) | 10 Player Normal Boss
<...>
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | ---------- HEALTH MULTIPLIER ----------
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | HealthMultiplier: (0.060558204) = defaultMultiplier (0.067286894) * statMod_global (1) * statMod_health (0.9)
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | scaledHealthMultiplier (0.060558204) = healthMultiplier (0.060558204)
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | origHealth (12000007) = origCreatureBaseStats->GenerateHealth(creatureTemplate)
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | newFinalHealth (726699) = origHealth (12000007) * HealthMultiplier (0.060558204)
<...>
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | ---------- FINAL STATS ----------
AutoBalance_AllCreatureScript::ModifyCreatureAttributes: Creature Valithria Dreamwalker (83) | Health (6000003/12000007 50.0%) -> (363349/726699 50.0%)

However, the script is adjusting the _spawnHealth based on the creature template.

https://github.com/azerothcore/azerothcore-wotlk/blob/41dba1affbb5a24457a894bf3d503f4aa6303a1b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp#L297-L299

This will require an update to the boss script in the core, which I plan to work on. Shouldn't be crazy complicated, just need to adjust the initial health based on the creature's max health in the world rather than in the database.

kjack9 commented

Confirmed, that's definitely what it is. Working on a PR to the core to make the script more module-friendly.

kjack9 commented

Please update to the latest AzerothCore revision and let me know if this is still an issue.

image

Work fine with autobalance