[DiscordArchive] ...So... I should summon Rend with GM commands and see what happens?
[DiscordArchive] ...So... I should summon Rend with GM commands and see what happens?

Archived author: Jinnai • Posted: 2022-04-06T06:21:05.449000+00:00
Original source
good morning 
the commit you posted does not fix what you describe but it fixes inconsistency with the doors that should open after rend is killed. Problem here was that at certain locations inside in the arena he was too far away for the old script to target the door correctly.
The remaining problem with rend to appear is damaging/killing gyth too fast. (fun fact - that problem existed on retail too).
Please do no expect something to happen by adding random additional spawns, thats not a suggested way to fix anything.
What you want to do is look at gyths scripts. (/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp)
Here is whats currentyl happening in row 103:
```cpp
void UpdateAI(uint32 diff) override
{
if (!SummonedRend && HealthBelowPct(5))
{
DoCast(me, SPELL_SUMMON_REND);
me->RemoveAura(SPELL_REND_MOUNTS);
SummonedRend = true;
}
```
here it checks if his health is BELOW 5 percent of his max health (and thats not a lot).
what you can do for example, is remove the whole if statement here and add a new function:
```cpp
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
{
if (!SummonedRend && me->HealthBelowPctDamaged(5, damage))
{
DoCast(me, SPELL_SUMMON_REND);
me->RemoveAura(SPELL_REND_MOUNTS);
SummonedRend = true;
}
}
```
this will get rid of the potential damage overshooting in updateAI and should guarantee him appearing