#include "l2su.h" /* TODO launch struct */ int l2_launch_fill_substitutor(l2_subst_t *st, void *reserved, json_t *version, struct l2_instance *inst) { #define L2_LAUNCH_ADD_SUB(_st, _name, _val) \ if (l2_subst_add(_st, _name, _val) < 0) return -1 const char *ver_name; if (json_unpack(version, "{s:s}", "id", &ver_name) < 0) { return -1; } /* auth_access_token */ /* user_properties */ /* user_property_map */ L2_LAUNCH_ADD_SUB(st, "auth_session", "-"); L2_LAUNCH_ADD_SUB(st, "auth_player_name", "figboot"); L2_LAUNCH_ADD_SUB(st, "auth_uuid", "00000000000000000000000000000000"); L2_LAUNCH_ADD_SUB(st, "user_type", "legacy"); L2_LAUNCH_ADD_SUB(st, "profile_name", inst->name); L2_LAUNCH_ADD_SUB(st, "version_name", ver_name); L2_LAUNCH_ADD_SUB(st, "game_directory", "."); return 0; #undef L2_LAUNCH_ADD_SUB }