Merge remote-tracking branch 'origin/develop' into feature/save-skill-combo
# Conflicts: # Assets/PerfectWorld/Prefab/UIManager.prefab # Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97d5bf1c2fec02844993b30c645fe286
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
// 宠物出场自动释放技能配置
|
||||
// 格式:技能1 技能2 技能3......
|
||||
|
||||
801
|
||||
802
|
||||
803
|
||||
804
|
||||
805
|
||||
1559
|
||||
1560
|
||||
1561
|
||||
1562
|
||||
1563
|
||||
2081
|
||||
2077
|
||||
2093
|
||||
2059
|
||||
2094
|
||||
2096
|
||||
2098
|
||||
2100
|
||||
2102
|
||||
2104
|
||||
2106
|
||||
2108
|
||||
2110
|
||||
2112
|
||||
2114
|
||||
2116
|
||||
2062
|
||||
2118
|
||||
2120
|
||||
2121
|
||||
2122
|
||||
2146
|
||||
2124
|
||||
2125
|
||||
2126
|
||||
2058
|
||||
2127
|
||||
2128
|
||||
2136
|
||||
2725
|
||||
3278
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8022adc119619b34fb2192efbff367d1
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -85,11 +85,21 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8022adc119619b34fb2192efbff367d1
|
||||
m_Address: Assets/Addressable/petautoskill.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 863a9da1fd09c934ea870dc4cfd4a906
|
||||
m_Address: Assets/Addressable/maps/a61/movemap/r1_1-c1_2-l0.prmap.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 97d5bf1c2fec02844993b30c645fe286
|
||||
m_Address: Assets/Addressable/badwords.txt
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 98b87a70ddccda2459742976c2b90262
|
||||
m_Address: Assets/Addressable/gshop1.txt
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa2ec4fb3e3ae4843bcc25ec13c56761
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ef57348cc14e2c44b0d93d82309fb45
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4300000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,12 +9,13 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6620715533904588879}
|
||||
- component: {fileID: 8971906507328977954}
|
||||
m_Layer: 0
|
||||
m_Name: litmodel_1858.bmd
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6620715533904588879
|
||||
Transform:
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.6009749, y: 0.60097486, z: 0.60097486}
|
||||
m_LocalScale: {x: 0.60097486, y: 0.60097486, z: 0.60097486}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3802196365371919653}
|
||||
@@ -34,8 +35,24 @@ Transform:
|
||||
- {fileID: 642723427162609800}
|
||||
- {fileID: 5468985526413160933}
|
||||
- {fileID: 4305396298280240728}
|
||||
- {fileID: 2374675958549553526}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8971906507328977954
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2314062561766911216}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59e5e7b3dc884d92a21aa09f5a2c208d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_modelPath: litmodels/a61/6/litmodel_1858.bmd
|
||||
_buildingMeshRenderer: {fileID: 483505391458485963, guid: 028823e57276945c4a8c11c1d6067394, type: 3}
|
||||
_halfSpacePrefab: {fileID: 0}
|
||||
--- !u!1 &2339233178148791680
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -45,15 +62,15 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4305396298280240728}
|
||||
- component: {fileID: 5018183914019923839}
|
||||
- component: {fileID: 7601683473776944617}
|
||||
- component: {fileID: 7598424356279927743}
|
||||
- component: {fileID: 2766007181529087648}
|
||||
m_Layer: 0
|
||||
m_Name: Plane07
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4305396298280240728
|
||||
Transform:
|
||||
@@ -70,6 +87,21 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6620715533904588879}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5018183914019923839
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2339233178148791680}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ce1edacf192a4339b2b54396daf5feb0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_meshFilter: {fileID: 7601683473776944617}
|
||||
_meshRenderer: {fileID: 7598424356279927743}
|
||||
_material: {fileID: 2100000, guid: 38603659d794349f6abdd4959b09ee3c, type: 2}
|
||||
--- !u!33 &7601683473776944617
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -123,28 +155,6 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &2766007181529087648
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2339233178148791680}
|
||||
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: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4300000, guid: debea84a7d6595643a53de1dd566971e, type: 2}
|
||||
--- !u!1 &3485809628087161448
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -157,13 +167,12 @@ GameObject:
|
||||
- component: {fileID: 4376806984282474990}
|
||||
- component: {fileID: 6386291787311475679}
|
||||
- component: {fileID: 3930127726212162846}
|
||||
- component: {fileID: 3212405443933505398}
|
||||
m_Layer: 0
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &3802196365371919653
|
||||
Transform:
|
||||
@@ -254,28 +263,6 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!64 &3212405443933505398
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3485809628087161448}
|
||||
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: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4300000, guid: 9fa5ff3c3e448134eb7e3ce9c089ef4a, type: 2}
|
||||
--- !u!1 &3638618787983965184
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -285,15 +272,15 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5468985526413160933}
|
||||
- component: {fileID: 8855383621233754012}
|
||||
- component: {fileID: 3682369117625429100}
|
||||
- component: {fileID: 933992426169001204}
|
||||
- component: {fileID: 2323754348112517762}
|
||||
m_Layer: 0
|
||||
m_Name: Box76
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5468985526413160933
|
||||
Transform:
|
||||
@@ -310,6 +297,21 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6620715533904588879}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8855383621233754012
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3638618787983965184}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ce1edacf192a4339b2b54396daf5feb0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_meshFilter: {fileID: 3682369117625429100}
|
||||
_meshRenderer: {fileID: 933992426169001204}
|
||||
_material: {fileID: 2100000, guid: 38603659d794349f6abdd4959b09ee3c, type: 2}
|
||||
--- !u!33 &3682369117625429100
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -363,13 +365,100 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &2323754348112517762
|
||||
--- !u!1 &4363002964825893588
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2374675958549553526}
|
||||
- component: {fileID: 4527544251728066118}
|
||||
- component: {fileID: 5311223652641166228}
|
||||
- component: {fileID: 3754629199141232990}
|
||||
m_Layer: 0
|
||||
m_Name: CDBrushCollider
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2374675958549553526
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4363002964825893588}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0.009164956, y: -0.35673073, z: 0.033771332, w: 0.93355167}
|
||||
m_LocalPosition: {x: 593.935, y: 8.849079, z: 1059.9131}
|
||||
m_LocalScale: {x: 1.6639633, y: 1.6639631, z: 1.6639628}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6620715533904588879}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &4527544251728066118
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4363002964825893588}
|
||||
m_Mesh: {fileID: 4300000, guid: 7ef57348cc14e2c44b0d93d82309fb45, type: 2}
|
||||
--- !u!23 &5311223652641166228
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4363002964825893588}
|
||||
m_Enabled: 0
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
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
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &3754629199141232990
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3638618787983965184}
|
||||
m_GameObject: {fileID: 4363002964825893588}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
@@ -384,7 +473,7 @@ MeshCollider:
|
||||
serializedVersion: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4300000, guid: c08d860dbee1fc04982548760a3e6772, type: 2}
|
||||
m_Mesh: {fileID: 4300000, guid: 7ef57348cc14e2c44b0d93d82309fb45, type: 2}
|
||||
--- !u!1 &4972250255338124789
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -394,15 +483,15 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 642723427162609800}
|
||||
- component: {fileID: 9097665641590201619}
|
||||
- component: {fileID: 5167380396376929393}
|
||||
- component: {fileID: 4925996912478658442}
|
||||
- component: {fileID: 2968994200318392227}
|
||||
m_Layer: 0
|
||||
m_Name: Object3420
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &642723427162609800
|
||||
Transform:
|
||||
@@ -419,6 +508,21 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6620715533904588879}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &9097665641590201619
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4972250255338124789}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ce1edacf192a4339b2b54396daf5feb0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_meshFilter: {fileID: 5167380396376929393}
|
||||
_meshRenderer: {fileID: 4925996912478658442}
|
||||
_material: {fileID: 2100000, guid: 38603659d794349f6abdd4959b09ee3c, type: 2}
|
||||
--- !u!33 &5167380396376929393
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -472,28 +576,6 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &2968994200318392227
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4972250255338124789}
|
||||
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: 5
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 4300000, guid: 8f3249ba302780d439604a8adbef43a0, type: 2}
|
||||
--- !u!1 &9179223615275914270
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -503,6 +585,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8430704228723251584}
|
||||
- component: {fileID: 7012760499325483412}
|
||||
- component: {fileID: 5934929730268457527}
|
||||
- component: {fileID: 5803992813184748586}
|
||||
m_Layer: 0
|
||||
@@ -510,7 +593,7 @@ GameObject:
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 2147483647
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8430704228723251584
|
||||
Transform:
|
||||
@@ -527,6 +610,21 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6620715533904588879}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7012760499325483412
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9179223615275914270}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ce1edacf192a4339b2b54396daf5feb0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_meshFilter: {fileID: 5934929730268457527}
|
||||
_meshRenderer: {fileID: 5803992813184748586}
|
||||
_material: {fileID: 2100000, guid: 38603659d794349f6abdd4959b09ee3c, type: 2}
|
||||
--- !u!33 &5934929730268457527
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,6 +33,8 @@ MonoBehaviour:
|
||||
prefab: {fileID: 5910006447059157136, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
|
||||
- id: Win_Enchase
|
||||
prefab: {fileID: 5636724581774400035, guid: de6ac6f2630425044a55299c703670f1, type: 3}
|
||||
- id: Win_Disenchase
|
||||
prefab: {fileID: 8616615506244952208, guid: 0a7317ed1e4ea3c478057319c0b8fee2, type: 3}
|
||||
- id: Win_QuestMinion
|
||||
prefab: {fileID: 2135374639804663431, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
|
||||
- id: Win_Character
|
||||
@@ -43,5 +45,5 @@ MonoBehaviour:
|
||||
prefab: {fileID: 5492547392745930423, guid: 54cccb2c6a758a24183474cd385ccb2c, type: 3}
|
||||
- id: CDlgInfoTooltip
|
||||
prefab: {fileID: 6830833846243993097, guid: 97dd1de3aba08a04980849e40d5c1ea4, type: 3}
|
||||
- id: Win_Message2
|
||||
prefab: {fileID: 1590197940424963217, guid: 0c248d0510a114829b58d62d2ecc3b5e, type: 3}
|
||||
- id: MagicProgress1
|
||||
prefab: {fileID: 1126053271199039253, guid: 526d462bd8c87b74c9e461e80d028cb2, type: 3}
|
||||
|
||||
@@ -639,7 +639,7 @@ namespace BrewMonster.Common
|
||||
UnityGameSession.Instance.GameSession.c2s_SendCmdCancelAction();
|
||||
}
|
||||
}
|
||||
void SendCmdPetCtrl(int idTarget, int cmd, byte[] pParamBuf, int iParamLen)
|
||||
public void SendCmdPetCtrl(int idTarget, int cmd, byte[] pParamBuf, int iParamLen)
|
||||
{
|
||||
CECCounter pCnt = m_CounterMap[(int)CommandID.PET_CTRL];
|
||||
if (pCnt.IsFull())
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace BrewMonster
|
||||
bAtk_NoForce = false;
|
||||
bBls_NoForce = false;
|
||||
bLockQuickBar = false;
|
||||
bPetAutoSkill = false;
|
||||
bPetAutoSkill = true;
|
||||
bAutoTeamForTask = true;
|
||||
bDisableAutoWikiHelp = false;
|
||||
bExclusiveAwardMode = true;
|
||||
|
||||
@@ -2899,12 +2899,15 @@ namespace BrewMonster
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public ushort[] name; // name, max 15 characters
|
||||
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_model; // model path
|
||||
public string FileModel => ByteToStringUtils.ByteArrayToUnicodeString(file_model);
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_icon; // icon file
|
||||
public string FileIcon => ByteToStringUtils.ByteArrayToUnicodeString(file_icon );
|
||||
|
||||
public uint character_combo_id; // character combo id
|
||||
|
||||
@@ -5029,7 +5032,7 @@ namespace BrewMonster
|
||||
public int[] num_evolve; // evolution items
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public int[,] num_inherit; // inheritance parameters
|
||||
public int[] num_inherit; // inheritance parameters
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public int[] num_rand_skill; // random skill parameters
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
using BrewMonster;
|
||||
using BrewMonster.Scripts.Task;
|
||||
using CSNetwork;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using CSNetwork.GPDataType;
|
||||
|
||||
namespace BrewMonster.Network
|
||||
{
|
||||
public partial class EC_Game
|
||||
@@ -34,6 +38,7 @@ namespace BrewMonster.Network
|
||||
private static Dictionary<int, ItemMsgMapEntry> m_ItemMsgMap; // TemplateId -> (MessageId, DisplayMode)
|
||||
private static CECConfigs m_pConfigs;
|
||||
private static int m_iCurCursor; // Current cursor
|
||||
private static List<int> m_PetAutoSkills = new List<int>();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -132,7 +137,7 @@ namespace BrewMonster.Network
|
||||
// Load coord_data.txt (C++: Configs/Coord_data.txt) for clickable task links auto-move.
|
||||
// 加载 coord_data.txt(C++:Configs/Coord_data.txt)用于任务可点击链接的自动移动。
|
||||
LoadObjectCoord();
|
||||
|
||||
LoadPetAutoSkill();
|
||||
return true;
|
||||
}
|
||||
public static CECConfigs GetConfigs() { return m_pConfigs; }
|
||||
@@ -527,7 +532,6 @@ namespace BrewMonster.Network
|
||||
|
||||
public static int GetObjectCoord(string strTargetID, ref List<OBJECT_COORD> TargetCoord)
|
||||
{
|
||||
|
||||
int count = 0;
|
||||
foreach(var coord in TargetCoord)
|
||||
{
|
||||
@@ -541,6 +545,73 @@ namespace BrewMonster.Network
|
||||
return count;
|
||||
}
|
||||
|
||||
public static bool IsPetAutoSkill(int skill_id)
|
||||
{
|
||||
return m_PetAutoSkills.Contains(skill_id);
|
||||
}
|
||||
|
||||
// Load the pet auto skill table
|
||||
public static async UniTask<bool> LoadPetAutoSkill()
|
||||
{
|
||||
string pszFilename = "Assets/Addressable/petautoskill.txt";
|
||||
var ta = await LoadStringTableTextAssetByAddressables(pszFilename);
|
||||
if (ta == null || string.IsNullOrEmpty(ta.text))
|
||||
{
|
||||
BMLogger.LogError($"[AUIManager] ImportStringTable failed: cannot load Addressables TextAsset for key='{pszFilename}'");
|
||||
return false;
|
||||
}
|
||||
|
||||
using (var sr = new StringReader(ta.text))
|
||||
{
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
continue;
|
||||
|
||||
if (int.TryParse(line, out int key))
|
||||
{
|
||||
m_PetAutoSkills.Add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static async UniTask<TextAsset> LoadStringTableTextAssetByAddressables(string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Initialize Addressables if not already initialized (Unity-safe)
|
||||
await Addressables.InitializeAsync().ToUniTask();
|
||||
|
||||
// Load using Addressables directly with WaitForCompletion (Unity-safe, won't deadlock)
|
||||
// This matches the pattern used in EC_Game.cs
|
||||
var handle = Addressables.LoadAssetAsync<TextAsset>(key);
|
||||
var textAsset = await handle.ToUniTask();
|
||||
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded && textAsset != null)
|
||||
{
|
||||
// Keep the handle valid; string tables are used for the whole session
|
||||
// Note: We don't release the handle here to keep the asset loaded
|
||||
return textAsset;
|
||||
}
|
||||
|
||||
if (handle.IsValid())
|
||||
{
|
||||
Addressables.Release(handle);
|
||||
}
|
||||
|
||||
BMLogger.LogError($"[AUIManager] Failed to load TextAsset for key='{key}'");
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
BMLogger.LogError($"[AUIManager] LoadStringTableTextAssetByAddressables exception for key='{key}': {e}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -470,6 +470,7 @@ public class CECNPCMan : IMsgHandler
|
||||
if (npc != null)
|
||||
{
|
||||
m_NPCTab.Remove(Info.nid);
|
||||
GameObject.Destroy(npc.gameObject);
|
||||
}
|
||||
|
||||
// Nếu id này có trong bảng unknown thì xóa nó
|
||||
@@ -558,7 +559,7 @@ public class CECNPCMan : IMsgHandler
|
||||
}
|
||||
if (bPet)
|
||||
{
|
||||
//pNPC = new CECPet(this);
|
||||
pNPC = CECGameRun.Instance.GetPet();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -570,7 +571,9 @@ public class CECNPCMan : IMsgHandler
|
||||
case DATA_TYPE.DT_MONSTER_ESSENCE:
|
||||
pNPC = CECGameRun.Instance.GetMonster();
|
||||
break;
|
||||
case DATA_TYPE.DT_PET_ESSENCE:/* pNPC = new CECPet(this);*/ break;
|
||||
case DATA_TYPE.DT_PET_ESSENCE:
|
||||
pNPC = CECGameRun.Instance.GetPet();
|
||||
break;
|
||||
default:
|
||||
UnityEngine.Debug.Assert(false, "Invalid DATA_TYPE in CreateNPC");
|
||||
return null;
|
||||
|
||||
@@ -67,7 +67,20 @@ namespace BrewMonster.Scripts
|
||||
m_pWorkMan = pWorkMan;
|
||||
m_pHost = pWorkMan.GetHostPlayer();
|
||||
}
|
||||
public virtual bool Tick(float dwDeltaTime)
|
||||
{
|
||||
if (m_bFirstTick)
|
||||
{
|
||||
m_bFirstTick = false;
|
||||
OnFirstTick();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
protected virtual void OnFirstTick()
|
||||
{
|
||||
base.OnFirstTick();
|
||||
}
|
||||
// Operations
|
||||
// Override from CECObjectWork
|
||||
public override void Cancel()
|
||||
@@ -284,6 +297,7 @@ namespace BrewMonster.Scripts
|
||||
FinishWorkAtPriority(iPriority);
|
||||
WorkList workList = m_WorkStack[iPriority];
|
||||
workList.Add(pWork);
|
||||
BMLogger.LogError("m_WorkStack " + pWork.GetWorkID());
|
||||
if (shouldStart)
|
||||
{
|
||||
if (iPriority > m_iCurPriority)
|
||||
@@ -497,7 +511,8 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
public void StartDelayedWork()
|
||||
{
|
||||
if (!HasDelayedWork()){
|
||||
if (!HasDelayedWork())
|
||||
{
|
||||
return;
|
||||
}
|
||||
CECHPWork pWork = m_Delayed.pWork;
|
||||
@@ -511,7 +526,8 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
public void ClearDelayedWork()
|
||||
{
|
||||
if (!HasDelayedWork()){
|
||||
if (!HasDelayedWork())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// LOG_DEBUG_INFO(AString().Format("delayed CECHPWork::%s priority=%d cleared", m_Delayed.pWork->GetWorkName(), m_Delayed.iPriority));
|
||||
@@ -608,7 +624,7 @@ namespace BrewMonster.Scripts
|
||||
case CECHPWork.Host_work_ID.WORK_FREEFALL: pWork = new CECHPWorkFall(this); break;
|
||||
//case CECHPWork.Host_work_ID.WORK_SIT: pWork = new CECHPWorkSit(this); break;
|
||||
case CECHPWork.Host_work_ID.WORK_PICKUP: pWork = new EC_HPWorkPick(this); break;
|
||||
//case CECHPWork.Host_work_ID.WORK_CONCENTRATE: pWork = new CECHPWorkConcentrate(this); break;
|
||||
case CECHPWork.Host_work_ID.WORK_CONCENTRATE: pWork = new CECHPWorkConcentrate(this); break;
|
||||
//case CECHPWork.Host_work_ID.WORK_REVIVE: pWork = new CECHPWorkRevive(this); break;
|
||||
case CECHPWork.Host_work_ID.WORK_FLASHMOVE: pWork = new CECHPWorkFMove(this); break;
|
||||
//case CECHPWork.Host_work_ID.WORK_BEBOUND: pWork = new CECHPWorkBeBound(this); break;
|
||||
@@ -622,7 +638,6 @@ namespace BrewMonster.Scripts
|
||||
|
||||
return pWork;
|
||||
}
|
||||
|
||||
public bool CanStartWork(int iWorkID, int iPriority = CECHPWorkMan.Work_priority.PRIORITY_1)
|
||||
{
|
||||
if (!ValidatePriority(iPriority))
|
||||
@@ -847,29 +862,34 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
|
||||
public bool IsMoving()
|
||||
{
|
||||
{
|
||||
bool result = false;
|
||||
if (ValidatePriority(m_iCurPriority))
|
||||
if (ValidatePriority(m_iCurPriority))
|
||||
{
|
||||
WorkList workList = m_WorkStack[m_iCurPriority];
|
||||
if(workList != null)
|
||||
WorkList workList = m_WorkStack[m_iCurPriority];
|
||||
if (workList != null)
|
||||
{
|
||||
for (int i = 0; i < workList.Count; ++ i)
|
||||
for (int i = 0; i < workList.Count; ++i)
|
||||
{
|
||||
if (workList[i].IsMoving())
|
||||
if (workList[i].IsMoving())
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool IsFreeFalling()
|
||||
{
|
||||
return IsWorkRunning(Host_work_ID.WORK_FREEFALL);
|
||||
return IsWorkRunning(Host_work_ID.WORK_FREEFALL);
|
||||
}
|
||||
|
||||
public bool IsOperatingPet()
|
||||
{
|
||||
return IsWorkRunning(Host_work_ID.WORK_CONCENTRATE);
|
||||
}
|
||||
}
|
||||
public abstract class CECHPWorkPostTickCommand
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
using BrewMonster.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
public class CECHPWorkConcentrate : CECHPWork
|
||||
{
|
||||
int m_iDoWhat;
|
||||
|
||||
public CECHPWorkConcentrate(CECHPWorkMan pWorkMan) : base(Host_work_ID.WORK_CONCENTRATE, pWorkMan)
|
||||
{
|
||||
m_dwMask = Work_mask.MASK_CONCENTRATE;
|
||||
m_dwTransMask = Work_mask.MASK_STAND;
|
||||
m_iDoWhat = (int)eDO_PET.DO_SUMMONPET;
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
public override bool CopyData(CECHPWork pWork)
|
||||
{
|
||||
if (base.CopyData(pWork))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
CECHPWorkConcentrate pSrc = (CECHPWorkConcentrate)pWork;
|
||||
m_iDoWhat = pSrc.m_iDoWhat;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
public override bool Tick(float dwDeltaTime)
|
||||
{
|
||||
base.Tick(Time.fixedUnscaledTime);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnFirstTick()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public enum eDO_PET
|
||||
{
|
||||
DO_SUMMONPET = 0, // Summon pet
|
||||
DO_RECALLPET,
|
||||
DO_BANISHPET,
|
||||
DO_RESTOREPET,
|
||||
DO_UNKNOWN,
|
||||
};
|
||||
|
||||
// Set / Get do what flag
|
||||
public void SetDoWhat(int iDoWhat) { m_iDoWhat = iDoWhat; }
|
||||
public int GetDoWhat() { return m_iDoWhat; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 126c0de4ea802b14fa540a689899e007
|
||||
@@ -1,4 +1,7 @@
|
||||
using CSNetwork.GPDataType;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.Scripts.CECHPWorkSpell.Spell_magic_state;
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -16,6 +19,7 @@ namespace BrewMonster.Scripts
|
||||
|
||||
public CECHPWorkSpell(CECHPWorkMan pWorkMan) : base(Host_work_ID.WORK_SPELLOBJECT, pWorkMan)
|
||||
{
|
||||
m_OverTimeCnt = new CECCounter();
|
||||
m_dwMask = Work_mask.MASK_SPELLOBJECT;
|
||||
m_dwTransMask = Work_mask.MASK_STAND | Work_mask.MASK_MOVETOPOS | Work_mask.MASK_TRACEOBJECT;
|
||||
Reset();
|
||||
@@ -30,20 +34,25 @@ namespace BrewMonster.Scripts
|
||||
protected int m_iState;
|
||||
protected int m_idTarget; // Target id
|
||||
|
||||
// On first tick
|
||||
protected virtual void OnFirstTick()
|
||||
{
|
||||
//m_pHost.m_iMoveMode = CECHostPlayer::MOVE_STAND;
|
||||
}
|
||||
// Prepare cast
|
||||
public void PrepareCast(int idTarget, CECSkill pSkill, int iIncantTime)
|
||||
{
|
||||
m_pSkill = pSkill;
|
||||
m_iState = ST_INCANT;
|
||||
m_idTarget = idTarget;
|
||||
|
||||
if (iIncantTime < 0)
|
||||
iIncantTime = 0x7fffffff;
|
||||
else
|
||||
iIncantTime *= 2;
|
||||
|
||||
m_OverTimeCnt.SetPeriod(iIncantTime);
|
||||
m_OverTimeCnt.Reset();
|
||||
}
|
||||
// Change state
|
||||
public void ChangeState(int iState)
|
||||
{
|
||||
|
||||
m_iState = iState;
|
||||
}
|
||||
// Get state
|
||||
public int GetState()
|
||||
@@ -56,14 +65,37 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
|
||||
// Tick routine
|
||||
public virtual bool Tick(uint dwDeltaTime)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Reset work
|
||||
public virtual void Reset()
|
||||
public override bool Tick(float dwDeltaTime)
|
||||
{
|
||||
base.Tick(dwDeltaTime * 1000);
|
||||
|
||||
if (m_OverTimeCnt.IncCounter(dwDeltaTime * 1000))
|
||||
m_bFinished = true;
|
||||
|
||||
if (m_idTarget != 0)
|
||||
{
|
||||
m_pHost.TurnFaceTo(m_idTarget);
|
||||
}
|
||||
if (!m_pHost.IsPlayingAction())
|
||||
{
|
||||
m_pHost.PlayAction((int)PLAYER_ACTION_TYPE.ACT_FIGHTSTAND);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
protected override void OnFirstTick()
|
||||
{
|
||||
m_pHost.m_iMoveMode = (int)MoveMode.MOVE_STAND;
|
||||
}
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
|
||||
m_OverTimeCnt.Reset();
|
||||
|
||||
m_pSkill = null;
|
||||
m_iState = ST_INCANT;
|
||||
m_idTarget = 0;
|
||||
}
|
||||
// Copy work data
|
||||
public virtual bool CopyData(CECHPWork pWork)
|
||||
@@ -73,6 +105,8 @@ namespace BrewMonster.Scripts
|
||||
// Cancel work
|
||||
public virtual void Cancel()
|
||||
{
|
||||
m_pHost.TurnFaceTo(0);
|
||||
base.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using PerfectWorld.Scripts;
|
||||
using CSNetwork;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.Scripts.CECHPWork;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -52,10 +53,27 @@ namespace BrewMonster
|
||||
{
|
||||
OnClickBtnEscape();
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.P))
|
||||
{
|
||||
OnCommandSummon(2);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
public void OnCommandSummon(int slot)
|
||||
{
|
||||
CECPetCorral pPetCorral = GetPetCorral();
|
||||
int nSlot = slot - 1;
|
||||
nSlot += 0 * 10;
|
||||
|
||||
// ·ÉÐÐ-¡·Æï³Ë
|
||||
if (GetActionSwitcher() != null && GetActionSwitcher().OnFlyToRideAction(nSlot))
|
||||
return;
|
||||
|
||||
SummonPet(nSlot);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle left button click / 处理左键点击
|
||||
/// </summary>
|
||||
|
||||
@@ -2185,6 +2185,18 @@ namespace PerfectWorld.Scripts.Managers
|
||||
// This would normally query the equipment addon data
|
||||
return false;
|
||||
}
|
||||
|
||||
public int GetHoleNum()
|
||||
{
|
||||
return Holes != null ? Holes.Count : 0;
|
||||
}
|
||||
|
||||
public int GetHoleItem(int index)
|
||||
{
|
||||
if(Holes == null || index < 0 || index >= Holes.Count)
|
||||
return 0;
|
||||
return Holes[index];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
try
|
||||
{
|
||||
// Load the multi-sprite atlas from Resources
|
||||
var atlasSprites = Resources.LoadAll<Sprite>("UI/IconSprites/iconlist_ivtrm_multisprite");
|
||||
var atlasSprites = EC_Game.GetGameRun().GetUIManager().IconlistIvtr; //Resources.LoadAll<Sprite>("UI/IconSprites/iconlist_ivtrm_multisprite");
|
||||
if (atlasSprites != null && atlasSprites.Length > 0)
|
||||
{
|
||||
_multiSpriteAtlas = atlasSprites;
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace PerfectWorld.Scripts.Managers
|
||||
if (m_Essence.name_len != 0)
|
||||
{
|
||||
m_strName = ByteToStringUtils.UshortArrayToUnicodeString(m_Essence.name);
|
||||
EC_Game.GetGameRun().GetUIManager().FilterBadWords(m_strName);
|
||||
EC_Game.GetGameRun().GetUIManager().FilterBadWords(ref m_strName);
|
||||
}
|
||||
|
||||
m_aSkills = new List<PETSKILL>(m_Essence.skill_count);
|
||||
|
||||
@@ -12,6 +12,7 @@ using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork.GPDataType;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
namespace PerfectWorld.Scripts.Managers
|
||||
{
|
||||
public class EC_IvtrPetFood : EC_IvtrItem
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace PerfectWorld.Scripts.Managers
|
||||
case int value6 when value6 == EC_MsgDef.MSG_PM_PLAYERDOEMOTE:
|
||||
case int value7 when value7 == EC_MsgDef.MSG_PM_PLAYERGATHER:
|
||||
case int value8 when value8 == EC_MsgDef.MSG_PM_PLAYERFLY:
|
||||
case int value9 when value9 == EC_MsgDef.MSG_PM_PLAYERMOUNT:
|
||||
TransmitMessage(Msg);
|
||||
break;
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERDIED:
|
||||
@@ -626,6 +627,9 @@ namespace PerfectWorld.Scripts.Managers
|
||||
cid = (GPDataTypeHelper.FromBytes<cmd_object_landing>((byte[])Msg.dwParam1)).object_id;
|
||||
|
||||
break;
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYERMOUNT:
|
||||
cid = (GPDataTypeHelper.FromBytes<cmd_player_mounting>((byte[])Msg.dwParam1)).id;
|
||||
break;
|
||||
// ⚠️ Các case khác cũng tương tự, chỉ việc lấy ra đúng trường id / caster / user ...
|
||||
// Do quá dài nên bạn có thể copy dần từng case từ C++ sang.
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ public class CECObject : MonoBehaviour
|
||||
|
||||
public A3DVECTOR3 GetPos()
|
||||
{
|
||||
return new A3DVECTOR3(transform.position.x, transform.position.y, transform.position.z);
|
||||
return EC_Utility.ToA3DVECTOR3(transform.position);
|
||||
}
|
||||
public Vector3 GetPosVector3()
|
||||
{
|
||||
|
||||
@@ -62,6 +62,6 @@ namespace BrewMonster.Scripts
|
||||
public uint GetTransferMask() => m_dwTransMask;
|
||||
|
||||
// On first tick
|
||||
protected virtual void OnFirstTick() { }
|
||||
public virtual void OnFirstTick() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
using CSNetwork.GPDataType;
|
||||
using PerfectWorld.Scripts;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Scripts;
|
||||
|
||||
public struct PETSKILL
|
||||
{
|
||||
public int idSkill;
|
||||
public int iLevel;
|
||||
public int iCoolCnt;
|
||||
public int iCoolMax;
|
||||
};
|
||||
|
||||
public enum SkillType
|
||||
{
|
||||
EM_SKILL_DEFAULT = 0, // �������Ը���
|
||||
EM_SKILL_NORMAL, // ��ͨ����
|
||||
EM_SKILL_NATURE, // �Ը���
|
||||
EM_SKILL_SPECIAL, // ר������
|
||||
}
|
||||
public class EC_PetCorral
|
||||
{
|
||||
public enum MaxSlotNum
|
||||
{
|
||||
MAX_SLOTNUM = 20, // ��ͨ����������
|
||||
MAX_SLOTNUM2 = 21, // �����������
|
||||
};
|
||||
// Moving mode
|
||||
public enum MoveMode
|
||||
{
|
||||
MOVE_FOLLOW = 0,
|
||||
MOVE_STAND,
|
||||
};
|
||||
|
||||
// Attacking mode
|
||||
public enum AttackMode
|
||||
{
|
||||
ATK_DEFENSE = 0,
|
||||
ATK_POSITIVE,
|
||||
ATK_PASSIVE,
|
||||
};
|
||||
protected int m_iIntimacy; // �øж�
|
||||
protected int m_iHunger; // ������
|
||||
protected int m_tid; // ������ID
|
||||
protected int m_tidVis; // ���������ģ��ID�����Ϊ0�����ʾ������ɼ�ID��
|
||||
protected int m_idEgg; // ���ﵰ��ID
|
||||
protected int m_iClass; // �������� ս�裬��裬���ͳ�
|
||||
protected float m_fHPFactor; // Ѫ��������������ջ�ʱʹ�ã� 0��Ϊ����
|
||||
protected float m_fMPFactor; // MP��������������ջ�ʱʹ�ã� 0��Ϊ����
|
||||
protected int m_iLevel; // ���V��
|
||||
protected bool m_isBind; // �Ƿ����˺�һ
|
||||
protected bool m_canWebTrade; // �Ƿ�Ѱ�����ɽ���
|
||||
protected ushort m_color; // ���Ⱦɫ��ɫ����λΪ1ʱ��Ч
|
||||
protected int m_iExp; // ���ﵱǰ����
|
||||
protected int m_iSkillPt; // ʣ�༼�ܵ�
|
||||
protected string m_strName;
|
||||
|
||||
protected int m_iHP; // Only fight pets have this
|
||||
protected int m_iMP;
|
||||
protected PETSKILL[] m_aSkills = new PETSKILL[(int)GP_PET_SKILL_NUM.GP_PET_SKILL_NUM];
|
||||
|
||||
protected int[] m_vecNorSkillIndex; // ��ֹ�Ը��ܺ���ͨ����˳����ҵ���������漼���� m_aSkills������
|
||||
protected int[] m_vecDynSkillIndex;
|
||||
protected int m_iSpecialSkillIndex; // ����ר��������m_aSkills�����ţ�ֻ�н�������һ���˼���
|
||||
|
||||
protected CECCounter m_cntAutoSkill;
|
||||
protected int[] m_aAutoSkills;
|
||||
|
||||
protected ROLEEXTPROP m_ExtProps;
|
||||
protected PET_ESSENCE m_pDBEssence = new PET_ESSENCE();
|
||||
|
||||
protected int m_iAtkRation;
|
||||
protected int m_iDefRation;
|
||||
protected int m_iHpRation;
|
||||
protected int m_iAtkLvlRation;
|
||||
protected int m_iDefLvlRation;
|
||||
protected int m_iNature;
|
||||
public CECPetData GetActivePet()
|
||||
{
|
||||
//Place holder for ivtrPetFood
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class CECPetData
|
||||
{
|
||||
#region enum
|
||||
public enum HungerLevel
|
||||
{
|
||||
HUNGER_LEVEL_0, // ��ʳ
|
||||
HUNGER_LEVEL_1, // ����
|
||||
HUNGER_LEVEL_2, // ���̶�һ��
|
||||
HUNGER_LEVEL_3,
|
||||
HUNGER_LEVEL_4, // ���̶ȶ���
|
||||
HUNGER_LEVEL_5,
|
||||
HUNGER_LEVEL_6,
|
||||
HUNGER_LEVEL_7, // ���̶�����
|
||||
HUNGER_LEVEL_8,
|
||||
HUNGER_LEVEL_9,
|
||||
HUNGER_LEVEL_10,
|
||||
HUNGER_LEVEL_11, // ���̶��ļ�
|
||||
HUNGER_LEVEL_COUNT,
|
||||
};
|
||||
// Intimacy level
|
||||
public enum IntimacyLevel
|
||||
{
|
||||
INTIMACY_LEVEL_0, // Ұ����ѱ, 0-50
|
||||
INTIMACY_LEVEL_1, // ������, 51-150
|
||||
INTIMACY_LEVEL_2, // ��������, 151-500
|
||||
INTIMACY_LEVEL_3, // ������, 501-999
|
||||
INTIMACY_LEVEL_COUNT,
|
||||
INTIMACY_POINT_MAX = 999,
|
||||
};
|
||||
#endregion
|
||||
|
||||
public int GetTemplateID()
|
||||
{
|
||||
//Place holder for ivtrPetFood
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c41c880dbc2344f819944899348d5124
|
||||
@@ -50,6 +50,7 @@ namespace BrewMonster
|
||||
|
||||
public void SetComboSkillState(Dictionary<uint, int> skillDic, ref ComboSkillState state)
|
||||
{
|
||||
BMLogger.LogError($"SetComboSkillState: skillid={state.skillid}, arg0={state.arg[0]}, arg1={state.arg[1]}, arg2={state.arg[2]}");
|
||||
m_comboSkillState = state;
|
||||
if (state.skillid != 0)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,10 @@ using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UIElements;
|
||||
using static BrewMonster.CECPlayer;
|
||||
using BrewMonster.Network;
|
||||
using System.Runtime.InteropServices;
|
||||
using PerfectWorld.Scripts.Managers.BrewMonster.Managers;
|
||||
using CSNetwork;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -82,7 +86,7 @@ namespace BrewMonster
|
||||
|
||||
protected int m_iBoothState = 0; // Booth state. 0, none; 1, prepare; 2, open booth; 3, visite other's booth
|
||||
public int m_idFRole = GNETRoles._R_UNMEMBER; // ID of player's faction role
|
||||
|
||||
|
||||
protected int m_idCountry = 0; // ¹úÕ½ÕóÓª id
|
||||
public static int MAX_REINCARNATION = 2;
|
||||
protected List<int> m_aCurEffects = new List<int>(); // Current effects
|
||||
@@ -93,6 +97,22 @@ namespace BrewMonster
|
||||
protected int m_iCurAction;
|
||||
bool m_bAboutToDie = false;
|
||||
public bool m_bCandHangerOn = false;
|
||||
public bool m_bPetInSanctuary = false; // true, the pet pet of the player is in sanctuary
|
||||
//The ID of the currently summoned pet
|
||||
int m_idCurPet = 0;
|
||||
byte m_byPariahLvl = 0; // Pariah level
|
||||
|
||||
public RIDINGPET m_RidingPet; // Riding pet information
|
||||
public GameObject m_pPetModel = null; // Pet model
|
||||
public RIDINGPET m_CandPet;// ID of candidate pet
|
||||
A3DVECTOR3 m_vNamePos; // Æï³Ë×´Ì¬Íæ¼ÒÐÕÃûµÄµ÷Õû
|
||||
// ÒÀ¸½ÀàÐÍ
|
||||
AttachMode m_AttachMode = AttachMode.enumAttachNone;
|
||||
// ÒÀ¸½Õß»ò±»ÒÀ¸½Õßid
|
||||
int m_iBuddyId;
|
||||
int m_idCandBuddy; // ID of candidate buddy
|
||||
EC_ManPlayer m_pPlayerMan => EC_ManMessageMono.Instance?.GetECManPlayer; // Player manager
|
||||
protected Transform playerTransform => transform;
|
||||
|
||||
public MOVECONST m_MoveConst; // Const used when moving control
|
||||
public Move_Mode m_MoveMode;
|
||||
@@ -137,7 +157,7 @@ namespace BrewMonster
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
};
|
||||
|
||||
public A3DVECTOR3[] aExts = new A3DVECTOR3[(int)PROFESSION.NUM_PROFESSION * GENDER.NUM_GENDER]
|
||||
public A3DVECTOR3[] aExts = new A3DVECTOR3[(int)PROFESSION.NUM_PROFESSION * GENDER.NUM_GENDER]
|
||||
{
|
||||
new A3DVECTOR3(0.4f, 0.9f, 0.4f), // ÎäÏÀ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
@@ -184,7 +204,7 @@ namespace BrewMonster
|
||||
{
|
||||
parentModel = transform.GetChild(0);
|
||||
txtName = GetComponentInChildren<TextMeshProUGUI>();
|
||||
if(transform.childCount >= 3)
|
||||
if (transform.childCount >= 3)
|
||||
{
|
||||
pointCam = transform.GetChild(2);
|
||||
}
|
||||
@@ -462,6 +482,12 @@ namespace BrewMonster
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
if (m_CandPet.id != 0 /*&& GetMajorModel()*/)
|
||||
{
|
||||
string szPetPath = GetRidingPetFileName(m_CandPet.id);
|
||||
QueueLoadPetModel(szPetPath, false);
|
||||
m_CandPet.Reset();
|
||||
}
|
||||
}
|
||||
public void PlayAttackEffect(int idTarget, int idSkill, int skillLevel, int nDamage,
|
||||
uint dwModifier, int nAttackSpeed, ref int piAttackTime, int nSection = 0)
|
||||
@@ -747,17 +773,17 @@ namespace BrewMonster
|
||||
bool result = (false);
|
||||
|
||||
/*while (GetPlayerModel() && (GetLeftHandWeapon() || GetRightHandWeapon())){
|
||||
A3DSkinModel *pSkinModel = GetPlayerModel()->GetA3DSkinModel();
|
||||
A3DSkinModel *pSkinModel = GetPlayerModel().GetA3DSkinModel();
|
||||
if (!pSkinModel ||
|
||||
!pSkinModel->GetSkeleton()){
|
||||
!pSkinModel.GetSkeleton()){
|
||||
break;
|
||||
}
|
||||
if (!pSkinModel->GetSkeletonHook(GetLeftWeaponHookPos(m_weaponHangerPos),true) ||
|
||||
!pSkinModel->GetSkeletonHook(GetRightWeaponHookPos(m_weaponHangerPos),true)){
|
||||
if (!pSkinModel.GetSkeletonHook(GetLeftWeaponHookPos(m_weaponHangerPos),true) ||
|
||||
!pSkinModel.GetSkeletonHook(GetRightWeaponHookPos(m_weaponHangerPos),true)){
|
||||
break;
|
||||
}
|
||||
if (GetLeftHandWeapon()){
|
||||
GetPlayerModel()->AddChildModel(
|
||||
GetPlayerModel().AddChildModel(
|
||||
_left_hand_weapon,
|
||||
false,
|
||||
GetLeftWeaponHookPos(m_weaponHangerPos),
|
||||
@@ -765,7 +791,7 @@ namespace BrewMonster
|
||||
GetLeftWeaponOwnHookPos(GetLeftHandWeapon()));
|
||||
}
|
||||
if (GetRightHandWeapon()){
|
||||
GetPlayerModel()->AddChildModel(
|
||||
GetPlayerModel().AddChildModel(
|
||||
_right_hand_weapon,
|
||||
false,
|
||||
GetRightWeaponHookPos(m_weaponHangerPos),
|
||||
@@ -1115,9 +1141,9 @@ namespace BrewMonster
|
||||
else
|
||||
{
|
||||
/* if ((*//*UsingWing()*//*m_wingType == enumWingType.WINGTYPE_WING && IsFlying()) || (GetProfession() == PROF_ANGEL) || (GetProfession() == PROF_ARCHOR) || (GetProfession() == PROF_MONK) || (GetProfession() == PROF_GHOST))
|
||||
sprintf(szAct, "%s_¿ÕÖгá°ò_Ò÷³ª_%s", data->action_prefix, data->action_weapon_suffix[weapon_type].suffix);
|
||||
sprintf(szAct, "%s_¿ÕÖгá°ò_Ò÷³ª_%s", data.action_prefix, data.action_weapon_suffix[weapon_type].suffix);
|
||||
else
|
||||
sprintf(szAct, "%s_¿ÕÖзɽ£_Ò÷³ª_%s", data->action_prefix, data->action_weapon_suffix[weapon_type].suffix);*/
|
||||
sprintf(szAct, "%s_¿ÕÖзɽ£_Ò÷³ª_%s", data.action_prefix, data.action_weapon_suffix[weapon_type].suffix);*/
|
||||
}
|
||||
|
||||
bool bHideFX = false; /*!CECOptimize::Instance().GetGFX().CanShowCast(GetCharacterID(), GetClassID());*/
|
||||
@@ -1151,7 +1177,10 @@ namespace BrewMonster
|
||||
}
|
||||
public CECSkill GetCurSkill() { return m_pCurSkill; }
|
||||
public bool IsHangerOn() { return m_bHangerOn; }
|
||||
|
||||
public bool IsPlayingAction()
|
||||
{
|
||||
return true /*GetLowerBodyAction() != -1*/ ;
|
||||
}
|
||||
public bool PlaySkillCastActionWithName(int idSkill, string szActName, bool bNoFX/* =false */)
|
||||
{
|
||||
return m_pActionController != null
|
||||
@@ -1198,18 +1227,18 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
|
||||
// nTime1 = m_pPlayerModel->GetComActTimeSpanByName(szAct); // 获取动作时长 / Get action time span
|
||||
// pAct = m_pPlayerModel->GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct->IsInfinite();
|
||||
// nTime1 = m_pPlayerModel.GetComActTimeSpanByName(szAct); // 获取动作时长 / Get action time span
|
||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
||||
nTime1 = 1000; // 临时值 / Temporary value
|
||||
|
||||
szAct = EC_Utility.BuildActionName(data, weapon_type, "_施放落_");
|
||||
GetSkillSectionActionName(ref szAct, idSkill, nSection);
|
||||
QueueSkillAttackActionWithName(idSkill, szAct, 0, bHideFX);
|
||||
|
||||
// nTime2 = m_pPlayerModel->GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel->GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct->IsInfinite();
|
||||
// nTime2 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
||||
nTime2 = 1000; // 临时值 / Temporary value
|
||||
}
|
||||
else
|
||||
@@ -1239,11 +1268,11 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
||||
// pRightHandWeapon->PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, ACT_CASTSKILL, bHideFX);
|
||||
// pRightHandWeapon.PlayActionByName(_GenWeaponActionName(szAct, m_iGender), 1.0f, true, 200, true, ACT_CASTSKILL, bHideFX);
|
||||
|
||||
// nTime1 = m_pPlayerModel->GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel->GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct->IsInfinite();
|
||||
// nTime1 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
||||
nTime1 = 1000; // 临时值 / Temporary value
|
||||
|
||||
szAct = $"{data.action_prefix}_{szActionMiddleName}_施法行_{data.action_weapon_suffix[weapon_type].suffix}";
|
||||
@@ -1251,11 +1280,11 @@ namespace BrewMonster
|
||||
QueueSkillAttackActionWithName(idSkill, szAct, 0, bHideFX);
|
||||
|
||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
||||
// pRightHandWeapon->QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, ACT_CASTSKILL, false, false, bHideFX);
|
||||
// pRightHandWeapon.QueueAction(_GenWeaponActionName(szAct, m_iGender), 0, ACT_CASTSKILL, false, false, bHideFX);
|
||||
|
||||
// nTime2 = m_pPlayerModel->GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel->GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct->IsInfinite();
|
||||
// nTime2 = m_pPlayerModel.GetComActTimeSpanByName(szAct);
|
||||
// pAct = m_pPlayerModel.GetComActByName(szAct);
|
||||
// if (pAct) bInfinite |= pAct.IsInfinite();
|
||||
nTime2 = 1000; // 临时值 / Temporary value
|
||||
}
|
||||
|
||||
@@ -1268,10 +1297,10 @@ namespace BrewMonster
|
||||
if (nExecuteTime > 0)
|
||||
{
|
||||
float vScale = (nTime1 + nTime2) / (float)nExecuteTime;
|
||||
// m_pPlayerModel->SetPlaySpeed(vScale * 1.2f);
|
||||
// m_pPlayerModel.SetPlaySpeed(vScale * 1.2f);
|
||||
|
||||
// if (pRightHandWeapon && IsUsingMagicWeapon())
|
||||
// pRightHandWeapon->SetPlaySpeed(vScale * 1.2f);
|
||||
// pRightHandWeapon.SetPlaySpeed(vScale * 1.2f);
|
||||
}
|
||||
|
||||
piAttackTime = nTime1 + nTime2;
|
||||
@@ -1427,12 +1456,12 @@ namespace BrewMonster
|
||||
// if (m_pModels[i] && (iShapeTypeMask & (1<<i)))
|
||||
// {
|
||||
// if (IsCurrentModel(m_pModels[i])){
|
||||
// m_pModels[i]->PlayGfx(szPath, szHook, fScale);
|
||||
// m_pModels[i].PlayGfx(szPath, szHook, fScale);
|
||||
// bPlayed = true;
|
||||
// }
|
||||
// if(bSkipRecord) continue;
|
||||
// A3DGFXEx* pGfx = m_pModels[i]->GetGfx(szPath, szHook);
|
||||
// if (pGfx && pGfx->IsInfinite()){
|
||||
// A3DGFXEx* pGfx = m_pModels[i].GetGfx(szPath, szHook);
|
||||
// if (pGfx && pGfx.IsInfinite()){
|
||||
// GFXRECORD rec;
|
||||
// rec.strPath = szPath;
|
||||
// rec.strHook = szHook;
|
||||
@@ -1637,13 +1666,336 @@ namespace BrewMonster
|
||||
{
|
||||
//if (m_pPlayerModel)
|
||||
//{
|
||||
// CECModel* pWing = m_pPlayerModel->GetChildModel(_wing);
|
||||
// if (pWing) pWing->Show(bShow);
|
||||
// CECModel* pWing = m_pPlayerModel.GetChildModel(_wing);
|
||||
// if (pWing) pWing.Show(bShow);
|
||||
|
||||
// CECModel* pWing2 = m_pPlayerModel->GetChildModel(_wing2);
|
||||
// if (pWing2) pWing2->Show(bShow);
|
||||
// CECModel* pWing2 = m_pPlayerModel.GetChildModel(_wing2);
|
||||
// if (pWing2) pWing2.Show(bShow);
|
||||
//}
|
||||
}
|
||||
|
||||
// Get current pet id
|
||||
public int GetCurPetID() { return m_idCurPet; }
|
||||
// Set current pet id
|
||||
public void SetCurPetID(int id) { m_idCurPet = id; }
|
||||
|
||||
// Get player name color
|
||||
public uint GetNameColor()
|
||||
{
|
||||
uint dwNameCol = NameColor.NAMECOL_MAUVE;
|
||||
|
||||
if (IsInBattle()) // Player is in battle
|
||||
{
|
||||
if (m_iBattleCamp == Player_camp_in_battle.GP_BATTLE_CAMP_INVADER)
|
||||
dwNameCol = NameColor.NAMECOL_BC_RED;
|
||||
else // (m_iBattleCamp == GP_BATTLE_CAMP_DEFENDER)
|
||||
dwNameCol = NameColor.NAMECOL_BC_BLUE;
|
||||
}
|
||||
else if (IsPariah())
|
||||
{
|
||||
switch (m_byPariahLvl)
|
||||
{
|
||||
case 0: dwNameCol = NameColor.NAMECOL_RED0; break;
|
||||
case 1: dwNameCol = NameColor.NAMECOL_RED1; break;
|
||||
default: dwNameCol = NameColor.NAMECOL_RED2; break;
|
||||
}
|
||||
}
|
||||
else if (IsInvader())
|
||||
dwNameCol = NameColor.NAMECOL_PINK;
|
||||
else if (m_pvp.bEnable)
|
||||
dwNameCol = NameColor.NAMECOL_WHITE;
|
||||
|
||||
return dwNameCol;
|
||||
}
|
||||
|
||||
// Riding pet info.
|
||||
public struct RIDINGPET
|
||||
{
|
||||
public int id;
|
||||
public ushort color;
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
id = 0;
|
||||
color = 0;
|
||||
}
|
||||
|
||||
public bool GetColor(ref Color clr)
|
||||
{
|
||||
// Get the current pet’s dye/color
|
||||
return id > 0 && GetColor(color, ref clr);
|
||||
}
|
||||
|
||||
public static bool GetColor(ushort c, ref Color clr)
|
||||
{
|
||||
// Check whether the current pet has been dyed; if so, return the dyed color.
|
||||
bool bRet = false;
|
||||
if ((c & (1 << (Marshal.SizeOf(c) * 8 - 1))) != 0)
|
||||
{
|
||||
// unsigned short: if the highest bit is 1, it means the pet has been dyed;
|
||||
// in this case, the dyed color can be retrieved.
|
||||
clr = new Color(((c) & (0x1f << 10)) >> 7, ((c) & (0x1f << 5)) >> 2, ((c) & 0x1f) << 3);
|
||||
bRet = true;
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
public static Color GetDefaultColor()
|
||||
{
|
||||
return new Color(255f / 255f, 255f / 255f, 255f / 255f);
|
||||
}
|
||||
};
|
||||
|
||||
public bool IsRidingOnPet() { return m_RidingPet.id != 0; }
|
||||
// Get riding pet info.
|
||||
public RIDINGPET GetRidingPetInfo() { return m_RidingPet; }
|
||||
|
||||
public void RideOnPet(int id, ushort color)
|
||||
{
|
||||
m_CandPet.id = id;
|
||||
m_CandPet.color = color;
|
||||
m_RidingPet.id = id;
|
||||
m_RidingPet.color = color;
|
||||
}
|
||||
|
||||
public void GetOffPet(bool bResetData)
|
||||
{
|
||||
int iBuddyId = 0;
|
||||
m_CandPet.Reset();
|
||||
|
||||
SetNamePos(new A3DVECTOR3(0.0f));
|
||||
|
||||
if (m_AttachMode != AttachMode.enumAttachNone)
|
||||
{
|
||||
iBuddyId = m_iBuddyId;
|
||||
DetachBuddy(null, bResetData);
|
||||
}
|
||||
|
||||
if (m_pPetModel)
|
||||
{
|
||||
GameObject.Destroy(m_pPetModel);
|
||||
m_pPetModel = null;
|
||||
}
|
||||
|
||||
if (bResetData)
|
||||
m_RidingPet.Reset();
|
||||
|
||||
// Re-calculate player's AABB
|
||||
CalcPlayerAABB();
|
||||
//SetUseGroundNormal(ShouldUseGroundNormalForCurrentShapeModel());
|
||||
SetPos(GetPosVector3());
|
||||
|
||||
//if (iBuddyId != 0)
|
||||
// AttachBuddy(iBuddyId);
|
||||
//else
|
||||
PlayAction(GetMoveStandAction(false, IsFighting()), true);
|
||||
}
|
||||
|
||||
void SetNamePos(A3DVECTOR3 vPos) { m_vNamePos = vPos; }
|
||||
|
||||
// Player Attach mode
|
||||
public enum AttachMode
|
||||
{
|
||||
enumAttachNone,
|
||||
enumAttachRideOnPet,
|
||||
enumAttachRideOnPlayer,
|
||||
enumAttachHugPlayer,
|
||||
};
|
||||
|
||||
void DetachBuddy(CECPlayer pBuddy, bool bResetData)
|
||||
{
|
||||
if (m_AttachMode == AttachMode.enumAttachNone)
|
||||
return;
|
||||
|
||||
if (m_bHangerOn)
|
||||
{
|
||||
if (!pBuddy) pBuddy = m_pPlayerMan.GetPlayer(m_iBuddyId);
|
||||
if (pBuddy)
|
||||
pBuddy.DetachBuddy(this, bResetData);
|
||||
else
|
||||
{
|
||||
if (bResetData)
|
||||
{
|
||||
m_AttachMode = AttachMode.enumAttachNone;
|
||||
m_bHangerOn = false;
|
||||
m_iBuddyId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!pBuddy) pBuddy = m_pPlayerMan.GetPlayer(m_iBuddyId);
|
||||
|
||||
if (m_AttachMode == AttachMode.enumAttachRideOnPlayer)
|
||||
{
|
||||
//if (m_pPlayerModel) m_pPlayerModel.RemoveChildModel(_hanger_ride, false);
|
||||
}
|
||||
else if (m_AttachMode == AttachMode.enumAttachHugPlayer)
|
||||
{
|
||||
//if (m_pPlayerModel) m_pPlayerModel.RemoveChildModel(_hanger_hug, false);
|
||||
}
|
||||
else if (m_AttachMode == AttachMode.enumAttachRideOnPet)
|
||||
{
|
||||
if (m_pPetModel)
|
||||
{
|
||||
//A3DSkinModelHanger* pHanger = m_pPetModel.GetA3DSkinModel().GetSkinModelHanger(_hanger_ride);
|
||||
//if (pHanger) pHanger.SetOffsetMat(a3d_IdentityMatrix());
|
||||
//m_pPetModel.RemoveChildModel(_hanger_ride2, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (bResetData)
|
||||
{
|
||||
m_AttachMode = AttachMode.enumAttachNone;
|
||||
m_bHangerOn = false;
|
||||
m_iBuddyId = 0;
|
||||
}
|
||||
|
||||
if (pBuddy)
|
||||
{
|
||||
if (bResetData)
|
||||
{
|
||||
pBuddy.m_AttachMode = AttachMode.enumAttachNone;
|
||||
pBuddy.m_bHangerOn = false;
|
||||
pBuddy.m_iBuddyId = 0;
|
||||
}
|
||||
|
||||
pBuddy.SetPos(pBuddy.GetPosVector3());
|
||||
pBuddy.SetDirAndUp(pBuddy.transform.forward, pBuddy.transform.up);
|
||||
pBuddy.PlayAction(GetMoveStandAction(false, IsFighting()), true);
|
||||
}
|
||||
PlayAction(GetMoveStandAction(IsPlayingMoveAction(), IsFighting()), true);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPos(Vector3 pos)
|
||||
{
|
||||
playerTransform.position = pos;
|
||||
|
||||
m_aabb.Center = EC_Utility.ToA3DVECTOR3(pos) + new A3DVECTOR3(0.0f, m_aabb.Extents.y, 0.0f);
|
||||
m_aabb.CompleteMinsMaxs();
|
||||
m_aabbServer.Center = EC_Utility.ToA3DVECTOR3(pos) + new A3DVECTOR3(0.0f, m_aabbServer.Extents.y, 0.0f);
|
||||
m_aabbServer.CompleteMinsMaxs();
|
||||
}
|
||||
|
||||
public bool IsPlayingMoveAction()
|
||||
{
|
||||
return m_iCurAction == (int)PLAYER_ACTION_TYPE.ACT_STAND;
|
||||
}
|
||||
|
||||
public void OnMsgPlayerMount(ECMSG Msg)
|
||||
{
|
||||
cmd_player_mounting pCmd = GPDataTypeHelper.FromBytes<cmd_player_mounting>((byte[])Msg.dwParam1);
|
||||
|
||||
if (pCmd.mount_id != 0)
|
||||
RideOnPet(pCmd.mount_id, pCmd.mount_color);
|
||||
else
|
||||
GetOffPet(true);
|
||||
}
|
||||
|
||||
// Build riding pet file name
|
||||
string GetRidingPetFileName(int idPet)
|
||||
{
|
||||
string szDef = "Models/NPCs/宠物/骑宠/骑宠马/骑宠马白.ecm";
|
||||
|
||||
DATA_TYPE DataType = new DATA_TYPE();
|
||||
var pDataPtr = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)idPet, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
if (DataType != DATA_TYPE.DT_PET_ESSENCE)
|
||||
return szDef;
|
||||
|
||||
PET_ESSENCE pData = (PET_ESSENCE)pDataPtr;
|
||||
if (pData.file_model[0] == 0)
|
||||
return szDef;
|
||||
|
||||
return ByteToStringUtils.ByteArrayToUTF8String(pData.file_model);
|
||||
}
|
||||
|
||||
public async void QueueLoadPetModel(string szPetPath, bool bAtOnce)
|
||||
{
|
||||
var modelPet = await LoadPetModel(szPetPath);
|
||||
|
||||
if (modelPet == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SetPetLoadResult(modelPet);
|
||||
}
|
||||
|
||||
public async Task<GameObject> LoadPetModel(string szPetPath)
|
||||
{
|
||||
var pPetModel = CECGameRun.Instance.GetPetMount();
|
||||
if(pPetModel == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
try
|
||||
{
|
||||
var model = await AddressableManager.Instance.LoadPrefabAsync(AFile.NormalizePath(szPetPath.ToLower(), true));
|
||||
if(model == null)
|
||||
{
|
||||
model = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
}
|
||||
var obModel = GameObject.Instantiate(model);
|
||||
obModel.transform.SetParent(pPetModel.transform);
|
||||
AddressableManager.Instance.ReleaseAsset(szPetPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
var model = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
var obModel = GameObject.Instantiate(model);
|
||||
obModel.transform.SetParent(pPetModel.transform);
|
||||
AddressableManager.Instance.ReleaseAsset(szPetPath);
|
||||
//return null;
|
||||
}
|
||||
return pPetModel;
|
||||
}
|
||||
|
||||
bool SetPetLoadResult(GameObject pPetModel)
|
||||
{
|
||||
if (m_RidingPet.id == 0 /*|| !GetMajorModel() || m_CandPet.id != 0*/ || !pPetModel)
|
||||
return false;
|
||||
|
||||
if (m_pPetModel)
|
||||
{
|
||||
RIDINGPET pet = m_RidingPet;
|
||||
GetOffPet(true);
|
||||
m_RidingPet = pet;
|
||||
}
|
||||
|
||||
A3DVECTOR3 vCurPos = GetPos();
|
||||
|
||||
m_aabbServer.Center = vCurPos + new A3DVECTOR3(0.0f, m_aabbServer.Extents.y, 0.0f);
|
||||
m_aabbServer.CompleteMinsMaxs();
|
||||
|
||||
m_pPetModel = pPetModel;
|
||||
|
||||
// ½«³èÎïÑÕÉ«ÉèÖõ½Ä£ÐÍÉÏ
|
||||
//SetRidingPetColor(m_RidingPet.color);
|
||||
|
||||
SetUseGroundNormal(true);
|
||||
//m_pPetModel.SetAffectedByParent(false);
|
||||
m_pPetModel.transform.position = EC_Utility.ToVector3(vCurPos);
|
||||
//m_pPetModel.SetDirAndUp(GetDir(), GetUp());
|
||||
|
||||
//int iIndex;
|
||||
//A3DSkeletonHook* pHook = GetMajorModel().GetA3DSkinModel().GetSkeleton().GetHook(_cc_ride, &iIndex);
|
||||
//if (pHook) pHook.SetFixDirFlag(true);
|
||||
|
||||
int iBuddyId = m_iBuddyId;
|
||||
if (m_AttachMode != AttachMode.enumAttachNone)
|
||||
DetachBuddy(null, true);
|
||||
|
||||
m_pPetModel.transform.SetParent(transform);
|
||||
//m_pPetModel.AddChildModel(_hanger_ride, false, _hh_ride, GetMajorModel(), _cc_ride);
|
||||
//m_pPetModel.GetA3DSkinModel().Update(0);
|
||||
|
||||
//if (iBuddyId != 0)
|
||||
// AttachBuddy(iBuddyId);
|
||||
//else
|
||||
PlayAction(GetMoveStandAction(false, IsFighting()), true);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public struct PlayActionEvent
|
||||
@@ -1927,38 +2279,38 @@ namespace BrewMonster
|
||||
/// Place holder for riding pet. Not test logic yet.
|
||||
/// </summary>
|
||||
public struct RIDINGPET
|
||||
{
|
||||
public int id;
|
||||
public ushort color;
|
||||
{
|
||||
public int id;
|
||||
public ushort color;
|
||||
|
||||
public RIDINGPET(bool isReset = true)
|
||||
{
|
||||
id = 0;
|
||||
public RIDINGPET(bool isReset = true)
|
||||
{
|
||||
id = 0;
|
||||
color = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetColor(Color clr)
|
||||
{
|
||||
// ��ȡ��ǰ����Ⱦɫ��ɫ
|
||||
return id>0 && GetColor(color, clr);
|
||||
}
|
||||
public bool GetColor(Color clr)
|
||||
{
|
||||
// ��ȡ��ǰ����Ⱦɫ��ɫ
|
||||
return id > 0 && GetColor(color, clr);
|
||||
}
|
||||
|
||||
public static bool GetColor(ushort c, Color clr)
|
||||
{
|
||||
// ��ѯ��ǰ����Ƿ�Ⱦ��ɫ�����Ⱦ��ɫ�����ر�Ⱦ֮�����ɫ
|
||||
bool bRet = false;
|
||||
if ((c & (1<<(8-1))) != 0)
|
||||
{
|
||||
// unsigned short ��λΪ1ʱ����ʾȾ��ɫ����ʱ�ɻ�ȡ��ɫ
|
||||
clr = new Color(((c) & (0x1f << 10)) >> 7, ((c) & (0x1f << 5)) >> 2, ((c) & 0x1f) << 3);
|
||||
bRet = true;
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
public static bool GetColor(ushort c, Color clr)
|
||||
{
|
||||
// ��ѯ��ǰ����Ƿ�Ⱦ��ɫ�����Ⱦ��ɫ�����ر�Ⱦ֮�����ɫ
|
||||
bool bRet = false;
|
||||
if ((c & (1 << (8 - 1))) != 0)
|
||||
{
|
||||
// unsigned short ��λΪ1ʱ����ʾȾ��ɫ����ʱ�ɻ�ȡ��ɫ
|
||||
clr = new Color(((c) & (0x1f << 10)) >> 7, ((c) & (0x1f << 5)) >> 2, ((c) & 0x1f) << 3);
|
||||
bRet = true;
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
public static Color GetDefaultColor()
|
||||
{
|
||||
return new Color(255, 255, 255);
|
||||
}
|
||||
};
|
||||
public static Color GetDefaultColor()
|
||||
{
|
||||
return new Color(255, 255, 255);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -57,6 +57,14 @@ public class CECNPC : CECObject
|
||||
public string ROLEBASICPROP => m_strName;*/
|
||||
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
m_DisappearCnt = new CECCounter();
|
||||
m_IdleCnt = new CECCounter();
|
||||
m_TransCnt = new CECCounter();
|
||||
m_aWorks = new int[4];
|
||||
}
|
||||
|
||||
public virtual void SetUpCECNPC(CECNPCMan pNPCMan)
|
||||
{
|
||||
base.SetUpCECObject();
|
||||
@@ -571,7 +579,7 @@ public class CECNPC : CECObject
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
float GetTransparentLimit()
|
||||
public float GetTransparentLimit()
|
||||
{
|
||||
if ((m_dwStates & (uint)PlayerNPCState.GP_STATE_INVISIBLE) != 0)
|
||||
{
|
||||
@@ -939,10 +947,18 @@ public class CECNPC : CECObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
var model = await NPCBuilder.Instance.GetModelByPath(AFile.NormalizePath(szModelFile.ToLower(), true));
|
||||
if (model == null)
|
||||
GameObject model = null;
|
||||
try
|
||||
{
|
||||
model = await NPCBuilder.Instance.GetModelByPath(AFile.NormalizePath(szModelFile.ToLower(), true));
|
||||
if (model == null)
|
||||
{
|
||||
model = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
BMLogger.LogWarning($" CECNPC.QueueLoadNPCModel model == null szModelFile= {szModelFile} ");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
model = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
BMLogger.LogWarning($" CECNPC.QueueLoadNPCModel model == null szModelFile= {szModelFile} ");
|
||||
}
|
||||
@@ -1154,7 +1170,7 @@ public class CECNPC : CECObject
|
||||
{
|
||||
return m_pNPCModelPolicy.GetCHAABB(ref aabb);
|
||||
}
|
||||
void SetPos(Vector3 pos)
|
||||
public void SetPos(Vector3 pos)
|
||||
{
|
||||
if (-2041570812 == m_NPCInfo.nid)
|
||||
{
|
||||
@@ -1516,7 +1532,16 @@ public class CECNPC : CECObject
|
||||
}
|
||||
m_pNPCModelPolicy.PlayModelAction(iAction, bRestart, null);
|
||||
}
|
||||
bool IsDisappearing() { return m_DisappearCnt.GetCounter() != 0 ? true : false; }
|
||||
|
||||
bool IsDisappearing()
|
||||
{
|
||||
if(m_DisappearCnt != null)
|
||||
{
|
||||
return m_DisappearCnt.GetCounter() != 0 ? true : false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int GetTemplateID() { return m_NPCInfo.tid; }
|
||||
|
||||
public float GetTouchRadius() { return m_fTouchRad; }
|
||||
@@ -1574,6 +1599,9 @@ public class CECNPC : CECObject
|
||||
// Get distance to host player
|
||||
public float GetDistToHost() { return m_fDistToHost; }
|
||||
public float GetDistToHostH() { return m_fDistToHostH; }
|
||||
|
||||
// Get NPC name color
|
||||
public virtual uint GetNameColor() { return 0xffffff00; }
|
||||
}
|
||||
public struct ClearComActFlagEvent
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BrewMonster;
|
||||
using CSNetwork.GPDataType;
|
||||
using CSNetwork.Protocols;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -200,4 +201,8 @@ public class CECNPCModelDefaultPolicy
|
||||
_npcVisual = npcVisual;
|
||||
}
|
||||
|
||||
public override void SetDefaultPickAABBExt(A3DVECTOR3 vExt)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,6 @@ namespace BrewMonster
|
||||
public abstract bool PlayAttackAction(int nAttackSpeed, CECAttackEvent attackevent);
|
||||
public abstract bool GetCHAABB(ref A3DAABB ab);
|
||||
public abstract void StopChannelAction();
|
||||
public abstract void SetDefaultPickAABBExt(CSNetwork.GPDataType.A3DVECTOR3 vExt);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.World;
|
||||
using CSNetwork.GPDataType;
|
||||
using PerfectWorld.Scripts.Managers.BrewMonster.Managers;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class CECPet : CECNPC
|
||||
{
|
||||
// Data in database
|
||||
PET_ESSENCE? m_pDBEssence;
|
||||
string m_strCompName; // Complete name with master's name
|
||||
|
||||
public CECPet(CECNPCMan pNPCMan)
|
||||
{
|
||||
m_iCID = (int)Class_ID.OCID_PET;
|
||||
m_pDBEssence = null;
|
||||
m_fTouchRad = 1.0f;
|
||||
}
|
||||
|
||||
// Initlaize object
|
||||
public override bool Init(int tid, in info_npc Info, ReadOnlySpan<byte> packet, int infoOffset)
|
||||
{
|
||||
if (!base.Init(tid, Info, packet, infoOffset))
|
||||
return false;
|
||||
|
||||
// Get database data
|
||||
var pDB = ElementDataManProvider.GetElementDataMan();
|
||||
DATA_TYPE DataType = new DATA_TYPE();
|
||||
object pDBData = pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
|
||||
if (pDBData == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
byte[] szModelFile = null;
|
||||
|
||||
if (DataType == DATA_TYPE.DT_MONSTER_ESSENCE)
|
||||
{
|
||||
MONSTER_ESSENCE pMonsterData = (MONSTER_ESSENCE)pDBData;
|
||||
szModelFile = pMonsterData.file_model;
|
||||
|
||||
object pObEggData = pDB.get_data_ptr(pMonsterData.id_pet_egg_captured, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
if (pObEggData == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var pEggData = (PET_EGG_ESSENCE)pObEggData;
|
||||
m_pDBEssence = (PET_ESSENCE)pDB.get_data_ptr((uint)pEggData.id_pet, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
m_NPCInfo.tid = pEggData.id_pet;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pDBEssence = (PET_ESSENCE)pDBData;
|
||||
szModelFile = m_pDBEssence.Value.file_model;
|
||||
}
|
||||
|
||||
if (m_pDBEssence == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
SetUseGroundNormal(m_pDBEssence.Value.stand_mode == 0 ? true : false);
|
||||
m_fTouchRad = m_pDBEssence.Value.size;
|
||||
m_BasicProps.iLevel = 1;
|
||||
|
||||
// Submit EC model loading request to loading thread
|
||||
QueueLoadNPCModel();
|
||||
|
||||
float fExt = m_fTouchRad * 1.5f;
|
||||
m_cdr.vExts.Set(fExt, fExt, fExt);
|
||||
m_pNPCModelPolicy.SetDefaultPickAABBExt(m_cdr.vExts);
|
||||
|
||||
// If NPC doesn't have specific name, use the name in database
|
||||
if ((Info.state & PlayerNPCState.GP_STATE_NPC_NAME) == 0)
|
||||
{
|
||||
m_strName = new string(m_pDBEssence.Value.name
|
||||
.TakeWhile(c => c != 0)
|
||||
.Select(c => (char)c)
|
||||
.ToArray()
|
||||
);
|
||||
EC_Game.GetGameRun().GetUIManager().FilterBadWords(ref m_strName);
|
||||
// Try to build complete name
|
||||
BuildCompleteName();
|
||||
}
|
||||
|
||||
if ((Info.state & PlayerNPCState.GP_STATE_NPC_PET) != 0)
|
||||
{
|
||||
if (!IsPlantPet())
|
||||
{
|
||||
// 非植物宠时,能够从宠物面板和玩家面板中相互追踪
|
||||
CECPlayer pPlayer = EC_Game.GetGameRun().GetWorld().GetPlayerMan().GetPlayer(m_idMaster);
|
||||
if (pPlayer)
|
||||
{
|
||||
pPlayer.SetCurPetID(Info.nid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_pDBEssence.Value.combined_switch & (uint)PET_COMBINED_SWITCH.PCS_FORBID_SELECTION) != 0)
|
||||
{
|
||||
SetSelectable(false);
|
||||
}
|
||||
|
||||
A3DVECTOR3 vPos = Info.pos;
|
||||
SetPos(EC_Utility.ToVector3(vPos));
|
||||
SetDirAndUp(EC_Utility.ToVector3(EC_Utility.glb_DecompressDirH(Info.dir)), g_vAxisY);
|
||||
|
||||
StartWork((int)WorkType.WT_NOTHING, (int)WorkID.WORK_STAND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Tick routine
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
if (m_strCompName != null && m_strCompName.Length == 0)
|
||||
{
|
||||
// Try to build complete name
|
||||
BuildCompleteName();
|
||||
}
|
||||
}
|
||||
|
||||
// Get NPC name color
|
||||
public virtual uint GetNameColor()
|
||||
{
|
||||
EC_ManPlayer pPlayerMan = EC_Game.GetGameRun().GetWorld().GetPlayerMan();
|
||||
CECPlayer pPlayer = pPlayerMan.GetPlayer(m_idMaster);
|
||||
if (!pPlayer)
|
||||
return base.GetNameColor();
|
||||
|
||||
return pPlayer.GetNameColor();
|
||||
}
|
||||
|
||||
public virtual bool IsImmuneDisable()
|
||||
{
|
||||
if(m_pDBEssence == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((m_pDBEssence.Value.combined_switch & (uint)PET_COMBINED_SWITCH.PCS_HIDE_IMMUNE) != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
public virtual float GetTransparentLimit()
|
||||
{
|
||||
if (m_pDBEssence != null)
|
||||
{
|
||||
if ((m_pDBEssence.Value.combined_switch & (uint)PET_COMBINED_SWITCH.PCS_FORBID_SELECTION) != 0)
|
||||
{
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
}
|
||||
return base.GetTransparentLimit();
|
||||
}
|
||||
public virtual bool ShouldHideName()
|
||||
{
|
||||
if (m_pDBEssence == null) { return false; }
|
||||
return (m_pDBEssence.Value.combined_switch & (uint)PET_COMBINED_SWITCH.PCS_HIDE_NAME) != 0;
|
||||
}
|
||||
|
||||
// Is this host player's pet
|
||||
public bool IsHostPet()
|
||||
{
|
||||
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
|
||||
return GetMasterID() == pHost.GetCharacterID();
|
||||
}
|
||||
// Is this pet attackable;
|
||||
public bool CanBeAttacked()
|
||||
{
|
||||
return IsCombatPet()
|
||||
|| IsSummonPet()
|
||||
|| IsPlantPet()
|
||||
|| IsEvolutionPet();
|
||||
}
|
||||
// Is a follow pet ?
|
||||
public bool IsFollowPet()
|
||||
{
|
||||
if (m_pDBEssence != null)
|
||||
return m_pDBEssence.Value.id_type == 8783;
|
||||
|
||||
return false;
|
||||
}
|
||||
// Is a combat pet ?
|
||||
public bool IsCombatPet()
|
||||
{
|
||||
if (m_pDBEssence != null)
|
||||
return m_pDBEssence.Value.id_type == 8782;
|
||||
|
||||
return false;
|
||||
}
|
||||
// 是否为召唤宠
|
||||
public bool IsSummonPet()
|
||||
{
|
||||
if(m_pDBEssence == null) return false;
|
||||
return m_pDBEssence.Value.id_type == 28752;
|
||||
}
|
||||
// 是否为植物宠
|
||||
public bool IsPlantPet()
|
||||
{
|
||||
if (m_pDBEssence == null) return false;
|
||||
return m_pDBEssence.Value.id_type == 28913;
|
||||
}
|
||||
// 是否是进化宠
|
||||
public bool IsEvolutionPet()
|
||||
{
|
||||
if (m_pDBEssence == null) return false;
|
||||
return m_pDBEssence.Value.id_type == 37698;
|
||||
}
|
||||
|
||||
public PET_ESSENCE? GetDBEssence() { return m_pDBEssence; }
|
||||
|
||||
// Build complete name
|
||||
public void BuildCompleteName()
|
||||
{
|
||||
//if (!m_npcUI) return;
|
||||
//var szMasterName = EC_Game.GetGameRun().GetPlayerName(m_idMaster, false);
|
||||
//if (!szMasterName) return;
|
||||
|
||||
//string strMasterName = szMasterName;
|
||||
|
||||
//CECWorld pWorld = EC_Game.GetGameRun().GetWorld();
|
||||
//if (pWorld.IsCountryWarMap() &&
|
||||
// !CECUIConfig::Instance().GetGameUI().bShowNameInCountryWar)
|
||||
//{
|
||||
// // 国战场景中,不直接显示宠物主人名称时,要求查询到此主人信息
|
||||
// // 此改动(if语句中的内容)将导致主人未出现时无法看到宠物名称
|
||||
// // if 括号中的判断是必要的,将增加看到宠物名称的机会
|
||||
|
||||
// EC_ManPlayer pPlayerMan = pWorld.GetPlayerMan();
|
||||
// CECPlayer pPlayer = pPlayerMan.GetPlayer(m_idMaster);
|
||||
// if (!pPlayer)
|
||||
// {
|
||||
// // 还没看到此玩家,无法判断其国家,还不能确定如何显示
|
||||
// return;
|
||||
// }
|
||||
// if (pPlayer.GetShowNameInCountryWar())
|
||||
// strMasterName = pPlayer.GetNameInCountryWar();
|
||||
//}
|
||||
|
||||
//m_strCompName.Format(g_pGame.GetFixedMsgTab().GetWideString(FIXMSG_WHOSETHING), strMasterName, m_strName);
|
||||
//m_npcUI.SetName(m_strCompName);
|
||||
}
|
||||
|
||||
public override void SetUpCECNPC(CECNPCMan pNPCMan)
|
||||
{
|
||||
base.SetUpCECNPC(pNPCMan);
|
||||
m_iCID = (int)Class_ID.OCID_PET;
|
||||
m_pDBEssence = null;
|
||||
m_fTouchRad = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6af68acbb8354d04f9c00df83d3eec60
|
||||
@@ -1578,6 +1578,12 @@ namespace CSNetwork.S2CCommand
|
||||
{
|
||||
public int faction_id;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_summon_pet
|
||||
{
|
||||
public uint pet_index;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_embed_item
|
||||
|
||||
@@ -955,6 +955,13 @@ namespace CSNetwork.C2SCommand
|
||||
pCmd.faction_id = faction_id;
|
||||
return SerializeCommand(CommandID.QUERY_MAFIA_PVP_INFO, pCmd);
|
||||
}
|
||||
|
||||
public static Octets CreatePetSummon(int iPetIdx)
|
||||
{
|
||||
S2CCommand.cmd_summon_pet pCmd = new S2CCommand.cmd_summon_pet();
|
||||
pCmd.pet_index = (uint)iPetIdx;
|
||||
return SerializeCommand(CommandID.SUMMON_PET, pCmd);
|
||||
}
|
||||
|
||||
public static Octets CreateNPCSevEmbedCmd(
|
||||
ushort wStoneIdx,
|
||||
|
||||
@@ -2335,55 +2335,28 @@ namespace CSNetwork.GPDataType
|
||||
};
|
||||
public struct info_pet
|
||||
{
|
||||
public int honor_point; // �øж�
|
||||
public int hunger; // ������
|
||||
public int feed_time; // �ϴ�ι�������ڵ�ʱ��
|
||||
public int pet_tid; // ������ID
|
||||
public int pet_vis_tid; // ����Ŀɼ�ID�����Ϊ0�����ʾ������ɼ�ID��
|
||||
public int pet_egg_tid; // ���ﵰ��ID
|
||||
public int pet_class; // �������� ս�裬��裬���ͳ�
|
||||
public float hp_factor; // Ѫ��������������ջ�ʱʹ�ã� 0��Ϊ����
|
||||
public short level; // ���V��
|
||||
public ushort color; // ������ɫ�����λΪ1��ʾ��Ч��Ŀǰ���������Ч
|
||||
public int exp; // ���ﵱǰ����
|
||||
public int skill_point; // ʣ�༼�ܵ�
|
||||
public char is_bind; // �Ƿ����˺�һ��������һ��Mask��0x01 ���˺�һ��0x02 Ѱ�����ɽ���
|
||||
public char unused; // Ŀǰ������Ч
|
||||
public ushort name_len; // ���ֳ��� Ŀǰ������Ч����Ϊ��������������
|
||||
public char[] name; // ��������
|
||||
public PetSkill[] skills;
|
||||
public int honor_point; // ºÃ¸Ð¶È
|
||||
public int hunger; // ¼¢¶ö¶È
|
||||
public int feed_time; // ÉÏ´ÎÎ¹Ñøµ½ÏÖÔÚµÄʱ¼ä
|
||||
public int pet_tid; // ³èÎïµÄÄ£°åID
|
||||
public int pet_vis_tid; // ³èÎïµÄ¿É¼ûID£¨Èç¹ûΪ0£¬Ôò±íʾÎÞÌØÊâ¿É¼ûID£©
|
||||
public int pet_egg_tid; // ³èÎïµ°µÄID
|
||||
public int pet_class; // ³èÎïÀàÐÍ Õ½³è£¬Æï³è£¬¹ÛÉͳè
|
||||
public float hp_factor; // ѪÁ¿±ÈÀý£¨¸´»îºÍÊÕ»ØÊ±Ê¹Óã© 0ÔòΪËÀÍö
|
||||
public short level; // ³èÎï¼¶±ð
|
||||
public ushort color; // ³èÎïÑÕÉ«£¬×î¸ßλΪ1±íʾÓÐЧ£¬Ä¿Ç°½ö¶ÔÆï³èÓÐЧ
|
||||
public int exp; // ³èÎﵱǰ¾Ñé
|
||||
public int skill_point; // Ê£Ó༼Äܵã
|
||||
public char is_bind; // ÊÇ·ñÌìÈ˺ÏÒ»£¬ÏÖÔÚÊÇÒ»¸öMask£¬0x01 ÌìÈ˺ÏÒ»£¬0x02 Ѱ±¦Íø¿É½»Ò×
|
||||
public char unused; // Ŀǰ´ËÏîÎÞЧ
|
||||
public ushort name_len; // Ãû×Ö³¤¶È Ŀǰ´ËÏîÎÞЧ£¨ÒòΪ²ß»®ÉÐÎÞÃû×ÖÐèÇó£©
|
||||
public _evo_prop evo_prop;
|
||||
public int[] reserved; // �
|
||||
public info_pet(bool isDefault = true)
|
||||
{
|
||||
honor_point = 0;
|
||||
hunger = 0;
|
||||
feed_time = 0;
|
||||
pet_tid = 0;
|
||||
pet_vis_tid = 0;
|
||||
pet_egg_tid = 0;
|
||||
pet_class = 0;
|
||||
hp_factor = 0;
|
||||
level = 0;
|
||||
color = 0;
|
||||
exp = 0;
|
||||
skill_point = 0;
|
||||
is_bind = (char)0x00;
|
||||
unused = (char)0x00;
|
||||
name_len = 0;
|
||||
name = new char[16];
|
||||
skills = new PetSkill[(int)GP_PET_SKILL_NUM.GP_PET_SKILL_NUM];
|
||||
evo_prop = new _evo_prop
|
||||
{
|
||||
r_attack = 0,
|
||||
r_defense = 0,
|
||||
r_hp = 0,
|
||||
r_atk_lvl = 0,
|
||||
r_def_lvl = 0,
|
||||
nature = 0
|
||||
};
|
||||
reserved = new int[10];
|
||||
}
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public char[] name; // Ãû×ÖÄÚÈÝ
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)GP_PET_SKILL_NUM.GP_PET_SKILL_NUM)]
|
||||
public _skills[] skills;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
|
||||
public int[] reserved; // δÓÃ
|
||||
};
|
||||
public enum REFUSE_BLESS_MASK : byte
|
||||
{
|
||||
@@ -2396,5 +2369,203 @@ namespace CSNetwork.GPDataType
|
||||
public byte force_attack;
|
||||
public byte refuse_bless;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct _skills
|
||||
{
|
||||
public int skill;
|
||||
public int level;
|
||||
}
|
||||
|
||||
public enum eGP_PET_NATURE_SKILL
|
||||
{
|
||||
GP_PET_NATURE_SKILL_NUM = 2
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct CMDPARAM
|
||||
{
|
||||
public int idSkill;
|
||||
public byte byPVPMask;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_room
|
||||
{
|
||||
public ushort count;
|
||||
// ÖØ¸´ count ´Î
|
||||
// int index;
|
||||
// info_pet data;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_plant_pet_disapper
|
||||
{
|
||||
public int plant_nid;
|
||||
public char reason; // 0 ËÀÍö£¬1 ÊÙÃüµ½£¬2 ³¬³ö·¶Î§£¬3 ×Ô±¬£¬4 ÊýÁ¿³¬³ö×éÉÏÏÞ
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_gain_pet
|
||||
{
|
||||
public int slot_index; // ´Ë³èÎï·ÅÓÚ³èÎïÀ¸ÄÚµÄλÖÃ
|
||||
public info_pet data; // pet data
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_free_pet
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_id; // ³èÎïµÄid£¬ÎÞ´óÓÃ
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_summon_pet
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_tid;
|
||||
public int pet_pid;
|
||||
public int life_time;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_recall_pet
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_id;
|
||||
public char reason;
|
||||
};
|
||||
|
||||
public enum PET_RECALL_REASON
|
||||
{
|
||||
PET_RECALL_DEFAULT, // ĬÈÏÕٻأ¬Ö÷ÒªÔÒòÎªÍæ¼ÒÖ÷¶¯Õٻء¢Íæ¼ÒÕÙ»½³öÆäËüÔÒòµ¼ÖÂÔÓгèÎïÕٻصÈ
|
||||
PET_RECALL_DEATH, // ³èÎïËÀÍöµ¼ÖÂÕÙ»ØÏûÏ¢
|
||||
PET_RECALL_LIFE_EXHAUST, // ³èÎïʱÏÞµ½
|
||||
PET_RECALL_SACRIFICE, // ³èÎïÎþÉü£¨Íæ¼ÒʹÓü¼Äܵȵ¼Ö£©
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_player_start_pet_op
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_id;
|
||||
public int delay; // ÑÓ³Ùʱ¼ä£¬µ¥Î»ÊÇ50msµÄtick
|
||||
public int op; // ²Ù×÷ÀàÐÍ 0:·Å³ö 1:ÕÙ»Ø 2:·ÅÉú
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_receive_exp
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_id;
|
||||
public int exp;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_levelup
|
||||
{
|
||||
public int slot_index;
|
||||
public int pet_id;
|
||||
public int level; // м¶±ð
|
||||
public int exp; // µ±Ç°µÄ¾ÑéÖµ
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_room_capacity
|
||||
{
|
||||
public uint capacity;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_honor_point
|
||||
{
|
||||
public int index;
|
||||
public int cur_honor_point;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_hunger_gauge
|
||||
{
|
||||
public int index;
|
||||
public int cur_hunge_gauge;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_dead
|
||||
{
|
||||
public uint pet_index;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_revive
|
||||
{
|
||||
public uint pet_index;
|
||||
public float hp_factor;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_hp_notify
|
||||
{
|
||||
public uint pet_index;
|
||||
public float hp_factor;
|
||||
public int cur_hp;
|
||||
public float mp_factor;
|
||||
public int cur_mp;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_ai_state
|
||||
{
|
||||
public byte attack; // 0 ·ÀÓùÐÍ; 1 Ö÷¶¯ÐÍ; 2 ±»¶¯ÐÍ
|
||||
public byte move; // 0 ¸úËæ; 1 ÔµØÍ£Áô
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_set_cooldown
|
||||
{
|
||||
public int pet_index;
|
||||
public int cooldown_index;
|
||||
public int cooldown_time;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_pet_property
|
||||
{
|
||||
public int pet_index;
|
||||
public BrewMonster.Scripts.ROLEEXTPROP prop;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_set_player_limit
|
||||
{
|
||||
public int index;
|
||||
public char b; // 1 ÏÞÖÆ 0 ²»ÏÞÖÆ
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_player_mounting
|
||||
{
|
||||
public int id;
|
||||
public int mount_id;
|
||||
public ushort mount_color;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_summon_plant_pet
|
||||
{
|
||||
public int plant_tid;
|
||||
public int plant_nid;
|
||||
public int life_time;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_plant_pet_hp_notify
|
||||
{
|
||||
public int plant_nid;
|
||||
public float hp_factor;
|
||||
public int cur_hp;
|
||||
public float mp_factor;
|
||||
public int cur_mp;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -831,7 +831,7 @@ namespace CSNetwork
|
||||
#if UNITY_EDITOR
|
||||
BMLogger.LogError($"### GameDataSend: ERROR_MESSAGE parsed iMessage={pCmd.iMessage}");
|
||||
#endif
|
||||
|
||||
Debug.LogError($"### GameDataSend: ERROR_MESSAGE: {errRaw}");
|
||||
if (pCmd.iMessage != 0)
|
||||
{
|
||||
// string szMsg = m_ErrorMsgs.GetWideString(pCmd.iMessage);
|
||||
@@ -1085,6 +1085,42 @@ namespace CSNetwork
|
||||
BMLogger.LogError("### GameDataSend: LEARN_SKILL");
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_LEARNSKILL, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.GAIN_PET:
|
||||
case CommandID.FREE_PET:
|
||||
case CommandID.SUMMON_PET:
|
||||
case CommandID.RECALL_PET:
|
||||
case CommandID.PLAYER_START_PET_OP:
|
||||
case CommandID.PLAYER_STOP_PET_OP:
|
||||
case CommandID.PET_RECEIVE_EXP:
|
||||
case CommandID.PET_LEVELUP:
|
||||
case CommandID.PET_ROOM:
|
||||
case CommandID.PET_ROOM_CAPACITY:
|
||||
case CommandID.PET_HONOR_POINT:
|
||||
case CommandID.PET_HUNGER_GAUGE:
|
||||
case CommandID.PET_DEAD:
|
||||
case CommandID.PET_REVIVE:
|
||||
case CommandID.PET_HP_NOTIFY:
|
||||
case CommandID.PET_AI_STATE:
|
||||
case CommandID.PET_SET_COOLDOWN:
|
||||
case CommandID.SUMMON_PLANT_PET:
|
||||
case CommandID.PLANT_PET_DISAPPEAR:
|
||||
case CommandID.PLANT_PET_HP_NOTIFY:
|
||||
case CommandID.PET_PROPERTY:
|
||||
case CommandID.PET_REBUILD_INHERIT_START:
|
||||
case CommandID.PET_REBUILD_INHERIT_INFO:
|
||||
case CommandID.PET_REBUILD_INHERIT_END:
|
||||
case CommandID.PET_EVOLUTION_DONE:
|
||||
case CommandID.PET_REBUILD_NATURE_START:
|
||||
case CommandID.PET_REBUILD_NATURE_INFO:
|
||||
case CommandID.PET_REBUILD_NATURE_END:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PETOPT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.SET_PLAYER_LIMIT:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_SETPLAYERLIMIT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.PLAYER_MOUNTING:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERMOUNT, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.EMBED_ITEM:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_EMBEDITEM, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
@@ -1886,6 +1922,19 @@ namespace CSNetwork
|
||||
gamedatasend.Data = C2SCommandFactory.CreateQueryFactionPVPInfo(faction_id);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
public void SendCmdPetCtrl(int idTarget, int cmd, object pParamBuf, int iParamLen)
|
||||
{
|
||||
m_CmdCache.SendCmdPetCtrl(idTarget, cmd, (byte[])pParamBuf, iParamLen);
|
||||
}
|
||||
|
||||
public void c2s_SendCmdPetSummon(int iPetIdx)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
gamedatasend.Data = C2SCommandFactory.CreatePetSummon(iPetIdx);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
public void c2s_SendCmdNPCSevEmbed(ushort wStoneIdx, ushort wEquipIdx, int tidStone, int tidEquip)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
|
||||
@@ -680,6 +680,18 @@ namespace BrewMonster.Network
|
||||
{
|
||||
_gameSession?.CmdCache?.Tick(Time.deltaTime);
|
||||
}
|
||||
|
||||
public static void c2s_CmdPetCtrl(int idTarget, int cmd, object pParamBuf, int iParamLen)
|
||||
{
|
||||
Instance._gameSession.SendCmdPetCtrl(idTarget, cmd, pParamBuf, iParamLen);
|
||||
}
|
||||
|
||||
// Pet commands ...
|
||||
public static void c2s_CmdPetSummon(int iPetIdx)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdPetSummon(iPetIdx);
|
||||
}
|
||||
|
||||
public static void c2s_CmdNPCSevEmbed(ushort wStoneIdx, ushort wEquipIdx, int tidStone, int tidEquip)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdNPCSevEmbed(wStoneIdx, wEquipIdx, tidStone, tidEquip);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64353be2a0c1d704cb4392f919960f91
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d73d6ebcbf227b478aec9344986734f
|
||||
@@ -1,3 +1,5 @@
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.Players;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
@@ -14,10 +16,33 @@ namespace BrewMonster
|
||||
public class CECActionContext
|
||||
{
|
||||
public ActionContextType ContextType { get; set; }
|
||||
public List<CECActionBase> m_actions;
|
||||
CECHostPlayer m_pHostPlayer;
|
||||
bool m_bForceRemove;
|
||||
CECContextValidChecker m_ErrorCtr;
|
||||
|
||||
public bool IsContext(ActionContextType contextType)
|
||||
{
|
||||
return ContextType == contextType;
|
||||
}
|
||||
|
||||
public int GetActionCount() { return m_actions.Count; }
|
||||
|
||||
public CECActionBase GetLastAction()
|
||||
{
|
||||
return GetAction(GetActionCount() - 1);
|
||||
}
|
||||
|
||||
public CECActionBase GetAction(int index)
|
||||
{
|
||||
if (index >= 0 && index < GetActionCount())
|
||||
return m_actions[index];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool NeedCheckValid() { return false; }
|
||||
public CECHostPlayer GetHostPlayer() { return m_pHostPlayer;}
|
||||
public void SetForceRemove(bool v) { m_bForceRemove = v; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,186 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace BrewMonster.Assets.PerfectWorld.Scripts.Players
|
||||
{
|
||||
public abstract class CECActionBase
|
||||
{
|
||||
public enum ACTION_RESULT
|
||||
{
|
||||
FD_NONE = 0,
|
||||
FD_SUCC,
|
||||
FD_FAIL,
|
||||
};
|
||||
|
||||
public CECHostPlayer m_pHostPlayer;
|
||||
public ACTION_RESULT m_iFirstDoRes;
|
||||
public CECActionSequencedRelationFilter m_ActionFilter;
|
||||
|
||||
public CECActionBase(CECHostPlayer pHost)
|
||||
{
|
||||
m_pHostPlayer = pHost;
|
||||
m_iFirstDoRes = (ACTION_RESULT.FD_NONE);
|
||||
m_ActionFilter = null;
|
||||
}
|
||||
|
||||
public bool NeedBeRemoved()
|
||||
{
|
||||
return (m_iFirstDoRes != ACTION_RESULT.FD_NONE);
|
||||
}
|
||||
public CECActionSequencedRelationFilter GetActionFilter() { return m_ActionFilter; }
|
||||
|
||||
public abstract bool CanDo();
|
||||
public abstract bool DoOnce();
|
||||
|
||||
public virtual bool Update(uint dt)
|
||||
{
|
||||
FlagKeeper keeper = new FlagKeeper(m_pHostPlayer.GetActionSwitcher());
|
||||
|
||||
// do once
|
||||
if (CanDo() && m_iFirstDoRes == ACTION_RESULT.FD_NONE)
|
||||
m_iFirstDoRes = DoOnce() ? ACTION_RESULT.FD_SUCC : ACTION_RESULT.FD_FAIL;
|
||||
|
||||
return true;
|
||||
}
|
||||
public virtual bool CanAddTo(CECActionContext pContext)
|
||||
{
|
||||
return m_ActionFilter != null && m_ActionFilter.CanAddAction(pContext, this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
public abstract class CECFitlerBase
|
||||
{
|
||||
public abstract bool CanAddAction(CECActionContext pContext, CECActionBase pAct);
|
||||
}
|
||||
|
||||
public abstract class CECActionSequencedRelationFilter : CECFitlerBase
|
||||
{
|
||||
public override bool CanAddAction(CECActionContext pContext, CECActionBase pAct)
|
||||
{
|
||||
// If the action queue is empty and the action can be executed, then add it.
|
||||
if (pContext.GetActionCount() == 0 && pAct.CanDo())
|
||||
return true;
|
||||
|
||||
// Determine the predecessor–successor order relationship of actions in the action queue.
|
||||
CECActionBase pLastAct = pContext != null ? pContext.GetLastAction() : null;
|
||||
CECActionSequencedRelationFilter filter = pLastAct != null ? pLastAct.GetActionFilter() : null;
|
||||
if (filter != null && filter.IsPredecessorTo(pAct.GetActionFilter()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract bool IsPredecessorTo(CECActionSequencedRelationFilter cECActionSequencedRelationFilter);
|
||||
|
||||
public virtual bool IsSuccessorTo(CECCancelRideActionFilter pFilter) { return false; }
|
||||
public virtual bool IsSuccessorTo(CECRideActionFilter pFilter) { return false; }
|
||||
public virtual bool IsSuccessorTo(CECLandingActionFilter pFilter) { return false; }
|
||||
public virtual bool IsSuccessorTo(CECFlyActionFilter pFilter) { return false; }
|
||||
public virtual bool IsSuccessorTo(CECSkillActionFilter pFilter) { return false; }
|
||||
public virtual bool IsSuccessorTo(CECUseSkillItemActionFilter pFilter) { return false; }
|
||||
};
|
||||
|
||||
public class FlagKeeper
|
||||
{
|
||||
public CECActionSwitcherBase m_pSwitcher;
|
||||
public FlagKeeper(CECActionSwitcherBase pSwitcher)
|
||||
{
|
||||
m_pSwitcher = pSwitcher;
|
||||
pSwitcher.SetPostMessageFlag(false);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECCancelRideActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public bool IsSuccessorTo(CECRideActionFilter filter ) { return true; }
|
||||
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECRideActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public virtual bool IsSuccessorTo(CECCancelRideActionFilter filter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECLandingActionFilter filter ) { return true; }
|
||||
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECLandingActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public virtual bool IsSuccessorTo(CECFlyActionFilter filter) { return true; }
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECFlyActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public virtual bool IsSuccessorTo(CECCancelRideActionFilter pFilter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECLandingActionFilter pFilter) { return true; }
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECSkillActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public virtual bool IsSuccessorTo(CECCancelRideActionFilter pFilter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECLandingActionFilter pFilter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECFlyActionFilter pFilter) { return true; }
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECUseSkillItemActionFilter : CECActionSequencedRelationFilter
|
||||
{
|
||||
public virtual bool IsSuccessorTo(CECCancelRideActionFilter pFilter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECLandingActionFilter pFilter) { return true; }
|
||||
public virtual bool IsSuccessorTo(CECFlyActionFilter pFilter) { return true; }
|
||||
public override bool IsPredecessorTo(CECActionSequencedRelationFilter pFilter)
|
||||
{
|
||||
return pFilter.IsSuccessorTo(this);
|
||||
}
|
||||
};
|
||||
|
||||
public class CECContextValidChecker
|
||||
{
|
||||
public CECContextValidChecker(CECActionContext context)
|
||||
{
|
||||
m_pActionContext = context;
|
||||
error_correct = 0;
|
||||
}
|
||||
|
||||
public virtual void Update(uint dt)
|
||||
{
|
||||
//After the client sends mount or dismount commands, it immediately sends a movement message.
|
||||
// As a result, the mount/ dismount operation on the server may fail, but the client is not notified.
|
||||
// Therefore, a confirmation check is required here.
|
||||
if (m_pActionContext.GetActionCount() != 0 && m_pActionContext.NeedCheckValid())
|
||||
{
|
||||
error_correct += (int)dt;
|
||||
|
||||
if (error_correct > MAX_ERRORTIME && !m_pActionContext.GetHostPlayer().GetWorkMan().IsOperatingPet())
|
||||
{
|
||||
m_pActionContext.SetForceRemove(true);
|
||||
error_correct = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int error_correct;
|
||||
public CECActionContext m_pActionContext;
|
||||
public const int MAX_ERRORTIME = 3000;
|
||||
};
|
||||
|
||||
public class CECActionSwitcherBase
|
||||
{
|
||||
CECHostPlayer m_pHostPlayer;
|
||||
@@ -23,6 +203,9 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.Players
|
||||
if (CanAddMessage())
|
||||
m_msgs.UniquelyAdd(msg);
|
||||
}
|
||||
public void SetPostMessageFlag(bool bCan) { m_bCanAddMsg = bCan; }
|
||||
|
||||
public virtual bool OnFlyToRideAction(int petIndex) { return false; } // fly -> ride
|
||||
}
|
||||
public enum EMsgActionSwitcher
|
||||
|
||||
|
||||
@@ -439,6 +439,9 @@ namespace BrewMonster
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYERGATHER:
|
||||
OnMsgPlayerGather(Msg);
|
||||
break;
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYERMOUNT:
|
||||
OnMsgPlayerMount(Msg);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,492 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
using BrewMonster.UI;
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.Scripts.Pet.CECPetData;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public partial class CECHostPlayer
|
||||
{
|
||||
|
||||
// 服务器控制的额外操作限制
|
||||
public enum PLAYER_LIMIT
|
||||
{
|
||||
PLAYER_LIMIT_NOFLY, // 禁止"飞行/取消飞行"
|
||||
PLAYER_LIMIT_NOCHANGESELECT, // 禁止"选中/取消选中/协助攻击"
|
||||
PLAYER_LIMIT_NOMOUNT, // 禁止召唤骑宠
|
||||
PLAYER_LIMIT_NOBIND, // 禁止"发起/接收相依相偎"
|
||||
PLAYER_LIMIT_MAX,
|
||||
};
|
||||
|
||||
// Update pet shortcut when pet freeed
|
||||
void UpdateFreedPetSC(int iPetIndex)
|
||||
{
|
||||
// TO DO: fix later
|
||||
//int i;
|
||||
|
||||
//// Update shortcut sets 1
|
||||
//for (i = 0; i < (int)Shortcut.NUM_HOSTSCSETS1; i++)
|
||||
//{
|
||||
// if (m_aSCSets1[i] != null)
|
||||
// m_aSCSets1[i].UpdateFreedPetSC(iPetIndex);
|
||||
//}
|
||||
|
||||
//// Update shortcut sets 2
|
||||
//for (i = 0; i < (int)Shortcut.NUM_HOSTSCSETS2; i++)
|
||||
//{
|
||||
// if (m_aSCSets2[i] != null)
|
||||
// m_aSCSets2[i].UpdateFreedPetSC(iPetIndex);
|
||||
//}
|
||||
}
|
||||
|
||||
bool OnPetSays(int tid, int nid, int type)
|
||||
{
|
||||
bool bSaid = false;
|
||||
|
||||
//CECNPC pNPC = EC_Game.GetGameRun().GetWorld().GetNPCMan().GetNPCFromAll(nid);
|
||||
//if (pNPC && pNPC.GetMasterID() == GetCharacterID())
|
||||
//{
|
||||
// const ACHAR* szWords = m_pPetWords.GetWords(tid, (CECPetWords::TYPE_WORDS)type);
|
||||
// if (szWords)
|
||||
// {
|
||||
// pNPC.SetLastSaidWords(szWords, 5000);
|
||||
// bSaid = true;
|
||||
// }
|
||||
//}
|
||||
|
||||
return bSaid;
|
||||
}
|
||||
|
||||
/* Is host operating pet ?
|
||||
return value:
|
||||
|
||||
0: host doesn't operating pet.
|
||||
1: host is summoning pet.
|
||||
2: host is recalling pet.
|
||||
3: host is banishing pet.
|
||||
*/
|
||||
int CIsOperatingPet()
|
||||
{
|
||||
CECHPWorkConcentrate pWork = (m_pWorkMan.GetRunningWork(CECHPWork.Host_work_ID.WORK_CONCENTRATE)) as CECHPWorkConcentrate;
|
||||
if (pWork != null)
|
||||
{
|
||||
if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_SUMMONPET)
|
||||
return 1;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_RECALLPET)
|
||||
return 2;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_BANISHPET)
|
||||
return 3;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_RESTOREPET)
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OnMsgHstPetOpt(ECMSG Msg)
|
||||
{
|
||||
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
int header = Convert.ToInt32(Msg.dwParam2);
|
||||
switch (header)
|
||||
{
|
||||
case CommandID.GAIN_PET:
|
||||
{
|
||||
cmd_gain_pet pCmd = GPDataTypeHelper.FromBytes<cmd_gain_pet>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.AddPet(pCmd.slot_index, pCmd.data);
|
||||
|
||||
// Print a notify
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.slot_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
if (pPet.IsFollowPet() || pPet.IsCombatPet() || pPet.IsEvolutionPet())
|
||||
{
|
||||
// TO DO: fix later
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_HATCH, pPet.GetName());
|
||||
}
|
||||
else if (pPet.IsSummonPet())
|
||||
{
|
||||
// TO DO: fix later
|
||||
//pGameRun.AddFixedMessage(FIXMSG_SUMMON_PET_APPEAR, pPet.GetName());
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CommandID.FREE_PET:
|
||||
{
|
||||
cmd_free_pet pCmd = GPDataTypeHelper.FromBytes<cmd_free_pet>((byte[])Msg.dwParam1);
|
||||
|
||||
// Print a notify
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.slot_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
if (pPet.IsFollowPet() || pPet.IsCombatPet() || pPet.IsEvolutionPet())
|
||||
{
|
||||
// TO DO: fix later
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_FREE, pPet.GetName());
|
||||
}
|
||||
else if (pPet.IsSummonPet())
|
||||
{
|
||||
// TO DO: fix later
|
||||
//pGameRun.AddFixedMessage(FIXMSG_SUMMON_PET_DISAPPEAR, pPet.GetName());
|
||||
}
|
||||
}
|
||||
|
||||
// Remove pet from corral
|
||||
m_pPetCorral.FreePet(pCmd.slot_index, pCmd.pet_id);
|
||||
// Update pet shortcuts
|
||||
UpdateFreedPetSC(pCmd.slot_index);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.SUMMON_PET:
|
||||
{
|
||||
cmd_summon_pet pCmd = GPDataTypeHelper.FromBytes<cmd_summon_pet>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.slot_index);
|
||||
//ASSERT(pPet && pPet.GetTemplateID() == pCmd.pet_tid);
|
||||
m_pPetCorral.SetActivePetIndex(pCmd.slot_index);
|
||||
m_pPetCorral.SetActivePetNPCID(pCmd.pet_pid);
|
||||
m_pPetCorral.SetActivePetLifetime(pCmd.life_time);
|
||||
|
||||
if (EC_Game.GetConfigs().GetGameSettings().bPetAutoSkill)
|
||||
{
|
||||
for (int i = 0; i < pPet.GetSkillNum(SKILLTYPE.EM_SKILL_DEFAULT); i++)
|
||||
{
|
||||
PETSKILL? pSkill = pPet.GetSkill(SKILLTYPE.EM_SKILL_DEFAULT, i);
|
||||
if (pSkill != null && EC_Game.IsPetAutoSkill(pSkill.Value.idSkill))
|
||||
pPet.AddAutoSkill(pSkill.Value.idSkill);
|
||||
}
|
||||
}
|
||||
|
||||
// TO DO: fix later
|
||||
//OnPetSays(pCmd.pet_tid, pCmd.pet_pid, CECPetWords::TW_SUMMON);
|
||||
//if (pPet.IsCombatPet() || pPet.IsSummonPet() || pPet.IsEvolutionPet())
|
||||
// CDlgQuickBarPet::ResetAutoCastSkill();
|
||||
break;
|
||||
}
|
||||
case CommandID.RECALL_PET:
|
||||
{
|
||||
cmd_recall_pet pCmd = GPDataTypeHelper.FromBytes<cmd_recall_pet>((byte[])Msg.dwParam1);
|
||||
//ASSERT(pCmd.slot_index == m_pPetCorral.GetActivePetIndex());
|
||||
|
||||
int tid = pCmd.pet_id;
|
||||
int nid = m_pPetCorral.GetActivePetNPCID();
|
||||
|
||||
// 宠物有话说
|
||||
switch (pCmd.reason)
|
||||
{
|
||||
case (char)PET_RECALL_REASON.PET_RECALL_DEFAULT:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_RECALL);
|
||||
break;
|
||||
|
||||
case (char)PET_RECALL_REASON.PET_RECALL_DEATH:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_DEAD);
|
||||
break;
|
||||
|
||||
case (char)PET_RECALL_REASON.PET_RECALL_LIFE_EXHAUST:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_DISAPPEAR);
|
||||
break;
|
||||
|
||||
case (char)PET_RECALL_REASON.PET_RECALL_SACRIFICE:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_SACRIFICE);
|
||||
break;
|
||||
}
|
||||
|
||||
CECPetData pPet = m_pPetCorral.GetActivePet();
|
||||
if (pPet != null)
|
||||
pPet.OnPetDead();
|
||||
|
||||
m_pPetCorral.SetActivePetIndex(-1);
|
||||
m_pPetCorral.SetActivePetNPCID(0);
|
||||
m_bPetInSanctuary = false;
|
||||
break;
|
||||
}
|
||||
case CommandID.PLAYER_START_PET_OP:
|
||||
{
|
||||
cmd_player_start_pet_op pCmd = GPDataTypeHelper.FromBytes<cmd_player_start_pet_op>((byte[])Msg.dwParam1);
|
||||
int iDoWhat;
|
||||
if (pCmd.op == 0)
|
||||
iDoWhat = (int)CECHPWorkConcentrate.eDO_PET.DO_SUMMONPET;
|
||||
else if (pCmd.op == 1)
|
||||
iDoWhat = (int)CECHPWorkConcentrate.eDO_PET.DO_RECALLPET;
|
||||
else if (pCmd.op == 2)
|
||||
iDoWhat = (int)CECHPWorkConcentrate.eDO_PET.DO_BANISHPET;
|
||||
else if (pCmd.op == 3)
|
||||
iDoWhat = (int)CECHPWorkConcentrate.eDO_PET.DO_RESTOREPET;
|
||||
else
|
||||
iDoWhat = (int)CECHPWorkConcentrate.eDO_PET.DO_UNKNOWN;
|
||||
|
||||
m_PetOptCnt.SetPeriod(pCmd.delay * 50);
|
||||
m_PetOptCnt.Reset();
|
||||
|
||||
CECHPWorkConcentrate pWork = (CECHPWorkConcentrate)m_pWorkMan.CreateWork(CECHPWork.Host_work_ID.WORK_CONCENTRATE);
|
||||
pWork.SetDoWhat(iDoWhat);
|
||||
m_pWorkMan.StartWork_p1(pWork);
|
||||
break;
|
||||
}
|
||||
case CommandID.PLAYER_STOP_PET_OP:
|
||||
{
|
||||
if (IsOperatingPet() != 0)
|
||||
m_pWorkMan.FinishRunningWork(CECHPWork.Host_work_ID.WORK_CONCENTRATE);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_RECEIVE_EXP:
|
||||
{
|
||||
cmd_pet_receive_exp pCmd = GPDataTypeHelper.FromBytes<cmd_pet_receive_exp>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.slot_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
//ASSERT(pPet.GetTemplateID() == pCmd.pet_id);
|
||||
pPet.AddExp(pCmd.exp);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_LEVELUP:
|
||||
{
|
||||
cmd_pet_levelup pCmd = GPDataTypeHelper.FromBytes<cmd_pet_levelup>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.slot_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
//ASSERT(pPet.GetTemplateID() == pCmd.pet_id);
|
||||
pPet.LevelUp(pCmd.level, pCmd.exp);
|
||||
}
|
||||
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_LEVELUP, pCmd.level);
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_ROOM:
|
||||
{
|
||||
cmd_pet_room pCmd = GPDataTypeHelper.FromBytes<cmd_pet_room>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.UpdatePets(pCmd, (byte[])Msg.dwParam1);
|
||||
|
||||
CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
|
||||
//if (pGameUI.GetDialog("Win_Teach").IsShow())
|
||||
// {
|
||||
// //pGameUI.UpdateTeach();
|
||||
// }
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_ROOM_CAPACITY:
|
||||
{
|
||||
cmd_pet_room_capacity pCmd = GPDataTypeHelper.FromBytes<cmd_pet_room_capacity>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.MagnifyPetSlots((int)pCmd.capacity);
|
||||
|
||||
if (m_pPetCorral.HasInit())
|
||||
{
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_ROOM_SIZE, pCmd.capacity);
|
||||
}
|
||||
else
|
||||
m_pPetCorral.SetHasInit(true);
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_HONOR_POINT:
|
||||
{
|
||||
cmd_pet_honor_point pCmd = GPDataTypeHelper.FromBytes<cmd_pet_honor_point>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.index);
|
||||
if (pPet != null)
|
||||
pPet.SetIntimacy(pCmd.cur_honor_point);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_HUNGER_GAUGE:
|
||||
{
|
||||
cmd_pet_hunger_gauge pCmd = GPDataTypeHelper.FromBytes<cmd_pet_hunger_gauge>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.index);
|
||||
if (pPet != null)
|
||||
pPet.SetHunger(pCmd.cur_hunge_gauge);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_DEAD:
|
||||
{
|
||||
cmd_pet_dead pCmd = GPDataTypeHelper.FromBytes<cmd_pet_dead>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData((int)pCmd.pet_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
pPet.SetHPFactor(0.0f);
|
||||
pPet.SetHP(0);
|
||||
pPet.OnPetDead();
|
||||
}
|
||||
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_DEAD);
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_REVIVE:
|
||||
{
|
||||
cmd_pet_revive pCmd = GPDataTypeHelper.FromBytes<cmd_pet_revive>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData((int)pCmd.pet_index);
|
||||
if (pPet != null)
|
||||
pPet.SetHPFactor(pCmd.hp_factor);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_HP_NOTIFY:
|
||||
{
|
||||
cmd_pet_hp_notify pCmd = GPDataTypeHelper.FromBytes<cmd_pet_hp_notify>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData((int)pCmd.pet_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
int lastHP = pPet.GetHP();
|
||||
|
||||
pPet.SetHPFactor(pCmd.hp_factor);
|
||||
pPet.SetHP(pCmd.cur_hp);
|
||||
|
||||
pPet.SetMPFactor(pCmd.mp_factor);
|
||||
pPet.SetMP(pCmd.cur_mp);
|
||||
|
||||
// If HP is too low, popup a warning on pet's head
|
||||
int iLimit = (int)(pPet.CalcMaxHP() * 0.3f);
|
||||
if (pCmd.cur_hp < lastHP && lastHP != 0 && pCmd.cur_hp < iLimit)
|
||||
{
|
||||
CECNPC pNPC = EC_Game.GetGameRun().GetWorld().GetNPCMan().GetNPC(m_pPetCorral.GetActivePetNPCID());
|
||||
if (pNPC && pNPC.GetMasterID() == GetCharacterID())
|
||||
{
|
||||
//pNPC.BubbleText(CECNPC::BUBBLE_HPWARN, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_AI_STATE:
|
||||
{
|
||||
cmd_pet_ai_state pCmd = GPDataTypeHelper.FromBytes<cmd_pet_ai_state>((byte[])Msg.dwParam1);
|
||||
|
||||
// 宠物有话说
|
||||
CECPetData pPetData = m_pPetCorral.GetActivePet();
|
||||
if (pPetData != null)
|
||||
{
|
||||
int tid = pPetData.GetTemplateID();
|
||||
int nid = m_pPetCorral.GetActivePetNPCID();
|
||||
if (m_pPetCorral.GetMoveMode() != pCmd.move)
|
||||
{
|
||||
switch (pCmd.move)
|
||||
{
|
||||
case (byte)CECPetCorral.ePet_MovingMode.MOVE_FOLLOW:
|
||||
{
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_FOLLOW);
|
||||
break;
|
||||
}
|
||||
case (byte)CECPetCorral.ePet_MovingMode.MOVE_STAND:
|
||||
{
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_STOP);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m_pPetCorral.GetAttackMode() != pCmd.attack)
|
||||
{
|
||||
switch (pCmd.attack)
|
||||
{
|
||||
case (byte)CECPetCorral.ePet_AttackingMode.ATK_DEFENSE:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_DEFENSIVE);
|
||||
break;
|
||||
|
||||
case (byte)CECPetCorral.ePet_AttackingMode.ATK_POSITIVE:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_OFFENSIVE);
|
||||
break;
|
||||
|
||||
case (byte)CECPetCorral.ePet_AttackingMode.ATK_PASSIVE:
|
||||
//OnPetSays(tid, nid, CECPetWords::TW_PASSIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_pPetCorral.SetMoveMode(pCmd.move);
|
||||
m_pPetCorral.SetAttackMode(pCmd.attack);
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_SET_COOLDOWN:
|
||||
{
|
||||
cmd_pet_set_cooldown pCmd = GPDataTypeHelper.FromBytes<cmd_pet_set_cooldown>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.pet_index);
|
||||
if (pPet != null)
|
||||
pPet.SetSkillCoolTime(pCmd.cooldown_index, pCmd.cooldown_time);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CommandID.SUMMON_PLANT_PET:
|
||||
{
|
||||
int size = Marshal.SizeOf<cmd_summon_plant_pet>();
|
||||
if (((byte[])Msg.dwParam1).Length >= size)
|
||||
{
|
||||
cmd_summon_plant_pet pCmd = GPDataTypeHelper.FromBytes<cmd_summon_plant_pet>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.PlantPetEnter(pCmd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CommandID.PLANT_PET_DISAPPEAR:
|
||||
{
|
||||
int size = Marshal.SizeOf<cmd_plant_pet_disapper>();
|
||||
if (((byte[])Msg.dwParam1).Length >= size)
|
||||
{
|
||||
cmd_plant_pet_disapper pCmd = GPDataTypeHelper.FromBytes<cmd_plant_pet_disapper>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.PlantPetDisappear(pCmd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CommandID.PLANT_PET_HP_NOTIFY:
|
||||
{
|
||||
int size = Marshal.SizeOf<cmd_plant_pet_hp_notify>();
|
||||
if (((byte[])Msg.dwParam1).Length >= size)
|
||||
{
|
||||
cmd_plant_pet_hp_notify pCmd = GPDataTypeHelper.FromBytes<cmd_plant_pet_hp_notify>((byte[])Msg.dwParam1);
|
||||
m_pPetCorral.PlantPetInfo(pCmd);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CommandID.PET_PROPERTY:
|
||||
{
|
||||
cmd_pet_property pCmd = GPDataTypeHelper.FromBytes<cmd_pet_property>((byte[])Msg.dwParam1);
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(pCmd.pet_index);
|
||||
if (pPet != null)
|
||||
{
|
||||
pPet.SetExtendProps(pCmd.prop);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CommandID.PET_REBUILD_INHERIT_START:
|
||||
case CommandID.PET_REBUILD_INHERIT_INFO:
|
||||
case CommandID.PET_REBUILD_INHERIT_END:
|
||||
case CommandID.PET_EVOLUTION_DONE:
|
||||
case CommandID.PET_REBUILD_NATURE_START:
|
||||
case CommandID.PET_REBUILD_NATURE_INFO:
|
||||
case CommandID.PET_REBUILD_NATURE_END:
|
||||
{
|
||||
CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
if (pGameUI != null)
|
||||
{
|
||||
//((CDlgPreviewPetRebuild*)pGameUI.GetDialog("Win_PreviewPet")).OnServerNotify(Msg.dwParam2, (void*)Msg.dwParam1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
void OnMsgHstSetPlayerLimit(ECMSG Msg)
|
||||
{
|
||||
cmd_set_player_limit pCmd = GPDataTypeHelper.FromBytes<cmd_set_player_limit>((byte[])Msg.dwParam1);
|
||||
if (pCmd.index >= 0 && pCmd.index < (int)PLAYER_LIMIT.PLAYER_LIMIT_MAX)
|
||||
m_playerLimits[pCmd.index] = (pCmd.b != 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a80761da7f1dc184b8117b7170fd98f2
|
||||
@@ -191,7 +191,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
return "";
|
||||
}
|
||||
// ����˵��
|
||||
public virtual void GetIntroduction(StringBuilder buf, SkillStr table) { }
|
||||
public virtual void GetIntroduction(StringBuilder buf, SkillStr table) { }
|
||||
// ����ְҵ����
|
||||
public virtual int GetCls() { return -1; }
|
||||
// ������ȴʱ�䣬��λ����
|
||||
@@ -250,7 +250,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
return ret;
|
||||
}
|
||||
public virtual int GetRequiredRealmLevel() { return 0; }
|
||||
public static int GetRequiredRealmLevel(uint id, int level)
|
||||
public static int GetRequiredRealmLevel(uint id, int level)
|
||||
{
|
||||
Skill s = Skill.Create(id, level);
|
||||
if (s == null)
|
||||
@@ -324,11 +324,67 @@ namespace BrewMonster.Scripts.Skills
|
||||
// ���������ж�
|
||||
public virtual bool ValidWeapon(int w) { return true; }
|
||||
// 0, �ɹ���1��������ƥ�䣻2, mp���㣻3��λ�����������㣻4���������������?5������ID, 6��δѡ��Ŀ��
|
||||
public int Condition(uint id, UseRequirement info, int ilevel)
|
||||
{
|
||||
skill = Skill.Create(id, ilevel);
|
||||
if (skill == null)
|
||||
return 5;
|
||||
|
||||
ComboArg arg = skill.GetPlayer().GetComboarg();
|
||||
if (info.combo_state.arg != null)
|
||||
{
|
||||
for (int i = 0; i < ComboSkillState.MAX_COMBO_ARG; i++)
|
||||
{
|
||||
arg.SetValue((uint)i, info.combo_state.arg[i]);
|
||||
}
|
||||
}
|
||||
int ret = ((ElementSkill)skill).Condition(info);
|
||||
|
||||
return ret;
|
||||
}
|
||||
public int Condition(UseRequirement info)
|
||||
{
|
||||
if (info.arrow < GetArrowCost())
|
||||
return 9;
|
||||
if (!ValidWeapon(info.weapon))
|
||||
return 1;
|
||||
if (info.mp < GetMpCost())
|
||||
return 2;
|
||||
int form_type = (info.form & FORM_MASK_HIGH) >> 6;
|
||||
if ((GetAllowForms() & (1 << form_type)) == 0)
|
||||
return 7;
|
||||
if (info.ap < GetApCost())
|
||||
return 8;
|
||||
if (info.freepackage == 0 && GetTargetType() == 3)
|
||||
return 10;
|
||||
// ÒÆ¶¯»·¾³
|
||||
if ((info.move_env == 0 && !IsAllowLand()) ||
|
||||
(info.move_env == 1 && !IsAllowWater()) ||
|
||||
(info.move_env == 2 && !IsAllowAir()))
|
||||
return 3;
|
||||
|
||||
if (info.is_combat && GetNotuseInCombat())
|
||||
return 11;
|
||||
|
||||
if (!CheckHpCondition(info.hp, info.max_hp))
|
||||
return 12;
|
||||
|
||||
int preskill = GetComboSkPreSkill();
|
||||
if (preskill != 0)
|
||||
{
|
||||
if (info.combo_state.skillid != (uint)preskill
|
||||
|| !CheckComboSkExtraCondition())
|
||||
return 13;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 检查HP条件 // Check HP condition
|
||||
public virtual bool CheckHpCondition(int hp, int max_hp) { return true; }
|
||||
// 检查连击技能额外条件 // Check combo skill extra condition
|
||||
public virtual bool CheckComboSkExtraCondition() { return true; }
|
||||
|
||||
public virtual bool IsAllowLand() { return true; }
|
||||
public virtual bool IsAllowWater() { return true; }
|
||||
public virtual bool IsAllowAir() { return true; }
|
||||
@@ -369,7 +425,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
comboArg.SetValue((uint)i, argValue);
|
||||
}
|
||||
|
||||
if (skill.CheckComboSkExtraCondition())
|
||||
if (((ElementSkill)skill).CheckComboSkExtraCondition())
|
||||
{
|
||||
result[skill.GetId()] = skill.GetComboSkInterval();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,10 @@ namespace BrewMonster.Scripts.Skills
|
||||
return stub.GetIcon();
|
||||
}
|
||||
public int GetAbility() { return SkillWrapper.Instance.GetAbility(id); }
|
||||
public bool CheckComboSkExtraCondition() { return stub.CheckComboSkExtraCondition(this); }
|
||||
// 检查施放时hp条件 // Check HP condition when casting
|
||||
public override bool CheckHpCondition(int hp, int max_hp) { return stub.CheckHpCondition(hp, max_hp); }
|
||||
public override bool CheckComboSkExtraCondition() { return stub.CheckComboSkExtraCondition(this); }
|
||||
public override byte GetAllowForms() { return stub.allow_forms; }
|
||||
|
||||
public override string GetName() { return stub.GetName(); }
|
||||
public override float GetPrayRange(float range, float prayplus)
|
||||
@@ -302,7 +305,13 @@ namespace BrewMonster.Scripts.Skills
|
||||
public virtual float GetPraydistance(Skill skill) { return 0f; }
|
||||
public virtual float GetMpcost(Skill skill) { return 0f; }
|
||||
public virtual int GetExecutetime(Skill skill) { return 1000; }
|
||||
// 检查HP条件 // Check HP condition
|
||||
// 默认返回true,子类可以重写以检查HP百分比范围 // Default returns true, subclasses can override to check HP percentage range
|
||||
// 例如:return hp >= max_hp / 100.0f * minPercent && hp <= max_hp / 100.0f * maxPercent;
|
||||
public virtual bool CheckHpCondition(int hp, int max_hp) { return true; }
|
||||
// 检查连击技能额外条件 // Check combo skill extra condition
|
||||
// 默认返回true,子类可以重写以检查连击参数等条件 // Default returns true, subclasses can override to check combo arguments etc.
|
||||
// 例如:return skill.GetPlayer().GetComboarg().GetValue(0) == 5;
|
||||
public virtual bool CheckComboSkExtraCondition(Skill skill) { return true; }
|
||||
public virtual int GetIntroduction(Skill skill, StringBuilder descBuffer, string titleBuffer) { return 0; }
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace BrewMonster.UI
|
||||
protected Dictionary<int, string> m_StringTable = new Dictionary<int, string>();
|
||||
protected Dictionary<int, string> m_auiDialog_stringTable = new Dictionary<int, string>();
|
||||
public Dictionary<string, AUIDialog> m_DlgName = new Dictionary<string, AUIDialog>();
|
||||
public List<string> m_vecBadWords = new List<string>();
|
||||
|
||||
public string GetStringFromTable(int idString)
|
||||
{
|
||||
@@ -41,6 +42,7 @@ namespace BrewMonster.UI
|
||||
{
|
||||
ImportStringTable("Assets/Addressable/ingame.txt");
|
||||
ImportAuiDialogStringTable("Assets/Addressable/msgbox.txt");
|
||||
ImportStringBadWords("Assets/Addressable/badwords.txt");
|
||||
}
|
||||
|
||||
public string Translate(ushort[] str)
|
||||
@@ -338,5 +340,41 @@ namespace BrewMonster.UI
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool ImportStringBadWords(string pszFilename)
|
||||
{
|
||||
//AWScriptFile s = new AWScriptFile();
|
||||
var ta = LoadStringTableTextAssetByAddressables(pszFilename);
|
||||
if (ta == null || string.IsNullOrEmpty(ta.text))
|
||||
{
|
||||
BMLogger.LogError($"[AUIManager] ImportStringTable failed: cannot load Addressables TextAsset for key='{pszFilename}'");
|
||||
return false;
|
||||
}
|
||||
|
||||
using (var sr = new StringReader(ta.text))
|
||||
{
|
||||
string line;
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
continue;
|
||||
|
||||
var parts = line.Split('\t', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length < 2)
|
||||
continue;
|
||||
|
||||
if (int.TryParse(parts[0], out int key))
|
||||
{
|
||||
string value = parts[1].Trim();
|
||||
if (value.StartsWith("\"") && value.EndsWith("\""))
|
||||
value = value.Substring(1, value.Length - 2);
|
||||
|
||||
m_vecBadWords[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using BrewMonster.Network;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public abstract class AUIDialog : MonoBehaviour
|
||||
public class AUIDialog : MonoBehaviour
|
||||
{
|
||||
protected Dictionary<int, string> m_StringTable = new Dictionary<int, string>();
|
||||
protected bool m_bShow = false;
|
||||
@@ -16,9 +18,12 @@ namespace BrewMonster.UI
|
||||
protected string m_szName;
|
||||
|
||||
private bool m_bUpdateRenderTarget = false;
|
||||
[SerializeField] TextMeshProUGUI skillNameText;
|
||||
[SerializeField] Image imageProgress;
|
||||
|
||||
public virtual void Show(bool value)
|
||||
{
|
||||
BMLogger.LogError("AUIDialog::Show() not implemented i n gameObject.SetActive = " + value);
|
||||
gameObject.SetActive(value);
|
||||
m_bShow = value;
|
||||
OnShowDialogue();
|
||||
@@ -69,13 +74,19 @@ namespace BrewMonster.UI
|
||||
m_strDataPtrName = strName;
|
||||
m_pvData = pvData;
|
||||
}
|
||||
|
||||
public TextMeshProUGUI GetSkillNameText()
|
||||
{
|
||||
return skillNameText;
|
||||
}
|
||||
|
||||
public CECGameUIMan GetGameUIMan()
|
||||
{
|
||||
return EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
}
|
||||
|
||||
public Image GetProgressImage()
|
||||
{
|
||||
return imageProgress;
|
||||
}
|
||||
public CECHostPlayer GetHostPlayer()
|
||||
{
|
||||
return EC_Game.GetGameRun().GetHostPlayer();
|
||||
@@ -267,7 +278,7 @@ namespace BrewMonster.UI
|
||||
return formatStr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public AUIManager GetAUIManager()
|
||||
{
|
||||
return m_pAUIManager;
|
||||
|
||||
@@ -19,6 +19,15 @@ namespace BrewMonster
|
||||
{
|
||||
public class DlgInstall : AUIDialog
|
||||
{
|
||||
public enum InstallMode
|
||||
{
|
||||
Enchase,
|
||||
Disenchase
|
||||
}
|
||||
|
||||
[Header("Mode")]
|
||||
[SerializeField] private InstallMode m_Mode = InstallMode.Enchase;
|
||||
|
||||
[Header("Slot First")]
|
||||
[SerializeField] private Transform m_SlotFirstParent;
|
||||
[SerializeField] private TextMeshProUGUI m_TxtFirstName;
|
||||
@@ -29,7 +38,7 @@ namespace BrewMonster
|
||||
|
||||
[Header("Buttons and Money")]
|
||||
[SerializeField] private TextMeshProUGUI m_TxtMoney;
|
||||
[SerializeField] private Button m_BtnMerge;
|
||||
[SerializeField] private Button m_BtnMergeOrReset;
|
||||
[SerializeField] private Button m_BtnCancel;
|
||||
|
||||
[SerializeField] private Sprite khung_item;
|
||||
@@ -46,9 +55,13 @@ namespace BrewMonster
|
||||
{
|
||||
base.Awake();
|
||||
RegisterDrop(m_SlotFirstParent, OnDropEquip);
|
||||
RegisterDrop(m_SlotSecondlParent, OnDropMaterial);
|
||||
RegisterClick(m_SlotFirstParent, OnClickEquipSlot);
|
||||
RegisterClick(m_SlotSecondlParent, OnClickMaterialSlot);
|
||||
|
||||
if (m_Mode == InstallMode.Enchase && m_SlotSecondlParent != null)
|
||||
{
|
||||
RegisterDrop(m_SlotSecondlParent, OnDropMaterial);
|
||||
RegisterClick(m_SlotSecondlParent, OnClickMaterialSlot);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
@@ -71,15 +84,17 @@ namespace BrewMonster
|
||||
base.OnEnable();
|
||||
//todo need to set from other class
|
||||
// SetName("Win_Enchase");
|
||||
m_BtnMerge.onClick.AddListener(OnClickedMerge);
|
||||
m_BtnMergeOrReset.onClick.AddListener(OnClickedMergeOrReset);
|
||||
m_BtnCancel.onClick.AddListener(OnClickedCancel);
|
||||
m_install_price = -1;
|
||||
if(m_SlotSecondlParent != null)
|
||||
m_SlotSecondlParent.gameObject.SetActive(m_Mode == InstallMode.Enchase);
|
||||
}
|
||||
|
||||
public override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
m_BtnMerge.onClick.RemoveListener(OnClickedMerge);
|
||||
m_BtnMergeOrReset.onClick.RemoveListener(OnClickedMergeOrReset);
|
||||
m_BtnCancel.onClick.RemoveListener(OnClickedCancel);
|
||||
}
|
||||
|
||||
@@ -151,6 +166,8 @@ namespace BrewMonster
|
||||
|
||||
private void RegisterClick(Transform target, Action<PointerEventData> callback)
|
||||
{
|
||||
if(target == null) return;
|
||||
|
||||
var trigger = target.GetComponent<EventTrigger>();
|
||||
if (trigger == null)
|
||||
trigger = target.gameObject.AddComponent<EventTrigger>();
|
||||
@@ -246,6 +263,11 @@ namespace BrewMonster
|
||||
SetInventorySlotGray(btn, true);
|
||||
|
||||
detailedItem.Freeze(true);
|
||||
|
||||
if(m_Mode == InstallMode.Disenchase)
|
||||
{
|
||||
CalculateUninstallPrice(detailedItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDropMaterial(PointerEventData eventData)
|
||||
@@ -322,6 +344,32 @@ namespace BrewMonster
|
||||
// }
|
||||
}
|
||||
|
||||
private void CalculateUninstallPrice(EC_IvtrItem equipment)
|
||||
{
|
||||
if (equipment == null || !equipment.IsEquipment())
|
||||
return;
|
||||
|
||||
EC_IvtrEquip pEquip = (EC_IvtrEquip)equipment;
|
||||
|
||||
int nAmount = 0;
|
||||
for (int i = 0; i < pEquip.GetHoleNum(); i++)
|
||||
{
|
||||
int idIten = pEquip.GetHoleItem(i);
|
||||
if (idIten <= 0)
|
||||
continue;
|
||||
|
||||
EC_IvtrStone pStone = EC_IvtrItem.CreateItem(idIten, 0, 1) as EC_IvtrStone;
|
||||
if (pStone != null)
|
||||
{
|
||||
STONE_ESSENCE pEssence = pStone.GetDBEssence();
|
||||
nAmount += pEssence.uninstall_price;
|
||||
}
|
||||
}
|
||||
|
||||
m_install_price = nAmount;
|
||||
m_TxtMoney.text = nAmount.ToString();
|
||||
}
|
||||
|
||||
private void SetInventorySlotGray(Button btn, bool gray)
|
||||
{
|
||||
if (btn == null)
|
||||
@@ -368,6 +416,11 @@ namespace BrewMonster
|
||||
m_FirstInvSlot = -1;
|
||||
m_TxtFirstName.text = "___";
|
||||
ClearSlotIcon(m_SlotFirstParent);
|
||||
if(m_Mode == InstallMode.Disenchase)
|
||||
{
|
||||
m_install_price = -1;
|
||||
m_TxtMoney.text = "0";
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearMaterialSlot()
|
||||
@@ -377,6 +430,8 @@ namespace BrewMonster
|
||||
m_SecondInvSlot = -1;
|
||||
m_TxtSecondName.text = "___";
|
||||
ClearSlotIcon(m_SlotSecondlParent);
|
||||
m_TxtMoney.text = "0";
|
||||
m_install_price = -1;
|
||||
}
|
||||
|
||||
private void ClearSlotIcon(Transform slot)
|
||||
@@ -390,117 +445,126 @@ namespace BrewMonster
|
||||
|
||||
img.sprite = khung_item;
|
||||
}
|
||||
private void OnClickedMerge()
|
||||
private void OnClickedMergeOrReset()
|
||||
{
|
||||
// PAUIDIALOG pMsgBox;
|
||||
CECHostPlayer pHost = GetHostPlayer();
|
||||
|
||||
// if( !m_pItema->GetDataPtr("ptr_CECIvtrItem") ) return;
|
||||
string message = "";
|
||||
|
||||
int nMoney = m_install_price;
|
||||
if( nMoney > pHost.GetMoneyAmount() )
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(226);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().GetDialog("")
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox->SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrItem pIvtrA = m_SelectedEquip;
|
||||
if( !pIvtrA.IsEquipment() )
|
||||
if (pHost != null || m_Mode == InstallMode.Enchase)
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(223);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(223), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrEquip pEquipA = (EC_IvtrEquip)pIvtrA;
|
||||
// a_LogOutput(1, "[Dat Embed] Send protocol here");
|
||||
// if( 0 == string.CompareOrdinal(GetName(), "Win_Enchase") )
|
||||
// {
|
||||
if( pEquipA.GetEmptyHoleNum() <= 0 )
|
||||
{
|
||||
// if( !m_pItema->GetDataPtr("ptr_CECIvtrItem") ) return;
|
||||
string message = "";
|
||||
|
||||
int nMoney = m_install_price;
|
||||
if (nMoney > pHost.GetMoneyAmount())
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(226);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().GetDialog("")
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox->SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrItem pIvtrA = m_SelectedEquip;
|
||||
if (!pIvtrA.IsEquipment())
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(223);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(223), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrEquip pEquipA = (EC_IvtrEquip)pIvtrA;
|
||||
// a_LogOutput(1, "[Dat Embed] Send protocol here");
|
||||
// if( 0 == string.CompareOrdinal(GetName(), "Win_Enchase") )
|
||||
// {
|
||||
if (pEquipA.GetEmptyHoleNum() <= 0)
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(224);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan()->GetStringFromTable(224), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrItem pIvtrB = m_SelectedMaterial;
|
||||
if(pIvtrB == null || !pIvtrB.IsEmbeddable() )
|
||||
{
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan()->GetStringFromTable(224), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
EC_IvtrItem pIvtrB = m_SelectedMaterial;
|
||||
if (pIvtrB == null || !pIvtrB.IsEmbeddable())
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(225);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(225), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
if( pIvtrB.GetClassID() != (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE)
|
||||
return;
|
||||
|
||||
int nStoneLevel = ((EC_IvtrStone)pIvtrB).GetDBEssence().level;
|
||||
int nEquipLevel = -1;
|
||||
switch( pEquipA.GetClassID() )
|
||||
{
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_WEAPON:
|
||||
nEquipLevel = ((CECIvtrWeapon)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_ARMOR:
|
||||
nEquipLevel = ((EC_IvtrArmor)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_DECORATION:
|
||||
nEquipLevel = ((EC_IvtrDecoration)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
}
|
||||
|
||||
if( nStoneLevel > nEquipLevel )
|
||||
{
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(225), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pIvtrB.GetClassID() != (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE)
|
||||
return;
|
||||
|
||||
int nStoneLevel = ((EC_IvtrStone)pIvtrB).GetDBEssence().level;
|
||||
int nEquipLevel = -1;
|
||||
switch (pEquipA.GetClassID())
|
||||
{
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_WEAPON:
|
||||
nEquipLevel = ((CECIvtrWeapon)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_ARMOR:
|
||||
nEquipLevel = ((EC_IvtrArmor)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_DECORATION:
|
||||
nEquipLevel = ((EC_IvtrDecoration)pEquipA).GetDBEssence().level;
|
||||
break;
|
||||
}
|
||||
|
||||
if (nStoneLevel > nEquipLevel)
|
||||
{
|
||||
message = GetGameUIMan().GetStringFromTable(300);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(300), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
//pr
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(300), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
return;
|
||||
}
|
||||
//pr
|
||||
UnityGameSession.c2s_CmdNPCSevEmbed(
|
||||
(ushort)m_SecondInvSlot, (ushort)m_FirstInvSlot,
|
||||
pIvtrB.GetTemplateID(), pIvtrA.GetTemplateID());
|
||||
// ClearEquipment();
|
||||
// ClearStone();
|
||||
pHost.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
|
||||
|
||||
pIvtrB.GetTemplateID(), pIvtrA.GetTemplateID());
|
||||
// ClearEquipment();
|
||||
// ClearStone();
|
||||
pHost.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
|
||||
|
||||
message = GetGameUIMan().GetStringFromTable(228);
|
||||
CECUIManager.Instance.ShowMessageBox("", message);
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(228),
|
||||
// MB_OK, A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
// }
|
||||
// else if( 0 == stricmp(GetName(), "Win_Disenchase") )
|
||||
// {
|
||||
// a_LogOutput(1, "[Dat Embed] Win_Disenchase");
|
||||
// if( pEquipA->GetEmptyHoleNum() == pEquipA->GetHoleNum() )
|
||||
// {
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(227), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox->SetLife(3);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// GetGameUIMan()->MessageBox("Game_Disenchase", GetGameUIMan()->GetStringFromTable(229),
|
||||
// MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// }
|
||||
// GetGameUIMan().MessageBox("", GetGameUIMan().GetStringFromTable(228),
|
||||
// MB_OK, A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox.SetLife(3);
|
||||
// }
|
||||
// else if( 0 == stricmp(GetName(), "Win_Disenchase") )
|
||||
// {
|
||||
// a_LogOutput(1, "[Dat Embed] Win_Disenchase");
|
||||
// if( pEquipA->GetEmptyHoleNum() == pEquipA->GetHoleNum() )
|
||||
// {
|
||||
// GetGameUIMan()->MessageBox("", GetGameUIMan()->GetStringFromTable(227), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox);
|
||||
// pMsgBox->SetLife(3);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// GetGameUIMan()->MessageBox("Game_Disenchase", GetGameUIMan()->GetStringFromTable(229),
|
||||
// MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
// }
|
||||
}
|
||||
|
||||
else if (pHost != null || m_Mode == InstallMode.Disenchase)
|
||||
{
|
||||
// TODO: implement uninstall logicq
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickedCancel()
|
||||
{
|
||||
Show(false);
|
||||
@@ -511,18 +575,21 @@ namespace BrewMonster
|
||||
RestoreInventoryColors();
|
||||
|
||||
m_SelectedEquip = null;
|
||||
m_SelectedMaterial = null;
|
||||
if (m_Mode == InstallMode.Enchase)
|
||||
{
|
||||
m_SelectedMaterial = null;
|
||||
m_SecondInvSlot = -1;
|
||||
m_TxtSecondName.text = "___";
|
||||
ClearSlotIcon(m_SlotSecondlParent);
|
||||
}
|
||||
|
||||
m_FirstInvSlot = -1;
|
||||
m_SecondInvSlot = -1;
|
||||
|
||||
m_TxtFirstName.text = "___";
|
||||
m_TxtSecondName.text = "___";
|
||||
m_TxtMoney.text = "0";
|
||||
m_install_price = -1;
|
||||
|
||||
ClearSlotIcon(m_SlotFirstParent);
|
||||
ClearSlotIcon(m_SlotSecondlParent);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -3415,8 +3415,14 @@ namespace BrewMonster.UI
|
||||
}
|
||||
else if (idFunction == (int)SERVICE_TYPE.NPC_UNINSTALL)
|
||||
{
|
||||
pShow1 = m_pAUIManager.GetDialog("Win_Disenchase");
|
||||
pShow2 = m_pAUIManager.GetDialog("Win_Inventory");
|
||||
if (pCurNPCEssence.HasValue)
|
||||
{
|
||||
uint npcID = pCurNPCEssence.Value.id;
|
||||
var dlgInstall = GetGameUIMan().GetDialog("Win_Disenchase");
|
||||
dlgInstall.Show(true);
|
||||
}
|
||||
//pShow1 = m_pAUIManager.GetDialog("Win_Disenchase");
|
||||
//pShow2 = m_pAUIManager.GetDialog("Win_Inventory");
|
||||
}
|
||||
else if (idFunction == (int)SERVICE_TYPE.NPC_HEAL)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using System;
|
||||
using System.IO;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public class CDlgPetList : AUIDialog
|
||||
{
|
||||
public const int CDLGPETLIST_SLOT_MAX = 10;
|
||||
public const int CDLGPETLIST_PAGE_MAX = 2;
|
||||
|
||||
[SerializeField] private Button[] m_pBtn_Summon = new Button[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private Button[] m_pBtn_Recall = new Button[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private Button[] m_pBtn_Detail = new Button[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private Button[] m_pBtn_Banish = new Button[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private Button[] m_pBtn_Evolution = new Button[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private Image[] m_pImg_Icon = new Image[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private TextMeshProUGUI[] m_pLab_Name = new TextMeshProUGUI[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private TextMeshProUGUI[] m_pLab_Level = new TextMeshProUGUI[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private TextMeshProUGUI[] m_pTxt_Name = new TextMeshProUGUI[CDLGPETLIST_SLOT_MAX];
|
||||
[SerializeField] private TextMeshProUGUI[] m_pTxt_Level = new TextMeshProUGUI[CDLGPETLIST_SLOT_MAX];
|
||||
int m_nPageIndex;
|
||||
|
||||
public void OnInitDialog()
|
||||
{
|
||||
//string szText = "";
|
||||
//int i;
|
||||
//for (i = 0; i < CDLGPETLIST_SLOT_MAX; i++)
|
||||
//{
|
||||
// szText = string.Format("Img_Icon{0}", i + 1);
|
||||
// m_pImg_Icon[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
// sprintf(szText, "Lab_Name%d", i + 1);
|
||||
// m_pLab_Name[i] = (PAUILABEL)GetDlgItem(szText);
|
||||
// sprintf(szText, "Lab_Level%d", i + 1);
|
||||
// m_pLab_Level[i] = (PAUILABEL)GetDlgItem(szText);
|
||||
// sprintf(szText, "Txt_Name%d", i + 1);
|
||||
// m_pTxt_Name[i] = (PAUILABEL)GetDlgItem(szText);
|
||||
// sprintf(szText, "Txt_Level%d", i + 1);
|
||||
// m_pTxt_Level[i] = (PAUILABEL)GetDlgItem(szText);
|
||||
// sprintf(szText, "Btn_Recall%d", i + 1);
|
||||
// m_pBtn_Recall[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
// sprintf(szText, "Btn_Summon%d", i + 1);
|
||||
// m_pBtn_Summon[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
// sprintf(szText, "Btn_Detail%d", i + 1);
|
||||
// m_pBtn_Detail[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
// sprintf(szText, "Btn_Banish%d", i + 1);
|
||||
// m_pBtn_Banish[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
// sprintf(szText, "Btn_P%d", i + 1);
|
||||
// m_pBtn_Evolution[i] = (PAUIIMAGEPICTURE)GetDlgItem(szText);
|
||||
//}
|
||||
//for (i = 0; i < CDLGPETLIST_PAGE_MAX; i++)
|
||||
//{
|
||||
// m_pBtn_Page[i] = NULL;
|
||||
// DDX_Control(AString().Format("Btn_Page%d", i + 1), m_pBtn_Page[i]);
|
||||
// m_pBtn_Page[i].SetPushed(false);
|
||||
//}
|
||||
//m_nPageIndex = 0;
|
||||
//m_pBtn_Page[0].SetPushed(true);
|
||||
|
||||
//return true;
|
||||
}
|
||||
|
||||
bool IsPetDye(int nSlot)
|
||||
{
|
||||
return false;
|
||||
//TO DO: fix later
|
||||
//return nSlot >= 0
|
||||
// && GetGameUIMan().m_pDlgPetDye.IsShow()
|
||||
// && GetGameUIMan().m_pDlgPetDye.GetPetSlot() == nSlot;
|
||||
}
|
||||
|
||||
void UpdateList()
|
||||
{
|
||||
string strText = "";
|
||||
CECPetCorral pPetCorral = GetHostPlayer().GetPetCorral();
|
||||
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
|
||||
DATA_TYPE DataType = new DATA_TYPE();
|
||||
int i;
|
||||
for (i = 0; i < CDLGPETLIST_SLOT_MAX; i++)
|
||||
{
|
||||
int nPetSlot = i + m_nPageIndex * CDLGPETLIST_SLOT_MAX;
|
||||
if (nPetSlot < pPetCorral.GetPetSlotNum())
|
||||
{
|
||||
m_pLab_Level[i].color = new Color(255f / 255f, 203f / 255f, 74f / 255f);
|
||||
m_pLab_Name[i].color = new Color(255f / 255f, 203f / 255f, 74f / 255f);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pLab_Level[i].color = new Color(128f / 128f, 128f / 128f, 128f / 128f);
|
||||
m_pLab_Name[i].color = new Color(128f / 128f, 128f / 128f, 128f / 128f);
|
||||
}
|
||||
CECPetData pPet = pPetCorral.GetPetData(nPetSlot);
|
||||
if (pPet != null)
|
||||
{
|
||||
bool bEnable = (pPetCorral.GetActivePetIndex() == nPetSlot && GetHostPlayer().IsOperatingPet() == 0);
|
||||
m_pBtn_Recall[i].enabled = (bEnable);
|
||||
|
||||
bEnable = (pPetCorral.GetActivePetIndex() != nPetSlot && GetHostPlayer().IsOperatingPet() == 0);
|
||||
m_pBtn_Summon[i].gameObject.SetActive(bEnable);
|
||||
|
||||
m_pBtn_Detail[i].gameObject.SetActive(true);
|
||||
|
||||
strText = string.Format(GetStringFromTable(801).Replace("%d", "{0}"), pPet.GetLevel());
|
||||
m_pTxt_Level[i].SetText(strText);
|
||||
m_pTxt_Name[i].SetText(pPet.GetName());
|
||||
if ((pPet.GetClass() == (int)GP_PET_TYPE.GP_PET_CLASS_COMBAT || pPet.GetClass() == (int)GP_PET_TYPE.GP_PET_CLASS_EVOLUTION) && pPet.GetHPFactor() == 0.0f || IsPetDye(nPetSlot))
|
||||
m_pImg_Icon[i].color = new Color(128f/ 255f, 128f / 255f, 128f / 255f);
|
||||
else
|
||||
m_pImg_Icon[i].color = new Color(255f/ 255f, 255f / 255f, 255f / 255f);
|
||||
//m_pImg_Icon[i].SetData(1);
|
||||
//m_pImg_Icon[i].SetDataPtr((void*)1);
|
||||
object pDBEssence = pDB.get_data_ptr((uint)pPet.GetTemplateID(),
|
||||
ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
|
||||
if (pDBEssence != null)
|
||||
{
|
||||
PET_ESSENCE pET = (PET_ESSENCE)pDBEssence;
|
||||
string strFile = "";
|
||||
af_GetFileTitle(pET.FileIcon,out strFile);
|
||||
strFile.ToLower();
|
||||
m_pImg_Icon[i].sprite = EC_Game.GetGameRun().GetUIManager().GetSpriteInListIvtr(strFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pImg_Icon[i].sprite = null;
|
||||
//m_pImg_Icon[i].SetHint(_AL(""));
|
||||
}
|
||||
|
||||
m_pBtn_Evolution[i].gameObject.SetActive(pPet.GetClass() == (int)GP_PET_TYPE.GP_PET_CLASS_COMBAT || pPet.GetClass() == (int)GP_PET_TYPE.GP_PET_CLASS_EVOLUTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pBtn_Summon[i].gameObject.SetActive(false);
|
||||
m_pBtn_Recall[i].gameObject.SetActive(false);
|
||||
m_pBtn_Detail[i].gameObject.SetActive(false);
|
||||
m_pBtn_Evolution[i].gameObject.SetActive(false);
|
||||
// m_pBtn_Banish[i].Enable(false);
|
||||
//m_pImg_Icon[i].SetDataPtr(NULL);
|
||||
m_pTxt_Level[i].text = "";
|
||||
m_pTxt_Name[i].text = "";
|
||||
m_pImg_Icon[i].sprite = null;
|
||||
//m_pImg_Icon[i].SetHint(_AL(""));
|
||||
//m_pImg_Icon[i].SetData(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool af_GetFileTitle(string lpszFile, out string lpszTitle)
|
||||
{
|
||||
lpszTitle = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(lpszFile))
|
||||
return lpszFile != null;
|
||||
|
||||
if (lpszFile.EndsWith("\\") || lpszFile.EndsWith("/"))
|
||||
return false;
|
||||
|
||||
lpszTitle = Path.GetFileNameWithoutExtension(lpszFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnCommandSummon(int slot)
|
||||
{
|
||||
CECPetCorral pPetCorral = GetHostPlayer().GetPetCorral();
|
||||
int nSlot = slot - 1;
|
||||
nSlot += m_nPageIndex* CDLGPETLIST_SLOT_MAX;
|
||||
|
||||
// ·ÉÐÐ-¡·Æï³Ë
|
||||
if (GetHostPlayer().GetActionSwitcher() != null && GetHostPlayer().GetActionSwitcher().OnFlyToRideAction(nSlot))
|
||||
return;
|
||||
|
||||
GetHostPlayer().SummonPet(nSlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29fc8c9fd1814f144aec0fee5da5d8a5
|
||||
@@ -45,14 +45,28 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
{
|
||||
pSC = pvData;
|
||||
}
|
||||
public void SetInteract(bool isInteract)
|
||||
{
|
||||
if (isInteract)
|
||||
{
|
||||
skillbutton.interactable = true;
|
||||
skillImage.color = Color.white;
|
||||
}
|
||||
else
|
||||
{
|
||||
skillImage.color = Color.gray;
|
||||
|
||||
skillbutton.interactable = false;
|
||||
}
|
||||
}
|
||||
public CECShortcut GetDataPtr() => pSC;
|
||||
public void Execute()
|
||||
{
|
||||
if (pSC != null)
|
||||
{
|
||||
pSC.Execute();
|
||||
|
||||
StartCoroutine(CooldownRoutine());
|
||||
|
||||
SetInteract(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -111,11 +111,13 @@ namespace BrewMonster
|
||||
{
|
||||
if (pHost.CheckSkillCastCondition(pSkill) == 0)
|
||||
{
|
||||
//pCell.SetColor(A3DCOLORRGB(255, 255, 255));
|
||||
//BMLogger.LogError("HoangDev: QuickBar Skill Not Interact: " + (uint)pSkill.GetSkillID() + " : " + ElementSkill.GetIcon((uint)pSkill.GetSkillID()));
|
||||
pCell.SetInteract(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//pCell.SetColor(A3DCOLORRGB(128, 128, 128));
|
||||
//BMLogger.LogError("HoangDev: QuickBar Skill Interact: " + (uint)pSkill.GetSkillID() + " : " + ElementSkill.GetIcon((uint)pSkill.GetSkillID()));
|
||||
pCell.SetInteract(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,428 +1,428 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork.Protocols;
|
||||
using CSNetwork.Protocols.RPCData;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Login Flow:
|
||||
/// 1. Enter username and password
|
||||
/// 2. Click login button
|
||||
/// 3. Login success, get the list of characters
|
||||
/// 4. Open the select character screen
|
||||
/// </summary>
|
||||
public class LoginScreenUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_InputField _usernameInputField;
|
||||
[SerializeField] private TMP_InputField _passwordInputField;
|
||||
[SerializeField] private Button _loginButton;
|
||||
[SerializeField] private SelecScreenCharacter _selectCharacterScreen;
|
||||
|
||||
private List<RoleInfo> _roleInfos;
|
||||
private List<RoleInfo> _currentRoles;
|
||||
private RoleInfo _pendingCreatedRole;
|
||||
private bool _loginInProgress;
|
||||
bool isDoneWorldRender = false;
|
||||
bool isDoneNPCRender = false;
|
||||
private SynchronizationContext context;
|
||||
public AudioClip loginBGM;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Ensure wrapper created early (Tech3C SDK).
|
||||
_ = Tech3CSDKWrapper.Instance;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
Tech3CSDKWrapper.Instance.SetLoginCallback(OnLoginCallback);
|
||||
Tech3CSDKWrapper.Instance.SetLogoutCallback(OnLogoutCallback);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Tech3CSDKWrapper.Instance.RemoveLoginCallback();
|
||||
Tech3CSDKWrapper.Instance.RemoveLogoutCallback();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
AudioManager.Instance.PlayBGM(loginBGM, 1.5f);
|
||||
_loginButton.onClick.AddListener(OnLoginButtonClicked);
|
||||
context = SynchronizationContext.Current;
|
||||
|
||||
// Requirement: Login UI should also have a61 loaded.
|
||||
var world = SceneManager.GetSceneByName("a61");
|
||||
if (!world.IsValid() || !world.isLoaded)
|
||||
{
|
||||
SceneManager.LoadSceneAsync("a61", LoadSceneMode.Additive);
|
||||
}
|
||||
|
||||
_usernameInputField.text = PlayerPrefs.GetString("username", "");
|
||||
_passwordInputField.text = PlayerPrefs.GetString("password", "");
|
||||
|
||||
// Default: login UI first, select-role hidden until login succeeds.
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
|
||||
ApplyLoginEntry(LogoutFlowState.ConsumeNextLoginEntry());
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (_roleInfos != null)
|
||||
{
|
||||
_selectCharacterScreen.InitScreen(_roleInfos, OnClickSelectCharacter, OnCreateCharacterComplete);
|
||||
_roleInfos = null;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetKeyUp(KeyCode.LeftAlt))
|
||||
{
|
||||
_usernameInputField.text = "test004";
|
||||
_passwordInputField.text = "123456";
|
||||
}
|
||||
|
||||
if (Input.GetKeyUp(KeyCode.Tab))
|
||||
{
|
||||
_usernameInputField.text = "test002";
|
||||
_passwordInputField.text = "123456";
|
||||
OnLoginButtonClicked();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
public async void OnLoginButtonClicked()
|
||||
{
|
||||
if (_loginInProgress)
|
||||
{
|
||||
BMLogger.LogWarning("[LoginScreenUI] Login already in progress (ignored click).");
|
||||
return;
|
||||
}
|
||||
|
||||
_loginInProgress = true;
|
||||
if (_loginButton != null) _loginButton.interactable = false;
|
||||
|
||||
// If username or password is empty, use Tech3C SDK login UI.
|
||||
if (string.IsNullOrEmpty(_usernameInputField.text) || string.IsNullOrEmpty(_passwordInputField.text))
|
||||
{
|
||||
// Use Tech3C SDK login UI.
|
||||
bool started = Tech3CSDKWrapper.Instance.Login();
|
||||
if (!started)
|
||||
{
|
||||
// Fallback: manual username/password login (useful in dev if SDK not configured).
|
||||
BMLogger.LogWarning("[LoginScreenUI] Tech3CSDKWrapper.Login() failed, fallback to manual login.");
|
||||
await BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise use manual username/password login.
|
||||
BMLogger.LogError("[LoginScreenUI] Username/password empty.");
|
||||
await BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task BeginGameLoginAsync(string username, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
BMLogger.LogError("[LoginScreenUI] Username/password empty.");
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
BMLogger.Log("OnLoginButtonClicked");
|
||||
UnityGameSession.SetConnectionInfo("103.51.120.195", 29000);
|
||||
PlayerPrefs.SetString("username", username);
|
||||
PlayerPrefs.SetString("password", password);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
BMLogger.Log($"[LoginScreenUI] Connecting+login start user='{username}'");
|
||||
await UnityGameSession.Login(username, password, OnLoginComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply how LoginScene should look after a logout flow.
|
||||
/// Call this when LoginScene is already loaded (additive) and you need to switch UI without reloading the scene.
|
||||
/// </summary>
|
||||
public void ApplyLoginEntry(BrewMonster.Network.LogoutFlowState.LoginEntryTarget entry)
|
||||
{
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
|
||||
// Always refresh fields from PlayerPrefs (LogoutAccount clears them).
|
||||
if (_usernameInputField != null) _usernameInputField.text = PlayerPrefs.GetString("username", "");
|
||||
if (_passwordInputField != null) _passwordInputField.text = PlayerPrefs.GetString("password", "");
|
||||
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
|
||||
if (entry == BrewMonster.Network.LogoutFlowState.LoginEntryTarget.SelectRole)
|
||||
{
|
||||
// Auto-login to reach Select Role like the original client, without showing Tech3C auth UI again.
|
||||
if (!string.IsNullOrEmpty(_usernameInputField.text) && !string.IsNullOrEmpty(_passwordInputField.text))
|
||||
{
|
||||
BMLogger.Log("[LoginScreenUI] Auto-login triggered (return-to-select-role).");
|
||||
_loginInProgress = true;
|
||||
if (_loginButton != null) _loginButton.interactable = false;
|
||||
_ = BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when the login is complete.
|
||||
/// Then get the list of characters
|
||||
/// </summary>
|
||||
private void OnLoginComplete(bool result)
|
||||
{
|
||||
BMLogger.Log($"[LoginScreenUI] OnLoginComplete result={result}");
|
||||
if (!result)
|
||||
{
|
||||
BMLogger.LogError("Login failed");
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(true);
|
||||
UnityGameSession.GetRoleListAsync(OnGetRoleListComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when the list of characters is retrieved.
|
||||
/// Then move to the select character screen
|
||||
/// </summary>
|
||||
private void OnGetRoleListComplete(List<RoleInfo> roleInfos)
|
||||
{
|
||||
if (roleInfos == null)
|
||||
{
|
||||
BMLogger.LogError("OnGetRoleListComplete: roleInfos is null");
|
||||
// Keep whatever is currently shown; don't overwrite UI state with null.
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Merge pending created role in case backend list hasn't updated yet.
|
||||
if (_pendingCreatedRole != null)
|
||||
{
|
||||
bool exists = false;
|
||||
for (int i = 0; i < roleInfos.Count; i++)
|
||||
{
|
||||
if (roleInfos[i].roleid == _pendingCreatedRole.roleid)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
// Copy list so we don't mutate a list owned elsewhere.
|
||||
var merged = new List<RoleInfo>(roleInfos.Count + 1);
|
||||
merged.AddRange(roleInfos);
|
||||
merged.Add(_pendingCreatedRole);
|
||||
roleInfos = merged;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Backend now includes the role; clear pending.
|
||||
_pendingCreatedRole = null;
|
||||
}
|
||||
}
|
||||
|
||||
BMLogger.Log($"OnGetRoleListComplete: roles={roleInfos.Count}");
|
||||
_roleInfos = roleInfos;
|
||||
_currentRoles = roleInfos;
|
||||
|
||||
// Login flow finished; keep login button disabled (origin-like) once you're at select role.
|
||||
_loginInProgress = false;
|
||||
}
|
||||
|
||||
private void OnClickSelectCharacter(RoleInfo roleInfo)
|
||||
{
|
||||
UnityGameSession.SelectRoleAsync(roleInfo, OnSelectRoleComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when a new character is created.
|
||||
/// Refreshes the role list and keeps the character selection screen visible.
|
||||
/// </summary>
|
||||
private void OnCreateCharacterComplete(RoleInfo createdRole)
|
||||
{
|
||||
BMLogger.Log("Character created, refreshing role list...");
|
||||
if (_selectCharacterScreen != null)
|
||||
{
|
||||
_selectCharacterScreen.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
// Ensure the newly created role is visible immediately even if the server role list
|
||||
// hasn't updated yet.
|
||||
if (createdRole != null)
|
||||
{
|
||||
_pendingCreatedRole = createdRole;
|
||||
if (_currentRoles == null)
|
||||
{
|
||||
_currentRoles = new List<RoleInfo>();
|
||||
}
|
||||
|
||||
bool exists = false;
|
||||
for (int i = 0; i < _currentRoles.Count; i++)
|
||||
{
|
||||
if (_currentRoles[i].roleid == createdRole.roleid)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
_currentRoles.Add(createdRole);
|
||||
}
|
||||
|
||||
_roleInfos = _currentRoles;
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError("OnCreateCharacterComplete: createdRole is null (create-role callback returned null)");
|
||||
}
|
||||
|
||||
// NOTE:
|
||||
// Immediately requesting the role list after create has been observed to disconnect
|
||||
// in some server builds. We rely on the createdRole callback to update UI instantly.
|
||||
// A server sync can be done later (e.g., next time you open this screen / re-login).
|
||||
}
|
||||
|
||||
private void OnSelectRoleComplete(RoleInfo roleInfo)
|
||||
{
|
||||
context.Post(_ =>
|
||||
{
|
||||
isDoneWorldRender = false;
|
||||
isDoneNPCRender = false;
|
||||
Action actLoadChar = () =>
|
||||
{
|
||||
if (!isDoneNPCRender || !isDoneWorldRender)
|
||||
{
|
||||
return;
|
||||
}
|
||||
};
|
||||
SceneLoader.SceneLoadProcess = SceneLoadProcess.Loading;
|
||||
SceneLoader.LoadingProgress = 0;
|
||||
LoadingSceneController.Instance.ShowLoadingScene(true);
|
||||
#if TESTFAST
|
||||
string nameScene = "LoginScene";
|
||||
SceneManager.UnloadSceneAsync(nameScene);
|
||||
isDoneNPCRender = true;
|
||||
isDoneWorldRender = true;
|
||||
actLoadChar?.Invoke();
|
||||
UnityGameSession.EnterWorldAsync(roleInfo, OnEnterWorldComplete);
|
||||
#else
|
||||
string nameScene = "NPCRender";
|
||||
UnityGameSession.Instance.LoadScene(nameScene, LoadSceneMode.Single, (value) =>
|
||||
{
|
||||
isDoneNPCRender = value;
|
||||
actLoadChar?.Invoke();
|
||||
});
|
||||
nameScene = "a61";
|
||||
UnityGameSession.Instance.LoadScene(nameScene, LoadSceneMode.Additive, (value) =>
|
||||
{
|
||||
isDoneWorldRender = value;
|
||||
actLoadChar?.Invoke();
|
||||
UnityGameSession.EnterWorldAsync(roleInfo, OnEnterWorldComplete);
|
||||
|
||||
});
|
||||
#endif
|
||||
}, null);
|
||||
}
|
||||
|
||||
private async void OnEnterWorldComplete()
|
||||
{
|
||||
await Task.Delay(2000);
|
||||
// Request all known packages: 0=Inventory,1=Equipment,2=Task
|
||||
UnityGameSession.RequestAllInventoriesAsync(() => { /*BMLogger.Log("Sent Inventory Detail Requests (all packs)");*/ }, 0, 1, 2);
|
||||
await Task.Delay(1000);
|
||||
UnityGameSession.RequestCheckSecurityPassWd("");
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
|
||||
//private void OnInventoryReceived(List<InventoryItem> inventoryData)
|
||||
//{
|
||||
// _inventoryUI.DisplayInventory(inventoryData);
|
||||
//}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnValidate()
|
||||
{
|
||||
if (_usernameInputField == null)
|
||||
{
|
||||
// find childrend with name "username"
|
||||
_usernameInputField = transform.Find("username").GetComponent<TMP_InputField>();
|
||||
}
|
||||
|
||||
if (_passwordInputField == null)
|
||||
{
|
||||
// find childrend with name "password"
|
||||
_passwordInputField = transform.Find("password").GetComponent<TMP_InputField>();
|
||||
}
|
||||
|
||||
if (_loginButton == null)
|
||||
{
|
||||
// find childrend with name "LoginBtn"
|
||||
_loginButton = transform.Find("LoginBtn").GetComponent<Button>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private async void OnLoginCallback(int errorCode, string userId, string password)
|
||||
{
|
||||
if (errorCode == 0)
|
||||
{
|
||||
BMLogger.Log($"Login success -- userId: {userId} - {password}");
|
||||
// UnityGameSession.SetConnectionInfo("103.182.22.52", 29000);
|
||||
UnityGameSession.SetConnectionInfo("103.51.120.195", 29000);
|
||||
PlayerPrefs.SetString("username", userId);
|
||||
PlayerPrefs.SetString("password", password);
|
||||
PlayerPrefs.Save();
|
||||
await BeginGameLoginAsync(userId, password);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if it failed, the userId will be the error message
|
||||
BMLogger.LogError($"Login failed -- errorCode: {errorCode}: {userId}");
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLogoutCallback(int errorCode, string errorMessage)
|
||||
{
|
||||
if (errorCode == 0)
|
||||
{
|
||||
BMLogger.Log("Logout success");
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError($"Logout failed -- errorCode: {errorCode}: {errorMessage}");
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork.Protocols;
|
||||
using CSNetwork.Protocols.RPCData;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Login Flow:
|
||||
/// 1. Enter username and password
|
||||
/// 2. Click login button
|
||||
/// 3. Login success, get the list of characters
|
||||
/// 4. Open the select character screen
|
||||
/// </summary>
|
||||
public class LoginScreenUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_InputField _usernameInputField;
|
||||
[SerializeField] private TMP_InputField _passwordInputField;
|
||||
[SerializeField] private Button _loginButton;
|
||||
[SerializeField] private SelecScreenCharacter _selectCharacterScreen;
|
||||
|
||||
private List<RoleInfo> _roleInfos;
|
||||
private List<RoleInfo> _currentRoles;
|
||||
private RoleInfo _pendingCreatedRole;
|
||||
private bool _loginInProgress;
|
||||
bool isDoneWorldRender = false;
|
||||
bool isDoneNPCRender = false;
|
||||
private SynchronizationContext context;
|
||||
public AudioClip loginBGM;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Ensure wrapper created early (Tech3C SDK).
|
||||
_ = Tech3CSDKWrapper.Instance;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
Tech3CSDKWrapper.Instance.SetLoginCallback(OnLoginCallback);
|
||||
Tech3CSDKWrapper.Instance.SetLogoutCallback(OnLogoutCallback);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Tech3CSDKWrapper.Instance.RemoveLoginCallback();
|
||||
Tech3CSDKWrapper.Instance.RemoveLogoutCallback();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
AudioManager.Instance.PlayBGM(loginBGM, 1.5f);
|
||||
_loginButton.onClick.AddListener(OnLoginButtonClicked);
|
||||
context = SynchronizationContext.Current;
|
||||
|
||||
// Requirement: Login UI should also have a61 loaded.
|
||||
var world = SceneManager.GetSceneByName("a61");
|
||||
if (!world.IsValid() || !world.isLoaded)
|
||||
{
|
||||
SceneManager.LoadSceneAsync("a61", LoadSceneMode.Additive);
|
||||
}
|
||||
|
||||
_usernameInputField.text = PlayerPrefs.GetString("username", "");
|
||||
_passwordInputField.text = PlayerPrefs.GetString("password", "");
|
||||
|
||||
// Default: login UI first, select-role hidden until login succeeds.
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
|
||||
ApplyLoginEntry(LogoutFlowState.ConsumeNextLoginEntry());
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (_roleInfos != null)
|
||||
{
|
||||
_selectCharacterScreen.InitScreen(_roleInfos, OnClickSelectCharacter, OnCreateCharacterComplete);
|
||||
_roleInfos = null;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetKeyUp(KeyCode.LeftAlt))
|
||||
{
|
||||
_usernameInputField.text = "test004";
|
||||
_passwordInputField.text = "123456";
|
||||
}
|
||||
|
||||
if (Input.GetKeyUp(KeyCode.Tab))
|
||||
{
|
||||
_usernameInputField.text = "test002";
|
||||
_passwordInputField.text = "123456";
|
||||
OnLoginButtonClicked();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
public async void OnLoginButtonClicked()
|
||||
{
|
||||
if (_loginInProgress)
|
||||
{
|
||||
BMLogger.LogWarning("[LoginScreenUI] Login already in progress (ignored click).");
|
||||
return;
|
||||
}
|
||||
|
||||
_loginInProgress = true;
|
||||
if (_loginButton != null) _loginButton.interactable = false;
|
||||
|
||||
// If username or password is empty, use Tech3C SDK login UI.
|
||||
if (string.IsNullOrEmpty(_usernameInputField.text) || string.IsNullOrEmpty(_passwordInputField.text))
|
||||
{
|
||||
// Use Tech3C SDK login UI.
|
||||
bool started = Tech3CSDKWrapper.Instance.Login();
|
||||
if (!started)
|
||||
{
|
||||
// Fallback: manual username/password login (useful in dev if SDK not configured).
|
||||
BMLogger.LogWarning("[LoginScreenUI] Tech3CSDKWrapper.Login() failed, fallback to manual login.");
|
||||
await BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise use manual username/password login.
|
||||
BMLogger.LogError("[LoginScreenUI] Username/password empty.");
|
||||
await BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task BeginGameLoginAsync(string username, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
BMLogger.LogError("[LoginScreenUI] Username/password empty.");
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
BMLogger.Log("OnLoginButtonClicked");
|
||||
UnityGameSession.SetConnectionInfo("103.51.120.195", 29000);
|
||||
PlayerPrefs.SetString("username", username);
|
||||
PlayerPrefs.SetString("password", password);
|
||||
PlayerPrefs.Save();
|
||||
|
||||
BMLogger.Log($"[LoginScreenUI] Connecting+login start user='{username}'");
|
||||
await UnityGameSession.Login(username, password, OnLoginComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply how LoginScene should look after a logout flow.
|
||||
/// Call this when LoginScene is already loaded (additive) and you need to switch UI without reloading the scene.
|
||||
/// </summary>
|
||||
public void ApplyLoginEntry(BrewMonster.Network.LogoutFlowState.LoginEntryTarget entry)
|
||||
{
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
|
||||
// Always refresh fields from PlayerPrefs (LogoutAccount clears them).
|
||||
if (_usernameInputField != null) _usernameInputField.text = PlayerPrefs.GetString("username", "");
|
||||
if (_passwordInputField != null) _passwordInputField.text = PlayerPrefs.GetString("password", "");
|
||||
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
|
||||
if (entry == BrewMonster.Network.LogoutFlowState.LoginEntryTarget.SelectRole)
|
||||
{
|
||||
// Auto-login to reach Select Role like the original client, without showing Tech3C auth UI again.
|
||||
if (!string.IsNullOrEmpty(_usernameInputField.text) && !string.IsNullOrEmpty(_passwordInputField.text))
|
||||
{
|
||||
BMLogger.Log("[LoginScreenUI] Auto-login triggered (return-to-select-role).");
|
||||
_loginInProgress = true;
|
||||
if (_loginButton != null) _loginButton.interactable = false;
|
||||
_ = BeginGameLoginAsync(_usernameInputField.text, _passwordInputField.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when the login is complete.
|
||||
/// Then get the list of characters
|
||||
/// </summary>
|
||||
private void OnLoginComplete(bool result)
|
||||
{
|
||||
BMLogger.Log($"[LoginScreenUI] OnLoginComplete result={result}");
|
||||
if (!result)
|
||||
{
|
||||
BMLogger.LogError("Login failed");
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(false);
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_selectCharacterScreen != null)
|
||||
_selectCharacterScreen.gameObject.SetActive(true);
|
||||
UnityGameSession.GetRoleListAsync(OnGetRoleListComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when the list of characters is retrieved.
|
||||
/// Then move to the select character screen
|
||||
/// </summary>
|
||||
private void OnGetRoleListComplete(List<RoleInfo> roleInfos)
|
||||
{
|
||||
if (roleInfos == null)
|
||||
{
|
||||
BMLogger.LogError("OnGetRoleListComplete: roleInfos is null");
|
||||
// Keep whatever is currently shown; don't overwrite UI state with null.
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Merge pending created role in case backend list hasn't updated yet.
|
||||
if (_pendingCreatedRole != null)
|
||||
{
|
||||
bool exists = false;
|
||||
for (int i = 0; i < roleInfos.Count; i++)
|
||||
{
|
||||
if (roleInfos[i].roleid == _pendingCreatedRole.roleid)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
// Copy list so we don't mutate a list owned elsewhere.
|
||||
var merged = new List<RoleInfo>(roleInfos.Count + 1);
|
||||
merged.AddRange(roleInfos);
|
||||
merged.Add(_pendingCreatedRole);
|
||||
roleInfos = merged;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Backend now includes the role; clear pending.
|
||||
_pendingCreatedRole = null;
|
||||
}
|
||||
}
|
||||
|
||||
BMLogger.Log($"OnGetRoleListComplete: roles={roleInfos.Count}");
|
||||
_roleInfos = roleInfos;
|
||||
_currentRoles = roleInfos;
|
||||
|
||||
// Login flow finished; keep login button disabled (origin-like) once you're at select role.
|
||||
_loginInProgress = false;
|
||||
}
|
||||
|
||||
private void OnClickSelectCharacter(RoleInfo roleInfo)
|
||||
{
|
||||
UnityGameSession.SelectRoleAsync(roleInfo, OnSelectRoleComplete);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Callback when a new character is created.
|
||||
/// Refreshes the role list and keeps the character selection screen visible.
|
||||
/// </summary>
|
||||
private void OnCreateCharacterComplete(RoleInfo createdRole)
|
||||
{
|
||||
BMLogger.Log("Character created, refreshing role list...");
|
||||
if (_selectCharacterScreen != null)
|
||||
{
|
||||
_selectCharacterScreen.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
// Ensure the newly created role is visible immediately even if the server role list
|
||||
// hasn't updated yet.
|
||||
if (createdRole != null)
|
||||
{
|
||||
_pendingCreatedRole = createdRole;
|
||||
if (_currentRoles == null)
|
||||
{
|
||||
_currentRoles = new List<RoleInfo>();
|
||||
}
|
||||
|
||||
bool exists = false;
|
||||
for (int i = 0; i < _currentRoles.Count; i++)
|
||||
{
|
||||
if (_currentRoles[i].roleid == createdRole.roleid)
|
||||
{
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
_currentRoles.Add(createdRole);
|
||||
}
|
||||
|
||||
_roleInfos = _currentRoles;
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError("OnCreateCharacterComplete: createdRole is null (create-role callback returned null)");
|
||||
}
|
||||
|
||||
// NOTE:
|
||||
// Immediately requesting the role list after create has been observed to disconnect
|
||||
// in some server builds. We rely on the createdRole callback to update UI instantly.
|
||||
// A server sync can be done later (e.g., next time you open this screen / re-login).
|
||||
}
|
||||
|
||||
private void OnSelectRoleComplete(RoleInfo roleInfo)
|
||||
{
|
||||
context.Post(_ =>
|
||||
{
|
||||
isDoneWorldRender = false;
|
||||
isDoneNPCRender = false;
|
||||
Action actLoadChar = () =>
|
||||
{
|
||||
if (!isDoneNPCRender || !isDoneWorldRender)
|
||||
{
|
||||
return;
|
||||
}
|
||||
};
|
||||
SceneLoader.SceneLoadProcess = SceneLoadProcess.Loading;
|
||||
SceneLoader.LoadingProgress = 0;
|
||||
LoadingSceneController.Instance.ShowLoadingScene(true);
|
||||
#if TESTFAST
|
||||
string nameScene = "LoginScene";
|
||||
SceneManager.UnloadSceneAsync(nameScene);
|
||||
isDoneNPCRender = true;
|
||||
isDoneWorldRender = true;
|
||||
actLoadChar?.Invoke();
|
||||
UnityGameSession.EnterWorldAsync(roleInfo, OnEnterWorldComplete);
|
||||
#else
|
||||
string nameScene = "NPCRender";
|
||||
UnityGameSession.Instance.LoadScene(nameScene, LoadSceneMode.Single, (value) =>
|
||||
{
|
||||
isDoneNPCRender = value;
|
||||
actLoadChar?.Invoke();
|
||||
});
|
||||
nameScene = "a61";
|
||||
UnityGameSession.Instance.LoadScene(nameScene, LoadSceneMode.Additive, (value) =>
|
||||
{
|
||||
isDoneWorldRender = value;
|
||||
actLoadChar?.Invoke();
|
||||
UnityGameSession.EnterWorldAsync(roleInfo, OnEnterWorldComplete);
|
||||
|
||||
});
|
||||
#endif
|
||||
}, null);
|
||||
}
|
||||
|
||||
private async void OnEnterWorldComplete()
|
||||
{
|
||||
await Task.Delay(2000);
|
||||
// Request all known packages: 0=Inventory,1=Equipment,2=Task
|
||||
UnityGameSession.RequestAllInventoriesAsync(() => { /*BMLogger.Log("Sent Inventory Detail Requests (all packs)");*/ }, 0, 1, 2);
|
||||
await Task.Delay(1000);
|
||||
UnityGameSession.RequestCheckSecurityPassWd("");
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
|
||||
//private void OnInventoryReceived(List<InventoryItem> inventoryData)
|
||||
//{
|
||||
// _inventoryUI.DisplayInventory(inventoryData);
|
||||
//}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnValidate()
|
||||
{
|
||||
if (_usernameInputField == null)
|
||||
{
|
||||
// find childrend with name "username"
|
||||
_usernameInputField = transform.Find("username").GetComponent<TMP_InputField>();
|
||||
}
|
||||
|
||||
if (_passwordInputField == null)
|
||||
{
|
||||
// find childrend with name "password"
|
||||
_passwordInputField = transform.Find("password").GetComponent<TMP_InputField>();
|
||||
}
|
||||
|
||||
if (_loginButton == null)
|
||||
{
|
||||
// find childrend with name "LoginBtn"
|
||||
_loginButton = transform.Find("LoginBtn").GetComponent<Button>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private async void OnLoginCallback(int errorCode, string userId, string password)
|
||||
{
|
||||
if (errorCode == 0)
|
||||
{
|
||||
BMLogger.Log($"Login success -- userId: {userId} - {password}");
|
||||
// UnityGameSession.SetConnectionInfo("103.182.22.52", 29000);
|
||||
UnityGameSession.SetConnectionInfo("103.51.120.195", 29000);
|
||||
PlayerPrefs.SetString("username", userId);
|
||||
PlayerPrefs.SetString("password", password);
|
||||
PlayerPrefs.Save();
|
||||
await BeginGameLoginAsync(userId, password);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if it failed, the userId will be the error message
|
||||
BMLogger.LogError($"Login failed -- errorCode: {errorCode}: {userId}");
|
||||
_loginInProgress = false;
|
||||
if (_loginButton != null) _loginButton.interactable = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLogoutCallback(int errorCode, string errorMessage)
|
||||
{
|
||||
if (errorCode == 0)
|
||||
{
|
||||
BMLogger.Log("Logout success");
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError($"Logout failed -- errorCode: {errorCode}: {errorMessage}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.UI;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class CDlgHost : MonoBehaviour
|
||||
{
|
||||
private void Update()
|
||||
{
|
||||
RefreshStatusBar();
|
||||
}
|
||||
public void RefreshStatusBar()
|
||||
{
|
||||
bool bShow = false;
|
||||
bool bActive = true;
|
||||
|
||||
|
||||
bShow |= RefreshIncantBar(bShow, bActive);
|
||||
}
|
||||
public bool RefreshIncantBar(bool bOtherShown, bool bActive)
|
||||
{
|
||||
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
|
||||
if(pHost == null) return false;
|
||||
CECSkill pCurSkill = pHost.GetCurSkill();
|
||||
bool bShow = false;
|
||||
float nCur = 1;
|
||||
float nMax = 1;
|
||||
|
||||
AUIDialog pDlg = CECUIManager.Instance.GetInGameUIMan().GetDialog("MagicProgress1");
|
||||
if (!bOtherShown)
|
||||
{
|
||||
uint dwCurTime = 0, dwMaxTime = 0;
|
||||
if(pCurSkill != null)
|
||||
BMLogger.LogError($"CDlgHost::pHost.IsSpellingMagic()={pHost.IsSpellingMagic()} ; pCurSkill != null{pCurSkill != null}");
|
||||
|
||||
if (false/*pHost.GetUsingItemTimeCnt(dwCurTime, dwMaxTime)*/)
|
||||
{
|
||||
/* bShow = true;
|
||||
nCur = dwCurTime;
|
||||
nMax = dwMaxTime;
|
||||
pDlg->GetDlgItem("Txt")->SetText(pHost->IsGatheringMonsterSpirit() ?
|
||||
GetStringFromTable(738) : GetStringFromTable(726));*/
|
||||
}
|
||||
/*else if (pHost->IsOperatingPet())
|
||||
{
|
||||
bShow = true;
|
||||
nCur = pHost->GetPetOptTime().GetCounter();
|
||||
nMax = max(pHost->GetPetOptTime().GetPeriod(), 1);
|
||||
switch (pHost->IsOperatingPet())
|
||||
{
|
||||
case 1:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(791));
|
||||
break;
|
||||
case 2:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(792));
|
||||
break;
|
||||
case 3:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(793));
|
||||
break;
|
||||
case 4:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(794));
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
else if (pHost.IsSpellingMagic() && pCurSkill != null)
|
||||
{
|
||||
BMLogger.LogError("CDlgHost::RefreshIncantBar - IsSpellingMagic");
|
||||
bShow = true;
|
||||
CECCounter counter = pHost.GetIncantCnt();
|
||||
nCur = counter.GetCounter();
|
||||
nMax = Mathf.Max(counter.GetPeriod(), 1);
|
||||
BMLogger.LogError($"CDlgHost::RefreshIncantBar - nCur=" + nCur + $"nMax={nMax} counter.GetPeriod()={counter.GetPeriod()} ");
|
||||
|
||||
pDlg.GetSkillNameText().text = (EC_Game.GetSkillDesc().GetWideString(pCurSkill.GetSkillID() * 10));
|
||||
BMLogger.LogError("CDlgHost:: = (nCur / nMax)=" + (nCur / nMax));
|
||||
BMLogger.LogError("CDlgHost::bShow =" + bShow);
|
||||
}
|
||||
/* else if (pHost.IsCongregating())
|
||||
{
|
||||
bShow = true;
|
||||
CECCounter counter = pHost->GetCongregateCnt();
|
||||
nCur = counter.GetCounter();
|
||||
nMax = max(counter.GetPeriod(), 1);
|
||||
|
||||
int conType = pHost->IsCongregating() - 1;
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(5700 + conType));
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
if (bShow)
|
||||
{
|
||||
if (!pDlg.IsShow())
|
||||
{
|
||||
BMLogger.LogError("CDlgHost::bShowbShow");
|
||||
pDlg.Show(true);
|
||||
}
|
||||
pDlg.GetProgressImage().fillAmount = (nCur / nMax);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pDlg.IsShow())
|
||||
{
|
||||
pDlg.Show(false);
|
||||
BMLogger.LogError("CDlgHost::bShowbShow not");
|
||||
}
|
||||
}
|
||||
|
||||
return bShow;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01a97b889c107814eb3c4957c683c0b4
|
||||
@@ -7,5 +7,7 @@ namespace BrewMonster
|
||||
public static string MonsterPrefab = "Monster/MonsterPrefab";
|
||||
public static string NpcServerPrefab = "NPC/NPCServer";
|
||||
public static string TestVfxPrefab = "Prefabs/Vfx/TestVfx";
|
||||
public static string PetServerPrefab = "Pet/PetPrefab";
|
||||
public static string PetMountServerPrefab = "Pet/PetMount/PetMountPrefab";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,5 +84,14 @@ namespace BrewMonster.Scripts.World
|
||||
public CECAssureMove GetAssureMove()
|
||||
{ return m_pAssureMove; }
|
||||
|
||||
public CECNPCMan GetNPCMan()
|
||||
{
|
||||
return EC_ManMessageMono.Instance.CECNPCMan;
|
||||
}
|
||||
|
||||
public EC_ManPlayer GetPlayerMan()
|
||||
{
|
||||
return EC_ManMessageMono.Instance.GetECManPlayer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4583e4d6b554a347a8d1c41a44329cb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 647d1810bb3e6e34e98b52167adec474
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4fe7da8fd51d3b84a83ab91ccaeeba22
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -278,7 +278,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 111.435, y: -208.8725}
|
||||
m_AnchoredPosition: {x: 111.435, y: -104}
|
||||
m_SizeDelta: {x: 222.87, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4686984658772048795
|
||||
@@ -1310,6 +1310,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 6395384702497515303}
|
||||
- component: {fileID: 4626820858437392146}
|
||||
- component: {fileID: 6518038562375032181}
|
||||
m_Layer: 0
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
@@ -1338,7 +1339,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 12.77005, y: 0}
|
||||
m_SizeDelta: {x: -25.5402, y: 444}
|
||||
m_SizeDelta: {x: -25.5402, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &4626820858437392146
|
||||
MonoBehaviour:
|
||||
@@ -1366,6 +1367,20 @@ MonoBehaviour:
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &6518038562375032181
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5950145441460419131}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &6045141722073505390
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -10569,12 +10569,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 0785d9ccbdc425a44b6ae1f4a3afad06, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Mode: 0
|
||||
m_SlotFirstParent: {fileID: 5489844476385409289}
|
||||
m_TxtFirstName: {fileID: 3128721472606901163}
|
||||
m_SlotSecondlParent: {fileID: 7151360590639773519}
|
||||
m_TxtSecondName: {fileID: 4492084240745408081}
|
||||
m_TxtMoney: {fileID: 6140428454487430115}
|
||||
m_BtnMerge: {fileID: 8208092408021918524}
|
||||
m_BtnMergeOrReset: {fileID: 8208092408021918524}
|
||||
m_BtnCancel: {fileID: 4503836757578509720}
|
||||
khung_item: {fileID: 21300000, guid: a5366f3bce011c046902e39b6bd3a077, type: 3}
|
||||
itemInventoryRoot: {fileID: 7750009739432212686}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a7317ed1e4ea3c478057319c0b8fee2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,341 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1126053271199039253
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3062421795583818898}
|
||||
- component: {fileID: 7778085681912340288}
|
||||
m_Layer: 0
|
||||
m_Name: MagicProgress1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &3062421795583818898
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1126053271199039253}
|
||||
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: 1925327431716214704}
|
||||
- {fileID: 7830969636268911684}
|
||||
- {fileID: 529978810702632783}
|
||||
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 &7778085681912340288
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1126053271199039253}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 923726bcb1a5625448a832da43198b7e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 4156282290771635373}
|
||||
imageProgress: {fileID: 7818904766065936941}
|
||||
--- !u!1 &1961198748621413970
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 529978810702632783}
|
||||
- component: {fileID: 4135657131716260047}
|
||||
- component: {fileID: 4156282290771635373}
|
||||
m_Layer: 0
|
||||
m_Name: TextSkill
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &529978810702632783
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1961198748621413970}
|
||||
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: 3062421795583818898}
|
||||
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: -243}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4135657131716260047
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1961198748621413970}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4156282290771635373
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1961198748621413970}
|
||||
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: New Text
|
||||
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: 4278190080
|
||||
m_fontColor: {r: 0, g: 0, b: 0, 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: 36
|
||||
m_fontSizeBase: 36
|
||||
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: 0
|
||||
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 &4998799320591488598
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1925327431716214704}
|
||||
- component: {fileID: 1461720454802408635}
|
||||
- component: {fileID: 1049556297056300177}
|
||||
m_Layer: 0
|
||||
m_Name: ImageProgressBG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1925327431716214704
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4998799320591488598}
|
||||
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: 3062421795583818898}
|
||||
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: 5.7217, y: -241.83194}
|
||||
m_SizeDelta: {x: 467.6988, y: 42.6811}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1461720454802408635
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4998799320591488598}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1049556297056300177
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4998799320591488598}
|
||||
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: 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 &7916616395362301942
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7830969636268911684}
|
||||
- component: {fileID: 6823947204623957556}
|
||||
- component: {fileID: 7818904766065936941}
|
||||
m_Layer: 0
|
||||
m_Name: ImageProgress
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7830969636268911684
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7916616395362301942}
|
||||
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: 3062421795583818898}
|
||||
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: 5.7217, y: -241.83194}
|
||||
m_SizeDelta: {x: 467.6988, y: 42.6811}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6823947204623957556
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7916616395362301942}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7818904766065936941
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7916616395362301942}
|
||||
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: f9b44a2d0c26740aa9dafa84b0170f15, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 526d462bd8c87b74c9e461e80d028cb2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e60664ecfa15d53418417d459aa62c43
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6215a9ef4d7c54745a7b2cd1c9abbb20
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,663 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &164948012591737058
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5858885448622382372}
|
||||
- component: {fileID: 5356316877795769474}
|
||||
- component: {fileID: 7174288820249738816}
|
||||
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 &5858885448622382372
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164948012591737058}
|
||||
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: 5701142192473136576}
|
||||
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 &5356316877795769474
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164948012591737058}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7174288820249738816
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 164948012591737058}
|
||||
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: 100
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 31b77628c21b17e45a6577a3d3d5aef0, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 0.15
|
||||
m_fontSizeBase: 0.15
|
||||
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: 0
|
||||
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.053617537, 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 &639983105941244537
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7685260359916536611}
|
||||
- component: {fileID: 4195826148388370010}
|
||||
- component: {fileID: 2285106042110813528}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)_Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7685260359916536611
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 639983105941244537}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.07000001}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5270926106539954932}
|
||||
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.0000000060535967, y: 1.9189999}
|
||||
m_SizeDelta: {x: 1, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4195826148388370010
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 639983105941244537}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2285106042110813528
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 639983105941244537}
|
||||
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: Hoang
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 13f71bf0225d0c0439db9931000d75d0, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 0.25
|
||||
m_fontSizeBase: 0.25
|
||||
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: 0
|
||||
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 &1552002170013068272
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8743242111345623161}
|
||||
- component: {fileID: 4369294930906049240}
|
||||
- component: {fileID: 6623776862428876602}
|
||||
m_Layer: 0
|
||||
m_Name: PetMountPrefab
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8743242111345623161
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1552002170013068272}
|
||||
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: 4817336479570982655}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4369294930906049240
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1552002170013068272}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8c7b669b45068cf469ae3116991b9026, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
namedAnimancer: {fileID: 0}
|
||||
animName1:
|
||||
--- !u!136 &6623776862428876602
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1552002170013068272}
|
||||
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: 2
|
||||
m_Radius: 0.8
|
||||
m_Height: 1
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 1, z: 0}
|
||||
--- !u!1 &4008253373347136617
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 447810615664942995}
|
||||
- component: {fileID: 6315391388879006928}
|
||||
- component: {fileID: 5673963502904499965}
|
||||
m_Layer: 5
|
||||
m_Name: HealthUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &447810615664942995
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4008253373347136617}
|
||||
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: 5701142192473136576}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1, y: 0.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6315391388879006928
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4008253373347136617}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5673963502904499965
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4008253373347136617}
|
||||
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: -637874507, guid: 9ef86922851818c4e9e58040f51c491f, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4211558982085046049
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5270926106539954932}
|
||||
- component: {fileID: 2326816755922096461}
|
||||
- component: {fileID: 814224305727190302}
|
||||
- component: {fileID: 6519371424135013503}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5270926106539954932
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4211558982085046049}
|
||||
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: 7685260359916536611}
|
||||
- {fileID: 5701142192473136576}
|
||||
m_Father: {fileID: 4817336479570982655}
|
||||
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_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &2326816755922096461
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4211558982085046049}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &814224305727190302
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4211558982085046049}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 1
|
||||
--- !u!114 &6519371424135013503
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4211558982085046049}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &7411326708969747318
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4817336479570982655}
|
||||
- component: {fileID: 623488520321375200}
|
||||
- component: {fileID: 7635475614995666769}
|
||||
m_Layer: 0
|
||||
m_Name: UIPlayer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4817336479570982655
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7411326708969747318}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.026024496, y: 0.5726356, z: -0.0181917, w: 0.8191949}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5270926106539954932}
|
||||
m_Father: {fileID: 8743242111345623161}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &623488520321375200
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7411326708969747318}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8bc4ae2a8436a6947aa8792f90495a91, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_nameText: {fileID: 2285106042110813528}
|
||||
_healthText: {fileID: 7174288820249738816}
|
||||
_healthImage: {fileID: 5673963502904499965}
|
||||
--- !u!114 &7635475614995666769
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7411326708969747318}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1a05efb08a5fbef42b3e8414040b6c33, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
targetCamera: {fileID: 0}
|
||||
mode: 0
|
||||
--- !u!1 &8413885312267932152
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5701142192473136576}
|
||||
- component: {fileID: 7587262003382044375}
|
||||
- component: {fileID: 7707488633609807056}
|
||||
m_Layer: 5
|
||||
m_Name: HealthUIBG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5701142192473136576
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8413885312267932152}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.07}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 447810615664942995}
|
||||
- {fileID: 5858885448622382372}
|
||||
m_Father: {fileID: 5270926106539954932}
|
||||
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: 1.51}
|
||||
m_SizeDelta: {x: 1, y: 0.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7587262003382044375
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8413885312267932152}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7707488633609807056
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8413885312267932152}
|
||||
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: 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
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f771f79fa34c4164ea8e0f4c0387fe59
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,712 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &428271674577762648
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6571891986767687373}
|
||||
- component: {fileID: 4956473773495211034}
|
||||
- component: {fileID: 1445689120324889233}
|
||||
m_Layer: 5
|
||||
m_Name: HealthUIBG
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6571891986767687373
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 428271674577762648}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.07}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6261067400668915663}
|
||||
- {fileID: 8244162240748499527}
|
||||
m_Father: {fileID: 1791287790076630285}
|
||||
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: 1.51}
|
||||
m_SizeDelta: {x: 1, y: 0.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4956473773495211034
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 428271674577762648}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1445689120324889233
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 428271674577762648}
|
||||
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: 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 &771811879155673718
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8244162240748499527}
|
||||
- component: {fileID: 6681838547394292410}
|
||||
- component: {fileID: 8939523771274757837}
|
||||
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 &8244162240748499527
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 771811879155673718}
|
||||
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: 6571891986767687373}
|
||||
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 &6681838547394292410
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 771811879155673718}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8939523771274757837
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 771811879155673718}
|
||||
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: 100
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 31b77628c21b17e45a6577a3d3d5aef0, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 0.15
|
||||
m_fontSizeBase: 0.15
|
||||
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: 0
|
||||
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.053617537, 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 &1043716454621571946
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2818130551907084697}
|
||||
- component: {fileID: 1776217013714687322}
|
||||
- component: {fileID: 4730194793060944177}
|
||||
- component: {fileID: 7880925295973151225}
|
||||
- component: {fileID: 4017591853686837057}
|
||||
m_Layer: 0
|
||||
m_Name: PetPrefab
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2818130551907084697
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043716454621571946}
|
||||
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: 7933090353384311527}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1776217013714687322
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043716454621571946}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8c7b669b45068cf469ae3116991b9026, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
namedAnimancer: {fileID: 0}
|
||||
animName1:
|
||||
--- !u!143 &4730194793060944177
|
||||
CharacterController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043716454621571946}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Height: 2
|
||||
m_Radius: 0
|
||||
m_SlopeLimit: 45
|
||||
m_StepOffset: 0.3
|
||||
m_SkinWidth: 0.08
|
||||
m_MinMoveDistance: 0.00001
|
||||
m_Center: {x: 0, y: 1, z: 0}
|
||||
--- !u!136 &7880925295973151225
|
||||
CapsuleCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043716454621571946}
|
||||
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: 2
|
||||
m_Radius: 0.8
|
||||
m_Height: 1
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 1, z: 0}
|
||||
--- !u!114 &4017591853686837057
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1043716454621571946}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6af68acbb8354d04f9c00df83d3eec60, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_NPCInfo:
|
||||
nid: 0
|
||||
tid: 0
|
||||
vis_tid: 0
|
||||
m_iMMIndex: 0
|
||||
m_idAttackTarget: 0
|
||||
m_fMoveSpeed: 0
|
||||
_characterController: {fileID: 4730194793060944177}
|
||||
isDebug: 0
|
||||
npcVisual: {fileID: 0}
|
||||
--- !u!1 &1164597358858788668
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1791287790076630285}
|
||||
- component: {fileID: 8766426097291915552}
|
||||
- component: {fileID: 82791983180407946}
|
||||
- component: {fileID: 500640355185755471}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1791287790076630285
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1164597358858788668}
|
||||
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: 354124022967291075}
|
||||
- {fileID: 6571891986767687373}
|
||||
m_Father: {fileID: 7933090353384311527}
|
||||
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_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &8766426097291915552
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1164597358858788668}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 2
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 25
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &82791983180407946
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1164597358858788668}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 1
|
||||
--- !u!114 &500640355185755471
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1164597358858788668}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &1410298629239166573
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 354124022967291075}
|
||||
- component: {fileID: 3741975505824752843}
|
||||
- component: {fileID: 6491069708694599127}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)_Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &354124022967291075
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1410298629239166573}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0.07000001}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1791287790076630285}
|
||||
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.0000000060535967, y: 1.9189999}
|
||||
m_SizeDelta: {x: 1, y: 1}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3741975505824752843
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1410298629239166573}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6491069708694599127
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1410298629239166573}
|
||||
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: Hoang
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 13f71bf0225d0c0439db9931000d75d0, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, 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: 0.25
|
||||
m_fontSizeBase: 0.25
|
||||
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: 0
|
||||
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 &6209053004261175930
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7933090353384311527}
|
||||
- component: {fileID: 2684574450150702093}
|
||||
- component: {fileID: 8928742731626340957}
|
||||
m_Layer: 0
|
||||
m_Name: UIPlayer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7933090353384311527
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6209053004261175930}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.026024496, y: 0.5726356, z: -0.0181917, w: 0.8191949}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1791287790076630285}
|
||||
m_Father: {fileID: 2818130551907084697}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2684574450150702093
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6209053004261175930}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8bc4ae2a8436a6947aa8792f90495a91, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_nameText: {fileID: 6491069708694599127}
|
||||
_healthText: {fileID: 8939523771274757837}
|
||||
_healthImage: {fileID: 3651088183696393374}
|
||||
--- !u!114 &8928742731626340957
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6209053004261175930}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1a05efb08a5fbef42b3e8414040b6c33, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
targetCamera: {fileID: 0}
|
||||
mode: 0
|
||||
--- !u!1 &7756013153683760564
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6261067400668915663}
|
||||
- component: {fileID: 2872923215691076475}
|
||||
- component: {fileID: 3651088183696393374}
|
||||
m_Layer: 5
|
||||
m_Name: HealthUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6261067400668915663
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7756013153683760564}
|
||||
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: 6571891986767687373}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1, y: 0.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2872923215691076475
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7756013153683760564}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3651088183696393374
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7756013153683760564}
|
||||
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: -637874507, guid: 9ef86922851818c4e9e58040f51c491f, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 604e1a73e4ffe2c4c9d911243e79bfcd
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 600 KiB |
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,290 @@
|
||||
32
|
||||
32
|
||||
18
|
||||
16
|
||||
白鹤.dds
|
||||
17173小章鱼.dds
|
||||
2013飞天猪.dds
|
||||
2015北美狮子.dds
|
||||
2015帮派冰龙.dds
|
||||
2015帮派火龙.dds
|
||||
2015拉弥亚.dds
|
||||
2015机器人宠物.dds
|
||||
2015柯基宠物.dds
|
||||
2015热气球飞骑.dds
|
||||
2015独角兽.dds
|
||||
2015狮鹫坐骑.dds
|
||||
2015西方恶龙.dds
|
||||
2016人族炫彩风车.dds
|
||||
2016悟空坐骑.dds
|
||||
2016灰姑娘马车.dds
|
||||
q小龙.dds
|
||||
sina小浪.dds
|
||||
yy女熊.dds
|
||||
yy男熊.dds
|
||||
一周年坐骑龙.dds
|
||||
三头狗.dds
|
||||
上古兽.dds
|
||||
中国金龙.dds
|
||||
九尾火狐.dds
|
||||
五色鹿.dds
|
||||
五花蛛.dds
|
||||
五花蝎.dds
|
||||
人鱼.dds
|
||||
仓鼠.dds
|
||||
仙人掌.dds
|
||||
仙人球.dds
|
||||
伏羲魂守.dds
|
||||
僵尸兵.dds
|
||||
兔子幼年.dds
|
||||
兔幼年.dds
|
||||
兔齿山猫.dds
|
||||
共工魂守.dds
|
||||
关海法.dds
|
||||
冰凤凰.dds
|
||||
冰石行者.dds
|
||||
凤凰骑宠.dds
|
||||
凤鸣灵株.dds
|
||||
创世黑暗祭祀.dds
|
||||
刺客大师.dds
|
||||
剑灵大师.dds
|
||||
力士.dds
|
||||
劣魔.dds
|
||||
原始人.dds
|
||||
双头狼.dds
|
||||
双子星.dds
|
||||
变异毒囊蛙.dds
|
||||
变异的野狗.dds
|
||||
可爱气泡鱼.dds
|
||||
可爱螃蟹.dds
|
||||
可爱鱼妖.dds
|
||||
后土魂守.dds
|
||||
和风灵珠.dds
|
||||
噬光.dds
|
||||
园艺剪刀手.dds
|
||||
园艺区哨兵.dds
|
||||
土拔鼠国王.dds
|
||||
土蝼卫兵.dds
|
||||
土蝼哨兵.dds
|
||||
土蝼战士.dds
|
||||
土貂.dds
|
||||
圣诞麋鹿坐骑.dds
|
||||
地行彩鸟.dds
|
||||
坐骑夸父.dds
|
||||
坐骑猛犸巨象.dds
|
||||
坐骑章鱼龙怪.dds
|
||||
坐骑蛇.dds
|
||||
坐骑鼠轮车.dds
|
||||
墨鲶.dds
|
||||
大力神.dds
|
||||
大嘟嘟熊.dds
|
||||
大黄.dds
|
||||
大龙虾.dds
|
||||
天马独角兽.dds
|
||||
夫诸王.dds
|
||||
妖兽大师.dds
|
||||
妖精大师.dds
|
||||
姜小虎-包裹.dds
|
||||
姜小虎宠物.dds
|
||||
婚礼小精灵.dds
|
||||
完美狼兽.dds
|
||||
宠物龟.dds
|
||||
宽嘴奇足.dds
|
||||
寒冰公主.dds
|
||||
小叶蜂.dds
|
||||
小恐龙黑.dds
|
||||
小恶魔宝宝.dds
|
||||
小星星.dds
|
||||
小浣熊2013.dds
|
||||
小熊猫.dds
|
||||
小爱神.dds
|
||||
小神龙.dds
|
||||
小青蛙.dds
|
||||
小鱼人蓝.dds
|
||||
尖嘴奇足.dds
|
||||
岩灵战士.dds
|
||||
崩雷祭祀.dds
|
||||
巨嘴奇足.dds
|
||||
巨蜥骑宠.dds
|
||||
巫师大师.dds
|
||||
巫毒娃娃.dds
|
||||
帝骨.dds
|
||||
年兽.dds
|
||||
幼年狗.dds
|
||||
幼纹蝎.dds
|
||||
幽灵战士.dds
|
||||
庇佑圣灵.dds
|
||||
彩蝶精.dds
|
||||
恶魔武士.dds
|
||||
情意眠眠.dds
|
||||
惩戒圣灵.dds
|
||||
抱抱兔.dds
|
||||
探险者.dds
|
||||
摩托车01.dds
|
||||
救赎圣灵.dds
|
||||
敖蒙.dds
|
||||
文文蜂.dds
|
||||
斑斓豹.dds
|
||||
斑点狗.dds
|
||||
旋龟.dds
|
||||
无头骑兵将军.dds
|
||||
旱水精.dds
|
||||
暴牙牛喽罗.dds
|
||||
月神镜像.dds
|
||||
机械战狮.dds
|
||||
杀人蜂.dds
|
||||
松鼠.dds
|
||||
极乐鸟.dds
|
||||
构装电虎.dds
|
||||
梅花鹿.dds
|
||||
欧美企鹅特工队.dds
|
||||
欧美斗牛犬.dds
|
||||
欧美泰迪熊.dds
|
||||
欧美犀牛.dds
|
||||
欧美青蛙骑宠.dds
|
||||
欧美鸭嘴兽.dds
|
||||
武侠大师.dds
|
||||
水下三甲虫.dds
|
||||
水精.dds
|
||||
法师大师.dds
|
||||
波波鸟宝宝.dds
|
||||
泥鬼.dds
|
||||
海星人.dds
|
||||
涡漩祭祀.dds
|
||||
深海恐鱼.dds
|
||||
清静琉璃.dds
|
||||
游荡的鹦鹉.dds
|
||||
火凤凰.dds
|
||||
火炎结晶.dds
|
||||
火神祝融.dds
|
||||
灵狐.dds
|
||||
灵蜥猎人兀突子.dds
|
||||
灾厄幻影.dds
|
||||
炎爆幻影.dds
|
||||
炎精.dds
|
||||
炽天凤凰.dds
|
||||
烈火恐鸟.dds
|
||||
煮龙巫师小巴尔罕.dds
|
||||
熊幼年.dds
|
||||
熊幼年amd.dds
|
||||
熊成年.dds
|
||||
熊猫骑宠.dds
|
||||
燃情灵株.dds
|
||||
特效独角兽.dds
|
||||
狗幼年.dds
|
||||
独角兽黑.dds
|
||||
狮子.dds
|
||||
猞猁山猫.dds
|
||||
猪成年.dds
|
||||
猫头鹰.dds
|
||||
猫幼年.dds
|
||||
猴子坐骑.dds
|
||||
獠牙狼.dds
|
||||
玄虎.dds
|
||||
玉暖蓝田.dds
|
||||
白熊.dds
|
||||
白象.dds
|
||||
白豹.dds
|
||||
百裂缠丝.dds
|
||||
眼睛猴.dds
|
||||
眼镜猴.dds
|
||||
石吼怪.dds
|
||||
破胆幻影.dds
|
||||
祝融魂守.dds
|
||||
神仙鱼.dds
|
||||
神猴悟空.dds
|
||||
祭祀使徒高级.dds
|
||||
禅意圣灵.dds
|
||||
穿山甲.dds
|
||||
章鱼龙怪坐骑.dds
|
||||
精灵狼.dds
|
||||
红斑天牛.dds
|
||||
红色松鼠.dds
|
||||
红蝴蝶.dds
|
||||
绛珠之咒.dds
|
||||
绿狮子.dds
|
||||
美人鱼.dds
|
||||
群鹰峭壁.dds
|
||||
羽灵大师.dds
|
||||
羽芒大师.dds
|
||||
老虎.dds
|
||||
肥修罗.dds
|
||||
能量结晶体冰.dds
|
||||
花苞疯女.dds
|
||||
莲子止魂.dds
|
||||
萌小妹.dds
|
||||
蓝色老鹰.dds
|
||||
蓝豹子.dds
|
||||
虚无游神.dds
|
||||
蚰蜒.dds
|
||||
蝴蝶兰精.dds
|
||||
血狼勇士.dds
|
||||
血蹄狼.dds
|
||||
豹子成年.dds
|
||||
豹成年.dds
|
||||
赤练蛇.dds
|
||||
足球宝贝.dds
|
||||
轻烟灵珠.dds
|
||||
进化蛋.dds
|
||||
迪赛奥黑龙.dds
|
||||
通幽魔虎.dds
|
||||
通幽魔虎宝宝.dds
|
||||
通玄仙虎.dds
|
||||
通玄仙虎宝宝.dds
|
||||
金光狮子.dds
|
||||
金光电母.dds
|
||||
金毛犬.dds
|
||||
金猪.dds
|
||||
金甲天神.dds
|
||||
金翅蜂.dds
|
||||
金豹.dds
|
||||
金鱼.dds
|
||||
金鱼2小.dds
|
||||
金鱼amd.dds
|
||||
银翼狐.dds
|
||||
长臂蛮.dds
|
||||
闪电鳐.dds
|
||||
闻膦.dds
|
||||
陆化的海龟褐色.dds
|
||||
陆生机器螃蟹.dds
|
||||
雪人坐骑.dds
|
||||
雪兔宝宝.dds
|
||||
雪女.dds
|
||||
雪娃娃.dds
|
||||
雪战士.dds
|
||||
雪蛮神官塔塔.dds
|
||||
雪麒麟.dds
|
||||
雷电羊骑宠.dds
|
||||
震怒幻影.dds
|
||||
青蚨.dds
|
||||
飞天猪.dds
|
||||
飞天虎妖.dds
|
||||
飞龙坐骑.dds
|
||||
饿狼.dds
|
||||
骆驼.dds
|
||||
骑宠马白.dds
|
||||
骑宠马红.dds
|
||||
骑宠马绿.dds
|
||||
骑宠马黑.dds
|
||||
骑龙.dds
|
||||
高级狼兽.dds
|
||||
魅影.dds
|
||||
魅影换色橙色.dds
|
||||
魅灵大师.dds
|
||||
魔神蚩尤.dds
|
||||
鲲鹏.dds
|
||||
鲸涛通灵师鲸哈尔.dds
|
||||
鳞甲山猫.dds
|
||||
鸽子坐骑.dds
|
||||
鹦鹉.dds
|
||||
麋鹿.dds
|
||||
麒麟墨.dds
|
||||
麒麟绿.dds
|
||||
黑暗徘徊者.dds
|
||||
黑暗斥候.dds
|
||||
黑豹.dds
|
||||
齿蛮人.dds
|
||||
龙坐骑.dds
|
||||
龙宫神仙鱼.dds
|
||||
龙年春节坐骑.dds
|
||||
龙蛭.dds
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55d983872b71c814da90f0c9beaacdd4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:def3c6a4f58ef9b5c9558210328e5b6f3ed11bfee5b577271ee43fa110616b82
|
||||
size 200521689
|
||||
oid sha256:1bc8ad3d0f996311514cc0bdecf90c807fc11d0e1e920c6910a588be0e98ec13
|
||||
size 200532972
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BrewMonster;
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
@@ -26,6 +27,8 @@ public partial class CECGameRun
|
||||
private GameObject _playerPrefab;
|
||||
private GameObject _monsterPrefab;//CECMonster
|
||||
private GameObject _npcServerPrefab;//CECNPCServer
|
||||
private GameObject _petServerPrefab;//CECPet
|
||||
private GameObject _petMountServerPrefab;//CECPetRider
|
||||
|
||||
private CECTeamMan m_pTeamMan; // Team manager
|
||||
private CECShortcutSet m_pNormalSCS; // Normal shortcut set
|
||||
@@ -47,8 +50,17 @@ public partial class CECGameRun
|
||||
|
||||
#endregion
|
||||
|
||||
public CECWorld GetWorld() { return m_pWorld; }
|
||||
public CECWorld GetWorld()
|
||||
{
|
||||
if(m_pWorld == null)
|
||||
{
|
||||
m_pWorld = CECWorld.Instance;
|
||||
}
|
||||
return m_pWorld;
|
||||
}
|
||||
|
||||
public CECTeamMan GetTeamMan() { return m_pTeamMan; }
|
||||
|
||||
// Get shortcut sets
|
||||
public CECShortcutSet GetGenCmdShortcuts() { return m_pNormalSCS; }
|
||||
public CECShortcutSet GetTeamCmdShortcuts() { return m_pTeamSCS; }
|
||||
@@ -100,6 +112,7 @@ public partial class CECGameRun
|
||||
if (!m_InstTab.ContainsKey(161))
|
||||
m_InstTab.Add(161, new CECInstance());
|
||||
AddressableManager.Instance.OnDispose += Dispose;
|
||||
m_pWorld = CECWorld.Instance;
|
||||
StartGame(0, Vector3.zero);
|
||||
|
||||
|
||||
@@ -113,6 +126,8 @@ public partial class CECGameRun
|
||||
AddressableManager.Instance.ReleaseAsset(AddressResourceConfig.PlayerPrefab);
|
||||
AddressableManager.Instance.ReleaseAsset(AddressResourceConfig.MonsterPrefab);
|
||||
AddressableManager.Instance.ReleaseAsset(AddressResourceConfig.NpcServerPrefab);
|
||||
//AddressableManager.Instance.ReleaseAsset(AddressResourceConfig.PetServerPrefab);
|
||||
//AddressableManager.Instance.ReleaseAsset(AddressResourceConfig.PetMountServerPrefab);
|
||||
}
|
||||
|
||||
private void LoadPrefabs()
|
||||
@@ -120,6 +135,8 @@ public partial class CECGameRun
|
||||
_playerPrefab = Resources.Load<GameObject>(AddressResourceConfig.PlayerPrefab);
|
||||
_monsterPrefab = Resources.Load<GameObject>(AddressResourceConfig.MonsterPrefab);
|
||||
_npcServerPrefab = Resources.Load<GameObject>(AddressResourceConfig.NpcServerPrefab);
|
||||
_petServerPrefab = Resources.Load<GameObject>(AddressResourceConfig.PetServerPrefab);
|
||||
_petMountServerPrefab = Resources.Load<GameObject>(AddressResourceConfig.PetMountServerPrefab);
|
||||
#if UNITY_EDITOR
|
||||
if (_playerPrefab == null)
|
||||
{
|
||||
@@ -550,6 +567,17 @@ public partial class CECGameRun
|
||||
return szRet;
|
||||
}
|
||||
|
||||
public CECPet GetPet()
|
||||
{
|
||||
return ObjectSpawner.Instance.InstantiateObject(_petServerPrefab, setThisAsParent: true)
|
||||
.GetComponent<CECPet>();
|
||||
}
|
||||
|
||||
public GameObject GetPetMount()
|
||||
{
|
||||
return ObjectSpawner.Instance.InstantiateObject(_petMountServerPrefab, setThisAsParent: true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a fixed message to chat system with optional formatting parameters
|
||||
/// 添加固定消息到聊天系统,支持可选的格式化参数
|
||||
|
||||
+122
-52
@@ -5,6 +5,7 @@ using BrewMonster.Network;
|
||||
using BrewMonster.PerfectWorld.Scripts.Vfx;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
using BrewMonster.Scripts.Skills;
|
||||
using BrewMonster.Scripts.World;
|
||||
using BrewMonster.UI;
|
||||
@@ -18,11 +19,8 @@ using PerfectWorld.Scripts.Managers;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using static BrewMonster.Scripts.Managers.EC_Inventory;
|
||||
@@ -31,6 +29,8 @@ using cmd_select_target = CSNetwork.GPDataType.cmd_select_target;
|
||||
using Host_work_ID = BrewMonster.Scripts.CECHPWork.Host_work_ID;
|
||||
using Trace_reason = BrewMonster.CECHPWorkTrace.Trace_reason;
|
||||
using ObjectCoords = System.Collections.Generic.List<CSNetwork.GPDataType.OBJECT_COORD>;
|
||||
using System.Linq;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public partial class CECHostPlayer : CECPlayer
|
||||
@@ -64,7 +64,7 @@ namespace BrewMonster
|
||||
private int m_iRoleLastLoginTime; // Role last login time
|
||||
private int m_iAccountTotalCash;
|
||||
|
||||
private EC_PetCorral m_pPetCorral;
|
||||
private CECPetCorral m_pPetCorral;
|
||||
private List<CECObject> m_aTabSels = new List<CECObject>();
|
||||
private List<CECSkill> m_aPtSkills = new List<CECSkill>();
|
||||
private List<CECSkill> m_aPsSkills = new List<CECSkill>();
|
||||
@@ -93,7 +93,6 @@ namespace BrewMonster
|
||||
private int m_iWorldContribution;
|
||||
private int m_iWorldContributionSpend;
|
||||
private bool m_bSpellDSkill;
|
||||
private CECSkill m_pCurSkill;
|
||||
private CECSkill m_pTargetItemSkill; // Target item skill
|
||||
public CECComboSkill m_pComboSkill; // Combo skill
|
||||
public A3DVECTOR3 m_vAccel; // Accelerate\
|
||||
@@ -107,7 +106,7 @@ namespace BrewMonster
|
||||
bool m_bUsingTrashBox = false; // Whether being using trash box
|
||||
private float m_fPrayDistancePlus;
|
||||
private A3DVECTOR3 g_vOrigin = new A3DVECTOR3(0f);
|
||||
private Transform playerTransform;
|
||||
|
||||
private float EC_SLOPE_Y = 0.5f;
|
||||
int m_iOldWalkMode = Move_Mode.MOVE_STAND; // Copy of work mode
|
||||
public uint m_dwMoveRelDir = 0; // Move relative direction flags
|
||||
@@ -117,6 +116,12 @@ namespace BrewMonster
|
||||
Dictionary<int, COOLTIME> m_skillCoolTime = new Dictionary<int, COOLTIME>();
|
||||
COOLTIME[] m_aCoolTimes = new COOLTIME[(int)CoolTimeIndex.GP_CT_MAX]; // Cool times
|
||||
|
||||
CECCounter m_PetOptCnt = new CECCounter(); // Pet operation time counter
|
||||
protected bool[] m_playerLimits = new bool[(int)PLAYER_LIMIT.PLAYER_LIMIT_MAX];
|
||||
|
||||
// תÉú´ÎÊý
|
||||
byte m_ReincarnationCount = 0;
|
||||
|
||||
// Host config data version
|
||||
const int HOSTCFG_VERSION = 11;
|
||||
|
||||
@@ -319,10 +324,12 @@ namespace BrewMonster
|
||||
m_TaskCounter.SetPeriod(3000f);
|
||||
m_TaskCounter.Reset(true); // trigger first check immediately
|
||||
m_bTitleDataReady = false;
|
||||
playerTransform = transform;
|
||||
//playerTransform = transform;
|
||||
m_GatherCnt ??= new CECCounter();
|
||||
m_GatherCnt.SetPeriod(1000);
|
||||
m_GatherCnt.Reset(true);
|
||||
m_PetOptCnt.SetPeriod(1000);
|
||||
m_PetOptCnt.Reset(true);
|
||||
}
|
||||
|
||||
public bool LoadResources()
|
||||
@@ -437,7 +444,6 @@ namespace BrewMonster
|
||||
|
||||
//m_dwMoveRelDir = 0;
|
||||
m_fVertSpeed = 0.0f;
|
||||
UpdateTimers(Time.deltaTime);
|
||||
// Auto team / Automatic party grouping
|
||||
// m_pAutoTeam.Tick(Time.deltaTime);
|
||||
}
|
||||
@@ -607,6 +613,9 @@ namespace BrewMonster
|
||||
case int value when value == EC_MsgDef.MSG_HST_LEARNSKILL: OnMsgHstLearnSkill(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_COMBO_SKILL_PREPARE: OnMsgComboSkillPrepare(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERFLY: OnMsgPlayerFly(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_PETOPT: OnMsgHstPetOpt(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_SETPLAYERLIMIT: OnMsgHstSetPlayerLimit(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERMOUNT: OnMsgPlayerMount(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_EMBEDITEM: OnMsgHstEmbedItem(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_JOINTEAM: OnMsgHstJoinTeam(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_LEAVETEAM: OnMsgHstLeaveTeam(Msg); break;
|
||||
@@ -736,7 +745,6 @@ namespace BrewMonster
|
||||
|
||||
private void OnMsgHstLearnSkill(ECMSG Msg)
|
||||
{
|
||||
BMLogger.LogError("OnMsgHstLearnSkill");
|
||||
cmd_learn_skill pCmd = GPDataTypeHelper.FromBytes<cmd_learn_skill>((byte[])Msg.dwParam1);
|
||||
|
||||
CECSkill pSkill = GetNormalSkill(pCmd.skill_id);
|
||||
@@ -796,7 +804,6 @@ namespace BrewMonster
|
||||
COOLTIME ct = m_aCoolTimes[pCmd.cooldown_index];
|
||||
ct.iCurTime = pCmd.cooldown_time;
|
||||
ct.iMaxTime = pCmd.cooldown_time;
|
||||
Debug.Log("New Max cool time forIvtrMedicine: it be: " + pCmd.cooldown_time);
|
||||
Math.Min(ct.iCurTime, ct.iMaxTime);
|
||||
m_aCoolTimes[pCmd.cooldown_index] = ct;
|
||||
if (pCmd.cooldown_index == (int)CoolTimeIndex.GP_CT_CAST_ELF_SKILL)
|
||||
@@ -871,7 +878,7 @@ namespace BrewMonster
|
||||
}
|
||||
/* else if (pSkill = CECComboSkillState::Instance().GetInherentSkillByID(idSkill))
|
||||
{
|
||||
pSkill->StartCooling(pCmd->cooldown_time, pCmd->cooldown_time);
|
||||
pSkill.StartCooling(pCmd.cooldown_time, pCmd.cooldown_time);
|
||||
}*/
|
||||
else if (GetEquipSkillByID(idSkill) == null)
|
||||
{
|
||||
@@ -1020,6 +1027,7 @@ namespace BrewMonster
|
||||
|
||||
private void OnMsgPlayerCastSkill(ECMSG Msg)
|
||||
{
|
||||
|
||||
bool bDoOtherThing = false;
|
||||
int idTarget = 0;
|
||||
|
||||
@@ -1031,8 +1039,6 @@ namespace BrewMonster
|
||||
{
|
||||
case int value2 when value2 == CommandID.OBJECT_CAST_SKILL:
|
||||
{
|
||||
// Cast skill on target object
|
||||
// 对目标对象施法
|
||||
cmd_object_cast_skill pCmd =
|
||||
GPDataTypeHelper.FromBytes<cmd_object_cast_skill>((byte[])Msg.dwParam1);
|
||||
|
||||
@@ -1040,7 +1046,6 @@ namespace BrewMonster
|
||||
{
|
||||
m_pCurSkill.EndCharging();
|
||||
}
|
||||
|
||||
m_pCurSkill = GetPositiveSkillByID(pCmd.skill);
|
||||
if (m_pCurSkill == null) m_pCurSkill = GetEquipSkillByID(pCmd.skill);
|
||||
if (m_pCurSkill == null)
|
||||
@@ -1058,8 +1063,8 @@ namespace BrewMonster
|
||||
if (m_pCurSkill.GetExecuteTime() >= 0)
|
||||
iWaitTime = pCmd.time + m_pCurSkill.GetExecuteTime();
|
||||
|
||||
CECHPWorkSpell pWork =
|
||||
(CECHPWorkSpell)m_pWorkMan.CreateWork(CECHPWork.Host_work_ID.WORK_SPELLOBJECT);
|
||||
CECHPWorkSpell pWork = (CECHPWorkSpell)m_pWorkMan.CreateWork(Host_work_ID.WORK_SPELLOBJECT);
|
||||
|
||||
pWork.PrepareCast(pCmd.target, m_pCurSkill, iWaitTime);
|
||||
m_pWorkMan.StartWork_p1(pWork);
|
||||
|
||||
@@ -1088,7 +1093,6 @@ namespace BrewMonster
|
||||
|
||||
bActionStartSkill = true;
|
||||
iActionTime = iWaitTime;
|
||||
Debug.Log($"Cast skill({m_pCurSkill.GetSkillID()})");
|
||||
|
||||
// Special logging for return-to-town skill (167)
|
||||
// 回城技能(167)的特殊日志
|
||||
@@ -1195,7 +1199,6 @@ namespace BrewMonster
|
||||
// Print a notify message
|
||||
// 打印提示消息
|
||||
//EC_Game.GetGameRun().AddFixedMessage(FIXMSG_SKILLINTERRUPT);
|
||||
BMLogger.LogError("Skill interrupted!");
|
||||
|
||||
AP.AP_ActionEvent((int)AP_EVENT.AP_EVENT_STOPSKILL);
|
||||
|
||||
@@ -2962,16 +2965,6 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPos(Vector3 pos)
|
||||
{
|
||||
playerTransform.position = pos;
|
||||
|
||||
m_aabb.Center = EC_Utility.ToA3DVECTOR3(pos) + new A3DVECTOR3(0.0f, m_aabb.Extents.y, 0.0f);
|
||||
m_aabb.CompleteMinsMaxs();
|
||||
m_aabbServer.Center = EC_Utility.ToA3DVECTOR3(pos) + new A3DVECTOR3(0.0f, m_aabbServer.Extents.y, 0.0f);
|
||||
m_aabbServer.CompleteMinsMaxs();
|
||||
}
|
||||
|
||||
public void SetStatusRun(bool value)
|
||||
{
|
||||
if (!isGrounded)
|
||||
@@ -3113,6 +3106,7 @@ namespace BrewMonster
|
||||
m_pWorkMan.StartWork_p1(pWork);
|
||||
}*/
|
||||
//m_GndInfo.bOnGround = GroundCheck(out lastGroundHit);
|
||||
m_pPetCorral = new CECPetCorral();
|
||||
if (m_pWorkMan == null)
|
||||
{
|
||||
return;
|
||||
@@ -4045,8 +4039,6 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
|
||||
BMLogger.LogError("HoangDev: ApplySkillShortcut - PATH 1: Calling CastSkill (self-cast)");
|
||||
|
||||
m_pPrepSkill = pSkill;
|
||||
CastSkill(m_PlayerInfo.cid, bForceAttack);
|
||||
}
|
||||
@@ -4404,10 +4396,8 @@ namespace BrewMonster
|
||||
|
||||
fDist = Mathf.Abs(fDist);
|
||||
A3DVECTOR3 vDest = m_MoveCtrl.FlashMove(vDir, 100.0f, fDist);
|
||||
BMLogger.LogError(
|
||||
$"HoangDev: skill id={m_pPrepSkill.GetSkillID()} , vDest={vDest} ,position = {transform.position}, byPVPMask={byPVPMask} ");
|
||||
UnityGameSession.c2s_CmdCastPosSkill(m_pPrepSkill.GetSkillID(), EC_Utility.ToVector3(vDest),
|
||||
byPVPMask, 0, 0);
|
||||
byPVPMask, 0, 0);
|
||||
m_pPrepSkill = null;
|
||||
}
|
||||
else
|
||||
@@ -4868,10 +4858,9 @@ namespace BrewMonster
|
||||
Info.arrow = pArrow.GetCount();
|
||||
}
|
||||
|
||||
// Call ElementSkill Condition check
|
||||
if (pSkill.SkillCore != null)
|
||||
{
|
||||
return pSkill.SkillCore.Condition(Info);
|
||||
return pSkill.SkillCore.Condition((uint)pSkill.GetSkillID(),Info, pSkill.GetSkillLevel());
|
||||
}
|
||||
|
||||
return 0; // Success
|
||||
@@ -5031,8 +5020,8 @@ namespace BrewMonster
|
||||
|
||||
if (IsDead() || !GPDataTypeHelper.ISPLAYERID(m_idSelTarget) ||
|
||||
m_idSelTarget == m_PlayerInfo.cid /*||
|
||||
!m_pTeam || !m_pTeam.GetMemberByID(m_idSelTarget) || m_iBuddyId || IsPassiveMove() ||
|
||||
m_playerLimits.test(PLAYER_LIMIT_NOCHANGESELECT)*/)
|
||||
!m_pTeam || !m_pTeam.GetMemberByID(m_idSelTarget) || m_iBuddyId || IsPassiveMove()*/ ||
|
||||
m_playerLimits[(int)PLAYER_LIMIT.PLAYER_LIMIT_NOCHANGESELECT])
|
||||
bRet = false;
|
||||
|
||||
break;
|
||||
@@ -5044,8 +5033,8 @@ namespace BrewMonster
|
||||
//IsFlashMoving() ||
|
||||
m_pWorkMan.HasWorkRunningOnPriority(CECHPWorkMan.Work_priority.PRIORITY_2) ||
|
||||
m_bHangerOn || /*IsOperatingPet() || IsRebuildingPet() ||*/
|
||||
IsUsingItem() || /*IsRidingOnPet() || GetShapeType() == PLAYERMODEL_DUMMYTYPE2 ||*/ IsPassiveMove() /*||
|
||||
m_playerLimits.test(PLAYER_LIMIT_NOFLY) || m_BattleInfo.IsChariotWar()*/)
|
||||
IsUsingItem() || /*IsRidingOnPet() || GetShapeType() == PLAYERMODEL_DUMMYTYPE2 ||*/ IsPassiveMove() ||
|
||||
m_playerLimits[(int)PLAYER_LIMIT.PLAYER_LIMIT_NOFLY]/* || m_BattleInfo.IsChariotWar()*/)
|
||||
bRet = false;
|
||||
|
||||
break;
|
||||
@@ -5094,11 +5083,11 @@ namespace BrewMonster
|
||||
|
||||
case ActionCanDo.CANDO_SUMMONPET:
|
||||
|
||||
if (IsDead() || GPDataTypeHelper.ISMATTERID(m_idSelTarget) || /*IsAboutToDie() || IsSitting() ||*/
|
||||
IsJumping() || /*IsFlashMoving() || IsTrading() || IsUsingTrashBox() || IsTalkingWithNPC() ||
|
||||
IsChangingFace() ||*/ CannotAttack() /*|| IsReviving() || GetBoothState() != 0 ||
|
||||
IsInvisible() || IsGMInvisible() || IsOperatingPet() || IsRebuildingPet() || IsUsingItem() || IsPassiveMove()
|
||||
|| m_BattleInfo.IsChariotWar()*/)
|
||||
if (IsDead() || GPDataTypeHelper.ISMATTERID(m_idSelTarget) || IsAboutToDie() || IsSitting() ||
|
||||
IsJumping() || /*IsFlashMoving() ||*/ IsTrading() || IsUsingTrashBox() || IsTalkingWithNPC() ||
|
||||
IsChangingFace() || CannotAttack() || IsReviving() || GetBoothState() != 0 ||
|
||||
IsInvisible() /*|| IsGMInvisible()*/ || IsOperatingPet() != 0 || /*IsRebuildingPet() ||*/ IsUsingItem() || IsPassiveMove()
|
||||
/*|| m_BattleInfo.IsChariotWar()*/)
|
||||
bRet = false;
|
||||
|
||||
break;
|
||||
@@ -6108,8 +6097,9 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
// Is spelling magic
|
||||
bool IsSpellingMagic()
|
||||
public bool IsSpellingMagic()
|
||||
{
|
||||
if(m_pWorkMan == null) return false;
|
||||
return m_pWorkMan.IsSpellingMagic();
|
||||
}
|
||||
|
||||
@@ -6826,13 +6816,14 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
// Gather time counter
|
||||
if (m_GatherCnt.IncCounter(iRealTime))
|
||||
if (m_GatherCnt.IncCounter(iRealTime * 1000))
|
||||
m_GatherCnt.Reset(true);
|
||||
|
||||
// Incant time counter
|
||||
if (m_IncantCnt.IncCounter(dwDeltaTime))
|
||||
if (m_IncantCnt.IncCounter(dwDeltaTime * 1000))
|
||||
m_IncantCnt.Reset(true);
|
||||
|
||||
m_PetOptCnt.IncCounter(iRealTime);
|
||||
// Bind command cool counter
|
||||
/* if (m_BindCmdCoolCnt.IncCounter(dwDeltaTime))
|
||||
m_BindCmdCoolCnt.Reset(true);
|
||||
@@ -7304,6 +7295,7 @@ namespace BrewMonster
|
||||
m_bRushFly = pCmd.is_active != 0 ? true : false;
|
||||
}
|
||||
}
|
||||
public CECCounter GetIncantCnt() { return m_IncantCnt; }
|
||||
|
||||
public EC_Inventory GetPack(int iPack)
|
||||
{
|
||||
@@ -7437,7 +7429,7 @@ namespace BrewMonster
|
||||
// todo make receive request
|
||||
UnityGameSession.c2s_CmdGetItemInfo(Inventory_type.IVTRTYPE_PACK, pCmd.equip_idx);
|
||||
}
|
||||
public EC_PetCorral GetPetCorral()
|
||||
public CECPetCorral GetPetCorral()
|
||||
{
|
||||
return m_pPetCorral;
|
||||
}
|
||||
@@ -7633,7 +7625,7 @@ namespace BrewMonster
|
||||
{
|
||||
if (IsFlying() && pTaskDice.GetDBEssence().no_use_in_combat == 1)
|
||||
{
|
||||
if(showMsg)
|
||||
if (showMsg)
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_CANNOT_USE_IN_BATTLE);
|
||||
return false;
|
||||
}
|
||||
@@ -7800,7 +7792,7 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(pSkill.GetType() == (int)CECSkill.SkillType.TYPE_BLESS)
|
||||
else if (pSkill.GetType() == (int)CECSkill.SkillType.TYPE_BLESS)
|
||||
{
|
||||
// TODO: Implement pet blessing when petsystem is available
|
||||
//CECSCPet pPet = EC_Game.GetGameRun().GetWorld().GetPetByID(m_idSelTarget);
|
||||
@@ -8133,11 +8125,11 @@ namespace BrewMonster
|
||||
return false;
|
||||
|
||||
CECWorld pWorld = CECGameRun.Instance.GetWorld();
|
||||
if(pWorld == null)
|
||||
if (pWorld == null)
|
||||
return false;
|
||||
|
||||
CECObject pObject = pWorld.GetObject(idObject, 1);
|
||||
if(ppObject == null)
|
||||
if (ppObject == null)
|
||||
return false;
|
||||
|
||||
ppObject = pObject;
|
||||
@@ -8187,6 +8179,84 @@ namespace BrewMonster
|
||||
}
|
||||
public CECComboSkill GetComboSkill() { return m_pComboSkill; }
|
||||
|
||||
/* Is host operating pet ?
|
||||
return value:
|
||||
|
||||
0: host doesn't operating pet.
|
||||
1: host is summoning pet.
|
||||
2: host is recalling pet.
|
||||
3: host is banishing pet.
|
||||
*/
|
||||
public int IsOperatingPet()
|
||||
{
|
||||
CECHPWorkConcentrate pWork = (m_pWorkMan.GetRunningWork(CECHPWork.Host_work_ID.WORK_CONCENTRATE)) as CECHPWorkConcentrate;
|
||||
if (pWork != null)
|
||||
{
|
||||
if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_SUMMONPET)
|
||||
return 1;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_RECALLPET)
|
||||
return 2;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_BANISHPET)
|
||||
return 3;
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_RESTOREPET)
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Summon pet
|
||||
public bool SummonPet(int iPetIdx)
|
||||
{
|
||||
if (m_pActionSwitcher != null)
|
||||
m_pActionSwitcher.PostMessge((int)EMsgActionSwitcher.MSG_MOUNTPET);
|
||||
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(iPetIdx);
|
||||
if (pPet == null)
|
||||
return false;
|
||||
|
||||
if (!CanDo(ActionCanDo.CANDO_SUMMONPET))
|
||||
return false;
|
||||
|
||||
// Couldn't summon daed pet
|
||||
if (pPet.IsDead())
|
||||
{
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_DEAD);
|
||||
Debug.LogError("FIXMSG_PET_DEAD");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If host could't stop naturally, cancel summoning
|
||||
if (!NaturallyStopMoving())
|
||||
return false;
|
||||
|
||||
// ¼ì²éµ±Ç°ÊÇ·ñ½ûÖ¹ÕÙ»½Æï³è
|
||||
if (pPet.IsMountPet() && m_playerLimits[(int)PLAYER_LIMIT.PLAYER_LIMIT_NOMOUNT])
|
||||
return false;
|
||||
|
||||
if (m_ReincarnationCount != 0)
|
||||
{
|
||||
int iLevelRequired = pPet.GetLevel() - 35 - m_ReincarnationCount * 5;
|
||||
if (m_BasicProps.iLevel < iLevelRequired)
|
||||
{
|
||||
CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan();
|
||||
if (pGameUI != null)
|
||||
{
|
||||
// TO DO: fix later
|
||||
//string strText = "";
|
||||
//strText.Format(pGameUI.GetStringFromTable(10787), iLevelRequired);
|
||||
//pGameUI.MessageBox("", strText, MB_OK, A3DCOLORRGBA(255, 255, 255, 160));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
UnityGameSession.c2s_CmdPetSummon(iPetIdx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
public struct SkillShortCutConfig
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
public CDlgSkillSubOther m_pDlgSkillSubOther;
|
||||
CDlgMessageBox m_pDlgMessageBox;
|
||||
public CDlgSkillAction m_pDlgSkillAction;
|
||||
Sprite[] m_iconlistIvtr;
|
||||
private CDlgInfoTooltip m_pDlgSkillTooltip;
|
||||
|
||||
protected override void Awake()
|
||||
@@ -403,6 +404,31 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
|
||||
//todo: change this code to other place
|
||||
private int slot = 0;
|
||||
|
||||
public Sprite[] IconlistIvtr
|
||||
{
|
||||
get
|
||||
{
|
||||
if(m_iconlistIvtr == null)
|
||||
{
|
||||
m_iconlistIvtr = Resources.LoadAll<Sprite>("UI/IconSprites/iconlist_ivtrm_multisprite");
|
||||
}
|
||||
return m_iconlistIvtr;
|
||||
}
|
||||
}
|
||||
|
||||
public Sprite GetSpriteInListIvtr(string name)
|
||||
{
|
||||
foreach(var item in IconlistIvtr)
|
||||
{
|
||||
if (item.name.Equals(name))
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void OnClickedWaveHand()
|
||||
{
|
||||
if (EC_Game.GetGameRun().GetPoseCmdShortcuts() == null)
|
||||
@@ -444,8 +470,31 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
pDlg = dlg;
|
||||
}
|
||||
}
|
||||
public void FilterBadWords(string str)
|
||||
|
||||
public void FilterBadWords(ref string str)
|
||||
{
|
||||
// TODO: Implement bad word filtering
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return;
|
||||
|
||||
string strLwr = str.ToLower();
|
||||
|
||||
char[] chars = str.ToCharArray();
|
||||
|
||||
foreach (string bad in gameUI.m_vecBadWords)
|
||||
{
|
||||
int pos = 0;
|
||||
string badLwr = bad.ToLower();
|
||||
|
||||
while ((pos = strLwr.IndexOf(badLwr, pos, StringComparison.Ordinal)) >= 0)
|
||||
{
|
||||
for (int j = 0; j < badLwr.Length; j++)
|
||||
{
|
||||
chars[pos + j] = '*';
|
||||
}
|
||||
pos += badLwr.Length;
|
||||
}
|
||||
}
|
||||
|
||||
str = new string(chars);
|
||||
}
|
||||
}
|
||||
@@ -345,4 +345,19 @@ public static class EC_Utility
|
||||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
// Get force attack flag
|
||||
public static bool glb_GetForceAttackFlag(uint? pdwParam)
|
||||
{
|
||||
|
||||
bool bForceAttack = false;
|
||||
// CECInputCtrl* pInputCtrl = g_pGame->GetGameRun()->GetInputCtrl();
|
||||
|
||||
//if (pdwParam)
|
||||
// bForceAttack = pInputCtrl->IsCtrlPressed(*pdwParam);
|
||||
//else
|
||||
// bForceAttack = pInputCtrl->KeyIsBeingPressed(VK_CONTROL);
|
||||
|
||||
return bForceAttack;
|
||||
}
|
||||
}
|
||||
|
||||
+408
-671
File diff suppressed because one or more lines are too long
@@ -60,8 +60,4 @@ QualitySettings:
|
||||
excludedTargetPlatforms:
|
||||
- Standalone
|
||||
m_TextureMipmapLimitGroupNames: []
|
||||
m_PerPlatformDefaultQuality:
|
||||
Android: 0
|
||||
Standalone: 0
|
||||
VisionOS: 0
|
||||
iPhone: 0
|
||||
m_PerPlatformDefaultQuality: {}
|
||||
|
||||
Reference in New Issue
Block a user