HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

SaveAgentHandle

08-13-2009, 07:13 PM#1
Troll-Brain
Collapse JASS:
native  SaveAgentHandle                    takes hashtable table, integer parentKey, integer childKey, agent whichAgent returns boolean
I fail to see how it could be useful, since we don't have GetAgentHandle.
For sure it is useful for something but i really don't understand why, and i shouldn't be the only one, could someone explain me the usefulness of this function plz ?
08-13-2009, 07:17 PM#2
Earth-Fury
Quote:
Originally Posted by Troll-Brain
Collapse JASS:
native  SaveAgentHandle                    takes hashtable table, integer parentKey, integer childKey, agent whichAgent returns boolean
I fail to see how it could be useful, since we don't have GetAgentHandle.
For sure it is useful for something but i really don't understand why, and i shouldn't be the only one, could someone explain me the usefulness of this function plz ?

Either blizzard fails horribly (which I don't think is the case here), or handles now have type information and agents saved with SaveAgentHandle can be retrieved with the properly-typed get function.
08-13-2009, 07:19 PM#3
Rising_Dusk
Quote:
Originally Posted by Earth-Fury
Either blizzard fails horribly (which I don't think is the case here), or handles now have type information and agents saved with SaveAgentHandle can be retrieved with the properly-typed get function.
The bolded part is correct. It is meant as a replacement to H2I/I2H functionality.
08-13-2009, 07:34 PM#4
Troll-Brain
That was i thought but then it's pretty useless for me, like most vJassers i don't use I2H anymore since i used vJass and structures.
I guess IceFrog at least will use it :p

Thx for the answer.
08-14-2009, 04:33 PM#5
fX_
whats an agent?
08-14-2009, 04:36 PM#6
Troll-Brain
Take a look inside the common.j file (inside the war3patch.mpq)
08-14-2009, 04:56 PM#7
Rising_Dusk
Certain handles extend agent, which means that they can be saved inside of hashtable as an agent var. It's for compatibility with H2I/I2H systems is all, really.