Since Blizzard has released a new patch (1.24) a while ago it was time for me to update the ASL core code.
The patch brings some new natives and is only available on the Westfall battle.net server.

Blizzard wanted to fix the Return Bug because it allowed users to run “evil” code on the operating system.
Unfortunately the Return Bug is used by many custom maps and systems (including the ASL), so Blizzard had to add natives which allows people to do what they’ve already done with the Return Bug. For example getting handle ids and saving data into a game cache.
GetHandleId is the new native function which replaces the functionality of H2I (common identifier of the custom Return Bug handle id function).
Furthermore they added the new data type hashtable which can be used for things which people used game cache for before. There’s an ASL struct called AHashTable which already provided some similar functionality but also used game cache.
I rewrote its code and now it uses hashtable. Unfortunately I didn’t have the time to create some benchmarks and test how much faster the hashtable data type is.
Note that the latest ASL version only can be used with Warcraft TFT 1.24.
Hashtables do not use string keys and labels like game cache does. Therefore (I think) Blizzard added the native function StringHash which generates an integer hash value from a string.
So AHashTable does still use string keys and labels but maybe will also provide some clear integer-using methods in future.
Additionally Blizzard added the useful and missing natives GetSpellTargetX and GetSpellTargetY, so people do not have to use those fucking leaking locations for custom spells anymore. I’ve already replaced the function calls of all “Die Macht des Feuers” spells.
I’m still not sure what the new data type agent really does. It’s used for all reference counted objects so maybe this is a fix of the famous leak bug and I won’t have to set all handle values and return values to null anymore. Would be a great feature since I’m saving ALL handle return values by using local variables and setting them to null at the and of function like GetTriggeringTrigger or TriggerAddAction.
Please do also note that some method names of AHashTable have changed (they are shorter now).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: