Skip to content

Commit

Permalink
Merge pull request #186 from chinosk6/main
Browse files Browse the repository at this point in the history
修复比赛第一人称失效
  • Loading branch information
ChihyuenWang authored May 4, 2024
2 parents 8fb1b9a + 9e04fba commit 6c1a123
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ namespace

void* (*RaceViewBase_GetModelController)(void*, int);
void* (*Race_get_HeadTransform)(void*);
void* (*GetPrefabAttachTransform)(void*, int);
void* (*GetPrefabAttachTransform)(void*, int, Il2CppString*);
void* (*get_HeadObject)(void*);
void* (*GetCancelTransform)(void*, int);
void (*getTransformLocalPosition)(void*, Vector3_t*);
Expand All @@ -3404,7 +3404,7 @@ namespace

convertPtrType(&RaceViewBase_GetModelController, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceViewBase", "GetModelController", 1));
convertPtrType(&Race_get_HeadTransform, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceModelController", "get_HeadTransform", 0));
convertPtrType(&GetPrefabAttachTransform, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceModelController", "GetPrefabAttachTransform", 1));
convertPtrType(&GetPrefabAttachTransform, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceModelController", "GetPrefabAttachTransform", 2));
convertPtrType(&get_HeadObject, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceModelController", "get_HeadObject", 0));
convertPtrType(&get_OwnerObject, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "ModelController", "get_OwnerObject", 0));
convertPtrType(&GetCancelTransform, il2cpp_symbols::get_method_pointer("umamusume.dll", "Gallop", "RaceModelController", "GetCancelTransform", 1));
Expand Down Expand Up @@ -3432,8 +3432,9 @@ namespace
if (modelController) {
// auto headTransform = Race_get_HeadTransform(modelController); // 并不能获取完整的Head Transform
// auto headTransform = GetPrefabAttachTransform(modelController, 0x6);
auto eyeLTransform = GetPrefabAttachTransform(modelController, 0x7);
auto eyeRTransform = GetPrefabAttachTransform(modelController, 0x8);
const auto emptyIl2cppString = il2cpp_string_new("");
auto eyeLTransform = GetPrefabAttachTransform(modelController, 0x7, emptyIl2cppString);
auto eyeRTransform = GetPrefabAttachTransform(modelController, 0x8, emptyIl2cppString);
// auto headTransform = GetCancelTransform(modelController, 0x3);
//
// auto headObject = get_HeadObject(modelController); // UnityEngine.GameObject
Expand Down
1 change: 1 addition & 0 deletions src/requestConvert/request_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace request_convert

web::http::http_response send_post(std::wstring url, std::wstring path, std::wstring data, int timeout) {
web::http::client::http_client_config cfg;
cfg.set_validate_certificates(false);
cfg.set_timeout(utility::seconds(timeout));
web::http::client::http_client client(url, cfg);
return client.request(web::http::methods::POST, path, data).get();
Expand Down

0 comments on commit 6c1a123

Please sign in to comment.