[DiscordArchive] well if a player dies they get cleared from the threat list dont they?
[DiscordArchive] well if a player dies they get cleared from the threat list dont they?
Archived author: Anchy • Posted: 2022-12-22T00:43:30.856000+00:00
Original source
well if a player dies they get cleared from the threat list dont they?
Archived author: Anchy • Posted: 2022-12-22T00:43:34.519000+00:00
Original source
so just run the same code again
Archived author: Anchy • Posted: 2022-12-22T00:43:53.913000+00:00
Original source
but inside of the remove hook instead of the add hook
Archived author: Rymercyble • Posted: 2022-12-22T00:45:26.065000+00:00
Original source
yes but i dont want to scale it down if some1 dies
Archived author: Rymercyble • Posted: 2022-12-22T00:45:34.826000+00:00
Original source
actually i dont remember how it works on retail if it also scales down
Archived author: Rymercyble • Posted: 2022-12-22T00:58:37.443000+00:00
Original source
```cpp
if (count > 1) {
std::int_fast64_t max_hp = hostileRef->GetOwner()->GetMaxHealth();
std::int_fast64_t current_hp = hostileRef->GetOwner()->GetHealth();
auto ratio = sConfigMgr->GetOption<float>("Mellian.ratio", .2f);
hostileRef->GetOwner()->SetMaxHealth(max_hp + (max_hp * (count - 1) * ratio));
hostileRef->GetOwner()->SetHealth(current_hp + (current_hp * (count - 1) * ratio));
}
```
thats so trivial it seems too good to be true
Archived author: Anchy • Posted: 2022-12-22T01:03:59.329000+00:00
Original source
seems right to me
Archived author: Anchy • Posted: 2022-12-22T01:04:45.348000+00:00
Original source
Don't forget to send an Update
Archived author: Anchy • Posted: 2022-12-22T01:05:00.218000+00:00
Original source
I think it's UpdateStats()
Archived author: Rymercyble • Posted: 2022-12-22T01:13:22.001000+00:00
Original source
i added `UpdateAllStats()` at end of method although it was working even without it