[JASS] Engine damage?

Status
Not open for further replies.
Level 7
Joined
Aug 20, 2005
Messages
98
As many of you may know damage detection systems in Warcraft don't really work. The problem being that you end up creating a trigger with a huge list of event attached to it. Now you can use the DestroyTrigger function to get rid of these leaked events but it seems that destroying triggers is not in itself safe.

My question is this: How does the Warcraft engine itself deal damage? Couldn't we just hook the function that it uses to deal damage?

The only functions that I know of for dealing damage are UnitDamageTarget and UnitDamagePoint. Does the engine use these to calculate attack damage?
 
No idea. You have to hack the Warcraft engine (probably written in C) to find out.

Destroying Triggers cause some memory leak, but its cleaned up automatically after a while. That's what I heard. I also read that its safer to combine your actions with your conditions, so your trigger doesn't use an action, just a condition that does everything.

The thing is, I doubt that the natives are actually really native. I think that actually call another function written in another syntax language. I'm not too sure though. If its so, there's probably another function that actually does the damage.
 
Status
Not open for further replies.
Back
Top