mooege/mooege — comment on commit 886d8663085a3da4c6e25dd07a37acd81824cf1e
File: src/Mooege/Core/GS/Actors/Monster.cs line 156
By mdz444:

Actually I've replaced the whole death implementation in my fork. Currently I'm not using Monster.Die() at all, it's all implemented in DeathPayload.Apply():
https://github.com/mdz444/mooege/blob/master/src/Mooege/Core/GS/Powers/Payloads/DeathPayload.cs

It selects the death animation based on strongest attack element, rolls for chance to use power special death, and sends an event to buffs in order to implement on death procs like monk's "exploding palm" debuff.

I don't think doing death stuff in Monster.Die() ultimately is the best place to be doing it, like you can see with my implementation deaths need to know about powers and the attack that kills them. Also deaths need to be handled for players and pets, not just monsters. So I think having the code in the Monster class isn't going to work.

I actually already implemented a version of Actor.PlayAnimation(), its just kind of a raw wrapper around the message broadcast though:
https://github.com/mdz444/mooege/blob/master/src/Mooege/Core/GS/Actors/Actor.cs#L421