Your code is beyond my capabilities
good job, and thanks so much for adding me as author! I have nothing to do with programming in real life and simple vJass and libraries are those I understand and using, but structs emmbarassed me.
However, I see you added .onReviveFinish, so we dont need UnitAlive(.hero) in "callback" function?
Also in "callback" are ITE blocks proper? After first call .destroy() there is IssueTargetOrder(.building, "revive", .hero) so it's refering to .hero, .building, which can be null.
I notice that .owner is not nulled in destroy function?
Also we have to remember that Taverns with immediate revive hero will also fire EVENT_PLAYER_HERO_REVIVE_FINISH event, I dont know for now if it matters, but just in case
However, I see you added .onReviveFinish, so we dont need UnitAlive(.hero) in "callback" function?
Also in "callback" are ITE blocks proper? After first call .destroy() there is IssueTargetOrder(.building, "revive", .hero) so it's refering to .hero, .building, which can be null.
I notice that .owner is not nulled in destroy function?
Also we have to remember that Taverns with immediate revive hero will also fire EVENT_PLAYER_HERO_REVIVE_FINISH event, I dont know for now if it matters, but just in case
https://www.hiveworkshop.com/threads/herorevivecancelevent.293491/