diff --git a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab new file mode 100644 index 0000000000..147b7af5f1 --- /dev/null +++ b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab @@ -0,0 +1,85 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3115015986594381284 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4817073268374044270} + - component: {fileID: 7468455974790359534} + - component: {fileID: 4154312226256128033} + m_Layer: 0 + m_Name: live2d_c_0023_02 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4817073268374044270 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3115015986594381284} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7468455974790359534 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3115015986594381284} + m_CullTransparentMesh: 0 +--- !u!114 &4154312226256128033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3115015986594381284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d85b887af7e6c3f45a2e2d2920d641bc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 2100000, guid: b66cf7a186d13054989b33a5c90044e4, type: 2} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + skeletonDataAsset: {fileID: 11400000, guid: 4dacdb4550e515b45b7133b25ee2523d, type: 2} + initialSkinName: default + initialFlipX: 0 + initialFlipY: 0 + startingAnimation: idle + startingLoop: 1 + timeScale: 1 + freeze: 0 + unscaledTime: 0 + meshGenerator: + settings: + useClipping: 1 + zSpacing: 0 + pmaVertexColors: 1 + tintBlack: 0 + calculateTangents: 0 + addNormals: 0 + immutableTriangles: 0 diff --git a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab.meta b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab.meta new file mode 100644 index 0000000000..582c016620 --- /dev/null +++ b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0023_02.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d6dc79ab0a8cff44b889d631e753d5d8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: lz4/prefabs/live2d/live2d_c_0023 + assetBundleVariant: unity3d diff --git a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0038_02.prefab b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0038_02.prefab index e8a01aa295..3de0452669 100644 --- a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0038_02.prefab +++ b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0038_02.prefab @@ -69,7 +69,7 @@ MonoBehaviour: initialSkinName: default initialFlipX: 0 initialFlipY: 0 - startingAnimation: + startingAnimation: idle startingLoop: 1 timeScale: 1 freeze: 0 diff --git a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0043_02.prefab b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0043_02.prefab index 89bcad4e37..4c7b730515 100644 --- a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0043_02.prefab +++ b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_0043_02.prefab @@ -69,7 +69,7 @@ MonoBehaviour: initialSkinName: default initialFlipX: 0 initialFlipY: 0 - startingAnimation: + startingAnimation: idle startingLoop: 1 timeScale: 1 freeze: 0 diff --git a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_sjnn_00012_02.prefab b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_sjnn_00012_02.prefab index 1b927ab1f0..7c67132bf9 100644 --- a/Assets/ManagedResources/Prefabs/Live2d/live2d_c_sjnn_00012_02.prefab +++ b/Assets/ManagedResources/Prefabs/Live2d/live2d_c_sjnn_00012_02.prefab @@ -69,7 +69,7 @@ MonoBehaviour: initialSkinName: default initialFlipX: 0 initialFlipY: 0 - startingAnimation: + startingAnimation: idle startingLoop: 1 timeScale: 1 freeze: 0 diff --git a/Assets/ManagedResources/Spine/c_0023_02.meta b/Assets/ManagedResources/Spine/c_0023_02.meta new file mode 100644 index 0000000000..62927649f5 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d86667c66179f8749a2fa1d8befaa402 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt new file mode 100644 index 0000000000..253c2347e5 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt @@ -0,0 +1,153 @@ + +c_0023_02.png +size: 795,793 +format: RGBA8888 +filter: Linear,Linear +repeat: none +sx_aaa + rotate: false + xy: 635, 65 + size: 54, 68 + orig: 54, 68 + offset: 0, 0 + index: -1 +sx_biyan + rotate: false + xy: 365, 278 + size: 100, 82 + orig: 100, 82 + offset: 0, 0 + index: -1 +sx_mao001 + rotate: false + xy: 220, 362 + size: 251, 429 + orig: 251, 429 + offset: 0, 0 + index: -1 +sx_mao003 + rotate: false + xy: 473, 432 + size: 190, 359 + orig: 190, 359 + offset: 0, 0 + index: -1 +sx_shrnti + rotate: false + xy: 2, 316 + size: 216, 475 + orig: 216, 475 + offset: 0, 0 + index: -1 +sx_toubu + rotate: false + xy: 666, 155 + size: 100, 113 + orig: 100, 113 + offset: 0, 0 + index: -1 +sx_xiabai001 + rotate: false + xy: 526, 30 + size: 107, 103 + orig: 107, 103 + offset: 0, 0 + index: -1 +sx_xiabai005 + rotate: false + xy: 365, 109 + size: 159, 155 + orig: 159, 155 + offset: 0, 0 + index: -1 +sx_xiabai006 + rotate: false + xy: 473, 266 + size: 168, 164 + orig: 168, 164 + offset: 0, 0 + index: -1 +sx_xiabai007 + rotate: false + xy: 526, 135 + size: 138, 129 + orig: 138, 129 + offset: 0, 0 + index: -1 +sx_xiabai008 + rotate: false + xy: 365, 9 + size: 139, 98 + orig: 139, 98 + offset: 0, 0 + index: -1 +sx_xiongbu + rotate: false + xy: 665, 356 + size: 92, 128 + orig: 92, 128 + offset: 0, 0 + index: -1 +sx_xiongbu-01 + rotate: false + xy: 665, 486 + size: 92, 128 + orig: 92, 128 + offset: 0, 0 + index: -1 +sx_yiling + rotate: false + xy: 665, 616 + size: 103, 175 + orig: 103, 175 + offset: 0, 0 + index: -1 +sx_youjiao + rotate: false + xy: 759, 464 + size: 34, 150 + orig: 34, 150 + offset: 0, 0 + index: -1 +sx_youshangbi + rotate: false + xy: 643, 270 + size: 123, 84 + orig: 123, 84 + offset: 0, 0 + index: -1 +sx_youshou + rotate: false + xy: 179, 14 + size: 49, 49 + orig: 49, 49 + offset: 0, 0 + index: -1 +sx_youxiaobi + rotate: false + xy: 2, 2 + size: 175, 312 + orig: 175, 312 + offset: 0, 0 + index: -1 +sx_zuojiao + rotate: false + xy: 759, 383 + size: 33, 79 + orig: 33, 79 + offset: 0, 0 + index: -1 +sx_zuoshou + rotate: false + xy: 230, 17 + size: 42, 46 + orig: 42, 46 + offset: 0, 0 + index: -1 +sx_zuoxiaobi + rotate: false + xy: 179, 65 + size: 184, 249 + orig: 184, 249 + offset: 0, 0 + index: -1 diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt.meta new file mode 100644 index 0000000000..1fdb456b3b --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.atlas.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cc5aea7ce36344d4481ffa34f9238b9a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png new file mode 100644 index 0000000000..e316ca6c3b Binary files /dev/null and b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png differ diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png.meta new file mode 100644 index 0000000000..f4c70e2448 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: d9ba6b47fdce6c34aa3ef87fec616911 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 55 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 55 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 7c0711b2db0575346831eaa7ce634d9f + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes new file mode 100644 index 0000000000..095506b61d Binary files /dev/null and b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes differ diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes.meta new file mode 100644 index 0000000000..2e6fbe5ae1 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02.skel.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c72d6b346eccd0f49a709c0b524c8d05 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset new file mode 100644 index 0000000000..28449dc573 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3} + m_Name: c_0023_02_Atlas + m_EditorClassIdentifier: + atlasFile: {fileID: 4900000, guid: cc5aea7ce36344d4481ffa34f9238b9a, type: 3} + materials: + - {fileID: 2100000, guid: ad3b54ae3aedc8542ab9af294732f2b1, type: 2} diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset.meta new file mode 100644 index 0000000000..4e95792082 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Atlas.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 61250dacf2e23644a8a9d13e788b0bd2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat new file mode 100644 index 0000000000..fc691bf2f8 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat @@ -0,0 +1,28 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: c_0023_02_Material + m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _MainTex: + m_Texture: {fileID: 2800000, guid: d9ba6b47fdce6c34aa3ef87fec616911, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _Cutoff: 0.1 + m_Colors: [] diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat.meta new file mode 100644 index 0000000000..ce8c405383 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_Material.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad3b54ae3aedc8542ab9af294732f2b1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset new file mode 100644 index 0000000000..92f9c9543f --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset @@ -0,0 +1,23 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3} + m_Name: c_0023_02_SkeletonData + m_EditorClassIdentifier: + atlasAssets: + - {fileID: 11400000, guid: 61250dacf2e23644a8a9d13e788b0bd2, type: 2} + scale: 0.01 + skeletonJSON: {fileID: 4900000, guid: c72d6b346eccd0f49a709c0b524c8d05, type: 3} + fromAnimation: [] + toAnimation: [] + duration: [] + defaultMix: 0.2 + controller: {fileID: 0} diff --git a/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset.meta b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset.meta new file mode 100644 index 0000000000..91175d8b08 --- /dev/null +++ b/Assets/ManagedResources/Spine/c_0023_02/c_0023_02_SkeletonData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4dacdb4550e515b45b7133b25ee2523d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/~Lua/Common/Managers.lua b/Assets/ManagedResources/~Lua/Common/Managers.lua index 194034dbeb..fd47cc87c2 100644 --- a/Assets/ManagedResources/~Lua/Common/Managers.lua +++ b/Assets/ManagedResources/~Lua/Common/Managers.lua @@ -11,6 +11,7 @@ local ManagerNames = { "Setting/SettingManager", --通信管理,所有的通信接口 "Net/NetManager", + "Net/HttpManager", --推送管理,所有的推送接口 "Net/IndicationManager", --登录数据管理 diff --git a/Assets/ManagedResources/~Lua/Framework/GameDataBase.lua b/Assets/ManagedResources/~Lua/Framework/GameDataBase.lua index 77103ede5a..611eef32f7 100644 --- a/Assets/ManagedResources/~Lua/Framework/GameDataBase.lua +++ b/Assets/ManagedResources/~Lua/Framework/GameDataBase.lua @@ -121,9 +121,10 @@ GameDataBase.SheetLineBase.__index = function(t,k) local val = t.val[index] -- ************************* -- 提审服部分资源替换,特殊处理 - if SERVER_VERSION == 1 then + if LoginManager and LoginManager.IsShield then if (val == "live2d_c_0038" and t.val[1] == 2004) or (val == "live2d_c_0043" and t.val[1] == 2008) + or (val == "live2d_c_0023" and t.val[1] == 2066) or (val == "live2d_c_sjnn_00012" and t.val[1] == 2028) then return val.."_02" diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua index ea376dadd4..894fd1f127 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleManager.lua @@ -1079,7 +1079,7 @@ function this.RequestBattleDataByFightId(serverUrl, fightId, func) local uid = string.split(fightId, "_")[1] local requestUrl = string.format("http://%s/req/getFightRecord?uid=%s&fightid=%s", serverUrl, uid, fightId) LogGreen(requestUrl) - LoginManager:SendGetHttp(requestUrl, function(str) + HttpManager:SendGetHttp(requestUrl, function(str) --LogGreen(str) local json = require 'cjson' local data = json.decode(str) diff --git a/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua b/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua index 55a5516b9f..96a11ecec6 100644 --- a/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/BindPhone/BindPhoneNumberManager.lua @@ -61,7 +61,7 @@ function this.DOGetBindPhone(type, phoneNumber, code) local sign = Util.MD5Encrypt(string.format("%s%s%s%s%s%s", pid, gid, type, phoneNumber, time, signKey)) local code = code and code or "" - LoginManager:SendGetHttp(string.format("%s?pid=%s&gid=%s&token=%s&type=%s&phone=%s&code=%s&time=%s&sign=%s", + HttpManager:SendGetHttp(string.format("%s?pid=%s&gid=%s&token=%s&type=%s&phone=%s&code=%s&time=%s&sign=%s", GetBindUrl, pid, gid, token, type, phoneNumber, code, time, sign), this.OnCodeResult, nil, nil, nil) end diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index 1afd6bd279..eebd790807 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua @@ -94,8 +94,8 @@ function this.Initialize() -- 发送登出事件 Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLogout) end - end +-- local _Time function this.CheckRealName() local appId = PackageManager.GetAppID() @@ -173,7 +173,7 @@ function this.RequestRegist(name, pw, call) pw, this.sign)) RequestPanel.Show(Language[11132]) - this:SendGetHttp(LoginRoot_Url .. "jl_loginserver/registerUser?userName=".. name .. "&password=".. pw .."&repeat=".. pw .. "&sign=" .. sign, + HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/registerUser?userName=".. name .. "&password=".. pw .."&repeat=".. pw .. "&sign=" .. sign, function(str) RequestPanel.Hide() if str == nil then @@ -199,7 +199,7 @@ function this.RequestUser(name, pw, call) pw, this.sign)) RequestPanel.Show(Language[11134]) - this:SendGetHttp(LoginRoot_Url .. "jl_loginserver/userLogin?userName=".. name .. "&password=".. pw .. "&sign=" .. sign, function(str) + HttpManager:SendGetHttp(LoginRoot_Url .. "jl_loginserver/userLogin?userName=".. name .. "&password=".. pw .. "&sign=" .. sign, function(str) RequestPanel.Hide() if str == nil then return @@ -228,29 +228,6 @@ function this.RequestUser(name, pw, call) end,nil,nil,nil) end -require("Base.HttpCrypt") -local CRYPT_KEY = "d53b3e8ef74bf72d8aafce3a1c8671a0" -function this:SendGetHttp(url, callback, _, _, failCB) - local request = url - LogGreen("Http请求:"..request) - if AppConst.Platform == "IOS" then - local urlList = string.split(url, "?") - urlList[2] = HTTP_ENCRYPT(urlList[2], CRYPT_KEY) - request = urlList[1] .. "?crypt=" .. urlList[2] - LogGreen("Http加密请求:"..request) - end - networkMgr:SendGetHttp(request, function(msg) - LogGreen("Http请求结果:"..msg) - if AppConst.Platform == "IOS" then - msg = HTTP_DECRYPT(msg, CRYPT_KEY) - LogGreen("Http请求结果解密:"..msg) - end - if callback then - callback(msg) - end - end, nil, nil, failCB) -end - -- 判断服务器状态是否可进入 function this.IsServerStateEnterable(state) if not state then @@ -264,4 +241,28 @@ function this.IsServerStateEnterable(state) return true end + + +-- 初始化包信息 +function this.InitPackInfo() + local LoginRoot_Url = ServerConfigManager.GetVersionInfo("serverUrl") + local LoginRoot_Channel = ServerConfigManager.GetVersionInfo("channel") + local LoginRoot_UserChannel = ServerConfigManager.GetSettingValue(ServerConfigManager.SettingConfig.USER_CHANNEL) or "" + local ChannelID = LoginRoot_UserChannel == "" and LoginRoot_Channel or LoginRoot_UserChannel + local packId = PackageManager.GetPackageID() + if packId then + ChannelID = ChannelID.. packId + end + HttpManager:SendGetHttp(LoginRoot_Url.."jl_loginserver/getChannelInfo?ccId="..ChannelID, function(str) + if str == "" or str == "null" or string.find(str, "html") then + LogWarn("获取到的数据是空值,请检查!") + else + local json = require 'cjson' + local context = json.decode(str) + this.IsShield = context.shielding == 1 + end + end) +end + + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 45256073a9..655bb82bd0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -318,6 +318,8 @@ function this:OnOpen(...) local offsetX = (GetPreferredWidth(tran) + Screen.width) / 2 tran.anchoredPosition = Vector2.New(offsetX, 0) tran:DOAnchorPosX(-offsetX, 30, false):SetEase(Ease.Linear):SetLoops(-1) + -- 初始化一些数据 + LoginManager.InitPackInfo() SoundManager.PlayMusic(SoundConfig.BGM_Login) SoundManager.PlayAmbient(SoundConfig.Ambient_Login) @@ -362,8 +364,7 @@ function this.ShowNotice() end end local url = LoginRoot_Url .. "jl_loginserver/getNotice?timestamp="..timeStamp.."&sign=".. timeSign.."&packageName="..noticeChannel - Log(url) - LoginManager:SendGetHttp(url,function (str) + HttpManager:SendGetHttp(url,function (str) UIManager.OpenPanel(UIName.NoticePopup,str) end, nil, nil, nil) end @@ -376,9 +377,7 @@ function this.RequestServerVersion(func) ChannelID = ChannelID.. packId end local url = LoginRoot_Url .. "jl_loginserver/getServerVersion?serverVersion="..ChannelID - LogPink(url) - LoginManager:SendGetHttp(url, function (str) - LogPink(str) + HttpManager:SendGetHttp(url, function (str) if str == "" or str == "null" or string.find(str, "html") then LogWarn("获取到的ServerVersion数据是空值,请检查!") else @@ -415,8 +414,7 @@ function this.RequestServerList(userId, callback) local url = string.format( "%sjl_loginserver/getServerList?openId=%s&channel=%s&plat=android&sub_channel=%s&server_version=%s", LoginRoot_Url, userId, LoginRoot_Channel, LoginRoot_SubChannel, SERVER_VERSION) - Log(url) - LoginManager:SendGetHttp(url, callback, nil, nil, nil) + HttpManager:SendGetHttp(url, callback, nil, nil, nil) end) --用户协议,隐私政策 @@ -440,8 +438,7 @@ function this.RequestProtos(userId) ChannelID = ChannelID .. PackageID end local url = LoginRoot_Url.."jl_loginserver/getAgreement?gamePack="..ChannelID - Log(url) - LoginManager:SendGetHttp(url, function (str) + HttpManager:SendGetHttp(url, function (str) local json = require 'cjson' local data = json.decode(str) if data.parms then @@ -838,8 +835,7 @@ function this.RequestHttpLogin() end end - Log(url) - LoginManager:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil) + HttpManager:SendGetHttp(url, this.OnReceiveLogin, nil, nil, nil) end --用户id登录 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua new file mode 100644 index 0000000000..7d0fa9b32e --- /dev/null +++ b/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua @@ -0,0 +1,33 @@ +require("Base.HttpCrypt") +HttpManager = {} +-- 加密密钥 +local CRYPT_KEY = "d53b3e8ef74bf72d8aafce3a1c8671a0" +-- 是否要加密 +local isCrypt = AppConst.Platform == "IOS" --or AppConst.Platform == "EDITOR" +-- 计数器 +local _Counter = 0 +-- GET 请求 +function HttpManager:SendGetHttp(url, callback, _, _, failCB) + local request = url + _Counter = _Counter + 1 + local count = _Counter + LogWarn("Http请求" .. count.. ":"..request) + if isCrypt then + local urlList = string.split(url, "?") + urlList[2] = HTTP_ENCRYPT(urlList[2], CRYPT_KEY) + request = urlList[1] .. "?crypt=" .. urlList[2] + LogWarn("Http加密请求" .. count.. ":"..request) + end + networkMgr:SendGetHttp(request, function(msg) + LogWarn("Http请求" .. count.. "结果:"..msg) + if isCrypt then + msg = HTTP_DECRYPT(msg, CRYPT_KEY) + LogWarn("Http请求" .. count.. "结果解密:"..msg) + end + if callback then + callback(msg) + end + end, nil, nil, failCB) +end + +return HttpManager \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua.meta b/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua.meta new file mode 100644 index 0000000000..42fe1a8093 --- /dev/null +++ b/Assets/ManagedResources/~Lua/Modules/Net/HttpManager.lua.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 962977ac38fa98d4aa6c4eb32159ce49 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: