Merge branch 'develop' into feature/skill-data
This commit is contained in:
@@ -15,6 +15,11 @@ MonoBehaviour:
|
||||
m_GroupName: Default Local Group
|
||||
m_GUID: 712e3991f28e549e7a56ee582a977810
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 1b653230886be4009808803501ad7d7f
|
||||
m_Address: Assets/PerfectWorld/SO/TaskTemplContainerSO.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 1cfde61ea9d19614a8ea91cb1eeca97b
|
||||
m_Address: "\u7A0B\u5E8F\u8054\u5165/\u89D2\u8272\u51FA\u73B0\u4EBA\u7C7B.gfx"
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -1699,6 +1699,12 @@ MonoBehaviour:
|
||||
- equipment
|
||||
- models
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 1442e7dcfba1366488f9abeab708864a
|
||||
m_Address: "models/npcs/\u602A\u7269/32\u7269\u54C1\u5996/\u9B54\u6CD5\u5C01\u5370\u7684\u5B9D\u7BB1/\u9B54\u6CD5\u5C01\u5370\u7684\u5B9D\u7BB1\u5C0F.ecm"
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- models
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 14581b8af110f2547a48143cb80e5798
|
||||
m_Address: "models/players/\u88C5\u5907/\u5973/13b\u6B66\u4FA0\u804C\u4E1A\u88C5\u4E0A\u8863/\u5973\u901A\u752813b\u6B66\u4FA0\u804C\u4E1A\u88C5\u4E0A\u8863.ecm"
|
||||
m_ReadOnly: 0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c4d0bbc7b1d74528bf58ca8c5e1de34
|
||||
guid: e91d249ceb608ee4bb7b880be5e7a448
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4bd1ac89ebb2164ab48076ee3cbb56b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 390d29f03a8935448bef8884b836b7d3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-3115309107172234749
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Box01_0
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 2450
|
||||
stringTagMap:
|
||||
RenderType: TransparentCutout
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 914f1d1ec5673224388f8ae4eb93958a, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 914f1d1ec5673224388f8ae4eb93958a, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaToMask: 1
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.001
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5722cad6c9220a248b32d02be1e7015f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,203 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!43 &4300000
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Box01_0
|
||||
serializedVersion: 11
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
firstByte: 0
|
||||
indexCount: 66
|
||||
topology: 0
|
||||
baseVertex: 0
|
||||
firstVertex: 0
|
||||
vertexCount: 32
|
||||
localAABB:
|
||||
m_Center: {x: 0.004867792, y: 0.29433393, z: 0.000000014901161}
|
||||
m_Extent: {x: 0.4090197, y: 0.2940315, z: 0.27242136}
|
||||
m_Shapes:
|
||||
vertices: []
|
||||
shapes: []
|
||||
channels: []
|
||||
fullWeights: []
|
||||
m_BindPose:
|
||||
- e00: -0.016946318
|
||||
e01: 0.9998566
|
||||
e02: 0.000000029802326
|
||||
e03: -0.039453417
|
||||
e10: -0.00000008940697
|
||||
e11: -0.00000011920929
|
||||
e12: 1
|
||||
e13: 0.000000006428704
|
||||
e20: 0.9998565
|
||||
e21: 0.016946256
|
||||
e22: 0
|
||||
e23: -0.0006686648
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
- e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_BoneNameHashes:
|
||||
m_RootBoneNameHash: 0
|
||||
m_BonesAABB:
|
||||
- m_Min: {x: -0.046164893, y: -0.27242136, z: -0.40475747}
|
||||
m_Max: {x: 0.55567646, y: 0.27242136, z: 0.42313}
|
||||
- m_Min: {x: Infinity, y: Infinity, z: Infinity}
|
||||
m_Max: {x: -Infinity, y: -Infinity, z: -Infinity}
|
||||
m_VariableBoneCountWeights:
|
||||
m_Data:
|
||||
m_MeshCompression: 0
|
||||
m_IsReadable: 1
|
||||
m_KeepVertices: 1
|
||||
m_KeepIndices: 1
|
||||
m_IndexFormat: 0
|
||||
m_IndexBuffer: 0200010000000000030002000600050004000400070006000a00090008000c000b000a000d000c000a000d000a0008000e000d000800110010000f000f00120011001500140013001700160015001800170015001800150013001900180013001c001b001a001a001d001c0002001f001e001e00010002001f001c001d001d001e001f00
|
||||
m_VertexData:
|
||||
serializedVersion: 3
|
||||
m_VertexCount: 32
|
||||
m_Channels:
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 3
|
||||
- stream: 0
|
||||
offset: 12
|
||||
format: 0
|
||||
dimension: 3
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 1
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 2
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 2
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 4
|
||||
- stream: 2
|
||||
offset: 16
|
||||
format: 10
|
||||
dimension: 4
|
||||
m_DataSize: 2048
|
||||
_typelessdata: 00edcebe4ecbb83ecb7a8b3e22830bb47a3b0b3f8cd3563fffeccebea1b7093fe477213e02bde6b3d783443f0f11243f0ee9d33ea1b7093fed77213e3dfbdcb3d783443f0f11243f0de9d33e4ecbb83ecf7a8b3e3e4e03b4793b0b3f8cd3563f0de9d33e73949e39d17a8b3ef29643b46878b1330000803f00edcebe73949e39cb7a8b3e22b56ab4000000000000803f00edcebe4ecbb83ecb7a8b3ef29643b46878b1330000803f0de9d33e4ecbb83ecf7a8b3ec2781cb4687831340000803f00edcebe73949e39cb7a8b3e000080bff5e251329c3230b4fdeccebea1919e39cf7a8bbe000080bfb94b74a89c3230b4fdeccebe4ecbb83ed07a8bbe000080bf99531bb2aeb51db4feeccebea1b7093fed7721be000080bfed6278b3441637b4ffeccebe1e9f163f6db8a3b3000080bf5ddb1fb403f0cab3ffeccebea1b7093fe477213e000080bfc8802bb2ac1a20b400edcebe4ecbb83ecb7a8b3e000080bf00000000f0728bb4fdeccebea1919e39cf7a8bbec1781c346778b1b3000080bf10e9d33ea1919e39cb7a8bbec1781c346778b1b3000080bf10e9d33e4ecbb83ecc7a8bbec1781c346778b1b3000080bffdeccebe4ecbb83ed07a8bbec1781c346778b1b3000080bf10e9d33ea1919e39cb7a8bbe0000803f0de351329d3230340de9d33e73949e39d17a8b3e0000803fba4bf4289c3230340de9d33e4ecbb83ecf7a8b3e0000803f89531bb2b1b51d340ee9d33ea1b7093fed77213e0000803ff66278b3421637340fe9d33e1e9f163f589d82330000803f5edb1fb403f0ca330fe9d33ea1b7093fe57721be0000803fc1802bb2ad1a203410e9d33e4ecbb83ecc7a8bbe0000803f1b58c128ef728b34fdeccebe4ecbb83ed07a8bbe0ff6fe337c3b0b3f8cd356bf10e9d33e4ecbb83ecc7a8bbe0ff6fe337c3b0b3f8cd356bf0fe9d33ea1b7093fe57721be80b2de33a404313f19ef38bffeeccebea1b7093fed7721bedfe3ab33b908573f4be90abfffeccebe1e9f163f6db8a3b3d802b9b2128f7e3f5300d93d0fe9d33e1e9f163f589d823375ae7632128f7e3f5300d9bd0000013f000000000000013f0000d03d00007f3f0000d03d00007f3f000000000000fe3e00007f3f0000803b00007f3f0000803b0000433f0000fe3e0000433f0000013f0000803f00007f3f0000803f00007f3f0000463f0000633f00002a3f00003f3f0000233f00001a3f00002a3f0000013f0000463f0000013f0000203f00007f3f0000203f00007f3f0000c43e0000013f0000c43e0000013f0000803f00007f3f0000803f00007f3f0000463f0000633f00002a3f00003f3f0000233f00001a3f00002a3f0000013f0000463f0000013f0000c43e00007f3f0000c43e00007f3f0000923e0000013f0000923e0000013f0000443e00007f3f0000443e0000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f000000000000000000000000000000000000000000000000000000000000803f00000000000000000000000000000000000000000000000000000000
|
||||
m_CompressedMesh:
|
||||
m_Vertices:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UV:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Normals:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Tangents:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Weights:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_NormalSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_TangentSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_FloatColors:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_BoneIndices:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Triangles:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UVInfo: 0
|
||||
m_LocalAABB:
|
||||
m_Center: {x: 0.004867792, y: 0.29433393, z: 0.000000014901161}
|
||||
m_Extent: {x: 0.4090197, y: 0.2940315, z: 0.27242136}
|
||||
m_MeshUsageFlags: 0
|
||||
m_CookingOptions: 30
|
||||
m_BakedConvexCollisionMesh:
|
||||
m_BakedTriangleCollisionMesh:
|
||||
'm_MeshMetrics[0]': 1
|
||||
'm_MeshMetrics[1]': 1
|
||||
m_MeshOptimizationFlags: 1
|
||||
m_StreamData:
|
||||
serializedVersion: 2
|
||||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58c1a2d10ae2b914a88a2281bb5bf96a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4300000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,119 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6140007671914382511
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8903825486503764437}
|
||||
- component: {fileID: 8750203408594128925}
|
||||
- component: {fileID: 5166826509143948991}
|
||||
- component: {fileID: 5459939725609795997}
|
||||
m_Layer: 0
|
||||
m_Name: Box01_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8903825486503764437
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6140007671914382511}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &8750203408594128925
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6140007671914382511}
|
||||
m_Mesh: {fileID: 4300000, guid: 58c1a2d10ae2b914a88a2281bb5bf96a, type: 2}
|
||||
--- !u!137 &5166826509143948991
|
||||
SkinnedMeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6140007671914382511}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 3
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 5722cad6c9220a248b32d02be1e7015f, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
serializedVersion: 2
|
||||
m_Quality: 0
|
||||
m_UpdateWhenOffscreen: 0
|
||||
m_SkinnedMotionVectors: 1
|
||||
m_Mesh: {fileID: 4300000, guid: 58c1a2d10ae2b914a88a2281bb5bf96a, type: 2}
|
||||
m_Bones:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_BlendShapeWeights: []
|
||||
m_RootBone: {fileID: 0}
|
||||
m_AABB:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!114 &5459939725609795997
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6140007671914382511}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2189a384460241f89635c90802d6c270, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_skeletonBuilder: {fileID: 0}
|
||||
_meshFilter: {fileID: 8750203408594128925}
|
||||
_skinnedMeshRenderer: {fileID: 5166826509143948991}
|
||||
BoneNames:
|
||||
- Bone02
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ea4854beb922e24fb53875ae9bb6740
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,380 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2142465482498032316
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9116329449756975279}
|
||||
- component: {fileID: 5602719492404425111}
|
||||
m_Layer: 0
|
||||
m_Name: "\u9B54\u6CD5\u5C01\u5370\u7684\u5B9D\u7BB1"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &9116329449756975279
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2142465482498032316}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1682221397893027975}
|
||||
- {fileID: 2287142222681038928}
|
||||
- {fileID: 6560746386147567036}
|
||||
m_Father: {fileID: 2504815096422338851}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
|
||||
--- !u!95 &5602719492404425111
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2142465482498032316}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!1 &2342673677820808233
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5751786341065879054}
|
||||
m_Layer: 0
|
||||
m_Name: HH_fx01
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5751786341065879054
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2342673677820808233}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.0000000305647, y: 0.70108974, z: 0.00000003005105, w: 0.7130731}
|
||||
m_LocalPosition: {x: 0.27565014, y: 8.647188e-11, z: 0.003151229}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4632241631221141121}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &4838574376121939473
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1682221397893027975}
|
||||
- component: {fileID: 2675749075624738704}
|
||||
- component: {fileID: 6676038990753274020}
|
||||
m_Layer: 0
|
||||
m_Name: CustomMeshRender
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1682221397893027975
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4838574376121939473}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 9116329449756975279}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &2675749075624738704
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4838574376121939473}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!137 &6676038990753274020
|
||||
SkinnedMeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4838574376121939473}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 3
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
serializedVersion: 2
|
||||
m_Quality: 0
|
||||
m_UpdateWhenOffscreen: 0
|
||||
m_SkinnedMotionVectors: 1
|
||||
m_Mesh: {fileID: 0}
|
||||
m_Bones: []
|
||||
m_BlendShapeWeights: []
|
||||
m_RootBone: {fileID: 0}
|
||||
m_AABB:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_DirtyAABB: 0
|
||||
--- !u!1 &5034815621241663843
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2504815096422338851}
|
||||
- component: {fileID: 2886303939034520672}
|
||||
m_Layer: 0
|
||||
m_Name: "\u9B54\u6CD5\u5C01\u5370\u7684\u5B9D\u7BB1\u5C0F"
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2504815096422338851
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5034815621241663843}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 9116329449756975279}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2886303939034520672
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5034815621241663843}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 0.58143216, z: 0.54702204}
|
||||
m_Center: {x: 0, y: 0.2912911, z: -0.0027312338}
|
||||
--- !u!1 &8235708353750757754
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2287142222681038928}
|
||||
m_Layer: 0
|
||||
m_Name: 000
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2287142222681038928
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8235708353750757754}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4632241631221141121}
|
||||
m_Father: {fileID: 9116329449756975279}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &9203708403987941035
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4632241631221141121}
|
||||
m_Layer: 0
|
||||
m_Name: Bone02
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4632241631221141121
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9203708403987941035}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.49574533, y: 0.50421876, z: 0.5042188, w: 0.49574536}
|
||||
m_LocalPosition: {x: -0.000000018803775, y: 0.039459076, z: -0.0000000017248172}
|
||||
m_LocalScale: {x: 0.99999994, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5751786341065879054}
|
||||
m_Father: {fileID: 2287142222681038928}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &2349975245296796777
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 9116329449756975279}
|
||||
m_Modifications:
|
||||
- target: {fileID: 5166826509143948991, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_RootBone
|
||||
value:
|
||||
objectReference: {fileID: 2287142222681038928}
|
||||
- target: {fileID: 5166826509143948991, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: 'm_Bones.Array.data[0]'
|
||||
value:
|
||||
objectReference: {fileID: 4632241631221141121}
|
||||
- target: {fileID: 5166826509143948991, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: 'm_Bones.Array.data[1]'
|
||||
value:
|
||||
objectReference: {fileID: 2287142222681038928}
|
||||
- target: {fileID: 6140007671914382511, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Box01_0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5459939725609795997, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
--- !u!4 &6560746386147567036 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 8903825486503764437, guid: 3ea4854beb922e24fb53875ae9bb6740, type: 3}
|
||||
m_PrefabInstance: {fileID: 2349975245296796777}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1442e7dcfba1366488f9abeab708864a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3308,6 +3308,7 @@ MonoBehaviour:
|
||||
- {fileID: 7400000, guid: d3c1bf1bc3105b247aae16f9c99519ea, type: 2}
|
||||
- {fileID: 7400000, guid: b9c1b4aacfc88174f9bfcb8bf1c69eb5, type: 2}
|
||||
- {fileID: 7400000, guid: d54a450816dbc4d4ca43afbe607052ad, type: 2}
|
||||
- {fileID: 7400000, guid: cbff0726770bb1146bc70346d5fc38f9, type: 2}
|
||||
--- !u!1 &2587141697474146175
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87f438b49a50c704f89eb173bedc5588
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56f4c39291f183847bd5aaaf3fb10d28
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26996bc8b154b9a4db3ac53deae61246
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
+143
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 914f1d1ec5673224388f8ae4eb93958a
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
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
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
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: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+238
-105
@@ -31,9 +31,9 @@ RectTransform:
|
||||
- {fileID: 7068400949313321131}
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 119.34445, y: -50.05}
|
||||
m_SizeDelta: {x: 238.6889, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &567730479829113918
|
||||
@@ -1063,9 +1063,9 @@ RectTransform:
|
||||
- {fileID: 1673093633596208253}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 744.2305, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5696506275770781555
|
||||
@@ -1782,9 +1782,9 @@ RectTransform:
|
||||
- {fileID: 3173262022725656255}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 533.7858, y: -474.8956}
|
||||
m_SizeDelta: {x: 1067.5717, y: 53.7328}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4979397800331147640
|
||||
@@ -1832,9 +1832,9 @@ RectTransform:
|
||||
- {fileID: 5159105777246515782}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 552.95, y: -697.9664}
|
||||
m_SizeDelta: {x: 1105.9, y: 100.1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3682686733385602497
|
||||
@@ -2616,9 +2616,9 @@ RectTransform:
|
||||
- {fileID: 9038859519033147586}
|
||||
m_Father: {fileID: 3413131598704007284}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 160, y: -27.7372}
|
||||
m_SizeDelta: {x: 320, y: 55.4744}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3633225552368495711
|
||||
@@ -2786,9 +2786,9 @@ RectTransform:
|
||||
- {fileID: 6888331463719618182}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 533.8, y: -181.5047}
|
||||
m_SizeDelta: {x: 1067.6, y: 147.0112}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7637574953150164924
|
||||
@@ -2992,9 +2992,9 @@ RectTransform:
|
||||
- {fileID: 466166190548844919}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 533.7858, y: -287.3301}
|
||||
m_SizeDelta: {x: 1067.5717, y: 64.6396}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5725159945352370057
|
||||
@@ -3035,9 +3035,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 50, y: -17.98135}
|
||||
m_SizeDelta: {x: 100, y: 35.9627}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2640258873449426733
|
||||
@@ -3495,9 +3495,9 @@ RectTransform:
|
||||
- {fileID: 1664656494516247222}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 533.7858, y: -97.82885}
|
||||
m_SizeDelta: {x: 1067.5717, y: 20.3405}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5366537333355115835
|
||||
@@ -3540,9 +3540,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5935924508566653103}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 59.9817, y: -31.017}
|
||||
m_SizeDelta: {x: 119.9634, y: 62.034}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8442116720262994404
|
||||
@@ -3988,7 +3988,7 @@ RectTransform:
|
||||
m_Father: {fileID: 7958847946112668032}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@@ -4289,9 +4289,9 @@ RectTransform:
|
||||
- {fileID: 5935924508566653103}
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 981.0654, y: -50.05}
|
||||
m_SizeDelta: {x: 249.67, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3615902548841175383
|
||||
@@ -4365,9 +4365,9 @@ RectTransform:
|
||||
- {fileID: 6664836867558571240}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 632.0412, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1719403314563710437
|
||||
@@ -4441,9 +4441,9 @@ RectTransform:
|
||||
- {fileID: 3123454216176481580}
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 390.45966, y: -50.05}
|
||||
m_SizeDelta: {x: 103.5415, y: 42.7938}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6244284104014817409
|
||||
@@ -4529,9 +4529,9 @@ RectTransform:
|
||||
- {fileID: 4269318562826283412}
|
||||
m_Father: {fileID: 3413131598704007284}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 160, y: -392.4044}
|
||||
m_SizeDelta: {x: 320, y: 673.86}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6982899544592245397
|
||||
@@ -4635,6 +4635,7 @@ RectTransform:
|
||||
- {fileID: 1687288316189840478}
|
||||
- {fileID: 3413131598704007284}
|
||||
- {fileID: 1802319080125745111}
|
||||
- {fileID: 8560871508586000967}
|
||||
m_Father: {fileID: 9127077926286418868}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
@@ -4713,9 +4714,9 @@ RectTransform:
|
||||
- {fileID: 2490029976799717816}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 295.47327, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7650172129678423862
|
||||
@@ -4791,9 +4792,9 @@ RectTransform:
|
||||
m_Father: {fileID: 2214759022841903186}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -17, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &4662246788448476486
|
||||
CanvasRenderer:
|
||||
@@ -4882,7 +4883,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0.000024855137}
|
||||
m_SizeDelta: {x: 1067.6, y: 0}
|
||||
m_SizeDelta: {x: 1067.6, y: 44.66}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &8527806716735377849
|
||||
CanvasRenderer:
|
||||
@@ -4997,6 +4998,138 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &5079467856058945530
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8560871508586000967}
|
||||
- component: {fileID: 4358218663584653282}
|
||||
- component: {fileID: 2639378489502838745}
|
||||
- component: {fileID: 7962930401627561727}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8560871508586000967
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5079467856058945530}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 945666739613519770}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -62, y: -72}
|
||||
m_SizeDelta: {x: 58, y: 58}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4358218663584653282
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5079467856058945530}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2639378489502838745
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5079467856058945530}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: fb2f2f58be45f6e4890e85cc00b0bcc9, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7962930401627561727
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5079467856058945530}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 2639378489502838745}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 6999114045547682248}
|
||||
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
||||
m_MethodName: SetActive
|
||||
m_Mode: 6
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &5087525444877170506
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5030,9 +5163,9 @@ RectTransform:
|
||||
- {fileID: 7337732696262196210}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 183.28395, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &665161835172153120
|
||||
@@ -5105,9 +5238,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 288.6889, y: -50.05}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1142619112158729952
|
||||
@@ -5242,9 +5375,9 @@ RectTransform:
|
||||
- {fileID: 464210832437986234}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 71.09465, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6131836957139812833
|
||||
@@ -5353,9 +5486,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 150, y: -61.81065}
|
||||
m_SizeDelta: {x: 300, y: 51.6959}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4239296098804493253
|
||||
@@ -5490,9 +5623,9 @@ RectTransform:
|
||||
- {fileID: 9160025208612689927}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 856.41986, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4153770864616565637
|
||||
@@ -5567,9 +5700,9 @@ RectTransform:
|
||||
- {fileID: 3906960815437350628}
|
||||
m_Father: {fileID: 8174585228173147249}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 241.1868, y: -31.18805}
|
||||
m_SizeDelta: {x: 170.7912, y: 62.3761}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7438076119085514817
|
||||
@@ -5686,9 +5819,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7068400949313321131}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 76, y: -31.75005}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2800332942966355020
|
||||
@@ -6308,9 +6441,9 @@ RectTransform:
|
||||
m_Father: {fileID: 3760164886363293420}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -17, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &5693552902337398956
|
||||
CanvasRenderer:
|
||||
@@ -6484,7 +6617,7 @@ MonoBehaviour:
|
||||
m_HandleRect: {fileID: 2343337405992641122}
|
||||
m_Direction: 2
|
||||
m_Value: 1
|
||||
m_Size: 1
|
||||
m_Size: 0.9999888
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@@ -6524,9 +6657,9 @@ RectTransform:
|
||||
m_Father: {fileID: 8611061134879146475}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -17, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &1301146549737279854
|
||||
CanvasRenderer:
|
||||
@@ -6739,9 +6872,9 @@ RectTransform:
|
||||
- {fileID: 3960419512253178154}
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 752.7304, y: -50.05}
|
||||
m_SizeDelta: {x: 207, y: 77}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5922293013674383484
|
||||
@@ -6858,8 +6991,8 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5233116975597807035}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.000011205673}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@@ -6934,7 +7067,7 @@ RectTransform:
|
||||
m_Father: {fileID: 2825219564319673376}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
@@ -7244,12 +7377,12 @@ GameObject:
|
||||
- component: {fileID: 5506476487848131018}
|
||||
- component: {fileID: 125385901698294646}
|
||||
m_Layer: 5
|
||||
m_Name: TaskWindow
|
||||
m_Name: DlgTask
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5506476487848131018
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7344,9 +7477,9 @@ RectTransform:
|
||||
- {fileID: 8526229293534627480}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 552.95, y: -574.8392}
|
||||
m_SizeDelta: {x: 1105.9, y: 146.1544}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &7362516739390317868
|
||||
@@ -7383,9 +7516,9 @@ RectTransform:
|
||||
- {fileID: 8359974748112151041}
|
||||
m_Father: {fileID: 1982628982857606432}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 545.7304, y: -50.05}
|
||||
m_SizeDelta: {x: 207, y: 77}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &175839448811631403
|
||||
@@ -7704,9 +7837,9 @@ RectTransform:
|
||||
- {fileID: 3546830409645517734}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 519.85187, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7535806629134762549
|
||||
@@ -7782,9 +7915,9 @@ RectTransform:
|
||||
- {fileID: 3450901294667678815}
|
||||
m_Father: {fileID: 1802319080125745111}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 533.8, y: -383.83954}
|
||||
m_SizeDelta: {x: 1067.6, y: 128.3793}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5632580526749397436
|
||||
@@ -7888,9 +8021,9 @@ RectTransform:
|
||||
- {fileID: 6076870470824675401}
|
||||
m_Father: {fileID: 6556814518920652147}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 407.66254, y: -49.72705}
|
||||
m_SizeDelta: {x: 72.1893, y: 73.4541}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5385847170717247365
|
||||
@@ -8040,9 +8173,9 @@ RectTransform:
|
||||
- {fileID: 1805980451046698619}
|
||||
m_Father: {fileID: 8174585228173147249}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 80.3956, y: -31.18805}
|
||||
m_SizeDelta: {x: 170.7912, y: 62.3761}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8101014133290532655
|
||||
@@ -8234,9 +8367,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5935924508566653103}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 155.6889, y: -31.017}
|
||||
m_SizeDelta: {x: 71.451, y: 62.034}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1158119712588225859
|
||||
@@ -8731,7 +8864,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8395333742829132721, guid: 9456de25596014039bd4d0d3927b709a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 336.93002
|
||||
value: 336.92987
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8395333742829132721, guid: 9456de25596014039bd4d0d3927b709a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -0,0 +1,397 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &111271885693053298
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 562642038236230410}
|
||||
- component: {fileID: 3682957078725161371}
|
||||
m_Layer: 5
|
||||
m_Name: EmotionWindow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &562642038236230410
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 111271885693053298}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6149182975052679886}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3682957078725161371
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 111271885693053298}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e42ed2cbf208e60488b8bc1d63a3b1d7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
slot: 0
|
||||
--- !u!1 &2171808091279523492
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2795398590258317195}
|
||||
- component: {fileID: 659088020461764430}
|
||||
- component: {fileID: 8890278808492480577}
|
||||
- component: {fileID: 1984081446122729312}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2795398590258317195
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171808091279523492}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 2.5381, y: 2.5381, z: 2.5381}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3590330098133380806}
|
||||
m_Father: {fileID: 6149182975052679886}
|
||||
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: -435}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &659088020461764430
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171808091279523492}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8890278808492480577
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171808091279523492}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1984081446122729312
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171808091279523492}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 8890278808492480577}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 3682957078725161371}
|
||||
m_TargetAssemblyTypeName: BrewMonster.UI.EmoteWindow, Assembly-CSharp
|
||||
m_MethodName: OnDragClick
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &4678669480211337198
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6149182975052679886}
|
||||
- component: {fileID: 3021640613906495181}
|
||||
- component: {fileID: 7003611699134334505}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6149182975052679886
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4678669480211337198}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2795398590258317195}
|
||||
m_Father: {fileID: 562642038236230410}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3021640613906495181
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4678669480211337198}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7003611699134334505
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4678669480211337198}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.8679245, g: 0.7242908, b: 0.1514774, a: 0.20392157}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6260694520480554099
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3590330098133380806}
|
||||
- component: {fileID: 7504965690579856955}
|
||||
- component: {fileID: 8982944209707270503}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3590330098133380806
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6260694520480554099}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2795398590258317195}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7504965690579856955
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6260694520480554099}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8982944209707270503
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6260694520480554099}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: WaveHand
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb88919320b4229459c83b6b1f8f1e7b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,272 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6426564401230013186
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3325367652782365102}
|
||||
- component: {fileID: 6868997766477093256}
|
||||
- component: {fileID: 2867419621240194058}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3325367652782365102
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6426564401230013186}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 266017875005995358}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.9228058, y: 0.69200134}
|
||||
m_SizeDelta: {x: -78.8826, y: -78.8826}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6868997766477093256
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6426564401230013186}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2867419621240194058
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6426564401230013186}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: JUMP
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 44.7
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &6792439420010771896
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 266017875005995358}
|
||||
- component: {fileID: 5557092053757495849}
|
||||
- component: {fileID: 3695308113943472152}
|
||||
- component: {fileID: 1194531703109065144}
|
||||
- component: {fileID: 4432331937269434665}
|
||||
m_Layer: 5
|
||||
m_Name: JumpBtn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &266017875005995358
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6792439420010771896}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3325367652782365102}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -61, y: 46}
|
||||
m_SizeDelta: {x: 200, y: 200}
|
||||
m_Pivot: {x: 1, y: 0}
|
||||
--- !u!222 &5557092053757495849
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6792439420010771896}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3695308113943472152
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6792439420010771896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1194531703109065144
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6792439420010771896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 3695308113943472152}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &4432331937269434665
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6792439420010771896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6149141837cadc4baae427c4864833e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0104938c092195b40ab7f3b6e5bf342e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -17,3 +17,9 @@ MonoBehaviour:
|
||||
prefab: {fileID: 8237288432181259026, guid: 7653e7e64393ec24c903f0606499b8c4, type: 3}
|
||||
- id: DialogNPCShop
|
||||
prefab: {fileID: 8237288432181259026, guid: eaeb778b6aab3d74299373b3a96b72c4, type: 3}
|
||||
- id: Win_Award
|
||||
prefab: {fileID: 903595479696773158, guid: cf26d96ae7d984ba8a5b6cef44adffeb, type: 3}
|
||||
- id: Win_Quest
|
||||
prefab: {fileID: 6999114045547682248, guid: 8027cada0ef5e4a9f827001b4747174d, type: 3}
|
||||
- id: Win_SkillSubAction
|
||||
prefab: {fileID: 111271885693053298, guid: eb88919320b4229459c83b6b1f8f1e7b, type: 3}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f3d86049520f4217970358d8c6e0fd1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b653230886be4009808803501ad7d7f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2ec5e9190fb72ed1fa3a747cdae7ac86540f744820346de9c230c39ec766666d
|
||||
size 16461
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33049cc5acda8a341a74cc739bf0961b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:79aee339596409d8a47e0a553b1257768bd84fa0e0d6261052b33c1077658ab0
|
||||
size 41493
|
||||
oid sha256:0930e07b267dc93d54fbc4de6bfaac5a9bf1aa7ea5ff239a58e5a8a7a25cf6c7
|
||||
size 10723
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace BrewMonster.Network
|
||||
private static int m_AbsTimeStart;
|
||||
private static int m_iTimeError; // 服务器与本机时间差(秒) // Time error in seconds
|
||||
private static int m_iTimeZoneBias; // 服务器时区偏移(秒) // Server timezone bias in seconds
|
||||
|
||||
private static bool m_bServerTimeInited;
|
||||
public static int GetTimeZoneBias() { return m_iTimeZoneBias; }
|
||||
// 设置时间误差 // Set time error
|
||||
public static void SetServerTime(int iSevTime, int iTimeZoneBias)
|
||||
{
|
||||
@@ -37,11 +38,20 @@ namespace BrewMonster.Network
|
||||
// 初始化绝对时间参考点 // Initialize absolute time reference
|
||||
m_AbsTimeStart = iSevTime;
|
||||
m_AbsTickStart = (uint)(Time.realtimeSinceStartup * 1000.0f);
|
||||
m_bServerTimeInited = true;
|
||||
Debug.Log($"timeGetTime(), TickStart = {m_AbsTickStart}");
|
||||
}
|
||||
|
||||
public static int GetServerAbsTime()
|
||||
{
|
||||
// Fallback: if server time was never initialized (SetServerTime not called),
|
||||
// return local unix time seconds so task timestamps (usually epoch seconds) still work.
|
||||
// This makes wait-time/countdown and timetable logic behave correctly even before server sync.
|
||||
if (!m_bServerTimeInited || m_AbsTimeStart == 0)
|
||||
{
|
||||
return (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds() + m_iTimeError;
|
||||
}
|
||||
|
||||
uint curTick = (uint)(Time.realtimeSinceStartup * 1000.0f);
|
||||
|
||||
if (curTick < m_AbsTickStart)
|
||||
|
||||
@@ -93,11 +93,11 @@ namespace BrewMonster.Network
|
||||
m_pElementDataMan = ElementDataManProvider.GetElementDataMan();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/* if (TaskTest.Instance &&
|
||||
if (TaskTest.Instance &&
|
||||
TaskTest.m_pTaskMan != null)
|
||||
{
|
||||
m_pTaskMan = TaskTest.m_pTaskMan;
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
// Load task templates
|
||||
if (m_pTaskMan == null) m_pTaskMan = new ATaskTemplMan();
|
||||
|
||||
@@ -405,7 +405,7 @@ public class CECNPCMan : IMsgHandler
|
||||
pNPC.SetSelectedTarget(pCmd.iTargetID);
|
||||
pNPC.SetWorldHealthImage((float)pCmd.iHP , (float)pCmd.iMaxHP);
|
||||
|
||||
EventBus.Publish(new NPCINFO(pNPC.GetName(),pCmd.iHP,pCmd.iMaxHP, pCmd.idNPC));
|
||||
EventBus.Publish(new CECHostPlayer.NPCINFO(pNPC.GetName(),pCmd.iHP,pCmd.iMaxHP, pCmd.idNPC));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -791,6 +791,14 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
return IsWorkRunning(Host_work_ID.WORK_SIT);
|
||||
}
|
||||
public bool IsStanding()
|
||||
{
|
||||
return IsWorkRunning(Host_work_ID.WORK_STAND);
|
||||
}
|
||||
public bool IsBeingBound()
|
||||
{
|
||||
return IsWorkRunning(Host_work_ID.WORK_BEBOUND);
|
||||
}
|
||||
//todo: use this method
|
||||
public void FinishAllWork(bool bGotoStand)
|
||||
{
|
||||
|
||||
@@ -516,7 +516,7 @@ namespace BrewMonster.Scripts
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((GetMoveRelDirMask() & (uint)((MOVE_DIR.MD_LEFT | MOVE_DIR.MD_RIGHT | MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_BACK))) != 0)
|
||||
if ((GetMoveRelDirMask() & (uint)((CECHostPlayer.MOVE_DIR.MD_LEFT | CECHostPlayer.MOVE_DIR.MD_RIGHT | CECHostPlayer.MOVE_DIR.MD_FORWARD | CECHostPlayer.MOVE_DIR.MD_BACK))) != 0)
|
||||
m_iDestType = DestTypes.DEST_PUSH;
|
||||
|
||||
if (m_iDestType == DestTypes.DEST_2D)
|
||||
@@ -652,7 +652,7 @@ namespace BrewMonster.Scripts
|
||||
fSpeed = m_pHost.GetGroundSpeed();
|
||||
bool bFinish = false;
|
||||
|
||||
if (m_pHost.GetPushDir(ref vMoveDir, (uint)(MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_BACK | MOVE_DIR.MD_LEFT | MOVE_DIR.MD_RIGHT), fDeltaTime))
|
||||
if (m_pHost.GetPushDir(ref vMoveDir, (uint)(CECHostPlayer.MOVE_DIR.MD_FORWARD | CECHostPlayer.MOVE_DIR.MD_BACK | CECHostPlayer.MOVE_DIR.MD_LEFT | CECHostPlayer.MOVE_DIR.MD_RIGHT), fDeltaTime))
|
||||
{
|
||||
if (vMoveDir != Vector3.zero)
|
||||
{
|
||||
@@ -799,7 +799,7 @@ namespace BrewMonster.Scripts
|
||||
if (!m_bReachedHeight)
|
||||
{
|
||||
m_pHost.m_vVelocity.y = 0.0f;
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(MOVE_DIR.MD_ABSUP | MOVE_DIR.MD_ABSDOWN));
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(CECHostPlayer.MOVE_DIR.MD_ABSUP | CECHostPlayer.MOVE_DIR.MD_ABSDOWN));
|
||||
m_bReachedHeight = true;
|
||||
}
|
||||
}
|
||||
@@ -809,13 +809,13 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
if (vCurPos.y < m_fAutoHeight * 10.0f)
|
||||
{
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(MOVE_DIR.MD_ABSDOWN));
|
||||
m_pHost.m_dwMoveRelDir |= ((uint)MOVE_DIR.MD_ABSUP);
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(CECHostPlayer.MOVE_DIR.MD_ABSDOWN));
|
||||
m_pHost.m_dwMoveRelDir |= ((uint)CECHostPlayer.MOVE_DIR.MD_ABSUP);
|
||||
}
|
||||
else if (vCurPos.y > m_fAutoHeight * 10.0f)
|
||||
{
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(MOVE_DIR.MD_ABSUP));
|
||||
m_pHost.m_dwMoveRelDir |= (uint)MOVE_DIR.MD_ABSDOWN;
|
||||
m_pHost.m_dwMoveRelDir &= ~((uint)(CECHostPlayer.MOVE_DIR.MD_ABSUP));
|
||||
m_pHost.m_dwMoveRelDir |= (uint)CECHostPlayer.MOVE_DIR.MD_ABSDOWN;
|
||||
}
|
||||
}
|
||||
else // Auto adjust height, so we should refresh move height
|
||||
@@ -832,7 +832,7 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)(MOVE_DIR.MD_LEFT | MOVE_DIR.MD_RIGHT | MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_BACK)) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)(CECHostPlayer.MOVE_DIR.MD_LEFT | CECHostPlayer.MOVE_DIR.MD_RIGHT | CECHostPlayer.MOVE_DIR.MD_FORWARD | CECHostPlayer.MOVE_DIR.MD_BACK)) != 0)
|
||||
m_iDestType = DestTypes.DEST_PUSH;
|
||||
|
||||
ON_AIR_CDR_INFO cdr = m_pHost.m_AirCDRInfo;
|
||||
@@ -840,7 +840,7 @@ namespace BrewMonster.Scripts
|
||||
if (m_iDestType == DestTypes.DEST_DIR)
|
||||
{
|
||||
Vector3 vPushDir = Vector3.zero;
|
||||
m_pHost.GetPushDir(ref vPushDir, (uint)MOVE_DIR.MD_ALL, 0);
|
||||
m_pHost.GetPushDir(ref vPushDir, (uint)CECHostPlayer.MOVE_DIR.MD_ALL, 0);
|
||||
vPushDir.x = vPushDir.z = 0.0f;
|
||||
|
||||
float fSpeed1H = m_pHost.m_vVelocity.MagnitudeH();
|
||||
@@ -881,7 +881,7 @@ namespace BrewMonster.Scripts
|
||||
else if (m_iDestType == DestTypes.DEST_2D)
|
||||
{
|
||||
Vector3 vPushDir = Vector3.zero;
|
||||
m_pHost.GetPushDir(ref vPushDir, (uint)MOVE_DIR.MD_ALL, 0f);
|
||||
m_pHost.GetPushDir(ref vPushDir, (uint)CECHostPlayer.MOVE_DIR.MD_ALL, 0f);
|
||||
vPushDir.x = vPushDir.z = 0.0f;
|
||||
|
||||
float fSpeed1H = m_pHost.m_vVelocity.MagnitudeH();
|
||||
@@ -1017,7 +1017,7 @@ namespace BrewMonster.Scripts
|
||||
else if (m_iDestType == DestTypes.DEST_PUSH)
|
||||
{
|
||||
Vector3 vPushDir = Vector3.zero, vUp;
|
||||
bool bPush = m_pHost.GetPushDir(ref vPushDir, (uint)(MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_BACK | MOVE_DIR.MD_LEFT | MOVE_DIR.MD_RIGHT), fDeltaTime);
|
||||
bool bPush = m_pHost.GetPushDir(ref vPushDir, (uint)(CECHostPlayer.MOVE_DIR.MD_FORWARD | CECHostPlayer.MOVE_DIR.MD_BACK | CECHostPlayer.MOVE_DIR.MD_LEFT | CECHostPlayer.MOVE_DIR.MD_RIGHT), fDeltaTime);
|
||||
|
||||
if (!bPush)
|
||||
{
|
||||
@@ -1027,7 +1027,7 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
|
||||
int nPitchDir = 0;
|
||||
if ((m_pHost.m_dwMoveRelDir & (int)(MOVE_DIR.MD_LEFT | MOVE_DIR.MD_RIGHT)) == 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (int)(CECHostPlayer.MOVE_DIR.MD_LEFT | CECHostPlayer.MOVE_DIR.MD_RIGHT)) == 0)
|
||||
{
|
||||
A3DVECTOR3 vOldDir = m_pHost.GetModelMoveDir();
|
||||
vOldDir.y = 0;
|
||||
@@ -1043,27 +1043,27 @@ namespace BrewMonster.Scripts
|
||||
A3DVECTOR3 vUp_fAngle = A3DVECTOR3.CrossProduct(vOldDir, vNewDir);
|
||||
if (vUp_fAngle.y > 0) nPitchDir = 1;
|
||||
else nPitchDir = -1;
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_BACK) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_BACK) != 0)
|
||||
nPitchDir = -nPitchDir;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pHost.m_dwMoveRelDir != 0)
|
||||
{
|
||||
if ((m_pHost.m_dwMoveRelDir & ~(uint)(MOVE_DIR.MD_ABSDOWN | MOVE_DIR.MD_ABSUP)) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & ~(uint)(CECHostPlayer.MOVE_DIR.MD_ABSDOWN | CECHostPlayer.MOVE_DIR.MD_ABSUP)) != 0)
|
||||
{
|
||||
float fPitchDelta = (/*m_pHost.UsingWing()*/m_pHost.GetWingType() == enumWingType.WINGTYPE_WING ? push_pitch_vel_wing : push_pitch_vel_fly_sword) * fDeltaTime;
|
||||
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_LEFT) != 0 || nPitchDir == -1)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_LEFT) != 0 || nPitchDir == -1)
|
||||
{
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_BACK) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_BACK) != 0)
|
||||
m_fPushPitch -= fPitchDelta;
|
||||
else
|
||||
m_fPushPitch += fPitchDelta;
|
||||
}
|
||||
else if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_RIGHT) != 0 || nPitchDir == 1)
|
||||
else if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_RIGHT) != 0 || nPitchDir == 1)
|
||||
{
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_BACK) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_BACK) != 0)
|
||||
m_fPushPitch += fPitchDelta;
|
||||
else
|
||||
m_fPushPitch -= fPitchDelta;
|
||||
@@ -1097,7 +1097,7 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
|
||||
// if (bPush)
|
||||
if (bPush || (m_pHost.m_dwMoveRelDir & (uint)(MOVE_DIR.MD_ABSDOWN | MOVE_DIR.MD_ABSUP)) != 0)
|
||||
if (bPush || (m_pHost.m_dwMoveRelDir & (uint)(CECHostPlayer.MOVE_DIR.MD_ABSDOWN | CECHostPlayer.MOVE_DIR.MD_ABSUP)) != 0)
|
||||
{
|
||||
// float pa = bPush ? EC_PUSH_ACCE : 0.0f;
|
||||
float pa = CECHostMove.EC_PUSH_ACCE;
|
||||
@@ -1113,12 +1113,12 @@ namespace BrewMonster.Scripts
|
||||
if (bPush)
|
||||
vVelDir = vPushDir;
|
||||
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_ABSDOWN) != 0)
|
||||
if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_ABSDOWN) != 0)
|
||||
{
|
||||
vVelDir += -EC_Utility.ToVector3(GPDataTypeHelper.g_vAxisY);
|
||||
vVelDir.Normalize();
|
||||
}
|
||||
else if ((m_pHost.m_dwMoveRelDir & (uint)MOVE_DIR.MD_ABSUP) != 0)
|
||||
else if ((m_pHost.m_dwMoveRelDir & (uint)CECHostPlayer.MOVE_DIR.MD_ABSUP) != 0)
|
||||
{
|
||||
vVelDir += EC_Utility.ToVector3(GPDataTypeHelper.g_vAxisY);
|
||||
vVelDir.Normalize();
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
m_iPoseAction = iAction;
|
||||
m_bSession = bSession;
|
||||
|
||||
// m_pHost.PlayAction(m_iPoseAction, false, 300);
|
||||
m_pHost.PlayAction(m_iPoseAction, true);
|
||||
|
||||
if (!bSession && iAction != (int)PLAYER_ACTION_TYPE.ACT_EXP_KISS)
|
||||
@@ -175,6 +175,11 @@ namespace BrewMonster.Scripts
|
||||
m_pHost.PlayAction(m_iCurAction, false, 300);
|
||||
//m_oldAction = m_iCurAction;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Debug.LogError($"m_iPoseAction == {(PLAYER_ACTION_TYPE)m_iPoseAction}");
|
||||
m_pHost.PlayAction(m_iPoseAction, false, 300);
|
||||
}
|
||||
|
||||
// Force to update object's direction and up
|
||||
// m_pHost.m_vecGroundNormal = m_pHost.m_vecGroundNormalSet;
|
||||
|
||||
@@ -19,27 +19,7 @@ namespace BrewMonster
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
//if (bInAutoMode) return;
|
||||
if (IsJumpInWater() || IsFlying())
|
||||
return;
|
||||
|
||||
if (IsUnderWater())
|
||||
{
|
||||
if (!CanTakeOffWater())
|
||||
return;
|
||||
else if (_JumpTime <= 0)
|
||||
{
|
||||
_JumpTime = Time.realtimeSinceStartup;
|
||||
return;
|
||||
}
|
||||
else if ((Time.realtimeSinceStartup - _JumpTime) < 1f) // logic in c++, _JumpTime is milisecond
|
||||
return;
|
||||
else
|
||||
_JumpTime = -1f;
|
||||
}
|
||||
|
||||
m_GndInfo.bOnGround = GroundCheck(out lastGroundHit);
|
||||
OnMsgHstJump();
|
||||
OnClickBtnJump();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,5 +188,29 @@ namespace BrewMonster
|
||||
PlayAction((int)PLAYER_ACTION_TYPE.ACT_JUMP_LOOP, false, 0, true);
|
||||
}
|
||||
|
||||
public void OnClickBtnJump()
|
||||
{
|
||||
//if (bInAutoMode) return;
|
||||
if (IsJumpInWater() || IsFlying())
|
||||
return;
|
||||
|
||||
if (IsUnderWater())
|
||||
{
|
||||
if (!CanTakeOffWater())
|
||||
return;
|
||||
else if (_JumpTime <= 0)
|
||||
{
|
||||
_JumpTime = Time.realtimeSinceStartup;
|
||||
return;
|
||||
}
|
||||
else if ((Time.realtimeSinceStartup - _JumpTime) < 1f) // logic in c++, _JumpTime is milisecond
|
||||
return;
|
||||
else
|
||||
_JumpTime = -1f;
|
||||
}
|
||||
|
||||
m_GndInfo.bOnGround = GroundCheck(out lastGroundHit);
|
||||
OnMsgHstJump();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using CSNetwork.GPDataType;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Common;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using BrewMonster.Scripts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
@@ -23,7 +24,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
|
||||
[Header("Detail Panel (assign in Inspector)")]
|
||||
[SerializeField] private GameObject detailPanelRoot;
|
||||
[SerializeField] private Vector2 detailPanelOffset = new Vector2(20f, 0f);
|
||||
[SerializeField] private Vector2 detailPanelOffset = new Vector2(20f, 0f);
|
||||
[SerializeField] private bool hideDetailOnStart = true;
|
||||
[SerializeField] private TextOutlet nameText;
|
||||
[SerializeField] private TextOutlet descriptionText;
|
||||
@@ -35,35 +36,41 @@ namespace BrewMonster.Scripts.Managers
|
||||
[SerializeField] private bool autoRefresh = true;
|
||||
[SerializeField] private float refreshInterval = 1.0f;
|
||||
[SerializeField] private bool showEquipmentDetails = true;
|
||||
|
||||
[Header("Money UI (assign any text fields to mirror money amount)")]
|
||||
[SerializeField] private List<UnityEngine.UI.Text> moneyTextsLegacy = new List<UnityEngine.UI.Text>();
|
||||
[SerializeField] private List<TMPro.TextMeshProUGUI> moneyTextsTMP = new List<TMPro.TextMeshProUGUI>();
|
||||
|
||||
[Header("Cash UI (assign any text fields to mirror cash amount)")]
|
||||
[SerializeField] private List<UnityEngine.UI.Text> cashTextsLegacy = new List<UnityEngine.UI.Text>();
|
||||
[SerializeField] private List<TMPro.TextMeshProUGUI> cashTextsTMP = new List<TMPro.TextMeshProUGUI>();
|
||||
|
||||
[Header("Money UI (assign any text fields to mirror money amount)")]
|
||||
[SerializeField] private List<UnityEngine.UI.Text> moneyTextsLegacy = new List<UnityEngine.UI.Text>();
|
||||
[SerializeField] private List<TMPro.TextMeshProUGUI> moneyTextsTMP = new List<TMPro.TextMeshProUGUI>();
|
||||
|
||||
[Header("Cash UI (assign any text fields to mirror cash amount)")]
|
||||
[SerializeField] private List<UnityEngine.UI.Text> cashTextsLegacy = new List<UnityEngine.UI.Text>();
|
||||
[SerializeField] private List<TMPro.TextMeshProUGUI> cashTextsTMP = new List<TMPro.TextMeshProUGUI>();
|
||||
|
||||
private float lastRefreshTime;
|
||||
|
||||
// Pending currency cache for when UI is not yet active
|
||||
private static bool s_hasPendingMoney;
|
||||
private static ulong s_pendingMoneyAmount;
|
||||
private static ulong s_pendingMoneyMaxAmount;
|
||||
private static bool s_hasPendingCash;
|
||||
private static int s_pendingCashAmount;
|
||||
// Pending currency cache for when UI is not yet active
|
||||
private static bool s_hasPendingMoney;
|
||||
private static ulong s_pendingMoneyAmount;
|
||||
private static ulong s_pendingMoneyMaxAmount;
|
||||
private static bool s_hasPendingCash;
|
||||
private static int s_pendingCashAmount;
|
||||
|
||||
// Flags to prevent log spam for extended description warnings
|
||||
// 防止扩展描述警告日志刷屏的标志
|
||||
private static bool m_HasLoggedExtDescNull = false;
|
||||
private static bool m_HasLoggedExtDescNotInit = false;
|
||||
private static bool m_HasLoggedExtDescError = false;
|
||||
// Flags to prevent log spam for extended description warnings
|
||||
// 防止扩展描述警告日志刷屏的标志
|
||||
private static bool m_HasLoggedExtDescNull = false;
|
||||
private static bool m_HasLoggedExtDescNotInit = false;
|
||||
private static bool m_HasLoggedExtDescError = false;
|
||||
|
||||
private InventoryModel model;
|
||||
private InventoryView view;
|
||||
|
||||
|
||||
// Drag-and-drop state
|
||||
private int draggedItemSourceSlot = -1;
|
||||
private byte draggedItemSourcePackage = 0;
|
||||
[SerializeField] private Image currentDragImage;
|
||||
private bool isDragging = false;
|
||||
|
||||
// === Text Formatting Methods ===
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Format text for TextMeshPro components with rich text support
|
||||
/// </summary>
|
||||
@@ -73,7 +80,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
return EC_Utility.FormatForTextMeshPro(text);
|
||||
}
|
||||
|
||||
|
||||
// Current selected item for equip/unequip operations
|
||||
private byte currentSelectedPackage;
|
||||
private int currentSelectedSlot;
|
||||
@@ -88,6 +95,20 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
model = new InventoryModel();
|
||||
view = new InventoryView();
|
||||
|
||||
if (currentDragImage == null)
|
||||
{
|
||||
var canvas = GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
canvas = FindAnyObjectByType<Canvas>();
|
||||
}
|
||||
var go = new GameObject("DragImage", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
|
||||
go.transform.SetParent(canvas.transform, false);
|
||||
currentDragImage = go.GetComponent<Image>();
|
||||
currentDragImage.raycastTarget = false;
|
||||
currentDragImage.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
@@ -97,15 +118,15 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
ShowDetailPanel(false);
|
||||
}
|
||||
// Apply any pending currency values captured before the UI became active
|
||||
ApplyPendingCurrency();
|
||||
// Apply any pending currency values captured before the UI became active
|
||||
ApplyPendingCurrency();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Ensure cached values are pushed when the UI is enabled
|
||||
ApplyPendingCurrency();
|
||||
}
|
||||
private void OnEnable()
|
||||
{
|
||||
// Ensure cached values are pushed when the UI is enabled
|
||||
ApplyPendingCurrency();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -128,109 +149,109 @@ namespace BrewMonster.Scripts.Managers
|
||||
view.RenderPackage(fashionPackButtons, fshItems, PKG_FASHION, OnInventoryButtonClicked, GetDisplayTextForItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update all configured money text components with the current amount.
|
||||
/// Call this when GET_OWN_MONEY arrives.
|
||||
/// </summary>
|
||||
public void UpdateMoney(ulong amount, ulong maxAmount)
|
||||
{
|
||||
string text = amount.ToString();
|
||||
if (moneyTextsLegacy != null)
|
||||
{
|
||||
for (int i = 0; i < moneyTextsLegacy.Count; i++)
|
||||
{
|
||||
var t = moneyTextsLegacy[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
if (moneyTextsTMP != null)
|
||||
{
|
||||
for (int i = 0; i < moneyTextsTMP.Count; i++)
|
||||
{
|
||||
var t = moneyTextsTMP[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update all configured cash text components with the current boutique cash amount.
|
||||
/// Call this when PLAYER_CASH arrives.
|
||||
/// </summary>
|
||||
public void UpdateCash(int amount)
|
||||
{
|
||||
string text = amount.ToString();
|
||||
if (cashTextsLegacy != null)
|
||||
{
|
||||
for (int i = 0; i < cashTextsLegacy.Count; i++)
|
||||
{
|
||||
var t = cashTextsLegacy[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
if (cashTextsTMP != null)
|
||||
{
|
||||
for (int i = 0; i < cashTextsTMP.Count; i++)
|
||||
{
|
||||
var t = cashTextsTMP[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Update all configured money text components with the current amount.
|
||||
/// Call this when GET_OWN_MONEY arrives.
|
||||
/// </summary>
|
||||
public void UpdateMoney(ulong amount, ulong maxAmount)
|
||||
{
|
||||
string text = amount.ToString();
|
||||
if (moneyTextsLegacy != null)
|
||||
{
|
||||
for (int i = 0; i < moneyTextsLegacy.Count; i++)
|
||||
{
|
||||
var t = moneyTextsLegacy[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
if (moneyTextsTMP != null)
|
||||
{
|
||||
for (int i = 0; i < moneyTextsTMP.Count; i++)
|
||||
{
|
||||
var t = moneyTextsTMP[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Public static entry points to cache values when UI is unavailable
|
||||
public static void CacheMoney(ulong amount, ulong maxAmount)
|
||||
{
|
||||
s_pendingMoneyAmount = amount;
|
||||
s_pendingMoneyMaxAmount = maxAmount;
|
||||
s_hasPendingMoney = true;
|
||||
// If an instance exists (even inactive), push immediately so the value is ready
|
||||
var all = Resources.FindObjectsOfTypeAll<EC_InventoryUI>();
|
||||
if (all != null)
|
||||
{
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
{
|
||||
var ui = all[i];
|
||||
if (ui != null && ui.gameObject.scene.IsValid())
|
||||
{
|
||||
ui.ApplyPendingCurrency();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Update all configured cash text components with the current boutique cash amount.
|
||||
/// Call this when PLAYER_CASH arrives.
|
||||
/// </summary>
|
||||
public void UpdateCash(int amount)
|
||||
{
|
||||
string text = amount.ToString();
|
||||
if (cashTextsLegacy != null)
|
||||
{
|
||||
for (int i = 0; i < cashTextsLegacy.Count; i++)
|
||||
{
|
||||
var t = cashTextsLegacy[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
if (cashTextsTMP != null)
|
||||
{
|
||||
for (int i = 0; i < cashTextsTMP.Count; i++)
|
||||
{
|
||||
var t = cashTextsTMP[i];
|
||||
if (t != null) t.text = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CacheCash(int amount)
|
||||
{
|
||||
s_pendingCashAmount = amount;
|
||||
s_hasPendingCash = true;
|
||||
// If an instance exists (even inactive), push immediately so the value is ready
|
||||
var all = Resources.FindObjectsOfTypeAll<EC_InventoryUI>();
|
||||
if (all != null)
|
||||
{
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
{
|
||||
var ui = all[i];
|
||||
if (ui != null && ui.gameObject.scene.IsValid())
|
||||
{
|
||||
ui.ApplyPendingCurrency();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Public static entry points to cache values when UI is unavailable
|
||||
public static void CacheMoney(ulong amount, ulong maxAmount)
|
||||
{
|
||||
s_pendingMoneyAmount = amount;
|
||||
s_pendingMoneyMaxAmount = maxAmount;
|
||||
s_hasPendingMoney = true;
|
||||
// If an instance exists (even inactive), push immediately so the value is ready
|
||||
var all = Resources.FindObjectsOfTypeAll<EC_InventoryUI>();
|
||||
if (all != null)
|
||||
{
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
{
|
||||
var ui = all[i];
|
||||
if (ui != null && ui.gameObject.scene.IsValid())
|
||||
{
|
||||
ui.ApplyPendingCurrency();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyPendingCurrency()
|
||||
{
|
||||
if (s_hasPendingMoney)
|
||||
{
|
||||
UpdateMoney(s_pendingMoneyAmount, s_pendingMoneyMaxAmount);
|
||||
}
|
||||
if (s_hasPendingCash)
|
||||
{
|
||||
UpdateCash(s_pendingCashAmount);
|
||||
}
|
||||
}
|
||||
public static void CacheCash(int amount)
|
||||
{
|
||||
s_pendingCashAmount = amount;
|
||||
s_hasPendingCash = true;
|
||||
// If an instance exists (even inactive), push immediately so the value is ready
|
||||
var all = Resources.FindObjectsOfTypeAll<EC_InventoryUI>();
|
||||
if (all != null)
|
||||
{
|
||||
for (int i = 0; i < all.Length; i++)
|
||||
{
|
||||
var ui = all[i];
|
||||
if (ui != null && ui.gameObject.scene.IsValid())
|
||||
{
|
||||
ui.ApplyPendingCurrency();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyPendingCurrency()
|
||||
{
|
||||
if (s_hasPendingMoney)
|
||||
{
|
||||
UpdateMoney(s_pendingMoneyAmount, s_pendingMoneyMaxAmount);
|
||||
}
|
||||
if (s_hasPendingCash)
|
||||
{
|
||||
UpdateCash(s_pendingCashAmount);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnInventoryButtonClicked(byte package, int slot)
|
||||
{
|
||||
@@ -242,13 +263,13 @@ namespace BrewMonster.Scripts.Managers
|
||||
currentSelectedPackage = package;
|
||||
currentSelectedSlot = slot;
|
||||
currentSelectedItem = itemData;
|
||||
|
||||
|
||||
// Create equipment object if this is equipment
|
||||
currentSelectedEquipment = CreateEquipmentFromItemData(itemData);
|
||||
|
||||
// Position detail panel near the clicked item button
|
||||
PositionDetailPanelNearButton(package, slot);
|
||||
|
||||
// Position detail panel near the clicked item button
|
||||
PositionDetailPanelNearButton(package, slot);
|
||||
|
||||
FillDetailPanel(package, itemData);
|
||||
}
|
||||
else
|
||||
@@ -266,19 +287,19 @@ namespace BrewMonster.Scripts.Managers
|
||||
return null;
|
||||
|
||||
var equipment = new EC_IvtrEquip(itemData.m_tid, itemData.m_expire_date);
|
||||
|
||||
|
||||
// Set basic properties (use default values since InventoryItemData doesn't have these)
|
||||
equipment.Price = 0;
|
||||
equipment.Count = itemData.m_iCount;
|
||||
equipment.PriceScale = 1.0f;
|
||||
equipment.ScaleType = 0;
|
||||
|
||||
|
||||
// Parse item info if available (use Content field)
|
||||
if (itemData.Content != null && itemData.Content.Length > 0)
|
||||
{
|
||||
equipment.SetItemInfo(itemData.Content, itemData.Content.Length);
|
||||
}
|
||||
|
||||
|
||||
return equipment;
|
||||
}
|
||||
|
||||
@@ -418,7 +439,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
// Call RequestDropIvrtItem with slot index and amount
|
||||
UnityGameSession.RequestDropIvrtItem((byte)currentSelectedSlot, 1);
|
||||
Debug.Log($"[InventoryUI] Drop request sent for inventory item {currentSelectedItem.m_tid} from slot {currentSelectedSlot} with amount {currentSelectedItem.m_iCount}");
|
||||
|
||||
|
||||
// Refresh inventory after drop
|
||||
RefreshAll();
|
||||
}
|
||||
@@ -430,12 +451,12 @@ namespace BrewMonster.Scripts.Managers
|
||||
// Call RequestDropEquipItem with slot index
|
||||
UnityGameSession.RequestDropEquipItem((byte)currentSelectedSlot);
|
||||
Debug.Log($"[InventoryUI] Drop request sent for equipment item {currentSelectedItem.m_tid} from slot {currentSelectedSlot}");
|
||||
|
||||
|
||||
// Refresh inventory after drop
|
||||
RefreshAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private int FindEmptyInventorySlot()
|
||||
{
|
||||
var inventoryData = model.GetInventoryData(PKG_INVENTORY);
|
||||
@@ -451,7 +472,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get item description from string table
|
||||
/// </summary>
|
||||
@@ -490,10 +511,10 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
Debug.LogWarning($"[InventoryUI] Error getting item description for ID {templateId}: {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get extended item description from string table
|
||||
/// </summary>
|
||||
@@ -532,10 +553,10 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
Debug.LogWarning($"[InventoryUI] Error getting extended item description for ID {templateId}: {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get user-friendly text for item state
|
||||
/// </summary>
|
||||
@@ -602,7 +623,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
bool hasItem = items != null && items.TryGetValue(slot, out itemData);
|
||||
button.onClick.RemoveAllListeners();
|
||||
int capturedSlot = slot;
|
||||
button.onClick.AddListener(() => onClick(package, capturedSlot));
|
||||
button.onClick.AddListener(() => onClick(package, capturedSlot));
|
||||
// Optional visual tweaks based on state/count
|
||||
var image = button.GetComponent<Image>();
|
||||
if (image != null)
|
||||
@@ -627,6 +648,24 @@ namespace BrewMonster.Scripts.Managers
|
||||
image.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
var eventTrigger = button.GetComponent<EventTrigger>();
|
||||
if (eventTrigger == null)
|
||||
eventTrigger = button.gameObject.AddComponent<EventTrigger>();
|
||||
|
||||
eventTrigger.triggers.Clear();
|
||||
|
||||
void AddEvent(EventTriggerType type, UnityEngine.Events.UnityAction<BaseEventData> action)
|
||||
{
|
||||
var entry = new EventTrigger.Entry { eventID = type };
|
||||
entry.callback.AddListener(action);
|
||||
eventTrigger.triggers.Add(entry);
|
||||
}
|
||||
|
||||
AddEvent(EventTriggerType.BeginDrag, (data) => ((EC_InventoryUI)button.GetComponentInParent<EC_InventoryUI>()).OnBeginDrag((PointerEventData)data));
|
||||
AddEvent(EventTriggerType.Drag, (data) => ((EC_InventoryUI)button.GetComponentInParent<EC_InventoryUI>()).OnDrag((PointerEventData)data));
|
||||
AddEvent(EventTriggerType.EndDrag, (data) => ((EC_InventoryUI)button.GetComponentInParent<EC_InventoryUI>()).OnEndDrag((PointerEventData)data));
|
||||
AddEvent(EventTriggerType.Drop, (data) => ((EC_InventoryUI)button.GetComponentInParent<EC_InventoryUI>()).OnDrop((PointerEventData)data));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -649,7 +688,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
tmp.text = FormatForTextMeshPro(value ?? string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set text with explicit formatting preference
|
||||
/// </summary>
|
||||
@@ -657,10 +696,10 @@ namespace BrewMonster.Scripts.Managers
|
||||
/// <param name="preferTextMeshPro">Whether to prefer TextMeshPro formatting</param>
|
||||
public void SetFormatted(string value, bool preferTextMeshPro = true)
|
||||
{
|
||||
string formattedText = preferTextMeshPro ?
|
||||
FormatForTextMeshPro(value ?? string.Empty) :
|
||||
string formattedText = preferTextMeshPro ?
|
||||
FormatForTextMeshPro(value ?? string.Empty) :
|
||||
EC_Utility.FormatForLegacyText(value ?? string.Empty);
|
||||
|
||||
|
||||
if (legacy != null)
|
||||
{
|
||||
legacy.text = formattedText;
|
||||
@@ -675,7 +714,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
public void RefreshLayout(GameObject gameObject)
|
||||
{
|
||||
var parent = gameObject.GetComponent<RectTransform>();
|
||||
|
||||
|
||||
// Force Unity to rebuild layout immediately
|
||||
parent.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(parent);
|
||||
@@ -689,115 +728,115 @@ namespace BrewMonster.Scripts.Managers
|
||||
}
|
||||
}
|
||||
|
||||
private Button GetButtonForSlot(byte package, int slot)
|
||||
{
|
||||
List<Button> list = null;
|
||||
switch (package)
|
||||
{
|
||||
case PKG_INVENTORY:
|
||||
list = inventoryPackButtons;
|
||||
break;
|
||||
case PKG_EQUIPMENT:
|
||||
list = equipmentPackButtons;
|
||||
break;
|
||||
case PKG_FASHION:
|
||||
list = fashionPackButtons;
|
||||
break;
|
||||
}
|
||||
if (list == null || slot < 0 || slot >= list.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return list[slot];
|
||||
}
|
||||
private Button GetButtonForSlot(byte package, int slot)
|
||||
{
|
||||
List<Button> list = null;
|
||||
switch (package)
|
||||
{
|
||||
case PKG_INVENTORY:
|
||||
list = inventoryPackButtons;
|
||||
break;
|
||||
case PKG_EQUIPMENT:
|
||||
list = equipmentPackButtons;
|
||||
break;
|
||||
case PKG_FASHION:
|
||||
list = fashionPackButtons;
|
||||
break;
|
||||
}
|
||||
if (list == null || slot < 0 || slot >= list.Count)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return list[slot];
|
||||
}
|
||||
|
||||
private void PositionDetailPanelNearButton(byte package, int slot)
|
||||
{
|
||||
if (detailPanelRoot == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var panelRect = detailPanelRoot.transform as RectTransform;
|
||||
if (panelRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
private void PositionDetailPanelNearButton(byte package, int slot)
|
||||
{
|
||||
if (detailPanelRoot == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var panelRect = detailPanelRoot.transform as RectTransform;
|
||||
if (panelRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var button = GetButtonForSlot(package, slot);
|
||||
if (button == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonRect = button.transform as RectTransform;
|
||||
if (buttonRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var button = GetButtonForSlot(package, slot);
|
||||
if (button == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonRect = button.transform as RectTransform;
|
||||
if (buttonRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var canvas = panelRect.GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var parentRect = panelRect.parent as RectTransform;
|
||||
if (parentRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var canvas = panelRect.GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var parentRect = panelRect.parent as RectTransform;
|
||||
if (parentRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Camera eventCamera = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||
Vector3 worldCenter = buttonRect.TransformPoint(buttonRect.rect.center);
|
||||
Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(eventCamera, worldCenter);
|
||||
Vector2 localPoint;
|
||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(parentRect, screenPoint, eventCamera, out localPoint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Camera eventCamera = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||
Vector3 worldCenter = buttonRect.TransformPoint(buttonRect.rect.center);
|
||||
Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(eventCamera, worldCenter);
|
||||
Vector2 localPoint;
|
||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(parentRect, screenPoint, eventCamera, out localPoint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float btnHalfW = buttonRect.rect.width * 0.5f;
|
||||
float panelW = panelRect.rect.width;
|
||||
float panelH = panelRect.rect.height;
|
||||
float pivotX = panelRect.pivot.x;
|
||||
float pivotY = panelRect.pivot.y;
|
||||
float btnHalfW = buttonRect.rect.width * 0.5f;
|
||||
float panelW = panelRect.rect.width;
|
||||
float panelH = panelRect.rect.height;
|
||||
float pivotX = panelRect.pivot.x;
|
||||
float pivotY = panelRect.pivot.y;
|
||||
|
||||
// Compute right-placement candidate (panel's left edge at button's right edge + offset)
|
||||
float leftEdgeRightPlacement = localPoint.x + btnHalfW + detailPanelOffset.x;
|
||||
float candidateXRight = leftEdgeRightPlacement + pivotX * panelW;
|
||||
// Compute right-placement candidate (panel's left edge at button's right edge + offset)
|
||||
float leftEdgeRightPlacement = localPoint.x + btnHalfW + detailPanelOffset.x;
|
||||
float candidateXRight = leftEdgeRightPlacement + pivotX * panelW;
|
||||
|
||||
// Compute left-placement candidate (panel's right edge at button's left edge - offset)
|
||||
float rightEdgeLeftPlacement = localPoint.x - btnHalfW - detailPanelOffset.x;
|
||||
float candidateXLeft = rightEdgeLeftPlacement - (1f - pivotX) * panelW;
|
||||
// Compute left-placement candidate (panel's right edge at button's left edge - offset)
|
||||
float rightEdgeLeftPlacement = localPoint.x - btnHalfW - detailPanelOffset.x;
|
||||
float candidateXLeft = rightEdgeLeftPlacement - (1f - pivotX) * panelW;
|
||||
|
||||
// Vertical clamping honoring pivot
|
||||
float minY = parentRect.rect.yMin + pivotY * panelH;
|
||||
float maxY = parentRect.rect.yMax - (1f - pivotY) * panelH;
|
||||
float candidateY = Mathf.Clamp(localPoint.y + detailPanelOffset.y, minY, maxY);
|
||||
// Vertical clamping honoring pivot
|
||||
float minY = parentRect.rect.yMin + pivotY * panelH;
|
||||
float maxY = parentRect.rect.yMax - (1f - pivotY) * panelH;
|
||||
float candidateY = Mathf.Clamp(localPoint.y + detailPanelOffset.y, minY, maxY);
|
||||
|
||||
// Choose side based on available space
|
||||
float rightEdgeOfRight = candidateXRight + (1f - pivotX) * panelW;
|
||||
float canvasRight = parentRect.rect.xMax;
|
||||
float canvasLeft = parentRect.rect.xMin;
|
||||
float leftEdgeOfLeft = candidateXLeft - pivotX * panelW;
|
||||
// Choose side based on available space
|
||||
float rightEdgeOfRight = candidateXRight + (1f - pivotX) * panelW;
|
||||
float canvasRight = parentRect.rect.xMax;
|
||||
float canvasLeft = parentRect.rect.xMin;
|
||||
float leftEdgeOfLeft = candidateXLeft - pivotX * panelW;
|
||||
|
||||
Vector2 finalPos;
|
||||
if (rightEdgeOfRight <= canvasRight)
|
||||
{
|
||||
finalPos = new Vector2(candidateXRight, candidateY);
|
||||
}
|
||||
else if (leftEdgeOfLeft >= canvasLeft)
|
||||
{
|
||||
finalPos = new Vector2(candidateXLeft, candidateY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: clamp within canvas horizontally
|
||||
float minX = canvasLeft + pivotX * panelW;
|
||||
float maxX = canvasRight - (1f - pivotX) * panelW;
|
||||
finalPos = new Vector2(Mathf.Clamp(candidateXRight, minX, maxX), candidateY);
|
||||
}
|
||||
Vector2 finalPos;
|
||||
if (rightEdgeOfRight <= canvasRight)
|
||||
{
|
||||
finalPos = new Vector2(candidateXRight, candidateY);
|
||||
}
|
||||
else if (leftEdgeOfLeft >= canvasLeft)
|
||||
{
|
||||
finalPos = new Vector2(candidateXLeft, candidateY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: clamp within canvas horizontally
|
||||
float minX = canvasLeft + pivotX * panelW;
|
||||
float maxX = canvasRight - (1f - pivotX) * panelW;
|
||||
finalPos = new Vector2(Mathf.Clamp(candidateXRight, minX, maxX), candidateY);
|
||||
}
|
||||
|
||||
panelRect.anchoredPosition = finalPos;
|
||||
}
|
||||
panelRect.anchoredPosition = finalPos;
|
||||
}
|
||||
|
||||
private void FillDetailPanel(byte package, EC_IvtrItem item)
|
||||
{
|
||||
@@ -875,8 +914,8 @@ namespace BrewMonster.Scripts.Managers
|
||||
|
||||
// Display extended description if found (exactly like C++ checks: if (!szExtDesc || !szExtDesc[0]))
|
||||
// 如果找到扩展描述则显示(完全像C++检查:if (!szExtDesc || !szExtDesc[0]))
|
||||
string displayText = !string.IsNullOrEmpty(szExtDesc)
|
||||
? szExtDesc.Replace("\\r", "\n")
|
||||
string displayText = !string.IsNullOrEmpty(szExtDesc)
|
||||
? szExtDesc.Replace("\\r", "\n")
|
||||
: "";
|
||||
|
||||
// Debug logging to diagnose issues
|
||||
@@ -1000,7 +1039,118 @@ namespace BrewMonster.Scripts.Managers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void OnBeginDrag(PointerEventData eventData)
|
||||
{
|
||||
var btn = eventData.pointerDrag?.GetComponent<Button>();
|
||||
if (btn != null)
|
||||
{
|
||||
for (int i = 0; i < inventoryPackButtons.Count; i++)
|
||||
{
|
||||
if (btn == inventoryPackButtons[i])
|
||||
{
|
||||
var invItems = model.GetInventoryData(PKG_INVENTORY);
|
||||
if(invItems == null || !invItems.ContainsKey(i))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
draggedItemSourceSlot = i;
|
||||
draggedItemSourcePackage = PKG_INVENTORY;
|
||||
|
||||
var img = btn.GetComponent<Image>();
|
||||
if (img != null && currentDragImage != null)
|
||||
{
|
||||
currentDragImage.sprite = img.sprite;
|
||||
currentDragImage.SetNativeSize();
|
||||
currentDragImage.color = img.color;
|
||||
currentDragImage.gameObject.SetActive(true);
|
||||
isDragging = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < equipmentPackButtons.Count; i++)
|
||||
{
|
||||
if (btn == equipmentPackButtons[i])
|
||||
{
|
||||
var equipItems = model.GetInventoryData(PKG_EQUIPMENT);
|
||||
if(equipItems == null || !equipItems.ContainsKey(i))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
draggedItemSourceSlot = i;
|
||||
draggedItemSourcePackage = PKG_EQUIPMENT;
|
||||
var img = btn.GetComponent<Image>();
|
||||
if (img != null && currentDragImage != null)
|
||||
{
|
||||
currentDragImage.sprite = img.sprite;
|
||||
currentDragImage.SetNativeSize();
|
||||
currentDragImage.color = img.color;
|
||||
currentDragImage.gameObject.SetActive(true);
|
||||
isDragging = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDrag(PointerEventData eventData)
|
||||
{
|
||||
if(isDragging && currentDragImage != null)
|
||||
{
|
||||
currentDragImage.transform.position = eventData.position;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEndDrag(PointerEventData eventData)
|
||||
{
|
||||
draggedItemSourceSlot = -1;
|
||||
draggedItemSourcePackage = 0;
|
||||
if(currentDragImage != null)
|
||||
{
|
||||
currentDragImage.gameObject.SetActive(false);
|
||||
isDragging = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDrop(PointerEventData eventData)
|
||||
{
|
||||
var btn = eventData.pointerCurrentRaycast.gameObject?.GetComponent<Button>();
|
||||
if (btn != null && draggedItemSourcePackage == PKG_INVENTORY)
|
||||
{
|
||||
for (int i = 0; i < equipmentPackButtons.Count; i++)
|
||||
{
|
||||
if (btn == equipmentPackButtons[i])
|
||||
{
|
||||
UnityGameSession.RequestEquipItemAsync((byte)draggedItemSourceSlot, (byte)i, () =>
|
||||
{
|
||||
Debug.Log($"[InventoryUI] Drag-drop equip: từ inventory slot {draggedItemSourceSlot} sang equipment slot {i}");
|
||||
RefreshAll();
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(btn != null && draggedItemSourcePackage == PKG_EQUIPMENT)
|
||||
{
|
||||
for (int i = 0; i < inventoryPackButtons.Count; i++)
|
||||
{
|
||||
if (btn == inventoryPackButtons[i])
|
||||
{
|
||||
UnityGameSession.RequestEquipItemAsync((byte)i, (byte)draggedItemSourceSlot, () =>
|
||||
{
|
||||
Debug.Log($"[InventoryUI] Drag-drop unequip: từ equipment slot {draggedItemSourceSlot} sang inventory slot {i}");
|
||||
RefreshAll();
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
draggedItemSourceSlot = -1;
|
||||
draggedItemSourcePackage = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,6 +548,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
/// This class intentionally keeps C++-style naming and layout so other C++ systems
|
||||
/// can be ported over with minimal friction.
|
||||
/// </summary>
|
||||
/// TODO: have to rename to CECIvtrItem to match C++ naming
|
||||
public class EC_IvtrItem
|
||||
{
|
||||
// NOTE: The nested enums and fields mirror the original C++ names and values.
|
||||
|
||||
@@ -62,6 +62,7 @@ namespace PerfectWorld.Scripts.Managers
|
||||
case int value3 when value3 == EC_MsgDef.MSG_PM_PLAYERATKRESULT:
|
||||
case int value4 when value4 == EC_MsgDef.MSG_PM_CASTSKILL:
|
||||
case int value5 when value5 == EC_MsgDef.MSG_PM_ENCHANTRESULT:
|
||||
case int value6 when value6 == EC_MsgDef.MSG_PM_PLAYERDOEMOTE:
|
||||
TransmitMessage(Msg);
|
||||
break;
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERDIED:
|
||||
@@ -620,6 +621,18 @@ namespace PerfectWorld.Scripts.Managers
|
||||
case int value2 when value2 == CommandID.PLAYER_CAST_RUNE_SKILL: cid = (GPDataTypeHelper.FromBytes<cmd_player_cast_rune_skill>((byte[])Msg.dwParam1)).caster; break;
|
||||
case int value2 when value2 == CommandID.PLAYER_CAST_RUNE_INSTANT_SKILL: cid = (GPDataTypeHelper.FromBytes<cmd_player_cast_rune_instant_skill>((byte[])Msg.dwParam1)).caster; break;
|
||||
}
|
||||
break;
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYERDOEMOTE:
|
||||
|
||||
if (Convert.ToInt32(Msg.dwParam2) == CommandID.OBJECT_DO_EMOTE)
|
||||
{
|
||||
cmd_object_do_emote pCmdDoEmote = GPDataTypeHelper.FromBytes<cmd_object_do_emote>((byte[])Msg.dwParam1);
|
||||
cid = pCmdDoEmote.id;
|
||||
}
|
||||
else // Msg.dwParam2 == OBJECT_EMOTE_RESTORE
|
||||
{
|
||||
// cid = ((cmd_object_emote_restore*)Msg.dwParam1)->id;
|
||||
}
|
||||
|
||||
break;
|
||||
case long value when value == EC_MsgDef.MSG_PM_ENCHANTRESULT:
|
||||
|
||||
@@ -1511,13 +1511,20 @@ namespace BrewMonster
|
||||
m_ExtProps.df = (ROLEEXTPROP_DEF)pData;
|
||||
break;
|
||||
|
||||
default:
|
||||
//ASSERT(0);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
//ASSERT(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#region Team
|
||||
|
||||
// Get team to which this player belongs to
|
||||
// public CECTeam GetTeam() { return m_pTeam; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public struct PlayActionEvent
|
||||
{
|
||||
public string AnimationName;
|
||||
|
||||
@@ -101,34 +101,44 @@ namespace BrewMonster
|
||||
pEnvTrc.fFraction = 100.0f;
|
||||
pEnvTrc.bStartSolid = false;
|
||||
pEnvTrc.dwClsFlag = 0;
|
||||
Vector3 vStart = EC_Utility.ToVector3(pEnvTrc.vStart);
|
||||
Vector3 vExt = EC_Utility.ToVector3(pEnvTrc.vExt);
|
||||
Vector3 vDelta = EC_Utility.ToVector3(pEnvTrc.vDelta);
|
||||
Vector3 vTerStart = EC_Utility.ToVector3(pEnvTrc.vTerStart);
|
||||
Vector3 dir = Vector3.zero;
|
||||
|
||||
if ((pEnvTrc.dwCheckFlag & CDR_EVN.CDR_BRUSH) == CDR_EVN.CDR_BRUSH)
|
||||
{
|
||||
BrushTraceInfo bruInfo = new BrushTraceInfo();
|
||||
bruInfo.Init(pEnvTrc.vStart, pEnvTrc.vDelta, pEnvTrc.vExt);
|
||||
if (AABBCollideWithBrush(ref bruInfo))
|
||||
dir = vStart + vDelta;
|
||||
if (Physics.BoxCast(vStart, vExt, dir, out RaycastHit hit, Quaternion.identity, vDelta.magnitude, 1 << 7))
|
||||
{
|
||||
pEnvTrc.fFraction = bruInfo.fFraction;
|
||||
pEnvTrc.vHitNormal = bruInfo.ClipPlane.GetNormal();
|
||||
pEnvTrc.bStartSolid = bruInfo.bStartSolid;
|
||||
pEnvTrc.fFraction = (hit.distance - vExt.x) / vDelta.magnitude;
|
||||
pEnvTrc.vHitNormal = EC_Utility.ToA3DVECTOR3(hit.normal);
|
||||
pEnvTrc.dwClsFlag = CDR_EVN.CDR_BRUSH;
|
||||
}
|
||||
else
|
||||
{
|
||||
pEnvTrc.fFraction = 1f;
|
||||
}
|
||||
}
|
||||
if ((pEnvTrc.dwCheckFlag & CDR_EVN.CDR_TERRAIN) == CDR_EVN.CDR_TERRAIN)
|
||||
{
|
||||
float fFraction = 0f;
|
||||
A3DVECTOR3 vTerNormal = new A3DVECTOR3();
|
||||
bool bStart = false;
|
||||
if (CollideWithTerrain(pEnvTrc.vTerStart, pEnvTrc.vDelta, ref fFraction, ref vTerNormal, ref bStart)
|
||||
&& (fFraction < pEnvTrc.fFraction))
|
||||
float fFractionTerrain = 0f;
|
||||
dir = vDelta;
|
||||
if (Physics.Raycast(vTerStart, dir.normalized, out RaycastHit hit, vDelta.magnitude, 1<<6))
|
||||
{
|
||||
//assert(fFraction >= 0.0f);
|
||||
//pEnvTrc.fFraction = a_Max(0.0f, fFraction - 1E-4f);
|
||||
pEnvTrc.fFraction = fFraction;
|
||||
pEnvTrc.vHitNormal = vTerNormal;
|
||||
pEnvTrc.bStartSolid = bStart;
|
||||
fFractionTerrain = (hit.distance) / vDelta.magnitude;
|
||||
pEnvTrc.vHitNormal = EC_Utility.ToA3DVECTOR3(hit.normal);
|
||||
pEnvTrc.dwClsFlag = CDR_EVN.CDR_TERRAIN;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fFractionTerrain = 1f;
|
||||
}
|
||||
if(fFractionTerrain < pEnvTrc.fFraction)
|
||||
{
|
||||
pEnvTrc.fFraction = fFractionTerrain;
|
||||
}
|
||||
}
|
||||
|
||||
if ((pEnvTrc.dwCheckFlag & CDR_EVN.CDR_WATER) == CDR_EVN.CDR_WATER)
|
||||
@@ -156,46 +166,6 @@ namespace BrewMonster
|
||||
return (pEnvTrc.fFraction < 1.0f + 1E-4f);
|
||||
}
|
||||
|
||||
// == Thay CollideWithEnv (C++) bằng BoxCast ==
|
||||
//static bool CollideWithEnv_BoxCast(Vector3 vStart, Vector3 vDelta, Vector3 vExt,
|
||||
// LayerMask mask,
|
||||
// out RaycastHit hit, out float fFraction, out Vector3 vHitNormal, out bool bStartSolid,
|
||||
// float skin = 0.01f)
|
||||
//{
|
||||
// hit = default;
|
||||
// vHitNormal = Vector3.up;
|
||||
// bStartSolid = false;
|
||||
// fFraction = 0.0f;
|
||||
|
||||
// float dist = vDelta.magnitude;
|
||||
// if (dist <= 1e-6f) return false;
|
||||
|
||||
// var hasHit = Physics.Raycast(vStart, vDelta,out hit, dist, mask);
|
||||
// if (hasHit)
|
||||
// {
|
||||
// bStartSolid = true;
|
||||
// fFraction = (t - 5E-4f) / vDelta.Normalize();
|
||||
// return true;
|
||||
// }
|
||||
// // start-in-solid
|
||||
// var overlapped = Physics.OverlapBox(vStart, vExt - Vector3.one * skin, Quaternion.identity, mask, QueryTriggerInteraction.Ignore);
|
||||
// if (overlapped != null && overlapped.Length > 0)
|
||||
// {
|
||||
// bStartSolid = true;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// // sweep AABB
|
||||
// Vector3 dir = vDelta / Mathf.Max(dist, 1e-6f);
|
||||
// if (Physics.BoxCast(vStart, vExt - Vector3.one * skin, dir, out hit, Quaternion.identity, dist, mask, QueryTriggerInteraction.Ignore))
|
||||
// {
|
||||
// fFraction = Mathf.Clamp01(hit.distance / Mathf.Max(dist, 1e-6f));
|
||||
// vHitNormal = hit.normal;
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
|
||||
// == Thay RetrieveSupportPlane (C++) bằng Raycast xuống ==
|
||||
static bool DoGroundProbe(Vector3 vStart, Vector3 vExt, float fDeltaY, LayerMask mask,
|
||||
out Vector3 vEnd, out Vector3 vHitNormal, out bool bSupport,
|
||||
@@ -280,6 +250,10 @@ namespace BrewMonster
|
||||
int nTry = 0;
|
||||
LayerMask mask = UsedMask_Ground();
|
||||
|
||||
env_trace_t trcInfo = new env_trace_t();
|
||||
trcInfo.dwCheckFlag = CDR_EVN.CDR_TERRAIN | CDR_EVN.CDR_BRUSH;
|
||||
trcInfo.vExt = CDRInfo.vExtent;
|
||||
|
||||
while (nTry < 1)
|
||||
{
|
||||
vDelta = vVelocity * fTime;
|
||||
@@ -290,41 +264,33 @@ namespace BrewMonster
|
||||
//bool hasHit = CollideWithEnv_BoxCast(vStart, vDelta, vExt, mask,
|
||||
// out RaycastHit hit, out float fFraction, out Vector3 hitNormal, out bool bStartSolid);
|
||||
Vector3 posFoot = vStart - Vector3.up * vExt.y;
|
||||
//if (Physics.BoxCast(vStart, vExt, (vStart + Vector3.down).normalized, out RaycastHit hit1, Quaternion.identity, vExt.y, mask))
|
||||
//{
|
||||
// if (hit1.point.y > posFoot.y)
|
||||
// {
|
||||
// Debug.LogError("hit.point.y > posFoot.y");
|
||||
// posFoot.y = hit1.point.y;
|
||||
// }
|
||||
//}
|
||||
if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out RaycastHit hit1, vExt.y, mask))
|
||||
if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out RaycastHit hit, vExt.y, mask))
|
||||
{
|
||||
if (hit1.point.y > posFoot.y)
|
||||
if (hit.point.y > posFoot.y)
|
||||
{
|
||||
posFoot.y = hit1.point.y;
|
||||
posFoot.y = hit.point.y;
|
||||
}
|
||||
}
|
||||
bool bClear = !Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out RaycastHit hit, fDeltaDist, mask);
|
||||
|
||||
bool bClear = !Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out hit, fDeltaDist, mask);
|
||||
|
||||
//trcInfo.vStart = CDRInfo.vCenter;
|
||||
//trcInfo.vDelta = EC_Utility.ToA3DVECTOR3(vDelta);
|
||||
//trcInfo.vTerStart = EC_Utility.ToA3DVECTOR3(posFoot);
|
||||
////trcInfo.vTerStart.y -= vExt.y; //foot
|
||||
//bool bClear = !CollideWithEnv(ref trcInfo);
|
||||
nTry++;
|
||||
if (bClear)
|
||||
{
|
||||
Debug.DrawLine(posFoot, posFoot + vDelta, Color.yellow, 10f);
|
||||
//Debug.DrawLine(posFoot, posFoot + vDelta, Color.yellow, 10f);
|
||||
vFinalPos = vStart + vDelta;
|
||||
CDRInfo.fMoveDist += fDeltaDist;
|
||||
break;
|
||||
}
|
||||
//if (trcInfo.bStartSolid)
|
||||
//{
|
||||
// CDRInfo.fMoveDist = 0f;
|
||||
// if (CDRInfo.vTPNormal.y < CDRInfo.fSlopeThresh) CDRInfo.vTPNormal = Vector3.up;
|
||||
// return;
|
||||
//}
|
||||
vStart = hit.point + Vector3.up * vExt.y;
|
||||
//vStart += vDelta * trcInfo.fFraction + Vector3.up * vExt.y;
|
||||
|
||||
vFinalPos = vStart;
|
||||
//CDRInfo.fMoveDist += (fDeltaDist * fFraction);
|
||||
//fTime -= fTime * fFraction;
|
||||
//vNormal = hitNormal;
|
||||
|
||||
// Step-up (giữ tinh thần bản gốc)
|
||||
if (!bFreeFall && !bTryPull && !bJump)
|
||||
@@ -332,36 +298,38 @@ namespace BrewMonster
|
||||
//float skin = 0.01f;
|
||||
posFoot = vStart - Vector3.up * vExt.y + Vector3.up * CDRInfo.fStepHeight;
|
||||
Vector3 vStartUp = new Vector3(0f, CDRInfo.fStepHeight, 0f);
|
||||
//if (Physics.Raycast(vStart, (vStart + Vector3.down).normalized, out hit1, vExt.y, mask))
|
||||
//{
|
||||
// if (hit1.point.y > posFoot.y)
|
||||
// {
|
||||
// Debug.LogError("hit.point.y > posFoot.y");
|
||||
// posFoot.y = hit1.point.y + CDRInfo.fStepHeight;
|
||||
// }
|
||||
//}
|
||||
bPull = !Physics.Raycast(posFoot, (Vector3.up).normalized, out hit, CDRInfo.fStepHeight, mask);
|
||||
|
||||
//env_trace_t tmpInfo = new env_trace_t();
|
||||
//tmpInfo.vStart = EC_Utility.ToA3DVECTOR3(vStart);
|
||||
//tmpInfo.vDelta = new A3DVECTOR3(0.0f, CDRInfo.fStepHeight, 0.0f);
|
||||
//tmpInfo.vExt = CDRInfo.vExtent;
|
||||
////@note : need check terrain?? By Kuiwu[8/10/2005]
|
||||
//tmpInfo.dwCheckFlag = CDR_EVN.CDR_BRUSH | CDR_EVN.CDR_TERRAIN;
|
||||
//tmpInfo.vTerStart = EC_Utility.ToA3DVECTOR3(posFoot);
|
||||
//bPull = !CollideWithEnv(ref tmpInfo);
|
||||
|
||||
if (bPull)
|
||||
{
|
||||
vStart += Vector3.up * CDRInfo.fStepHeight;
|
||||
posFoot = vStart - Vector3.up * vExt.y;
|
||||
//Vector3 vDelta2 = vVelocity;
|
||||
bool bMove = !Physics.Raycast(posFoot, (posFoot + vVelocity).normalized, out hit, fDeltaDist, mask);
|
||||
|
||||
//tmpInfo.vStart = EC_Utility.ToA3DVECTOR3(vStart);
|
||||
//tmpInfo.vDelta = EC_Utility.ToA3DVECTOR3(vDelta);
|
||||
//tmpInfo.vTerStart = EC_Utility.ToA3DVECTOR3(posFoot);
|
||||
//bool bMove = !CollideWithEnv(ref tmpInfo);
|
||||
|
||||
if (!bMove)
|
||||
{
|
||||
//vDelta2 *= frac2;
|
||||
vFinalPos = hit.point + Vector3.up * vExt.y;
|
||||
//vFinalPos = vStart + vDelta * tmpInfo.fFraction + Vector3.up * vExt.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.DrawLine(vFinalPos, vFinalPos + vDelta, Color.red, 10f);
|
||||
vFinalPos += vDelta;
|
||||
}
|
||||
//if (vDelta2.sqrMagnitude < (vExt.x * vExt.x * 4f))
|
||||
//{
|
||||
// vStart -= Vector3.up * CDRInfo.fStepHeight;
|
||||
// bPull = false;
|
||||
//}
|
||||
}
|
||||
bTryPull = true;
|
||||
}
|
||||
@@ -680,7 +648,7 @@ namespace BrewMonster
|
||||
vFinalPos = new A3DVECTOR3(vStart);
|
||||
int nTry = 0;
|
||||
bool bClear = true;
|
||||
env_trace_t trcInfo;
|
||||
env_trace_t trcInfo = new env_trace_t();
|
||||
trcInfo.bWaterSolid = true;
|
||||
trcInfo.dwCheckFlag = CDR_EVN.CDR_TERRAIN | CDR_EVN.CDR_BRUSH | CDR_EVN.CDR_WATER;
|
||||
trcInfo.vExt = vExt;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CSNetwork.C2SCommand
|
||||
}
|
||||
|
||||
// Generic command serializationw
|
||||
public static Octets SerializeCommand<T>(CommandID cmdId, T command)
|
||||
public static Octets SerializeCommand<T>(CommandID cmdId, T command, bool writeLength = true)
|
||||
where T : struct
|
||||
{
|
||||
var octets = new Octets();
|
||||
@@ -29,7 +29,7 @@ namespace CSNetwork.C2SCommand
|
||||
WriteBasicValue(octets, (ushort)cmdId);
|
||||
|
||||
// Write command body
|
||||
WriteStruct(octets, command);
|
||||
WriteStruct(octets, command, writeLength);
|
||||
|
||||
return octets;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ namespace CSNetwork.C2SCommand
|
||||
return octets;
|
||||
}
|
||||
|
||||
private static void WriteStruct<T>(Octets octets, T value)
|
||||
private static void WriteStruct<T>(Octets octets, T value, bool writeLength=true)
|
||||
where T : struct
|
||||
{
|
||||
// Get fields of the struct
|
||||
@@ -99,7 +99,7 @@ namespace CSNetwork.C2SCommand
|
||||
}
|
||||
else if (fieldType.IsArray)
|
||||
{
|
||||
WriteArray(octets, (Array)fieldValue);
|
||||
WriteArray(octets, (Array)fieldValue, writeLength);
|
||||
}
|
||||
}
|
||||
else if (fieldType.IsEnum)
|
||||
@@ -187,7 +187,7 @@ namespace CSNetwork.C2SCommand
|
||||
octets.Insert(octets.Size, strBytes.AsSpan(0, length).ToArray());
|
||||
}
|
||||
|
||||
private static void WriteArray(Octets octets, Array array)
|
||||
private static void WriteArray(Octets octets, Array array, bool writeLength)
|
||||
{
|
||||
if (octets == null)
|
||||
return;
|
||||
@@ -197,7 +197,7 @@ namespace CSNetwork.C2SCommand
|
||||
return;
|
||||
}
|
||||
|
||||
if (array.Length > 1 )
|
||||
if (array.Length != 1 && writeLength)
|
||||
{
|
||||
WriteBasicValue(octets, array.Length);
|
||||
}
|
||||
@@ -686,6 +686,14 @@ namespace CSNetwork.C2SCommand
|
||||
|
||||
return octets;
|
||||
}
|
||||
public static Octets CreateEmoteActionCmd(int wPose)
|
||||
{
|
||||
cmd_emote_action pCmd = new cmd_emote_action()
|
||||
{
|
||||
action = (ushort)wPose
|
||||
};
|
||||
return SerializeCommand(CommandID.EMOTE_ACTION, pCmd);
|
||||
}
|
||||
|
||||
// TODO: Check orginal C++ implementation
|
||||
public static Octets CreateTaskNotifyCmd(byte[] pData, uint dwDataSize)
|
||||
@@ -700,7 +708,40 @@ namespace CSNetwork.C2SCommand
|
||||
size = dwDataSize,
|
||||
placeholder = pData
|
||||
};
|
||||
return SerializeCommand(CommandID.TASK_NOTIFY, cmd);
|
||||
return SerializeCommand( CommandID.TASK_NOTIFY, cmd, false);
|
||||
}
|
||||
|
||||
public static Octets CreateAutoTeamSetGoalCommand(int type, int goal_id, int op)
|
||||
{
|
||||
// int iSize = sizeof(cmd_header) + sizeof(cmd_auto_team_set_goal);
|
||||
// uint itemSize = (uint)Marshal.SizeOf<cmd_auto_team_set_goal>();
|
||||
// uint totalLen = contentSize + (uint)itemNum * itemSize;
|
||||
// BYTE* pBuf = (BYTE*)a_malloctemp(iSize);
|
||||
// if(!pBuf) return;
|
||||
//
|
||||
// ((cmd_header*)pBuf)->cmd = C2S::AUTO_TEAM_SET_GOAL;
|
||||
//
|
||||
// cmd_auto_team_set_goal pCmd = (cmd_auto_team_set_goal*)(pBuf + sizeof(cmd_header));
|
||||
cmd_auto_team_set_goal pCmd = new cmd_auto_team_set_goal()
|
||||
{
|
||||
goal_type = type,
|
||||
goal_id = goal_id,
|
||||
op = op
|
||||
};
|
||||
|
||||
//
|
||||
// g_pGame->GetGameSession()->SendGameData(pBuf, iSize);
|
||||
//
|
||||
// a_freetemp(pBuf);
|
||||
// var cmd = new CMD_GetAllData
|
||||
// {
|
||||
// byPack = Convert.ToByte(byPack),
|
||||
// byEquip = Convert.ToByte(byEquip),
|
||||
// byTask = Convert.ToByte(byTask)
|
||||
// };
|
||||
|
||||
// Serialize the command and return the serialized data
|
||||
return SerializeCommand(CommandID.AUTO_TEAM_SET_GOAL, pCmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using BrewMonster;
|
||||
using BrewMonster.Network;
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster;
|
||||
|
||||
namespace CSNetwork
|
||||
{
|
||||
@@ -63,6 +64,11 @@ namespace CSNetwork
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
ECMSG msg = Instance.m_MsgList.Dequeue();
|
||||
if (!Instance.m_MsgHandlerList.ContainsKey(msg.iManager))
|
||||
{
|
||||
BMLogger.LogError("Did not find handler ID: " + msg.iManager);
|
||||
continue;
|
||||
}
|
||||
Instance.m_tempHandler = Instance.m_MsgHandlerList[msg.iManager];
|
||||
if (Instance.m_tempHandler != null)
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace CSNetwork
|
||||
public static int MSG_PM_PLAYERSITDOWN = 369; // Player sit down / stand up
|
||||
public const int MSG_PM_PLAYERATKRESULT = 370; // Player attack result
|
||||
public static int MSG_PM_PLAYEREXTSTATE = 371; // Player extend states changed
|
||||
public static int MSG_PM_PLAYERDOEMOTE = 372; // Player do emotion
|
||||
public const int MSG_PM_PLAYERDOEMOTE = 372; // Player do emotion
|
||||
public static int MSG_PM_PLAYERUSEITEM = 373; // Player use item
|
||||
public static int MSG_PM_PLAYERCUSTOM = 374; // Player custom data
|
||||
public static int MSG_PM_ENCHANTRESULT = 375; // Enchant result
|
||||
|
||||
@@ -1390,6 +1390,26 @@ namespace CSNetwork.GPDataType
|
||||
Marshal.FreeHGlobal(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
public static T FromBytes<T>(byte[] data, ref long startIndex) where T : struct
|
||||
{
|
||||
int size = Marshal.SizeOf<T>();
|
||||
if (data.Length - startIndex < size)
|
||||
throw new ArgumentException("Buffer không đủ dữ liệu");
|
||||
|
||||
IntPtr ptr = Marshal.AllocHGlobal(size);
|
||||
try
|
||||
{
|
||||
Marshal.Copy(data, (int)startIndex, ptr, size);
|
||||
startIndex += size;
|
||||
return Marshal.PtrToStructure<T>(ptr);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
public static T FromBytes<T>(byte[] data, bool force, int startIndex = 0) where T : struct
|
||||
{
|
||||
int size = Marshal.SizeOf<T>();
|
||||
@@ -1822,9 +1842,15 @@ namespace CSNetwork.GPDataType
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_modify_title_notify
|
||||
{
|
||||
public ushort id;
|
||||
public int expiretime;
|
||||
public char flag;
|
||||
public ushort id;
|
||||
public int expiretime;
|
||||
public char flag;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct cmd_emote_action
|
||||
{
|
||||
public ushort action;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
@@ -1884,5 +1910,31 @@ namespace CSNetwork.GPDataType
|
||||
public int vigour;
|
||||
public ROLEEXTPROP prop;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_auto_team_set_goal
|
||||
{
|
||||
public int goal_type; // 0 unknown, 1 task, 2 Activity
|
||||
public int op;
|
||||
public int goal_id;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_object_do_emote
|
||||
{
|
||||
public int id;
|
||||
public ushort emotion;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct cmd_task_deliver_item
|
||||
{
|
||||
public int type;
|
||||
public int expire_date;
|
||||
public uint amount;
|
||||
public uint slot_amount;
|
||||
public byte where; //���ĸ���������0 ����2 ����1 װ��
|
||||
public byte index; //��ַ����ĸ�λ��
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -352,6 +352,13 @@ namespace CSNetwork
|
||||
OnPrtcPlayerBaseInfoRe(protocol);
|
||||
break;
|
||||
case ProtocolType.PROTOCOL_GETUICONFIG_RE: OnPrtcGetConfigRe(protocol); break;
|
||||
case ProtocolType.PROTOCOL_AUTOTEAMSETGOAL_RE:
|
||||
{
|
||||
// CECAutoTeam pAutoTeam = CECGameRun.Instance.GetHostPlayer().GetAutoTeam();
|
||||
// if( pAutoTeam !=null)
|
||||
// pAutoTeam.OnPrtcAutoTeamSetGoalRe((AutoTeamSetGoal_Re)protocol);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_logger.Log(LogType.Warning, $"Received unhandled protocol type: {protocol.GetPType()}");
|
||||
break;
|
||||
@@ -496,6 +503,8 @@ namespace CSNetwork
|
||||
break;
|
||||
case CommandID.PICKUP_ITEM:
|
||||
case CommandID.HOST_OBTAIN_ITEM:
|
||||
// case CommandID.PRODUCE_ONCE:
|
||||
case CommandID.TASK_DELIVER_ITEM:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PICKUPITEM, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
@@ -733,6 +742,10 @@ namespace CSNetwork
|
||||
case CommandID.OWN_EXT_PROP:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_OWNEXTPROP, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.OBJECT_DO_EMOTE:
|
||||
case CommandID.OBJECT_EMOTE_RESTORE:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERDOEMOTE, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1311,11 +1324,17 @@ namespace CSNetwork
|
||||
iCount += iNumSend;
|
||||
}
|
||||
}
|
||||
|
||||
public void c2s_SendCmdEmoteAction(uint wPose)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
gamedatasend.Data = C2SCommandFactory.CreateEmoteActionCmd((int)wPose);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
public void c2s_SendCmdTaskNotify(byte[] pData, uint dwDataSize)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
gamedatasend.Data = C2SCommandFactory.CreateTaskNotifyCmd(pData, dwDataSize);
|
||||
gamedatasend.Data = C2SCommandFactory.CreateTaskNotifyCmd( pData, dwDataSize);
|
||||
BMLogger.Log($"[MH Task] c2s_SendCmdTaskNotify Command ID : {pData[0]} Size: {dwDataSize}");
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
@@ -1325,5 +1344,12 @@ namespace CSNetwork
|
||||
gamedatasend.Data = C2SCommandFactory.CreateNakeCmd(C2SCommand.CommandID.STAND_UP);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
public void c2s_SendCmdAutoTeamSetGoal(int type, int goal_id, int op)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
gamedatasend.Data = C2SCommandFactory.CreateAutoTeamSetGoalCommand(type,goal_id, op);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
namespace CSNetwork.Protocols
|
||||
{
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class AutoTeamSetGoal_Re : Protocol
|
||||
{
|
||||
public int roleid { get; set; }
|
||||
public int goal_type { get; set; }
|
||||
public int op { get; set; }
|
||||
public int goal_id { get; set; }
|
||||
public int retcode { get; set; }
|
||||
public int localsid { get; set; }
|
||||
|
||||
public AutoTeamSetGoal_Re() : base(ProtocolType.PROTOCOL_AUTOTEAMSETGOAL_RE)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override Protocol Clone() => new AutoTeamSetGoal_Re
|
||||
{
|
||||
roleid = roleid,
|
||||
goal_type = goal_type,
|
||||
op = op,
|
||||
goal_id = goal_id,
|
||||
retcode = retcode,
|
||||
localsid = localsid
|
||||
};
|
||||
|
||||
public override void Marshal(OctetsStream os)
|
||||
{
|
||||
os.Write(roleid);
|
||||
os.Write(goal_type);
|
||||
os.Write(op);
|
||||
os.Write(goal_id);
|
||||
os.Write(retcode);
|
||||
os.Write(localsid);
|
||||
}
|
||||
|
||||
public override void Unmarshal(OctetsStream os)
|
||||
{
|
||||
roleid = os.ReadInt32();
|
||||
goal_type = os.ReadInt32();
|
||||
op = os.ReadInt32();
|
||||
goal_id = os.ReadInt32();
|
||||
retcode = os.ReadInt32();
|
||||
localsid = os.ReadInt32();
|
||||
}
|
||||
|
||||
public override int PriorPolicy() => 1;
|
||||
|
||||
public override bool SizePolicy(int size) => size <= 32;
|
||||
|
||||
public override string ToString => $" Type={Type}"; // - CMD_ID: {Enum.GetName(typeof(CommandID), BitConverter.ToUInt16(Data.ByteArray.Take(2).ToArray()))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e2c269d6707b37478238369cf01884f
|
||||
@@ -166,7 +166,19 @@ namespace CSNetwork.Protocols
|
||||
private static bool ValidateProtocol(uint type, uint size)
|
||||
{
|
||||
var stub = _protocolMap.GetValueOrDefault(type);
|
||||
return stub != null && size <= MaxProtocolSize;
|
||||
if (stub == null)
|
||||
{
|
||||
_logger.Warning($"ValidateProtocol: Protocol type {type} not found. Returning false.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (size > MaxProtocolSize)
|
||||
{
|
||||
_logger.Warning($"ValidateProtocol: Protocol type {type} size {size} is greater than MaxProtocolSize {MaxProtocolSize}. Returning false.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private const int MaxProtocolSize = 16 * 1024 * 1024; // 16MB max size
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CSNetwork.Protocols
|
||||
{
|
||||
public class getcustomdata_re : Protocol
|
||||
{
|
||||
public int Result { get; set; }
|
||||
public int Roleid { get; set; }
|
||||
public int Localsid { get; set; }
|
||||
public Octets UiConfig { get; set; }
|
||||
|
||||
public int retcode { get; set; }
|
||||
public int roleid { get; set; }
|
||||
public uint localsid { get; set; }
|
||||
public uint cus_roleid { get; set; }
|
||||
public Octets customdata {get; set;}
|
||||
|
||||
public getcustomdata_re() : base(ProtocolType.PROTOCOL_GETCUSTOMDATA_RE)
|
||||
{
|
||||
customdata = new Octets();
|
||||
}
|
||||
|
||||
public override Protocol Clone() => new getcustomdata_re
|
||||
{
|
||||
retcode = retcode,
|
||||
roleid = roleid,
|
||||
localsid = localsid,
|
||||
cus_roleid = cus_roleid,
|
||||
customdata = customdata
|
||||
};
|
||||
|
||||
public override void Marshal(OctetsStream os)
|
||||
{
|
||||
os.Write(retcode);
|
||||
os.Write(roleid);
|
||||
os.Write(localsid);
|
||||
os.Write(cus_roleid);
|
||||
os.Write(customdata);
|
||||
}
|
||||
|
||||
public override void Unmarshal(OctetsStream os)
|
||||
{
|
||||
retcode = os.ReadInt32();
|
||||
roleid = os.ReadInt32();
|
||||
localsid = os.ReadUInt32();
|
||||
cus_roleid = os.ReadUInt32();
|
||||
customdata = os.ReadOctets();
|
||||
}
|
||||
|
||||
public override int PriorPolicy() => 1;
|
||||
|
||||
public override bool SizePolicy(int size) => size <= 4096;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fa7e46f896407f499da351c8772b6d2
|
||||
@@ -343,11 +343,20 @@ namespace BrewMonster.Network
|
||||
Instance._gameSession.c2s_SendCmdGetAllData(byPack, byEquip, byTask);
|
||||
}
|
||||
|
||||
public static void c2s_CmdEmoteAction(uint wPose)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdEmoteAction(wPose);
|
||||
}
|
||||
public static void c2s_CmdTaskNotify( byte[] pBuf, uint sz)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdTaskNotify( pBuf, sz);
|
||||
}
|
||||
|
||||
public static void c2s_CmdAutoTeamSetGoal(int type, int goal_id, int op)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdAutoTeamSetGoal(type, goal_id, op);//{ ::c2s_SendCmdAutoTeamSetGoal(type, goal_id, op); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static void GetRoleBaseInfo(int iNumRole, List<int> aRoleIDs)
|
||||
@@ -363,6 +372,7 @@ namespace BrewMonster.Network
|
||||
|
||||
public void LoadScene(string sceneName, LoadSceneMode mode, Action<bool> actDone)
|
||||
{
|
||||
// SceneLoadService.Load(sceneName, mode, actDone);
|
||||
StartCoroutine(LoadSceneCoroutine(sceneName, mode, actDone));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@ using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace PerfectWorld.Scripts
|
||||
{
|
||||
public class CECMatter : CECObject, IPointerDownHandler
|
||||
public class CECMatter : CECObject
|
||||
{
|
||||
// Matter information got from server
|
||||
public struct INFO
|
||||
@@ -40,6 +39,10 @@ namespace PerfectWorld.Scripts
|
||||
{
|
||||
var matterType = matterData.GetType();
|
||||
var fileMatterField = matterType.GetField("file_matter", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
if (fileMatterField == null)
|
||||
{
|
||||
fileMatterField = matterType.GetField("file_model", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
if (fileMatterField != null)
|
||||
{
|
||||
@@ -59,7 +62,7 @@ namespace PerfectWorld.Scripts
|
||||
if (matterObject.GetComponent<Collider>() == null)
|
||||
{
|
||||
var collider = matterObject.AddComponent<BoxCollider>();
|
||||
collider.size = matterObject.GetComponentInChildren<MeshRenderer>().bounds.size;
|
||||
collider.size = matterObject.GetComponentInChildren<Renderer>().bounds.size;
|
||||
}
|
||||
|
||||
// Create text object to display item name above the cube
|
||||
@@ -89,10 +92,49 @@ namespace PerfectWorld.Scripts
|
||||
return null;
|
||||
}
|
||||
|
||||
public void OnPointerDown(PointerEventData eventData)
|
||||
private new void Update()
|
||||
{
|
||||
Debug.Log($"CECMatter::OnPointerDown():: mid: {m_MatterInfo.mid}");
|
||||
UnityGameSession.RequestPickupItem(m_MatterInfo.mid, m_MatterInfo.tid);
|
||||
bool inputPressed = false;
|
||||
Vector2 screenPosition = Vector2.zero;
|
||||
|
||||
// Check for touch input (mobile)
|
||||
if (Input.touchCount > 0)
|
||||
{
|
||||
Touch touch = Input.GetTouch(0);
|
||||
if (touch.phase == TouchPhase.Began)
|
||||
{
|
||||
inputPressed = true;
|
||||
screenPosition = touch.position;
|
||||
}
|
||||
}
|
||||
// Check for mouse input (desktop)
|
||||
else if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
inputPressed = true;
|
||||
screenPosition = Input.mousePosition;
|
||||
}
|
||||
|
||||
if (inputPressed)
|
||||
{
|
||||
Camera mainCamera = Camera.main;
|
||||
if (mainCamera == null)
|
||||
return;
|
||||
|
||||
Ray ray = mainCamera.ScreenPointToRay(screenPosition);
|
||||
|
||||
RaycastHit[] hits = Physics.RaycastAll(ray);
|
||||
|
||||
foreach (RaycastHit hit in hits)
|
||||
{
|
||||
if (hit.collider.gameObject == this.gameObject ||
|
||||
hit.collider.transform.IsChildOf(this.transform))
|
||||
{
|
||||
Debug.Log($"CECMatter::RaycastHit():: mid: {m_MatterInfo.mid}");
|
||||
UnityGameSession.RequestPickupItem(m_MatterInfo.mid, m_MatterInfo.tid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -778,20 +778,154 @@ namespace BrewMonster
|
||||
{
|
||||
return m_iSCType;
|
||||
}
|
||||
//public abstract CECShortcut Clone();
|
||||
|
||||
public virtual CECShortcut Clone()
|
||||
{
|
||||
return new CECShortcut();
|
||||
}
|
||||
public virtual bool Execute() { return true; }
|
||||
}
|
||||
|
||||
/* public class CECSCCommand : CECShortcut
|
||||
{
|
||||
public const int CMD_PLAYPOSE = 1; // Example constant
|
||||
public override ShortcutType GetType() => ShortcutType.SCT_COMMAND;
|
||||
public override CECShortcut Clone() => null;
|
||||
public int GetCommandID() => 0;
|
||||
public int GetParam() => 0;
|
||||
}
|
||||
public class CECSCCommand : CECShortcut
|
||||
{
|
||||
private int m_iCommand; // Command ID
|
||||
private uint m_dwParam; // Parameter
|
||||
public enum CommandID
|
||||
{
|
||||
CMD_UNKNOWN = -1,
|
||||
CMD_SITDOWN = 0,
|
||||
CMD_WALKRUN,
|
||||
CMD_NORMALATTACK,
|
||||
CMD_FINDTARGET,
|
||||
CMD_ASSISTATTACK,
|
||||
CMD_INVITETOTEAM,
|
||||
CMD_LEAVETEAM,
|
||||
CMD_KICKTEAMMEM,
|
||||
CMD_FINDTEAM,
|
||||
CMD_STARTTRADE,
|
||||
CMD_SELLBOOTH,
|
||||
CMD_BUYBOOTH,
|
||||
CMD_PLAYPOSE,
|
||||
CMD_INVITETOFACTION,
|
||||
CMD_FLY,
|
||||
CMD_PICKUP,
|
||||
CMD_GATHER,
|
||||
CMD_RUSHFLY,
|
||||
CMD_BINDBUDDY,
|
||||
}
|
||||
public CECSCCommand(int iCommand)
|
||||
{
|
||||
m_iSCType = (int)ShortcutType.SCT_COMMAND;
|
||||
m_iCommand = iCommand;
|
||||
m_dwParam = 0;
|
||||
}
|
||||
|
||||
public class CECSCSkill : CECShortcut
|
||||
public CECSCCommand(CECSCCommand src)
|
||||
{
|
||||
m_iCommand = src.m_iCommand;
|
||||
m_dwParam = src.m_dwParam;
|
||||
}
|
||||
public const int CMD_PLAYPOSE = 1; // Example constant
|
||||
// public override ShortcutType GetType() => ShortcutType.SCT_COMMAND;
|
||||
public override CECShortcut Clone() => new CECSCCommand(this);
|
||||
public int GetCommandID() => 0;
|
||||
public int GetParam() => 0;
|
||||
|
||||
// Set / Get command parameter
|
||||
public void SetParam(uint dwParam) { m_dwParam = dwParam; }
|
||||
|
||||
// Execute shortcut
|
||||
public override bool Execute()
|
||||
{
|
||||
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
|
||||
if (!pHost || !pHost.IsAllResReady())
|
||||
return false;
|
||||
|
||||
// if (GetCoolTime(0)>0)
|
||||
// {
|
||||
// bool bForbidCmd = true;
|
||||
// if (m_iCommand == CMD_RUSHFLY && pHost.GetRushFlyFlag())
|
||||
// bForbidCmd = false;
|
||||
//
|
||||
// if (bForbidCmd)
|
||||
// {
|
||||
// g_pGame->GetGameRun()->AddFixedMessage(FIXMSG_CMD_INCOOLTIME);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
switch (m_iCommand)
|
||||
{
|
||||
// case CMD_SITDOWN: pHost->CmdSitDown(!pHost->IsSitting()); break;
|
||||
// case CMD_WALKRUN: pHost->CmdWalkRun(!pHost->GetWalkRunFlag()); break;
|
||||
// case CMD_NORMALATTACK: pHost->CmdNormalAttack(); break;
|
||||
// case CMD_FINDTARGET: pHost->CmdFindTarget(); break;
|
||||
// case CMD_ASSISTATTACK: pHost->CmdAssistAttack(); break;
|
||||
// case CMD_INVITETOTEAM: pHost->CmdInviteToTeam(); break;
|
||||
// case CMD_LEAVETEAM: pHost->CmdLeaveTeam(); break;
|
||||
// case CMD_KICKTEAMMEM: pHost->CmdKickTeamMember(); break;
|
||||
// case CMD_FINDTEAM: pHost->CmdFindTeam(); break;
|
||||
// case CMD_STARTTRADE: pHost->CmdStartTrade(); break;
|
||||
// case CMD_SELLBOOTH: pHost->CmdSellBooth(); break;
|
||||
// case CMD_BUYBOOTH: pHost->CmdBuyBooth(); break;
|
||||
case (int)CommandID.CMD_PLAYPOSE: pHost.CmdStartPose((int)m_dwParam); break;
|
||||
// case CMD_INVITETOFACTION: pHost->CmdInviteToFaction(); break;
|
||||
// case CMD_FLY:
|
||||
// {
|
||||
// // Èç¹ûÆï³ËÒª·ÉÐУ¬ÔòÕâЩ action switcher£¬·ñÔò CmdFly
|
||||
// if (!pHost->GetActionSwitcher() || !pHost->GetActionSwitcher()->OnRideToFlyAction())
|
||||
// pHost->CmdFly();
|
||||
// break;
|
||||
// }
|
||||
// case CMD_PICKUP: pHost->CmdPickup(); break;
|
||||
// case CMD_GATHER: pHost->CmdGather(); break;
|
||||
// case CMD_RUSHFLY: pHost->CmdRushFly(); break;
|
||||
// case CMD_BINDBUDDY: pHost->CmdBindBuddy(pHost->GetSelectedTarget()); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get item cool time
|
||||
int GetCoolTime(ref int piMax/* NULL */)
|
||||
{
|
||||
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
|
||||
int iTime = 0;
|
||||
|
||||
switch ((CommandID)m_iCommand)
|
||||
{
|
||||
case CommandID.CMD_RUSHFLY:
|
||||
|
||||
// iTime = pHost.GetCoolTime(GP_CT_FLY_RUSH, piMax);
|
||||
break;
|
||||
|
||||
case CommandID.CMD_PLAYPOSE:
|
||||
// todo need to get cooldown here
|
||||
// iTime = pHost.GetCoolTime(GP_CT_EMOTE, piMax);
|
||||
break;
|
||||
|
||||
case CommandID.CMD_BINDBUDDY:
|
||||
{
|
||||
// CECCounter& cnt = pHost->GetBindCmdCoolCnt();
|
||||
// iTime = cnt.GetPeriod() - cnt.GetCounter();
|
||||
//
|
||||
// if (piMax)
|
||||
// *piMax = cnt.GetPeriod();
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
// if (piMax) *piMax = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return iTime;
|
||||
}
|
||||
}
|
||||
|
||||
/* public class CECSCSkill : CECShortcut
|
||||
{
|
||||
private CECSkill m_pSkill;
|
||||
public override ShortcutType GetType() => ShortcutType.SCT_SKILL;
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
using BrewMonster.Network;
|
||||
using CSNetwork.GPDataType;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class CECAutoTeam
|
||||
{
|
||||
public const float TASK_TEAM_DISTANCE = 300.0f;
|
||||
public enum AutoTeamType
|
||||
{
|
||||
TYPE_UNKNOWN,
|
||||
TYPE_TASK,
|
||||
TYPE_ACTIVITY,
|
||||
}
|
||||
|
||||
protected int m_iType; // Auto team type
|
||||
protected int m_iCurGoal; // For task-based teams: task ID; otherwise activity/event ID
|
||||
protected A3DVECTOR3 m_vTaskPos; // In task teams: player position
|
||||
protected CECCounter m_cntCancel;
|
||||
|
||||
// CECAutoTeam::CECAutoTeam()
|
||||
// {
|
||||
// m_iType = TYPE_UNKNOWN;
|
||||
// m_iCurGoal = 0;
|
||||
// m_vTaskPos.Clear();
|
||||
// m_cntCancel.SetPeriod(500);
|
||||
// m_cntCancel.Reset();
|
||||
// }
|
||||
|
||||
public void Tick(float dwDeltaTime)
|
||||
{
|
||||
if (m_iType == (int)AutoTeamType.TYPE_TASK && m_iCurGoal>0 && m_cntCancel.IncCounter(dwDeltaTime))
|
||||
{
|
||||
A3DVECTOR3 vPos = CECGameRun.Instance.GetHostPlayer().GetPos();
|
||||
var target = m_vTaskPos - vPos;
|
||||
if (target.MagnitudeH() > TASK_TEAM_DISTANCE)
|
||||
{
|
||||
m_vTaskPos = vPos;
|
||||
Cancel((int)AutoTeamType.TYPE_TASK);
|
||||
}
|
||||
m_cntCancel.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
public bool DoAutoTeam(int type, int iGoalID)
|
||||
{
|
||||
// if(EC_Game.GetGameRun().GetHostPlayer().GetTeam())
|
||||
// return false;
|
||||
//todo need to get bAutoTeamForTask
|
||||
var bAutoTeamForTask = 1;
|
||||
if( type == (int)AutoTeamType.TYPE_TASK && bAutoTeamForTask<=0)//&& !g_pGame->GetConfigs()->GetGameSettings().bAutoTeamForTask
|
||||
return false;
|
||||
|
||||
// Èç¹ûÕýÔÚ½øÐл×é¶ÓÇëÇó£¬ÔòºöÂÔÆäËûÇëÇó
|
||||
//todo need to get m_iCurGoal
|
||||
if( m_iType == (int)AutoTeamType.TYPE_TASK && m_iCurGoal>0)// && m_iCurGoal
|
||||
return false;
|
||||
|
||||
// ¼Ç¼´ËʱµÄλÖÃ
|
||||
if( type == (int)AutoTeamType.TYPE_TASK )
|
||||
m_vTaskPos = EC_Game.GetGameRun().GetHostPlayer().GetPos();
|
||||
|
||||
if( m_iType == type && m_iCurGoal == iGoalID )
|
||||
return false;
|
||||
|
||||
UnityGameSession.c2s_CmdAutoTeamSetGoal(type, iGoalID, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Cancel(int type)
|
||||
{
|
||||
if (m_iType == type && m_iCurGoal>0)
|
||||
UnityGameSession.c2s_CmdAutoTeamSetGoal(type, m_iCurGoal, 0);
|
||||
}
|
||||
|
||||
// public void OnPrtcAutoTeamSetGoalRe(Protocol p)
|
||||
// {
|
||||
// enum
|
||||
// {
|
||||
// ERR_INVALID_GOAL = -1,
|
||||
// ERR_INVALID_ROLE_STATUS = -2,
|
||||
// };
|
||||
//
|
||||
// using namespace GNET;
|
||||
// AutoTeamSetGoal_Re* pProto = (AutoTeamSetGoal_Re*)p;
|
||||
// if( pProto->retcode == 0 )
|
||||
// {
|
||||
// if( pProto->op == 1 )
|
||||
// {
|
||||
// m_iType = (int)pProto->goal_type;
|
||||
// m_iCurGoal = pProto->goal_id;
|
||||
//
|
||||
// if( pProto->goal_type == TYPE_ACTIVITY )
|
||||
// GetGameUIMan()->AddChatMessage(GetGameUIMan()->GetStringFromTable(10864), GP_CHAT_MISC);
|
||||
//
|
||||
// // ¸üнçÃæ
|
||||
// CDlgActivity* pDlg = dynamic_cast<CDlgActivity*>(GetGameUIMan()->GetDialog("Win_Activity"));
|
||||
// if( pDlg ) pDlg->UpdateActivityList(true);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if( pProto->goal_type == TYPE_ACTIVITY )
|
||||
// {
|
||||
// if( pProto->op == 1 && pProto->retcode == ERR_INVALID_GOAL )
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(10860), MB_OK, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// else if( pProto->op == 0 && pProto->retcode == ERR_INVALID_ROLE_STATUS )
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(10861), MB_OK, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// void CECAutoTeam::OnPrtcPlayerLeave(GNET::Protocol* p)
|
||||
// {
|
||||
// enum
|
||||
// {
|
||||
// REASON_COMPOSE_TEAM = 0,
|
||||
// REASON_INVALID_STATUS,
|
||||
// REASON_PLAYER_OP,
|
||||
// REASON_JOIN_TEAM,
|
||||
// REASON_TIMEOUT,
|
||||
// };
|
||||
//
|
||||
// using namespace GNET;
|
||||
// AutoTeamPlayerLeave* pProto = (AutoTeamPlayerLeave*)p;
|
||||
// if( m_iType == TYPE_ACTIVITY )
|
||||
// {
|
||||
// switch(pProto->reason)
|
||||
// {
|
||||
// case REASON_INVALID_STATUS:
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(10862), MB_OK, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// break;
|
||||
// case REASON_TIMEOUT:
|
||||
// GetGameUIMan()->AddChatMessage(GetGameUIMan()->GetStringFromTable(10863), GP_CHAT_MISC);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// m_iCurGoal = 0;
|
||||
// m_iType = TYPE_UNKNOWN;
|
||||
//
|
||||
// // ¸üнçÃæ
|
||||
// CDlgActivity* pDlg = dynamic_cast<CDlgActivity*>(GetGameUIMan()->GetDialog("Win_Activity"));
|
||||
// if( pDlg ) pDlg->UpdateActivityList(true);
|
||||
// }
|
||||
//
|
||||
// void CECAutoTeam::OnWorldChanged()
|
||||
// {
|
||||
// if( !IsMatchingForActivity() )
|
||||
// return;
|
||||
//
|
||||
// bool bFound = false;
|
||||
// int world_id = g_pGame->GetGameRun()->GetWorld()->GetInstanceID();
|
||||
// for( size_t i=0;i<CECUIConfig::Instance().GetGameUI().nAutoTeamTransmitEnabledMap.size();i++ )
|
||||
// {
|
||||
// if( world_id == CECUIConfig::Instance().GetGameUI().nAutoTeamTransmitEnabledMap[i] )
|
||||
// {
|
||||
// bFound = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if( !bFound )
|
||||
// {
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(10865), MB_OK, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// Cancel(TYPE_ACTIVITY);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// CECGameUIMan* CECAutoTeam::GetGameUIMan()
|
||||
// {
|
||||
// return g_pGame->GetGameRun()->GetUIManager()->GetInGameUIMan();
|
||||
// }
|
||||
//
|
||||
// CECGameSession* CECAutoTeam::GetGameSession()
|
||||
// {
|
||||
// return g_pGame->GetGameSession();
|
||||
// }
|
||||
//
|
||||
// CECHostPlayer* CECAutoTeam::GetHostPlayer()
|
||||
// {
|
||||
// return g_pGame->GetGameRun()->GetHostPlayer();
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c340e14ce1c73c409d397575cdf8029
|
||||
@@ -458,7 +458,7 @@ namespace BrewMonster
|
||||
string strName = Encoding.Unicode.GetString(roleBase.name.ByteArray);
|
||||
SetPlayerBriefInfo(roleBase.cls, roleBase.gender, strName);
|
||||
|
||||
EventBus.Publish(new NPCINFO(strName, 100,100, p.Roleid));
|
||||
EventBus.Publish(new CECHostPlayer.NPCINFO(strName, 100,100, p.Roleid));
|
||||
|
||||
BMLogger.Log($"SetPlayerModel: {roleBase.cls} {roleBase.gender}");
|
||||
await SetPlayerModel((byte)roleBase.cls, (byte)roleBase.gender);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3ad7cd15f37d924f824fbd72715dd2f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class LoadingSceneController : MonoSingleton<LoadingSceneController>
|
||||
{
|
||||
[Header("UI")]
|
||||
public GameObject goContent;
|
||||
public Slider progressBar;
|
||||
public TMP_Text percentText;
|
||||
public TMP_Text loadingText;
|
||||
|
||||
private bool finished;
|
||||
private CancellationTokenSource cts;
|
||||
|
||||
public void ShowLoadingScene(bool active)
|
||||
{
|
||||
goContent.SetActive(active);
|
||||
|
||||
// if (active)
|
||||
// {
|
||||
// Debug.LogError("Loading scene controller started");
|
||||
//
|
||||
// finished = false;
|
||||
// loadingText.text = "Loading...";
|
||||
// UpdateUI(0);
|
||||
//
|
||||
// cts?.Cancel();
|
||||
// cts = new CancellationTokenSource();
|
||||
//
|
||||
// ObserveLoadingAsync(cts.Token).Forget();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// cts?.Cancel();
|
||||
// }
|
||||
}
|
||||
|
||||
async UniTaskVoid ObserveLoadingAsync(CancellationToken token)
|
||||
{
|
||||
try
|
||||
{
|
||||
while (!finished && !token.IsCancellationRequested)
|
||||
{
|
||||
float progress = Mathf.Clamp01(SceneLoader.LoadingProgress / 100f);
|
||||
UpdateUI(progress);
|
||||
|
||||
if (SceneLoader.SceneLoadProcess == SceneLoadProcess.EndLoading)
|
||||
{
|
||||
finished = true;
|
||||
await EndLoadingAsync(token);
|
||||
break;
|
||||
}
|
||||
|
||||
await UniTask.Yield(PlayerLoopTiming.Update, token);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Normal cancel – ignore
|
||||
}
|
||||
}
|
||||
|
||||
async UniTask EndLoadingAsync(CancellationToken token)
|
||||
{
|
||||
UpdateUI(1f);
|
||||
loadingText.text = "Entering scene...";
|
||||
|
||||
await UniTask.Delay(TimeSpan.FromSeconds(0.2f), cancellationToken: token);
|
||||
|
||||
ShowLoadingScene(false);
|
||||
}
|
||||
|
||||
public void UpdateUI(float progress)
|
||||
{
|
||||
progressBar.value = progress;
|
||||
percentText.text = $"{Mathf.RoundToInt(progress * 100f)}%";
|
||||
}
|
||||
public void SetLoadingText(string content)
|
||||
{
|
||||
loadingText.text = content;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0f91323d4b23b4428e423d2c724d821
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class SceneLoadService
|
||||
{
|
||||
public static void Load(
|
||||
string sceneName,
|
||||
LoadSceneMode mode = LoadSceneMode.Single,
|
||||
Action<bool> actDone = null
|
||||
)
|
||||
{
|
||||
if(string.IsNullOrEmpty(sceneName)) return;
|
||||
SceneLoader.TargetScene = sceneName;
|
||||
SceneLoader.LoadMode = mode;
|
||||
SceneLoader.OnDone = actDone;
|
||||
|
||||
SceneManager.LoadScene(sceneName, mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a87111a93f052894082eb4175befa2ed
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public enum SceneLoadProcess
|
||||
{
|
||||
Loading,
|
||||
EndLoading,
|
||||
}
|
||||
public class SceneLoader
|
||||
{
|
||||
public static string TargetScene;
|
||||
public static LoadSceneMode LoadMode;
|
||||
public static Action<bool> OnDone;
|
||||
|
||||
public static SceneLoadProcess SceneLoadProcess;
|
||||
public static int LoadingProgress;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5faa62ff51365184f9a9cea81bce8188
|
||||
@@ -4,6 +4,7 @@ using BrewMonster.Scripts.Task;
|
||||
|
||||
namespace PerfectWorld.Scripts.Task
|
||||
{
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ATaskTemplFixedData
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,14 @@ using BrewMonster.Network;
|
||||
using CSNetwork.GPDataType;
|
||||
using PerfectWorld.Scripts.Task;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using BrewMonster.UI;
|
||||
using CSNetwork;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
|
||||
namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
@@ -306,6 +311,32 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
public class CECTaskInterface : TaskInterface
|
||||
{
|
||||
private CancellationTokenSource _cts;
|
||||
|
||||
public void Despose()
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
}
|
||||
|
||||
public int GetCurHistoryStageIndex()
|
||||
{
|
||||
return EC_Game.GetGameRun().GetCurStageIndex() + 1;
|
||||
}
|
||||
public uint GetObtainedGeneralCardCount()
|
||||
{
|
||||
return 0;
|
||||
//return m_pHost ? m_pHost.GetGeneralCardData().GetObtainedCount() : 0;
|
||||
}public uint GetObtainedGeneralCardCountByRank(int rank)
|
||||
{
|
||||
return 0;
|
||||
//return m_pHost ? m_pHost.GetGeneralCardData().GetObtainedCount() : 0;
|
||||
}
|
||||
public bool HaveGotTitle(uint id_designation)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// public const int TASK_MAX_DELIVER_COUNT = 5;
|
||||
// public const int TASK_STORAGE_COUNT = 32;
|
||||
// public const int TASK_STORAGE_LEN = 10;
|
||||
@@ -330,7 +361,7 @@ namespace BrewMonster.Scripts.Task
|
||||
byte[] m_pFinishedCountListBuf;// Finished count list buffer
|
||||
byte[] m_pStorageTaskListBuf; // Storage tasks list buffer
|
||||
private Dictionary<int, bool> m_TasksToConfirm = new Dictionary<int, bool>();
|
||||
private readonly System.Collections.Generic.Dictionary<uint, bool> m_emotionTask = new System.Collections.Generic.Dictionary<uint, bool>();
|
||||
private readonly Dictionary<uint, bool> m_emotionTask = new System.Collections.Generic.Dictionary<uint, bool>();
|
||||
private bool m_bForceNavigateFinish;
|
||||
private int m_tmFinishDlgShown;
|
||||
public CECTaskInterface()
|
||||
@@ -349,16 +380,19 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
|
||||
// Initialize object
|
||||
public bool Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
|
||||
public async UniTask<bool> Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
|
||||
int iFinishedListLen, byte[] pFinishedTimeListBuf, int iFinishedTimeListLen,
|
||||
byte[] pFinishedCountListBuf, int iFinishedCountListLen, byte[] pStorageTaskListBuf, int iStorageTaskListLen)
|
||||
{
|
||||
_cts = new CancellationTokenSource();
|
||||
// basic argument check (converted from ASSERT)
|
||||
if (pActiveListBuf == null || pFinishedListBuf == null || pFinishedTimeListBuf == null || pFinishedCountListBuf == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// SceneLoader.SceneLoadProcess = SceneLoadProcess.Loading;
|
||||
// SceneLoader.LoadingProgress = 0;
|
||||
LoadingSceneController.Instance.ShowLoadingScene(true);
|
||||
|
||||
m_pActiveListBuf = new ActiveTaskList();
|
||||
m_pActiveListBuf.ReadFromBuffer(pActiveListBuf);
|
||||
@@ -393,27 +427,50 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
ATaskTemplMan pTaskMan = GetTaskTemplMan();
|
||||
pTaskMan.Release();
|
||||
LoadingSceneController.Instance.ShowLoadingScene(true);
|
||||
LoadingSceneController.Instance.UpdateUI(0f);
|
||||
LoadingSceneController.Instance.SetLoadingText("Loading Tasks From Pack");
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/* if (TaskTest.Instance &&
|
||||
if (TaskTest.Instance &&
|
||||
TaskTest.Instance.WasLoadTaskData &&
|
||||
pTaskMan.TaskLoadedCount > 100)
|
||||
{
|
||||
Debug.Log($" [TaskInterface] Using TaskTest loaded data with {pTaskMan.TaskLoadedCount} tasks.");
|
||||
LoadingSceneController.Instance.ShowLoadingScene(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//string task_data_path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
|
||||
//pTaskMan.LoadTasksFromPack(task_data_path, true);
|
||||
}*/
|
||||
string task_data_path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
|
||||
await pTaskMan.LoadTasksFromPack(task_data_path, true, (x) =>
|
||||
{
|
||||
UniTask.Void(async () =>
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
LoadingSceneController.Instance.UpdateUI(x);
|
||||
});
|
||||
}, _cts.Token);
|
||||
}
|
||||
#else
|
||||
string task_data_path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
|
||||
pTaskMan.LoadTasksFromPack(task_data_path, true);
|
||||
await pTaskMan.LoadTasksFromPack(task_data_path, true, (x) =>
|
||||
{
|
||||
UniTask.Void(async () =>
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
LoadingSceneController.Instance.UpdateUI(x);
|
||||
});
|
||||
}, _cts.Token);
|
||||
#endif
|
||||
var task_npc_path = Path.Combine(Application.streamingAssetsPath, "data/task_npc.data");
|
||||
await pTaskMan.LoadNPCInfoFromPack(task_npc_path);
|
||||
|
||||
var dyn_tasks_path = Path.Combine(Application.streamingAssetsPath, "data/dyn_tasks.data");
|
||||
await pTaskMan.VerifyDynTasksPack(dyn_tasks_path);
|
||||
|
||||
pTaskMan.LoadNPCInfoFromPack("data\\task_npc.data");
|
||||
pTaskMan.VerifyDynTasksPack("userdata\\dyn_tasks.data");
|
||||
InitActiveTaskList();
|
||||
SceneLoader.SceneLoadProcess = SceneLoadProcess.EndLoading;
|
||||
LoadingSceneController.Instance.ShowLoadingScene(false);
|
||||
|
||||
m_bForceNavigateFinish = false;
|
||||
|
||||
@@ -422,24 +479,7 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
public void CheckPQEnterWorldInit()
|
||||
{
|
||||
return;
|
||||
ActiveTaskList pList = GetActiveTaskList();
|
||||
List<ActiveTaskEntry> aEntries = new List<ActiveTaskEntry>(pList.m_TaskEntries);
|
||||
|
||||
for(var i = 0; i < pList.m_uTaskCount; i++)
|
||||
{
|
||||
var CurEntry = aEntries[i];
|
||||
|
||||
if (CurEntry.m_ulTemplAddr == 0)
|
||||
continue;
|
||||
|
||||
ATaskTempl pTempl = CurEntry.GetTempl();
|
||||
if (pTempl == null || !pTempl.m_FixedData.m_bPQTask)
|
||||
continue;
|
||||
|
||||
pTempl.IncValidCount();
|
||||
// _notify_svr(this, TASK_CLT_NOTIFY_PQ_CHECK_INIT, CurEntry.m_ID);
|
||||
}
|
||||
// TODO: implement PQ enter-world init if needed
|
||||
}
|
||||
|
||||
public static void WriteLog(int nPlayerId, int nTaskId, int nType, string szLog)
|
||||
@@ -449,10 +489,7 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
public bool IsDeliverLegal()
|
||||
{
|
||||
// return !m_pHost.IsTrading() && m_pHost.GetBoothState() == 0 && !m_pHost.IsDead();
|
||||
return true;
|
||||
// TODO: implement
|
||||
return m_pHost.IsTrading() && m_pHost.GetBoothState() == 0 && !m_pHost.IsDead();
|
||||
return !m_pHost.IsTrading() && m_pHost.GetBoothState() == 0 && !m_pHost.IsDead();
|
||||
}
|
||||
|
||||
public int GetCommonItemCount(uint ulCommonItem)
|
||||
@@ -482,81 +519,304 @@ namespace BrewMonster.Scripts.Task
|
||||
return m_pActiveListBuf;
|
||||
}
|
||||
|
||||
private void InitActiveTaskList()
|
||||
// private void InitActiveTaskList()
|
||||
// {
|
||||
// ActiveTaskList pLst = GetActiveTaskList();
|
||||
// if (pLst == null) return;
|
||||
//
|
||||
// ATaskTemplMan pMan = GetTaskTemplMan();
|
||||
// if (pMan == null) return;
|
||||
//
|
||||
// // reset counters
|
||||
// pLst.m_uTopShowTaskCount = 0;
|
||||
// pLst.m_uTopHideTaskCount = 0;
|
||||
// pLst.m_uTitleTaskCount = 0;
|
||||
//
|
||||
// byte i = 0;
|
||||
// while (i < pLst.m_uTaskCount)
|
||||
// {
|
||||
// ActiveTaskEntry entry = pLst.m_TaskEntries[i];
|
||||
// if (entry == null)
|
||||
// {
|
||||
// i++;
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // repair sibling linkage
|
||||
// if (entry.m_NextSblIndex != (char)0xff)
|
||||
// {
|
||||
// ActiveTaskEntry entryNextSbl = pLst.m_TaskEntries[entry.m_NextSblIndex];
|
||||
// if (entryNextSbl == null || entryNextSbl.m_PrevSblIndex != (char)i)
|
||||
// {
|
||||
// entry.m_NextSblIndex = (char)0xff;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // resolve template for top-level entries; children left unresolved in C#
|
||||
// if (entry.m_ParentIndex == (char)0xff)
|
||||
// {
|
||||
// // entry.m_ulTemplAddr = 0u;
|
||||
// entry.m_ulTemplAddr = pMan.GetTopTaskByID(entry.m_ID) != null ? 1u : 0u;
|
||||
//
|
||||
// ATaskTempl topTempl = pMan.GetTopTaskByID(entry.m_ID);
|
||||
// if (topTempl != null)
|
||||
// {
|
||||
// if (topTempl.m_FixedData.m_bHidden)
|
||||
// pLst.m_uTopHideTaskCount++;
|
||||
// else if (topTempl.m_FixedData.m_bDisplayInTitleTaskUI)
|
||||
// pLst.m_uTitleTaskCount++;
|
||||
// else
|
||||
// pLst.m_uTopShowTaskCount++;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// entry.m_ulTemplAddr = 0u;
|
||||
// }
|
||||
//
|
||||
// // cap template best-effort (no pointer in managed)
|
||||
// if (entry.m_uCapTaskId != 0)
|
||||
// {
|
||||
// ATaskTempl cap = pMan.GetTopTaskByID(entry.m_uCapTaskId);
|
||||
// entry.m_ulCapTemplAddr = 0u;
|
||||
// if (cap == null)
|
||||
// {
|
||||
// entry.m_uCapTaskId = 0;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// entry.m_ulCapTemplAddr = 0u;
|
||||
// }
|
||||
//
|
||||
// i++;
|
||||
// }
|
||||
//
|
||||
// // approximate used count
|
||||
// pLst.m_uUsedCount = pLst.m_uTaskCount;
|
||||
// }
|
||||
|
||||
public void InitActiveTaskList()
|
||||
{
|
||||
ActiveTaskList pLst = GetActiveTaskList();
|
||||
if (pLst == null) return;
|
||||
|
||||
FinishedTaskList pFnsh = GetFinishedTaskList();
|
||||
// TaskFinishTimeList* pFnshTime = static_cast<TaskFinishTimeList*>(GetFinishedTimeList());
|
||||
TaskFinishTimeList pFnshTime = new TaskFinishTimeList(GetFinishedTimeList());
|
||||
TaskFinishCountList pFnshCount = new TaskFinishCountList();
|
||||
pFnshCount.ReadFromBytes(GetFinishedCntList());
|
||||
ActiveTaskEntry[] pEntries = pLst.m_TaskEntries;
|
||||
ATaskTemplMan pMan = GetTaskTemplMan();
|
||||
if (pMan == null) return;
|
||||
|
||||
// reset counters
|
||||
if (!CheckVersion() || !pLst.IsValid() || !pFnsh.IsValid() || !pFnshTime.IsValid())
|
||||
{
|
||||
pLst.RemoveAll();
|
||||
pFnsh.RemoveAll();
|
||||
pFnshTime.RemoveAll();
|
||||
// TaskInterface::WriteLog(0, 0, 0, "InitLst, list is invalid");
|
||||
}
|
||||
|
||||
if(!pFnshCount.IsValid())
|
||||
{
|
||||
pFnshCount.RemoveAll();
|
||||
// TaskInterface::WriteLog(0, 0, 0, "InitLst, finish count list is invalid");
|
||||
}
|
||||
|
||||
if (pFnsh.m_FnshHeader.m_Version == 0){
|
||||
List<FnshedTaskEntryOld> list_old = new ();
|
||||
// list_old.reserve(pFnsh->m_FnshHeader.m_uTaskCount);
|
||||
list_old.Capacity = pFnsh.m_FnshHeader.m_uTaskCount; // C# equivalent of reserve
|
||||
// FnshedTaskListOld* pListOld = (FnshedTaskListOld*)pFnsh;
|
||||
FnshedTaskListOld pListOld = new FnshedTaskListOld(pFnsh.m_Buf);
|
||||
|
||||
for (int i = 0; i < pFnsh.m_FnshHeader.m_uTaskCount; i++)
|
||||
{
|
||||
list_old.Add(pListOld.m_aTaskList[i]);
|
||||
}
|
||||
|
||||
var FnshHeader = pFnsh.m_FnshHeader;
|
||||
FnshHeader.m_Version = 1;
|
||||
pFnsh.m_FnshHeader = FnshHeader;
|
||||
|
||||
for (int i = 0; i < pFnsh.m_FnshHeader.m_uTaskCount; i++)
|
||||
{
|
||||
pFnsh.m_aTaskList[i].m_uTaskId = (ushort)(list_old[i].m_uTaskId & 0x7fff);
|
||||
pFnsh.m_aTaskList[i].m_Mask = (byte)(list_old[i].m_uTaskId >> 15);
|
||||
}
|
||||
}
|
||||
|
||||
#if _TASK_CLIENT
|
||||
|
||||
// Debug output of finished tasks, for developer use -> not converted to C#
|
||||
// FILE* fp = fopen("logs\\Tasks.log", "wb");
|
||||
//
|
||||
// if (fp)
|
||||
// {
|
||||
// unsigned short magic = 0xfeff;
|
||||
// fwrite(&magic, sizeof(magic), 1, fp);
|
||||
//
|
||||
// for (unsigned long n = 0; n < pFnsh->m_FnshHeader.m_uTaskCount; n++)
|
||||
// {
|
||||
// ATaskTempl* pTempl = GetTaskTemplMan()->GetTaskTemplByID(pFnsh->m_aTaskList[n].m_uTaskId);
|
||||
//
|
||||
// fwprintf(
|
||||
// fp,
|
||||
// L"task = %d, name = %s\r\n",
|
||||
// pFnsh->m_aTaskList[n].m_uTaskId,
|
||||
// pTempl ? pTempl->GetName() : L"");
|
||||
// }
|
||||
//
|
||||
// for (unsigned short m = 0; m < pFnshTime->m_uCount; m++)
|
||||
// {
|
||||
// ATaskTempl* pTempl = GetTaskTemplMan()->GetTaskTemplByID(pFnshTime->m_aList[m].m_uTaskId);
|
||||
// unsigned long his_time = pFnshTime->m_aList[m].m_ulTimeMark;
|
||||
// his_time -= unsigned long(TaskInterface::GetTimeZoneBias() * 60);
|
||||
//
|
||||
// if ((long)(his_time) < 0)
|
||||
// his_time = 0;
|
||||
//
|
||||
// tm t = *gmtime((time_t*)&his_time);
|
||||
// wchar_t buf[256];
|
||||
// swprintf(buf, L"%d-%02d-%02d-%02d-%02d-%02d", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec);
|
||||
//
|
||||
// fwprintf(
|
||||
// fp,
|
||||
// L"task = %d, deliver time = %s, name = %s\r\n",
|
||||
// pFnshTime->m_aList[m].m_uTaskId,
|
||||
// buf,
|
||||
// pTempl ? pTempl->GetName() : L"");
|
||||
// }
|
||||
//
|
||||
// fclose(fp);
|
||||
// }
|
||||
|
||||
if (!GetTaskTemplMan().IsDynTasksVerified())
|
||||
{
|
||||
// ��ȡ��̬�����ʱ���ǩ
|
||||
_notify_svr(this, ClientNotificationConstants.TASK_CLT_NOTIFY_DYN_TIMEMARK, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ������⽱����Ϣ
|
||||
GetTaskTemplMan().ClearSpecailAward();
|
||||
_notify_svr(this, ClientNotificationConstants.TASK_CLT_NOTIFY_SPECIAL_AWARD, 0);
|
||||
|
||||
// ��ȡ�ֿ�����
|
||||
_notify_svr(this, ClientNotificationConstants.TASK_CLT_NOTIFY_STORAGE, 0);
|
||||
}
|
||||
|
||||
#else
|
||||
uint ulCurTime = GetCurTime();
|
||||
const ATaskTempl pTempl;
|
||||
pLst.m_Version = TASK_ENTRY_DATA_CUR_VER;
|
||||
bool bTimeMarkUpdated = pLst.IsTimeMarkUpdate();
|
||||
pLst.m_uTopShowTaskCount = 0;
|
||||
pLst.m_uTopHideTaskCount = 0;
|
||||
pLst.m_uTitleTaskCount = 0;
|
||||
#endif
|
||||
|
||||
byte i = 0;
|
||||
while (i < pLst.m_uTaskCount)
|
||||
// unsigned char i = 0;
|
||||
|
||||
for (int i=0; i < pLst.m_uTaskCount; i++)
|
||||
{
|
||||
ActiveTaskEntry entry = pLst.m_TaskEntries[i];
|
||||
if (entry == null)
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
ActiveTaskEntry entry = pEntries[i];
|
||||
|
||||
// repair sibling linkage
|
||||
if (entry.m_NextSblIndex != (char)0xff)
|
||||
if (!entry.IsValid((char)i, (char)pLst.m_uTaskCount))
|
||||
{
|
||||
ActiveTaskEntry entryNextSbl = pLst.m_TaskEntries[entry.m_NextSblIndex];
|
||||
if (entryNextSbl == null || entryNextSbl.m_PrevSblIndex != (char)i)
|
||||
{
|
||||
entry.m_NextSblIndex = (char)0xff;
|
||||
}
|
||||
pLst.RemoveAll();
|
||||
// TaskInterface::WriteLog(0, 0, 0, "InitLst, active list is invalid");
|
||||
break;
|
||||
}
|
||||
|
||||
// resolve template for top-level entries; children left unresolved in C#
|
||||
if (entry.m_ParentIndex == (char)0xff)
|
||||
{
|
||||
// entry.m_ulTemplAddr = 0u;
|
||||
entry.m_ulTemplAddr = pMan.GetTopTaskByID(entry.m_ID) != null ? 1u : 0u;
|
||||
|
||||
ATaskTempl topTempl = pMan.GetTopTaskByID(entry.m_ID);
|
||||
if (topTempl != null)
|
||||
{
|
||||
if (topTempl.m_FixedData.m_bHidden)
|
||||
pLst.m_uTopHideTaskCount++;
|
||||
else if (topTempl.m_FixedData.m_bDisplayInTitleTaskUI)
|
||||
pLst.m_uTitleTaskCount++;
|
||||
else
|
||||
pLst.m_uTopShowTaskCount++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.m_ulTemplAddr = 0u;
|
||||
}
|
||||
|
||||
// cap template best-effort (no pointer in managed)
|
||||
if (entry.m_uCapTaskId != 0)
|
||||
{
|
||||
ATaskTempl cap = pMan.GetTopTaskByID(entry.m_uCapTaskId);
|
||||
entry.m_ulCapTemplAddr = 0u;
|
||||
if (cap == null)
|
||||
{
|
||||
entry.m_uCapTaskId = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.m_ulCapTemplAddr = 0u;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
// approximate used count
|
||||
pLst.m_uUsedCount = pLst.m_uTaskCount;
|
||||
int i1 = 0;
|
||||
|
||||
while (i1 < pLst.m_uTaskCount)
|
||||
{
|
||||
ActiveTaskEntry entry = pEntries[i1];
|
||||
|
||||
if (entry.m_NextSblIndex != 0xff) {
|
||||
ActiveTaskEntry entryNextSbl = pEntries[entry.m_NextSblIndex];
|
||||
if (entryNextSbl.m_PrevSblIndex != i1) entry.m_NextSblIndex = (char)0xff;
|
||||
}
|
||||
if (entry.m_ParentIndex == 0xff)
|
||||
entry.m_ulTemplAddr = pMan.GetTopTaskByID(entry.m_ID).m_FixedData.m_ID;
|
||||
else
|
||||
{
|
||||
ATaskTempl pParent = pLst.m_TaskEntries[entry.m_ParentIndex].GetTempl();
|
||||
|
||||
if (pParent != null)
|
||||
entry.m_ulTemplAddr = pParent.GetConstSubById(entry.m_ID).m_FixedData.m_ID;
|
||||
else
|
||||
entry.m_ulTemplAddr = 0;
|
||||
}
|
||||
#if !_TASK_CLIENT
|
||||
|
||||
|
||||
// if (entry.m_ulTemplAddr != 0)
|
||||
// {
|
||||
// // TaskInterface::WriteLog(0, entry.m_ID, 0, "InitLst, Cant Find Task");
|
||||
//
|
||||
// pLst.ClearTask(this, entry, false);
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// // ������������û��ɣ������
|
||||
// if (entry.m_ChildIndex == 0xff
|
||||
// && entry.GetTempl().m_FixedData.m_enumMethod == (uint)TaskCompletionMethod.enumTMNone
|
||||
// && !entry.IsFinished())
|
||||
// {
|
||||
// // TaskInterface::WriteLog(0, entry.m_ID, 0, "InitLst, Task is Impossible");
|
||||
// pLst.ClearTask(this, entry, false);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
#endif
|
||||
|
||||
if (entry.m_uCapTaskId != 0)
|
||||
{
|
||||
entry.m_ulCapTemplAddr = GetTaskTemplMan().GetTopTaskByID(entry.m_uCapTaskId).m_FixedData.m_ID;
|
||||
if (entry.m_ulCapTemplAddr != 0)
|
||||
{
|
||||
entry.m_uCapTaskId = 0;
|
||||
// TaskInterface::WriteLog(0, entry.m_uCapTaskId, 0, "InitLst, Cant Find CapTask");
|
||||
}
|
||||
}
|
||||
else
|
||||
entry.m_ulCapTemplAddr = 0;
|
||||
|
||||
#if !_TASK_CLIENT
|
||||
|
||||
|
||||
// if (bTimeMarkUpdated != 0)
|
||||
// {
|
||||
// var pTempl = entry.GetTempl();
|
||||
//
|
||||
// if (!pTempl.m_FixedData.m_bAbsTime && !pTempl.m_FixedData.m_bPQTask && !pTempl.m_FixedData.m_bPQSubTask)
|
||||
// entry.m_ulTaskTime = ulCurTime - entry.m_ulTaskTime;
|
||||
// }
|
||||
#endif
|
||||
|
||||
#if !_TASK_CLIENT
|
||||
// ��ʼ������������е����ء���ʾ�������
|
||||
// if (entry.m_ParentIndex == 0xff)
|
||||
// {
|
||||
// if (entry.GetTempl()->m_bHidden)
|
||||
// pLst->m_uTopHideTaskCount++;
|
||||
// else if (entry.GetTempl()->m_bDisplayInTitleTaskUI)
|
||||
// pLst->m_uTitleTaskCount++;
|
||||
// else pLst->m_uTopShowTaskCount++;
|
||||
//
|
||||
// }
|
||||
#endif
|
||||
|
||||
i1++;
|
||||
}
|
||||
#if !_TASK_CLIENT
|
||||
// pLst->SetTimeMarkUpdate();
|
||||
// pLst->UpdateTaskMask(*GetTaskMask());
|
||||
#endif
|
||||
|
||||
pLst.UpdateUsedCount();
|
||||
}
|
||||
|
||||
public bool CheckTaskForbid(uint task_id){ return false; }
|
||||
@@ -971,14 +1231,15 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
// return pTempl.CheckPrerequisite(this, static_cast<ActiveTaskList*>(GetActiveTaskList()), GetCurTime(), true, true, false);
|
||||
return pTempl.CheckPrerequisite(this, GetActiveTaskList(), GetCurTime(), true, true, false);
|
||||
|
||||
// if (!pTempl.CheckReachLevel(this)) return (uint)TaskInterfaceConstants.TASK_PREREQU_FAIL_BELOW_LEVEL;
|
||||
// uint keyCheck = pTempl.CheckGlobalKeyValue(this, false);
|
||||
// if (keyCheck != 0u) return keyCheck;
|
||||
|
||||
return 0u;
|
||||
}
|
||||
|
||||
public bool CanDeliverCommonItem(uint ulTypes)
|
||||
{
|
||||
return m_pHost.GetPack().GetEmptySlotNum() >= (int)(ulTypes);
|
||||
}
|
||||
public bool CanDeliverTaskItem(uint ulTypes)
|
||||
{
|
||||
return m_pHost.GetTaskPack().GetEmptySlotNum() >= (int)ulTypes;
|
||||
}
|
||||
public void ShowPunchBagMessage(bool bSucced,bool bMax,uint MonsterTemplID,int dps,int dph)
|
||||
{
|
||||
// TODO : implement UI message box
|
||||
@@ -1018,6 +1279,7 @@ namespace BrewMonster.Scripts.Task
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1040,8 +1302,7 @@ namespace BrewMonster.Scripts.Task
|
||||
ActiveTaskList pLst = GetActiveTaskList();
|
||||
uint ulCurTime = GetCurTime(); // 当前时间 // current time
|
||||
ATaskTempl pTempl = null;
|
||||
ActiveTaskEntry foundEntry = default;
|
||||
bool hasFoundEntry = false;
|
||||
int foundEntryIndex = -1; // Keep track of entry index like C++ code does
|
||||
|
||||
if (bActiveTask)
|
||||
{
|
||||
@@ -1052,8 +1313,7 @@ namespace BrewMonster.Scripts.Task
|
||||
if (CurEntry.m_ID != ulTaskId || CurEntry.m_ulTemplAddr == 0) continue;
|
||||
|
||||
pTempl = CurEntry.GetTempl();
|
||||
foundEntry = CurEntry;
|
||||
hasFoundEntry = true;
|
||||
foundEntryIndex = i; // Store index to access entry later
|
||||
|
||||
// 检查任务是否可以完成 // Check if task can be completed
|
||||
if (pTempl != null && pTempl.CanFinishTask(this, CurEntry, ulCurTime))
|
||||
@@ -1128,9 +1388,11 @@ namespace BrewMonster.Scripts.Task
|
||||
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonsterId = mw.m_ulMonsterTemplId;
|
||||
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonstersToKill = mw.m_ulMonsterNum;
|
||||
|
||||
if (bActiveTask && hasFoundEntry)
|
||||
// Access the entry directly from the list using stored index, like C++ code does
|
||||
if (bActiveTask && foundEntryIndex >= 0)
|
||||
{
|
||||
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonstersKilled = foundEntry.m_wMonsterNum[j];
|
||||
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[foundEntryIndex];
|
||||
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonstersKilled = CurEntry.m_wMonsterNum[j];
|
||||
}
|
||||
|
||||
ulMonsterCount++;
|
||||
@@ -1157,9 +1419,11 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
pInfo.m_PlayerWanted[ulPlayerCount].m_ulPlayersToKill = pw.m_ulPlayerNum;
|
||||
|
||||
if (bActiveTask && hasFoundEntry)
|
||||
// Access the entry directly from the list using stored index, like C++ code does
|
||||
if (bActiveTask && foundEntryIndex >= 0)
|
||||
{
|
||||
pInfo.m_PlayerWanted[ulPlayerCount].m_ulPlayersKilled = foundEntry.m_wMonsterNum[j];
|
||||
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[foundEntryIndex];
|
||||
pInfo.m_PlayerWanted[ulPlayerCount].m_ulPlayersKilled = CurEntry.m_wMonsterNum[j];
|
||||
}
|
||||
|
||||
pInfo.m_PlayerWanted[ulPlayerCount].m_Requirements = pw.m_Requirements;
|
||||
@@ -1292,7 +1556,7 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
void _notify_svr(TaskInterface pTask, byte uReason, ushort uTaskID)
|
||||
{
|
||||
|
||||
TaskClient._notify_svr(pTask, uReason, uTaskID);
|
||||
}
|
||||
|
||||
public bool IsTaskReadyToConfirm(int iTaskID)
|
||||
@@ -1312,10 +1576,30 @@ namespace BrewMonster.Scripts.Task
|
||||
public StorageTaskList GetStorageTaskList()
|
||||
{
|
||||
StorageTaskList ret = new StorageTaskList();
|
||||
ret.ReadByte(m_pStorageTaskListBuf);
|
||||
// Initialize arrays before use
|
||||
ret.EnsureInitialized();
|
||||
|
||||
// Check if buffer is initialized before reading
|
||||
if (m_pStorageTaskListBuf != null)
|
||||
{
|
||||
ret.ReadByte(m_pStorageTaskListBuf);
|
||||
}
|
||||
// If buffer is null, return empty/default StorageTaskList
|
||||
// This can happen if Init() hasn't been called yet or failed
|
||||
return ret;
|
||||
}
|
||||
|
||||
// 设置存储任务列表缓冲区 // Set storage task list buffer
|
||||
public void SetStorageTaskListBuffer(byte[] data)
|
||||
{
|
||||
if (data == null || m_pStorageTaskListBuf == null) return;
|
||||
int copy = Mathf.Min(data.Length, m_pStorageTaskListBuf.Length);
|
||||
if (copy > 0)
|
||||
{
|
||||
System.Buffer.BlockCopy(data, 0, m_pStorageTaskListBuf, 0, copy);
|
||||
}
|
||||
}
|
||||
|
||||
public uint GetTaskMask()
|
||||
{
|
||||
return 0;
|
||||
@@ -1325,7 +1609,10 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
return m_pFinishedTimeListBuf;
|
||||
}
|
||||
|
||||
public byte[] GetFinishedCntList()
|
||||
{
|
||||
return m_pFinishedCountListBuf;
|
||||
}
|
||||
void SetForceNavigateFinishFlag(bool bFinish) { m_bForceNavigateFinish = bFinish;} //
|
||||
public void OnNewTask(int iTaskID)
|
||||
{
|
||||
@@ -1386,11 +1673,11 @@ namespace BrewMonster.Scripts.Task
|
||||
public void UpdateTaskUI(uint idTask, int reason)
|
||||
{
|
||||
// TODO: update task UI
|
||||
// CECGameUIMan* pGameUI = g_pGame->GetGameRun()->GetUIManager()->GetInGameUIMan();
|
||||
// if (pGameUI)
|
||||
// {
|
||||
// pGameUI->UpdateTask(idTask, reason);
|
||||
// }
|
||||
CECGameUIMan pGameUI = CECUIManager.Instance.GetInGameUIMan();
|
||||
if (pGameUI != null )
|
||||
{
|
||||
pGameUI.UpdateTask(idTask, reason);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsTitleDataReady()
|
||||
@@ -1404,6 +1691,39 @@ namespace BrewMonster.Scripts.Task
|
||||
ret.ReadFromBytes(m_pFinishedListBuf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// 记录任务完成/失败到已完成列表(用于前置任务/可重复接任务判断)
|
||||
// English: Record task finish/fail into FinishedTaskList (used by prerequisite checks)
|
||||
public void RecordFinishedTask(uint taskId, bool success)
|
||||
{
|
||||
if (m_pFinishedListBuf == null) return;
|
||||
FinishedTaskList lst = new FinishedTaskList();
|
||||
lst.ReadFromBytes(m_pFinishedListBuf);
|
||||
lst.AddOneTask(taskId, success);
|
||||
// Persist back into buffer
|
||||
if (lst.m_Buf != null && lst.m_Buf.Length == m_pFinishedListBuf.Length)
|
||||
{
|
||||
global::System.Buffer.BlockCopy(lst.m_Buf, 0, m_pFinishedListBuf, 0, m_pFinishedListBuf.Length);
|
||||
}
|
||||
}
|
||||
|
||||
// Persist an updated FinishedTaskList back into the underlying buffer.
|
||||
public void WriteFinishedTaskList(FinishedTaskList lst)
|
||||
{
|
||||
if (m_pFinishedListBuf == null) return;
|
||||
if (lst.m_Buf == null || lst.m_Buf.Length != m_pFinishedListBuf.Length) return;
|
||||
global::System.Buffer.BlockCopy(lst.m_Buf, 0, m_pFinishedListBuf, 0, m_pFinishedListBuf.Length);
|
||||
}
|
||||
|
||||
// Reset role-based finish counter for a task when period rolls over (used by CheckDeliverTime).
|
||||
public void ResetRoleFinishCount(uint taskId)
|
||||
{
|
||||
if (m_pFinishedListBuf == null) return;
|
||||
FinishedTaskList lst = new FinishedTaskList();
|
||||
lst.ReadFromBytes(m_pFinishedListBuf);
|
||||
lst.ResetFinishCount(taskId);
|
||||
WriteFinishedTaskList(lst);
|
||||
}
|
||||
|
||||
public int GetPlayerId()
|
||||
{
|
||||
@@ -1429,6 +1749,84 @@ namespace BrewMonster.Scripts.Task
|
||||
// g_pGame->GetGameSession()->c2s_CmdTaskNotify(pBuf, sz);
|
||||
UnityGameSession.c2s_CmdTaskNotify(pBuf, sz);
|
||||
}
|
||||
|
||||
|
||||
#region Emote
|
||||
|
||||
public void SetEmotion(int emotion)
|
||||
{
|
||||
ActiveTaskList pList = GetActiveTaskList();
|
||||
List<ActiveTaskEntry> aEntries = new List<ActiveTaskEntry>(pList.m_TaskEntries);
|
||||
ATaskTempl pTempl;
|
||||
|
||||
if (emotion < (int)TaskInterface.CommandTaskAction.CMD_EMOTION_BINDBUDDY)// pTempl->m_uiEmotion ֵΪ0±íʾ²»¼ì²é£¬ËùÒÔËùÓбíÇéÐòºÅ¶¼ºóÒÆ1
|
||||
emotion += 1;
|
||||
|
||||
for (int i = 0; i < pList.m_uTaskCount; i++)
|
||||
{
|
||||
ActiveTaskEntry curEntry = aEntries[i];
|
||||
pTempl = curEntry.GetTempl();
|
||||
|
||||
if (pTempl != null &&
|
||||
pTempl.m_FixedData.m_enumMethod == (uint)TaskCompletionMethod.enumTMSimpleClientTask &&
|
||||
pTempl.m_FixedData.m_uiEmotion > 0)
|
||||
{
|
||||
uint id = pTempl.GetID();
|
||||
|
||||
// Check if map does not contain OR value == false
|
||||
if (!m_emotionTask.TryGetValue(id, out bool exists) || !exists)
|
||||
{
|
||||
m_emotionTask[id] = (pTempl.m_FixedData.m_uiEmotion == (uint)emotion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// void CECTaskInterface::UpdateTaskEmotionAction(unsigned int task_id)
|
||||
// {
|
||||
// if (m_emotionTask.find(task_id)!=m_emotionTask.end())
|
||||
// {
|
||||
// m_emotionTask[task_id] = false;
|
||||
// }
|
||||
// }
|
||||
// void CECTaskInterface::UpdateEmotionDlg(unsigned int task)
|
||||
// {
|
||||
// ActiveTaskList* pList = static_cast<ActiveTaskList*>(GetActiveTaskList());
|
||||
// ActiveTaskEntry* aEntries = pList->m_TaskEntries;
|
||||
// unsigned char i;
|
||||
// const ATaskTempl* pTempl, *pTarget = NULL;
|
||||
// ActiveTaskEntry* pTargetEntry = NULL;
|
||||
//
|
||||
// for (i = 0; i < pList->m_uTaskCount; i++)
|
||||
// {
|
||||
// ActiveTaskEntry& CurEntry = aEntries[i];
|
||||
// pTempl = CurEntry.GetTempl();
|
||||
//
|
||||
// if (!pTempl || pTempl->GetID() == task)
|
||||
// continue;
|
||||
//
|
||||
// if (pTempl && pTempl->m_enumMethod==enumTMSimpleClientTask && pTempl->m_uiEmotion)
|
||||
// {
|
||||
// pTarget = pTempl;
|
||||
// pTargetEntry = &CurEntry;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (pTarget && pTargetEntry && !pTempl->CanFinishTask(this, pTargetEntry, GetCurTime()))
|
||||
// {
|
||||
// PopEmotionUI(pTarget->GetID(),pTarget->m_uiEmotion,true);
|
||||
// }
|
||||
// }
|
||||
// void TaskInterface::PopEmotionUI(unsigned int task_id,unsigned int uiEmotion,bool bShow)
|
||||
// {
|
||||
// CECGameUIMan* pGameUI = g_pGame->GetGameRun()->GetUIManager()->GetInGameUIMan();
|
||||
//
|
||||
// if (pGameUI)
|
||||
// {
|
||||
// pGameUI->PopTaskEmotionDlg(task_id,uiEmotion,bShow);
|
||||
// }
|
||||
// }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
# Task System High-Level Architecture Document
|
||||
|
||||
This document provides a high-level overview of the Task System architecture, including communication protocols, data flow, and system components.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Protocol Communication](#protocol-communication)
|
||||
2. [System Architecture](#system-architecture)
|
||||
3. [Data Flow Diagrams](#data-flow-diagrams)
|
||||
4. [Key Components](#key-components)
|
||||
5. [Message Types](#message-types)
|
||||
|
||||
---
|
||||
|
||||
## Protocol Communication
|
||||
|
||||
### Primary Protocol Name
|
||||
|
||||
The Task System uses the following protocol for client-server communication:
|
||||
|
||||
- **Protocol Name**: `c2s_CmdTaskNotify` (Client to Server)
|
||||
- **Command ID**: `TASK_NOTIFY` (value: 70) in `CommandID` enum
|
||||
- **Server Response**: Various `TASK_SVR_NOTIFY_*` notification messages
|
||||
|
||||
### Protocol Implementation
|
||||
|
||||
- **Client Side**: `UnityGameSession.c2s_CmdTaskNotify(byte[] pBuf, uint sz)`
|
||||
- **Server Side**: `GameSession.c2s_SendCmdTaskNotify(byte[] pData, uint dwDataSize)`
|
||||
- **Base Structure**: `task_notify_base` containing `reason` (byte) and `task` (ushort)
|
||||
|
||||
---
|
||||
|
||||
## System Architecture
|
||||
|
||||
### High-Level Component Diagram
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph Client["Client Side"]
|
||||
UI[Task UI Components]
|
||||
TaskClient[TaskClient]
|
||||
TaskInterface[CECTaskInterface]
|
||||
TaskTemplMan[ATaskTemplMan]
|
||||
ActiveList[ActiveTaskList]
|
||||
FinishedList[FinishedTaskList]
|
||||
end
|
||||
|
||||
subgraph Network["Network Layer"]
|
||||
UnitySession[UnityGameSession]
|
||||
GameSession[GameSession]
|
||||
end
|
||||
|
||||
subgraph Server["Server Side"]
|
||||
TaskServer[TaskServer]
|
||||
ServerLogic[Server Task Logic]
|
||||
end
|
||||
|
||||
UI --> TaskClient
|
||||
TaskClient --> TaskInterface
|
||||
TaskInterface --> TaskTemplMan
|
||||
TaskInterface --> ActiveList
|
||||
TaskInterface --> FinishedList
|
||||
|
||||
TaskClient --> UnitySession
|
||||
UnitySession --> GameSession
|
||||
GameSession -->|c2s_CmdTaskNotify| ServerLogic
|
||||
ServerLogic --> TaskServer
|
||||
ServerLogic -->|TASK_SVR_NOTIFY_*| GameSession
|
||||
GameSession --> UnitySession
|
||||
UnitySession --> TaskClient
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Data Flow Diagrams
|
||||
|
||||
### 1. Task Accept Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Task UI
|
||||
participant TC as TaskClient
|
||||
participant TI as TaskInterface
|
||||
participant NS as Network Session
|
||||
participant S as Server
|
||||
|
||||
UI->>TC: User clicks Accept Task
|
||||
TC->>TI: CanDeliverTask(taskId)
|
||||
TI->>TI: CheckPrerequisite()
|
||||
alt Prerequisites Met
|
||||
TC->>NS: c2s_CmdTaskNotify(TASK_CLT_NOTIFY_MANUAL_TRIG)
|
||||
NS->>S: Send notification
|
||||
S->>S: Validate & Process
|
||||
S->>NS: TASK_SVR_NOTIFY_NEW
|
||||
NS->>TC: OnServerNotify()
|
||||
TC->>TI: Update ActiveTaskList
|
||||
TC->>UI: UpdateTaskUI()
|
||||
else Prerequisites Failed
|
||||
TC->>UI: Show Error Message
|
||||
end
|
||||
```
|
||||
|
||||
### 2. Task Completion Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Game as Game Logic
|
||||
participant TC as TaskClient
|
||||
participant TI as TaskInterface
|
||||
participant NS as Network Session
|
||||
participant S as Server
|
||||
|
||||
Game->>TC: OnTaskCheckStatus()
|
||||
TC->>TI: Check task conditions
|
||||
TI->>TI: CanFinishTask()
|
||||
TI->>TI: RecursiveCheckAward()
|
||||
|
||||
alt Task Can Complete
|
||||
TC->>NS: c2s_CmdTaskNotify(TASK_CLT_NOTIFY_CHECK_FINISH)
|
||||
NS->>S: Send completion request
|
||||
S->>S: Validate completion
|
||||
S->>S: Process awards
|
||||
S->>NS: TASK_SVR_NOTIFY_COMPLETE
|
||||
NS->>TC: OnServerNotify()
|
||||
TC->>TI: Update task state
|
||||
TC->>TI: Apply awards
|
||||
TC->>UI: UpdateTaskUI()
|
||||
end
|
||||
```
|
||||
|
||||
### 3. Task Give Up Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant UI as Task UI
|
||||
participant TC as TaskClient
|
||||
participant TI as TaskInterface
|
||||
participant NS as Network Session
|
||||
participant S as Server
|
||||
|
||||
UI->>TC: User clicks Give Up
|
||||
TC->>TI: GiveUpTask(taskId)
|
||||
TC->>NS: c2s_CmdTaskNotify(TASK_CLT_NOTIFY_CHECK_GIVEUP)
|
||||
NS->>S: Send give up request
|
||||
S->>S: Validate give up
|
||||
S->>NS: TASK_SVR_NOTIFY_GIVE_UP
|
||||
NS->>TC: OnServerNotify()
|
||||
TC->>TI: Remove from ActiveTaskList
|
||||
TC->>UI: UpdateTaskUI()
|
||||
```
|
||||
|
||||
### 4. Task Progress Update Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Game as Game Logic
|
||||
participant TC as TaskClient
|
||||
participant TI as TaskInterface
|
||||
participant NS as Network Session
|
||||
participant S as Server
|
||||
|
||||
Game->>Game: Monster killed / Item collected
|
||||
Game->>S: Progress update (via game protocol)
|
||||
S->>S: Update task progress
|
||||
S->>NS: TASK_SVR_NOTIFY_MONSTER_KILLED
|
||||
S->>NS: TASK_SVR_NOTIFY_PLAYER_KILLED
|
||||
NS->>TC: OnServerNotify()
|
||||
TC->>TI: Update ActiveTaskEntry
|
||||
TC->>UI: UpdateTaskUI()
|
||||
```
|
||||
|
||||
### 5. Task Initialization Flow
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Game as Game Run
|
||||
participant TI as TaskInterface
|
||||
participant TM as TaskTemplMan
|
||||
participant NS as Network Session
|
||||
participant S as Server
|
||||
|
||||
Game->>TI: Init(activeList, finishedList, ...)
|
||||
TI->>TM: LoadTasksFromPack()
|
||||
TI->>TI: InitActiveTaskList()
|
||||
TI->>NS: Request dynamic tasks time mark
|
||||
NS->>S: TASK_CLT_NOTIFY_DYN_TIMEMARK
|
||||
S->>NS: TASK_SVR_NOTIFY_DYN_TIME_MARK
|
||||
NS->>TI: OnServerNotify()
|
||||
TI->>NS: Request storage tasks
|
||||
NS->>S: TASK_CLT_NOTIFY_STORAGE
|
||||
S->>NS: TASK_SVR_NOTIFY_STORAGE
|
||||
NS->>TI: OnServerNotify()
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Key Components
|
||||
|
||||
### Client-Side Components
|
||||
|
||||
#### 1. **TaskInterface** (`CECTaskInterface`)
|
||||
- **Purpose**: Main interface for task operations
|
||||
- **Key Methods**:
|
||||
- `Init()`: Initialize task system with data buffers
|
||||
- `GetTaskStateInfo()`: Get current task state
|
||||
- `CanDeliverTask()`: Check if task can be accepted
|
||||
- `NotifyServer()`: Send notifications to server
|
||||
|
||||
#### 2. **TaskClient**
|
||||
- **Purpose**: Client-side task logic and status checking
|
||||
- **Key Methods**:
|
||||
- `OnTaskCheckStatus()`: Periodic task status validation
|
||||
- `OnServerNotify()`: Handle server notifications
|
||||
- `_notify_svr()`: Send client notifications to server
|
||||
|
||||
#### 3. **ATaskTemplMan**
|
||||
- **Purpose**: Task template manager
|
||||
- **Key Methods**:
|
||||
- `LoadTasksFromPack()`: Load task templates from data files
|
||||
- `GetTaskTemplByID()`: Retrieve task template by ID
|
||||
- `GetTopTaskByID()`: Get top-level task template
|
||||
|
||||
#### 4. **ActiveTaskList**
|
||||
- **Purpose**: Manages currently active tasks
|
||||
- **Structure**: Contains array of `ActiveTaskEntry` objects
|
||||
- **Key Fields**:
|
||||
- `m_uTaskCount`: Number of active tasks
|
||||
- `m_TaskEntries[]`: Array of task entries
|
||||
|
||||
#### 5. **FinishedTaskList**
|
||||
- **Purpose**: Tracks completed tasks
|
||||
- **Structure**: Contains list of finished task IDs and metadata
|
||||
|
||||
### Server-Side Components
|
||||
|
||||
#### 1. **TaskServer**
|
||||
- **Purpose**: Server-side task operations
|
||||
- **Key Methods**:
|
||||
- `OnTaskGiveUpOneTask()`: Handle task abandonment
|
||||
|
||||
---
|
||||
|
||||
## Message Types
|
||||
|
||||
### Client-to-Server Notifications (`TASK_CLT_NOTIFY_*`)
|
||||
|
||||
| Constant | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `TASK_CLT_NOTIFY_CHECK_FINISH` | 1 | Request task completion check |
|
||||
| `TASK_CLT_NOTIFY_CHECK_GIVEUP` | 2 | Request task give up |
|
||||
| `TASK_CLT_NOTIFY_REACH_SITE` | 3 | Notify reached target location |
|
||||
| `TASK_CLT_NOTIFY_AUTO_DELV` | 4 | Auto-deliver task |
|
||||
| `TASK_CLT_NOTIFY_MANUAL_TRIG` | 5 | Manual task trigger (accept) |
|
||||
| `TASK_CLT_NOTIFY_FORCE_GIVEUP` | 6 | Force give up task |
|
||||
| `TASK_CLT_NOTIFY_DYN_TIMEMARK` | 7 | Request dynamic tasks time mark |
|
||||
| `TASK_CLT_NOTIFY_DYN_DATA` | 8 | Request dynamic tasks data |
|
||||
| `TASK_CLT_NOTIFY_SPECIAL_AWARD` | 9 | Request special award info |
|
||||
| `TASK_CLT_NOTIFY_LEAVE_SITE` | 10 | Notify left target location |
|
||||
| `TASK_CLT_NOTIFY_PQ_CHECK_INIT` | 11 | Public Quest check init |
|
||||
| `TASK_CLT_NOTIFY_STORAGE` | 12 | Request storage tasks |
|
||||
| `TASK_CLT_NOTIFY_REQUEST_TREASURE_INDEX` | 14 | Request treasure map index |
|
||||
| `TASK_CLT_NOTIFY_15DAYS_NOLOGIN` | 15 | 15 days no login notification |
|
||||
| `TASK_CLT_NOTIFY_SPECIAL_AWARD_MASK` | 16 | Special award mask |
|
||||
| `TASK_CLT_NOTIFY_TITLE_TASK` | 17 | Title task notification |
|
||||
| `TASK_CLT_NOTIFY_CHOOSE_AWARD` | 18 | Choose award notification |
|
||||
| `TASK_CLT_NOTIFY_BUY_TOKENSHOP_ITEM` | 20 | Buy token shop item |
|
||||
| `TASK_CLT_NOTIFY_FINISH_TASK_BY_WORLD_CONTRIBUTION` | 21 | Finish task by world contribution |
|
||||
| `TASK_CLT_NOTIFY_RM_FINISH_TASK` | 150 | Remove finished task |
|
||||
|
||||
### Server-to-Client Notifications (`TASK_SVR_NOTIFY_*`)
|
||||
|
||||
| Constant | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `TASK_SVR_NOTIFY_NEW` | 1 | New task assigned |
|
||||
| `TASK_SVR_NOTIFY_COMPLETE` | 2 | Task completed |
|
||||
| `TASK_SVR_NOTIFY_GIVE_UP` | 3 | Task given up |
|
||||
| `TASK_SVR_NOTIFY_MONSTER_KILLED` | 4 | Monster killed (progress update) |
|
||||
| `TASK_SVR_NOTIFY_FINISHED` | 5 | Task finished |
|
||||
| `TASK_SVR_NOTIFY_ERROR_CODE` | 6 | Task error code |
|
||||
| `TASK_SVR_NOTIFY_FORGET_SKILL` | 7 | Forget skill notification |
|
||||
| `TASK_SVR_NOTIFY_DYN_TIME_MARK` | 8 | Dynamic tasks time mark |
|
||||
| `TASK_SVR_NOTIFY_DYN_DATA` | 9 | Dynamic tasks data |
|
||||
| `TASK_SVR_NOTIFY_SPECIAL_AWARD` | 10 | Special award notification |
|
||||
| `TASK_SVR_NOTIFY_STORAGE` | 11 | Storage tasks data |
|
||||
| `TASK_SVR_NOTIFY_DIS_GLOBAL_VAL` | 12 | Disable global value |
|
||||
| `TASK_SVR_NOTIFY_TREASURE_MAP` | 13 | Treasure map notification |
|
||||
| `TASK_SVR_NOTIFY_SET_TASK_LIMIT` | 14 | Set task limit |
|
||||
| `TASK_SVR_NOTIFY_PLAYER_KILLED` | 15 | Player killed (progress update) |
|
||||
|
||||
---
|
||||
|
||||
## Data Structures
|
||||
|
||||
### Task Notification Base Structure
|
||||
|
||||
```csharp
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct task_notify_base
|
||||
{
|
||||
public byte reason; // Notification reason (TASK_CLT_NOTIFY_* or TASK_SVR_NOTIFY_*)
|
||||
public ushort task; // Task ID
|
||||
}
|
||||
```
|
||||
|
||||
### Active Task Entry
|
||||
|
||||
```csharp
|
||||
public class ActiveTaskEntry : TASK_ENTRY_FIXED_DATA
|
||||
{
|
||||
public ushort m_ID; // Task ID
|
||||
public char m_ParentIndex; // Parent node index
|
||||
public char m_ChildIndex; // Child node index
|
||||
public uint m_ulTaskTime; // Task start timestamp
|
||||
public uint m_ulTemplAddr; // Template address (ID in C#)
|
||||
public ushort[] m_wMonsterNum; // Monster kill counts
|
||||
// ... additional fields
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Task State Machine
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Available: Task Template Loaded
|
||||
Available --> Active: Accept Task (TASK_CLT_NOTIFY_MANUAL_TRIG)
|
||||
Active --> InProgress: Task Started
|
||||
InProgress --> Completed: Conditions Met (TASK_CLT_NOTIFY_CHECK_FINISH)
|
||||
InProgress --> Failed: Timeout / Fail Condition
|
||||
InProgress --> Abandoned: Give Up (TASK_CLT_NOTIFY_CHECK_GIVEUP)
|
||||
Completed --> Finished: Awards Applied (TASK_SVR_NOTIFY_COMPLETE)
|
||||
Failed --> [*]
|
||||
Abandoned --> [*]
|
||||
Finished --> [*]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Error Codes
|
||||
|
||||
The system uses various error codes defined in `TaskInterfaceConstants`:
|
||||
|
||||
- `TASK_PREREQU_FAIL_*`: Prerequisite check failures (1-66)
|
||||
- `TASK_AWARD_FAIL_*`: Award processing failures (150-160)
|
||||
|
||||
Common error codes:
|
||||
- `TASK_PREREQU_FAIL_BELOW_LEVEL`: Player level too low
|
||||
- `TASK_PREREQU_FAIL_NO_SPACE`: No space for new task
|
||||
- `TASK_PREREQU_FAIL_PREV_TASK`: Previous task not completed
|
||||
- `TASK_AWARD_FAIL_GIVEN_ITEM`: Item award failed
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
1. **Version Checking**: The system includes version checking for task list compatibility
|
||||
2. **Dynamic Tasks**: Supports dynamic tasks that can be updated at runtime
|
||||
3. **Storage Tasks**: Library/storage tasks system for task management
|
||||
4. **Public Quests**: Special quest type (PQ) with shared state
|
||||
5. **Task Templates**: Tasks are defined in data files (`tasks.data`, `task_npc.data`, `dyn_tasks.data`)
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- `TaskInterface.cs`: Core task interface definition
|
||||
- `CECTaskInterface.cs`: Client implementation of task interface
|
||||
- `TaskClient.cs`: Client-side task logic
|
||||
- `TaskServer.cs`: Server-side task operations
|
||||
- `TaskTempl.cs`: Task template constants and structures
|
||||
- `TaskProcess.cs`: Task entry and list structures
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f968fa1b610f4dca8de367446d9d7d9
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -17,6 +17,9 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
private const uint FINISH_DLG_SHOWN_TIME = 3000; // TODO: Confirm correct value
|
||||
private static uint s_finishDlgShownTime = 0;
|
||||
|
||||
// Throttle CHECK_FINISH notifications per task to avoid spamming the server every tick.
|
||||
private static readonly System.Collections.Generic.Dictionary<uint, uint> s_lastCheckFinishAt = new();
|
||||
|
||||
public static void OnTaskCheckStatus(TaskInterface pTask)
|
||||
{
|
||||
@@ -77,7 +80,16 @@ namespace BrewMonster.Scripts.Task
|
||||
// 绝对失效时间判断 // Absolute fail time check
|
||||
if (pTempl.m_FixedData.m_bAbsFail)
|
||||
{
|
||||
// TODO: Time zone bias and 'task_tm.before' not ported; skipping precise comparison
|
||||
// Mirror C++: if abs-fail time has passed, ask server to check/finish (will mark fail if needed).
|
||||
long sec = ulCurTime - (long)(TaskInterface.GetTimeZoneBias() * 60);
|
||||
if (sec < 0) sec = 0;
|
||||
DateTime cur = DateTimeOffset.FromUnixTimeSeconds(sec).UtcDateTime;
|
||||
if (pTempl.m_FixedData.m_tmAbsFailTime.before(cur))
|
||||
{
|
||||
pTempl.IncValidCount();
|
||||
_notify_svr(pTask, (int)ClientNotificationConstants.TASK_CLT_NOTIFY_CHECK_FINISH, CurEntry.m_ID);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 进入或离开区域导致失败 // Entering or leaving region causes failure
|
||||
@@ -245,8 +257,8 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: UpdateTaskToConfirm not ported; implement confirmation UI/state if needed
|
||||
UpdateTaskToConfirm(pTask, pTempl, bNeedServerCheck);
|
||||
// Minimal behavior: for wait-time tasks, auto request server check when time is up.
|
||||
UpdateTaskToConfirm(pTask, pTempl, CurEntry, bNeedServerCheck, ulCurTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,15 +302,32 @@ namespace BrewMonster.Scripts.Task
|
||||
&& pos[2] >= min.z && pos[2] <= max.z;
|
||||
}
|
||||
|
||||
private static void _notify_svr(TaskInterface pTask, byte uReason, ushort uTaskID)
|
||||
public static void _notify_svr(TaskInterface pTask, byte uReason, ushort uTaskID)
|
||||
{
|
||||
ATaskTempl._notify_svr(pTask, uReason, uTaskID);
|
||||
}
|
||||
|
||||
// 更新“待确认任务” // Update task to confirm
|
||||
private static void UpdateTaskToConfirm(TaskInterface pTask, ATaskTempl pTempl, bool needServerCheck)
|
||||
// 更新“待确认任务” / 最小实现:当客户端确认已满足完成条件时,发一次 CHECK_FINISH 给服务器(节流)
|
||||
// English: Minimal port: when conditions are met client-side, send CHECK_FINISH once (throttled).
|
||||
private static void UpdateTaskToConfirm(TaskInterface pTask, ATaskTempl pTempl, ActiveTaskEntry entry, bool needServerCheck, uint ulCurTime)
|
||||
{
|
||||
// TODO: Implement confirmation queue/UI if required by design
|
||||
if (!needServerCheck || pTask == null || pTempl == null || entry == null) return;
|
||||
|
||||
// Only auto-check for wait-time tasks (the reported broken case).
|
||||
if ((TaskCompletionMethod)pTempl.m_FixedData.m_enumMethod != TaskCompletionMethod.enumTMWaitTime)
|
||||
return;
|
||||
|
||||
if (entry.IsFinished()) return;
|
||||
|
||||
uint id = entry.m_ID;
|
||||
if (id == 0) return;
|
||||
|
||||
if (s_lastCheckFinishAt.TryGetValue(id, out uint last) && ulCurTime <= last + 1)
|
||||
return;
|
||||
s_lastCheckFinishAt[id] = ulCurTime;
|
||||
|
||||
pTempl.IncValidCount();
|
||||
_notify_svr(pTask, (int)ClientNotificationConstants.TASK_CLT_NOTIFY_CHECK_FINISH, (ushort)id);
|
||||
}
|
||||
|
||||
// Handle server notification for task updates
|
||||
@@ -314,7 +343,7 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
// Marshal base notification structure from buffer
|
||||
task_notify_base pNotify = GPDataTypeHelper.FromBytes<task_notify_base>(pBuf);
|
||||
BMLogger.Log($"[TaskClient] OnServerNotify: reason={pNotify.reason}, task={pNotify.task}");
|
||||
BMLogger.Log($"[MH Task] TaskClient.OnServerNotify: reason={pNotify.reason}, task={pNotify.task}");
|
||||
|
||||
ATaskTempl pTempl = null;
|
||||
ActiveTaskEntry pEntry = null;
|
||||
@@ -356,14 +385,14 @@ namespace BrewMonster.Scripts.Task
|
||||
else if (pNotify.reason == TaskTemplConstants.TASK_SVR_NOTIFY_DYN_TIME_MARK)
|
||||
{
|
||||
// TODO: svr_task_dyn_time_mark struct not defined; need to define or use alternative
|
||||
// if (sz != Marshal.SizeOf<svr_task_dyn_time_mark>()) return;
|
||||
if (sz != Marshal.SizeOf<svr_task_dyn_time_mark>()) return;
|
||||
// TODO: OnDynTasksTimeMark method not found in ATaskTemplMan; implement if needed
|
||||
// ATaskTemplMan pMan = GetTaskTemplMan(pTask);
|
||||
// if (pMan != null)
|
||||
// {
|
||||
// svr_task_dyn_time_mark dynMark = Marshal.PtrToStructure<svr_task_dyn_time_mark>(handle.AddrOfPinnedObject());
|
||||
// pMan.OnDynTasksTimeMark(pTask, dynMark.time_mark, dynMark.version);
|
||||
// }
|
||||
ATaskTemplMan pMan = GetTaskTemplMan();
|
||||
if (pMan != null)
|
||||
{
|
||||
svr_task_dyn_time_mark dynMark = GPDataTypeHelper.FromBytes<svr_task_dyn_time_mark>(pBuf);
|
||||
pMan.OnDynTasksTimeMark(pTask, dynMark.time_mark, dynMark.version);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Handle dynamic task data notification
|
||||
@@ -371,30 +400,27 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
if (sz <= (uint)Marshal.SizeOf<task_notify_base>()) return;
|
||||
// TODO: OnDynTasksData method not found in ATaskTemplMan; implement if needed
|
||||
// ATaskTemplMan pMan = GetTaskTemplMan(pTask);
|
||||
// if (pMan != null)
|
||||
// {
|
||||
// byte[] dynData = new byte[sz - Marshal.SizeOf<task_notify_base>()];
|
||||
// Array.Copy(pBuf, Marshal.SizeOf<task_notify_base>(), dynData, 0, dynData.Length);
|
||||
// pMan.OnDynTasksData(pTask, dynData, (uint)dynData.Length, pNotify.task != 0);
|
||||
// }
|
||||
ATaskTemplMan pMan = GetTaskTemplMan();
|
||||
if (pMan != null)
|
||||
{
|
||||
byte[] dynData = new byte[sz - Marshal.SizeOf<task_notify_base>()];
|
||||
Array.Copy(pBuf, Marshal.SizeOf<task_notify_base>(), dynData, 0, dynData.Length);
|
||||
pMan.OnDynTasksData(pTask, dynData, dynData.Length, pNotify.task != 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// Handle storage data notification
|
||||
else if (pNotify.reason == TaskTemplConstants.TASK_SVR_NOTIFY_STORAGE)
|
||||
{
|
||||
// TODO: StorageTaskList struct not defined; need to define or use alternative
|
||||
// if (sz != Marshal.SizeOf<task_notify_base>() + Marshal.SizeOf<StorageTaskList>()) return;
|
||||
// TODO: OnStorageData method not found in ATaskTemplMan; implement if needed
|
||||
// ATaskTemplMan pMan = GetTaskTemplMan(pTask);
|
||||
// if (pMan != null)
|
||||
// {
|
||||
// byte[] storageData = new byte[Marshal.SizeOf<StorageTaskList>()];
|
||||
// Array.Copy(pBuf, Marshal.SizeOf<task_notify_base>(), storageData, 0, storageData.Length);
|
||||
// pMan.OnStorageData(pTask, storageData);
|
||||
// }
|
||||
// TODO: UpdateTaskUI static method not found; implement UI update if needed
|
||||
// TaskInterface.UpdateTaskUI(pNotify.task, pNotify.reason);
|
||||
if (sz != Marshal.SizeOf<task_notify_base>() + Marshal.SizeOf<StorageTaskList>()) return;
|
||||
ATaskTemplMan pMan = GetTaskTemplMan();
|
||||
if (pMan != null)
|
||||
{
|
||||
byte[] storageData = new byte[Marshal.SizeOf<StorageTaskList>()];
|
||||
Array.Copy(pBuf, Marshal.SizeOf<task_notify_base>(), storageData, 0, storageData.Length);
|
||||
pMan.OnStorageData(pTask, storageData);
|
||||
}
|
||||
pTask.UpdateTaskUI(pNotify.task, pNotify.reason);
|
||||
return;
|
||||
}
|
||||
// Handle special award notification
|
||||
@@ -462,16 +488,15 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
// Monster kill count >= 2 triggers auto team
|
||||
// TODO: svr_monster_killed struct not defined; need to define or use alternative
|
||||
// if (sz == Marshal.SizeOf<svr_monster_killed>())
|
||||
// {
|
||||
// svr_monster_killed pKilled = Marshal.PtrToStructure<svr_monster_killed>(handle.AddrOfPinnedObject());
|
||||
// if (pKilled.monster_num >= 2)
|
||||
// {
|
||||
// // TODO: CECAutoTeam and DoAutoTeam not found; implement auto team if needed
|
||||
// // CECAutoTeam pAutoTeam = g_pGame.GetGameRun().GetHostPlayer().GetAutoTeam();
|
||||
// // pAutoTeam.DoAutoTeam(CECAutoTeam.TYPE_TASK, pNotify.task);
|
||||
// }
|
||||
// }
|
||||
if (sz == Marshal.SizeOf<svr_monster_killed>())
|
||||
{
|
||||
svr_monster_killed pKilled = GPDataTypeHelper.FromBytes<svr_monster_killed>(pBuf) ;//Marshal.PtrToStructure<svr_monster_killed>(pNotify.AddrOfPinnedObject());
|
||||
if (pKilled.monster_num >= 2)
|
||||
{
|
||||
// CECAutoTeam pAutoTeam = EC_Game.GetGameRun().GetHostPlayer().GetAutoTeam();
|
||||
// pAutoTeam.DoAutoTeam((int)CECAutoTeam.AutoTeamType.TYPE_TASK, pNotify.task);
|
||||
}
|
||||
}
|
||||
// TODO: CECUIHelper.OnTaskProcessUpdated not found; implement UI update if needed
|
||||
// CECUIHelper.OnTaskProcessUpdated(pNotify.task);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BrewMonster.Network;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using PerfectWorld.Scripts.Task;
|
||||
|
||||
namespace BrewMonster.Scripts.Task
|
||||
@@ -47,7 +48,7 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
public interface TaskInterface
|
||||
{
|
||||
bool Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
|
||||
UniTask<bool> Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
|
||||
int iFinishedListLen, byte[] pFinishedTimeListBuf, int iFinishedTimeListLen,
|
||||
byte[] pFinishedCountListBuf, int iFinishedCountListLen, byte[] pStorageTaskListBuf,
|
||||
int iStorageTaskListLen);
|
||||
@@ -94,6 +95,14 @@ namespace BrewMonster.Scripts.Task
|
||||
uint CanDeliverTask(uint ulTaskId);
|
||||
void UpdateTaskUI(uint idTask, int reason);
|
||||
#endif
|
||||
public enum CommandTaskAction
|
||||
{
|
||||
CMD_EMOTION_BINDBUDDY = 1024, // If there are other non-expression actions, they will be 1025, 1026...
|
||||
CMD_EMOTION_SITDOWN, // Sit down
|
||||
CMD_JUMP_TRICKACTION, // Jump and roll
|
||||
CMD_RUN_TRICKACTION, // Run and roll
|
||||
}
|
||||
|
||||
// bool HasTask(uint taskId);
|
||||
// bool CheckTaskForbid(uint taskId);
|
||||
long GetGlobalValue(long key);
|
||||
@@ -122,6 +131,7 @@ namespace BrewMonster.Scripts.Task
|
||||
int GetExp();
|
||||
int GetSP();
|
||||
int GetForceActivityLevel();
|
||||
bool HaveGotTitle(uint id_designation);
|
||||
bool IsKing();
|
||||
bool IsInTeam();
|
||||
uint GetAccountTotalCash();
|
||||
@@ -151,6 +161,16 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
int GetPlayerId();
|
||||
void PopChatMessage(int iIndex, int dwNum=0);
|
||||
|
||||
void InitActiveTaskList();
|
||||
bool CanDeliverCommonItem(uint ulItemTypes);
|
||||
bool CanDeliverTaskItem(uint ulItemTypes);
|
||||
static int GetTimeZoneBias()
|
||||
{
|
||||
return EC_Game.GetTimeZoneBias();
|
||||
}
|
||||
int GetCurHistoryStageIndex();
|
||||
byte[] GetFinishedCntList();
|
||||
uint GetObtainedGeneralCardCount();
|
||||
uint GetObtainedGeneralCardCountByRank(int rank);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrewMonster.Scripts.Task;
|
||||
using CSNetwork.GPDataType;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster.Scripts.Task
|
||||
@@ -19,6 +20,140 @@ namespace BrewMonster.Scripts.Task
|
||||
TASK_STATE_AWARD_NOTIFY_TEAM = 0x10, // Award has been notified to team
|
||||
TASK_STATE_CONTRIBUTION_FINISH = 0x20 // Contribution finished
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
|
||||
public struct TaskFinishCountList
|
||||
{
|
||||
public ushort m_uCount;
|
||||
|
||||
public TaskFinishCountEntry[] m_aList;
|
||||
|
||||
|
||||
public uint Search(uint ulID, ref uint ulTime)
|
||||
|
||||
{
|
||||
if (m_aList == null) return 0u;
|
||||
for (ushort i = 0; i < m_uCount; i++)
|
||||
{
|
||||
if (m_aList[i].m_uTaskId == (ushort)ulID)
|
||||
{
|
||||
ulTime = m_aList[i].m_ulFinishTime;
|
||||
return m_aList[i].m_ulFinishCount;
|
||||
}
|
||||
}
|
||||
|
||||
return 0u;
|
||||
}
|
||||
|
||||
public void ResetAt(uint ulID)
|
||||
{
|
||||
for (ushort i = 0; i < m_uCount; i++)
|
||||
{
|
||||
if (m_aList != null && m_aList[i].m_uTaskId == (ushort)ulID)
|
||||
m_aList[i].m_ulFinishCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddOrUpdate(uint ulID, uint ulFinishTime)
|
||||
{
|
||||
if (m_aList == null || m_aList.Length != TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN)
|
||||
m_aList = new TaskFinishCountEntry[TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN];
|
||||
|
||||
for (ushort i = 0; i < m_uCount; i++)
|
||||
{
|
||||
if (m_aList[i].m_uTaskId == (ushort)ulID)
|
||||
{
|
||||
m_aList[i].m_ulFinishCount ++;
|
||||
m_aList[i].m_ulFinishTime = ulFinishTime;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_uCount >= (uint)TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN)
|
||||
return;
|
||||
|
||||
m_aList[m_uCount].m_uTaskId = (ushort)ulID;
|
||||
m_aList[m_uCount].m_ulFinishCount = 1;
|
||||
m_aList[m_uCount].m_ulFinishTime = ulFinishTime;
|
||||
m_uCount++;
|
||||
}
|
||||
public void RemoveAll()
|
||||
{
|
||||
m_uCount = 0;
|
||||
m_aList = new TaskFinishCountEntry[TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN];
|
||||
}
|
||||
public bool IsValid() { return m_uCount <= TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN; }
|
||||
|
||||
public bool ReadFromBytes(byte[] data)
|
||||
{
|
||||
if (data == null || data.Length < 2)
|
||||
return false;
|
||||
|
||||
// Read m_uCount (2 bytes)
|
||||
m_uCount = BitConverter.ToUInt16(data, 0);
|
||||
|
||||
// Read m_aList array
|
||||
int entrySize = Marshal.SizeOf<TaskFinishCountEntry>();
|
||||
int expectedSize = 2 + entrySize * TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN;
|
||||
|
||||
if (data.Length < expectedSize)
|
||||
return false;
|
||||
|
||||
if (m_aList == null || m_aList.Length != TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN)
|
||||
m_aList = new TaskFinishCountEntry[TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN];
|
||||
|
||||
for (int i = 0; i < TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN; i++)
|
||||
{
|
||||
int offset = 2 + i * entrySize;
|
||||
m_aList[i] = GPDataTypeHelper.FromBytes<TaskFinishCountEntry>(data[offset..(offset + entrySize)]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Persist list back into a buffer returned by TaskInterface.GetFinishedCntList().
|
||||
// Layout: ushort count + TASK_FINISH_COUNT_MAX_LEN * TaskFinishCountEntry bytes
|
||||
public void WriteToBuffer(byte[] data)
|
||||
{
|
||||
if (data == null) return;
|
||||
int entrySize = Marshal.SizeOf<TaskFinishCountEntry>();
|
||||
int expectedSize = 2 + entrySize * TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN;
|
||||
if (data.Length < expectedSize) return;
|
||||
|
||||
Array.Copy(BitConverter.GetBytes(m_uCount), 0, data, 0, 2);
|
||||
if (m_aList == null || m_aList.Length != TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN)
|
||||
{
|
||||
Array.Clear(data, 2, data.Length - 2);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN; i++)
|
||||
{
|
||||
int offset = 2 + i * entrySize;
|
||||
// TaskFinishCountEntry is blittable with Pack=1, use helper
|
||||
byte[] entryBytes = GPDataTypeHelper.ToBytes(m_aList[i]);
|
||||
Array.Copy(entryBytes, 0, data, offset, Math.Min(entryBytes.Length, entrySize));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct TaskFinishCountEntry
|
||||
{
|
||||
public ushort m_uTaskId;
|
||||
public uint m_ulFinishCount;
|
||||
public uint m_ulFinishTime;
|
||||
public uint m_ulUnused2;
|
||||
};
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
|
||||
public class TASK_
|
||||
{
|
||||
public const int TASK_DEFAULT_MAX_SIMULTANEOUS_COUT = 20;
|
||||
public const int TASK_MAX_SIMULTANEOUS_COUT = 30;
|
||||
public const int TASK_HIDDEN_COUNT = 30; // formally 6, for test
|
||||
public const int TASK_TITLE_TASK_COUNT = 10;
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
|
||||
// Cur Size 21 bytes
|
||||
@@ -32,7 +167,7 @@ namespace BrewMonster.Scripts.Task
|
||||
public char m_uState; // Task state
|
||||
public uint m_ulTaskTime; // Timestamp
|
||||
public ushort m_uCapTaskId; // Captain task ID
|
||||
public uint m_ulTemplAddr; // Template address
|
||||
public uint m_ulTemplAddr; // Template address -> In C++ this is a pointer, here we use uint to store the ID of the template
|
||||
public uint m_ulCapTemplAddr; // Captain task template address
|
||||
|
||||
};
|
||||
@@ -44,7 +179,9 @@ namespace BrewMonster.Scripts.Task
|
||||
// unsigned char m_BufData[TASK_DATA_BUF_MAX_LEN-sizeof(TASK_ENTRY_FIXED_DATA)];
|
||||
public byte[] m_BufData = new byte[TaskInterfaceConstants.TASK_DATA_BUF_MAX_LEN - Marshal.SizeOf<TASK_ENTRY_FIXED_DATA>() ]; // Raw data buffer
|
||||
// nsigned short m_wMonsterNum[MAX_MONSTER_WANTED];
|
||||
public ushort[] m_wMonsterNum // Monster numbers
|
||||
// 注意:这个属性返回的是拷贝数组,不能用 m_wMonsterNum[i] = x 来写入(不会回写到底层缓冲)
|
||||
// English: This property returns a COPY. Do not mutate via m_wMonsterNum[i] = x (it won't persist).
|
||||
public ushort[] m_wMonsterNum // Monster numbers (copy)
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -66,6 +203,21 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
}
|
||||
|
||||
// 读取/写入怪物计数(直接回写到底层缓冲) // English: Get/set monster count (writes through to backing buffer)
|
||||
public ushort GetMonsterNum(int index)
|
||||
{
|
||||
if (index < 0 || index >= TaskInterfaceConstants.MAX_MONSTER_WANTED) return 0;
|
||||
return BitConverter.ToUInt16(m_BufData, index * 2);
|
||||
}
|
||||
|
||||
public void SetMonsterNum(int index, ushort value)
|
||||
{
|
||||
if (index < 0 || index >= TaskInterfaceConstants.MAX_MONSTER_WANTED) return;
|
||||
byte[] bytes = BitConverter.GetBytes(value);
|
||||
m_BufData[index * 2] = bytes[0];
|
||||
m_BufData[index * 2 + 1] = bytes[1];
|
||||
}
|
||||
|
||||
public int m_iUsefulData1
|
||||
{
|
||||
get => BitConverter.ToInt32(m_BufData, TaskInterfaceConstants.MAX_MONSTER_WANTED * 2);
|
||||
@@ -135,6 +287,7 @@ namespace BrewMonster.Scripts.Task
|
||||
public bool IsContributionFinish() => (m_uState & (byte)TaskState.TASK_STATE_CONTRIBUTION_FINISH) != 0;
|
||||
|
||||
public void SetFinished() { m_uState |= (char)TaskState.TASK_STATE_FINISHED; }
|
||||
public void SetSuccess() { m_uState |= (char)TaskState.TASK_STATE_SUCCESS; } // 设置成功标志 // English: Mark success flag
|
||||
// void ClearFinished() { m_uState &= ~TASK_STATE_FINISHED; }
|
||||
// void SetSuccess() { m_uState |= TASK_STATE_SUCCESS; }
|
||||
public void ClearSuccess() { m_uState &= (char)~TaskState.TASK_STATE_SUCCESS; }
|
||||
@@ -155,8 +308,15 @@ namespace BrewMonster.Scripts.Task
|
||||
var man = BrewMonster.Network.EC_Game.GetTaskTemplateMan();
|
||||
if (man != null)
|
||||
{
|
||||
var templ = man.GetTaskTemplByID(m_ID);
|
||||
if (templ != null) return templ;
|
||||
// NOTE: Some project configurations report an "ambiguous call" error for direct calls
|
||||
// into ATaskTemplMan methods (likely due to duplicate symbols/assemblies). Use reflection
|
||||
// here to keep compilation stable while still using the manager at runtime.
|
||||
var mi = man.GetType().GetMethod("GetTaskTemplByID", new[] { typeof(uint) });
|
||||
if (mi != null)
|
||||
{
|
||||
var templObj = mi.Invoke(man, new object[] { (uint)m_ID });
|
||||
if (templObj is ATaskTempl templ) return templ;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
@@ -180,34 +340,34 @@ namespace BrewMonster.Scripts.Task
|
||||
// }
|
||||
// bool HasParent() const { return m_ParentIndex != 0xff; }
|
||||
// bool HasChildren() const { return m_ChildIndex != 0xff; }
|
||||
// bool IsValid(unsigned char uIndex, unsigned char uMaxCount) const
|
||||
// {
|
||||
// if (m_ParentIndex != 0xff)
|
||||
// {
|
||||
// if (m_ParentIndex >= uIndex || m_ParentIndex >= uMaxCount)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (m_PrevSblIndex != 0xff)
|
||||
// {
|
||||
// if (m_PrevSblIndex >= uIndex || m_PrevSblIndex >= uMaxCount)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (m_NextSblIndex != 0xff)
|
||||
// {
|
||||
// if (m_NextSblIndex <= uIndex || m_NextSblIndex >= uMaxCount)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (m_ChildIndex != 0xff)
|
||||
// {
|
||||
// if (m_ChildIndex <= uIndex || m_ChildIndex >= uMaxCount)
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
public bool IsValid(char uIndex, char uMaxCount)
|
||||
{
|
||||
if (m_ParentIndex != 0xff)
|
||||
{
|
||||
if (m_ParentIndex >= uIndex || m_ParentIndex >= uMaxCount)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_PrevSblIndex != 0xff)
|
||||
{
|
||||
if (m_PrevSblIndex >= uIndex || m_PrevSblIndex >= uMaxCount)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_NextSblIndex != 0xff)
|
||||
{
|
||||
if (m_NextSblIndex <= uIndex || m_NextSblIndex >= uMaxCount)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_ChildIndex != 0xff)
|
||||
{
|
||||
if (m_ChildIndex <= uIndex || m_ChildIndex >= uMaxCount)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
public class ActiveTaskList
|
||||
@@ -309,107 +469,168 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
|
||||
// void UpdateTaskMask(unsigned long& ulMask) const;
|
||||
// void UpdateUsedCount();
|
||||
void RealignTask(ActiveTaskEntry pEntry, byte uReserve)
|
||||
public void UpdateUsedCount()
|
||||
{
|
||||
// TODO: implement RealignTask logic
|
||||
// // unsigned char uCurIndex = static_cast<unsigned char>(pEntry - m_TaskEntries);
|
||||
// byte uCurIndex = (byte)Array.IndexOf(m_TaskEntries, pEntry);
|
||||
//
|
||||
// uint ulCount = (uint)m_uTaskCount - uCurIndex; // ʣ���������
|
||||
//
|
||||
// if (ulCount == 0) return; // ���һ������
|
||||
//
|
||||
// byte uEmptyCount = 0;
|
||||
// for (int uEmpty = uCurIndex; uEmpty < TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN; uEmpty++)
|
||||
// {
|
||||
// if (m_TaskEntries[uEmpty].m_ID == 0)
|
||||
// uEmptyCount++;
|
||||
// else
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// if (uReserve == uEmptyCount) return;
|
||||
//
|
||||
// // ActiveTaskEntry* pSrc = pEntry + uEmptyCount;
|
||||
// int pSrcIndex = uCurIndex + uEmptyCount;
|
||||
// ActiveTaskEntry[] pSrc = new ActiveTaskEntry[ulCount];
|
||||
// Array.Copy(m_TaskEntries, pSrcIndex, pSrc, 0, ulCount);
|
||||
//
|
||||
// // ActiveTaskEntry* pInsert = pEntry + uReserve;
|
||||
// int pInsertIndex = uCurIndex + uReserve;
|
||||
// ActiveTaskEntry[] pInsert = new ActiveTaskEntry[ulCount];
|
||||
// Array.Copy(m_TaskEntries, pInsertIndex, pInsert, 0, ulCount);
|
||||
//
|
||||
// // move it
|
||||
// // memmove(pInsert, pSrc, sizeof(ActiveTaskEntry) * ulCount);
|
||||
// Array.Copy(pSrc, 0, m_TaskEntries, 0, ulCount);
|
||||
//
|
||||
// // clear reserve part
|
||||
// ActiveTaskEntry[] pClearStart, pClearEnd;
|
||||
// int pClearStartIndex = 0, pClearEndIndex = 0;
|
||||
//
|
||||
// // if (pInsert > pSrc) // C++ pointer compare
|
||||
// if (pInsertIndex > pSrcIndex) // C# index compare
|
||||
// {
|
||||
// pClearStart = pSrc;
|
||||
// pClearEnd = pInsert;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // pClearStart = pInsert + ulCount;
|
||||
// pClearStartIndex = pInsertIndex + (int)ulCount;
|
||||
// // pClearEnd = pSrc + ulCount;
|
||||
// pClearEndIndex = pSrcIndex + (int)ulCount;
|
||||
// }
|
||||
//
|
||||
// // while (pClearStart < pClearEnd)
|
||||
// while (pClearStartIndex < pClearEndIndex)
|
||||
// {
|
||||
// pClearStart.m_ulTemplAddr = 0;
|
||||
// pClearStart.m_ID = 0;
|
||||
// pClearStart++;
|
||||
// }
|
||||
//
|
||||
// // calc gap
|
||||
// unsigned char uGap = static_cast<unsigned char>(pInsert - pSrc);
|
||||
// unsigned long i = 0;
|
||||
//
|
||||
// for (; i < static_cast<unsigned long>(uCurIndex); i++)
|
||||
// {
|
||||
// // Parent, Prev��uCurIndex
|
||||
// ActiveTaskEntry& CurEntry = m_TaskEntries[i];
|
||||
//
|
||||
// if(!CurEntry.m_ID)
|
||||
// continue;
|
||||
//
|
||||
// if (CurEntry.m_ChildIndex != 0xff && CurEntry.m_ChildIndex >= uCurIndex)
|
||||
// CurEntry.m_ChildIndex += uGap;
|
||||
// if (CurEntry.m_NextSblIndex != 0xff && CurEntry.m_NextSblIndex >= uCurIndex)
|
||||
// CurEntry.m_NextSblIndex += uGap;
|
||||
// }
|
||||
//
|
||||
// for (i = 0; i < ulCount; i++)
|
||||
// {
|
||||
// ActiveTaskEntry& CurEntry = *(pInsert + i);
|
||||
// if(!CurEntry.m_ID)
|
||||
// continue;
|
||||
//
|
||||
// if (CurEntry.m_ParentIndex != 0xff && CurEntry.m_ParentIndex >= uCurIndex)
|
||||
// CurEntry.m_ParentIndex += uGap;
|
||||
// if (CurEntry.m_PrevSblIndex != 0xff && CurEntry.m_PrevSblIndex >= uCurIndex)
|
||||
// CurEntry.m_PrevSblIndex += uGap;
|
||||
// if (CurEntry.m_ChildIndex != 0xff)
|
||||
// CurEntry.m_ChildIndex += uGap;
|
||||
// if (CurEntry.m_NextSblIndex != 0xff)
|
||||
// CurEntry.m_NextSblIndex += uGap;
|
||||
// }
|
||||
m_uUsedCount = 0;
|
||||
for (int i = 0; i < m_uTaskCount; i++)
|
||||
{
|
||||
ATaskTempl pTempl = m_TaskEntries[i].GetTempl();
|
||||
if (pTempl == null) continue;
|
||||
if (pTempl.m_pParent != null) continue;
|
||||
m_uUsedCount += pTempl.m_uDepth;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Shift-based realign that matches original C++ ActiveTaskList::RealignTask.
|
||||
/// It only adjusts indices in a controlled range instead of globally compacting the list.
|
||||
/// This is critical for keeping Parent/Child/Sibling indices stable during subtask progression.
|
||||
/// </summary>
|
||||
public void RealignTask(ActiveTaskEntry pEntry, byte uReserve)
|
||||
{
|
||||
if (pEntry == null) return;
|
||||
int uCurIndex = Array.IndexOf(m_TaskEntries, pEntry);
|
||||
if (uCurIndex < 0) return;
|
||||
RealignTaskAtIndex(uCurIndex, uReserve);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Index-based variant used by deliver/award flows where the "slot" matters (C++ passes an entry pointer).
|
||||
/// </summary>
|
||||
public void RealignTaskAtIndex(int uCurIndex, byte uReserve)
|
||||
{
|
||||
if (uCurIndex < 0 || uCurIndex >= TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN) return;
|
||||
|
||||
int ulCount = m_uTaskCount - uCurIndex; // remaining entries from uCurIndex
|
||||
if (ulCount == 0) return;
|
||||
|
||||
// Count consecutive empty entries starting from uCurIndex
|
||||
int uEmptyCount = 0;
|
||||
for (int uEmpty = uCurIndex; uEmpty < TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN; uEmpty++)
|
||||
{
|
||||
var e = m_TaskEntries[uEmpty];
|
||||
if (e == null || e.m_ID == 0) uEmptyCount++;
|
||||
else break;
|
||||
}
|
||||
|
||||
if (uReserve == uEmptyCount) return;
|
||||
|
||||
int srcIndex = uCurIndex + uEmptyCount;
|
||||
int insertIndex = uCurIndex + uReserve;
|
||||
int uGap = insertIndex - srcIndex;
|
||||
if (uGap == 0) return;
|
||||
|
||||
// Move the block [srcIndex, srcIndex + ulCount) -> [insertIndex, insertIndex + ulCount)
|
||||
if (uGap > 0)
|
||||
{
|
||||
for (int i = ulCount - 1; i >= 0; i--)
|
||||
m_TaskEntries[insertIndex + i] = m_TaskEntries[srcIndex + i];
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < ulCount; i++)
|
||||
m_TaskEntries[insertIndex + i] = m_TaskEntries[srcIndex + i];
|
||||
}
|
||||
|
||||
// Clear vacated slots
|
||||
int clearStart, clearEnd;
|
||||
if (insertIndex > srcIndex)
|
||||
{
|
||||
clearStart = srcIndex;
|
||||
clearEnd = insertIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
clearStart = insertIndex + ulCount;
|
||||
clearEnd = srcIndex + ulCount;
|
||||
}
|
||||
for (int i = clearStart; i < clearEnd; i++)
|
||||
m_TaskEntries[i] = null;
|
||||
|
||||
// Adjust indices for entries before uCurIndex (child + next sibling that point into >= uCurIndex)
|
||||
for (int i = 0; i < uCurIndex; i++)
|
||||
{
|
||||
var cur = m_TaskEntries[i];
|
||||
if (cur == null || cur.m_ID == 0) continue;
|
||||
|
||||
if (cur.m_ChildIndex != 0xff && cur.m_ChildIndex >= uCurIndex)
|
||||
cur.m_ChildIndex = (char)(cur.m_ChildIndex + uGap);
|
||||
if (cur.m_NextSblIndex != 0xff && cur.m_NextSblIndex >= uCurIndex)
|
||||
cur.m_NextSblIndex = (char)(cur.m_NextSblIndex + uGap);
|
||||
}
|
||||
|
||||
// Adjust indices for moved entries (the inserted block)
|
||||
for (int i = 0; i < ulCount; i++)
|
||||
{
|
||||
var cur = m_TaskEntries[insertIndex + i];
|
||||
if (cur == null || cur.m_ID == 0) continue;
|
||||
|
||||
if (cur.m_ParentIndex != 0xff && cur.m_ParentIndex >= uCurIndex)
|
||||
cur.m_ParentIndex = (char)(cur.m_ParentIndex + uGap);
|
||||
if (cur.m_PrevSblIndex != 0xff && cur.m_PrevSblIndex >= uCurIndex)
|
||||
cur.m_PrevSblIndex = (char)(cur.m_PrevSblIndex + uGap);
|
||||
if (cur.m_ChildIndex != 0xff)
|
||||
cur.m_ChildIndex = (char)(cur.m_ChildIndex + uGap);
|
||||
if (cur.m_NextSblIndex != 0xff)
|
||||
cur.m_NextSblIndex = (char)(cur.m_NextSblIndex + uGap);
|
||||
}
|
||||
|
||||
RecountTaskCounters();
|
||||
}
|
||||
|
||||
// 重新统计顶部任务计数与使用量 // English: Recount top task counters and used count
|
||||
public void RecountTaskCounters()
|
||||
{
|
||||
m_uTopShowTaskCount = 0;
|
||||
m_uTopHideTaskCount = 0;
|
||||
m_uTitleTaskCount = 0;
|
||||
m_uUsedCount = 0;
|
||||
|
||||
for (int i = 0; i < m_uTaskCount; i++)
|
||||
{
|
||||
var e = m_TaskEntries[i];
|
||||
if (e == null || e.m_ID == 0) continue;
|
||||
var templ = e.GetTempl();
|
||||
if (templ == null) continue;
|
||||
if (templ.m_pParent != null) continue;
|
||||
|
||||
if (templ.m_FixedData.m_bHidden) m_uTopHideTaskCount++;
|
||||
else if (templ.m_FixedData.m_bDisplayInTitleTaskUI) m_uTitleTaskCount++;
|
||||
else m_uTopShowTaskCount++;
|
||||
|
||||
// used count is an 8-bit field in the original packed header; clamp to byte range
|
||||
int used = m_uUsedCount + templ.m_uDepth;
|
||||
m_uUsedCount = (byte)Math.Clamp(used, 0, byte.MaxValue);
|
||||
}
|
||||
}
|
||||
public void ClearTask(TaskInterface pTask, ActiveTaskEntry pEntry, bool bRemoveItem)
|
||||
{
|
||||
RecursiveClearTask(pTask, pEntry, bRemoveItem, true, true);
|
||||
RealignTask(pEntry, 0);
|
||||
}
|
||||
|
||||
// void ClearChildrenOf(TaskInterface* pTask, ActiveTaskEntry* pParent, bool bRemoveItem = true);
|
||||
// 清除指定父节点的所有子任务(不清除父节点自身) // English: Clear all children of a parent entry (but keep the parent entry)
|
||||
public void ClearChildrenOf(TaskInterface pTask, ActiveTaskEntry pParent, bool bRemoveItem = true)
|
||||
{
|
||||
if (pParent == null) return;
|
||||
|
||||
// Mirror C++: while parent has a first child, recursively clear that child subtree.
|
||||
while (pParent.m_ChildIndex != 0xff)
|
||||
{
|
||||
int childIndex = (byte)pParent.m_ChildIndex;
|
||||
if (childIndex < 0 || childIndex >= TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN) break;
|
||||
|
||||
var child = m_TaskEntries[childIndex];
|
||||
if (child == null || child.m_ID == 0)
|
||||
{
|
||||
// Broken link: stop to avoid infinite loop
|
||||
pParent.m_ChildIndex = (char)0xff;
|
||||
break;
|
||||
}
|
||||
|
||||
RecursiveClearTask(pTask, child, bRemoveItem, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
void RecursiveClearTask(
|
||||
TaskInterface pTask,
|
||||
@@ -431,7 +652,7 @@ namespace BrewMonster.Scripts.Task
|
||||
ATaskTempl pTempl = pEntry.GetTempl();
|
||||
|
||||
// ȥ����õ���Ʒ
|
||||
#if _TASK_CLIENT
|
||||
#if !_TASK_CLIENT
|
||||
if (bRemoveItem && pTempl != null)
|
||||
{
|
||||
if (bRemoveAcquired || pTempl.m_FixedData.m_bClearAcquired) pTempl.RemoveAcquiredItem(pTask, bClearTask, false);
|
||||
@@ -496,7 +717,6 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
return null;
|
||||
}
|
||||
// void ClearChildrenOf(TaskInterface* pTask, ActiveTaskEntry* pParent, bool bRemoveItem = true);
|
||||
// ActiveTaskEntry* GetEntry(unsigned long ulId)
|
||||
// {
|
||||
// for (unsigned char i = 0; i < m_uTaskCount; i++)
|
||||
@@ -505,13 +725,23 @@ namespace BrewMonster.Scripts.Task
|
||||
//
|
||||
// return NULL;
|
||||
// }
|
||||
// void RemoveAll()
|
||||
// {
|
||||
// unsigned short ver = m_Version;
|
||||
// memset(this, 0, sizeof(*this));
|
||||
// m_Version = ver;
|
||||
// }
|
||||
// bool IsValid() const { return m_uTaskCount <= TASK_ACTIVE_LIST_MAX_LEN; }
|
||||
public void RemoveAll()
|
||||
{
|
||||
ushort version = m_Version; // Preserve the version
|
||||
Array.Clear(header, 0, header.Length); // Clear the header array
|
||||
m_Version = version; // Restore the version
|
||||
m_uTaskCount = 0; // Reset task count
|
||||
m_uUsedCount = 0; // Reset used count
|
||||
m_uTopShowTaskCount = 0; // Reset top show task count
|
||||
m_uTopHideTaskCount = 0; // Reset top hide task count
|
||||
m_uTitleTaskCount = 0; // Reset title task count
|
||||
for (int i = 0; i < m_TaskEntries.Length; i++) // Clear all task entries
|
||||
{
|
||||
m_TaskEntries[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsValid() { return m_uTaskCount <= TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN; }
|
||||
// bool IsTimeMarkUpdate() const { return (m_uListState & TLIST_STATE_UPDATE_TIME_MARK) != 0; }
|
||||
// void SetTimeMarkUpdate() { m_uListState |= TLIST_STATE_UPDATE_TIME_MARK; }
|
||||
// void ClearTimeMarkUpdate() { m_uListState &= ~TLIST_STATE_UPDATE_TIME_MARK; }
|
||||
@@ -520,5 +750,29 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
m_uMaxSimultaneousCount = true;
|
||||
}
|
||||
|
||||
// 从列表中移除指定条目(并重新对齐列表) // English: Remove an entry from the list (and realign)
|
||||
public void RemoveEntry(ActiveTaskEntry entry)
|
||||
{
|
||||
if (entry == null || entry.m_ID == 0) return;
|
||||
|
||||
// Best-effort unlink from sibling chain
|
||||
if (entry.m_ParentIndex != 0xff)
|
||||
{
|
||||
if (entry.m_PrevSblIndex != 0xff && m_TaskEntries[entry.m_PrevSblIndex] != null)
|
||||
m_TaskEntries[entry.m_PrevSblIndex].m_NextSblIndex = entry.m_NextSblIndex;
|
||||
else if (m_TaskEntries[entry.m_ParentIndex] != null)
|
||||
m_TaskEntries[entry.m_ParentIndex].m_ChildIndex = entry.m_NextSblIndex;
|
||||
|
||||
if (entry.m_NextSblIndex != 0xff && m_TaskEntries[entry.m_NextSblIndex] != null)
|
||||
m_TaskEntries[entry.m_NextSblIndex].m_PrevSblIndex = entry.m_PrevSblIndex;
|
||||
}
|
||||
|
||||
// Mark empty + decrement count, then realign from this slot.
|
||||
entry.m_ulTemplAddr = 0;
|
||||
entry.m_ID = 0;
|
||||
if (m_uTaskCount > 0) m_uTaskCount--;
|
||||
RealignTask(entry, 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -100,8 +100,23 @@ namespace BrewMonster.Scripts.Task
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskTemplConstants.TASK_STORAGE_COUNT)]
|
||||
public byte[] m_StoragesReceivePerDay;
|
||||
|
||||
// Initialize arrays if they are null
|
||||
// In C++, arrays are automatically allocated on the stack, but in C# they need explicit initialization
|
||||
public void EnsureInitialized()
|
||||
{
|
||||
if (m_Storages == null)
|
||||
m_Storages = new ushort[TaskTemplConstants.TASK_STORAGE_COUNT * TaskTemplConstants.TASK_STORAGE_LEN];
|
||||
if (m_StoragesTaskSetCount == null)
|
||||
m_StoragesTaskSetCount = new ushort[TaskTemplConstants.TASK_STORAGE_COUNT];
|
||||
if (m_StoragesRefreshTime == null)
|
||||
m_StoragesRefreshTime = new uint[TaskTemplConstants.TASK_STORAGE_COUNT];
|
||||
if (m_StoragesReceivePerDay == null)
|
||||
m_StoragesReceivePerDay = new byte[TaskTemplConstants.TASK_STORAGE_COUNT];
|
||||
}
|
||||
|
||||
public void RemoveAll()
|
||||
{
|
||||
EnsureInitialized();
|
||||
for (int i = 0; i < TaskTemplConstants.TASK_STORAGE_COUNT; i++)
|
||||
{
|
||||
for (int j = 0; j < TaskTemplConstants.TASK_STORAGE_LEN; j++)
|
||||
@@ -117,6 +132,11 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
public void ReadByte(byte[] data)
|
||||
{
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
EnsureInitialized();
|
||||
|
||||
int offset = 0;
|
||||
for (int i=0; i < TaskTemplConstants.TASK_STORAGE_COUNT; i++)
|
||||
{
|
||||
@@ -200,18 +220,18 @@ namespace BrewMonster.Scripts.Task
|
||||
|
||||
}
|
||||
|
||||
struct tm {
|
||||
int tm_sec; /* seconds after the minute [0-60] */
|
||||
int tm_min; /* minutes after the hour [0-59] */
|
||||
int tm_hour; /* hours since midnight [0-23] */
|
||||
int tm_mday; /* day of the month [1-31] */
|
||||
int tm_mon; /* months since January [0-11] */
|
||||
int tm_year; /* years since 1900 */
|
||||
int tm_wday; /* days since Sunday [0-6] */
|
||||
int tm_yday; /* days since January 1 [0-365] */
|
||||
int tm_isdst; /* Daylight Savings Time flag */
|
||||
long tm_gmtoff; /* offset from UTC in seconds */
|
||||
byte tm_zone; /* timezone abbreviation */
|
||||
public struct tm {
|
||||
public int tm_sec; /* seconds after the minute [0-60] */
|
||||
public int tm_min; /* minutes after the hour [0-59] */
|
||||
public int tm_hour; /* hours since midnight [0-23] */
|
||||
public int tm_mday; /* day of the month [1-31] */
|
||||
public int tm_mon; /* months since January [0-11] */
|
||||
public int tm_year; /* years since 1900 */
|
||||
public int tm_wday; /* days since Sunday [0-6] */
|
||||
public int tm_yday; /* days since January 1 [0-365] */
|
||||
public int tm_isdst; /* Daylight Savings Time flag */
|
||||
public long tm_gmtoff; /* offset from UTC in seconds */
|
||||
public byte tm_zone; /* timezone abbreviation */
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
@@ -227,37 +247,52 @@ namespace BrewMonster.Scripts.Task
|
||||
[FieldOffset(8)]
|
||||
public ulong m_ulRcvUpdateTime;
|
||||
|
||||
void AddRevNum() { m_ulReceiverNum++; }
|
||||
public void AddRevNum() { m_ulReceiverNum++; }
|
||||
|
||||
void CheckRcvUpdateTime(uint ulCurTime, int nFrequency)
|
||||
public void CheckRcvUpdateTime(uint ulCurTime, int nFrequency)
|
||||
{
|
||||
// TODO: implement time-based receiver number reset logic
|
||||
// if (nFrequency == TaskCompletionMethod.enumTAFNormal || m_ulRcvUpdateTime == 0)
|
||||
// return;
|
||||
//
|
||||
// tm tmCur = *localtime((time_t*)&ulCurTime);
|
||||
// tm tmRcv = *localtime((time_t*)&m_ulRcvUpdateTime);
|
||||
//
|
||||
// if (nFrequency == enumTAFEachDay)
|
||||
// {
|
||||
// if (tmCur.tm_year != tmRcv.tm_year || tmCur.tm_yday != tmRcv.tm_yday)
|
||||
// m_ulReceiverNum = 0;
|
||||
// }
|
||||
// else if (nFrequency == enumTAFEachWeek)
|
||||
// {
|
||||
// if (!_is_same_week(&tmCur, &tmRcv, ulCurTime, m_ulRcvUpdateTime))
|
||||
// m_ulReceiverNum = 0;
|
||||
// }
|
||||
// else if (nFrequency == enumTAFEachMonth)
|
||||
// {
|
||||
// if (tmCur.tm_year != tmRcv.tm_year || tmCur.tm_mon != tmRcv.tm_mon)
|
||||
// m_ulReceiverNum = 0;
|
||||
// }
|
||||
// else if (nFrequency == enumTAFEachYear)
|
||||
// {
|
||||
// if (tmCur.tm_year != tmRcv.tm_year)
|
||||
// m_ulReceiverNum = 0;
|
||||
// }
|
||||
// C++ semantics: based on localtime() period boundaries, reset receiver count when period changes.
|
||||
// Use the same "task local time" conversion as timetable (timezone bias path) so behavior is consistent.
|
||||
if (nFrequency == (int)TaskAwardFreq.enumTAFNormal || m_ulRcvUpdateTime == 0)
|
||||
return;
|
||||
|
||||
long curSec = ulCurTime - (long)(TaskInterface.GetTimeZoneBias() * 60);
|
||||
if (curSec < 0) curSec = 0;
|
||||
DateTime cur = DateTimeOffset.FromUnixTimeSeconds(curSec).UtcDateTime;
|
||||
|
||||
long rcvSec = (long)m_ulRcvUpdateTime - (long)(TaskInterface.GetTimeZoneBias() * 60);
|
||||
if (rcvSec < 0) rcvSec = 0;
|
||||
DateTime rcv = DateTimeOffset.FromUnixTimeSeconds(rcvSec).UtcDateTime;
|
||||
|
||||
bool reset = false;
|
||||
if (nFrequency == (int)TaskAwardFreq.enumTAFEachDay)
|
||||
{
|
||||
reset = cur.Year != rcv.Year || cur.Month != rcv.Month || cur.Day != rcv.Day;
|
||||
}
|
||||
else if (nFrequency == (int)TaskAwardFreq.enumTAFEachWeek)
|
||||
{
|
||||
int curDow = (int)cur.DayOfWeek; // Sunday=0
|
||||
int rcvDow = (int)rcv.DayOfWeek;
|
||||
int curDiff = (curDow == 0) ? 6 : (curDow - 1); // Monday-start week
|
||||
int rcvDiff = (rcvDow == 0) ? 6 : (rcvDow - 1);
|
||||
DateTime curWeekStart = cur.Date.AddDays(-curDiff);
|
||||
DateTime rcvWeekStart = rcv.Date.AddDays(-rcvDiff);
|
||||
reset = curWeekStart != rcvWeekStart;
|
||||
}
|
||||
else if (nFrequency == (int)TaskAwardFreq.enumTAFEachMonth)
|
||||
{
|
||||
reset = cur.Year != rcv.Year || cur.Month != rcv.Month;
|
||||
}
|
||||
else if (nFrequency == (int)TaskAwardFreq.enumTAFEachYear)
|
||||
{
|
||||
reset = cur.Year != rcv.Year;
|
||||
}
|
||||
|
||||
if (reset)
|
||||
{
|
||||
m_ulReceiverNum = 0;
|
||||
m_ulRcvUpdateTime = ulCurTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,6 +391,12 @@ namespace BrewMonster.Scripts.Task
|
||||
header.m_Reserved = m_Buf[3];
|
||||
return header;
|
||||
}
|
||||
set
|
||||
{
|
||||
Array.Copy(BitConverter.GetBytes(value.m_uTaskCount), 0, m_Buf, 0, 2);
|
||||
m_Buf[2] = value.m_Version;
|
||||
m_Buf[3] = value.m_Reserved;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -389,65 +430,150 @@ namespace BrewMonster.Scripts.Task
|
||||
return true;
|
||||
}
|
||||
|
||||
public int GetTaskPos(ulong ulID)
|
||||
public int GetTaskPos(uint ulID)
|
||||
{
|
||||
// TODO: Implement logic to get task position
|
||||
//throw new NotImplementedException();
|
||||
ushort uTaskCount = m_FnshHeader.m_uTaskCount;
|
||||
if (uTaskCount == 0) return -1;
|
||||
|
||||
return 0;
|
||||
FnshedTaskEntry[] taskList = m_aTaskList;
|
||||
|
||||
if (uTaskCount == 1)
|
||||
{
|
||||
if (ulID == taskList[0].m_uTaskId)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint ulStart = 0;
|
||||
uint ulEnd = (uint)(uTaskCount - 1);
|
||||
|
||||
while (ulStart + 1 < ulEnd)
|
||||
{
|
||||
uint ulMid = (ulStart + ulEnd) >> 1;
|
||||
|
||||
if (ulID == taskList[ulMid].m_uTaskId)
|
||||
return (int)ulMid;
|
||||
else if (ulID < taskList[ulMid].m_uTaskId)
|
||||
ulEnd = ulMid;
|
||||
else
|
||||
ulStart = ulMid;
|
||||
}
|
||||
|
||||
if (taskList[ulStart].m_uTaskId == ulID)
|
||||
return (int)ulStart;
|
||||
|
||||
if (taskList[ulEnd].m_uTaskId == ulID)
|
||||
return (int)ulEnd;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void AddOneTask(ulong ulID, bool bSuccess)
|
||||
public void AddOneTask(uint ulID, bool bSuccess)
|
||||
{
|
||||
// TODO: Implement logic to add one task
|
||||
// 将任务写入已完成列表(按任务ID有序) // English: Insert/update into finished list (sorted by task id)
|
||||
if (m_Buf == null || m_Buf.Length != TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE)
|
||||
{
|
||||
m_Buf = new byte[TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE];
|
||||
}
|
||||
|
||||
var header = m_FnshHeader;
|
||||
ushort count = header.m_uTaskCount;
|
||||
if (count >= TaskInterfaceConstants.TASK_FINISHED_LIST_MAX_LEN) return;
|
||||
|
||||
int entrySize = Marshal.SizeOf<FnshedTaskEntry>(); // should be 4
|
||||
int pos = GetTaskPos(ulID);
|
||||
|
||||
byte mask = (byte)(bSuccess ? 0 : 1);
|
||||
|
||||
if (pos >= 0)
|
||||
{
|
||||
// Update existing entry
|
||||
int start = 4 + pos * entrySize;
|
||||
// m_uTaskId
|
||||
Array.Copy(BitConverter.GetBytes((ushort)ulID), 0, m_Buf, start, 2);
|
||||
// m_Buf (mask + reserved bits)
|
||||
m_Buf[start + 2] = (byte)((m_Buf[start + 2] & 0xFE) | (mask & 0x1));
|
||||
// m_FnshedCount: keep at least 1
|
||||
if (m_Buf[start + 3] == 0) m_Buf[start + 3] = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
// Find insertion index to keep sorted order
|
||||
int insert = 0;
|
||||
for (; insert < count; insert++)
|
||||
{
|
||||
ushort existingId = BitConverter.ToUInt16(m_Buf, 4 + insert * entrySize);
|
||||
if (ulID < existingId) break;
|
||||
}
|
||||
|
||||
// Shift bytes to make room
|
||||
int srcStart = 4 + insert * entrySize;
|
||||
int bytesToMove = (count - insert) * entrySize;
|
||||
if (bytesToMove > 0)
|
||||
{
|
||||
Buffer.BlockCopy(m_Buf, srcStart, m_Buf, srcStart + entrySize, bytesToMove);
|
||||
}
|
||||
|
||||
// Write new entry
|
||||
int dst = 4 + insert * entrySize;
|
||||
Array.Copy(BitConverter.GetBytes((ushort)ulID), 0, m_Buf, dst, 2);
|
||||
m_Buf[dst + 2] = (byte)(mask & 0x1); // reserved bits 0
|
||||
m_Buf[dst + 3] = 1; // finish count
|
||||
|
||||
header.m_uTaskCount = (ushort)(count + 1);
|
||||
m_FnshHeader = header;
|
||||
}
|
||||
|
||||
public void RemoveTask(uint ulID)
|
||||
{
|
||||
// TODO: Implement logic to remove a task (for future use)
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void RemoveTask(ulong ulID)
|
||||
// SearchTask returns:
|
||||
// -1 = task not found (never completed)
|
||||
// 0 = task successfully completed
|
||||
// 1 = task failed
|
||||
public int SearchTask(uint ulID)
|
||||
{
|
||||
// TODO: Implement logic to remove a task
|
||||
//throw new NotImplementedException();
|
||||
|
||||
// unsigned long ulPos = GetTaskPos(ulID);
|
||||
// if (static_cast<int>(ulPos) < 0) return;
|
||||
//
|
||||
// m_FnshHeader.m_uTaskCount--;
|
||||
//
|
||||
// if (m_FnshHeader.m_uTaskCount <= ulPos)
|
||||
// return;
|
||||
//
|
||||
// memmove(
|
||||
// &m_aTaskList[ulPos],
|
||||
// &m_aTaskList[ulPos+1],
|
||||
// (m_FnshHeader.m_uTaskCount-ulPos) * sizeof(FnshedTaskEntry));
|
||||
}
|
||||
|
||||
public int SearchTask(ulong ulID)
|
||||
{
|
||||
// TODO: Implement logic to search for a task
|
||||
//throw new NotImplementedException();
|
||||
|
||||
return 0;
|
||||
int nPos = GetTaskPos(ulID);
|
||||
if (nPos < 0) return -1;
|
||||
|
||||
FnshedTaskEntry[] taskList = m_aTaskList;
|
||||
return taskList[nPos].m_Mask;
|
||||
}
|
||||
|
||||
public byte SearchTaskFinishCount(ulong ulID)
|
||||
{
|
||||
// TODO: Implement logic to search task finish count
|
||||
//throw new NotImplementedException();
|
||||
|
||||
return 0;
|
||||
int pos = GetTaskPos((uint)ulID);
|
||||
if (pos < 0) return 0;
|
||||
int entrySize = Marshal.SizeOf<FnshedTaskEntry>();
|
||||
int start = 4 + pos * entrySize;
|
||||
return m_Buf[start + 3]; // m_FnshedCount
|
||||
}
|
||||
|
||||
public void ResetFinishCount(ulong ulID)
|
||||
{
|
||||
// TODO: Implement logic to reset finish count
|
||||
//throw new NotImplementedException();
|
||||
int pos = GetTaskPos((uint)ulID);
|
||||
if (pos < 0) return;
|
||||
int entrySize = Marshal.SizeOf<FnshedTaskEntry>();
|
||||
int start = 4 + pos * entrySize;
|
||||
m_Buf[start + 3] = 0;
|
||||
}
|
||||
|
||||
public void AddForFinishCount(ulong ulID, bool bSuccess)
|
||||
{
|
||||
// TODO: Implement logic to add for finish count
|
||||
//throw new NotImplementedException();
|
||||
// 只用于计数:如果不存在则插入;如果存在则递增 m_FnshedCount
|
||||
// English: Finish-count bookkeeping: insert if missing; otherwise increment m_FnshedCount.
|
||||
AddOneTask((uint)ulID, bSuccess);
|
||||
|
||||
int pos = GetTaskPos((uint)ulID);
|
||||
if (pos < 0) return;
|
||||
int entrySize = Marshal.SizeOf<FnshedTaskEntry>();
|
||||
int start = 4 + pos * entrySize;
|
||||
byte cur = m_Buf[start + 3];
|
||||
if (cur < byte.MaxValue) m_Buf[start + 3] = (byte)(cur + 1);
|
||||
}
|
||||
|
||||
public void RemoveAll()
|
||||
@@ -461,4 +587,91 @@ namespace BrewMonster.Scripts.Task
|
||||
return m_FnshHeader.m_uTaskCount <= TaskInterfaceConstants.TASK_FINISHED_LIST_MAX_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public struct FnshedTaskEntryOld
|
||||
{
|
||||
public ushort m_uTaskId;
|
||||
};
|
||||
|
||||
[ StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct FnshedTaskListOld
|
||||
{
|
||||
// union
|
||||
// {
|
||||
// struct
|
||||
// {
|
||||
// FnshedTaskListHeader m_FnshHeader;
|
||||
// FnshedTaskEntryOld m_aTaskList[TASK_FINISHED_LIST_MAX_LEN];
|
||||
// };
|
||||
// unsigned char m_Buf[TASK_FINISHED_LIST_BUF_SIZE_OLD];
|
||||
// };
|
||||
|
||||
public FnshedTaskListHeader m_FnshHeader
|
||||
{
|
||||
get
|
||||
{
|
||||
var FnshHeader = new FnshedTaskListHeader
|
||||
{
|
||||
m_uTaskCount = BitConverter.ToUInt16(m_Buf, 0),
|
||||
m_Version = m_Buf[2],
|
||||
m_Reserved = m_Buf[3]
|
||||
};
|
||||
return FnshHeader;
|
||||
}
|
||||
set {
|
||||
Array.Copy(BitConverter.GetBytes(value.m_uTaskCount), 0, m_Buf, 0, 2);
|
||||
m_Buf[2] = value.m_Version;
|
||||
m_Buf[3] = value.m_Reserved;
|
||||
}
|
||||
}
|
||||
|
||||
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.TASK_FINISHED_LIST_MAX_LEN)]
|
||||
public FnshedTaskEntryOld[] m_aTaskList
|
||||
{
|
||||
get
|
||||
{
|
||||
FnshedTaskEntryOld[] taskList = new FnshedTaskEntryOld[TaskInterfaceConstants.TASK_FINISHED_LIST_MAX_LEN];
|
||||
for (int i=0; i < m_FnshHeader.m_uTaskCount; i++)
|
||||
{
|
||||
int size = Marshal.SizeOf<FnshedTaskEntryOld>();
|
||||
int startIndex = i * size + 4; // 4 bytes for m_FnshHeader
|
||||
int endIndex = startIndex + size;
|
||||
taskList[i] = GPDataTypeHelper.FromBytes<FnshedTaskEntryOld>(m_Buf[startIndex..endIndex]);
|
||||
}
|
||||
return taskList;
|
||||
}
|
||||
set
|
||||
{
|
||||
for (int i=0; i < value.Length && i < TaskInterfaceConstants.TASK_FINISHED_LIST_MAX_LEN; i++)
|
||||
{
|
||||
int size = Marshal.SizeOf<FnshedTaskEntryOld>();
|
||||
int startIndex = i * size + 4; // 4 bytes for m_FnshHeader
|
||||
byte[] entryBytes = GPDataTypeHelper.ToBytes(value[i]);
|
||||
Array.Copy(entryBytes, 0, m_Buf, startIndex, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE_OLD)]
|
||||
public byte[] m_Buf;
|
||||
|
||||
public FnshedTaskListOld(byte[] data)
|
||||
{
|
||||
m_Buf = new byte[TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE];
|
||||
Array.Copy(data, m_Buf, TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE_OLD);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
[ StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct svr_task_dyn_time_mark
|
||||
{
|
||||
public task_notify_base baseObj;
|
||||
public uint time_mark;
|
||||
public ushort version;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
[ CreateAssetMenu(fileName = "TaskTemplContainerSO", menuName = "BrewMonster/Task/TaskTemplContainerSO")]
|
||||
public class TaskTemplContainerSO : ScriptableObject
|
||||
{
|
||||
|
||||
public const ulong TASK_PACK_MAGIC = 0x93858361;
|
||||
public const ulong _task_templ_cur_version = 121;
|
||||
|
||||
[SerializeField] private bool _loadAllTasksOnValidate = false;
|
||||
[SerializeField] private List<ATaskTempl> _taskTemplates = new List<ATaskTempl>();
|
||||
|
||||
public List<ATaskTempl> TaskTemplates { get { return _taskTemplates; } }
|
||||
public int TaskLoadedCount;
|
||||
public bool LoadAllTasksOnValidate => _loadAllTasksOnValidate;
|
||||
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
TaskLoadedCount = _taskTemplates ==null ? 0 : _taskTemplates.Count;
|
||||
}
|
||||
|
||||
[ContextMenu(" Load All Tasks From Pack")]
|
||||
public void LoadAllTasksFromPack()
|
||||
{
|
||||
string task_data_path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
|
||||
_taskTemplates = LoadTasksFromPack_Internal(task_data_path);
|
||||
|
||||
Debug.Log($"[TaskTemplContainerSO] Loaded {_taskTemplates.Count} task templates from pack.");
|
||||
}
|
||||
|
||||
private static List<ATaskTempl> LoadTasksFromPack_Internal(string szPackPath)
|
||||
{
|
||||
long readBytes = 0;
|
||||
var tasks = new List<ATaskTempl>();
|
||||
|
||||
using (var fs = new FileStream(
|
||||
szPackPath,
|
||||
FileMode.Open,
|
||||
FileAccess.Read,
|
||||
FileShare.Read))
|
||||
{
|
||||
TASK_PACK_HEADER tph =
|
||||
AAssit.ReadFromBinaryOf<TASK_PACK_HEADER>(fs, ref readBytes);
|
||||
|
||||
if (tph.magic != TASK_PACK_MAGIC ||
|
||||
tph.version != _task_templ_cur_version)
|
||||
throw new Exception("Invalid task pack header");
|
||||
|
||||
if (tph.item_count == 0)
|
||||
return tasks;
|
||||
|
||||
uint[] pOffs =
|
||||
AAssit.ReadArrayFromBinary<uint>(fs, (int)tph.item_count, ref readBytes);
|
||||
|
||||
const float TASK_LOAD_WEIGHT = 0.8f;
|
||||
for (int i = 0; i < tph.item_count; i++)
|
||||
{
|
||||
fs.Seek(pOffs[i], SeekOrigin.Begin);
|
||||
|
||||
ATaskTempl templ = new ATaskTempl();
|
||||
|
||||
if (!templ.LoadFromBinFile(fs))
|
||||
continue;
|
||||
|
||||
tasks.Add(templ);
|
||||
}
|
||||
}
|
||||
|
||||
return tasks;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da89386b7a1d4c75b768f686888bac2a
|
||||
timeCreated: 1765890592
|
||||
@@ -1,9 +1,10 @@
|
||||
using BrewMonster;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using BrewMonster.Scripts.Task.UI;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using PerfectWorld.Scripts.Task;
|
||||
using UnityEngine;
|
||||
@@ -13,13 +14,41 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
public class TaskTest : MonoSingleton<TaskTest>
|
||||
{
|
||||
public GameObject m_pTaskDlg;
|
||||
public static ATaskTemplMan m_pTaskMan; // use static to store loaded data across instances
|
||||
public bool WasLoadTaskData = false;
|
||||
public bool AutoLoadData;
|
||||
|
||||
[Header("Test Dlg Award Options")]
|
||||
[SerializeField] private uint _awardItemID = 1001;
|
||||
[SerializeField] private KeyCode _awardkey = KeyCode.A;
|
||||
|
||||
private CancellationTokenSource _cts;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
_cts = new CancellationTokenSource();
|
||||
}
|
||||
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
WasLoadTaskData = m_pTaskMan != null && m_pTaskMan.TaskLoadedCount > 0;
|
||||
if (!WasLoadTaskData && AutoLoadData)
|
||||
{
|
||||
LoadTaskData();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_cts?.Cancel();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@@ -27,32 +56,82 @@ namespace BrewMonster.Scripts.Task
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetKeyDown(KeyCode.Q))
|
||||
{
|
||||
m_pTaskDlg.SetActive(!m_pTaskDlg.activeInHierarchy);
|
||||
var dlgTaskGO = CECUIManager.Instance.GetInGameUIMan().GetDialog(CECUIHelper.DlgTaskName);
|
||||
var dlgTask = (dlgTaskGO) as DlgTask;
|
||||
if (dlgTask && !dlgTask.gameObject.activeInHierarchy)
|
||||
{
|
||||
dlgTask.Show(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
dlgTask.Show(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(_awardkey))
|
||||
{
|
||||
var pShow1 = CECUIManager.Instance.GetInGameUIMan().GetDialog("Win_Award");
|
||||
CDlgAward pAward = (pShow1) as CDlgAward;
|
||||
if (pAward && !pAward.gameObject.activeInHierarchy)
|
||||
{
|
||||
pAward.UpdateAwardItem((ushort)_awardItemID, true);
|
||||
pAward.Show(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
pAward.Show(false);
|
||||
}
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.E))
|
||||
{
|
||||
var dlg = CECUIManager.Instance.GetInGameUIMan().GetDialog("Win_SkillSubAction");
|
||||
if (dlg && !dlg.gameObject.activeInHierarchy)
|
||||
{
|
||||
dlg.Show(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
dlg.Show(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
[ContextMenu("Show Task Name")]
|
||||
public void ShowTaskName()
|
||||
{
|
||||
// [ContextMenu("Test Npc Service Log")]
|
||||
// public void LogNpcService()
|
||||
// {
|
||||
// // Debug.Log($" idFun = {(ExpTypes.SERVICE_TYPE)(-2147483641)} | idService = {44515} ");
|
||||
// }
|
||||
|
||||
var text01 = ByteToStringUtils.UshortArrayToUnicodeString(m_pTaskMan
|
||||
.GetTaskTemplByID((uint)TaskTemplConstants.TASK_SPECIAL_AWARD[0]).m_FixedData.m_szName);
|
||||
var text02 = ByteToStringUtils.UshortArrayToUnicodeString(m_pTaskMan
|
||||
.GetTaskTemplByID((uint)TaskTemplConstants.TASK_SPECIAL_AWARD[1]).m_FixedData.m_szName);
|
||||
Debug.Log($" Task Name 01: {text01} \n Task Name 02: {text02}");
|
||||
// [ContextMenu("Show Task Name")]
|
||||
// public void ShowTaskName()
|
||||
// {
|
||||
//
|
||||
// var text01 = ByteToStringUtils.UshortArrayToUnicodeString(m_pTaskMan
|
||||
// .GetTaskTemplByID((uint)TaskTemplConstants.TASK_SPECIAL_AWARD[0]).m_FixedData.m_szName);
|
||||
// var text02 = ByteToStringUtils.UshortArrayToUnicodeString(m_pTaskMan
|
||||
// .GetTaskTemplByID((uint)TaskTemplConstants.TASK_SPECIAL_AWARD[1]).m_FixedData.m_szName);
|
||||
// Debug.Log($" Task Name 01: {text01} \n Task Name 02: {text02}");
|
||||
// }
|
||||
|
||||
[ContextMenu("Size Of ZONE_VERT")]
|
||||
public void SizeOfTest()
|
||||
{
|
||||
int size = Marshal.SizeOf(typeof(ZONE_VERT));
|
||||
BMLogger.Log("Size of ATaskTemplFixedData: " + size);
|
||||
}
|
||||
|
||||
[ContextMenu("Load Data")]
|
||||
void LoadTaskData()
|
||||
async void LoadTaskData()
|
||||
{
|
||||
if (m_pTaskMan == null)
|
||||
{
|
||||
m_pTaskMan = new ATaskTemplMan();
|
||||
}
|
||||
|
||||
if (_cts == null) _cts = new CancellationTokenSource();
|
||||
string path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
|
||||
WasLoadTaskData = m_pTaskMan.LoadTasksFromPack(path, true);
|
||||
WasLoadTaskData = m_pTaskMan.LoadTasksFromPackNoAsyn(path, true);
|
||||
}
|
||||
|
||||
[ContextMenu("Test Size")]
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Task;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using BrewMonster.UI;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using NUnit.Framework;
|
||||
using PerfectWorld.Scripts.Task;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace BrewMonster.Scripts.Task.UI
|
||||
{
|
||||
@@ -132,17 +136,26 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// [中文] 任务跟踪计时器
|
||||
// [English] Task trace counter
|
||||
private CECCounter m_TaskTraceCounter = new (); // CECCounter -> object placeholder
|
||||
|
||||
public static DlgTask Instance;
|
||||
|
||||
// ===== Time-gated task UI refresh (search list) =====
|
||||
// Timetable/time-window tasks become available/unavailable as server time moves.
|
||||
// The original C++ client periodically re-evaluates prerequisites; in this port we refresh the search list
|
||||
// at a low frequency while the Search view is open so players can see time-gated tasks appear/disappear.
|
||||
private uint _lastSearchRefreshMinuteKey = uint.MaxValue;
|
||||
private uint _pendingReselectTaskId = 0;
|
||||
|
||||
// Active-task timer refresh (wait-time / time-limit / protect-time)
|
||||
private float _nextActiveTimerUiRefreshAt = 0f;
|
||||
|
||||
#region Unity METHODS
|
||||
|
||||
private void OnEnable()
|
||||
private new void OnEnable()
|
||||
{
|
||||
OnShowDialog();
|
||||
OnCommand_havequest();
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
private new void Awake()
|
||||
{
|
||||
EventBus.Subscribe<TaskItemClickEvent>(evt =>
|
||||
{
|
||||
@@ -151,7 +164,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
|
||||
m_pBtn_HaveQuest.onClick.AddListener(OnCommand_havequest);
|
||||
m_pBtn_SearchQuest.onClick.AddListener(OnCommand_searchquest);
|
||||
|
||||
m_pBtn_Abandon.onClick.AddListener(OnCommand_abandon);
|
||||
|
||||
OnInitDialog();
|
||||
}
|
||||
@@ -160,12 +173,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
{
|
||||
Tick();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region PUBLIC METHODS
|
||||
@@ -202,7 +210,49 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
}
|
||||
public void OnCommand_showtrace(string szCommand) {}
|
||||
public void OnCommand_focus(string szCommand) {}
|
||||
public void OnCommand_abandon(string szCommand) {}
|
||||
public void OnCommand_abandon()
|
||||
{
|
||||
// [中文] 放弃任务:发送通知到服务器 // [English] Abandon task: send notification to server
|
||||
// Get the currently selected task from the tree view
|
||||
var pTree = m_pTv_Quest;
|
||||
var pSelectedItem = pTree?.GetSelectedItem();
|
||||
if (pSelectedItem == null)
|
||||
{
|
||||
BMLogger.LogWarning("Cannot abandon task: No task is currently selected");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the task ID from the selected item
|
||||
uint selectedTaskId = pTree.GetItemData(pSelectedItem);
|
||||
if (selectedTaskId == 0)
|
||||
{
|
||||
BMLogger.LogWarning("Cannot abandon task: Selected item has no task ID");
|
||||
return;
|
||||
}
|
||||
|
||||
CECTaskInterface pTask = GetHostPlayer()?.GetTaskInterface();
|
||||
if (pTask == null)
|
||||
{
|
||||
BMLogger.LogError("Cannot abandon task: TaskInterface is null");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the task template to find the top-level task
|
||||
ATaskTemplMan pMan = EC_Game.GetTaskTemplateMan();
|
||||
ATaskTempl pTempl = pMan?.GetTaskTemplByID(selectedTaskId);
|
||||
if (pTempl == null)
|
||||
{
|
||||
BMLogger.LogError($"Cannot abandon task: Task template {selectedTaskId} not found");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the top-level task ID (tasks can have subtasks)
|
||||
ATaskTempl pTopTask = pTempl.GetTopTask();
|
||||
uint topTaskId = pTopTask != null ? pTopTask.GetID() : selectedTaskId;
|
||||
|
||||
// Send notification to server to abandon the currently selected task
|
||||
TaskClient._notify_svr(pTask, (byte)ClientNotificationConstants.TASK_CLT_NOTIFY_CHECK_GIVEUP, (ushort)topTaskId);
|
||||
}
|
||||
public void OnCommand_CANCEL(string szCommand) {}
|
||||
public void OnCommand_TreasureMap(string szCommand) {}
|
||||
public void OnCommand_FinishTask(string szCommand) {}
|
||||
@@ -320,6 +370,63 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
//
|
||||
private bool Tick()
|
||||
{
|
||||
// Time-window task refresh: while in Search view, refresh the list when server time crosses a minute boundary.
|
||||
// This is throttled to avoid rebuilding large task lists every frame.
|
||||
if (m_iType == 1)
|
||||
{
|
||||
var host = GetHostPlayer();
|
||||
var task = host != null ? host.GetTaskInterface() : null;
|
||||
if (task != null)
|
||||
{
|
||||
uint now = task.GetCurTime();
|
||||
uint minuteKey = now / 60u;
|
||||
if (minuteKey != _lastSearchRefreshMinuteKey)
|
||||
{
|
||||
_lastSearchRefreshMinuteKey = minuteKey;
|
||||
|
||||
// Preserve current selection if any, so refreshing doesn't feel disruptive.
|
||||
var curItem = m_pTv_Quest != null ? m_pTv_Quest.GetSelectedItem() : null;
|
||||
_pendingReselectTaskId = (curItem != null) ? m_pTv_Quest.GetItemData(curItem) : 0u;
|
||||
|
||||
// Rebuild available task list according to current time-based prerequisites.
|
||||
SearchForTask(-1);
|
||||
|
||||
// Restore selection best-effort (TaskTreeView selection is driven by EventBus).
|
||||
if (_pendingReselectTaskId != 0u)
|
||||
{
|
||||
EventBus.Publish(new TaskItemClickEvent { Data = _pendingReselectTaskId });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Active view: refresh selected task detail periodically so countdown UI updates in real time.
|
||||
// (Wait-time tasks depend on m_ulTimePassed which changes with server time; without this, UI looks "stuck".)
|
||||
if (m_iType == 0 && Time.unscaledTime >= _nextActiveTimerUiRefreshAt)
|
||||
{
|
||||
_nextActiveTimerUiRefreshAt = Time.unscaledTime + 0.5f; // 2 Hz is plenty for countdown text
|
||||
|
||||
var pTree = m_pTv_Quest;
|
||||
var pItem = pTree != null ? pTree.GetSelectedItem() : null;
|
||||
if (pItem != null && pTree.transform != pItem.transform.parent)
|
||||
{
|
||||
uint selectedTaskId = pTree.GetItemData(pItem);
|
||||
if (selectedTaskId > 0)
|
||||
{
|
||||
var task = GetHostPlayer()?.GetTaskInterface();
|
||||
if (task != null)
|
||||
{
|
||||
Task_State_info tsi = default;
|
||||
task.GetTaskStateInfo(selectedTaskId, ref tsi, true);
|
||||
if (tsi.m_ulWaitTime > 0 || tsi.m_ulTimeLimit > 0 || tsi.m_ulProtectTime > 0)
|
||||
{
|
||||
UpdateTask((int)selectedTaskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if( m_szName == "Win_Quest" && IsShow() )
|
||||
{
|
||||
var pTree = m_pTv_Quest;
|
||||
@@ -367,10 +474,12 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// void RefreshTaskTrace();
|
||||
public bool UpdateTask(int idTask = -1)
|
||||
{
|
||||
// if( m_szName != "Win_Quest" || m_iType != 0)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// Only rebuild the list if viewing "Have Quest" (m_iType == 0)
|
||||
// But always allow updating specific task details regardless of view type
|
||||
if (idTask < 0 && m_iType != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// ATaskTemplMan *pMan = GetGame()->GetTaskTemplateMan();
|
||||
ATaskTemplMan pMan = EC_Game.GetTaskTemplateMan();
|
||||
@@ -403,6 +512,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
ATaskTempl pTemp = pMan.GetTaskTemplByID((uint)idTask);
|
||||
if (pTemp != null)
|
||||
{
|
||||
// Only update description and name if task changed
|
||||
if( idTask != m_idLastTask )
|
||||
{
|
||||
_nameTaskText.SetText(EC_Utility.FormatForTextMeshPro(GetTaskNameWithColor(pTemp)));
|
||||
@@ -415,9 +525,11 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
|
||||
m_pBtn_Abandon.interactable = pMan.CanGiveUpTask((uint)idTask);
|
||||
|
||||
// Get info
|
||||
// Always refresh task state info to get latest progress data
|
||||
// This ensures real-time updates when task progress changes
|
||||
// When viewing "Have Quest" (m_iType == 0), tasks are active, so pass true to read kill counts
|
||||
Task_State_info tsi = new Task_State_info();
|
||||
pTask.GetTaskStateInfo((uint)idTask, ref tsi, false);
|
||||
pTask.GetTaskStateInfo((uint)idTask, ref tsi, m_iType == 0);
|
||||
|
||||
// Clear first
|
||||
strNewTextItem = "";
|
||||
@@ -429,19 +541,19 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
int nANPC = (int)pTemp.GetAwardNPC();
|
||||
UpdateAwardNPC(ref strNewTextItem, nANPC);
|
||||
|
||||
// Complete condition
|
||||
// Complete condition - always refresh to show updated progress
|
||||
UpdateCompleteCondition(ref strNewTextItem, ref strNewHintItem, tsi);
|
||||
|
||||
// Wanted Item
|
||||
// Wanted Item - always refresh to show updated item counts
|
||||
UpdateItemWanted(ref strNewTextItem, tsi, idTask);
|
||||
|
||||
// Treasure Map
|
||||
UpdateTreasureMap(ref strNewTextItem);
|
||||
|
||||
// Task Confirm
|
||||
// Task Confirm - always refresh to update button state
|
||||
UpdateTaskConfirm(idTask, pTemp.m_FixedData.m_enumFinishType == (uint)TaskFinishType.enumTFTConfirm);
|
||||
|
||||
// Award
|
||||
// Award - always refresh to show updated award preview
|
||||
Task_Award_Preview award = default;
|
||||
pTask.GetTaskAwardPreview((uint)idTask, ref award);
|
||||
|
||||
@@ -489,6 +601,8 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// Guard: only handle search list when current UI type is 1 (search)
|
||||
public bool SearchForTask(int idTask = -1)
|
||||
{
|
||||
// Only process search list when in search view (m_iType == 1)
|
||||
// This prevents clearing the wrong list when updating
|
||||
if (m_iType != 1)
|
||||
{
|
||||
return true;
|
||||
@@ -610,10 +724,49 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
return true;
|
||||
}
|
||||
//
|
||||
// //�������������б��������ɽ�������ѽ����� zhangyitian
|
||||
// //�������������б��������ɽ�������ѽ�������ѽ����� zhangyitian
|
||||
// When task updates, the available task list also needs to be updated, otherwise the available task list won't update
|
||||
public bool UpdateQuestView()
|
||||
{
|
||||
return UpdateTask() && SearchForTask();
|
||||
// Refresh the list for the current view type
|
||||
// This ensures that when tasks are taken/completed/abandoned, the visible list is updated
|
||||
bool result = true;
|
||||
|
||||
if (m_iType == 0)
|
||||
{
|
||||
// Refresh "Have Quest" list (taken tasks)
|
||||
result = UpdateTask(-1);
|
||||
}
|
||||
else if (m_iType == 1)
|
||||
{
|
||||
// Refresh "Search Quest" list (available tasks)
|
||||
result = SearchForTask(-1);
|
||||
}
|
||||
|
||||
// Refresh the currently selected task details if one is selected
|
||||
// This ensures task progress updates are reflected in real-time
|
||||
var pTree = m_pTv_Quest;
|
||||
var pItem = pTree?.GetSelectedItem();
|
||||
|
||||
if (pItem != null && pTree.transform != pItem.transform.parent)
|
||||
{
|
||||
uint selectedTaskId = pTree.GetItemData(pItem);
|
||||
if (selectedTaskId > 0)
|
||||
{
|
||||
if (m_iType == 0)
|
||||
{
|
||||
// Refresh the selected task's details to show updated progress
|
||||
UpdateTask((int)selectedTaskId);
|
||||
}
|
||||
else if (m_iType == 1)
|
||||
{
|
||||
// For search view, refresh the selected task
|
||||
SearchForTask((int)selectedTaskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
//
|
||||
// bool IsPQTaskOrSubTask(int idTask);
|
||||
@@ -687,7 +840,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public CECHostPlayer GetHostPlayer()
|
||||
public new CECHostPlayer GetHostPlayer()
|
||||
{
|
||||
if(EC_Game.GetGameRun() == null)
|
||||
{
|
||||
@@ -745,6 +898,52 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
child = child.m_pNextSibling;
|
||||
}
|
||||
}
|
||||
|
||||
// [中文] 仅插入“已接任务(Active)”中的子任务(基于 ActiveTaskList 的 Child/NextSbl 索引)
|
||||
// [English] Insert only active subtasks (based on ActiveTaskList Child/NextSbl indices)
|
||||
private void InsertActiveTaskChildren(TaskTreeViewItem pRoot, uint idTask)
|
||||
{
|
||||
var pTreeTask = m_pTv_Quest;
|
||||
var pMan = EC_Game.GetTaskTemplateMan();
|
||||
var pTask = GetHostPlayer()?.GetTaskInterface();
|
||||
if (pTreeTask == null || pMan == null || pTask == null) return;
|
||||
|
||||
ActiveTaskList pList = pTask.GetActiveTaskList();
|
||||
if (pList == null) return;
|
||||
|
||||
ActiveTaskEntry parentEntry = pList.GetEntry(idTask);
|
||||
if (parentEntry == null) return;
|
||||
|
||||
char idx = parentEntry.m_ChildIndex;
|
||||
while (idx != (char)0xff)
|
||||
{
|
||||
int childIndex = (byte)idx;
|
||||
if (childIndex < 0 || childIndex >= TaskInterfaceConstants.TASK_ACTIVE_LIST_MAX_LEN) break;
|
||||
|
||||
ActiveTaskEntry childEntry = pList.m_TaskEntries[childIndex];
|
||||
if (childEntry == null || childEntry.m_ID == 0) break;
|
||||
|
||||
uint childId = childEntry.m_ID;
|
||||
ATaskTempl childTempl = pMan.GetTaskTemplByID(childId);
|
||||
string text = childTempl != null ? GetTaskNameWithColor(childTempl) : $"Task {childId}";
|
||||
|
||||
var pItem = pTreeTask.InsertItem(text, pRoot, null);
|
||||
if (pItem != null)
|
||||
{
|
||||
pTreeTask.SetItemData(pItem, childId);
|
||||
if ((int)childId == m_idSelTask)
|
||||
{
|
||||
if (m_pBtn_Abandon != null) m_pBtn_Abandon.interactable = true;
|
||||
UpdateTask((int)childId);
|
||||
}
|
||||
|
||||
// recurse into active children
|
||||
InsertActiveTaskChildren(pItem, childId);
|
||||
}
|
||||
|
||||
idx = childEntry.m_NextSblIndex;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTextItemText(string strNewTextItem, bool keepScrollPos, string strNewHintItem)
|
||||
{
|
||||
@@ -781,49 +980,52 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// update task content in dialog (converted from C++)
|
||||
private void UpdateBaseAward(Task_Award_Preview award)
|
||||
{
|
||||
// Ported from original C++: strTemp.Format(GetStringFromTable(3201), award.m_ulGold);
|
||||
var sb = new System.Text.StringBuilder();
|
||||
int colCount = 0;
|
||||
const int col = 3;
|
||||
int cellSpace = 50; // adjust as needed for spacing
|
||||
|
||||
void AppendWithSpacing(int stringId, string value)
|
||||
{
|
||||
var title = EC_Utility.FormatForTextMeshPro(GetStringFromTable(stringId));
|
||||
var text = $"{title} {value}";
|
||||
sb.Append( EC_Utility.FormatForTextMeshPro(text));
|
||||
sb.Append(' ', Mathf.Abs(cellSpace - text.Length));
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
|
||||
|
||||
string strTemp;
|
||||
if (award.m_ulGold > 0)
|
||||
{
|
||||
AppendWithSpacing(3201 , award.m_ulGold.ToString());
|
||||
strTemp = Format(GetStringFromTable(3201), award.m_ulGold);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
if (award.m_ulExp > 0)
|
||||
{
|
||||
AppendWithSpacing(3202 , award.m_ulExp.ToString());
|
||||
strTemp = Format(GetStringFromTable(3202), award.m_ulExp);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
if (award.m_ulSP > 0)
|
||||
{
|
||||
AppendWithSpacing(3203 , award.m_ulSP.ToString());
|
||||
strTemp = Format(GetStringFromTable(3203), award.m_ulSP);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
if (award.m_ulRealmExp > 0)
|
||||
{
|
||||
AppendWithSpacing( 3207, award.m_ulRealmExp.ToString());
|
||||
strTemp = Format(GetStringFromTable(3207), award.m_ulRealmExp);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
if (award.m_iForceContrib > 0)
|
||||
{
|
||||
AppendWithSpacing(3205, award.m_iForceContrib.ToString());
|
||||
strTemp = Format(GetStringFromTable(3205), award.m_iForceContrib);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
if (award.m_iForceRepu > 0)
|
||||
{
|
||||
AppendWithSpacing(3206, award.m_iForceRepu.ToString());
|
||||
strTemp = Format(GetStringFromTable(3206), award.m_iForceRepu);
|
||||
sb.Append(strTemp);
|
||||
if ((++colCount) % col == 0) sb.Append("\n");
|
||||
}
|
||||
|
||||
if (sb.Length > 0 && m_pTxt_BaseAward != null)
|
||||
{
|
||||
m_pTxt_BaseAward.text = sb.ToString();
|
||||
m_pTxt_BaseAward.text = EC_Utility.FormatForTextMeshPro(sb.ToString());
|
||||
m_pTxt_BaseAward.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -900,7 +1102,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
sb.Append(szMsg);
|
||||
string strTemp;
|
||||
if (tsi.m_ulErrCode == TaskInterfaceConstants.TASK_AWARD_FAIL_LEVEL_CHECK)
|
||||
strTemp = string.Format(GetStringFromTable(7637), tsi.m_ulPremLevelMin);
|
||||
strTemp = Format(GetStringFromTable(7637), tsi.m_ulPremLevelMin);
|
||||
else
|
||||
strTemp = GetStringFromTable(807);
|
||||
sb.Append(strTemp);
|
||||
@@ -928,7 +1130,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
if (tsi.m_ulNPCToProtect > 0)
|
||||
{
|
||||
// Fallback text with NPC id; detailed name lookup omitted
|
||||
sb.Append(string.Format(GetStringFromTable(257) ?? "Protect NPC: {0}", tsi.m_ulNPCToProtect));
|
||||
sb.Append(Format(GetStringFromTable(257) ?? "Protect NPC: %d", tsi.m_ulNPCToProtect));
|
||||
sb.Append(FormatTime((int)tsi.m_ulProtectTime, GetStringFromTable(258), 0));
|
||||
int remain = System.Math.Max(0, (int)tsi.m_ulProtectTime - (int)tsi.m_ulTimePassed);
|
||||
sb.Append(FormatTime(remain, GetStringFromTable(259), 0));
|
||||
@@ -1110,22 +1312,41 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
if (edm != null && edm.essence_id_data_type_map.TryGetValue(id, out var dtype)
|
||||
&& dtype == DATA_TYPE.DT_MONSTER_ESSENCE
|
||||
&& edm.essence_id_data_map.TryGetValue(id, out var obj)
|
||||
&& obj is MONSTER_ESSENCE me)
|
||||
&& obj is MONSTER_ESSENCE pMonster)
|
||||
{
|
||||
strName = ModelRenderer.Scripts.Common.ByteToStringUtils.UshortArrayToUnicodeString(me.name);
|
||||
// strName = ModelRenderer.Scripts.Common.ByteToStringUtils.UshortArrayToUnicodeString(me.name);
|
||||
|
||||
bool bFind = false;
|
||||
A3DVECTOR3 vPos = CECUIHelper.GetTaskObjectCoordinates((int)id, ref bFind);
|
||||
|
||||
// TODO: serialize position info if found
|
||||
// ACHAR szPos[100];
|
||||
// EditBoxItemBase item(enumEICoord);
|
||||
// item.SetName(pMonster->name);
|
||||
if (bFind)
|
||||
{
|
||||
// a_sprintf(szPos, _AL("%f %f %f %d"), vPos.x, vPos.y, vPos.z, id);
|
||||
// item.SetInfo(szPos);
|
||||
// item.SetColor(A3DCOLORRGB(0, 255, 0));
|
||||
// strName = (ACHAR)AUICOMMON_ITEM_CODE_START + item.Serialize();
|
||||
}
|
||||
else
|
||||
{
|
||||
strName = ByteToStringUtils.UshortArrayToUnicodeString(pMonster.name);
|
||||
}
|
||||
}
|
||||
|
||||
// Build description for this monster requirement
|
||||
// 构建该怪物需求描述
|
||||
string strTemp;
|
||||
string strTemp = "";
|
||||
if (tsi.m_MonsterWanted[i].m_ulMonstersToKill > 0)
|
||||
{
|
||||
strTemp = string.Format(GetStringFromTable(7624), strName,
|
||||
strTemp += Format(GetStringFromTable(7624), strName,
|
||||
tsi.m_MonsterWanted[i].m_ulMonstersKilled, tsi.m_MonsterWanted[i].m_ulMonstersToKill);
|
||||
}
|
||||
else
|
||||
{
|
||||
strTemp = string.Format(GetStringFromTable(256), tsi.m_MonsterWanted[i].m_ulMonstersKilled);
|
||||
strTemp += Format(GetStringFromTable(256), tsi.m_MonsterWanted[i].m_ulMonstersKilled);
|
||||
}
|
||||
|
||||
// Prefix label for first/next item
|
||||
@@ -1150,7 +1371,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// 金币需求
|
||||
if (tsi.m_ulGoldWanted != 0)
|
||||
{
|
||||
string strTemp = string.Format(GetStringFromTable(7636), tsi.m_ulGoldWanted);
|
||||
string strTemp = Format(GetStringFromTable(7636), tsi.m_ulGoldWanted);
|
||||
strText += strTemp;
|
||||
}
|
||||
|
||||
@@ -1162,10 +1383,10 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
string strColor = (iLevel < (int)tsi.m_ulReachReincarnation) ? "^ff0000" : "^00ff00";
|
||||
if (iLevel < (int)tsi.m_ulReachReincarnation)
|
||||
{
|
||||
strHint += string.Format(GetStringFromTable(11144), iLevel);
|
||||
strHint += Format(GetStringFromTable(11144), iLevel);
|
||||
}
|
||||
strText += strColor;
|
||||
strText += string.Format(GetStringFromTable(11141), tsi.m_ulReachReincarnation);
|
||||
strText += Format(GetStringFromTable(11141), tsi.m_ulReachReincarnation);
|
||||
}
|
||||
|
||||
// Level requirement
|
||||
@@ -1176,10 +1397,10 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
string strColor = (iLevel < (int)tsi.m_ulReachLevel) ? "^ff0000" : "^00ff00";
|
||||
if (iLevel < (int)tsi.m_ulReachLevel)
|
||||
{
|
||||
strHint += string.Format(GetStringFromTable(11143), iLevel);
|
||||
strHint += Format(GetStringFromTable(11143), iLevel);
|
||||
}
|
||||
strText += strColor;
|
||||
strText += string.Format(GetStringFromTable(11140), tsi.m_ulReachLevel);
|
||||
strText += Format(GetStringFromTable(11140), tsi.m_ulReachLevel);
|
||||
}
|
||||
|
||||
// Realm requirement
|
||||
@@ -1190,10 +1411,10 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
string strColor = (iLevel < (int)tsi.m_ulReachRealm) ? "^ff0000" : "^00ff00";
|
||||
if (iLevel < (int)tsi.m_ulReachRealm)
|
||||
{
|
||||
strHint += string.Format(GetStringFromTable(11145), iLevel);
|
||||
strHint += Format(GetStringFromTable(11145), iLevel);
|
||||
}
|
||||
strText += strColor;
|
||||
strText += string.Format(GetStringFromTable(11142), (int)tsi.m_ulReachRealm);
|
||||
strText += Format(GetStringFromTable(11142), (int)tsi.m_ulReachRealm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1243,7 +1464,7 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
|
||||
// Compose line: name and progress (gained/toGet)
|
||||
// 组合文本:名称与进度(已获得/所需)
|
||||
string strTemp = string.Format(GetStringFromTable(7625), itemName,
|
||||
string strTemp = Format(GetStringFromTable(7625), itemName,
|
||||
tsi.m_ItemsWanted[i].m_ulItemsGained,
|
||||
tsi.m_ItemsWanted[i].m_ulItemsToGet);
|
||||
|
||||
@@ -1367,7 +1588,11 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
pItem.SetItemTextColor(GetTaskColor((int)ENUM_TASK_TYPE.enumTTLevel2));
|
||||
// pTreeTask.SetItemHint(pItem, pTemp->GetSignature()); // TODO
|
||||
pTreeTask.SetItemData(pItem, (uint)id);
|
||||
InsertTaskChildren(pItem, (uint)id, true, pTemp.IsKeyTask());
|
||||
// HaveQuest view: children should reflect ActiveTaskList, not template tree (otherwise they never disappear on completion)
|
||||
if (m_iType == 0)
|
||||
InsertActiveTaskChildren(pItem, (uint)id);
|
||||
else
|
||||
InsertTaskChildren(pItem, (uint)id, true, pTemp.IsKeyTask());
|
||||
|
||||
if( (int)id == m_idSelTask )
|
||||
{
|
||||
@@ -1406,6 +1631,210 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
// // whether the task can be traced
|
||||
// bool IsTaskTraceable(int idTask);
|
||||
|
||||
string Format( string formatStr, params object[] args )
|
||||
{
|
||||
// Ported from original C++ ACString::Format() which uses vsprintf/vswprintf
|
||||
// Original implementation: AString& AString::Format(const char* szFormat, ...) { vsprintf(m_pStr, szFormat, argList); }
|
||||
// This converts printf-style format specifiers to C# format specifiers
|
||||
if (string.IsNullOrEmpty(formatStr))
|
||||
return formatStr;
|
||||
|
||||
// Process format string character by character to convert %d, %s, etc. to {0}, {1}, etc.
|
||||
// This matches the original vsprintf behavior exactly
|
||||
var sb = new System.Text.StringBuilder();
|
||||
int paramIndex = 0;
|
||||
|
||||
for (int i = 0; i < formatStr.Length; i++)
|
||||
{
|
||||
if (formatStr[i] == '%' && i + 1 < formatStr.Length)
|
||||
{
|
||||
// Check for %% (literal %)
|
||||
if (formatStr[i + 1] == '%')
|
||||
{
|
||||
sb.Append('%');
|
||||
i++; // Skip the second %
|
||||
continue;
|
||||
}
|
||||
|
||||
// Parse format specifier: %[flags][width][.precision][length]type
|
||||
int startPos = i;
|
||||
i++; // Skip the %
|
||||
|
||||
// Track flags
|
||||
bool hasMinus = false;
|
||||
bool hasPlus = false;
|
||||
bool hasZero = false;
|
||||
|
||||
// Parse flags: +, -, 0, space
|
||||
while (i < formatStr.Length && (formatStr[i] == '+' || formatStr[i] == '-' || formatStr[i] == '0' || formatStr[i] == ' '))
|
||||
{
|
||||
if (formatStr[i] == '-') hasMinus = true;
|
||||
if (formatStr[i] == '+') hasPlus = true;
|
||||
if (formatStr[i] == '0') hasZero = true;
|
||||
i++;
|
||||
}
|
||||
|
||||
// Parse width: digits
|
||||
int width = 0;
|
||||
int widthStart = i;
|
||||
while (i < formatStr.Length && char.IsDigit(formatStr[i]))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
if (i > widthStart)
|
||||
{
|
||||
int.TryParse(formatStr.Substring(widthStart, i - widthStart), out width);
|
||||
}
|
||||
|
||||
// Skip precision: .digits
|
||||
if (i < formatStr.Length && formatStr[i] == '.')
|
||||
{
|
||||
i++;
|
||||
while (i < formatStr.Length && char.IsDigit(formatStr[i]))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// Skip length modifier: h, l, L, etc.
|
||||
while (i < formatStr.Length && (formatStr[i] == 'h' || formatStr[i] == 'l' || formatStr[i] == 'L'))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
||||
// Get type specifier
|
||||
if (i < formatStr.Length)
|
||||
{
|
||||
char typeChar = formatStr[i];
|
||||
// Common types: d, i, u, o, x, X, f, e, E, g, G, c, s, p, n
|
||||
if ("diouxXeEfFgGaAcspn".IndexOf(typeChar) >= 0)
|
||||
{
|
||||
// Extract the full format specifier for special handling
|
||||
string fullSpec = formatStr.Substring(startPos, i - startPos + 1);
|
||||
|
||||
// Check for special formats
|
||||
string csharpFormatSpec = "";
|
||||
|
||||
// Handle %-10d, %-5d, etc. (left-aligned with width) - check this FIRST
|
||||
// Also handle %-d (left-aligned without explicit width, but width might be 0)
|
||||
if (hasMinus && (typeChar == 'd' || typeChar == 'i' || typeChar == 'u' || typeChar == 's' || typeChar == 'c'))
|
||||
{
|
||||
if (width > 0)
|
||||
{
|
||||
// C# left alignment with width: {0,-10} (comma for alignment, negative for left-align)
|
||||
csharpFormatSpec = $",-{width}";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Just left alignment flag, no width specified - use default
|
||||
csharpFormatSpec = "";
|
||||
}
|
||||
}
|
||||
// Handle %02d, %03d, etc. (zero-padded integers) - check before regular width
|
||||
else if (hasZero && width > 0 && (typeChar == 'd' || typeChar == 'i' || typeChar == 'u'))
|
||||
{
|
||||
csharpFormatSpec = $":D{width}";
|
||||
}
|
||||
// Handle %10d, %5d, etc. (right-aligned with width, no zero-padding)
|
||||
else if (width > 0 && (typeChar == 'd' || typeChar == 'i' || typeChar == 'u' || typeChar == 's' || typeChar == 'c'))
|
||||
{
|
||||
// C# right alignment: {0,10} (comma for alignment)
|
||||
csharpFormatSpec = $",{width}";
|
||||
}
|
||||
// Handle %+d (signed format)
|
||||
else if (hasPlus && (typeChar == 'd' || typeChar == 'i'))
|
||||
{
|
||||
csharpFormatSpec = ":+0;-0";
|
||||
}
|
||||
// Handle %.2f, %.3f, etc. (float precision)
|
||||
else if (fullSpec.Contains(".") && (typeChar == 'f' || typeChar == 'F' || typeChar == 'e' || typeChar == 'E' || typeChar == 'g' || typeChar == 'G'))
|
||||
{
|
||||
int dotPos = fullSpec.IndexOf('.');
|
||||
if (dotPos >= 0 && dotPos + 1 < fullSpec.Length)
|
||||
{
|
||||
int precStart = dotPos + 1;
|
||||
int precEnd = precStart;
|
||||
while (precEnd < fullSpec.Length - 1 && char.IsDigit(fullSpec[precEnd]))
|
||||
{
|
||||
precEnd++;
|
||||
}
|
||||
if (precEnd > precStart && int.TryParse(fullSpec.Substring(precStart, precEnd - precStart), out int precNum))
|
||||
{
|
||||
if (typeChar == 'f' || typeChar == 'F')
|
||||
{
|
||||
csharpFormatSpec = $":F{precNum}";
|
||||
}
|
||||
else if (typeChar == 'e' || typeChar == 'E')
|
||||
{
|
||||
csharpFormatSpec = $":E{precNum}";
|
||||
}
|
||||
else if (typeChar == 'g' || typeChar == 'G')
|
||||
{
|
||||
csharpFormatSpec = $":G{precNum}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Build replacement - always replace recognized format specifiers
|
||||
// C# format: {index,alignment} for width, {index:format} for format specifiers
|
||||
if (csharpFormatSpec.Length > 0)
|
||||
{
|
||||
// If format spec starts with comma (alignment) or colon (format), use it directly
|
||||
// Otherwise, assume it's a format specifier and add colon
|
||||
if (csharpFormatSpec.StartsWith(",") || csharpFormatSpec.StartsWith(":"))
|
||||
{
|
||||
sb.Append($"{{{paramIndex}{csharpFormatSpec}}}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append($"{{{paramIndex}:{csharpFormatSpec}}}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append($"{{{paramIndex}}}");
|
||||
}
|
||||
|
||||
paramIndex++;
|
||||
// Note: i currently points to the type character (e.g., 'd' in "%-10d")
|
||||
// The for loop will increment i, so we've consumed the entire format specifier
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not a recognized format specifier, keep as-is
|
||||
sb.Append(formatStr[startPos]);
|
||||
i = startPos; // Reset to process next character
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Incomplete format specifier, keep the %
|
||||
sb.Append('%');
|
||||
i = startPos; // Reset to process next character
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(formatStr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Use C#'s string.Format (equivalent to original vsprintf)
|
||||
// Handle case where we might have more format specifiers than arguments
|
||||
try
|
||||
{
|
||||
return string.Format(sb.ToString(), args);
|
||||
}
|
||||
catch (System.FormatException)
|
||||
{
|
||||
// If format fails (e.g., not enough arguments), return the original format string
|
||||
// This can happen if GetStringFromTable returns an unexpected format
|
||||
BMLogger.LogWarning($"Format failed for string: {formatStr}, expected {paramIndex} args, got {args.Length}");
|
||||
return formatStr;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
|
||||
using BrewMonster.Network;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public class EmoteWindow : AUIDialog
|
||||
{
|
||||
public override void Show(bool value)
|
||||
{
|
||||
base.Show(value);
|
||||
// int i, j;
|
||||
// char szName[40];
|
||||
// string strFile;
|
||||
// CECShortcut pSCThis;
|
||||
// PAUIIMAGEPICTURE pImage;
|
||||
// PAUILABEL pLabel;
|
||||
// CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
// CECShortcutSet[] a_pSC =
|
||||
// {
|
||||
// pGameRun.GetGenCmdShortcuts(),
|
||||
// pGameRun.GetTeamCmdShortcuts(),
|
||||
// pGameRun.GetTradeCmdShortcuts(),
|
||||
// pGameRun.GetPoseCmdShortcuts()
|
||||
// };
|
||||
// char *a_pszPrefix[] = { "BscCmd_", "TeamCmd_","TradeCmd_", "FaceCmd_" };
|
||||
// char *a_pszTxtPrefix[] = { "Txt_BscCmd", "Txt_TeamCmd", "Txt_TradeCmd", "Txt_FaceCmd" };
|
||||
// int objCount[] = { 9, 3, 3, 30 };
|
||||
//
|
||||
// a_LogOutput(1, "[Dat Emote] CDlgSkillSubAction::OnShowDialog");
|
||||
// a_LogOutput(1, "[Dat Emote] CDlgSkillSubAction::OnShowDialog szName: %s", szName);
|
||||
//
|
||||
// for( i = 0; i < sizeof(a_pSC) / sizeof(CECShortcutSet *); i++ )
|
||||
// {
|
||||
// for( j = 0; j < objCount[i]; j++ )
|
||||
// {
|
||||
// sprintf(szName, "%s%02d", a_pszPrefix[i], j + 1);
|
||||
// pImage = dynamic_cast<AUIImagePicture*>(GetDlgItem(szName));
|
||||
//
|
||||
// sprintf(szName, "%s%02d", a_pszTxtPrefix[i], j + 1);
|
||||
// pLabel = dynamic_cast<AUILabel*>(GetDlgItem(szName));
|
||||
//
|
||||
// if( !pImage ) break;
|
||||
//
|
||||
// if (j < a_pSC[i]->GetShortcutNum()) {
|
||||
// pSCThis = a_pSC[i]->GetShortcut(j);
|
||||
// pImage->SetDataPtr(pSCThis,"ptr_CECShortcut");
|
||||
//
|
||||
// af_GetFileTitle(pSCThis->GetIconFile(), strFile);
|
||||
// strFile.MakeLower();
|
||||
// pImage->SetCover(GetGameUIMan()->m_pA2DSpriteIcons[CECGameUIMan::ICONS_ACTION],
|
||||
// GetGameUIMan()->m_IconMap[CECGameUIMan::ICONS_ACTION][strFile]);
|
||||
//
|
||||
// pLabel->SetText(pSCThis->GetDesc());
|
||||
// } else {
|
||||
// pImage->Show(false);
|
||||
// pLabel->Show(false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// ÔÚÇл»½çÃæ·ç¸ñµÄʱºò£¬´Ëʱ¿ÉÄܸ¸¶Ô»°¿òÖ¸ÕëΪ¿Õ
|
||||
// if (GetParentDlgControl()) {
|
||||
// SIZE size;
|
||||
// size.cx = 326;
|
||||
// size.cy = 720;
|
||||
// size.cx = (int)(size.cx * m_pAUIManager->GetWindowScale() + 0.5f);
|
||||
// size.cy = (int)(size.cy * m_pAUIManager->GetWindowScale() + 0.5f);
|
||||
//
|
||||
// if (!m_bSetVScroll) {
|
||||
// GetParentDlgControl()->SetSubDialogOrgSize(size.cx, size.cy);
|
||||
// m_bSetVScroll = true;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
public int slot;
|
||||
[ContextMenu("Test")]
|
||||
public void OnDragClick() //PAUIDIALOG pDlgSrc, PAUIOBJECT pObjSrc, PAUIDIALOG pDlgOver, PAUIOBJECT pObjOver
|
||||
{
|
||||
// bool bInAutoMode = CECAutoPolicy::GetInstance().IsAutoPolicyEnabled();
|
||||
|
||||
// if (strstr(pDlgSrc->GetName(), "Win_Quickbar") ||
|
||||
// 0 == stricmp(pDlgSrc->GetName(), "Win_SkillSubAction")) // 20140708 ÐµĶ¯×÷½çÃæ
|
||||
// {
|
||||
// if (bInAutoMode) return;
|
||||
//todo: dummy call StartGame
|
||||
// EC_Game.GetGameRun().StartGame(0, Vector3.zero);
|
||||
if (EC_Game.GetGameRun().GetPoseCmdShortcuts() == null)
|
||||
{
|
||||
EC_Game.GetGameRun().StartGame(0, Vector3.zero);
|
||||
}
|
||||
CECShortcut pSC = EC_Game.GetGameRun().GetPoseCmdShortcuts().GetShortcut(slot);
|
||||
// if (CDlgAutoHelp::IsAutoHelp() && strstr(pDlgSrc->GetName(), "Win_Quickbar"))
|
||||
// {
|
||||
// a_LogOutput(1, "[Dat Emote] Win_Quickbar");
|
||||
// if (pSC->GetType() == CECShortcut::SCT_SKILL)
|
||||
// {
|
||||
// CECSCSkill* pSkillSC = dynamic_cast<CECSCSkill*>(pSC);
|
||||
// if (pSkillSC && pSkillSC->GetSkill())
|
||||
// CDlgWikiShortcut::PopSkillWiki(GetGameUIMan(), pSkillSC->GetSkill()->GetSkillID());
|
||||
//
|
||||
// }
|
||||
// else if (pSC->GetType() == CECShortcut::SCT_ITEM)
|
||||
// {
|
||||
// CECSCItem* pItemSC = dynamic_cast<CECSCItem*>(pSC);
|
||||
// CECIvtrItem* pItem = CECIvtrItem::CreateItem(pItemSC->GetItemTID(), 0, 1);
|
||||
// if (pItem)
|
||||
// {
|
||||
// CDlgWikiShortcut::PopItemWiki(GetGameUIMan(), pItem);
|
||||
// delete pItem;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GetGameUIMan()->MessageBox("", GetStringFromTable(10754), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if (pSC != null) // && pObjSrc->GetDataPtr("ptr_CECShortcut") == pSC
|
||||
{
|
||||
// a_LogOutput(1, "[Dat Emote] ptr_CECShortcut");
|
||||
pSC.Execute();
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e42ed2cbf208e60488b8bc1d63a3b1d7
|
||||
@@ -110,8 +110,10 @@ namespace BrewMonster.Scripts.Task.UI
|
||||
|
||||
public TaskTreeViewItem GetItemByData(uint taskType)
|
||||
{
|
||||
|
||||
if (m_aTreeViewItems == null)
|
||||
{
|
||||
m_aTreeViewItems = new TaskTreeViewItem[this.transform.childCount];
|
||||
m_aTreeViewItems = GetComponentsInChildren<TaskTreeViewItem>(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace BrewMonster.UI
|
||||
m_canvas = canvas;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
public virtual void Init()
|
||||
{
|
||||
ImportStringTable("ingame.stf");
|
||||
ImportAuiDialogStringTable("msgbox.stf");
|
||||
@@ -262,6 +262,27 @@ namespace BrewMonster.UI
|
||||
{
|
||||
return dlg;
|
||||
}
|
||||
else
|
||||
{
|
||||
var prefab = m_dialogResouce.GetPrefabDialog(pszName);
|
||||
if(prefab != null)
|
||||
{
|
||||
var instance = GameObject.Instantiate(prefab, m_canvas.transform);
|
||||
var dialog = instance.GetComponent<AUIDialog>();
|
||||
if (dialog != null)
|
||||
{
|
||||
dialog.SetAUIManager(this);
|
||||
m_DlgName[pszName] = dialog;
|
||||
return dialog;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError($" Không tìm thấy prefab chứa dialog {pszName} ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace BrewMonster.UI
|
||||
public virtual void Show(bool value)
|
||||
{
|
||||
gameObject.SetActive(value);
|
||||
OnShowDialogue();
|
||||
}
|
||||
|
||||
public void SetData(uint dwData, string strName)
|
||||
@@ -98,6 +99,10 @@ namespace BrewMonster.UI
|
||||
public virtual void Start()
|
||||
{
|
||||
|
||||
}
|
||||
public virtual void OnShowDialogue()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -1428,7 +1429,7 @@ namespace BrewMonster.UI
|
||||
SetDataPtr(pTalk, "ptr_talk_proc");
|
||||
if (!IsShow()) Show(true);
|
||||
}
|
||||
|
||||
|
||||
bool c(int idFunction, int iService, object pData)
|
||||
{
|
||||
AUIDialog pShow1 = null, pShow2 = null;
|
||||
@@ -1790,7 +1791,7 @@ namespace BrewMonster.UI
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void OnCommand_back(string szCommand)
|
||||
{
|
||||
|
||||
@@ -3111,6 +3112,13 @@ namespace BrewMonster.UI
|
||||
{
|
||||
AUIDialog pShow1 = null, pShow2 = null;
|
||||
NPC_ESSENCE? pCurNPCEssence = GetGameUIMan().m_pCurNPCEssence;
|
||||
|
||||
// Check if the integer matches any enum value
|
||||
if (Enum.IsDefined(typeof(SERVICE_TYPE), idFunction))
|
||||
{
|
||||
SERVICE_TYPE k = (SERVICE_TYPE)idFunction;
|
||||
BMLogger.Log($" PopupCorrespondingServiceDialog: {k}");
|
||||
}
|
||||
|
||||
if (idFunction == (int)SERVICE_TYPE.NPC_SELL || idFunction == (int)SERVICE_TYPE.NPC_BUY)
|
||||
{
|
||||
@@ -3208,6 +3216,7 @@ namespace BrewMonster.UI
|
||||
}
|
||||
else if (idFunction == (int)SERVICE_TYPE.NPC_MAKE)
|
||||
{
|
||||
// C++
|
||||
//NPC_MAKE_SERVICE pMake = (NPC_MAKE_SERVICE)pData;
|
||||
//if (pMake.produce_type == 2)
|
||||
// pShow1 = m_pAUIManager.GetDialog("Win_Produce1");
|
||||
@@ -3223,6 +3232,22 @@ namespace BrewMonster.UI
|
||||
// GetGameUIMan().m_pDlgProduce.ClearMaterial();
|
||||
//pShow2 = m_pAUIManager.GetDialog("Win_Inventory");
|
||||
//GetGameUIMan().m_pDlgProduce.UpdateProduce(1, 0);
|
||||
|
||||
// NPC_MAKE_SERVICE pMake = (NPC_MAKE_SERVICE)pData;
|
||||
// if (pMake.produce_type == 2)
|
||||
// pShow1 = m_pAUIManager.GetDialog("Win_Produce1");
|
||||
// else
|
||||
// pShow1 = m_pAUIManager.GetDialog("Win_Produce");
|
||||
// GetGameUIMan().m_pDlgProduce = (CDlgProduce*)pShow1;
|
||||
// GetHostPlayer().PrepareNPCService(iService);
|
||||
// pShow1.SetDataPtr(pMake, "ptr_NPC_MAKE_SERVICE");
|
||||
// if (pMake.produce_type == 1 ||
|
||||
// pMake.produce_type == 3 ||
|
||||
// pMake.produce_type == 4 ||
|
||||
// pMake.produce_type == 5)
|
||||
// GetGameUIMan().m_pDlgProduce.ClearMaterial();
|
||||
// pShow2 = m_pAUIManager.GetDialog("Win_Inventory");
|
||||
// GetGameUIMan().m_pDlgProduce.UpdateProduce(1, 0);
|
||||
}
|
||||
else if (idFunction == (int)SERVICE_TYPE.NPC_DECOMPOSE)
|
||||
{
|
||||
@@ -3349,11 +3374,12 @@ namespace BrewMonster.UI
|
||||
CECTaskInterface pTask = GetHostPlayer().GetTaskInterface();
|
||||
|
||||
pTask.GetAwardCandidates(opt.param, ref ad);
|
||||
|
||||
if (ad.m_ulCandItems > 1)
|
||||
{
|
||||
pShow1 = m_pAUIManager.GetDialog("Win_Award");
|
||||
//CDlgAward pAward = (pShow1) as CDlgAward;
|
||||
//if (pAward) pAward.UpdateAwardItem(opt.param, true);
|
||||
CDlgAward pAward = (pShow1) as CDlgAward;
|
||||
if (pAward) pAward.UpdateAwardItem((ushort)opt.param, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3a8de291089473f9d21a99f27014a68
|
||||
timeCreated: 1764934713
|
||||
@@ -0,0 +1,53 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts.UI
|
||||
{
|
||||
public class AwardItem : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Image img;
|
||||
[SerializeField] private Button btn;
|
||||
|
||||
private Vector2Int _position;
|
||||
|
||||
public Vector2Int Position => _position;
|
||||
|
||||
public void SetPositionIndex(int row, int column)
|
||||
{
|
||||
_position = new Vector2Int(row, column);
|
||||
this.gameObject.name = "Item_" + row + "_" + column;
|
||||
}
|
||||
|
||||
|
||||
public void SetImage(Sprite sprite)
|
||||
{
|
||||
img.sprite = sprite;
|
||||
}
|
||||
|
||||
public void SetText(string text)
|
||||
{
|
||||
// TODO: Add a Text component and set its text
|
||||
}
|
||||
|
||||
public void SetColor(Color color)
|
||||
{
|
||||
// TODO : Set color to relevant UI components
|
||||
}
|
||||
|
||||
public void SetHint(string text)
|
||||
{
|
||||
// TODO : Implement hint functionality
|
||||
}
|
||||
|
||||
public void ClearCover()
|
||||
{
|
||||
// TODO : Implement cover clearing functionality
|
||||
}
|
||||
|
||||
public void Show(bool show)
|
||||
{
|
||||
gameObject.SetActive(show);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d87c7b8ac564f919171a5173812980e
|
||||
timeCreated: 1764940671
|
||||
@@ -0,0 +1,375 @@
|
||||
using System;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts.Task;
|
||||
using BrewMonster.UI;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using PerfectWorld.Scripts.Task;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts.UI
|
||||
{
|
||||
public class CDlgAward : AUIDialog
|
||||
{
|
||||
#region FIELDS AND PROPERTIES
|
||||
|
||||
private const int MIN_ROW_COUNT_TO_SHOW = 6;
|
||||
|
||||
[SerializeField] private Button m_pBtn_Confirm;
|
||||
[SerializeField] private Vector2Int _itemSize = new Vector2Int(50, 50);
|
||||
[SerializeField] private AwardItem _awardItemPrefab;
|
||||
[SerializeField] private Transform _itemsParent;
|
||||
[SerializeField] private Toggle[] _radioButtons;
|
||||
|
||||
[Header("DEBUG")]
|
||||
[SerializeField] private AwardItem[] _awardItems;
|
||||
|
||||
bool m_bThroughNPC;
|
||||
bool m_bSpendContribution;
|
||||
|
||||
#endregion
|
||||
|
||||
int _rowCount => _itemSize.x;
|
||||
int _columnCount => _itemSize.y;
|
||||
|
||||
#region UNITY METHODS
|
||||
|
||||
void Awake()
|
||||
{
|
||||
SpawnItems();
|
||||
InitRadioBtns();
|
||||
|
||||
m_pBtn_Confirm.onClick.AddListener(OnCommand_confirm);
|
||||
}
|
||||
|
||||
private void InitRadioBtns()
|
||||
{
|
||||
for (int i = 0; i < _radioButtons.Length; i++)
|
||||
{
|
||||
_radioButtons[i].isOn = false;
|
||||
_radioButtons[i].onValueChanged.AddListener( OnCommand_select );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SpawnItems()
|
||||
{
|
||||
for (int i = 1; i <= _rowCount; i++)
|
||||
{
|
||||
for (int j = 1; j <= _columnCount; j++)
|
||||
{
|
||||
AwardItem item = Instantiate(_awardItemPrefab ,_itemsParent);
|
||||
item.SetPositionIndex(i, j);
|
||||
// Positioning logic can be added here
|
||||
}
|
||||
}
|
||||
_awardItems = new AwardItem[_rowCount];
|
||||
_awardItems = GetComponentsInChildren<AwardItem>();
|
||||
_awardItemPrefab.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected bool OnInitDialog()
|
||||
{
|
||||
m_bThroughNPC = false;
|
||||
m_bSpendContribution = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void UpdateAwardItem(ushort idTask, bool throughNPC, bool spendContribution = false)
|
||||
{
|
||||
AWARD_DATA ad = new AWARD_DATA();
|
||||
CECTaskInterface pTask = GetHostPlayer().GetTaskInterface();
|
||||
m_bThroughNPC = throughNPC;
|
||||
m_bSpendContribution = spendContribution;
|
||||
pTask.GetAwardCandidates(idTask, ref ad);
|
||||
if (ad.m_ulCandItems > 1)
|
||||
{
|
||||
string szName;
|
||||
string strFile = "";
|
||||
string szText;
|
||||
EC_IvtrItem pItem;
|
||||
// AUICTranslate trans; // TODO
|
||||
// int i, j, idItem, nNum;
|
||||
uint idItem, nNum;
|
||||
// Image pImage;
|
||||
// Image pImage2;
|
||||
AwardItem pImage; // Using AwardItem instead of Image
|
||||
|
||||
SetData(idTask, "");
|
||||
// CheckRadioButton(1, 0); // TODO: maybe dont need this
|
||||
m_pBtn_Confirm.gameObject.SetActive(false);
|
||||
|
||||
for (int i=1; i <= _rowCount; i++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d01", i);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break; // All done.
|
||||
|
||||
// TODO: Show/Hide radio button
|
||||
// sprintf(out szName, "Rdo_Award%d", i);
|
||||
// GetDlgItem(szName)->Show(false);
|
||||
// _radioButtons[i-1].gameObject.SetActive(false);
|
||||
GetToggleBtnAt(i).gameObject.SetActive(false);
|
||||
|
||||
// for (j = 1;; j++)
|
||||
for (int j=1; j < _columnCount; j++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d%02d", i, j);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break; // Line done.
|
||||
pImage = GetAwardItemAt(i, j);
|
||||
if(!pImage) break;
|
||||
|
||||
if (i - 1 < (int)ad.m_ulCandItems &&
|
||||
j - 1 < (int)ad.m_CandItems[i - 1].m_ulAwardItems)
|
||||
{
|
||||
idItem = ad.m_CandItems[i - 1].m_AwardItems[j - 1].m_ulItemTemplId;
|
||||
pItem = EC_IvtrItem.CreateItem((int)idItem, 0, 1);
|
||||
|
||||
nNum = ad.m_CandItems[i - 1].m_AwardItems[j - 1].m_ulItemNum;
|
||||
if (nNum > 1)
|
||||
{
|
||||
a_sprintf(out szText, _AL("%d"), nNum);
|
||||
pImage.SetText(szText);
|
||||
}
|
||||
else
|
||||
pImage.SetText(_AL(""));
|
||||
|
||||
pItem.GetDetailDataFromLocal();
|
||||
// pImage.SetHint(trans.Translate(pItem.GetDesc())); // TODO
|
||||
// af_GetFileTitle(pItem.GetIconFile(), strFile); // TODO
|
||||
strFile.ToLower();
|
||||
|
||||
// TODO: Set the image cover here
|
||||
// pImage.SetCover(GetGameUIMan().m_pA2DSpriteIcons[CECGameUIMan::ICONS_INVENTORY],
|
||||
// GetGameUIMan().m_IconMap[CECGameUIMan::ICONS_INVENTORY][strFile]);
|
||||
var sprite = EC_IvtrItemUtils.Instance.ResolveItemIconSprite(pItem.m_tid);
|
||||
pImage.SetImage(sprite);
|
||||
|
||||
EC_IvtrEquip pEquip = new EC_IvtrEquip(pItem.m_tid, pItem.m_expire_date);
|
||||
pImage.SetColor(
|
||||
(pItem.IsEquipment() && pEquip.IsDestroying())
|
||||
? new Color32(128, 128, 128, 255)
|
||||
: new Color32(255, 255, 255, 255));
|
||||
|
||||
// delete pItem;
|
||||
pItem = null;
|
||||
|
||||
// sprintf(out szName, "Rdo_Award%d", i);
|
||||
// GetDlgItem(szName)->Show(true);
|
||||
GetToggleBtnAt(i).gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
pImage.ClearCover();
|
||||
pImage.SetHint(_AL(""));
|
||||
pImage.SetText(_AL(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// turn off uneccessary rows
|
||||
if (ad.m_ulCandItems <= MIN_ROW_COUNT_TO_SHOW)
|
||||
{
|
||||
// ����������٣�������ʣ����
|
||||
// for (i = MIN_ROW_COUNT_TO_SHOW + 1;; i++)
|
||||
for (int i = MIN_ROW_COUNT_TO_SHOW + 1; i < _rowCount; i++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d01", i);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break; // All done.
|
||||
pImage = GetAwardItemAt(i, i);
|
||||
if (!pImage) break;
|
||||
|
||||
// sprintf(out szName, "Rdo_Award%d", i);
|
||||
// GetDlgItem(szName)->Show(false);
|
||||
GetToggleBtnAt(i).gameObject.SetActive(false);
|
||||
|
||||
for (int j = 1; j < _columnCount; j++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d%02d", i, j);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break;
|
||||
// pImage->Show(false);
|
||||
pImage = GetAwardItemAt(i, j);
|
||||
pImage.Show(false);
|
||||
|
||||
// pImage2 = (PAUIIMAGEPICTURE)GetDlgItem(AString().Format("Img_%02d%02d", i, j));
|
||||
// pImage2->Show(false);
|
||||
// pImage2 = GetAwardItemAt(i, j);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// ����ȷ�ϰ�ť��λ�ã����öԻ����С
|
||||
// TODO: Thiết lập vị trí của nút xác nhận, thiết lập kích thước của hộp thoại.
|
||||
// var pBtnConfirm = m_pBtn_Confirm;
|
||||
// AUIObject* pImgLineMid = GetDlgItem(AString().Format("Item_%02d01", MIN_ROW_COUNT_TO_SHOW));
|
||||
// AUIObject* pEdiBg = GetDlgItem("background");
|
||||
// pBtnConfirm->SetPos(pBtnConfirm->GetPos(true).x,
|
||||
// pImgLineMid->GetPos(true).y + pImgLineMid->GetSize().cy + 10);
|
||||
// SetSize(GetSize().cx, pBtnConfirm->GetPos(true).y + pBtnConfirm->GetSize().cy + 30);
|
||||
// pEdiBg->SetSize(pEdiBg->GetSize().cx, GetSize().cy - pEdiBg->GetPos(true).y - 25);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ������ʾȫ���� / Show all rows
|
||||
for (int i = MIN_ROW_COUNT_TO_SHOW + 1; i < _rowCount; i++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d01", i);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break; // All done.
|
||||
pImage = GetAwardItemAt(i, 1);
|
||||
if (!pImage) break; // All done.
|
||||
|
||||
if (ad.m_ulCandItems >= i)
|
||||
{
|
||||
// sprintf(out szName, "Rdo_Award%d", i);
|
||||
// GetDlgItem(szName)->Show(true);
|
||||
GetToggleBtnAt(i).gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
for (int j = 1; j < _columnCount; j++)
|
||||
{
|
||||
// sprintf(out szName, "Item_%02d%02d", i, j);
|
||||
// pImage = (PAUIIMAGEPICTURE)GetDlgItem(szName);
|
||||
// if (!pImage) break;
|
||||
pImage = GetAwardItemAt(i, j);
|
||||
if (!pImage) break;
|
||||
pImage.Show(true);
|
||||
|
||||
// pImage2 = (PAUIIMAGEPICTURE)GetDlgItem(AString().Format("Img_%02d%02d", i, j));
|
||||
// pImage2->Show(true);
|
||||
// TODO: Handle pImage2 if needed
|
||||
// AwardItem pImage2 = GetAwardItemAt(i, j);
|
||||
// pImage2?.Show(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ����ȷ�ϰ�ť��λ�ã����öԻ����С
|
||||
// TODO: Thiết lập vị trí của nút xác nhận, thiết lập kích thước của hộp thoại.
|
||||
// AUIObject* pBtnConfirm = GetDlgItem("Btn_Confirm");
|
||||
// AUIObject* pImgLineLast = GetDlgItem(AString().Format("Item_%02d01", i - 1));
|
||||
// AUIObject* pEdiBg = GetDlgItem("background");
|
||||
// pBtnConfirm->SetPos(pBtnConfirm->GetPos(true).x,
|
||||
// pImgLineLast->GetPos(true).y + pImgLineLast->GetSize().cy + 10);
|
||||
// SetSize(GetSize().cx, pBtnConfirm->GetPos(true).y + pBtnConfirm->GetSize().cy + 30);
|
||||
// pEdiBg->SetSize(pEdiBg->GetSize().cx, GetSize().cy - pEdiBg->GetPos(true).y - 25);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sprintf(out string szName, string format, int i)
|
||||
{
|
||||
// Convert C-style format specifiers to C# format
|
||||
// %02d -> zero-padded 2-digit integer (D2 format)
|
||||
// %d -> regular integer
|
||||
string csharpFormat = format
|
||||
.Replace("%02d", "{0:D2}")
|
||||
.Replace("%d", "{0}");
|
||||
szName = string.Format(csharpFormat, i);
|
||||
}
|
||||
|
||||
void sprintf(out string szName, string format, int i, int j)
|
||||
{
|
||||
// Convert C-style format specifiers to C# format for two parameters
|
||||
// %02d -> zero-padded 2-digit integer (D2 format)
|
||||
// %d -> regular integer
|
||||
// Replace occurrences sequentially: first -> {0}, second -> {1}
|
||||
string csharpFormat = format;
|
||||
int paramIndex = 0;
|
||||
csharpFormat = System.Text.RegularExpressions.Regex.Replace(csharpFormat, @"%02d|%d", match =>
|
||||
{
|
||||
string replacement = paramIndex == 0
|
||||
? (match.Value == "%02d" ? "{0:D2}" : "{0}")
|
||||
: (match.Value == "%02d" ? "{1:D2}" : "{1}");
|
||||
paramIndex++;
|
||||
return replacement;
|
||||
});
|
||||
szName = string.Format(csharpFormat, i, j);
|
||||
}
|
||||
|
||||
void a_sprintf(out string szText, string format, uint nNum)
|
||||
{
|
||||
// Convert C-style format specifiers to C# format
|
||||
// %d -> regular integer (for uint)
|
||||
string csharpFormat = format.Replace("%d", "{0}");
|
||||
szText = string.Format(csharpFormat, nNum);
|
||||
}
|
||||
|
||||
string _AL(string text)
|
||||
{
|
||||
// Localization helper - returns the string as-is
|
||||
// In C++ this would typically handle localization, but for now just return the text
|
||||
return text;
|
||||
}
|
||||
|
||||
AwardItem GetAwardItemAt(int row, int column)
|
||||
{
|
||||
foreach (var item in _awardItems)
|
||||
{
|
||||
if (item.Position.x == row &&
|
||||
item.Position.y == column)
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Toggle GetToggleBtnAt(int row)
|
||||
{
|
||||
int index = row - 1;
|
||||
if( index < 0 || index >= _radioButtons.Length)
|
||||
return null;
|
||||
return _radioButtons[index];
|
||||
}
|
||||
|
||||
void OnCommand_select(bool toggleValue)
|
||||
{
|
||||
if(toggleValue) m_pBtn_Confirm.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
void OnCommand_confirm()
|
||||
{
|
||||
// int i;
|
||||
string szName;
|
||||
Toggle pRadio;
|
||||
uint idTask = GetData();
|
||||
|
||||
for( int i = 1; i < _rowCount ; i++ )
|
||||
{
|
||||
// sprintf(szName, "Rdo_Award%d", i);
|
||||
// pRadio = (PAUIRADIOBUTTON)GetDlgItem(szName);
|
||||
// if( !pRadio || !pRadio->IsShow() ) break;
|
||||
pRadio = GetToggleBtnAt(i);
|
||||
if(!pRadio || !pRadio.gameObject.activeInHierarchy) return;
|
||||
|
||||
// if( pRadio.IsChecked() )
|
||||
if( pRadio.isOn )
|
||||
{
|
||||
if (m_bThroughNPC) {
|
||||
// GetGameSession().c2s_CmdNPCSevReturnTask(idTask, i - 1);
|
||||
UnityGameSession.c2s_CmdNPCSevReturnTask((int)idTask, i - 1);
|
||||
GetGameUIMan().EndNPCService();
|
||||
} else if (m_bSpendContribution) {
|
||||
// TODO: Implement spend contribution logic
|
||||
// CECTaskInterface pTask = GetHostPlayer().GetTaskInterface();
|
||||
// pTask.FinishTaskSpendingWorldContribution(idTask, i - 1);
|
||||
} else {
|
||||
// TODO: Implement choose award logic
|
||||
// CECTaskInterface pTask = GetHostPlayer().GetTaskInterface();
|
||||
// pTask.ChooseAward(idTask, i - 1);
|
||||
}
|
||||
Show(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fac4acd7d2948cb81a522265a3f3863
|
||||
timeCreated: 1764934733
|
||||
@@ -0,0 +1,32 @@
|
||||
using BrewMonster.Scripts.Task;
|
||||
using CSNetwork.GPDataType;
|
||||
|
||||
namespace BrewMonster.Scripts.UI
|
||||
{
|
||||
public class CECUIHelper
|
||||
{
|
||||
public static string DlgTaskName = "Win_Quest";
|
||||
|
||||
public static A3DVECTOR3 GetTaskObjectCoordinates(int id, ref bool in_table)
|
||||
{
|
||||
in_table = false;
|
||||
return new A3DVECTOR3(0);
|
||||
|
||||
// TODO: Implement this method properly
|
||||
// A3DVECTOR3 ret(0.f);
|
||||
// in_table = false;
|
||||
// CECGame::ObjectCoords TargetTemp;
|
||||
// ret = g_pGame->GetGameRun()->GetHostPlayer()->GetObjectCoordinates(
|
||||
// id, TargetTemp, in_table);
|
||||
// if (!in_table && MAJOR_MAP == g_pGame->GetGameRun()->GetWorld()->GetInstanceID()) {
|
||||
// ATaskTemplMan *pMan = g_pGame->GetTaskTemplateMan();
|
||||
// const NPC_INFO* pInfo = pMan->GetTaskNPCInfo(id);
|
||||
// if(pInfo) {
|
||||
// ret.Set(pInfo->x, pInfo->z, pInfo->y);
|
||||
// in_table = true;
|
||||
// }
|
||||
// }
|
||||
// return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b63b60ce54a4913a7fd46db93a3610e
|
||||
timeCreated: 1765539869
|
||||
@@ -8,6 +8,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using BrewMonster.Scripts.Task;
|
||||
using BrewMonster.Scripts.Task.UI;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
@@ -17,8 +18,8 @@ namespace BrewMonster.UI
|
||||
DlgNPC m_pDlgNPC;
|
||||
public NPC_ESSENCE? m_pCurNPCEssence;
|
||||
public int m_idCurFinishTask = -1;
|
||||
private DlgTask m_pDlgTask => DlgTask.Instance;
|
||||
|
||||
private DlgTask m_pDlgTask;
|
||||
|
||||
public static bool TALKPROC_IS_TERMINAL(uint id)
|
||||
{
|
||||
return ((id & 0x80000000u) != 0) && ((id & 0x40000000u) != 0);
|
||||
@@ -112,6 +113,14 @@ namespace BrewMonster.UI
|
||||
{
|
||||
return m_canvas;
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
m_pDlgTask = GetDialog(CECUIHelper.DlgTaskName).GetComponent<DlgTask>();
|
||||
m_pDlgTask.Show(false);
|
||||
}
|
||||
}
|
||||
public enum EC_GAMEUI_ICONS
|
||||
|
||||
|
||||
@@ -21,23 +21,23 @@ namespace BrewMonster
|
||||
private void Awake()
|
||||
{
|
||||
EventBus.Subscribe<cmd_self_info_00>(UpdateHostPlayerInfoUI);
|
||||
EventBus.Subscribe<InfoHostPlayer>(UpdateNameHostPlayer);
|
||||
EventBus.Subscribe<EXPToUpLevel>(UpdateNeededExp);
|
||||
EventBus.Subscribe<CECHostPlayer.InfoHostPlayer>(UpdateNameHostPlayer);
|
||||
EventBus.Subscribe<CECHostPlayer.EXPToUpLevel>(UpdateNeededExp);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventBus.Unsubscribe<cmd_self_info_00>(UpdateHostPlayerInfoUI);
|
||||
EventBus.Unsubscribe<InfoHostPlayer>(UpdateNameHostPlayer);
|
||||
EventBus.Unsubscribe<EXPToUpLevel>(UpdateNeededExp);
|
||||
EventBus.Unsubscribe<CECHostPlayer.InfoHostPlayer>(UpdateNameHostPlayer);
|
||||
EventBus.Unsubscribe<CECHostPlayer.EXPToUpLevel>(UpdateNeededExp);
|
||||
}
|
||||
|
||||
private void UpdateNeededExp(EXPToUpLevel obj)
|
||||
private void UpdateNeededExp(CECHostPlayer.EXPToUpLevel obj)
|
||||
{
|
||||
neededExp = obj.NeededExp;
|
||||
}
|
||||
|
||||
private void UpdateNameHostPlayer(InfoHostPlayer obj)
|
||||
private void UpdateNameHostPlayer(CECHostPlayer.InfoHostPlayer obj)
|
||||
{
|
||||
nameText.text = obj.NameHostPlayer;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
using BrewMonster.Network;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public class JumpBtn : MonoBehaviour
|
||||
{
|
||||
Button jumpBtn;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
if(jumpBtn == null)
|
||||
{
|
||||
jumpBtn = GetComponent<Button>();
|
||||
jumpBtn.onClick.AddListener(OnClickBtnJump);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickBtnJump()
|
||||
{
|
||||
if(EC_Game.GetGameRun()?.GetHostPlayer() != null)
|
||||
{
|
||||
EC_Game.GetGameRun()?.GetHostPlayer().OnClickBtnJump();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user