Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Scripts/Karazhan): set Attumen the Huntsmans hp to 100% after mounting Midnight #20136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,8 @@ struct boss_attumen : public BossAI
{
if (Creature* midnight = instance->GetCreature(DATA_MIDNIGHT))
{
if (midnight->GetHealth() > me->GetHealth())
{
summon->SetHealth(midnight->GetHealth());
}
else
{
summon->SetHealth(me->GetHealth());
}
summon->SetHealth(std::max(midnight->GetHealth(), me->GetHealth()));
summon->SetMaxHealth(summon->GetHealth());
Copy link
Member

@Nyeriah Nyeriah Oct 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is correct, max health never changed just the current hp is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SetHealth() value is unchanged, only refactored

Issue is he spawns at <100% hp, so to match source the max health is set to current health

https://www.youtube.com/watch?v=kul6efg1hZA&t=150s

image

summon->AI()->DoZoneInCombat();
}
}
Expand Down