diff options
| author | 2024-01-05 04:53:20 -0600 | |
|---|---|---|
| committer | 2024-01-05 04:53:20 -0600 | |
| commit | 11672146b9bf67cae05e8e3207c9bd1e47d52220 (patch) | |
| tree | 4d72fd88efbabeeb37509cdc99c5404528183ca1 /src/launch.c | |
| parent | downloads assets correctly (diff) | |
extracts natives
Diffstat (limited to 'src/launch.c')
| -rw-r--r-- | src/launch.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/launch.c b/src/launch.c new file mode 100644 index 0000000..cc0721f --- /dev/null +++ b/src/launch.c @@ -0,0 +1,31 @@ +#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 +} |
