c0ncrete
12-13-2012, 01:04 AM
i'm attempting to implement a custom quest event. the data i would like to export is stored in two sequences of pairs stored in vectors, and the vectors will likely vary in size.
seeing as how EventPlayer() only takes data as a string and extra data is a numeric value, i need to know the best way to convert and pass the data. i have seen a char sequence built and passed to EVENT_LOOT, then broken up via the Seperator class.
i was considering simply building two non-delimited char sequences, then putting them together in a single string, and passing the length of the first sequence as extradata so i could know where one data set ended and the other began. i could then either pass them both directly to perl and parse the data there (unpack), or break the data up in c++ and try my hand at exporting a hash (like qglobals).
i'm trying to avoid having to run additional database queries in perl by handling things in this manner. i'm still learning c++ (mostly by example, trial, and error), and would appreciate any further insight or suggestions as to the best way to handle this.
seeing as how EventPlayer() only takes data as a string and extra data is a numeric value, i need to know the best way to convert and pass the data. i have seen a char sequence built and passed to EVENT_LOOT, then broken up via the Seperator class.
i was considering simply building two non-delimited char sequences, then putting them together in a single string, and passing the length of the first sequence as extradata so i could know where one data set ended and the other began. i could then either pass them both directly to perl and parse the data there (unpack), or break the data up in c++ and try my hand at exporting a hash (like qglobals).
i'm trying to avoid having to run additional database queries in perl by handling things in this manner. i'm still learning c++ (mostly by example, trial, and error), and would appreciate any further insight or suggestions as to the best way to handle this.