Merge branch 'develop' into feature/skillBehavior
# Conflicts: # Assets/Scripts/CECHostPlayer.cs # Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
This commit is contained in:
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: 353eadd7935f3aef66b29515596e784e
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
||||
@@ -36,9 +36,9 @@ RectTransform:
|
||||
m_Father: {fileID: 8222630393730529017}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -10, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 272, y: 0}
|
||||
m_SizeDelta: {x: 544, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &9154858122360570458
|
||||
CanvasRenderer:
|
||||
@@ -68,7 +68,21 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text:
|
||||
m_text: 'asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
asfasf
|
||||
|
||||
'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
@@ -180,7 +194,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: 370
|
||||
m_MinHeight: 300
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
@@ -1261,6 +1275,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 8222630393730529017}
|
||||
- component: {fileID: 2639351263650743997}
|
||||
- component: {fileID: 4142611820152313966}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
@@ -1302,6 +1317,32 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 1
|
||||
--- !u!114 &4142611820152313966
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5003895622590170670}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!1 &6318768709065201913
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1394,7 +1435,7 @@ MonoBehaviour:
|
||||
m_Content: {fileID: 8222630393730529017}
|
||||
m_Horizontal: 0
|
||||
m_Vertical: 1
|
||||
m_MovementType: 2
|
||||
m_MovementType: 1
|
||||
m_Elasticity: 0.1
|
||||
m_Inertia: 1
|
||||
m_DecelerationRate: 0.135
|
||||
|
||||
@@ -0,0 +1,918 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1590197940424963217
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6666702292353843246}
|
||||
- component: {fileID: 4026888369354985289}
|
||||
m_Layer: 0
|
||||
m_Name: DlgExit
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6666702292353843246
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1590197940424963217}
|
||||
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: 4878816101074468399}
|
||||
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 &4026888369354985289
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1590197940424963217}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8ca9d1418c284fd395248056f086c7d4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ConfirmBtn: {fileID: 3576373828330281173}
|
||||
CancelBtn: {fileID: 5816777684468032703}
|
||||
--- !u!1 &1725743065086802770
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4878816101074468399}
|
||||
- component: {fileID: 1101450299599105715}
|
||||
- component: {fileID: 5337953600179164026}
|
||||
m_Layer: 0
|
||||
m_Name: Popup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4878816101074468399
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1725743065086802770}
|
||||
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: 7913819123905793175}
|
||||
- {fileID: 7527520206793245717}
|
||||
- {fileID: 4965393937731457567}
|
||||
- {fileID: 4000902174573487903}
|
||||
m_Father: {fileID: 6666702292353843246}
|
||||
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: 933.3333, y: 533.3333}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1101450299599105715
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1725743065086802770}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5337953600179164026
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1725743065086802770}
|
||||
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: 4744752b0496d42d0b1c52fcb705e044, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4518958362188575915
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4965393937731457567}
|
||||
- component: {fileID: 1891070853961845177}
|
||||
- component: {fileID: 807580002560918717}
|
||||
- component: {fileID: 3576373828330281173}
|
||||
m_Layer: 0
|
||||
m_Name: Button_Confirm
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4965393937731457567
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4518958362188575915}
|
||||
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: 4642911678502374063}
|
||||
m_Father: {fileID: 4878816101074468399}
|
||||
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: -210, y: -150}
|
||||
m_SizeDelta: {x: 313, y: 91}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1891070853961845177
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4518958362188575915}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &807580002560918717
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4518958362188575915}
|
||||
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: b545f49a479374ffaaec0c8f123b0c5f, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3576373828330281173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4518958362188575915}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 807580002560918717}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &4670976812881016521
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7913819123905793175}
|
||||
- component: {fileID: 2369126678925736279}
|
||||
- component: {fileID: 7564280183498118806}
|
||||
m_Layer: 0
|
||||
m_Name: Text (TMP)_Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7913819123905793175
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4670976812881016521}
|
||||
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: 4878816101074468399}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: -3.7721, y: -17.4557}
|
||||
m_SizeDelta: {x: 298.0753, y: 34.9115}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2369126678925736279
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4670976812881016521}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7564280183498118806
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4670976812881016521}
|
||||
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: "Th\xF4ng b\xE1o"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 30
|
||||
m_fontSizeBase: 30
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5918190347695128963
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4642911678502374063}
|
||||
- component: {fileID: 4834289956051303799}
|
||||
- component: {fileID: 3482299799452283765}
|
||||
m_Layer: 0
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4642911678502374063
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5918190347695128963}
|
||||
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: 4965393937731457567}
|
||||
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 &4834289956051303799
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5918190347695128963}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3482299799452283765
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5918190347695128963}
|
||||
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: "X\xE1c nh\u1EADn"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 50
|
||||
m_fontSizeBase: 50
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &5923497699521027687
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000902174573487903}
|
||||
- component: {fileID: 7348237821025748982}
|
||||
- component: {fileID: 356920440688922164}
|
||||
- component: {fileID: 5816777684468032703}
|
||||
m_Layer: 0
|
||||
m_Name: Button_Cancel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4000902174573487903
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5923497699521027687}
|
||||
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: 1979839230795202451}
|
||||
m_Father: {fileID: 4878816101074468399}
|
||||
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: 210, y: -150}
|
||||
m_SizeDelta: {x: 313, y: 91}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7348237821025748982
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5923497699521027687}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &356920440688922164
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5923497699521027687}
|
||||
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: b545f49a479374ffaaec0c8f123b0c5f, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &5816777684468032703
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5923497699521027687}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 356920440688922164}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &6076086137757476783
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7527520206793245717}
|
||||
- component: {fileID: 717316905677608887}
|
||||
- component: {fileID: 2182669632864579474}
|
||||
m_Layer: 0
|
||||
m_Name: Text (TMP)_Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7527520206793245717
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6076086137757476783}
|
||||
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: 4878816101074468399}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: -2, y: -201.94122}
|
||||
m_SizeDelta: {x: 862.825, y: 279.6172}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &717316905677608887
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6076086137757476783}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2182669632864579474
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6076086137757476783}
|
||||
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: "R\u1EDDi kh\u1ECFi ho\xE0n m\u1EF9 ?"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 93.94
|
||||
m_fontSizeBase: 93.94
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8385824745593160430
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1979839230795202451}
|
||||
- component: {fileID: 926584410341277518}
|
||||
- component: {fileID: 7589457457506445651}
|
||||
m_Layer: 0
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1979839230795202451
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8385824745593160430}
|
||||
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: 4000902174573487903}
|
||||
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 &926584410341277518
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8385824745593160430}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7589457457506445651
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8385824745593160430}
|
||||
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: "H\u1EE7y"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 50
|
||||
m_fontSizeBase: 50
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c248d0510a114829b58d62d2ecc3b5e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -218,6 +218,139 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &335905991743982376
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1572942396405590444}
|
||||
- component: {fileID: 6524368999182548347}
|
||||
- component: {fileID: 3967330152047649732}
|
||||
- component: {fileID: 6939892946615024074}
|
||||
m_Layer: 5
|
||||
m_Name: ChangeSkillBtn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1572942396405590444
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 335905991743982376}
|
||||
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: 3145908486618148274}
|
||||
m_Father: {fileID: 3483809415181351540}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -718.8898, y: 36.854492}
|
||||
m_SizeDelta: {x: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6524368999182548347
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 335905991743982376}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3967330152047649732
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 335905991743982376}
|
||||
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: f0f6993d8df90de429f182e7d49a89f7, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6939892946615024074
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 335905991743982376}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 3967330152047649732}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1890210201668811196}
|
||||
m_TargetAssemblyTypeName: CECUIManager, Assembly-CSharp
|
||||
m_MethodName: OnChangeSkillShortcut
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &427315709131599085
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -490,6 +623,142 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &806379414455135824
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3424248442838442643}
|
||||
- component: {fileID: 8575635143285857700}
|
||||
- component: {fileID: 2564374985051604717}
|
||||
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 &3424248442838442643
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 806379414455135824}
|
||||
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: 7306104429597638794}
|
||||
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 &8575635143285857700
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 806379414455135824}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2564374985051604717
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 806379414455135824}
|
||||
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:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &921810299079476810
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1815,6 +2084,139 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &2782657052243972202
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7306104429597638794}
|
||||
- component: {fileID: 4294505687272824498}
|
||||
- component: {fileID: 1230139452348518632}
|
||||
- component: {fileID: 808265911987054922}
|
||||
m_Layer: 5
|
||||
m_Name: FlyBtn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7306104429597638794
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2782657052243972202}
|
||||
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: 3424248442838442643}
|
||||
m_Father: {fileID: 3483809415181351540}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -791.8898, y: -64.69995}
|
||||
m_SizeDelta: {x: 96, y: 96}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4294505687272824498
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2782657052243972202}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1230139452348518632
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2782657052243972202}
|
||||
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: 6080708437622403664, guid: 205ebb1fc3847174cb78c7574a2b5a7d, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &808265911987054922
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2782657052243972202}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 1230139452348518632}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1890210201668811196}
|
||||
m_TargetAssemblyTypeName: CECUIManager, Assembly-CSharp
|
||||
m_MethodName: OnClickFly
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: DlgTask
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &2872011510662580381
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3999,7 +4401,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -781, y: -66.70001}
|
||||
m_AnchoredPosition: {x: -898.4271, y: -67.48236}
|
||||
m_SizeDelta: {x: 85, y: 99}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6123887107398507141
|
||||
@@ -4817,8 +5219,10 @@ RectTransform:
|
||||
- {fileID: 984617901920738932}
|
||||
- {fileID: 2783469216819378410}
|
||||
- {fileID: 8913509984865075419}
|
||||
- {fileID: 7306104429597638794}
|
||||
- {fileID: 5823843793071880086}
|
||||
- {fileID: 1462603449517194619}
|
||||
- {fileID: 1572942396405590444}
|
||||
- {fileID: 7020286574697807252}
|
||||
- {fileID: 1491137607121893366}
|
||||
- {fileID: 6742883814524417716}
|
||||
@@ -4847,6 +5251,81 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_escapeBtn: {fileID: 2013061949432893537}
|
||||
--- !u!1 &7352847439676120744
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3145908486618148274}
|
||||
- component: {fileID: 7098900891199169049}
|
||||
- component: {fileID: 6088460147805800063}
|
||||
m_Layer: 5
|
||||
m_Name: hitbox
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3145908486618148274
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7352847439676120744}
|
||||
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: 1572942396405590444}
|
||||
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: 3.4105263, y: 3.4105263}
|
||||
m_SizeDelta: {x: 106.8, y: 70.421}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7098900891199169049
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7352847439676120744}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6088460147805800063
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7352847439676120744}
|
||||
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: 0.003921569}
|
||||
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 &7629826959126060481
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -7485,7 +7964,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 776624419558043962, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
|
||||
propertyPath: m_text
|
||||
value: 1162119
|
||||
value: 44650
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 848034462487949471, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
|
||||
@@ -47,7 +47,13 @@ MonoBehaviour:
|
||||
prefab: {fileID: 6830833846243993097, guid: 97dd1de3aba08a04980849e40d5c1ea4, type: 3}
|
||||
- id: MagicProgress1
|
||||
prefab: {fileID: 1126053271199039253, guid: 526d462bd8c87b74c9e461e80d028cb2, type: 3}
|
||||
- id: DlgPetList
|
||||
prefab: {fileID: 4055144938777527514, guid: 647d1810bb3e6e34e98b52167adec474, type: 3}
|
||||
- id: DlgPlayerOptions
|
||||
prefab: {fileID: 1813565726936289741, guid: a0e02be030755ab4a917523764fe4eef, type: 3}
|
||||
- id: DlgPetHatch
|
||||
prefab: {fileID: 3120870614492201289, guid: eaebf3351c396754fb983e0d5ba83e9a, type: 3}
|
||||
- id: DlgPetRec
|
||||
prefab: {fileID: 4739268381143404558, guid: 37f331119e0524018a0a7266aa257777, type: 3}
|
||||
- id: Win_Message2
|
||||
prefab: {fileID: 1590197940424963217, guid: 0c248d0510a114829b58d62d2ecc3b5e, type: 3}
|
||||
|
||||
@@ -38,15 +38,22 @@ namespace BrewMonster
|
||||
public byte nLevel;
|
||||
public byte nSight;
|
||||
public byte nWaterEffect;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bSimpleTerrain;
|
||||
public byte nTreeDetail;
|
||||
public byte nGrassDetail;
|
||||
public byte nCloudDetail;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bShadow;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMipMapBias;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bFullGlow;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bSpaceWarp;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bSunFlare;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAdvancedWater;
|
||||
public byte nSoundVol;
|
||||
public byte nMusicVol;
|
||||
@@ -55,9 +62,13 @@ namespace BrewMonster
|
||||
public int iRndHeight;
|
||||
public int iTexDetail;
|
||||
public int iSoundQuality;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bFullScreen;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bWideScreen;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bVSync;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bScaleUI;
|
||||
public int iTheme;
|
||||
|
||||
@@ -124,35 +135,58 @@ namespace BrewMonster
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct EC_VIDEO_SETTING
|
||||
{
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerHP;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerMP;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerEXP;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerHeadText;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerName;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerFaction;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerTitle;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerShop;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerSelfName;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerTalk;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerBubble;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMonsterName;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bNPCName;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bGoodsName;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bModelLimit;
|
||||
public byte nDistance;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMapMonster;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMapNPC;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMapPlayer;
|
||||
public byte nEffect;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bShowCustomize;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = EC_ConfigConstants.EC_COMBOSKILL_NUM)]
|
||||
public EC_COMBOSKILL[] comboSkill;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPlayerForce;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bMailToFriendsRemind;
|
||||
public int iMailToFriendsCheckTime;
|
||||
public char cTabSelType;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bActivityRemind;
|
||||
public int ibActivityReminderCheckTime;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bCloseMeridiansHint;
|
||||
|
||||
public void Reset()
|
||||
@@ -253,42 +287,94 @@ namespace BrewMonster
|
||||
bCloseMeridiansHint = reader.ReadBoolean();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Game Settings Structure
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
// CharSet.Ansi required so szAutoReply matches C++ ACHAR[65] (1 byte/char); default is Unicode (2 bytes/char).
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
|
||||
public struct EC_GAME_SETTING
|
||||
{
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bNoTeamRequest;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bNoTradeRequest;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bTurnaround;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bReverseWheel;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = EC_ConfigConstants.EC_USERCHANNEL_NUM * 15)] // GP_CHAT_MAX = 15
|
||||
public bool[] bChannel;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = EC_ConfigConstants.EC_USERCHANNEL_NUM * 15, ArraySubType = UnmanagedType.I1)] // GP_CHAT_MAX = 15; I1 = 1 byte per bool to match C++ bool[6][15]
|
||||
public byte[] bChannel; // I can't use bool[] here because C# bool is 1 byte but C++ bool is also 1 byte, so we use byte[] to match the size and layout of the original C++ struct.
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAutoReply;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)]
|
||||
public string szAutoReply;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)]
|
||||
public ushort[] szAutoReply; // Using ushort[] to match C++ ACHAR[65] (1 byte/char) with CharSet.Ansi; we will convert to string when reading/writing.
|
||||
|
||||
/// <summary>Convert szAutoReply buffer (UTF-8 bytes stored as ushort) to string.</summary>
|
||||
public static string SzAutoReplyToString(ushort[] buf)
|
||||
{
|
||||
if (buf == null || buf.Length == 0) return string.Empty;
|
||||
int n = 0;
|
||||
while (n < buf.Length && buf[n] != 0) n++;
|
||||
if (n == 0) return string.Empty;
|
||||
var bytes = new byte[n];
|
||||
for (int i = 0; i < n; i++) bytes[i] = (byte)buf[i];
|
||||
return Encoding.UTF8.GetString(bytes);
|
||||
}
|
||||
|
||||
/// <summary>Write string into szAutoReply buffer as null-terminated UTF-8 (each byte stored as ushort).</summary>
|
||||
public static void StringToSzAutoReply(string s, ushort[] buf)
|
||||
{
|
||||
if (buf == null || buf.Length == 0) return;
|
||||
int maxLen = Math.Min(EC_ConfigConstants.EC_AUTOREPLY_LEN, buf.Length - 1);
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(s ?? string.Empty);
|
||||
int n = Math.Min(bytes.Length, maxLen);
|
||||
for (int i = 0; i < n; i++) buf[i] = bytes[i];
|
||||
buf[n] = 0;
|
||||
for (int i = n + 1; i < buf.Length; i++) buf[i] = 0;
|
||||
}
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public float fCamTurnSpeed;
|
||||
public float fCamZoomSpeed;
|
||||
public byte nFontSize;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAtk_Player;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAtk_NoMafia;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAtk_NoWhite;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bFontBold;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBls_NoRed;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBls_NoMafia;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBls_Self;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBlsRefuse_Neutral;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bHideAutoGuide;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAtk_NoAlliance;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBls_NoAlliance;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBlsRefuse_NonTeammate;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAtk_NoForce;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bBls_NoForce;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bLockQuickBar;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bPetAutoSkill;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAutoTeamForTask;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bDisableAutoWikiHelp;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bExclusiveAwardMode;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bHideIceThunderBall;
|
||||
|
||||
public void Reset()
|
||||
@@ -298,7 +384,7 @@ namespace BrewMonster
|
||||
bTurnaround = false;
|
||||
bReverseWheel = false;
|
||||
bAutoReply = false;
|
||||
szAutoReply = "";
|
||||
szAutoReply = new ushort[EC_ConfigConstants.EC_AUTOREPLY_LEN + 1]; // empty string (first byte 0)
|
||||
fCamTurnSpeed = 10.0f;
|
||||
fCamZoomSpeed = 1.0f;
|
||||
nFontSize = 2;
|
||||
@@ -324,7 +410,7 @@ namespace BrewMonster
|
||||
bHideIceThunderBall = false;
|
||||
|
||||
// Initialize channel array with default values
|
||||
bChannel = new bool[EC_ConfigConstants.EC_USERCHANNEL_NUM * 15];
|
||||
bChannel = new byte[EC_ConfigConstants.EC_USERCHANNEL_NUM * 15];
|
||||
bool[,] a_bChannel = new bool[,]
|
||||
{
|
||||
{ true, true, true, true, true, false, false, true, true, true, false, true, true, true, true },
|
||||
@@ -339,7 +425,7 @@ namespace BrewMonster
|
||||
{
|
||||
for (int j = 0; j < 15; j++)
|
||||
{
|
||||
bChannel[i * 15 + j] = a_bChannel[i, j];
|
||||
bChannel[i * 15 + j] = (byte)(a_bChannel[i, j] ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -359,7 +445,7 @@ namespace BrewMonster
|
||||
{
|
||||
for (int i = 0; i < EC_ConfigConstants.EC_USERCHANNEL_NUM * 15; i++)
|
||||
{
|
||||
bChannel[i] = reader.ReadBoolean();
|
||||
bChannel[i] = (byte)(reader.ReadBoolean() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
else if (dwVer >= 26)
|
||||
@@ -367,7 +453,7 @@ namespace BrewMonster
|
||||
for (int i = 0; i < EC_ConfigConstants.EC_USERCHANNEL_NUM * 14; i++)
|
||||
{
|
||||
if (i < bChannel.Length)
|
||||
bChannel[i] = reader.ReadBoolean();
|
||||
bChannel[i] = (byte)(reader.ReadBoolean() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -375,12 +461,17 @@ namespace BrewMonster
|
||||
for (int i = 0; i < EC_ConfigConstants.EC_USERCHANNEL_NUM * 13; i++)
|
||||
{
|
||||
if (i < bChannel.Length)
|
||||
bChannel[i] = reader.ReadBoolean();
|
||||
bChannel[i] = (byte)(reader.ReadBoolean() ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
bAutoReply = reader.ReadBoolean();
|
||||
szAutoReply = Encoding.UTF8.GetString(reader.ReadBytes(EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)).TrimEnd('\0');
|
||||
// Binary format: 65 bytes UTF-8; store each byte in ushort[] for struct layout
|
||||
if (szAutoReply == null || szAutoReply.Length < EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)
|
||||
szAutoReply = new ushort[EC_ConfigConstants.EC_AUTOREPLY_LEN + 1];
|
||||
byte[] autoReplyBytes = reader.ReadBytes(EC_ConfigConstants.EC_AUTOREPLY_LEN + 1);
|
||||
for (int i = 0; i < autoReplyBytes.Length; i++)
|
||||
szAutoReply[i] = autoReplyBytes[i];
|
||||
fCamTurnSpeed = reader.ReadSingle();
|
||||
fCamZoomSpeed = reader.ReadSingle();
|
||||
nFontSize = reader.ReadByte();
|
||||
@@ -472,6 +563,7 @@ namespace BrewMonster
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ITEM_GROUP
|
||||
{
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool enable;
|
||||
public int item;
|
||||
public sbyte percent;
|
||||
@@ -701,7 +793,9 @@ namespace BrewMonster
|
||||
public uint m_dwDefAmbient;
|
||||
|
||||
// Test code, temporary parameters
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool m_bShowForest = true;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool m_bShowGrassLand = true;
|
||||
|
||||
// Configs user cannot change
|
||||
@@ -721,32 +815,48 @@ namespace BrewMonster
|
||||
private string m_strWindowsTitle = "Element Client";
|
||||
private string m_strMiniDLTitle = "";
|
||||
private int m_iClientID = -1;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bRegisterUIScriptFunc = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bEnableGT = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bEnableArc = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bEnableArcAsia = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bMiniClient = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bSendLogicCheckInfo = false;
|
||||
private List<string> m_strThemeFiles = new List<string>();
|
||||
|
||||
// DEBUG only settings
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bConsole = false;
|
||||
private int m_iRTDebug = 1;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bShowNPCID = false;
|
||||
private float m_fRunSpeed = 5.0f;
|
||||
private float m_fWalkSpeed = 2.0f;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bTestDist = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bShowPos = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bGameStat = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bShowID = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bSkipFrame = false;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bModelUpt = true;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bDebugFog = false;
|
||||
private float m_fDebugFogStart = 10.0f;
|
||||
private float m_fDebugFogEnd = 100.0f;
|
||||
private float m_fDebugFogDensity = 0.5f;
|
||||
private uint m_dwDebugFogColor = 0xFFFFFFFF;
|
||||
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
private bool m_bAdjusting = false;
|
||||
|
||||
// User settings
|
||||
@@ -1063,6 +1173,32 @@ namespace BrewMonster
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write user config data into buffer at given offset. 在指定偏移处写入用户配置数据。
|
||||
/// </summary>
|
||||
public bool SaveUserConfigData(byte[] pDataBuf, int startIndex, out int piSize)
|
||||
{
|
||||
if (startIndex < 0) { piSize = 0; return false; }
|
||||
piSize = 0;
|
||||
int iTotalSize = 0;
|
||||
iTotalSize += sizeof(uint);
|
||||
iTotalSize += Marshal.SizeOf(typeof(EC_VIDEO_SETTING));
|
||||
iTotalSize += Marshal.SizeOf(typeof(EC_GAME_SETTING));
|
||||
iTotalSize += Marshal.SizeOf(typeof(EC_BLACKLIST_SETTING));
|
||||
iTotalSize += Marshal.SizeOf(typeof(EC_COMPUTER_AIDED_SETTING));
|
||||
|
||||
if (pDataBuf != null && startIndex + iTotalSize <= pDataBuf.Length)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream(pDataBuf, startIndex, pDataBuf.Length - startIndex))
|
||||
using (BinaryWriter writer = new BinaryWriter(ms))
|
||||
{
|
||||
writer.Write((uint)EC_ConfigConstants.EC_CONFIG_VERSION);
|
||||
}
|
||||
}
|
||||
piSize = iTotalSize;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void DefaultUserConfigData()
|
||||
{
|
||||
DefaultUserSettings(ref m_ss, ref m_vs, ref m_gs, ref m_bs, ref m_cas);
|
||||
@@ -1246,9 +1382,12 @@ namespace BrewMonster
|
||||
private void Verify()
|
||||
{
|
||||
// Verify game setting
|
||||
if (m_gs.szAutoReply != null && m_gs.szAutoReply.Length > EC_ConfigConstants.EC_AUTOREPLY_LEN)
|
||||
string autoReplyStr = EC_GAME_SETTING.SzAutoReplyToString(m_gs.szAutoReply);
|
||||
if (autoReplyStr.Length > EC_ConfigConstants.EC_AUTOREPLY_LEN)
|
||||
{
|
||||
m_gs.szAutoReply = m_gs.szAutoReply.Substring(0, EC_ConfigConstants.EC_AUTOREPLY_LEN);
|
||||
if (m_gs.szAutoReply == null || m_gs.szAutoReply.Length < EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)
|
||||
m_gs.szAutoReply = new ushort[EC_ConfigConstants.EC_AUTOREPLY_LEN + 1];
|
||||
EC_GAME_SETTING.StringToSzAutoReply(autoReplyStr.Substring(0, EC_ConfigConstants.EC_AUTOREPLY_LEN), m_gs.szAutoReply);
|
||||
}
|
||||
|
||||
if (m_gs.nFontSize > 4)
|
||||
@@ -1347,6 +1486,7 @@ namespace BrewMonster
|
||||
|
||||
public void SaveBlockedID()
|
||||
{
|
||||
// TODO
|
||||
// Note: Would need character ID
|
||||
// string strDir = Path.Combine(Application.persistentDataPath, "userdata", "blacklist");
|
||||
// Directory.CreateDirectory(strDir);
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
// Filename : EC_PendingAction.cs
|
||||
// Creator : Xu Wenbin
|
||||
// Date : 2011/11/09
|
||||
// Converted from C++: EC_PendingAction.cpp / EC_PendingAction.h
|
||||
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.UI;
|
||||
using CSNetwork;
|
||||
using UnityEngine;
|
||||
|
||||
// Logout type constants (C++: gnetdef.h)
|
||||
// _PLAYER_LOGOUT_FULL 0, _PLAYER_LOGOUT_HALF 1
|
||||
public static class PendingActionConstants
|
||||
{
|
||||
public const int _PLAYER_LOGOUT_FULL = 0;
|
||||
public const int _PLAYER_LOGOUT_HALF = 1;
|
||||
}
|
||||
|
||||
// CECPendingAction — base class for delayed/pending actions
|
||||
public abstract class CECPendingAction
|
||||
{
|
||||
// 执行的时限 / Execution time limit
|
||||
private readonly CECCounter m_Counter;
|
||||
// 是否还需要执行 / Whether still needs to execute
|
||||
private bool m_bNeedExecute;
|
||||
// 是否收到外界执行指示 / Whether received external execute trigger
|
||||
private bool m_bTriggered;
|
||||
// 执行结果:是否成功执行 / Execute result: whether executed successfully
|
||||
private bool m_bExecuteResult;
|
||||
|
||||
public CECPendingAction(uint dwTimerPeriod)
|
||||
{
|
||||
m_Counter = new CECCounter();
|
||||
m_Counter.SetPeriod((float)dwTimerPeriod);
|
||||
m_bNeedExecute = true;
|
||||
m_bTriggered = false;
|
||||
m_bExecuteResult = false;
|
||||
}
|
||||
|
||||
public void Update(uint dwElapsedTime)
|
||||
{
|
||||
if (GetNeedExecute())
|
||||
{
|
||||
// 每次都尝试执行 / Try execute every time
|
||||
if (m_Counter.IncCounter((float)dwElapsedTime))
|
||||
{
|
||||
// 计时器到 / Timer reached
|
||||
// 强制执行 / Force execute
|
||||
m_bExecuteResult = Execute();
|
||||
// 不需要再进行尝试 / No need to try again
|
||||
m_bNeedExecute = false;
|
||||
}
|
||||
// else 计时中 / else counting
|
||||
}
|
||||
}
|
||||
|
||||
public void Trigger()
|
||||
{
|
||||
if (!GetNeedExecute())
|
||||
{
|
||||
// 计时器已经强制执行,不需要再触发执行 / Timer already forced execute, no need to trigger again
|
||||
return;
|
||||
}
|
||||
if (GetTriggered())
|
||||
{
|
||||
// 不允许多次触发 / Multiple trigger not allowed
|
||||
return;
|
||||
}
|
||||
m_bTriggered = true;
|
||||
m_bExecuteResult = Execute();
|
||||
m_bNeedExecute = false;
|
||||
}
|
||||
|
||||
public bool GetNeedExecute() => m_bNeedExecute;
|
||||
public bool GetTriggered() => m_bTriggered;
|
||||
|
||||
public abstract string GetName();
|
||||
|
||||
protected abstract bool Execute();
|
||||
|
||||
// Whether currently in game (session connected, game state in-game, host ready)
|
||||
protected bool IsInGame()
|
||||
{
|
||||
var pSession = GetGameSession();
|
||||
var pGameRun = GetGameRun();
|
||||
var pHost = pGameRun?.GetHostPlayer();
|
||||
return pSession != null
|
||||
&& pSession.IsConnected
|
||||
&& pGameRun != null
|
||||
&& pGameRun.GetGameState() == (int)GameState.GS_GAME
|
||||
&& pHost != null
|
||||
&& pHost.HostIsReady();
|
||||
}
|
||||
|
||||
protected static CECGameRun GetGameRun() => EC_Game.GetGameRun();
|
||||
protected static GameSession GetGameSession() => UnityGameSession.Instance?.GameSession;
|
||||
protected static CECHostPlayer GetHostPlayer() => GetGameRun()?.GetHostPlayer();
|
||||
}
|
||||
|
||||
// 游戏小退 / Game logout (half — back to select role)
|
||||
public class CECPendingLogoutHalf : CECPendingAction
|
||||
{
|
||||
public CECPendingLogoutHalf(uint dwTimerPeriod = 5000) : base(dwTimerPeriod) { }
|
||||
|
||||
protected override bool Execute()
|
||||
{
|
||||
bool bSuccess = false;
|
||||
if (IsInGame())
|
||||
{
|
||||
GetGameSession().SendPlayerLogout(PendingActionConstants._PLAYER_LOGOUT_HALF);
|
||||
bSuccess = true;
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
public override string GetName() => "CECPendingLogoutHalf";
|
||||
}
|
||||
|
||||
// 游戏大退 / Game logout (full — account logout)
|
||||
public class CECPendingLogoutFull : CECPendingAction
|
||||
{
|
||||
public CECPendingLogoutFull(uint dwTimerPeriod = 5000) : base(dwTimerPeriod) { }
|
||||
|
||||
protected override bool Execute()
|
||||
{
|
||||
bool bSuccess = false;
|
||||
if (IsInGame())
|
||||
{
|
||||
GetGameSession().SendPlayerLogout(PendingActionConstants._PLAYER_LOGOUT_FULL);
|
||||
bSuccess = true;
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
public override string GetName() => "CECPendingLogoutFull";
|
||||
}
|
||||
|
||||
// 寄售角色 / Selling role
|
||||
public class CECPendingSellingRole : CECPendingAction
|
||||
{
|
||||
public CECPendingSellingRole(uint dwTimerPeriod = 5000) : base(dwTimerPeriod) { }
|
||||
|
||||
protected override bool Execute()
|
||||
{
|
||||
bool bSuccess = false;
|
||||
if (IsInGame())
|
||||
{
|
||||
GetGameSession().SendPlayerLogout(PendingActionConstants._PLAYER_LOGOUT_HALF);
|
||||
GetGameRun().SetSellingRoleID(GetHostPlayer().GetCharacterID());
|
||||
bSuccess = true;
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
public override string GetName() => "CECPendingSellingRole";
|
||||
}
|
||||
|
||||
// 跨服小退 / Cross-server logout (half)
|
||||
public class CECPendingLogoutCrossServer : CECPendingAction
|
||||
{
|
||||
public CECPendingLogoutCrossServer(uint dwTimerPeriod = 5000) : base(dwTimerPeriod) { }
|
||||
|
||||
protected override bool Execute()
|
||||
{
|
||||
GetGameRun().SetLogoutFlag(2);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override string GetName() => "CECPendingLogoutCrossServer";
|
||||
}
|
||||
|
||||
// 进出跨服 / Cross-server get in or out
|
||||
// m_bGetIn: 进入跨服时为 true;否则为 false / true when entering cross-server; otherwise false
|
||||
public class CECPendingCrossServerGetInOut : CECPendingAction
|
||||
{
|
||||
private readonly bool m_bGetIn;
|
||||
|
||||
public CECPendingCrossServerGetInOut(bool bGetIn, uint dwTimerPeriod = 5000)
|
||||
: base(dwTimerPeriod)
|
||||
{
|
||||
m_bGetIn = bGetIn;
|
||||
}
|
||||
|
||||
protected override bool Execute()
|
||||
{
|
||||
bool bSuccess = false;
|
||||
if (IsInGame())
|
||||
{
|
||||
var session = GetGameSession();
|
||||
if (session != null)
|
||||
{
|
||||
if (m_bGetIn)
|
||||
session.c2s_CmdNPCSevCrossServerGetIn();
|
||||
else
|
||||
session.c2s_CmdNPCSevCrossServerGetOut();
|
||||
}
|
||||
}
|
||||
var pGameUIMan = GetGameRun()?.GetUIManager()?.GetInGameUIMan();
|
||||
if (pGameUIMan is CECGameUIMan inGameUIMan)
|
||||
inGameUIMan.EndNPCService();
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
public override string GetName() => "CECPendingCrossServerGetInOut";
|
||||
}
|
||||
|
||||
// CECPendingActionArray — container for multiple pending actions
|
||||
public class CECPendingActionArray
|
||||
{
|
||||
private readonly List<CECPendingAction> m_actions = new List<CECPendingAction>();
|
||||
private bool m_bAllowMultiActions;
|
||||
|
||||
public CECPendingActionArray(bool bAllowMultiActions)
|
||||
{
|
||||
m_bAllowMultiActions = bAllowMultiActions;
|
||||
}
|
||||
|
||||
~CECPendingActionArray()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
public void Append(CECPendingAction pAction)
|
||||
{
|
||||
// 添加新事件 / Add new event
|
||||
if (pAction == null)
|
||||
{
|
||||
Debug.Assert(false);
|
||||
return;
|
||||
}
|
||||
if (!pAction.GetNeedExecute())
|
||||
{
|
||||
Debug.Assert(false);
|
||||
return;
|
||||
}
|
||||
if (!GetAllowMultiAction())
|
||||
Clear();
|
||||
m_actions.Add(pAction);
|
||||
}
|
||||
|
||||
public void AppendForSaveConfig(CECPendingAction pAction)
|
||||
{
|
||||
if (pAction == null)
|
||||
{
|
||||
Debug.Assert(false);
|
||||
return;
|
||||
}
|
||||
if (!pAction.GetNeedExecute())
|
||||
{
|
||||
Debug.Assert(false);
|
||||
return;
|
||||
}
|
||||
uint saveResult = EC_Game.GetGameRun().SaveConfigsToServer();
|
||||
if (saveResult != 2)
|
||||
{
|
||||
pAction.Trigger();
|
||||
return;
|
||||
}
|
||||
Append(pAction);
|
||||
}
|
||||
|
||||
public void Update(uint dwElapsedTime)
|
||||
{
|
||||
if (m_actions.Count == 0) return;
|
||||
|
||||
for (int i = m_actions.Count - 1; i >= 0; i--)
|
||||
{
|
||||
CECPendingAction pAction = m_actions[i];
|
||||
pAction.Update(dwElapsedTime);
|
||||
if (!pAction.GetNeedExecute())
|
||||
{
|
||||
m_actions.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerAll()
|
||||
{
|
||||
if (m_actions.Count == 0) return;
|
||||
|
||||
foreach (var pAction in m_actions)
|
||||
{
|
||||
if (pAction.GetNeedExecute())
|
||||
pAction.Trigger();
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
// 清除当前所有事件 / Clear all current events
|
||||
if (m_actions.Count == 0) return;
|
||||
|
||||
m_actions.Clear();
|
||||
}
|
||||
|
||||
public void SetAllowMultiAction(bool bAllow)
|
||||
{
|
||||
if (GetAllowMultiAction() == bAllow) return;
|
||||
|
||||
m_bAllowMultiActions = bAllow;
|
||||
|
||||
// 按时间先后顺序,只保留队列最后一个 / By time order, keep only the last one in queue
|
||||
if (!bAllow && m_actions.Count > 1)
|
||||
{
|
||||
var last = m_actions[m_actions.Count - 1];
|
||||
m_actions.Clear();
|
||||
m_actions.Add(last);
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetAllowMultiAction() => m_bAllowMultiActions;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8fc69213d734cb49b1b381a760ae418
|
||||
timeCreated: 1770180043
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using EditorAttributes;
|
||||
// using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class TestByteNumber : MonoBehaviour
|
||||
{
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[ContextMenu("Test")]
|
||||
public void Test()
|
||||
{
|
||||
var origin = Marshal.SizeOf<EC_COMPUTER_AIDED_SETTING>();
|
||||
var diff = Marshal.SizeOf<EC_GAME_SETTING>() - Marshal.SizeOf<EC_GAME_SETTING_TEST>();
|
||||
BMLogger.Log($" Origin : {origin } - diff = {diff}"); // 255
|
||||
}
|
||||
|
||||
[ContextMenu(" TestCompress")]
|
||||
public void TestCompress()
|
||||
{
|
||||
int value = 123456;
|
||||
byte[] src = BitConverter.GetBytes(value);
|
||||
|
||||
int dstLen = 10000;
|
||||
byte[] dst = new byte[dstLen];
|
||||
|
||||
int res = AFilePackage.Compress( src, 0, src.Length, dst, 0, ref dstLen);
|
||||
|
||||
BMLogger.Log($" Res : {res} - srcLen = {src.Length} - dstLen = {dstLen} - compressed data: {BitConverter.ToString(dst, 0, dstLen)}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
|
||||
public struct EC_GAME_SETTING_TEST
|
||||
{
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bNoTeamRequest;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bNoTradeRequest;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bTurnaround;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bReverseWheel;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = EC_ConfigConstants.EC_USERCHANNEL_NUM * 15,
|
||||
ArraySubType = UnmanagedType.I1)] // GP_CHAT_MAX = 15; I1 = 1 byte per bool to match C++ bool[6][15]
|
||||
public byte[] bChannel;
|
||||
[MarshalAs(UnmanagedType.U1)]
|
||||
public bool bAutoReply;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = EC_ConfigConstants.EC_AUTOREPLY_LEN + 1)]
|
||||
public string szAutoReply;
|
||||
|
||||
[MarshalAs(UnmanagedType.U1)] public float fCamTurnSpeed;
|
||||
public float fCamZoomSpeed;
|
||||
public byte nFontSize;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAtk_Player;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAtk_NoMafia;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAtk_NoWhite;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bFontBold;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBls_NoRed;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBls_NoMafia;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBls_Self;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBlsRefuse_Neutral;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bHideAutoGuide;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAtk_NoAlliance;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBls_NoAlliance;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBlsRefuse_NonTeammate;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAtk_NoForce;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bBls_NoForce;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bLockQuickBar;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bPetAutoSkill;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bAutoTeamForTask;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bDisableAutoWikiHelp;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bExclusiveAwardMode;
|
||||
[MarshalAs(UnmanagedType.U1)] public bool bHideIceThunderBall;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67551ceb317224e67b8140cbe7175c44
|
||||
@@ -2907,7 +2907,7 @@ namespace BrewMonster
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_icon; // icon file
|
||||
public string FileIcon => ByteToStringUtils.ByteArrayToUnicodeString(file_icon );
|
||||
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
|
||||
|
||||
public uint character_combo_id; // character combo id
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ using System.Buffers.Binary;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrewMonster.Network;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class CECNPCMan : IMsgHandler
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CSNetwork.GPDataType;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.Scripts.CECHPWorkSpell.Spell_magic_state;
|
||||
namespace BrewMonster.Scripts
|
||||
|
||||
@@ -6,7 +6,6 @@ using CSNetwork.GPDataType;
|
||||
using System;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using PerfectWorld.Scripts;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace BrewMonster.Scripts
|
||||
/// <summary>
|
||||
/// Get use time counter / 获取使用时间计数器
|
||||
/// </summary>
|
||||
public CECCounter GetUseTimeCnt()
|
||||
public CECCounter GetTimeCounter()
|
||||
{
|
||||
return m_UseTimeCnt;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace BrewMonster
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.P))
|
||||
{
|
||||
OnCommandSummon(2);
|
||||
//OnCommandSummon(2);
|
||||
EC_Game.GetGameRun().GetUIManager().GetInGameUIMan().PopupPetListDialog();
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.H))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster.Scripts.Managers
|
||||
@@ -60,7 +59,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
}
|
||||
}
|
||||
|
||||
public void Resize(int iNewSize)
|
||||
public virtual void Resize(int iNewSize)
|
||||
{
|
||||
int oldSize = m_aItems.Length;
|
||||
if (iNewSize < 0) iNewSize = 0;
|
||||
@@ -129,6 +128,42 @@ namespace BrewMonster.Scripts.Managers
|
||||
m_aItems[iSlot2] = tmp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Place or stack item in a specific slot (server-specified slot). Matches C++ expectation that client uses same slot as server.
|
||||
/// </summary>
|
||||
public bool PutItemInSlot(int iSlot, int tid, int iExpireDate, int iAmount, out int piLastSlot, out int piLastAmount)
|
||||
{
|
||||
piLastSlot = -1;
|
||||
piLastAmount = 0;
|
||||
if (iSlot < 0 || iSlot >= m_aItems.Length || iAmount <= 0)
|
||||
return false;
|
||||
|
||||
var slotItem = m_aItems[iSlot];
|
||||
if (slotItem == null)
|
||||
{
|
||||
var newItem = EC_IvtrItem.CreateItem(tid, iExpireDate, iAmount);
|
||||
if (newItem == null)
|
||||
return false;
|
||||
newItem.Slot = iSlot;
|
||||
newItem.SetCount(iAmount);
|
||||
m_aItems[iSlot] = newItem;
|
||||
piLastSlot = iSlot;
|
||||
piLastAmount = iAmount;
|
||||
return true;
|
||||
}
|
||||
if (slotItem.GetTemplateID() != tid)
|
||||
return false;
|
||||
int pileLimit = Math.Max(1, EC_IvtrItem.GetPileLimit(tid));
|
||||
int canAdd = Math.Max(0, pileLimit - Math.Max(0, slotItem.GetCount()));
|
||||
if (canAdd <= 0)
|
||||
return false;
|
||||
int add = Math.Min(canAdd, iAmount);
|
||||
slotItem.AddAmount(add);
|
||||
piLastSlot = iSlot;
|
||||
piLastAmount = slotItem.GetCount();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool MergeItem(int tid, int iExpireDate, int iAmount, out int piLastSlot, out int piLastAmount)
|
||||
{
|
||||
piLastSlot = -1;
|
||||
@@ -170,6 +205,9 @@ namespace BrewMonster.Scripts.Managers
|
||||
return false;
|
||||
}
|
||||
var newItem = EC_IvtrItem.CreateItem(tid, iExpireDate, iAmount);
|
||||
if (newItem == null)
|
||||
return false;
|
||||
newItem.Slot = firstEmpty;
|
||||
newItem.SetCount(iAmount);
|
||||
|
||||
m_aItems[firstEmpty] = newItem;
|
||||
|
||||
@@ -3,6 +3,8 @@ using BrewMonster.Common;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using BrewMonster.Scripts.Task.UI;
|
||||
using BrewMonster.UI;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
@@ -16,15 +18,16 @@ using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
public class EC_InventoryUI : MonoBehaviour
|
||||
public class EC_InventoryUI : AUIDialog, IRefreshLayout
|
||||
{
|
||||
|
||||
[Header("Pack Buttons (assign in Inspector)")]
|
||||
[SerializeField] private List<Button> inventoryPackButtons = new List<Button>(); // byPackage: 0
|
||||
[SerializeField] private List<Button> equipmentPackButtons = new List<Button>(); // byPackage: 1
|
||||
[SerializeField] private List<Button> fashionPackButtons = new List<Button>(); // byPackage: 3
|
||||
|
||||
[Header("Detail Panel (assign in Inspector)")]
|
||||
[SerializeField] private GameObject detailPanelRoot;
|
||||
[SerializeField] private ItemInfo detailPanelRoot;
|
||||
[SerializeField] private Vector2 detailPanelOffset = new Vector2(20f, 0f);
|
||||
[SerializeField] private bool hideDetailOnStart = true;
|
||||
[SerializeField] private EC_UIUtility.TextOutlet nameText;
|
||||
@@ -127,6 +130,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
// Ensure cached values are pushed when the UI is enabled
|
||||
ApplyPendingCurrency();
|
||||
ShowDetailPanel(false);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@@ -325,9 +329,9 @@ namespace BrewMonster.Scripts.Managers
|
||||
currentSelectedEquipment = CreateEquipmentFromItemData(itemData);
|
||||
|
||||
// Position detail panel near the clicked item button
|
||||
PositionDetailPanelNearButton(package, slot);
|
||||
|
||||
FillDetailPanel(package, itemData);
|
||||
PositionDetailPanelNearButton(package, slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -957,7 +961,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
|
||||
private void ShowDetailPanel(bool show)
|
||||
{
|
||||
EC_UIUtility.ShowPanel(detailPanelRoot, show);
|
||||
EC_UIUtility.ShowPanel(detailPanelRoot.gameObject, show);
|
||||
}
|
||||
|
||||
private Button GetButtonForSlot(byte package, int slot)
|
||||
@@ -1059,7 +1063,7 @@ namespace BrewMonster.Scripts.Managers
|
||||
// Show panel first
|
||||
// 先显示面板
|
||||
ShowDetailPanel(true);
|
||||
|
||||
descriptionText.tmp.gameObject.GetComponent<ItemInfoText>()?.RefreshLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -1080,8 +1084,17 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
if (package == PKG_INVENTORY)
|
||||
{
|
||||
tmpText.text = "Equip";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
//if item is @EC_IvtrEquip and is not equipped, show equip button
|
||||
if(item is EC_IvtrEquip)
|
||||
{
|
||||
tmpText.text = "Equip";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpText.text = "Use";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
else if (package == PKG_EQUIPMENT)
|
||||
{
|
||||
@@ -1098,8 +1111,16 @@ namespace BrewMonster.Scripts.Managers
|
||||
{
|
||||
if (package == PKG_INVENTORY)
|
||||
{
|
||||
buttonText.text = "Equip";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
if(item is EC_IvtrEquip)
|
||||
{
|
||||
buttonText.text = "Equip";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonText.text = "Use";
|
||||
equipButton.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
else if (package == PKG_EQUIPMENT)
|
||||
{
|
||||
@@ -1265,5 +1286,16 @@ namespace BrewMonster.Scripts.Managers
|
||||
draggedItemSourceSlot = -1;
|
||||
draggedItemSourcePackage = 0;
|
||||
}
|
||||
public void RefreshLayout()
|
||||
{
|
||||
var rectTransform = GetComponent<RectTransform>();
|
||||
if (rectTransform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
rectTransform.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(rectTransform);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,6 @@ using System.Text.RegularExpressions;
|
||||
using System.Reflection;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using CSNetwork.Protocols;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace PerfectWorld.Scripts.Managers
|
||||
{
|
||||
|
||||
@@ -435,6 +435,8 @@ namespace PerfectWorld.Scripts.Managers
|
||||
return ByteToStringUtils.ByteArrayToCP936String(m_pDBEssence.file_matter);
|
||||
}
|
||||
|
||||
// Get essence data
|
||||
public IVTR_ESSENCE_PETEGG GetEssence() { return m_Essence; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,9 @@ namespace PerfectWorld.Scripts.Managers
|
||||
}
|
||||
TransmitMessage(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_PM_PLAYEREXIT:
|
||||
OnMsgPlayerExit(Msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -819,6 +822,13 @@ namespace PerfectWorld.Scripts.Managers
|
||||
}
|
||||
}
|
||||
}
|
||||
// Handler of MSG_PM_PLAYEREXIT
|
||||
public bool OnMsgPlayerExit(ECMSG Msg)
|
||||
{
|
||||
cmd_player_leave_world pCmd = GPDataTypeHelper.FromBytes<cmd_player_leave_world>((byte[])Msg.dwParam1);
|
||||
ElsePlayerLeave(pCmd.id, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
public struct EC_PLAYERLOADRESULT
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
|
||||
@@ -178,7 +178,9 @@ namespace AutoMove
|
||||
open.Push(m_ptStart, Heuristic(m_ptStart, m_ptGoal));
|
||||
|
||||
int expands = 0;
|
||||
int maxExpand = nMaxExpand > 0 ? nMaxExpand : 200000;
|
||||
//ToDo: need use another method to caculate the value of maxExpand
|
||||
//800000 is a magic number, need to be optimized
|
||||
int maxExpand = nMaxExpand > 0 ? nMaxExpand : 800000;
|
||||
|
||||
while (open.Count > 0 && expands < maxExpand)
|
||||
{
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
using Animancer;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.PerfectWorld.Scripts.Vfx;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts.Skills;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
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;
|
||||
|
||||
@@ -4,9 +4,6 @@ using ModelRenderer.Scripts.GameData;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using static CECNPC;
|
||||
|
||||
public class CECMonster : CECNPC
|
||||
{
|
||||
|
||||
@@ -1618,6 +1618,19 @@ namespace CSNetwork.S2CCommand
|
||||
{
|
||||
public int[] cmdParams;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct CONTENTNPCSevHatchPet
|
||||
{
|
||||
public int iIvtrIdx;
|
||||
public int idEgg;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct CONTENTNPCSevRestorePet
|
||||
{
|
||||
public int iPetIdx;
|
||||
};
|
||||
}
|
||||
|
||||
// Player and NPC state
|
||||
@@ -1066,5 +1066,34 @@ namespace CSNetwork.C2SCommand
|
||||
}
|
||||
return SerializeCommand(icmd, cmd, false);
|
||||
}
|
||||
|
||||
public static Octets CreateNPCSevHatchPetCmd(int i_IvtrIdx, int i_idEgg)
|
||||
{
|
||||
var cmd = new cmd_sevnpc_serve
|
||||
{
|
||||
service_type = NPC_service_type.GP_NPCSEV_HATCHPET,
|
||||
len = (uint)Marshal.SizeOf<CONTENTNPCSevHatchPet>()
|
||||
};
|
||||
CONTENTNPCSevHatchPet content = new CONTENTNPCSevHatchPet()
|
||||
{
|
||||
iIvtrIdx = i_IvtrIdx,
|
||||
idEgg = i_idEgg,
|
||||
};
|
||||
return SerializeCommand(CommandID.SEVNPC_SERVE, cmd, content);
|
||||
}
|
||||
|
||||
public static Octets CreateNPCSevRestorePetCmd(int i_PetIdx)
|
||||
{
|
||||
var cmd = new cmd_sevnpc_serve
|
||||
{
|
||||
service_type = NPC_service_type.GP_NPCSEV_RESTOREPET,
|
||||
len = (uint)Marshal.SizeOf<CONTENTNPCSevRestorePet>()
|
||||
};
|
||||
CONTENTNPCSevRestorePet content = new CONTENTNPCSevRestorePet()
|
||||
{
|
||||
iPetIdx = i_PetIdx,
|
||||
};
|
||||
return SerializeCommand(CommandID.SEVNPC_SERVE, cmd, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1315,6 +1315,26 @@ namespace CSNetwork.GPDataType
|
||||
public byte bySlot;
|
||||
}
|
||||
|
||||
/// <summary>One item in cmd_purchase_item (buy from NPC/booth). Wire: item_id, expire_date, count, inv_index, booth_slot = 15 bytes.</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_purchase_item_ITEM
|
||||
{
|
||||
public int item_id;
|
||||
public int expire_date;
|
||||
public uint count;
|
||||
public ushort inv_index;
|
||||
public byte booth_slot;
|
||||
}
|
||||
|
||||
/// <summary>Fixed header of cmd_purchase_item. Rest of packet is item_count x cmd_purchase_item_ITEM.</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_purchase_item_header
|
||||
{
|
||||
public uint cost;
|
||||
public uint yinpiao;
|
||||
public byte flag;
|
||||
public ushort item_count;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_get_own_money
|
||||
@@ -1394,7 +1414,7 @@ namespace CSNetwork.GPDataType
|
||||
public byte index;
|
||||
};
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct cmd_pickup_item
|
||||
public struct cmd_pickup_item
|
||||
{
|
||||
public int tid;
|
||||
public int expire_date;
|
||||
@@ -2589,5 +2609,12 @@ namespace CSNetwork.GPDataType
|
||||
public ushort equip_idx;
|
||||
public uint cost;
|
||||
};
|
||||
|
||||
// player leaves the world
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_player_leave_world
|
||||
{
|
||||
public int id;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -771,11 +771,22 @@ namespace BrewMonster.Network
|
||||
{
|
||||
Instance._gameSession.c2s_CmdNPCSevClearEmbeddedChip(iEquipIdx, tidEquip);
|
||||
}
|
||||
|
||||
public static void c2s_CmdPetRecall()
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdPetRecall();
|
||||
}
|
||||
public static void c2s_CmdDebug(ushort icmd, int param1 = int.MinValue)
|
||||
{
|
||||
Instance._gameSession.c2s_CmdDebug(icmd, param1);
|
||||
}
|
||||
public static void c2s_CmdNPCSevHatchPet(int iIvtrIdx, int idEgg)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdNPCSevHatchPet(iIvtrIdx, idEgg);
|
||||
}
|
||||
public static void c2s_CmdNPCSevRestorePet(int iPetIdx)
|
||||
{
|
||||
Instance._gameSession.c2s_SendCmdNPCSevRestorePet(iPetIdx);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -166,14 +166,18 @@ namespace PerfectWorld.Scripts
|
||||
// use same rotation as Prefab
|
||||
// matterObject.transform.localRotation = Quaternion.identity;
|
||||
matterObject.SetActive(true);
|
||||
|
||||
// Add a collider if it doesn't have one
|
||||
if (matterObject.GetComponent<Collider>() == null)
|
||||
{
|
||||
var collider = matterObject.AddComponent<BoxCollider>();
|
||||
collider.size = matterObject.GetComponentInChildren<Renderer>().bounds.size;
|
||||
//this is a workaround to fix the collider size issue when load prefab go wrong at some point
|
||||
//TODO: remove this workaround after the prefab load issue is fixed
|
||||
Vector3 size = matterObject.GetComponentInChildren<Renderer>().bounds.size;
|
||||
if (size.x == 0) size.x = 0.5f;
|
||||
if (size.y == 0) size.y = 0.5f;
|
||||
if (size.z == 0) size.z = 0.5f;
|
||||
collider.size = size;
|
||||
}
|
||||
|
||||
// Create text object to display item name above the cube
|
||||
// CreateItemNameText(matterObject, info.tid);
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ using CSNetwork.GPDataType;
|
||||
using CSNetwork.S2CCommand;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.EC_Resource;
|
||||
using static BrewMonster.IconResourceType;
|
||||
@@ -168,21 +167,21 @@ namespace BrewMonster
|
||||
/// <summary>
|
||||
/// Create an auto fashion shortcut at specified position
|
||||
/// </summary>
|
||||
/* public bool CreateAutoFashionShortcut(int iSlot, int iFashionIdx)
|
||||
{
|
||||
CECSCAutoFashion pAutoFashionSC = new CECSCAutoFashion();
|
||||
if (pAutoFashionSC == null)
|
||||
return false;
|
||||
|
||||
if (!pAutoFashionSC.Init(iFashionIdx))
|
||||
{
|
||||
Debug.LogError("CECShortcutSet::CreateAutoFashionShortcut, Failed to initialize auto fashion shortcut");
|
||||
return false;
|
||||
}
|
||||
|
||||
SetShortcut(iSlot, pAutoFashionSC);
|
||||
return true;
|
||||
}
|
||||
// public bool CreateAutoFashionShortcut(int iSlot, int iFashionIdx)
|
||||
// {
|
||||
// CECSCAutoFashion pAutoFashionSC = new CECSCAutoFashion();
|
||||
// if (pAutoFashionSC == null)
|
||||
// return false;
|
||||
//
|
||||
// if (!pAutoFashionSC.Init(iFashionIdx))
|
||||
// {
|
||||
// Debug.LogError("CECShortcutSet::CreateAutoFashionShortcut, Failed to initialize auto fashion shortcut");
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// SetShortcut(iSlot, pAutoFashionSC);
|
||||
// return true;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Create a system module shortcut at specified position
|
||||
@@ -201,7 +200,7 @@ namespace BrewMonster
|
||||
|
||||
SetShortcut(iSlot, pSysModule);
|
||||
return true;
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicate a shortcut to specified position
|
||||
@@ -495,7 +494,10 @@ namespace BrewMonster
|
||||
// Record shortcut's position and type
|
||||
data.AddRange(BitConverter.GetBytes(i));
|
||||
data.AddRange(BitConverter.GetBytes((int)pSC.GetType()));
|
||||
|
||||
BMLogger.Log($"[MH] Saving shortcut slot: {i} Type: {pSC.GetType()}");
|
||||
|
||||
// TODO: implement other shortcut types
|
||||
switch ((CECShortcut.ShortcutType)pSC.GetType())
|
||||
{
|
||||
/* case CECShortcut.ShortcutType.SCT_COMMAND:
|
||||
@@ -513,45 +515,45 @@ namespace BrewMonster
|
||||
break;
|
||||
}
|
||||
|
||||
/* case CECShortcut.ShortcutType.SCT_ITEM:
|
||||
{
|
||||
CECSCItem itemSC = (CECSCItem)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(itemSC.GetInventory()));
|
||||
data.AddRange(BitConverter.GetBytes(itemSC.GetIvtrSlot()));
|
||||
data.AddRange(BitConverter.GetBytes(itemSC.GetItemTID()));
|
||||
break;
|
||||
}
|
||||
// case CECShortcut.ShortcutType.SCT_ITEM:
|
||||
// {
|
||||
// CECSCItem itemSC = (CECSCItem)pSC;
|
||||
// data.AddRange(BitConverter.GetBytes(itemSC.GetInventory()));
|
||||
// data.AddRange(BitConverter.GetBytes(itemSC.GetIvtrSlot()));
|
||||
// data.AddRange(BitConverter.GetBytes(itemSC.GetItemTID()));
|
||||
// break;
|
||||
// }
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_SKILLGRP:
|
||||
{
|
||||
CECSCSkillGrp skillGrpSC = (CECSCSkillGrp)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(skillGrpSC.GetGroupIndex()));
|
||||
break;
|
||||
}
|
||||
case CECShortcut.ShortcutType.SCT_SKILLGRP:
|
||||
{
|
||||
CECSCSkillGrp skillGrpSC = (CECSCSkillGrp)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(skillGrpSC.GetGroupIndex()));
|
||||
break;
|
||||
}
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_PET:
|
||||
{
|
||||
CECSCPet petSC = (CECSCPet)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(petSC.GetPetIndex()));
|
||||
break;
|
||||
}
|
||||
// case CECShortcut.ShortcutType.SCT_PET:
|
||||
// {
|
||||
// CECSCPet petSC = (CECSCPet)pSC;
|
||||
// data.AddRange(BitConverter.GetBytes(petSC.GetPetIndex()));
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case CECShortcut.ShortcutType.SCT_AUTOFASHION:
|
||||
// {
|
||||
// CECSCAutoFashion fashionSC = (CECSCAutoFashion)pSC;
|
||||
// data.AddRange(BitConverter.GetBytes(fashionSC.GetAutoFashionIndex()));
|
||||
// break;
|
||||
// }
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_AUTOFASHION:
|
||||
{
|
||||
CECSCAutoFashion fashionSC = (CECSCAutoFashion)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(fashionSC.GetAutoFashionIndex()));
|
||||
break;
|
||||
}
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_SYSMODULE:
|
||||
{
|
||||
CECSCSysModule sysSC = (CECSCSysModule)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(sysSC.GetSysModID()));
|
||||
break;
|
||||
}*/
|
||||
case CECShortcut.ShortcutType.SCT_SYSMODULE:
|
||||
{
|
||||
CECSCSysModule sysSC = (CECSCSysModule)pSC;
|
||||
data.AddRange(BitConverter.GetBytes(sysSC.GetSysModID()));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
Debug.LogError("CECShortcutSet::SaveConfigData - Unknown shortcut type");
|
||||
Debug.LogError($"CECShortcutSet::SaveConfigData - Unknown shortcut type = { pSC.GetType()}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -587,6 +589,8 @@ namespace BrewMonster
|
||||
|
||||
int iSCType = GPDataTypeHelper.FromBytes<int>(pDataBuf, offset);
|
||||
offset += sizeof(int);
|
||||
|
||||
BMLogger.Log("[MH] Loading shortcut slot: " + iSlot + " Type: " + iSCType);
|
||||
|
||||
switch ((CECShortcut.ShortcutType)iSCType)
|
||||
{
|
||||
@@ -679,41 +683,41 @@ namespace BrewMonster
|
||||
break;
|
||||
}
|
||||
|
||||
/*case CECShortcut.ShortcutType.SCT_PET:
|
||||
{
|
||||
if (dwVer >= 4)
|
||||
{
|
||||
int iPetIndex = BitConverter.ToInt32(pDataBuf, offset);
|
||||
offset += sizeof(int);
|
||||
|
||||
if (iPetIndex >= 0)
|
||||
CreatePetShortcut(iSlot, iPetIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CECShortcutSet::LoadConfigData - Invalid version for pet");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_AUTOFASHION:
|
||||
{
|
||||
if (dwVer >= 5)
|
||||
{
|
||||
int iAutoFashionIndex = BitConverter.ToInt32(pDataBuf, offset);
|
||||
offset += sizeof(int);
|
||||
|
||||
if (iAutoFashionIndex >= 0)
|
||||
CreateAutoFashionShortcut(iSlot, iAutoFashionIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("CECShortcutSet::LoadConfigData - Invalid version for auto fashion");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// case CECShortcut.ShortcutType.SCT_PET:
|
||||
// {
|
||||
// if (dwVer >= 4)
|
||||
// {
|
||||
// int iPetIndex = BitConverter.ToInt32(pDataBuf, offset);
|
||||
// offset += sizeof(int);
|
||||
//
|
||||
// if (iPetIndex >= 0)
|
||||
// CreatePetShortcut(iSlot, iPetIndex);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogError("CECShortcutSet::LoadConfigData - Invalid version for pet");
|
||||
// return false;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case CECShortcut.ShortcutType.SCT_AUTOFASHION:
|
||||
// {
|
||||
// if (dwVer >= 5)
|
||||
// {
|
||||
// int iAutoFashionIndex = BitConverter.ToInt32(pDataBuf, offset);
|
||||
// offset += sizeof(int);
|
||||
//
|
||||
// if (iAutoFashionIndex >= 0)
|
||||
// CreateAutoFashionShortcut(iSlot, iAutoFashionIndex);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogError("CECShortcutSet::LoadConfigData - Invalid version for auto fashion");
|
||||
// return false;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
|
||||
case CECShortcut.ShortcutType.SCT_SYSMODULE:
|
||||
{
|
||||
@@ -731,7 +735,7 @@ namespace BrewMonster
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}*/
|
||||
}
|
||||
|
||||
/* default:
|
||||
//TODO: uncomment
|
||||
@@ -924,8 +928,8 @@ namespace BrewMonster
|
||||
m_dwParam = src.m_dwParam;
|
||||
}
|
||||
public override CECShortcut Clone() => new CECSCCommand(this);
|
||||
public int GetCommandID() => 0;
|
||||
public int GetParam() => 0;
|
||||
public int GetCommandID() => m_iCommand;
|
||||
public int GetParam() => (int)m_dwParam;
|
||||
|
||||
// Set / Get command parameter
|
||||
public void SetParam(uint dwParam) { m_dwParam = dwParam; }
|
||||
@@ -965,13 +969,14 @@ namespace BrewMonster
|
||||
// case CMD_BUYBOOTH: pHost.CmdBuyBooth(); break;
|
||||
case (int)CommandID.CMD_PLAYPOSE: pHost.CmdStartPose((int)m_dwParam); break;
|
||||
// case CMD_INVITETOFACTION: pHost.CmdInviteToFaction(); break;
|
||||
// case CMD_FLY:
|
||||
// {
|
||||
// // Èç¹ûÆï³ËÒª·ÉÐУ¬ÔòÕâЩ action switcher£¬·ñÔò CmdFly
|
||||
// if (!pHost.GetActionSwitcher() || !pHost.GetActionSwitcher().OnRideToFlyAction())
|
||||
// pHost.CmdFly();
|
||||
// break;
|
||||
// }
|
||||
case (int)CommandID.CMD_FLY:
|
||||
{
|
||||
// 如果骑乘要飞行,则这些 action switcher,否则 CmdFly
|
||||
// If riding wants to fly, then these action switcher, otherwise CmdFly
|
||||
// Call CmdFly(true) to match F4 key behavior
|
||||
pHost.CmdFly(true);
|
||||
break;
|
||||
}
|
||||
// case CMD_PICKUP: pHost.CmdPickup(); break;
|
||||
// case CMD_GATHER: pHost.CmdGather(); break;
|
||||
// case CMD_RUSHFLY: pHost.CmdRushFly(); break;
|
||||
@@ -1167,6 +1172,98 @@ namespace BrewMonster
|
||||
{
|
||||
public CECSkill GetSkillByID(int id) => null;
|
||||
}*/
|
||||
|
||||
// class CECSCSysModule : public CECShortcut
|
||||
public class CECSCSysModule : CECShortcut
|
||||
{
|
||||
// public: // Types
|
||||
// enum { FM_NONE = -1, FM_GT, FM_TOUCH, ... FM_NUM, };
|
||||
public enum SysModuleType
|
||||
{
|
||||
FM_NONE = -1,
|
||||
FM_GT,
|
||||
FM_TOUCH,
|
||||
FM_ROBOT, // 帮派系统 (Faction / Guild system)
|
||||
FM_WIKI,
|
||||
FM_OFFLINESHOP, // 摆摊 (Offline shop / Stall)
|
||||
FM_BORADCAST, // 广播系统 (Broadcast system)
|
||||
FM_MATCH, // 边缘系统 (Match system)
|
||||
FM_ADDEXP, // 帮会系统 (Guild / Add exp system)
|
||||
FM_AUTOHPMP, // 辅助功能,自动加药 (Auxiliary function, auto potion)
|
||||
|
||||
FM_NUM,
|
||||
}
|
||||
|
||||
// public: // Attributes
|
||||
// static const int g_SysIndexMap[FM_NUM];
|
||||
public static readonly int[] g_SysIndexMap = new int[(int)SysModuleType.FM_NUM];
|
||||
|
||||
// protected: // Attributes
|
||||
// ACString m_strDesc;
|
||||
protected string m_strDesc;
|
||||
// char m_IconFile[256];
|
||||
protected string m_IconFile;
|
||||
// int m_iSystem; // system ID
|
||||
protected int m_iSystem;
|
||||
|
||||
// public: // Constructor and Destructor
|
||||
// CECSCSysModule();
|
||||
public CECSCSysModule()
|
||||
{
|
||||
m_iSCType = (int)ShortcutType.SCT_SYSMODULE;
|
||||
m_strDesc = string.Empty;
|
||||
m_IconFile = string.Empty;
|
||||
m_iSystem = (int)SysModuleType.FM_NONE;
|
||||
}
|
||||
|
||||
// CECSCSysModule(const CECSCSysModule& src);
|
||||
public CECSCSysModule(CECSCSysModule src)
|
||||
{
|
||||
m_iSCType = src.m_iSCType;
|
||||
m_strDesc = src.m_strDesc;
|
||||
m_IconFile = src.m_IconFile;
|
||||
m_iSystem = src.m_iSystem;
|
||||
}
|
||||
|
||||
// virtual ~CECSCSysModule() {}
|
||||
// (no destructor in C#)
|
||||
|
||||
// bool Init(int iSys);
|
||||
public bool Init(int iSys)
|
||||
{
|
||||
m_iSystem = iSys;
|
||||
// TODO: load m_strDesc and m_IconFile from config/table by iSys if needed
|
||||
return true;
|
||||
}
|
||||
|
||||
// virtual CECShortcut* Clone();
|
||||
public override CECShortcut Clone()
|
||||
{
|
||||
return new CECSCSysModule(this);
|
||||
}
|
||||
|
||||
// virtual bool Execute();
|
||||
public override bool Execute()
|
||||
{
|
||||
// TODO: open corresponding system UI by m_iSystem (e.g. GT, Touch, Robot, Wiki, OfflineShop, Broadcast, Match, AddExp, AutoHpMp)
|
||||
return true;
|
||||
}
|
||||
|
||||
// int GetSysModID() const { return m_iSystem; }
|
||||
public int GetSysModID() { return m_iSystem; }
|
||||
|
||||
// virtual const wchar_t* GetDesc();
|
||||
public override string GetDesc()
|
||||
{
|
||||
return m_strDesc ?? string.Empty;
|
||||
}
|
||||
|
||||
public override string GetIconFile()
|
||||
{
|
||||
return string.IsNullOrEmpty(m_IconFile) ? "unknown" : m_IconFile;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace BrewMonster.Scripts.Pet
|
||||
m_iPetSlotNum = iNewNum;
|
||||
}
|
||||
// Check whether corral has empty slots
|
||||
int GetEmptySlotNum()
|
||||
public int GetEmptySlotNum()
|
||||
{
|
||||
int iCount = 0;
|
||||
|
||||
|
||||
@@ -45,16 +45,16 @@ namespace BrewMonster
|
||||
EMsgActionSwitcher eMsg = (EMsgActionSwitcher)m_msgs[i];
|
||||
switch (eMsg)
|
||||
{
|
||||
/* case EMsgActionSwitcher.MSG_FLY:
|
||||
{
|
||||
OnFly();
|
||||
}
|
||||
break;
|
||||
case EMsgActionSwitcher.MSG_MOUNTPET:
|
||||
{
|
||||
OnRide();
|
||||
}
|
||||
break;*/
|
||||
case EMsgActionSwitcher.MSG_FLY:
|
||||
{
|
||||
OnFly();
|
||||
}
|
||||
break;
|
||||
case EMsgActionSwitcher.MSG_MOUNTPET:
|
||||
{
|
||||
OnRide();
|
||||
}
|
||||
break;
|
||||
case EMsgActionSwitcher.MSG_CASTSKILL:
|
||||
{
|
||||
OnCastSkill();
|
||||
@@ -64,6 +64,14 @@ namespace BrewMonster
|
||||
}
|
||||
m_msgs.Clear();
|
||||
}
|
||||
public void OnFly()
|
||||
{
|
||||
RemoveRideFlyRelatedContext();
|
||||
}
|
||||
public void OnRide()
|
||||
{
|
||||
RemoveRideFlyRelatedContext();
|
||||
}
|
||||
public void OnCastSkill()
|
||||
{
|
||||
RemoveRideFlyRelatedContext();
|
||||
|
||||
@@ -87,6 +87,426 @@ namespace BrewMonster
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
// Get time counter of using item in pack
|
||||
public bool GetUsingItemTimeCnt(ref uint dwCurTime, ref uint dwMaxTime, ref int? piItem/* NULL */)
|
||||
{
|
||||
if(m_pWorkMan == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!m_pWorkMan.IsUsingItem())
|
||||
return false;
|
||||
|
||||
CECHPWorkUse pWork = (m_pWorkMan.GetRunningWork(CECHPWork.Host_work_ID.WORK_USEITEM)) as CECHPWorkUse;
|
||||
CECCounter cnt = pWork.GetTimeCounter();
|
||||
dwCurTime = (uint)cnt.GetCounter();
|
||||
dwMaxTime = (uint)cnt.GetPeriod();
|
||||
|
||||
if (piItem != null)
|
||||
piItem = pWork.GetItem();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity.VisualScripting;
|
||||
using static BrewMonster.SkillArrayWrapper;
|
||||
|
||||
namespace BrewMonster
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace BrewMonster.Scripts.Skills
|
||||
{
|
||||
|
||||
@@ -1848,7 +1848,7 @@ namespace BrewMonster.Scripts.Task
|
||||
List<ActiveTaskEntry> aEntries = new List<ActiveTaskEntry>(pList.m_TaskEntries);
|
||||
ATaskTempl pTempl;
|
||||
|
||||
if (emotion < (int)TaskInterface.CommandTaskAction.CMD_EMOTION_BINDBUDDY)// pTempl->m_uiEmotion ֵΪ0±íʾ²»¼ì²é£¬ËùÒÔËùÓбíÇéÐòºÅ¶¼ºóÒÆ1
|
||||
if (emotion < (int)TaskInterface.CommandTaskAction.CMD_EMOTION_BINDBUDDY)// pTempl->m_uiEmotion ֵΪ0±íʾ²»¼ì²é£¬ËùÒÔËùÓбíÇéÐòºÅ¶¼ºóÒÆ1 // pTempl->m_uiEmotion value of 0 means don't check, so all emote sequence numbers are shifted by 1
|
||||
emotion += 1;
|
||||
|
||||
for (int i = 0; i < pList.m_uTaskCount; i++)
|
||||
@@ -1865,7 +1865,16 @@ namespace BrewMonster.Scripts.Task
|
||||
// Check if map does not contain OR value == false
|
||||
if (!m_emotionTask.TryGetValue(id, out bool exists) || !exists)
|
||||
{
|
||||
m_emotionTask[id] = (pTempl.m_FixedData.m_uiEmotion == (uint)emotion);
|
||||
bool matches = (pTempl.m_FixedData.m_uiEmotion == (uint)emotion);
|
||||
m_emotionTask[id] = matches;
|
||||
|
||||
// WORKAROUND: Trigger quest check immediately when emotion matches
|
||||
// TODO: Remove this workaround after animation completion is properly handled
|
||||
// This ensures the server is notified right away instead of waiting for the next periodic check
|
||||
if (matches)
|
||||
{
|
||||
TaskClient.OnTaskCheckStatus(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,8 +361,10 @@ namespace BrewMonster.Scripts.Task
|
||||
{
|
||||
if (!needServerCheck || pTask == null || pTempl == null || entry == null) return;
|
||||
|
||||
// Only auto-check for wait-time tasks (the reported broken case).
|
||||
if ((TaskCompletionMethod)pTempl.m_FixedData.m_enumMethod != TaskCompletionMethod.enumTMWaitTime)
|
||||
// Auto-check for wait-time tasks and simple client tasks (emote/action tasks)
|
||||
TaskCompletionMethod method = (TaskCompletionMethod)pTempl.m_FixedData.m_enumMethod;
|
||||
if (method != TaskCompletionMethod.enumTMWaitTime &&
|
||||
method != TaskCompletionMethod.enumTMSimpleClientTask)
|
||||
return;
|
||||
|
||||
if (entry.IsFinished()) return;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
|
||||
namespace BrewMonster.Scripts.Task.UI
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.UI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
using UnityEngine.UI;
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class CDlgSkillSubAction : MonoBehaviour
|
||||
@@ -34,6 +35,7 @@ namespace BrewMonster
|
||||
private void OnEnable()
|
||||
{
|
||||
OnShowDialog();
|
||||
|
||||
}
|
||||
public void Init()
|
||||
{
|
||||
@@ -45,23 +47,31 @@ namespace BrewMonster
|
||||
{
|
||||
var orderTP = Instantiate(orderTemplate, orderContain);
|
||||
orderTP.gameObject.SetActive(true);
|
||||
SetupActionClickHandler(orderTP);
|
||||
m_aActionInfo.Add(new ActionInfo
|
||||
{
|
||||
image = orderTP,
|
||||
pLabel = orderTP.GetComponentInChildren<TextMeshProUGUI>()
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < 27; j++)
|
||||
{
|
||||
var actionTP = Instantiate(actionTemplate, actionContain);
|
||||
actionTP.gameObject.SetActive(true);
|
||||
|
||||
// Set up click handler for action items / 为动作项设置点击处理程序
|
||||
SetupActionClickHandler(actionTP);
|
||||
|
||||
m_aActionInfo.Add(new ActionInfo
|
||||
{
|
||||
image = actionTP,
|
||||
pLabel = actionTP.GetComponentInChildren<TextMeshProUGUI>()
|
||||
});
|
||||
}
|
||||
//force refresh layout orderContain anc actionContain
|
||||
//then refresh layout of this gameobject
|
||||
}
|
||||
public void OnShowDialog()
|
||||
{
|
||||
@@ -109,6 +119,35 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Set up click handler for action items, similar to wave hand logic / 为动作项设置点击处理程序,类似于挥手逻辑
|
||||
/// </summary>
|
||||
private void SetupActionClickHandler(AUIImagePicture actionImage)
|
||||
{
|
||||
if (actionImage == null) return;
|
||||
|
||||
Debug.Log($"CDlgSkillSubAction::SetupActionClickHandler():: Setting up click handler for action item: {actionImage.name}");
|
||||
// Get the button component / 获取按钮组件
|
||||
var button = actionImage.GetComponentInChildren<UnityEngine.UI.Button>();
|
||||
if (button == null)
|
||||
return;
|
||||
|
||||
// Remove existing listeners and add our custom handler / 移除现有监听器并添加我们的自定义处理程序
|
||||
button.onClick.RemoveAllListeners();
|
||||
button.onClick.AddListener(() => OnActionClicked(actionImage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle action icon click, similar to wave hand logic / 处理动作图标点击,类似于挥手逻辑
|
||||
/// </summary>
|
||||
private void OnActionClicked(AUIImagePicture actionImage)
|
||||
{
|
||||
if (actionImage == null) return;
|
||||
Debug.Log("OnActionClicked: " + actionImage.name);
|
||||
// Get the shortcut from the action image / 从动作图像获取快捷方式
|
||||
actionImage.Execute();
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ActionInfo
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace BrewMonster
|
||||
#if UNITY_EDITOR
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.S))
|
||||
if (Input.GetKeyDown(KeyCode.S) )
|
||||
OnSkillDragDrop();
|
||||
}
|
||||
#endif
|
||||
public void OnSkillDragDrop()
|
||||
{
|
||||
var iSlot = 2;
|
||||
var iSlot = 1;
|
||||
var nCombo = 2;
|
||||
CECShortcutSet pSCS = CECUIManager.Instance.GetInGameUIMan().GetSCSByDlg(1);
|
||||
if (pSCS.GetShortcut(iSlot - 1) == null || !EC_Game.GetConfigs().GetGameSettings().bLockQuickBar)
|
||||
|
||||
@@ -2387,10 +2387,12 @@ namespace BrewMonster.UI
|
||||
}
|
||||
else if (iService == CDLGNPC.CDLGNPC_PETREC && (pEssence?.combined_services & 0x400) != 0)
|
||||
{
|
||||
Show(false);
|
||||
//Show(false);
|
||||
// TO DO: fix later
|
||||
//GetGameUIMan().m_pDlgPetList.Show(true);
|
||||
//GetGameUIMan().m_pDlgPetRec.Show(true);
|
||||
var dlgPetRec = GetGameUIMan().GetDialog("DlgPetRec");
|
||||
dlgPetRec.Show(true);
|
||||
return;
|
||||
}
|
||||
else if (iService == CDLGNPC.CDLGNPC_BATTLECHALLENGE && (pEssence?.combined_services & 0x800) != 0)
|
||||
|
||||
@@ -12,6 +12,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using static BrewMonster.Scripts.Managers.EC_Inventory;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
@@ -332,7 +333,8 @@ namespace BrewMonster.UI
|
||||
detailedItem.GetDetailDataFromLocal();
|
||||
}
|
||||
|
||||
EC_IvtrPetEgg petEgg = detailedItem as EC_IvtrPetEgg;
|
||||
//EC_IvtrPetEgg petEgg = detailedItem as EC_IvtrPetEgg;
|
||||
EC_IvtrPetEgg petEgg = item as EC_IvtrPetEgg;
|
||||
if(petEgg == null)
|
||||
{
|
||||
return;
|
||||
@@ -349,7 +351,7 @@ namespace BrewMonster.UI
|
||||
|
||||
m_pCurrentEgg = petEgg;
|
||||
m_nSlot = slotIndex;
|
||||
|
||||
SetDataPtr(petEgg, "");
|
||||
petEgg.Freeze(true);
|
||||
UpdateEggUI(petEgg);
|
||||
SetInventorySlotGray(btn, true);
|
||||
@@ -522,7 +524,17 @@ namespace BrewMonster.UI
|
||||
|
||||
private void OnCommandConfirm()
|
||||
{
|
||||
//TODO: Send hatch command to server with m_pCurrentEgg
|
||||
EC_IvtrItem pItem = (EC_IvtrItem)(GetDataPtr(""));
|
||||
if (pItem != null)
|
||||
{
|
||||
pItem.Freeze(false);
|
||||
GetHostPlayer().HatchPet(m_nSlot);
|
||||
SetDataPtr(null, "");
|
||||
GetGameUIMan().EndNPCService();
|
||||
Show(false);
|
||||
GetGameUIMan().GetDialog("Win_Inventory")?.Show(false);
|
||||
GetHostPlayer().GetPack(Inventory_type.IVTRTYPE_PACK).UnfreezeAllItems();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCommandCancel()
|
||||
@@ -530,7 +542,7 @@ namespace BrewMonster.UI
|
||||
ClearEgg();
|
||||
GetGameUIMan().EndNPCService();
|
||||
Show(false);
|
||||
GetHostPlayer().GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
|
||||
GetHostPlayer().GetPack(Inventory_type.IVTRTYPE_PACK).UnfreezeAllItems();
|
||||
}
|
||||
|
||||
public void SetEgg(EC_IvtrItem pItem, int nSlot)
|
||||
|
||||
@@ -25,7 +25,16 @@ namespace BrewMonster.UI
|
||||
[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];
|
||||
[SerializeField] private Button m_pBtnClose;
|
||||
[SerializeField] private Sprite m_spriteDefault_Icon;
|
||||
[SerializeField] private Button[] m_pBtn_Tab;
|
||||
[SerializeField] private GameObject[] m_mask_off_pBtn_Tab;
|
||||
int m_nPageIndex;
|
||||
string strFile = "";
|
||||
string strText = "";
|
||||
CECPetCorral pPetCorral;
|
||||
elementdataman pDB;
|
||||
DATA_TYPE DataType = new DATA_TYPE();
|
||||
|
||||
public void OnInitDialog()
|
||||
{
|
||||
@@ -60,10 +69,104 @@ namespace BrewMonster.UI
|
||||
// DDX_Control(AString().Format("Btn_Page%d", i + 1), m_pBtn_Page[i]);
|
||||
// m_pBtn_Page[i].SetPushed(false);
|
||||
//}
|
||||
//m_nPageIndex = 0;
|
||||
m_nPageIndex = 0;
|
||||
//m_pBtn_Page[0].SetPushed(true);
|
||||
|
||||
//return true;
|
||||
int index = 0;
|
||||
if (!IsShow()) Show(true);
|
||||
for (int i = 0; i < m_pBtn_Summon.Length; i++)
|
||||
{
|
||||
index = i;
|
||||
m_pBtn_Summon[index].onClick.RemoveAllListeners();
|
||||
if(i == 0)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(1);
|
||||
});
|
||||
}
|
||||
else if(i == 1)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(2);
|
||||
});
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(3);
|
||||
});
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(4);
|
||||
});
|
||||
}
|
||||
else if (i == 5)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(6);
|
||||
});
|
||||
}
|
||||
else if (i == 6)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(7);
|
||||
});
|
||||
}
|
||||
else if (i == 7)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(8);
|
||||
});
|
||||
}
|
||||
else if (i == 9)
|
||||
{
|
||||
m_pBtn_Summon[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandSummon(10);
|
||||
});
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < m_pBtn_Recall.Length; i++)
|
||||
{
|
||||
index = i;
|
||||
m_pBtn_Recall[index].onClick.RemoveAllListeners();
|
||||
m_pBtn_Recall[index].onClick.AddListener(() =>
|
||||
{
|
||||
OnCommandRecall();
|
||||
});
|
||||
}
|
||||
m_pBtnClose.onClick.RemoveAllListeners();
|
||||
m_pBtnClose.onClick.AddListener(() =>
|
||||
{
|
||||
Show(false);
|
||||
});
|
||||
for(int i = 0; i < m_pBtn_Tab.Length; i++)
|
||||
{
|
||||
m_pBtn_Tab[i].onClick.RemoveAllListeners();
|
||||
if(i == 0)
|
||||
{
|
||||
m_pBtn_Tab[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnClickBtnTab(0);
|
||||
});
|
||||
}
|
||||
else if(i == 1)
|
||||
{
|
||||
m_pBtn_Tab[i].onClick.AddListener(() =>
|
||||
{
|
||||
OnClickBtnTab(1);
|
||||
});
|
||||
}
|
||||
}
|
||||
OnClickBtnTab(0);
|
||||
}
|
||||
|
||||
bool IsPetDye(int nSlot)
|
||||
@@ -75,14 +178,19 @@ namespace BrewMonster.UI
|
||||
// && GetGameUIMan().m_pDlgPetDye.GetPetSlot() == nSlot;
|
||||
}
|
||||
|
||||
void UpdateList()
|
||||
public override bool Render()
|
||||
{
|
||||
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++)
|
||||
UpdateList();
|
||||
return base.Render();
|
||||
}
|
||||
|
||||
public void UpdateList()
|
||||
{
|
||||
strText = "";
|
||||
pPetCorral = GetHostPlayer().GetPetCorral();
|
||||
pDB = ElementDataManProvider.GetElementDataMan();
|
||||
DataType = new DATA_TYPE();
|
||||
for (int i = 0; i < CDLGPETLIST_SLOT_MAX; i++)
|
||||
{
|
||||
int nPetSlot = i + m_nPageIndex * CDLGPETLIST_SLOT_MAX;
|
||||
if (nPetSlot < pPetCorral.GetPetSlotNum())
|
||||
@@ -99,12 +207,12 @@ namespace BrewMonster.UI
|
||||
if (pPet != null)
|
||||
{
|
||||
bool bEnable = (pPetCorral.GetActivePetIndex() == nPetSlot && GetHostPlayer().IsOperatingPet() == 0);
|
||||
m_pBtn_Recall[i].enabled = (bEnable);
|
||||
m_pBtn_Recall[i].interactable = (bEnable);
|
||||
|
||||
bEnable = (pPetCorral.GetActivePetIndex() != nPetSlot && GetHostPlayer().IsOperatingPet() == 0);
|
||||
m_pBtn_Summon[i].gameObject.SetActive(bEnable);
|
||||
m_pBtn_Summon[i].interactable = (bEnable);
|
||||
|
||||
m_pBtn_Detail[i].gameObject.SetActive(true);
|
||||
m_pBtn_Detail[i].interactable = (true);
|
||||
|
||||
strText = string.Format(GetStringFromTable(801).Replace("%d", "{0}"), pPet.GetLevel());
|
||||
m_pTxt_Level[i].SetText(strText);
|
||||
@@ -121,30 +229,33 @@ namespace BrewMonster.UI
|
||||
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);
|
||||
if(m_pImg_Icon[i].sprite == null || m_pImg_Icon[i].sprite.Equals(m_spriteDefault_Icon) || !m_pImg_Icon[i].sprite.name.Equals(strFile))
|
||||
{
|
||||
m_pImg_Icon[i].sprite = EC_Game.GetGameRun().GetUIManager().GetSpriteInListIvtr(strFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pImg_Icon[i].sprite = null;
|
||||
m_pImg_Icon[i].sprite = m_spriteDefault_Icon;
|
||||
//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);
|
||||
if(m_pBtn_Evolution[i] != null)
|
||||
m_pBtn_Evolution[i].interactable = (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_Summon[i].interactable = (false);
|
||||
m_pBtn_Recall[i].interactable = (false);
|
||||
m_pBtn_Detail[i].interactable = (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].sprite = m_spriteDefault_Icon;
|
||||
//m_pImg_Icon[i].SetHint(_AL(""));
|
||||
//m_pImg_Icon[i].SetData(0);
|
||||
}
|
||||
@@ -168,14 +279,29 @@ namespace BrewMonster.UI
|
||||
public void OnCommandSummon(int slot)
|
||||
{
|
||||
CECPetCorral pPetCorral = GetHostPlayer().GetPetCorral();
|
||||
int nSlot = slot - 1;
|
||||
nSlot += m_nPageIndex* CDLGPETLIST_SLOT_MAX;
|
||||
|
||||
int nSlot = slot - 1;
|
||||
nSlot += m_nPageIndex* CDLGPETLIST_SLOT_MAX;
|
||||
// ·ÉÐÐ-¡·Æï³Ë
|
||||
if (GetHostPlayer().GetActionSwitcher() != null && GetHostPlayer().GetActionSwitcher().OnFlyToRideAction(nSlot))
|
||||
return;
|
||||
|
||||
//UpdateList();
|
||||
GetHostPlayer().SummonPet(nSlot);
|
||||
}
|
||||
|
||||
public void OnCommandRecall()
|
||||
{
|
||||
GetHostPlayer().RecallPet();
|
||||
}
|
||||
|
||||
public void OnClickBtnTab(int index)
|
||||
{
|
||||
m_nPageIndex = index;
|
||||
for(int i = 0; i < m_pBtn_Tab.Length; i++)
|
||||
{
|
||||
m_mask_off_pBtn_Tab[i].SetActive(i != m_nPageIndex);
|
||||
}
|
||||
UpdateList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,612 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Pet;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public class DlgPetRec : AUIDialog
|
||||
{
|
||||
public const int PETSLOT_MAX = 20;
|
||||
[Header("Component")]
|
||||
[SerializeField] private TextMeshProUGUI m_pTxt_Gold;
|
||||
[SerializeField] private TextMeshProUGUI m_pTxt_Name;
|
||||
[SerializeField] private Image m_pImg_Item;
|
||||
|
||||
[Header("Pet List")]
|
||||
[SerializeField] private Button[] m_pBtn_PetSlots = new Button[PETSLOT_MAX];
|
||||
|
||||
[Header("Button")]
|
||||
[SerializeField] private Button m_btnComfirm;
|
||||
[SerializeField] private Button m_btnCancle;
|
||||
[SerializeField] private Button m_btnClose;
|
||||
|
||||
[Header("Icon Default")]
|
||||
[SerializeField] private Sprite m_defaultIcon;
|
||||
|
||||
private int m_nSlot = -1;
|
||||
private CECPetData m_pCurrentPet = null;
|
||||
private CECPetData[] m_petSlots = new CECPetData[PETSLOT_MAX];
|
||||
|
||||
private float m_doubleClickTime = 0.3f;
|
||||
private Dictionary<int, float> m_lastClickTime = new Dictionary<int, float>();
|
||||
private GameObject m_draggedIcon = null;
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
RegisterTargetSlotEvents(m_pImg_Item.transform);
|
||||
|
||||
for (int i = 0; i < PETSLOT_MAX; i++)
|
||||
{
|
||||
int slotIndex = i; // Capture the current value of i for the lambda
|
||||
RegisterPetSlotEvents(m_pBtn_PetSlots[i], slotIndex);
|
||||
}
|
||||
|
||||
if (m_btnComfirm != null)
|
||||
m_btnComfirm.onClick.AddListener(OnCommandConfirm);
|
||||
if (m_btnCancle != null)
|
||||
m_btnCancle.onClick.AddListener(OnCommandCancel);
|
||||
if (m_btnClose != null)
|
||||
m_btnClose.onClick.AddListener(OnCommandCancel);
|
||||
}
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
ClearPet();
|
||||
LoadPetSlotFromCorral();
|
||||
UpdatePetSlotUI();
|
||||
}
|
||||
|
||||
public override void Show(bool value)
|
||||
{
|
||||
base.Show(value);
|
||||
if (value)
|
||||
{
|
||||
OnShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
ClearHighlight();
|
||||
}
|
||||
|
||||
#region Double-Click and Drag on Pet Slot
|
||||
|
||||
private void RegisterTargetSlotEvents(Transform target)
|
||||
{
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
var image = target.GetComponent<Image>();
|
||||
if (image != null)
|
||||
{
|
||||
image.raycastTarget = true;
|
||||
}
|
||||
|
||||
var trigger = target.GetComponent<EventTrigger>();
|
||||
if (trigger == null)
|
||||
trigger = target.gameObject.AddComponent<EventTrigger>();
|
||||
trigger.triggers.Clear();
|
||||
|
||||
var clickEntry = new EventTrigger.Entry { eventID = EventTriggerType.PointerClick };
|
||||
clickEntry.callback.AddListener((data) => { OnTargetSlotClick((PointerEventData)data); });
|
||||
trigger.triggers.Add(clickEntry);
|
||||
|
||||
var dropEntry = new EventTrigger.Entry { eventID = EventTriggerType.Drop };
|
||||
dropEntry.callback.AddListener((data) => { OnDropPetToTarget((PointerEventData)data); });
|
||||
trigger.triggers.Add(dropEntry);
|
||||
}
|
||||
|
||||
private void OnTargetSlotClick(PointerEventData eventData)
|
||||
{
|
||||
// Single click - clear the pet and return to slot
|
||||
if (m_pCurrentPet != null && m_nSlot >= 0)
|
||||
{
|
||||
BMLogger.Log("DlgPetRec: Single click on target slot - returning pet to slot");
|
||||
ClearPet();
|
||||
UpdatePetSlotUI();
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterPetSlotEvents(Button button, int slotIndex)
|
||||
{
|
||||
if (button == null)
|
||||
return;
|
||||
|
||||
var trigger = button.GetComponent<EventTrigger>();
|
||||
if (trigger == null)
|
||||
trigger = button.gameObject.AddComponent<EventTrigger>();
|
||||
|
||||
trigger.triggers.Clear();
|
||||
|
||||
var clickEntry = new EventTrigger.Entry { eventID = EventTriggerType.PointerClick };
|
||||
clickEntry.callback.AddListener((data) => { OnPetSlotClick(slotIndex, (PointerEventData)data); });
|
||||
trigger.triggers.Add(clickEntry);
|
||||
|
||||
var beginDragEntry = new EventTrigger.Entry { eventID = EventTriggerType.BeginDrag };
|
||||
beginDragEntry.callback.AddListener((data) => { OnBeginDragPet(slotIndex, (PointerEventData)data); });
|
||||
trigger.triggers.Add(beginDragEntry);
|
||||
|
||||
var dragEntry = new EventTrigger.Entry { eventID = EventTriggerType.Drag };
|
||||
dragEntry.callback.AddListener((data) => { OnDragPet(slotIndex, (PointerEventData)data); });
|
||||
trigger.triggers.Add(dragEntry);
|
||||
|
||||
var endDragEntry = new EventTrigger.Entry { eventID = EventTriggerType.EndDrag };
|
||||
endDragEntry.callback.AddListener((data) => { OnEndDragPet(slotIndex, (PointerEventData)data); });
|
||||
trigger.triggers.Add(endDragEntry);
|
||||
}
|
||||
|
||||
private void OnPetSlotClick(int slotIndex, PointerEventData eventData)
|
||||
{
|
||||
float currentTime = Time.unscaledTime;
|
||||
if (m_lastClickTime.ContainsKey(slotIndex))
|
||||
{
|
||||
float timeSinceLastClick = currentTime - m_lastClickTime[slotIndex];
|
||||
if (timeSinceLastClick <= m_doubleClickTime)
|
||||
{
|
||||
// Double-click detected
|
||||
OnPetSlotDoubleClick(slotIndex);
|
||||
m_lastClickTime.Remove(slotIndex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_lastClickTime[slotIndex] = currentTime;
|
||||
}
|
||||
|
||||
private void OnPetSlotDoubleClick(int slotIndex)
|
||||
{
|
||||
var petData = GetPetSlot(slotIndex);
|
||||
if (petData == null)
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: No pet in slot {slotIndex}");
|
||||
return;
|
||||
}
|
||||
|
||||
SetPet(slotIndex);
|
||||
UpdatePetSlotUI();
|
||||
}
|
||||
|
||||
|
||||
private void OnBeginDragPet(int slotIndex, PointerEventData eventData)
|
||||
{
|
||||
var petData = GetPetSlot(slotIndex);
|
||||
if (petData == null)
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: No pet in slot {slotIndex} to drag");
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow dragging active or selected pets
|
||||
var host = CECGameRun.Instance?.GetHostPlayer();
|
||||
if (host != null)
|
||||
{
|
||||
var petCorral = host.GetPetCorral();
|
||||
if (petCorral != null)
|
||||
{
|
||||
bool isActive = petCorral.GetActivePetIndex() == slotIndex;
|
||||
bool isSelected = (m_nSlot == slotIndex && m_pCurrentPet != null);
|
||||
|
||||
if (isActive || isSelected)
|
||||
{
|
||||
BMLogger.Log($"DlgPetRec: Cannot drag active or selected pet from slot {slotIndex}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create dragged icon
|
||||
var buttonImage = m_pBtn_PetSlots[slotIndex].GetComponent<Image>();
|
||||
if (buttonImage != null && buttonImage.sprite != null)
|
||||
{
|
||||
Canvas canvas = GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
BMLogger.LogError("DlgPetRec: No parent canvas found for dragging");
|
||||
return;
|
||||
}
|
||||
|
||||
m_draggedIcon = new GameObject("DraggedIcon");
|
||||
m_draggedIcon.transform.SetParent(canvas.transform, false);
|
||||
m_draggedIcon.transform.SetAsLastSibling();
|
||||
|
||||
var canvasGroup = m_draggedIcon.AddComponent<CanvasGroup>();
|
||||
canvasGroup.alpha = 0.6f;
|
||||
canvasGroup.blocksRaycasts = false;
|
||||
|
||||
var image = m_draggedIcon.AddComponent<Image>();
|
||||
image.sprite = buttonImage.sprite;
|
||||
image.raycastTarget = false;
|
||||
|
||||
var rectTransform = m_draggedIcon.GetComponent<RectTransform>();
|
||||
rectTransform.sizeDelta = new Vector2(100, 100);
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||
canvas.transform as RectTransform,
|
||||
eventData.position,
|
||||
canvas.worldCamera,
|
||||
out Vector2 localPoint
|
||||
);
|
||||
rectTransform.localPosition = localPoint;
|
||||
|
||||
BMLogger.Log($"DlgPetRec: Started dragging pet from slot {slotIndex}");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDragPet(int slotIndex, PointerEventData eventData)
|
||||
{
|
||||
if (m_draggedIcon != null)
|
||||
{
|
||||
Canvas canvas = GetComponentInParent<Canvas>();
|
||||
if (canvas != null)
|
||||
{
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(
|
||||
canvas.transform as RectTransform,
|
||||
eventData.position,
|
||||
canvas.worldCamera,
|
||||
out Vector2 localPoint
|
||||
);
|
||||
m_draggedIcon.transform.localPosition = localPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEndDragPet(int slotIndex, PointerEventData eventData)
|
||||
{
|
||||
if (m_draggedIcon != null)
|
||||
{
|
||||
Destroy(m_draggedIcon);
|
||||
m_draggedIcon = null;
|
||||
BMLogger.Log($"DlgPetRec: Ended dragging pet from slot {slotIndex}");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Drag and Drop Logic
|
||||
|
||||
private void OnDropPetToTarget(PointerEventData eventData)
|
||||
{
|
||||
// Get the dragged pet slot index from the event
|
||||
var draggedObject = eventData.pointerDrag;
|
||||
if (draggedObject == null)
|
||||
{
|
||||
BMLogger.LogWarning("DlgPetRec: No dragged object found");
|
||||
return;
|
||||
}
|
||||
|
||||
// Find which pet slot was dragged
|
||||
for (int i = 0; i < PETSLOT_MAX; i++)
|
||||
{
|
||||
if (m_pBtn_PetSlots[i] != null && m_pBtn_PetSlots[i].gameObject == draggedObject)
|
||||
{
|
||||
var petData = GetPetSlot(i);
|
||||
if (petData == null)
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: No pet in dragged slot {i}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this pet can be selected
|
||||
var host = CECGameRun.Instance?.GetHostPlayer();
|
||||
if (host != null)
|
||||
{
|
||||
var petCorral = host.GetPetCorral();
|
||||
if (petCorral != null)
|
||||
{
|
||||
bool isActive = petCorral.GetActivePetIndex() == i;
|
||||
if (isActive)
|
||||
{
|
||||
BMLogger.Log($"DlgPetRec: Cannot select active pet from slot {i}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BMLogger.Log($"DlgPetRec: Pet from slot {i} dropped to target");
|
||||
SetPet(i);
|
||||
UpdatePetSlotUI();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
BMLogger.LogWarning("DlgPetRec: Could not find source pet slot for dragged object");
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void OnShowDialog()
|
||||
{
|
||||
ClearPet();
|
||||
LoadPetSlotFromCorral();
|
||||
}
|
||||
|
||||
private void ClearPet()
|
||||
{
|
||||
m_pCurrentPet = null;
|
||||
m_nSlot = -1;
|
||||
|
||||
if (m_pTxt_Name != null)
|
||||
m_pTxt_Name.text = "___";
|
||||
|
||||
if (m_pTxt_Gold != null)
|
||||
m_pTxt_Gold.text = "0";
|
||||
|
||||
ClearSlotIcon(m_pImg_Item);
|
||||
UpdatePetSlotUI();
|
||||
}
|
||||
|
||||
|
||||
private void OnCommandConfirm()
|
||||
{
|
||||
if (m_nSlot >= 0)
|
||||
{
|
||||
GetHostPlayer().RestorePet(m_nSlot);
|
||||
GetGameUIMan()?.EndNPCService();
|
||||
Show(false);
|
||||
//GetGameUIMan()->m_pDlgPetList->Show(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPet(int nSlot)
|
||||
{
|
||||
var host = CECGameRun.Instance.GetHostPlayer();
|
||||
if (host == null)
|
||||
return;
|
||||
var petCorral = host.GetPetCorral();
|
||||
if (petCorral == null)
|
||||
return;
|
||||
|
||||
if (petCorral.GetActivePetIndex() == nSlot)
|
||||
{
|
||||
//GetGameUIMan()->MessageBox("", GetStringFromTable(820), MB_OK,
|
||||
// A3DCOLORRGBA(255, 255, 255, 160));
|
||||
//return;
|
||||
}
|
||||
|
||||
var pDB = ElementDataManProvider.GetElementDataMan();
|
||||
if (pDB == null)
|
||||
return;
|
||||
|
||||
var petData = petCorral.GetPetData(nSlot);
|
||||
if (petData != null)
|
||||
{
|
||||
DATA_TYPE dataType = DATA_TYPE.DT_INVALID;
|
||||
|
||||
var petEssenceData = pDB.get_data_ptr((uint)petData.GetTemplateID(), ID_SPACE.ID_SPACE_ESSENCE, ref dataType);
|
||||
if (petEssenceData != null && dataType == DATA_TYPE.DT_PET_ESSENCE)
|
||||
{
|
||||
var petEssence = (PET_ESSENCE)petEssenceData;
|
||||
dataType = DATA_TYPE.DT_INVALID;
|
||||
var eggEssenceData = pDB.get_data_ptr((uint)petData.GetEggID(), ID_SPACE.ID_SPACE_ESSENCE, ref dataType);
|
||||
|
||||
if (eggEssenceData != null && dataType == DATA_TYPE.DT_PET_EGG_ESSENCE)
|
||||
{
|
||||
var eggEssence = (PET_EGG_ESSENCE)eggEssenceData;
|
||||
m_pCurrentPet = petData;
|
||||
m_nSlot = nSlot;
|
||||
UpdatePetUI(petData, petEssence, eggEssence);
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError($"DlgPetRec: Failed to get egg essence data for egg ID: {petData.GetEggID()}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogError($"DlgPetRec: Failed to get pet essence data for template ID: {petData.GetTemplateID()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePetUI(CECPetData petData, PET_ESSENCE petEssence, PET_EGG_ESSENCE eggEssence)
|
||||
{
|
||||
if (petData == null || eggEssence.id == 0)
|
||||
{
|
||||
BMLogger.LogWarning("DlgPetRec: UpdatePetUI - Invalid pet data or egg essence");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_pTxt_Name != null)
|
||||
m_pTxt_Name.text = petData.GetName();
|
||||
|
||||
if (m_pTxt_Gold != null)
|
||||
m_pTxt_Gold.text = eggEssence.money_restored.ToString();
|
||||
|
||||
if (m_pImg_Item != null)
|
||||
{
|
||||
string iconPath = petEssence.FileIcon;
|
||||
BMLogger.Log($"DlgPetRec: Loading icon from path: {iconPath}");
|
||||
|
||||
var sprite = LoadPetIconSprite(iconPath);
|
||||
if (sprite != null)
|
||||
{
|
||||
BMLogger.Log($"DlgPetRec: Sprite loaded successfully: {sprite.name}");
|
||||
m_pImg_Item.sprite = sprite;
|
||||
m_pImg_Item.enabled = true;
|
||||
m_pImg_Item.color = Color.white;
|
||||
m_pImg_Item.SetNativeSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: Failed to load sprite from path: {iconPath}");
|
||||
ClearSlotIcon(m_pImg_Item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearSlotIcon(Image slot)
|
||||
{
|
||||
if (slot == null)
|
||||
return;
|
||||
|
||||
slot.sprite = m_defaultIcon;
|
||||
slot.enabled = m_defaultIcon != null;
|
||||
}
|
||||
|
||||
private Sprite LoadPetIconSprite(string iconPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(iconPath))
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
string fileName = Path.GetFileNameWithoutExtension(iconPath);
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
return null;
|
||||
|
||||
fileName = fileName.ToLower();
|
||||
|
||||
var gameRun = EC_Game.GetGameRun();
|
||||
if (gameRun != null && gameRun.GetUIManager() != null)
|
||||
{
|
||||
return gameRun.GetUIManager().GetSpriteInListIvtr(fileName);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
BMLogger.LogError($"DlgPetRec: Failed to load pet icon sprite from path: {iconPath}. Exception: {ex}");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void LoadPetSlotFromCorral()
|
||||
{
|
||||
Array.Clear(m_petSlots, 0, m_petSlots.Length);
|
||||
|
||||
var host = CECGameRun.Instance?.GetHostPlayer();
|
||||
if (host == null)
|
||||
return;
|
||||
|
||||
var petCorral = host.GetPetCorral();
|
||||
if (petCorral == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < PETSLOT_MAX; i++)
|
||||
{
|
||||
m_petSlots[i] = petCorral.GetPetData(i);
|
||||
}
|
||||
}
|
||||
|
||||
public CECPetData GetPetSlot(int slotIndex)
|
||||
{
|
||||
if (slotIndex < 0 || slotIndex >= PETSLOT_MAX)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return m_petSlots[slotIndex];
|
||||
}
|
||||
|
||||
private void OnCommandCancel()
|
||||
{
|
||||
ClearPet();
|
||||
GetGameUIMan()?.EndNPCService();
|
||||
Show(false);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (m_draggedIcon != null)
|
||||
{
|
||||
Destroy(m_draggedIcon);
|
||||
m_draggedIcon = null;
|
||||
}
|
||||
ClearPet();
|
||||
}
|
||||
|
||||
private void UpdatePetSlotUI()
|
||||
{
|
||||
var host = CECGameRun.Instance?.GetHostPlayer();
|
||||
if (host == null)
|
||||
return;
|
||||
|
||||
var petCorral = host.GetPetCorral();
|
||||
if (petCorral == null)
|
||||
return;
|
||||
|
||||
var pDB = ElementDataManProvider.GetElementDataMan();
|
||||
if (pDB == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < PETSLOT_MAX; i++)
|
||||
{
|
||||
if (m_pBtn_PetSlots[i] == null)
|
||||
continue;
|
||||
|
||||
var petData = m_petSlots[i];
|
||||
if (petData != null)
|
||||
{
|
||||
var buttonImage = m_pBtn_PetSlots[i].GetComponent<Image>();
|
||||
if (buttonImage != null)
|
||||
{
|
||||
DATA_TYPE dataType = DATA_TYPE.DT_INVALID;
|
||||
var petEssenceData = pDB.get_data_ptr((uint)petData.GetTemplateID(), ID_SPACE.ID_SPACE_ESSENCE, ref dataType);
|
||||
|
||||
if (petEssenceData != null && dataType == DATA_TYPE.DT_PET_ESSENCE)
|
||||
{
|
||||
var petEssence = (PET_ESSENCE)petEssenceData;
|
||||
string iconPath = petEssence.FileIcon;
|
||||
var sprite = LoadPetIconSprite(iconPath);
|
||||
if (sprite != null)
|
||||
{
|
||||
buttonImage.sprite = sprite;
|
||||
buttonImage.enabled = true;
|
||||
|
||||
bool isActive = petCorral.GetActivePetIndex() == i;
|
||||
bool isDead = petData.GetHPFactor() <= 0.0f;
|
||||
bool isSelected = (m_nSlot == i && m_pCurrentPet != null);
|
||||
|
||||
if (isActive || isDead || isSelected)
|
||||
{
|
||||
buttonImage.color = Color.gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonImage.color = Color.white;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: Failed to load icon for pet slot {i}, iconPath: {iconPath}");
|
||||
ClearSlotIcon(buttonImage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BMLogger.LogWarning($"DlgPetRec: Failed to get pet essence for slot {i}, templateID: {petData.GetTemplateID()}");
|
||||
ClearSlotIcon(buttonImage);
|
||||
}
|
||||
}
|
||||
bool isActivePet = petCorral.GetActivePetIndex() == i;
|
||||
bool isSelectedPet = (m_nSlot == i && m_pCurrentPet != null);
|
||||
m_pBtn_PetSlots[i].interactable = !isActivePet && !isSelectedPet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearHighlight()
|
||||
{
|
||||
if (m_pBtn_PetSlots == null)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < m_pBtn_PetSlots.Length; i++)
|
||||
{
|
||||
if (m_pBtn_PetSlots[i] != null)
|
||||
{
|
||||
var image = m_pBtn_PetSlots[i].GetComponent<Image>();
|
||||
if (image != null)
|
||||
{
|
||||
image.color = Color.white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b015f204bd2048bcbd863ed5f164d98
|
||||
@@ -101,8 +101,9 @@ namespace BrewMonster.UI
|
||||
panelRoot.pivot = new Vector2(0, 1);
|
||||
}
|
||||
|
||||
void Update()
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
if (!m_bShow) return;
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
@@ -111,7 +112,7 @@ namespace BrewMonster.UI
|
||||
}
|
||||
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && panelRoot != null)
|
||||
{
|
||||
var canvas = panelRoot.GetComponentInParent<Canvas>();
|
||||
var canvas = GetComponentInParent<Canvas>();
|
||||
Camera cam = canvas != null && canvas.renderMode == RenderMode.ScreenSpaceCamera ? canvas.worldCamera : null;
|
||||
if (!RectTransformUtility.RectangleContainsScreenPoint(panelRoot, Input.mousePosition, cam))
|
||||
Show(false);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2832b8373ed049a89499155c2a507557
|
||||
timeCreated: 1770188709
|
||||
@@ -0,0 +1,39 @@
|
||||
using BrewMonster.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
public class CDlgExit : AUIDialog
|
||||
{
|
||||
[SerializeField] private Button ConfirmBtn;
|
||||
[SerializeField] private Button CancelBtn;
|
||||
// [SerializeField] private Toggle CheckBox;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
ConfirmBtn.onClick.AddListener(OnCommand_confirm);
|
||||
CancelBtn.onClick.AddListener(OnCancelClicked);
|
||||
}
|
||||
|
||||
private void OnCancelClicked()
|
||||
{
|
||||
Show(false);
|
||||
}
|
||||
|
||||
void OnCommand_confirm()
|
||||
{
|
||||
|
||||
// TODO: Implement logout and exit logic
|
||||
// if( m_pChk_Forcequit.isOn || !GetGameSession()->IsConnected())
|
||||
// GetGameRun()->PostMessage(MSG_EXITGAME, -1, 0);
|
||||
// else
|
||||
// GetGameRun()->GetPendingLogOut().AppendForSaveConfig(new CECPendingLogoutFull());
|
||||
|
||||
CECGameRun.Instance.GetPendingLogOut().AppendForSaveConfig(new CECPendingLogoutFull());
|
||||
|
||||
Show(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ca9d1418c284fd395248056f086c7d4
|
||||
timeCreated: 1770188720
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using BrewMonster.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
public class ExitTest : MonoBehaviour
|
||||
{
|
||||
private bool isExitDlgOpen = false;
|
||||
private Button btn;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
btn = GetComponent<Button>();
|
||||
btn.onClick.AddListener(ToggleDlgExit);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if ( Input.GetKeyDown(KeyCode.Escape) )
|
||||
{
|
||||
ToggleDlgExit();
|
||||
}
|
||||
}
|
||||
|
||||
void ToggleDlgExit()
|
||||
{
|
||||
isExitDlgOpen = !isExitDlgOpen;
|
||||
CECUIManager.Instance.GetInGameUIMan().GetDialog( "Win_Message2" ).Show( isExitDlgOpen );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96de7d56a4514c979bdd93568dba2031
|
||||
timeCreated: 1770190994
|
||||
@@ -5,7 +5,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -68,8 +67,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
if (!isNotCastSkill)
|
||||
{
|
||||
pSC.Execute();
|
||||
|
||||
SetInteract(false);
|
||||
//SetInteract(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -10,15 +10,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using static UnityEngine.Rendering.DebugUI;
|
||||
|
||||
namespace BrewMonster.UI
|
||||
{
|
||||
public class CECGameUIMan : AUIManager
|
||||
{
|
||||
DlgNPC m_pDlgNPC;
|
||||
CDlgPetList m_pDlgPetList;
|
||||
public NPC_ESSENCE? m_pCurNPCEssence;
|
||||
public int m_idCurFinishTask = -1;
|
||||
private DlgTask m_pDlgTask;
|
||||
@@ -159,6 +158,170 @@ namespace BrewMonster.UI
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get user layout data for saving to server. Stub: returns size 0 (UI layout save not implemented).
|
||||
/// 获取用户布局数据用于保存到服务器。桩:返回长度 0(UI 布局保存未实现)。
|
||||
/// </summary>
|
||||
/// TODO: NOW, IT ONLY RETURN THE FIXED SIZE OF STRUCTURE. NEED TO IMPLEMENT THE REAL DATA SAVE/LOAD.
|
||||
public void GetUserLayout(byte[] pData, ref uint dwUISize)
|
||||
{
|
||||
if( pData != null )
|
||||
{
|
||||
// int i;
|
||||
// USER_LAYOUT ul;
|
||||
// char szName[40];
|
||||
// PAUICHECKBOX pCheck;
|
||||
// CECHostPlayer *pHost = g_pGame->GetGameRun()->GetHostPlayer();
|
||||
//
|
||||
// memset(&ul, 0, sizeof(USER_LAYOUT));
|
||||
//
|
||||
// ul.nVersion = LAYOUTDATA_VERSION;
|
||||
// ul.nMapMode = m_pDlgMiniMap->GetMode();
|
||||
//
|
||||
// ul.bQuickbarPetMode = GetDialog("Win_QuickbarPetV")->IsShow();
|
||||
//
|
||||
// AString dlgName;
|
||||
//
|
||||
// dlgName.Format("Win_Quickbar%dHa", SIZE_HOSTSCSET1);
|
||||
// ul.bQuickbar1Mode = GetDialog(dlgName)->IsShow();
|
||||
// for( i = 0; i < NUM_HOSTSCSETS1; i++ )
|
||||
// {
|
||||
// sprintf(szName, "Win_Quickbar%dHb_%d", SIZE_HOSTSCSET1, i+1);
|
||||
// pCheck = (PAUICHECKBOX)GetDialog(szName)->GetDlgItem("Chk_Normal");
|
||||
// ul.bChecked1[i] = pCheck->IsChecked();
|
||||
// }
|
||||
//
|
||||
// dlgName.Format("Win_Quickbar%dHa", SIZE_HOSTSCSET2);
|
||||
// ul.bQuickbar2Mode = GetDialog(dlgName)->IsShow();
|
||||
// for( i = 0; i < NUM_HOSTSCSETS2; i++ )
|
||||
// {
|
||||
// sprintf(szName, "Win_Quickbar%dHb_%d", SIZE_HOSTSCSET2, i+1);
|
||||
|
||||
// pCheck = (PAUICHECKBOX)GetDialog(szName)->GetDlgItem("Chk_Normal");
|
||||
// ul.bChecked2[i] = pCheck->IsChecked();
|
||||
// }
|
||||
//
|
||||
// m_pDlgTask->SyncTrace(&ul, false);
|
||||
// ul.bQuickbarShowAll1 = CDlgQuickBar::m_bShowAll1;
|
||||
// ul.bQuickbarShowAll2 = CDlgQuickBar::m_bShowAll2;
|
||||
// ul.nQuickbarCurPanel1 = CDlgQuickBar::m_nCurPanel1;
|
||||
// ul.nQuickbarCurPanel2 = CDlgQuickBar::m_nCurPanel2;
|
||||
// ul.nQuickbarDisplayPanels1 = CDlgQuickBar::m_nDisplayPanels1;
|
||||
// ul.nQuickbarDisplayPanels2 = CDlgQuickBar::m_nDisplayPanels2;
|
||||
//
|
||||
// ul.nChatWinSize = m_pDlgChat->GetChatWinSize();
|
||||
// ul.nCurChatColor = m_pDlgChat->GetChatColor();
|
||||
//
|
||||
// for( i = 0; i < (int)m_pDlgMiniMap->GetMarks().size(); i++ )
|
||||
// {
|
||||
// ul.a_Mark[i].nNPC = m_pDlgMiniMap->GetMarks()[i].nNPC;
|
||||
// ul.a_Mark[i].vecPos = m_pDlgMiniMap->GetMarks()[i].vecPos;
|
||||
// ul.a_MarkMapID[i] = (short)m_pDlgMiniMap->GetMarks()[i].mapID;
|
||||
// a_strncpy(ul.a_Mark[i].szName, m_pDlgMiniMap->GetMarks()[i].strName, CECGAMEUIMAN_MARK_NAME_LEN);
|
||||
// }
|
||||
//
|
||||
// CECFriendMan::GROUP *pGroup;
|
||||
// CECFriendMan *pMan = g_pGame->GetGameRun()->GetHostPlayer()->GetFriendMan();
|
||||
// if (pMan)
|
||||
// {
|
||||
// int j(0);
|
||||
// for( i = 0; i < pMan->GetGroupNum() && j < CECGAMEUIMAN_MAX_GROUPS; i++ )
|
||||
// {
|
||||
// pGroup = pMan->GetGroupByIndex(i);
|
||||
// if (pGroup->iGroup)
|
||||
// {
|
||||
// ul.idGroup[j] = pGroup->iGroup;
|
||||
// ul.clrGroup[j] = pGroup->color;
|
||||
// ++ j;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// ul.bAutoReply = m_bAutoReply;
|
||||
// ul.bOnlineNotify = m_bOnlineNotify;
|
||||
// ul.bSaveHistory = m_bSaveHistory;
|
||||
//
|
||||
// ul.ucCurSystemModuleSC = pHost->GetCurSysModShortcutSetIndex(); // ��ǰʹ�õ�ϵͳģ������
|
||||
//
|
||||
// ul.bSystemModuleQuickBarMini = m_pDlgSysModuleQuickBar->GetMiniMode();
|
||||
//
|
||||
// ul.bMenuMode = m_pDlgSystemb->IsShow();
|
||||
//
|
||||
// ul.bShowCompareDesc = m_bShowItemDescCompare;
|
||||
// ul.bShowLowHP = m_bShowLowHP;
|
||||
// ul.bShowTargetOfTarget = m_bShowTargetOfTarget;
|
||||
//
|
||||
// memcpy(pvData, &ul, sizeof(USER_LAYOUT));
|
||||
//
|
||||
// POINT ptPos;
|
||||
// float fx, fy;
|
||||
// AIniFile theIni;
|
||||
// char szIniFile[MAX_PATH], szKey[40];
|
||||
// A3DVIEWPORTPARAM *p = m_pA3DEngine->GetActiveViewport()->GetParam();
|
||||
//
|
||||
// for( i = 0; i < (int)m_aDialog.size() - 1; i++ )
|
||||
// {
|
||||
// ptPos = m_aDialog[i]->GetPos();
|
||||
//
|
||||
// fx = ptPos.x * 100.0f / p->Width;
|
||||
// fy = ptPos.y * 100.0f / p->Height;
|
||||
//
|
||||
// //�Խ���UIλ�ò�����
|
||||
// /*
|
||||
// if( dynamic_cast<CDlgHomeBase*>( m_aDialog[i]) != NULL)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
// */
|
||||
//
|
||||
// sprintf(szKey, "%s_x", m_aDialog[i]->GetName());
|
||||
// theIni.WriteFloatValue("Windows", szKey, fx);
|
||||
//
|
||||
// sprintf(szKey, "%s_y", m_aDialog[i]->GetName());
|
||||
// theIni.WriteFloatValue("Windows", szKey, fy);
|
||||
// }
|
||||
//
|
||||
// // ͬ������ "Win_ELFZoom"��"Win_ELF" ��λ��
|
||||
// //
|
||||
// PAUIDIALOG pDlg(NULL);
|
||||
// if (GetDialog("Win_ELF")->IsShow())
|
||||
// {
|
||||
// pDlg = GetDialog("Win_ELFZoom");
|
||||
// ptPos = GetDialog("Win_ELF")->GetPos();
|
||||
// }
|
||||
// else if (GetDialog("Win_ELFZoom")->IsShow())
|
||||
// {
|
||||
// pDlg = GetDialog("Win_ELF");
|
||||
// ptPos = GetDialog("Win_ELFZoom")->GetPos();
|
||||
// }
|
||||
// if (pDlg)
|
||||
// {
|
||||
// fx = ptPos.x * 100.0f / p->Width;
|
||||
// fy = ptPos.y * 100.0f / p->Height;
|
||||
//
|
||||
// sprintf(szKey, "%s_x", pDlg->GetName());
|
||||
// theIni.WriteFloatValue("Windows", szKey, fx);
|
||||
//
|
||||
// sprintf(szKey, "%s_y", pDlg->GetName());
|
||||
// theIni.WriteFloatValue("Windows", szKey, fy);
|
||||
// }
|
||||
//
|
||||
// sprintf(szIniFile, "%s\\Userdata\\Layout", af_GetBaseDir());
|
||||
// CreateDirectoryA(szIniFile, NULL);
|
||||
//
|
||||
// sprintf(szIniFile, "%s\\UserData\\Layout\\%d.ini",
|
||||
// af_GetBaseDir(), pHost->GetCharacterID());
|
||||
// theIni.Save(szIniFile);
|
||||
// theIni.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: NEW STRUCT USER_LAYOUT
|
||||
// dwSize = sizeof(USER_LAYOUT);
|
||||
dwUISize = 344;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
@@ -194,6 +357,17 @@ namespace BrewMonster.UI
|
||||
}
|
||||
return strRealm;
|
||||
}
|
||||
|
||||
public void PopupPetListDialog()
|
||||
{
|
||||
if (m_pDlgPetList == null)
|
||||
{
|
||||
GameObject ob = m_dialogResouce.GetPrefabDialog("DlgPetList");
|
||||
m_pDlgPetList = GameObject.Instantiate(ob, m_canvas.transform).GetComponent<CDlgPetList>();
|
||||
m_pDlgPetList.SetAUIManager(this);
|
||||
}
|
||||
m_pDlgPetList.OnInitDialog();
|
||||
}
|
||||
}
|
||||
public enum EC_GAMEUI_ICONS : byte
|
||||
{
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace BrewMonster
|
||||
|
||||
private void OnEscapeClicked()
|
||||
{
|
||||
// Open the exit dialog , not directly exit the game
|
||||
|
||||
// return;
|
||||
if(EC_Game.GetGameRun()?.GetHostPlayer() != null)
|
||||
{
|
||||
EC_Game.GetGameRun()?.GetHostPlayer().OnClickBtnEscape();
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using BrewMonster.Scripts.Task.UI;
|
||||
using UnityEngine.UI;
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class ItemInfo : MonoBehaviour, IRefreshLayout
|
||||
{
|
||||
public void RefreshLayout()
|
||||
{
|
||||
var rectTransform = GetComponent<RectTransform>();
|
||||
if (rectTransform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
rectTransform.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(rectTransform);
|
||||
Debug.Log("ItemInfo RefreshLayout");
|
||||
if (transform.parent &&
|
||||
transform.parent.TryGetComponent<IRefreshLayout>(out var refreshLayout))
|
||||
{
|
||||
refreshLayout.RefreshLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc26b8fa93aea49b4abb8fe5455e51fe
|
||||
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
using BrewMonster.Scripts.Task.UI;
|
||||
using UnityEngine.UI;
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class ItemInfoText : MonoBehaviour, IRefreshLayout
|
||||
{
|
||||
[SerializeField] private RectTransform _rectTransform;
|
||||
private void Awake()
|
||||
{
|
||||
_rectTransform = GetComponent<RectTransform>();
|
||||
}
|
||||
public void RefreshLayout()
|
||||
{
|
||||
var rectTransform = _rectTransform;
|
||||
if (rectTransform == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
rectTransform.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(rectTransform);
|
||||
|
||||
if (transform.parent &&
|
||||
transform.parent.TryGetComponent<IRefreshLayout>(out var refreshLayout))
|
||||
{
|
||||
refreshLayout.RefreshLayout();
|
||||
Debug.Log("ItemInfoText RefreshLayout");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4cf21a97aa5c9445c9859afa14de01ad
|
||||
@@ -10,6 +10,9 @@ namespace BrewMonster.UI
|
||||
{
|
||||
public void OnClick()
|
||||
{
|
||||
CECUIManager.Instance.ShowUI( "Win_Message2" );
|
||||
|
||||
return;
|
||||
UnityGameSession.ReturnToSelectRole();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class NPCShopDetailPanel : MonoBehaviour
|
||||
|
||||
private GShopItem currentItem;
|
||||
private NPCShopUIManager shopManager;
|
||||
private int shopItemIndex;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -39,10 +40,11 @@ public class NPCShopDetailPanel : MonoBehaviour
|
||||
buyButton.onClick.AddListener(OnBuyButtonClicked);
|
||||
}
|
||||
|
||||
public void SetupDetailPanel(GShopItem item, NPCShopUIManager manager)
|
||||
public void SetupDetailPanel(GShopItem item, NPCShopUIManager manager, int index)
|
||||
{
|
||||
currentItem = item;
|
||||
shopManager = manager;
|
||||
shopItemIndex = index;
|
||||
|
||||
UpdateDisplay();
|
||||
}
|
||||
@@ -189,17 +191,19 @@ public class NPCShopDetailPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Create npc_trade_item array for buying from NPC
|
||||
// The tid is the item template ID, index is shop item index (0 for now), count is quantity to buy
|
||||
// Server requires SEVNPC_HELLO with NPC id before buy, and the correct shop slot index
|
||||
if (shopManager != null && shopManager.CurrentNPCID != 0)
|
||||
UnityGameSession.c2s_CmdNPCSevHello((int)shopManager.CurrentNPCID);
|
||||
|
||||
// Create npc_trade_item: tid = template ID, index = shop slot (server validates this), count = quantity
|
||||
npc_trade_item[] items = new npc_trade_item[1];
|
||||
items[0] = new npc_trade_item
|
||||
{
|
||||
tid = (int)currentItem.id,
|
||||
index = 0, // Shop item index - may need to be determined from shop item position
|
||||
count = 1 // Quantity to buy
|
||||
index = (uint)shopItemIndex,
|
||||
count = 1
|
||||
};
|
||||
|
||||
// Send the buy command
|
||||
UnityGameSession.c2s_CmdNPCSevBuy(1, items);
|
||||
|
||||
Debug.Log($"[NPCShopDetailPanel] Sent buy command for item {currentItem.id}, price {price}");
|
||||
|
||||
@@ -19,6 +19,7 @@ public class NPCShopItemPanel : MonoBehaviour
|
||||
private GShopItem itemData;
|
||||
private Coroutine iconLoadCoroutine;
|
||||
private NPCShopUIManager shopManager;
|
||||
private int shopItemIndex;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -54,10 +55,11 @@ public class NPCShopItemPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SetupItem(GShopItem item, NPCShopUIManager manager)
|
||||
public void SetupItem(GShopItem item, NPCShopUIManager manager, int index)
|
||||
{
|
||||
itemData = item;
|
||||
shopManager = manager;
|
||||
shopItemIndex = index;
|
||||
UpdateDisplay();
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ public class NPCShopItemPanel : MonoBehaviour
|
||||
{
|
||||
if (shopManager != null && itemData.id != 0)
|
||||
{
|
||||
shopManager.ShowItemDetail(itemData);
|
||||
shopManager.ShowItemDetail(itemData, shopItemIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
private int currentTabIndex = 0;
|
||||
private uint currentNPCID = 0;
|
||||
private NPC_SELL_SERVICE? cachedSellService = null;
|
||||
|
||||
/// <summary>Current NPC id for this shop session. Send SEVNPC_HELLO with this before buy.</summary>
|
||||
public uint CurrentNPCID => currentNPCID;
|
||||
private NPCShopDetailPanel detailPanelScript;
|
||||
|
||||
void Start()
|
||||
@@ -278,8 +281,9 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
if (elementDataMan == null)
|
||||
return;
|
||||
|
||||
foreach (var good in page.goods)
|
||||
for (int i = 0; i < page.goods.Length; i++)
|
||||
{
|
||||
var good = page.goods[i];
|
||||
if (good.id == 0)
|
||||
continue;
|
||||
|
||||
@@ -293,8 +297,8 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
// Create GShopItem
|
||||
GShopItem shopItem = CreateShopItemFromGood(good, itemData, itemDataType);
|
||||
|
||||
// Create panel
|
||||
CreateItemPanel(shopItem);
|
||||
// Create panel with shop slot index (server expects this in npc_trade_item.index)
|
||||
CreateItemPanel(shopItem, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -372,7 +376,7 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
return shopItem;
|
||||
}
|
||||
|
||||
void CreateItemPanel(GShopItem item)
|
||||
void CreateItemPanel(GShopItem item, int shopItemIndex)
|
||||
{
|
||||
if (itemPanelPrefab == null || itemContainer == null)
|
||||
return;
|
||||
@@ -386,7 +390,7 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
|
||||
if (itemPanelScript != null)
|
||||
{
|
||||
itemPanelScript.SetupItem(item, this);
|
||||
itemPanelScript.SetupItem(item, this, shopItemIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -406,7 +410,7 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
currentItemPanels.Clear();
|
||||
}
|
||||
|
||||
public void ShowItemDetail(GShopItem item)
|
||||
public void ShowItemDetail(GShopItem item, int shopItemIndex)
|
||||
{
|
||||
if (item.id == 0)
|
||||
return;
|
||||
@@ -428,7 +432,7 @@ public class NPCShopUIManager : MonoBehaviour
|
||||
if (detailPanelScript != null)
|
||||
{
|
||||
npcShopDetailPanel.SetActive(true);
|
||||
detailPanelScript.SetupDetailPanel(item, this);
|
||||
detailPanelScript.SetupDetailPanel(item, this, shopItemIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.UI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
@@ -12,56 +13,94 @@ namespace BrewMonster
|
||||
}
|
||||
public void RefreshStatusBar()
|
||||
{
|
||||
bool bShow = false;
|
||||
bool bActive = true;
|
||||
//if (GetGameUIMan().GetActiveDialog() &&
|
||||
// GetGameUIMan().GetActiveDialog().GetFocus() &&
|
||||
// GetGameUIMan().GetActiveDialog().GetFocus().GetType() == AUIOBJECT_TYPE_EDITBOX)
|
||||
// bActive = false;
|
||||
|
||||
//// Flight bar.
|
||||
//RefreshFlightBar(bActive);
|
||||
|
||||
//// Oxigen bar.
|
||||
//RefreshOxigenBar(bActive);
|
||||
|
||||
//// Gather bar.
|
||||
//RefreshGatherBar(bActive);
|
||||
|
||||
// group these bars, show only one at one time
|
||||
bool bShow = false;
|
||||
// Power bar.
|
||||
//bShow |= RefreshPowerBar(bShow, bActive);
|
||||
// Array bar.
|
||||
//bShow |= RefreshArrayBar(bShow, bActive);
|
||||
// Incant bar.
|
||||
bShow |= RefreshIncantBar(bShow, bActive);
|
||||
|
||||
if (EC_Game.GetGameRun() != null && EC_Game.GetGameRun().GetHostPlayer() != null
|
||||
&& EC_Game.GetGameRun().GetHostPlayer().GetCurSkill() != null && !bShow)
|
||||
{
|
||||
// 传送等方式导致位置切换、技能(阵技能)仍然在释放状态
|
||||
//
|
||||
UnityGameSession.c2s_CmdCancelAction();
|
||||
}
|
||||
|
||||
//// AutoHP bar.
|
||||
//RefreshAutoHPBar(bActive);
|
||||
|
||||
//// AutoMP bar.
|
||||
//RefreshAutoMPBar(bActive);
|
||||
|
||||
//// pet status
|
||||
//RefreshPetStatus();
|
||||
|
||||
////ELF status
|
||||
//RefreshElfStatus();
|
||||
}
|
||||
public bool RefreshIncantBar(bool bOtherShown, bool bActive)
|
||||
{
|
||||
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
|
||||
if(pHost == null) return false;
|
||||
if (pHost == null) return false;
|
||||
CECSkill pCurSkill = pHost.GetCurSkill();
|
||||
bool bShow = false;
|
||||
float nCur = 1;
|
||||
float nCur = 1;
|
||||
float nMax = 1;
|
||||
|
||||
AUIDialog pDlg = CECUIManager.Instance.GetInGameUIMan().GetDialog("MagicProgress1");
|
||||
if (!bOtherShown)
|
||||
{
|
||||
uint dwCurTime = 0, dwMaxTime = 0;
|
||||
if(pCurSkill != null)
|
||||
|
||||
if (false/*pHost.GetUsingItemTimeCnt(dwCurTime, dwMaxTime)*/)
|
||||
int? piItem = null;
|
||||
if (false /*pHost.GetUsingItemTimeCnt(ref dwCurTime, ref dwMaxTime, ref piItem)*/)
|
||||
{
|
||||
/* bShow = true;
|
||||
nCur = dwCurTime;
|
||||
nMax = dwMaxTime;
|
||||
pDlg->GetDlgItem("Txt")->SetText(pHost->IsGatheringMonsterSpirit() ?
|
||||
GetStringFromTable(738) : GetStringFromTable(726));*/
|
||||
//bShow = true;
|
||||
//nCur = dwCurTime;
|
||||
//nMax = dwMaxTime;
|
||||
//pDlg.GetSkillNameText().SetText(pHost.IsGatheringMonsterSpirit() ?
|
||||
// pDlg.GetStringFromTable(738) : pDlg.GetStringFromTable(726));
|
||||
}
|
||||
/*else if (pHost->IsOperatingPet())
|
||||
else if (pHost.IsOperatingPet() != 0)
|
||||
{
|
||||
pDlg.transform.SetAsLastSibling();
|
||||
bShow = true;
|
||||
nCur = pHost->GetPetOptTime().GetCounter();
|
||||
nMax = max(pHost->GetPetOptTime().GetPeriod(), 1);
|
||||
switch (pHost->IsOperatingPet())
|
||||
nCur = Math.Abs(pHost.GetPetOptTime().GetCounter());
|
||||
nMax = Math.Max(pHost.GetPetOptTime().GetPeriod(), 1);
|
||||
switch (pHost.IsOperatingPet())
|
||||
{
|
||||
case 1:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(791));
|
||||
pDlg.GetSkillNameText().SetText(pDlg.GetStringFromTable(791));
|
||||
break;
|
||||
case 2:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(792));
|
||||
pDlg.GetSkillNameText().SetText(pDlg.GetStringFromTable(792));
|
||||
break;
|
||||
case 3:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(793));
|
||||
pDlg.GetSkillNameText().SetText(pDlg.GetStringFromTable(793));
|
||||
break;
|
||||
case 4:
|
||||
pDlg->GetDlgItem("Txt")->SetText(GetStringFromTable(794));
|
||||
pDlg.GetSkillNameText().SetText(pDlg.GetStringFromTable(794));
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else if (pHost.IsSpellingMagic() && pCurSkill != null)
|
||||
{
|
||||
bShow = true;
|
||||
@@ -71,18 +110,18 @@ namespace BrewMonster
|
||||
|
||||
pDlg.GetSkillNameText().text = (EC_Game.GetSkillDesc().GetWideString(pCurSkill.GetSkillID() * 10));
|
||||
}
|
||||
/* else if (pHost.IsCongregating())
|
||||
{
|
||||
bShow = true;
|
||||
CECCounter counter = pHost->GetCongregateCnt();
|
||||
nCur = counter.GetCounter();
|
||||
nMax = max(counter.GetPeriod(), 1);
|
||||
//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));
|
||||
}*/
|
||||
// int conType = pHost.IsCongregating() - 1;
|
||||
// pDlg.GetDlgItem("Txt").SetText(GetStringFromTable(5700 + conType));
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (bShow)
|
||||
{
|
||||
@@ -102,5 +141,38 @@ namespace BrewMonster
|
||||
|
||||
return bShow;
|
||||
}
|
||||
|
||||
//bool RefreshPowerBar(bool bOtherShown, bool bActive)
|
||||
//{
|
||||
// CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
|
||||
// CECSkill pCurSkill = pHost.GetCurSkill();
|
||||
|
||||
// bool bShow = false;
|
||||
|
||||
// PAUIDIALOG pDlg = GetGameUIMan().GetDialog("MagicProgress2");
|
||||
// if (pCurSkill && pCurSkill.IsCharging() && !bOtherShown)
|
||||
// {
|
||||
// bShow = true;
|
||||
// int nCur = pCurSkill.GetChargingCnt();
|
||||
// int nMax = max(pCurSkill.GetChargingMax(), 1);
|
||||
|
||||
// if (!pDlg.IsShow())
|
||||
// pDlg.Show(true, false, bActive);
|
||||
|
||||
// PAUIPROGRESS pProgress = (PAUIPROGRESS)pDlg.GetDlgItem("Prgs");
|
||||
// pProgress.SetProgress(AUIPROGRESS_MAX * nCur / nMax);
|
||||
|
||||
// ACString strText;
|
||||
// strText.Format(GetStringFromTable(605), g_pGame.GetSkillDesc().GetWideString(pCurSkill.GetSkillID() * 10));
|
||||
// pDlg.GetDlgItem("Txt").SetText(strText);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (pDlg.IsShow())
|
||||
// pDlg.Show(false);
|
||||
// }
|
||||
|
||||
// return bShow;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,12 @@ namespace BrewMonster
|
||||
actionButton.onClick.AddListener(OnActionButtonClicked);
|
||||
learnedSkillButton.onClick.AddListener(OnLearnedSkillButtonClicked);
|
||||
}
|
||||
void OnEnable()
|
||||
{
|
||||
skillUIPanel.SetActive(true);
|
||||
actionUIPanel.SetActive(false);
|
||||
learnSkillUIPanel.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnLearnedSkillButtonClicked()
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.IO;
|
||||
using System.IO.Compression;
|
||||
using Unity.SharpZipLib.Zip.Compression.Streams;
|
||||
using UnityEngine;
|
||||
using CompressionLevel = System.IO.Compression.CompressionLevel;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -33,6 +34,75 @@ namespace BrewMonster
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compress data in zlib format (2-byte header + deflate + 4-byte Adler-32), matching what UnCompress expects.
|
||||
/// 压缩为 zlib 格式(2 字节头 + deflate + 4 字节 Adler-32),与 UnCompress 一致。
|
||||
/// </summary>
|
||||
/// <param name="dstOffset">Start index in dst where compressed bytes are written. 压缩数据写入 dst 的起始下标。</param>
|
||||
/// <param name="dstLen">On input max length; on output actual compressed length. 输入为最大长度,输出为实际压缩长度。</param>
|
||||
/// <returns>0 ok, non-zero error</returns>
|
||||
public static int Compress(byte[] src, int srcOffset, int srcLen, byte[] dst, int dstOffset, ref int dstLen)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Raw deflate into temporary buffer (same as decompression uses DeflateStream)
|
||||
byte[] deflateBytes;
|
||||
using (var deflateOutput = new MemoryStream())
|
||||
{
|
||||
using (var deflate = new DeflateStream(deflateOutput, CompressionLevel.Optimal))
|
||||
{
|
||||
deflate.Write(src, srcOffset, srcLen);
|
||||
}
|
||||
deflateBytes = deflateOutput.ToArray();
|
||||
}
|
||||
|
||||
// Zlib format: 2-byte header + deflate + 4-byte Adler-32 (matches ZlibUnCompressDeflate which skips 2, length-6)
|
||||
const int zlibHeaderLen = 2;
|
||||
const int zlibFooterLen = 4;
|
||||
int totalLen = zlibHeaderLen + deflateBytes.Length + zlibFooterLen;
|
||||
|
||||
if (dstOffset + totalLen > dst.Length)
|
||||
return Z_BUF_ERROR;
|
||||
|
||||
int writeAt = dstOffset;
|
||||
|
||||
// 2-byte zlib header (deflate, 32K window, default compression)
|
||||
dst[writeAt++] = 0x78;
|
||||
dst[writeAt++] = 0x9C;
|
||||
|
||||
Buffer.BlockCopy(deflateBytes, 0, dst, writeAt, deflateBytes.Length);
|
||||
writeAt += deflateBytes.Length;
|
||||
|
||||
// 4-byte Adler-32 of uncompressed data (big-endian)
|
||||
uint adler = Adler32(src, srcOffset, srcLen);
|
||||
dst[writeAt++] = (byte)(adler >> 24);
|
||||
dst[writeAt++] = (byte)(adler >> 16);
|
||||
dst[writeAt++] = (byte)(adler >> 8);
|
||||
dst[writeAt++] = (byte)(adler);
|
||||
|
||||
dstLen = totalLen;
|
||||
return Z_OK;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine($"ERROR::AFilePackage::Compress: {e.Message}");
|
||||
return Z_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
private static uint Adler32(byte[] data, int offset, int length)
|
||||
{
|
||||
const uint Mod = 65521u;
|
||||
uint a = 1u, b = 0u;
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
byte c = data[offset + i];
|
||||
a = (a + c) % Mod;
|
||||
b = (b + a) % Mod;
|
||||
}
|
||||
return (b << 16) | a;
|
||||
}
|
||||
|
||||
private static int ZlibUnCompress(byte[] dest, ref int destLen, byte[] source, int sourceLen)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1673,157 +1673,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &1594203807091332740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5532160440658279991}
|
||||
- component: {fileID: 6515784035264135153}
|
||||
- component: {fileID: 3052060940079008827}
|
||||
- component: {fileID: 1849320534743254025}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5532160440658279991
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1594203807091332740}
|
||||
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: 2936949163668112319}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 21, y: -55.426666}
|
||||
m_SizeDelta: {x: 465.7476, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &6515784035264135153
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1594203807091332740}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3052060940079008827
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1594203807091332740}
|
||||
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: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 30
|
||||
m_fontSizeBase: 30
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &1849320534743254025
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1594203807091332740}
|
||||
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 &1690800784599266304
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2406,6 +2255,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 12345678901234567890123456789012, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 0}
|
||||
imageProgress: {fileID: 0}
|
||||
inventoryPackButtons:
|
||||
- {fileID: 1307928501189760760}
|
||||
- {fileID: 7633215151546143570}
|
||||
@@ -2445,7 +2296,7 @@ MonoBehaviour:
|
||||
- {fileID: 7991954821956009045}
|
||||
equipmentPackButtons: []
|
||||
fashionPackButtons: []
|
||||
detailPanelRoot: {fileID: 4539830910443594431}
|
||||
detailPanelRoot: {fileID: 8629454032418312454}
|
||||
detailPanelOffset: {x: 20, y: 0}
|
||||
hideDetailOnStart: 1
|
||||
nameText:
|
||||
@@ -2453,7 +2304,7 @@ MonoBehaviour:
|
||||
tmp: {fileID: 0}
|
||||
descriptionText:
|
||||
legacy: {fileID: 0}
|
||||
tmp: {fileID: 4138010606315712091}
|
||||
tmp: {fileID: 3370202546434328191}
|
||||
extendedDescText:
|
||||
legacy: {fileID: 0}
|
||||
tmp: {fileID: 0}
|
||||
@@ -4483,7 +4334,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8738303048454357126}
|
||||
- {fileID: 2936949163668112319}
|
||||
- {fileID: 2213460703881143580}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -6960,126 +6811,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &4539830910443594431
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2936949163668112319}
|
||||
- component: {fileID: 2137730523684877893}
|
||||
- component: {fileID: 8095628546895960714}
|
||||
- component: {fileID: 1416550783277963328}
|
||||
- component: {fileID: 1760085209474819873}
|
||||
m_Layer: 5
|
||||
m_Name: item_info
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &2936949163668112319
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4539830910443594431}
|
||||
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: 2160212043352760985}
|
||||
- {fileID: 6104246187787285212}
|
||||
- {fileID: 5532160440658279991}
|
||||
m_Father: {fileID: 2249009488791876389}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -131.8877, y: 88.297485}
|
||||
m_SizeDelta: {x: -1417.281, y: -997}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2137730523684877893
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4539830910443594431}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8095628546895960714
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4539830910443594431}
|
||||
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: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 31724268aed254d4c9a0523e647a6c71, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1416550783277963328
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4539830910443594431}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 21
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 19
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &1760085209474819873
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4539830910443594431}
|
||||
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 &4559531019139891630
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -11125,157 +10856,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &7106375664143841416
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2160212043352760985}
|
||||
- component: {fileID: 7952468642615176995}
|
||||
- component: {fileID: 8888546309976738590}
|
||||
- component: {fileID: 8633753318584029832}
|
||||
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 &2160212043352760985
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7106375664143841416}
|
||||
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: 2936949163668112319}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 21, y: -0}
|
||||
m_SizeDelta: {x: 472.5032, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &7952468642615176995
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7106375664143841416}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8888546309976738590
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7106375664143841416}
|
||||
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: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 30
|
||||
m_fontSizeBase: 30
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &8633753318584029832
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7106375664143841416}
|
||||
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 &7117451425221748005
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -14419,159 +13999,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &8705925486655377445
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6104246187787285212}
|
||||
- component: {fileID: 1836077962666358815}
|
||||
- component: {fileID: 4138010606315712091}
|
||||
- component: {fileID: 3133474369300817254}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6104246187787285212
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8705925486655377445}
|
||||
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: 2936949163668112319}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 21, y: -27.713333}
|
||||
m_SizeDelta: {x: 465.7476, y: 38.28}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &1836077962666358815
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8705925486655377445}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4138010606315712091
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8705925486655377445}
|
||||
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: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'abcdegtiklm
|
||||
|
||||
'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, 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: 30
|
||||
m_fontSizeBase: 30
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &3133474369300817254
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8705925486655377445}
|
||||
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 &8723464662275671517
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -15268,3 +14695,139 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1001 &847402817891213973
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 2249009488791876389}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 450
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 220.02612
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -32.73999
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2412057975732520665, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5721094068644211543, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6830833846243993097, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: item_info
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7370156420958780641, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
--- !u!224 &2213460703881143580 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
m_PrefabInstance: {fileID: 847402817891213973}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &3370202546434328191 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2668322321768899818, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
m_PrefabInstance: {fileID: 847402817891213973}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &8629454032418312454 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8936108025019184019, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
m_PrefabInstance: {fileID: 847402817891213973}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fc26b8fa93aea49b4abb8fe5455e51fe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37f331119e0524018a0a7266aa257777
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -368,6 +368,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e8681072225697243a08644ceda976a3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 0}
|
||||
imageProgress: {fileID: 0}
|
||||
panelRoot: {fileID: 6830833846243993097}
|
||||
descriptionText:
|
||||
legacy: {fileID: 0}
|
||||
|
||||
@@ -12559,7 +12559,7 @@ MonoBehaviour:
|
||||
- {fileID: 6415804096478650164}
|
||||
- {fileID: 486249631205428665}
|
||||
fashionPackButtons: []
|
||||
detailPanelRoot: {fileID: 2900449705256812174}
|
||||
detailPanelRoot: {fileID: 759109931263093524}
|
||||
detailPanelOffset: {x: 20, y: 0}
|
||||
hideDetailOnStart: 1
|
||||
nameText:
|
||||
@@ -19739,22 +19739,6 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 5834405183358786743}
|
||||
m_Modifications:
|
||||
- target: {fileID: 636299721907915661, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 636299721907915661, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 636299721907915661, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 636299721907915661, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
@@ -19785,7 +19769,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 825.53
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1546246053547542409, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -19839,46 +19823,6 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: item_info
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6830833846243993097, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7209086543831860202, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7209086543831860202, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7209086543831860202, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7209086543831860202, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -805.53
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8894405194986632892, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8894405194986632892, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8894405194986632892, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 805.53
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8894405194986632892, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8894405194986632892, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -402.765
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
@@ -19917,11 +19861,17 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &2900449705256812174 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 6830833846243993097, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
--- !u!114 &759109931263093524 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8936108025019184019, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
m_PrefabInstance: {fileID: 8542071282636773511}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fc26b8fa93aea49b4abb8fe5455e51fe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &6020258894941961325 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2668322321768899818, guid: c56ed80641ff74ce49f91401e3eb8367, type: 3}
|
||||
|
||||
+215
-116
@@ -365,10 +365,10 @@ RectTransform:
|
||||
- {fileID: 6913810588620795676}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 38, y: -140.39}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &5889574211483133077
|
||||
CanvasRenderer:
|
||||
@@ -728,10 +728,10 @@ RectTransform:
|
||||
- {fileID: 1609651149174304326}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 38, y: -242.78}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &521924147895834695
|
||||
CanvasRenderer:
|
||||
@@ -1615,10 +1615,10 @@ RectTransform:
|
||||
- {fileID: 1704697067466645826}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 38, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &3604148096459499892
|
||||
CanvasRenderer:
|
||||
@@ -2282,7 +2282,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 91.87}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6858302016506942629
|
||||
CanvasRenderer:
|
||||
@@ -2433,7 +2433,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 91.87}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7562352963284824378
|
||||
CanvasRenderer:
|
||||
@@ -2641,7 +2641,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2387395177775218455
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2713,6 +2713,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4d2e79da3ae98154c98516f50b73a81b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 0}
|
||||
imageProgress: {fileID: 0}
|
||||
ptSkillContainer: {fileID: 5209698742198332103}
|
||||
psSkillContainer: {fileID: 6640795756162075713}
|
||||
psSkillSlotList: []
|
||||
@@ -2749,10 +2751,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 210, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &8358568677657722128
|
||||
CanvasRenderer:
|
||||
@@ -3362,10 +3364,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 382, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &7646717020914693947
|
||||
CanvasRenderer:
|
||||
@@ -3815,7 +3817,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 149.24545, y: 0.00000023857865}
|
||||
m_AnchoredPosition: {x: 149.24545, y: 0}
|
||||
m_SizeDelta: {x: 154.1473, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5506685427520632045
|
||||
@@ -3950,9 +3952,9 @@ RectTransform:
|
||||
- {fileID: 5885063335678115690}
|
||||
m_Father: {fileID: 1263498971758389975}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 127, y: -18.5}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 254, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1887848967215853843
|
||||
@@ -4113,7 +4115,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 309.47, y: -95}
|
||||
m_SizeDelta: {x: 618.94, y: 76}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2264175676541462108
|
||||
CanvasRenderer:
|
||||
@@ -4223,10 +4225,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 554, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &1725305811772317814
|
||||
CanvasRenderer:
|
||||
@@ -4599,10 +4601,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &3765304872596771789
|
||||
CanvasRenderer:
|
||||
@@ -4886,10 +4888,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 296, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &9207107349168631693
|
||||
CanvasRenderer:
|
||||
@@ -5046,7 +5048,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -322.47, y: 365.44547}
|
||||
m_SizeDelta: {x: 644.94, y: 703.38}
|
||||
m_SizeDelta: {x: 644.94, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &8275541816169387879
|
||||
CanvasRenderer:
|
||||
@@ -5138,6 +5140,7 @@ GameObject:
|
||||
- component: {fileID: 6710103663631289946}
|
||||
- component: {fileID: 523329600507644709}
|
||||
- component: {fileID: 912173140299320127}
|
||||
- component: {fileID: 6034688251073174200}
|
||||
m_Layer: 5
|
||||
m_Name: icon
|
||||
m_TagString: Untagged
|
||||
@@ -5178,11 +5181,12 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 67fd391520cbfd44f84a1c6bb57673c0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillbutton: {fileID: 0}
|
||||
skillbutton: {fileID: 6034688251073174200}
|
||||
skillImage: {fileID: 79341390793448853}
|
||||
borderImage: {fileID: 5124956242307597890}
|
||||
cooldownTime: 0
|
||||
m_ClockCounter: {fileID: 0}
|
||||
isNotCastSkill: 0
|
||||
--- !u!222 &523329600507644709
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5221,6 +5225,50 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6034688251073174200
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3331107676278791390}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 0
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 0}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &3406708742645219522
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6567,10 +6615,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 124, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &1291961236682885550
|
||||
CanvasRenderer:
|
||||
@@ -6643,9 +6691,9 @@ RectTransform:
|
||||
- {fileID: 5918073574760109704}
|
||||
m_Father: {fileID: 1285542512886306091}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 127, y: -18.5}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 254, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1257159900126729527
|
||||
@@ -6718,10 +6766,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 38, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &2268981575541439631
|
||||
CanvasRenderer:
|
||||
@@ -6800,7 +6848,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 335.47, y: -98.4}
|
||||
m_SizeDelta: {x: 618.94, y: 140.8}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2124054608285479539
|
||||
CanvasRenderer:
|
||||
@@ -7471,10 +7519,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &897642746592729160
|
||||
CanvasRenderer:
|
||||
@@ -7988,10 +8036,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 210, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &7412806809519503430
|
||||
CanvasRenderer:
|
||||
@@ -8184,10 +8232,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 124, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &8958294640541543931
|
||||
CanvasRenderer:
|
||||
@@ -8620,7 +8668,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 91.87}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5438050072468631381
|
||||
CanvasRenderer:
|
||||
@@ -9151,7 +9199,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 91.87}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3044764523714620351
|
||||
CanvasRenderer:
|
||||
@@ -9568,10 +9616,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 382, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &8292637089760855876
|
||||
CanvasRenderer:
|
||||
@@ -9644,9 +9692,9 @@ RectTransform:
|
||||
- {fileID: 3666972851124413242}
|
||||
m_Father: {fileID: 1244895283146852732}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 127, y: -18.5}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 254, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4852245878945746775
|
||||
@@ -9720,10 +9768,10 @@ RectTransform:
|
||||
- {fileID: 7544910809585033678}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 382.5, y: -242.78}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &2164606938053553701
|
||||
CanvasRenderer:
|
||||
@@ -9977,10 +10025,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 38, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &4804628498516101234
|
||||
CanvasRenderer:
|
||||
@@ -10053,9 +10101,9 @@ RectTransform:
|
||||
- {fileID: 7738777691134633714}
|
||||
m_Father: {fileID: 332864778784360512}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 127, y: -18.5}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 254, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8557376726661632322
|
||||
@@ -10206,7 +10254,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 335.47, y: -263.3}
|
||||
m_SizeDelta: {x: 618.94, y: 133}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5943966890611580968
|
||||
CanvasRenderer:
|
||||
@@ -10845,6 +10893,7 @@ MonoBehaviour:
|
||||
borderImage: {fileID: 6819612505585264736}
|
||||
cooldownTime: 0
|
||||
m_ClockCounter: {fileID: 0}
|
||||
isNotCastSkill: 0
|
||||
--- !u!114 &7693362874457494086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -10997,10 +11046,10 @@ RectTransform:
|
||||
- {fileID: 7759567721800243228}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 382.5, y: -140.39}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &2464100607009156610
|
||||
CanvasRenderer:
|
||||
@@ -11803,7 +11852,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 335.47, y: -530.58997}
|
||||
m_SizeDelta: {x: 618.94, y: 345.58002}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9030098628201859511
|
||||
CanvasRenderer:
|
||||
@@ -12726,10 +12775,10 @@ RectTransform:
|
||||
- {fileID: 1335544207958730177}
|
||||
m_Father: {fileID: 3123930244098203053}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 382.5, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &3020341225908238861
|
||||
CanvasRenderer:
|
||||
@@ -12812,7 +12861,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 309.47, y: -205.19}
|
||||
m_SizeDelta: {x: 618.94, y: 280.78}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3138218988396077083
|
||||
CanvasRenderer:
|
||||
@@ -13021,6 +13070,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7304a7aa2183ad34babf66894ed22f7e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 0}
|
||||
imageProgress: {fileID: 0}
|
||||
m_pSubRank: {fileID: 1851903413579782982}
|
||||
m_pSubSkill: {fileID: 7688900625148083785}
|
||||
m_contentRoot: {fileID: 8302858527499935758}
|
||||
@@ -13072,7 +13123,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 309.47, y: -102.8}
|
||||
m_SizeDelta: {x: 618.94, y: 76}
|
||||
m_SizeDelta: {x: 618.94, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &965625795563076259
|
||||
CanvasRenderer:
|
||||
@@ -13213,6 +13264,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 05377af3dd0a3a84fbff62d8e0a572f9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillNameText: {fileID: 0}
|
||||
imageProgress: {fileID: 0}
|
||||
m_skillNameLbl: {fileID: 7381636566794381957}
|
||||
skillLevel: {fileID: 1095789015156331712}
|
||||
m_highlight: {fileID: 0}
|
||||
@@ -13325,9 +13378,9 @@ RectTransform:
|
||||
- {fileID: 8641794091682467561}
|
||||
m_Father: {fileID: 4902026760249267287}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 127, y: -18.5}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 254, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7759539851022153828
|
||||
@@ -13380,6 +13433,7 @@ GameObject:
|
||||
- component: {fileID: 6897593266829550523}
|
||||
- component: {fileID: 6263047871981887699}
|
||||
- component: {fileID: 8452392559284459496}
|
||||
- component: {fileID: 5320015828055191291}
|
||||
m_Layer: 5
|
||||
m_Name: icon
|
||||
m_TagString: Untagged
|
||||
@@ -13420,11 +13474,12 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 67fd391520cbfd44f84a1c6bb57673c0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillbutton: {fileID: 0}
|
||||
skillbutton: {fileID: 5320015828055191291}
|
||||
skillImage: {fileID: 4930055916587000086}
|
||||
borderImage: {fileID: 3406708742645219522}
|
||||
cooldownTime: 0
|
||||
m_ClockCounter: {fileID: 0}
|
||||
isNotCastSkill: 0
|
||||
--- !u!222 &6263047871981887699
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13463,6 +13518,50 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &5320015828055191291
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8033079540058746360}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 0
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 8452392559284459496}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &8090171231683763887
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13502,7 +13601,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -361.27, y: 365.44547}
|
||||
m_SizeDelta: {x: 722.5344, y: 185.6}
|
||||
m_SizeDelta: {x: 722.5344, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &74166521354270119
|
||||
CanvasRenderer:
|
||||
@@ -13618,7 +13717,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 91.87}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8934459415203184979
|
||||
CanvasRenderer:
|
||||
@@ -14462,10 +14561,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3490841402936291418}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 296, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &8186299737150272153
|
||||
CanvasRenderer:
|
||||
@@ -14569,7 +14668,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4958559450723387948
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -14682,7 +14781,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 117.99603, y: 0}
|
||||
m_SizeDelta: {x: 143.9446, y: 45.94}
|
||||
m_SizeDelta: {x: 143.9446, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8300893254371079820
|
||||
CanvasRenderer:
|
||||
@@ -14836,7 +14935,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 368.81186, y: -153.20001}
|
||||
m_SizeDelta: {x: 685.6237, y: 64.8}
|
||||
m_SizeDelta: {x: 685.6237, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8076001380599592139
|
||||
CanvasRenderer:
|
||||
@@ -14948,10 +15047,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3449045492221331241}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 554, y: -38}
|
||||
m_SizeDelta: {x: 76, y: 76}
|
||||
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!222 &4341901141596287823
|
||||
CanvasRenderer:
|
||||
@@ -15030,7 +15129,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 368.81186, y: -60.4}
|
||||
m_SizeDelta: {x: 685.6237, y: 64.8}
|
||||
m_SizeDelta: {x: 685.6237, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8659649200798903193
|
||||
CanvasRenderer:
|
||||
|
||||
@@ -12,6 +12,7 @@ GameObject:
|
||||
- component: {fileID: 4376431126769957786}
|
||||
- component: {fileID: 2668322321768899818}
|
||||
- component: {fileID: 5781139014276065127}
|
||||
- component: {fileID: 4994198685823987946}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (1)
|
||||
m_TagString: Untagged
|
||||
@@ -36,7 +37,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20, y: -402.765}
|
||||
m_SizeDelta: {x: 400, y: 0}
|
||||
m_SizeDelta: {x: 400, y: 805.53}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &4376431126769957786
|
||||
CanvasRenderer:
|
||||
@@ -120,7 +121,7 @@ MonoBehaviour:
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
@@ -162,6 +163,19 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &4994198685823987946
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 124168344263491349}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4cf21a97aa5c9445c9859afa14de01ad, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_rectTransform: {fileID: 8894405194986632892}
|
||||
--- !u!1 &2412057975732520665
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -704,13 +718,14 @@ GameObject:
|
||||
- component: {fileID: 1086546571030594654}
|
||||
- component: {fileID: 426204275254898644}
|
||||
- component: {fileID: 4006058193329126604}
|
||||
- component: {fileID: 8936108025019184019}
|
||||
m_Layer: 5
|
||||
m_Name: item_info
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1546246053547542409
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -811,6 +826,18 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!114 &8936108025019184019
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fc26b8fa93aea49b4abb8fe5455e51fe, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7370156420958780641
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -20,6 +20,10 @@ public partial class CECGameRun
|
||||
{
|
||||
private static CECGameRun instance;
|
||||
|
||||
#region PROPERTIES AND FIELDS
|
||||
|
||||
private const uint USERCFG_VERSION = 3;
|
||||
|
||||
private GameObject _playerPrefab;
|
||||
private GameObject _monsterPrefab;//CECMonster
|
||||
private GameObject _npcServerPrefab;//CECNPCServer
|
||||
@@ -41,6 +45,10 @@ public partial class CECGameRun
|
||||
|
||||
|
||||
protected CECUIManager m_pUIManager; // UI manager
|
||||
|
||||
CECPendingActionArray m_pendingLogout;
|
||||
|
||||
#endregion
|
||||
|
||||
public CECWorld GetWorld()
|
||||
{
|
||||
@@ -66,6 +74,14 @@ public partial class CECGameRun
|
||||
|
||||
private int m_iDExpEndTime = 0;
|
||||
|
||||
// Cache for SaveConfigsToServer: last sent config data to skip duplicate sends
|
||||
private byte[] m_pCfgDataBuf;
|
||||
private int m_iCfgDataSize;
|
||||
|
||||
// Logout flag (C++: m_iLogoutFlag)
|
||||
private int m_iLogoutFlag = -1;
|
||||
// Selling role ID for role trade (C++: SetSellingRoleID/GetSellingRoleID)
|
||||
private int m_iSellingRoleID;
|
||||
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void AfterSceneLoad()
|
||||
@@ -102,6 +118,10 @@ public partial class CECGameRun
|
||||
AddressableManager.Instance.OnDispose += Dispose;
|
||||
m_pWorld = CECWorld.Instance;
|
||||
StartGame(0, Vector3.zero);
|
||||
|
||||
|
||||
m_pWorld = CECWorld.Instance;
|
||||
m_pendingLogout = new CECPendingActionArray( false);
|
||||
}
|
||||
|
||||
private static void Dispose()
|
||||
@@ -310,8 +330,8 @@ public partial class CECGameRun
|
||||
/// <returns>True if loaded successfully / 加载成功返回true</returns>
|
||||
public bool LoadConfigsFromServer(byte[] pDataBuf, int iDataSize)
|
||||
{
|
||||
const uint USERCFG_VERSION = 3;
|
||||
|
||||
BMLogger.Log($"MH CECGameRun.LoadConfigsFromServer, iDataSize = {iDataSize}");
|
||||
|
||||
if (pDataBuf == null || iDataSize == 0)
|
||||
{
|
||||
BMLogger.LogError("CECGameRun::LoadConfigsFromServer, configs data is empty");
|
||||
@@ -747,10 +767,166 @@ public partial class CECGameRun
|
||||
m_iDExpEndTime = endTime;
|
||||
}
|
||||
public int GetGameState() { return m_iGameState; }
|
||||
public void SaveConfigsToServer()
|
||||
|
||||
// Logout flag: -1 none, 0 exit app, 1 re-select role, 2 goto login (C++: SetLogoutFlag/GetLogoutFlag)
|
||||
public void SetLogoutFlag(int iFlag) { m_iLogoutFlag = iFlag; }
|
||||
public int GetLogoutFlag() { return m_iLogoutFlag; }
|
||||
|
||||
// Selling role ID for role trade (C++: SetSellingRoleID)
|
||||
public void SetSellingRoleID(int roleid) { m_iSellingRoleID = roleid; }
|
||||
public int GetSellingRoleID() { return m_iSellingRoleID; }
|
||||
|
||||
// Save necessary user configs (UI, shortcut, accelerate keys, etc.) to server
|
||||
// ����ֵ: 0(����ʧ��), 1(���������ظ�����), 2(�������������Э��)
|
||||
public uint SaveConfigsToServer()
|
||||
{
|
||||
|
||||
// if (!m_pWorld || !m_pWorld->GetHostPlayer() || !m_pWorld->GetHostPlayer()->HostIsReady() || !m_pUIManager->GetInGameUIMan())
|
||||
// return 0;
|
||||
CECHostPlayer pHost = GetHostPlayer();
|
||||
CECGameUIMan pGameUI = m_pUIManager?.GetInGameUIMan() as CECGameUIMan;
|
||||
if (m_pWorld == null || pHost == null || !pHost.HostIsReady() || pGameUI == null)
|
||||
return 0;
|
||||
|
||||
// g_pGame->GetConfigs()->SaveBlockedID();
|
||||
EC_Game.GetConfigs().SaveBlockedID(); // TODO: Check if this is needed here
|
||||
|
||||
// int iTotalSize = 0;
|
||||
// iTotalSize += sizeof (DWORD);
|
||||
// iTotalSize += sizeof (int);
|
||||
// int iHostSize = 0;
|
||||
// CECHostPlayer* pHost = m_pWorld->GetHostPlayer();
|
||||
// pHost->SaveConfigData(NULL, &iHostSize);
|
||||
// iTotalSize += iHostSize;
|
||||
// iTotalSize += sizeof (int);
|
||||
int iTotalSize = sizeof(uint);
|
||||
iTotalSize += sizeof(int);
|
||||
int iHostSize = 0;
|
||||
pHost.SaveConfigData(null, ref iHostSize);
|
||||
iTotalSize += sizeof(int) + iHostSize;
|
||||
|
||||
// DWORD dwUISize = 0;
|
||||
// CECGameUIMan* pGameUI = (CECGameUIMan*)m_pUIManager->GetInGameUIMan();
|
||||
// pGameUI->GetUserLayout(NULL, dwUISize);
|
||||
// iTotalSize += (int)dwUISize;
|
||||
// iTotalSize += sizeof (int);
|
||||
uint dwUISize = 0;
|
||||
pGameUI.GetUserLayout(null, ref dwUISize); // TODO: Check if this is needed here
|
||||
iTotalSize += sizeof(int) + (int)dwUISize;
|
||||
|
||||
// int iSettingSize = 0;
|
||||
// g_pGame->GetConfigs()->SaveUserConfigData(NULL, &iSettingSize);
|
||||
// iTotalSize += iSettingSize;
|
||||
int iSettingSize = 0;
|
||||
EC_Game.GetConfigs().SaveUserConfigData(null, out iSettingSize);
|
||||
// iTotalSize += sizeof(int) + iSettingSize;
|
||||
iTotalSize += iSettingSize;
|
||||
|
||||
// void* pDataBuf = a_malloctemp(iTotalSize);
|
||||
// if (!pDataBuf) { glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECGameRun::SaveConfigsToServer", __LINE__); return 0; }
|
||||
// BYTE* pData = (BYTE*)pDataBuf;
|
||||
byte[] pDataBuf = new byte[iTotalSize];
|
||||
int offset = 0;
|
||||
|
||||
// *((DWORD*)pData) = USERCFG_VERSION;
|
||||
// pData += sizeof (DWORD);
|
||||
Buffer.BlockCopy(BitConverter.GetBytes(USERCFG_VERSION), 0, pDataBuf, offset, sizeof(uint));
|
||||
offset += sizeof(uint);
|
||||
BMLogger.Log($"[SaveConfigsToServer] offset={offset} (after version)");
|
||||
|
||||
// *((int*)pData) = iHostSize;
|
||||
// pData += sizeof (int);
|
||||
// pHost->SaveConfigData(pData, &iHostSize);
|
||||
// pData += iHostSize;
|
||||
Buffer.BlockCopy(BitConverter.GetBytes(iHostSize), 0, pDataBuf, offset, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
pHost.SaveConfigData(pDataBuf, ref iHostSize, offset); // TODO: converted but need to check
|
||||
offset += iHostSize;
|
||||
BMLogger.Log($"[SaveConfigsToServer] offset={offset} (after host config, iHostSize={iHostSize})");
|
||||
|
||||
// *((int*)pData) = (int)dwUISize;
|
||||
// pData += sizeof (int);
|
||||
// pGameUI->GetUserLayout(pData, dwUISize);
|
||||
// pData += dwUISize;
|
||||
Buffer.BlockCopy(BitConverter.GetBytes((int)dwUISize), 0, pDataBuf, offset, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
pGameUI.GetUserLayout(pDataBuf, ref dwUISize); // TODO: Check if this is needed here
|
||||
offset += (int)dwUISize;
|
||||
BMLogger.Log($"[SaveConfigsToServer] offset={offset} (after UI layout, dwUISize={dwUISize})");
|
||||
|
||||
// *((int*)pData) = iSettingSize;
|
||||
// pData += sizeof (int);
|
||||
// g_pGame->GetConfigs()->SaveUserConfigData(pData, &iSettingSize);
|
||||
// pData += iSettingSize;
|
||||
Buffer.BlockCopy(BitConverter.GetBytes(iSettingSize), 0, pDataBuf, offset, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
EC_Game.GetConfigs().SaveUserConfigData(pDataBuf, offset, out iSettingSize);
|
||||
offset += iSettingSize;
|
||||
BMLogger.Log($"[SaveConfigsToServer] offset={offset} (after user config, iSettingSize={iSettingSize}), iTotalSize={iTotalSize}");
|
||||
|
||||
// if (m_pCfgDataBuf) {
|
||||
// if (m_iCfgDataSize == iTotalSize && !memcmp(m_pCfgDataBuf, pDataBuf, iTotalSize)) { a_freetemp(pDataBuf); return 1; }
|
||||
// a_free(m_pCfgDataBuf); m_pCfgDataBuf = NULL; m_iCfgDataSize = 0;
|
||||
// }
|
||||
if (m_pCfgDataBuf != null && m_iCfgDataSize == iTotalSize)
|
||||
{
|
||||
bool same = true;
|
||||
for (int i = 0; i < iTotalSize && same; i++)
|
||||
same = (m_pCfgDataBuf[i] == pDataBuf[i]);
|
||||
if (same)
|
||||
return 1;
|
||||
}
|
||||
m_pCfgDataBuf = null;
|
||||
m_iCfgDataSize = 0;
|
||||
|
||||
// if ((m_pCfgDataBuf = (BYTE*)a_malloc(iTotalSize))) { memcpy(m_pCfgDataBuf, pDataBuf, iTotalSize); m_iCfgDataSize = iTotalSize; }
|
||||
m_pCfgDataBuf = new byte[iTotalSize];
|
||||
Buffer.BlockCopy(pDataBuf, 0, m_pCfgDataBuf, 0, iTotalSize);
|
||||
m_iCfgDataSize = iTotalSize;
|
||||
|
||||
// DWORD dwCompLen = iTotalSize * 2;
|
||||
// void* pCompBuf = a_malloctemp(dwCompLen);
|
||||
// if (!pCompBuf) { a_freetemp(pDataBuf); glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECGameRun::SaveConfigsToServer", __LINE__); return 0; }
|
||||
// int iVerLen = sizeof (DWORD);
|
||||
// memcpy(pCompBuf, pDataBuf, iVerLen);
|
||||
// BYTE* pSrc = (BYTE*)pDataBuf + iVerLen;
|
||||
// BYTE* pDst = (BYTE*)pCompBuf + iVerLen;
|
||||
// dwCompLen -= iVerLen;
|
||||
// int iRes = AFilePackage::Compress(pSrc, iTotalSize - iVerLen, pDst, &dwCompLen);
|
||||
int iVerLen = sizeof(uint);
|
||||
// int compLen = (iTotalSize - iVerLen) * 2;
|
||||
int compLen = iTotalSize * 2;
|
||||
byte[] pCompBuf = new byte[iVerLen + compLen];
|
||||
compLen -= iVerLen;
|
||||
Buffer.BlockCopy(pDataBuf, 0, pCompBuf, 0, iVerLen);
|
||||
int iRes = AFilePackage.Compress(pDataBuf, iVerLen,iTotalSize - iVerLen, pCompBuf, iVerLen, ref compLen);
|
||||
|
||||
// if (0 == iRes) { g_pGame->GetGameSession()->SaveConfigData(pCompBuf, dwCompLen+iVerLen); iRes = 2; }
|
||||
// else { a_LogOutput(1, "CECGameRun::SaveConfigsToServer, Failed to compress config data (%d:%d)", iRes, iTotalSize); iRes = 0; }
|
||||
// a_freetemp(pDataBuf);
|
||||
// a_freetemp(pCompBuf);
|
||||
// return iRes;
|
||||
if (iRes == 0)
|
||||
{
|
||||
var session = UnityGameSession.Instance?.GameSession;
|
||||
if (session != null)
|
||||
{
|
||||
session.SaveConfigData(pCompBuf, iVerLen + compLen);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
BMLogger.LogWarning($"CECGameRun::SaveConfigsToServer, Failed to compress config data ({iRes}:{iTotalSize})");
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ReleasePendingActions()
|
||||
{
|
||||
m_pendingLogout.Clear();
|
||||
}
|
||||
|
||||
public CECPendingActionArray GetPendingLogOut(){ return m_pendingLogout; }
|
||||
|
||||
}
|
||||
public enum GameState
|
||||
|
||||
|
||||
@@ -0,0 +1,505 @@
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.UI;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using CSNetwork.GPDataType;
|
||||
using PerfectWorld.Scripts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BrewMonster.Scripts;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public partial class CECHostPlayer
|
||||
{
|
||||
// Shortcut sets (converted from C++: m_aSCSets1[NUM_HOSTSCSETS1], m_aSCSets2[NUM_HOSTSCSETS2], m_aSCSetSysMod[NUM_SYSMODSETS])
|
||||
public CECShortcutSet[] m_aSCSets1 = new CECShortcutSet[HostCfgConstants.NUM_HOSTSCSETS1]; // SC set 1
|
||||
public CECShortcutSet[] m_aSCSets2 = new CECShortcutSet[HostCfgConstants.NUM_HOSTSCSETS2]; // SC set 2
|
||||
|
||||
public CECShortcutSet[]
|
||||
m_aSCSetSysMod = new CECShortcutSet[HostCfgConstants.NUM_SYSMODSETS]; // System module shortcut sets
|
||||
|
||||
public int[]
|
||||
m_aFashionSCSets = new int[HostCfgConstants.SIZE_FASHIONSCSET]; // Auto fashion shortcut sets (indices)
|
||||
|
||||
// C++: CECDealInventory* m_pBoothBPack / m_pBoothSPack – booth buy pack and sell pack
|
||||
private CECDealInventory m_pBoothBPack = null; // 摆摊收购包 Booth buy pack
|
||||
private CECDealInventory m_pBoothSPack = null; // 摆摊出售包 Booth sell pack
|
||||
|
||||
BOOTH_AUTO_YINPIAO m_AutoYinpiao;
|
||||
|
||||
// C++: Host config constants (version, shortcut set counts/sizes)
|
||||
private static class HostCfgConstants
|
||||
{
|
||||
public const int HOSTCFG_VERSION = 11;
|
||||
public const int NUM_HOSTSCSETS1 = 5; // expanded from 3 to 5 (2009.05.27)
|
||||
public const int NUM_HOSTSCSETS2 = 3;
|
||||
public const int SIZE_HOSTSCSET1 = 9; // expanded from 6 to 9 (2009.05.27)
|
||||
public const int SIZE_HOSTSCSET2 = 8;
|
||||
public const int NUM_SYSMODSETS = 4; // System module shortcut sets count
|
||||
public const int SIZE_SYSMODSCSET = 4; // System module shortcut set size (first 4 slots)
|
||||
public const int SIZE_FASHIONSCSET = 240;
|
||||
}
|
||||
|
||||
// Load configs data (shortcut, etc.) from specified buffer
|
||||
// Converted from: bool CECHostPlayer::LoadConfigData(const void* pDataBuf)
|
||||
public bool LoadConfigData(byte[] dataBuf)
|
||||
{
|
||||
if (dataBuf == null || dataBuf.Length < sizeof(uint))
|
||||
return false;
|
||||
|
||||
int offset = 0;
|
||||
|
||||
// Version number
|
||||
uint dwVer = GPDataTypeHelper.FromBytes<uint>(dataBuf, offset);
|
||||
offset += sizeof(uint);
|
||||
if (dwVer > HostCfgConstants.HOSTCFG_VERSION)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load shortcut configs...
|
||||
int iHostSCSets1 = (dwVer <= 4) ? 3 : HostCfgConstants.NUM_HOSTSCSETS1;
|
||||
|
||||
for (int i = 0; i < iHostSCSets1; i++)
|
||||
{
|
||||
if (offset >= dataBuf.Length)
|
||||
return false;
|
||||
|
||||
if (m_aSCSets1[i] == null)
|
||||
{
|
||||
m_aSCSets1[i] = new CECShortcutSet();
|
||||
m_aSCSets1[i].Init(HostCfgConstants.SIZE_HOSTSCSET1);
|
||||
}
|
||||
|
||||
if (!m_aSCSets1[i].LoadConfigData(dataBuf, dwVer, ref offset))
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < HostCfgConstants.NUM_HOSTSCSETS2; i++)
|
||||
{
|
||||
if (offset >= dataBuf.Length)
|
||||
break; // No more data; tolerate truncated optional parts
|
||||
|
||||
if (m_aSCSets2[i] == null)
|
||||
{
|
||||
m_aSCSets2[i] = new CECShortcutSet();
|
||||
m_aSCSets2[i].Init(HostCfgConstants.SIZE_HOSTSCSET2);
|
||||
}
|
||||
|
||||
if (!m_aSCSets2[i].LoadConfigData(dataBuf, dwVer, ref offset))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load auto fashion shortcut sets
|
||||
// Load auto fashion shortcut sets
|
||||
// if(dwVer > 5)
|
||||
if (dwVer > 5)
|
||||
{
|
||||
// int size = 0;
|
||||
// if (dwVer == 6) size = 120; else size = HostCfgConstants.SIZE_FASHIONSCSET;
|
||||
int size = (dwVer == 6) ? 120 : HostCfgConstants.SIZE_FASHIONSCSET;
|
||||
// for (i=0; i < size; i++)
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
// if (dwVer <= 8 && (i % 6 == 5)) continue;
|
||||
if (dwVer <= 8 && (i % 6 == 5)) continue;
|
||||
// m_aFashionSCSets[i] = *((int*)pData); pData += sizeof(int);
|
||||
if (offset + sizeof(int) > dataBuf.Length) return false;
|
||||
m_aFashionSCSets[i] = GPDataTypeHelper.FromBytes<int>(dataBuf, offset);
|
||||
offset += sizeof(int);
|
||||
}
|
||||
}
|
||||
|
||||
// Load system module shortcut sets
|
||||
// Load system module shortcut sets
|
||||
// if(dwVer > 10)
|
||||
if (dwVer > 10)
|
||||
{
|
||||
// for (i=0; i < NUM_SYSMODSETS; i++)
|
||||
for (int iSysMod = 0; iSysMod < HostCfgConstants.NUM_SYSMODSETS; iSysMod++)
|
||||
{
|
||||
// (C#: bounds check; C++ advances pData so no separate check)
|
||||
if (offset >= dataBuf.Length)
|
||||
return false;
|
||||
|
||||
// (C#: lazy init; C++ assumes array already allocated)
|
||||
if (m_aSCSetSysMod[iSysMod] == null)
|
||||
{
|
||||
m_aSCSetSysMod[iSysMod] = new CECShortcutSet();
|
||||
m_aSCSetSysMod[iSysMod].Init(HostCfgConstants.SIZE_SYSMODSCSET);
|
||||
}
|
||||
|
||||
// int iSize;
|
||||
// if (!m_aSCSetSysMod[i]->LoadConfigData(pData, &iSize, dwVer)) return false;
|
||||
if (!m_aSCSetSysMod[iSysMod].LoadConfigData(dataBuf, dwVer, ref offset))
|
||||
return false;
|
||||
|
||||
// if (i==0) // 如果第一个4个位置均为空,则初始化默认快捷键 | If the first 4 slots are all empty, init default shortcuts
|
||||
if (iSysMod == 0)
|
||||
{
|
||||
// CECShortcutSet *pSCS = m_aSCSetSysMod[0];
|
||||
CECShortcutSet pSCS = m_aSCSetSysMod[0];
|
||||
// int ksc = 0;
|
||||
// for (ksc = 0;ksc<pSCS->GetShortcutNum();ksc++) { if (pSCS->GetShortcut(ksc)) break; }
|
||||
int ksc;
|
||||
for (ksc = 0; ksc < pSCS.GetShortcutNum(); ksc++)
|
||||
{
|
||||
if (pSCS.GetShortcut(ksc) != null)
|
||||
break;
|
||||
}
|
||||
|
||||
// if (ksc == pSCS->GetShortcutNum())
|
||||
if (ksc == pSCS.GetShortcutNum())
|
||||
{
|
||||
// int c = CECUIConfig::Instance().GetGameUI().nDefaultSystemModuleIndex.size();
|
||||
// c = min(c,4);
|
||||
var defaultList = CECUIConfig.Instance.GetGameUI().nDefaultSystemModuleIndex;
|
||||
int c = (defaultList != null) ? defaultList.Count : 0;
|
||||
c = Math.Min(c, 4);
|
||||
// for (int i=0;i<c;i++) pSCS->CreateSystemModuleShortcut(i, CECUIConfig::Instance().GetGameUI().nDefaultSystemModuleIndex[i]);
|
||||
for (int j = 0; j < c; j++)
|
||||
pSCS.CreateSystemModuleShortcut(j, defaultList[j]);
|
||||
}
|
||||
}
|
||||
// pData += iSize; (C#: offset updated by LoadConfigData ref)
|
||||
}
|
||||
}
|
||||
|
||||
// Load Saved Booth Buy and Sell Pack
|
||||
// 加载保存的摆摊收购包与出售包
|
||||
// if (dwVer > 7) { struct BoothItem { ... }; BoothItem temp; const int nPacks = 2; ...
|
||||
if (dwVer > 7)
|
||||
{
|
||||
// BoothItem temp;
|
||||
BoothItem temp;
|
||||
// const int nPacks = 2;
|
||||
const int nPacks = 2;
|
||||
// CECDealInventory *pBoothPacks[nPacks] = {GetBoothBuyPack(), GetBoothSellPack()};
|
||||
CECDealInventory[] pBoothPacks = new CECDealInventory[] { GetBoothBuyPack(), GetBoothSellPack() };
|
||||
// DWORD nMaxBoothPacks[nPacks] = {IVTRSIZE_BOOTHBPACK_MAX, IVTRSIZE_BOOTHSPACK_MAX};
|
||||
uint[] nMaxBoothPacks = new uint[] { InventoryConst.IVTRSIZE_BOOTHBPACK_MAX, InventoryConst.IVTRSIZE_BOOTHSPACK_MAX };
|
||||
// for (int k=0 ; k < nPacks; ++k)
|
||||
for (int k = 0; k < nPacks; ++k)
|
||||
{
|
||||
// CECDealInventory *pBoothPack = pBoothPacks[k];
|
||||
CECDealInventory pBoothPack = pBoothPacks[k];
|
||||
// bool isBuyPack = (pBoothPack == GetBoothBuyPack());
|
||||
bool isBuyPack = (pBoothPack == GetBoothBuyPack());
|
||||
// DWORD dwCurSize = pBoothPack->GetSize();
|
||||
int dwCurSize = (pBoothPack != null) ? pBoothPack.GetSize() : 0;
|
||||
|
||||
// DWORD dwSize = *((DWORD *)pData); pData += sizeof(dwSize);
|
||||
if (offset + sizeof(uint) > dataBuf.Length)
|
||||
return false;
|
||||
uint dwSize = GPDataTypeHelper.FromBytes<uint>(dataBuf, offset);
|
||||
offset += sizeof(uint);
|
||||
|
||||
// ��֤���ݣ��г���������
|
||||
// 验证数据,防止越界读取 | Verify data, prevent out-of-bounds read
|
||||
if (dwSize > nMaxBoothPacks[k])
|
||||
{
|
||||
UnityEngine.Debug.LogWarningFormat("CECHostPlayer::LoadConfigData, Failed because pack {0} size invalid ({1}:{2}).", k, dwSize, nMaxBoothPacks[k]);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint i = 0; i < dwSize; ++i)
|
||||
{
|
||||
// ����İ�����С�ܿ����뵱ǰ������С��ͬ���Ե�ǰ������СΪ
|
||||
// 保存的包大小可能和当前背包大小不同,以当前背包大小为准 | Saved pack size may differ from current; use current as reference
|
||||
if (i < (uint)dwCurSize)
|
||||
{
|
||||
if (offset + Marshal.SizeOf<BoothItem>() > dataBuf.Length)
|
||||
return false;
|
||||
temp = GPDataTypeHelper.FromBytes<BoothItem>(dataBuf, offset);
|
||||
|
||||
// ��֤��ȡ���ݵĺϷ���
|
||||
if (temp.idItem > 0 &&
|
||||
temp.iAmount > 0 &&
|
||||
temp.iUnitPrice >= 0 &&
|
||||
temp.iOrigin >= 0)
|
||||
{
|
||||
EC_IvtrItem pItem2 = m_pPack.GetItem((int)temp.iOrigin, false);
|
||||
if (pItem2 != null && pItem2.GetTemplateID() == (int)temp.idItem)
|
||||
{
|
||||
// ��Ʒ�ڵ�ǰ�����鵽������ȷ����ԭ��Ʒͬ����Ʒ
|
||||
|
||||
int iAmount = isBuyPack ? (int)temp.iAmount : EC_Utility.a_Min((int)temp.iAmount, pItem2.GetCount());
|
||||
if (pBoothPack != null)
|
||||
pBoothPack.AddBoothItem(pItem2, (int)temp.iOrigin, iAmount, (int)temp.iUnitPrice);
|
||||
}
|
||||
}
|
||||
}
|
||||
offset += Marshal.SizeOf<BoothItem>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Notes:
|
||||
// - Auto fashion sets, system module shortcut sets, booth packs, and AutoYinpiao
|
||||
// sections from native are not loaded here in this Unity port yet.
|
||||
// The native format appends these after the two shortcut-set groups.
|
||||
// We intentionally ignore them safely for now.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save host config (shortcut sets, etc.) to buffer. When pData is null, only outputs size in iHostSize.
|
||||
/// 保存主机配置(快捷键组等)到缓冲区。pData 为 null 时仅输出 iHostSize。
|
||||
/// </summary>
|
||||
/// <param name="writeOffset">When pData is not null, write at this index. 写入时的起始下标。</param>
|
||||
public bool SaveConfigData(byte[] pData, ref int iHostSize, int writeOffset = 0)
|
||||
{
|
||||
var list = new List<byte>();
|
||||
list.AddRange(BitConverter.GetBytes(HostCfgConstants.HOSTCFG_VERSION));
|
||||
for (int i = 0; i < m_aSCSets1.Length; i++)
|
||||
{
|
||||
if (m_aSCSets1[i] == null || !m_aSCSets1[i].SaveConfigData(out byte[] buf))
|
||||
continue;
|
||||
list.AddRange(buf);
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_aSCSets2.Length; i++)
|
||||
{
|
||||
if (m_aSCSets2[i] == null || !m_aSCSets2[i].SaveConfigData(out byte[] buf))
|
||||
continue;
|
||||
list.AddRange(buf);
|
||||
}
|
||||
|
||||
// Save auto fashion shortcut sets | 保存自动时装快捷键组
|
||||
// if(pDataBuf)
|
||||
// {
|
||||
// for (i=0; i < SIZE_FASHIONSCSET; i++)
|
||||
// {
|
||||
// *((int*)pData) = m_aFashionSCSets[i];
|
||||
// if(pData)
|
||||
// pData += sizeof (int);
|
||||
// }
|
||||
// }
|
||||
// iTotalSize += sizeof(int) * SIZE_FASHIONSCSET;
|
||||
for (int i = 0; i < HostCfgConstants.SIZE_FASHIONSCSET; i++)
|
||||
{
|
||||
list.AddRange(BitConverter.GetBytes(m_aFashionSCSets[i]));
|
||||
}
|
||||
|
||||
// Save system module shortcut sets | 保存系统模块快捷键组
|
||||
// for (i=0; i < NUM_SYSMODSETS; i++)
|
||||
// {
|
||||
// m_aSCSetSysMod[i]->SaveConfigData(pData, &iSize);
|
||||
// iTotalSize += iSize;
|
||||
// if (pData)
|
||||
// pData += iSize;
|
||||
// }
|
||||
for (int i = 0; i < HostCfgConstants.NUM_SYSMODSETS; i++)
|
||||
{
|
||||
if (m_aSCSetSysMod[i] == null || !m_aSCSetSysMod[i].SaveConfigData(out byte[] buf))
|
||||
continue;
|
||||
list.AddRange(buf);
|
||||
}
|
||||
|
||||
// Save Booth Buy and Sell Pack
|
||||
// 保存摆摊收购包与出售包
|
||||
// CECDealInventory *pBoothPacks[2] = {GetBoothBuyPack(), GetBoothSellPack()};
|
||||
CECDealInventory[] pBoothPacks = new CECDealInventory[] { GetBoothBuyPack(), GetBoothSellPack() };
|
||||
// for (int k=0 ; k < sizeof(pBoothPacks)/sizeof(pBoothPacks[0]); ++k)
|
||||
for (int k = 0; k < pBoothPacks.Length; ++k)
|
||||
{
|
||||
// CECDealInventory *pBoothPack = pBoothPacks[k];
|
||||
CECDealInventory pBoothPack = pBoothPacks[k];
|
||||
// bool isBuyPack = (pBoothPack == GetBoothBuyPack());
|
||||
bool isBuyPack = (pBoothPack == GetBoothBuyPack());
|
||||
// DWORD dwSize = pBoothPack->GetSize();
|
||||
uint dwSize = (uint)(pBoothPack != null ? pBoothPack.GetSize() : 0);
|
||||
// if (pData) { *((DWORD *)pData) = dwSize; pData += sizeof(DWORD);
|
||||
list.AddRange(BitConverter.GetBytes(dwSize));
|
||||
//
|
||||
// BoothItem temp; for (DWORD i = 0; i < dwSize; ++ i)
|
||||
if (pBoothPack != null)
|
||||
{
|
||||
for (uint i = 0; i < dwSize; ++i)
|
||||
{
|
||||
// ::ZeroMemory(&temp, sizeof(temp));
|
||||
BoothItem temp = default;
|
||||
// const CECDealInventory::ITEMINFO &ii = pBoothPack->GetItemInfo(i);
|
||||
CECDealInventory_ITEMINFO ii = pBoothPack.GetItemInfo((int)i);
|
||||
// CECIvtrItem* pItem1 = pBoothPack->GetItem(i);
|
||||
EC_IvtrItem pItem1 = pBoothPack.GetItem((int)i);
|
||||
// if (pItem1) { CECIvtrItem* pItem2 = m_pPack->GetItem(ii.iOrigin);
|
||||
if (pItem1 != null)
|
||||
{
|
||||
// CECIvtrItem* pItem2 = m_pPack->GetItem(ii.iOrigin);
|
||||
EC_IvtrItem pItem2 = m_pPack.GetItem(ii.iOrigin, false);
|
||||
// if (pItem2 && pItem2->GetTemplateID() == pItem1->GetTemplateID())
|
||||
if (pItem2 != null && pItem2.GetTemplateID() == pItem1.GetTemplateID())
|
||||
{
|
||||
// temp.idItem = pItem1->GetTemplateID(); temp.iOrigin = ii.iOrigin;
|
||||
temp.idItem = (uint)pItem1.GetTemplateID();
|
||||
temp.iOrigin = (uint)ii.iOrigin;
|
||||
// temp.iUnitPrice = pItem1->GetUnitPrice();
|
||||
temp.iUnitPrice = (uint)pItem1.GetUnitPrice();
|
||||
// temp.iAmount = isBuyPack ? ii.iAmount : a_Min(ii.iAmount, pItem2->GetCount());
|
||||
temp.iAmount = isBuyPack
|
||||
? (uint)ii.iAmount
|
||||
: (uint)Math.Min(ii.iAmount, pItem2.GetCount());
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// *((BoothItem *)pData) = temp; pData += sizeof(temp);
|
||||
list.AddRange(BitConverter.GetBytes(temp.idItem));
|
||||
list.AddRange(BitConverter.GetBytes(temp.iOrigin));
|
||||
list.AddRange(BitConverter.GetBytes(temp.iAmount));
|
||||
list.AddRange(BitConverter.GetBytes(temp.iUnitPrice));
|
||||
}
|
||||
}
|
||||
// } iTotalSize += sizeof(DWORD) + dwSize * sizeof(BoothItem);
|
||||
}
|
||||
|
||||
// ��Ʊ�Զ�ת��
|
||||
list.AddRange( BitConverter.GetBytes(m_AutoYinpiao.low_money) );
|
||||
list.AddRange( BitConverter.GetBytes(m_AutoYinpiao.high_money) );
|
||||
|
||||
iHostSize = list.Count;
|
||||
|
||||
if (pData != null && writeOffset >= 0 && writeOffset + iHostSize <= pData.Length)
|
||||
Buffer.BlockCopy(list.ToArray(), 0, pData, writeOffset, iHostSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
// C++: GetBoothBuyPack() / GetBoothSellPack()
|
||||
// 获取摆摊收购包 / 摆摊出售包
|
||||
public CECDealInventory GetBoothBuyPack() => m_pBoothBPack;
|
||||
public CECDealInventory GetBoothSellPack() => m_pBoothSPack;
|
||||
|
||||
bool CreateInventories()
|
||||
{
|
||||
|
||||
// only use to init the booth inventories
|
||||
if (m_pBoothBPack == null)
|
||||
{
|
||||
m_pBoothBPack = new CECDealInventory();
|
||||
m_pBoothBPack.Init(InventoryConst.IVTRSIZE_BOOTHBPACK);
|
||||
}
|
||||
|
||||
if (m_pBoothSPack == null)
|
||||
{
|
||||
m_pBoothSPack = new CECDealInventory();
|
||||
m_pBoothSPack.Init(InventoryConst.IVTRSIZE_BOOTHSPACK);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// C++: struct BoothItem (save format for booth buy/sell pack item)
|
||||
// 摆摊买卖包单项保存结构
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct BoothItem
|
||||
{
|
||||
public uint idItem;
|
||||
public uint iOrigin;
|
||||
public uint iAmount;
|
||||
public uint iUnitPrice;
|
||||
}
|
||||
|
||||
// C++: CECDealInventory::ITEMINFO (EC_DealInventory.h)
|
||||
// 物品附加信息
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct CECDealInventory_ITEMINFO
|
||||
{
|
||||
public int iOrigin; // 原始位置 Original position in player's normal pack
|
||||
public int iAmount; // 数量 Amount
|
||||
[MarshalAs(UnmanagedType.Bool)]
|
||||
public bool bDelete; // true 时物品对象可释放 true, item object can be released
|
||||
public int iFlag; // 物品标志 Item flag
|
||||
}
|
||||
|
||||
// C++: CECDealInventory (EC_DealInventory.h / EC_DealInventory.cpp) – minimal view for SaveConfigData
|
||||
// 交易/摆摊背包,仅提供保存配置所需的接口
|
||||
public class CECDealInventory : EC_Inventory
|
||||
{
|
||||
// private readonly List<EC_IvtrItem> m_aItems = new List<EC_IvtrItem>();
|
||||
private readonly List<CECDealInventory_ITEMINFO> m_aItemInfo = new List<CECDealInventory_ITEMINFO>();
|
||||
|
||||
// public int GetSize() => m_aItems.Count;
|
||||
public CECDealInventory_ITEMINFO GetItemInfo(int n) => m_aItemInfo[n];
|
||||
// public EC_IvtrItem GetItem(int i) => (i >= 0 && i < m_aItems.Count) ? m_aItems[i] : null;
|
||||
|
||||
// C++: AddBoothItem(pItem, iOrigin, iAmount, iUnitPrice) – add item to booth pack with origin/amount/price
|
||||
public void AddBoothItem(EC_IvtrItem pItem, int iOrigin, int iAmount, int iUnitPrice)
|
||||
{
|
||||
int slot = SearchEmpty();
|
||||
if (slot < 0)
|
||||
return;
|
||||
while (m_aItemInfo.Count <= slot)
|
||||
m_aItemInfo.Add(default);
|
||||
m_aItemInfo[slot] = new CECDealInventory_ITEMINFO { iOrigin = iOrigin, iAmount = iAmount, bDelete = false, iFlag = 0 };
|
||||
SetItem(slot, pItem);
|
||||
if (pItem != null)
|
||||
pItem.SetUnitPrice(iUnitPrice);
|
||||
}
|
||||
|
||||
// Resize inventory
|
||||
// C++: void CECDealInventory::Resize(int iNewSize)
|
||||
public override void Resize(int iNewSize)
|
||||
{
|
||||
// int iOldSize = m_aItemInfo.GetSize();
|
||||
int iOldSize = m_aItemInfo.Count;
|
||||
// if(iNewSize < iOldSize) { for(int i=iNewSize;i<iOldSize;i++) { if (m_aItems[i] && m_aItemInfo[i].bDelete) delete m_aItems[i]; } }
|
||||
if (iNewSize < iOldSize)
|
||||
{
|
||||
for (int i = iNewSize; i < iOldSize; i++)
|
||||
{
|
||||
if (GetItem(i) != null && m_aItemInfo[i].bDelete)
|
||||
SetItem(i, null); // C#: release reference instead of delete
|
||||
}
|
||||
}
|
||||
|
||||
// CECInventory::Resize(iNewSize);
|
||||
base.Resize(iNewSize);
|
||||
|
||||
// m_aItemInfo.SetSize(iNewSize, 10);
|
||||
if (m_aItemInfo.Count > iNewSize)
|
||||
m_aItemInfo.RemoveRange(iNewSize, m_aItemInfo.Count - iNewSize);
|
||||
while (m_aItemInfo.Count < iNewSize)
|
||||
m_aItemInfo.Add(default);
|
||||
|
||||
// if(iOldSize < iNewSize) { /* Clear new slots */ for (int i=iOldSize; i < iNewSize; i++) { m_aItemInfo[i].iOrigin = 0; ... } }
|
||||
if (iOldSize < iNewSize)
|
||||
{
|
||||
// Clear new slots
|
||||
for (int i = iOldSize; i < iNewSize; i++)
|
||||
{
|
||||
m_aItemInfo[i] = new CECDealInventory_ITEMINFO
|
||||
{
|
||||
iOrigin = 0,
|
||||
iAmount = 0,
|
||||
bDelete = false,
|
||||
iFlag = 0
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ��̯��Ʊ�Զ�ת��
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct BOOTH_AUTO_YINPIAO
|
||||
{
|
||||
public bool open;
|
||||
public CECCounter cnt;
|
||||
public int low_money;
|
||||
public int high_money;
|
||||
|
||||
// C++: BOOTH_AUTO_YINPIAO() : open(false), low_money(50000000), high_money(100000000) { cnt.SetPeriod(60000); cnt.Reset(true); }
|
||||
public BOOTH_AUTO_YINPIAO(int i=0)
|
||||
{
|
||||
open = false;
|
||||
low_money = 50000000;
|
||||
high_money = 100000000;
|
||||
cnt = new CECCounter();
|
||||
cnt.SetPeriod(60000);
|
||||
cnt.Reset(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e2dc296cf794870802c33b2b2b8ff28
|
||||
timeCreated: 1770696658
|
||||
@@ -1,4 +1,4 @@
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
@@ -22,12 +22,76 @@ namespace BrewMonster
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
int cmd = Convert.ToInt32(Msg.dwParam2);
|
||||
int hostId = Convert.ToInt32(Msg.dwParam3);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case CommandID.OWN_IVTR_DATA:
|
||||
{
|
||||
LogInventoryPacket("OWN_IVTR_DATA", data, hostId);
|
||||
|
||||
// C++: pPack->ResetItems(*pCmd) where cmd_own_ivtr_info.content is a compact stream:
|
||||
// for each slot [0..ivtr_size): tid (int); if tid>=0 then expire_date (int) and amount (int).
|
||||
if (data != null && data.Length >= 6)
|
||||
{
|
||||
byte byPackage = data[0];
|
||||
byte ivtrSize = data[1];
|
||||
uint contentLength = BitConverter.ToUInt32(data, 2);
|
||||
int index = 6;
|
||||
int remaining = data.Length - index;
|
||||
int contentBytes = remaining;
|
||||
if (contentLength < (uint)remaining)
|
||||
contentBytes = (int)contentLength;
|
||||
|
||||
var inv = GetInventory(byPackage);
|
||||
if (inv != null)
|
||||
{
|
||||
inv.Resize(ivtrSize);
|
||||
inv.RemoveAllItems();
|
||||
|
||||
int end = index + Math.Max(0, contentBytes);
|
||||
for (int slot = 0; slot < ivtrSize; slot++)
|
||||
{
|
||||
if (index + 4 > end)
|
||||
break;
|
||||
int tid = BitConverter.ToInt32(data, index);
|
||||
index += 4;
|
||||
if (tid < 0)
|
||||
{
|
||||
inv.SetItem(slot, null);
|
||||
continue;
|
||||
}
|
||||
if (index + 8 > end)
|
||||
break;
|
||||
int expireDate = BitConverter.ToInt32(data, index);
|
||||
index += 4;
|
||||
int amount = BitConverter.ToInt32(data, index);
|
||||
index += 4;
|
||||
|
||||
if (amount > 0)
|
||||
{
|
||||
var item = EC_IvtrItem.CreateItem(tid, expireDate, amount);
|
||||
if (item != null)
|
||||
{
|
||||
item.Package = byPackage;
|
||||
item.Slot = slot;
|
||||
item.SetCount(amount);
|
||||
inv.SetItem(slot, item);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
inv.SetItem(slot, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (byPackage == InventoryConst.IVTRTYPE_EQUIPPACK)
|
||||
{
|
||||
UpdateEquipSkins();
|
||||
}
|
||||
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
ui?.RefreshAll();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CommandID.OWN_IVTR_DETAIL_DATA:
|
||||
@@ -52,7 +116,11 @@ namespace BrewMonster
|
||||
foreach (var it in items)
|
||||
{
|
||||
if (it != null && it.Slot >= 0 && it.Slot < size)
|
||||
{
|
||||
if (it.Content != null && it.Content.Length > 0)
|
||||
it.SetItemInfo(it.Content, it.Content.Length);
|
||||
inv.SetItem(it.Slot, it);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,6 +135,19 @@ namespace BrewMonster
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.CHANGE_IVTR_SIZE:
|
||||
{
|
||||
// C++: resize pack (normal inventory)
|
||||
if (data != null && data.Length >= 4)
|
||||
{
|
||||
int newSize = BitConverter.ToInt32(data, 0);
|
||||
if (m_pPack != null)
|
||||
m_pPack.Resize(newSize);
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
ui?.RefreshAll();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CommandID.GET_OWN_MONEY:
|
||||
{
|
||||
if (data != null)
|
||||
@@ -164,14 +245,13 @@ namespace BrewMonster
|
||||
{
|
||||
case CommandID.OWN_ITEM_INFO:
|
||||
{
|
||||
//Debug.Log("[Inventory] OWN_ITEM_INFO received");
|
||||
//var data = Msg.dwParam1 as byte[];
|
||||
//int hostId = Convert.ToInt32(Msg.dwParam3);
|
||||
//LogInventoryPacket("OWN_ITEM_INFO", data, hostId);
|
||||
if (Application.isEditor || Debug.isDebugBuild)
|
||||
Debug.Log($"[INVNET] HST_OWNITEMINFO cmd=OWN_ITEM_INFO bytes={(Msg.dwParam1 as byte[])?.Length ?? 0}");
|
||||
|
||||
//Handmade
|
||||
// Match C++ cmd_own_item_info layout and behavior: update an existing item in place.
|
||||
// If the slot is missing (can happen if client missed OWN_IVTR_DATA), create it to match server state.
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
if (data == null || data.Length == 0)
|
||||
if (data == null || data.Length < 22)
|
||||
return;
|
||||
|
||||
byte byPackage = data[0];
|
||||
@@ -180,7 +260,6 @@ namespace BrewMonster
|
||||
int expire_date = BitConverter.ToInt32(data, 6);
|
||||
int state = BitConverter.ToInt32(data, 10);
|
||||
uint count = BitConverter.ToUInt32(data, 14);
|
||||
ushort crc = BitConverter.ToUInt16(data, 18);
|
||||
ushort content_length = BitConverter.ToUInt16(data, 20);
|
||||
|
||||
byte[] content = null;
|
||||
@@ -188,38 +267,45 @@ namespace BrewMonster
|
||||
{
|
||||
content = new byte[content_length];
|
||||
Buffer.BlockCopy(data, 22, content, 0, content_length);
|
||||
|
||||
string hexDebug = BitConverter.ToString(content);
|
||||
//Debug.Log($"[OWN_ITEM_INFO] Full Content Hex ({content_length} bytes): {hexDebug}");
|
||||
}
|
||||
|
||||
//Debug.Log($"[OWN_ITEM_INFO] Parsed: package={byPackage}, slot={bySlot}, tid={type}, count={count}, content_len={content_length}");
|
||||
|
||||
EC_Inventory pInventory = GetInventory(byPackage);
|
||||
EC_IvtrItem newItem = EC_IvtrItem.CreateItem(type, expire_date, (int)count);
|
||||
if (pInventory == null)
|
||||
return;
|
||||
|
||||
if (newItem != null)
|
||||
if (bySlot >= pInventory.GetSize())
|
||||
pInventory.Resize(bySlot + 1);
|
||||
|
||||
var pItem = pInventory.GetItem(bySlot, false);
|
||||
if (pItem == null)
|
||||
{
|
||||
newItem.SetProcType(state);
|
||||
|
||||
newItem.GetDetailDataFromLocal();
|
||||
if (content != null && content.Length > 0)
|
||||
{
|
||||
newItem.SetItemInfo(content, content_length);
|
||||
}
|
||||
|
||||
pInventory.SetItem(bySlot, newItem);
|
||||
|
||||
//Debug.Log($"[OWN_ITEM_INFO] Fixed Update: Pack {byPackage} Slot {bySlot} - Type {type}");
|
||||
pItem = EC_IvtrItem.CreateItem(type, expire_date, (int)count);
|
||||
if (pItem == null)
|
||||
return;
|
||||
pItem.Package = byPackage;
|
||||
pItem.Slot = bySlot;
|
||||
pInventory.SetItem(bySlot, pItem);
|
||||
}
|
||||
|
||||
pItem.SetExpireDate(expire_date);
|
||||
pItem.SetProcType(state);
|
||||
pItem.SetAmount((int)count);
|
||||
if (content != null && content.Length > 0)
|
||||
pItem.SetItemInfo(content, content.Length);
|
||||
else
|
||||
pItem.SetItemInfo(null, 0);
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log($"[Inventory] OWN_ITEM_INFO pkg={byPackage} slot={bySlot} tid={type} count={count} contentLen={content_length}");
|
||||
#endif
|
||||
|
||||
if (byPackage == InventoryConst.IVTRTYPE_EQUIPPACK)
|
||||
{
|
||||
UpdateEquipSkins();
|
||||
}
|
||||
else if (byPackage == InventoryConst.IVTRTYPE_PACK)
|
||||
{
|
||||
if (newItem.IsEquipment())
|
||||
if (pItem != null && pItem.IsEquipment())
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@@ -338,7 +424,7 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
// Trigger UI refresh if an EC_InventoryUI is present in scene
|
||||
var ui = GameObject.FindObjectOfType<EC_InventoryUI>();
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
if (ui != null)
|
||||
{
|
||||
ui.RefreshAll();
|
||||
@@ -350,204 +436,215 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Message MSG_HST_PICKUPITEM handler. Matches C++ flow: switch only fills idItem/iExpireDate/iAmount/iCmdLastSlot/iCmdSlotAmount/iPack/iMsg;
|
||||
/// then single common path: MergeItem (or PutItemInSlot to match server slot), GetItemInfo request for equipment, notifications, RefreshAll.
|
||||
/// </summary>
|
||||
public void OnMsgHstPickupItem(in ECMSG Msg)
|
||||
{
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
int cmd = Convert.ToInt32(Msg.dwParam2);
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
if (Application.isEditor || Debug.isDebugBuild)
|
||||
Debug.Log($"[INVNET] HST_PICKUPITEM cmd={cmd} bytes={data.Length}");
|
||||
|
||||
bool bDoOther = false;
|
||||
int idItem, iExpireDate = 0, iAmount, iCmdLastSlot, iCmdSlotAmount, iPack, iMsg = -1;
|
||||
int idItem = 0, iExpireDate = 0, iAmount = 0, iCmdLastSlot = 0, iCmdSlotAmount = 0, iPack = 0, iMsg = -1;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case CommandID.HOST_OBTAIN_ITEM:
|
||||
{
|
||||
// Parse cmd_host_obtain_item struct data
|
||||
int type = BitConverter.ToInt32(data, 0);
|
||||
int expire_date = BitConverter.ToInt32(data, 4);
|
||||
uint amount = BitConverter.ToUInt32(data, 8);
|
||||
uint slot_amount = BitConverter.ToUInt32(data, 12);
|
||||
byte where = data[16]; // Package index
|
||||
byte index = data[17]; // Slot index in that package
|
||||
var newItem = EC_IvtrItem.CreateItem(type, expire_date, (int)amount);
|
||||
|
||||
// Add item to inventory
|
||||
var ivt = GetInventory(where);
|
||||
ivt.SetItem(index, newItem);
|
||||
|
||||
Debug.Log(
|
||||
$"[HOST_OBTAIN_ITEM] Successfully added item {type} to package {where}, slot {index} with count {amount}");
|
||||
|
||||
// Trigger UI refresh if an EC_InventoryUI is present in scene
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
if (ui != null)
|
||||
{
|
||||
ui.RefreshAll();
|
||||
}
|
||||
|
||||
UpdateEquipSkins();
|
||||
}
|
||||
break;
|
||||
case CommandID.PICKUP_ITEM:
|
||||
{
|
||||
int tid = BitConverter.ToInt32(data, 0);
|
||||
int expire_date = BitConverter.ToInt32(data, 4);
|
||||
iAmount = (int)BitConverter.ToUInt32(data, 8);
|
||||
uint iSlotAmount = BitConverter.ToUInt32(data, 12);
|
||||
byte byPackage = data[16];
|
||||
byte bySlot = data[17];
|
||||
|
||||
//Debug.Log($"[Inventory] PICKUP_ITEM: tid={tid}, expire_date={expire_date}, iAmount={iAmount}, iSlotAmount={iSlotAmount}, byPackage={byPackage}, bySlot={bySlot}");
|
||||
|
||||
// Notify pickupItem script about successful pickup
|
||||
pickupItem pickupScript = pickupItem.Instance;
|
||||
if (pickupScript != null)
|
||||
{
|
||||
//Debug.Log($"[Inventory] PICKUP_ITEM: tid={tid}, expire_date={expire_date}, iAmount={iAmount}, iSlotAmount={iSlotAmount}, byPackage={byPackage}, bySlot={bySlot}");
|
||||
|
||||
// Notify pickupItem script about successful pickup
|
||||
pickupScript = UnityEngine.Object.FindFirstObjectByType<pickupItem>();
|
||||
if (pickupScript != null)
|
||||
{
|
||||
pickupScript.OnPickupSuccess(tid);
|
||||
}
|
||||
|
||||
// Create new inventory item data
|
||||
var newItem = EC_IvtrItem.CreateItem(tid, expire_date, (int)iAmount);
|
||||
|
||||
// Add item to inventory
|
||||
var ivt = GetInventory(byPackage);
|
||||
ivt.SetItem(bySlot, newItem);
|
||||
|
||||
//Debug.Log($"[Inventory] Successfully added item {tid} to package {byPackage}, slot {bySlot} with count {iAmount}");
|
||||
|
||||
// Trigger UI refresh if an EC_InventoryUI is present in scene
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
if (ui != null)
|
||||
{
|
||||
ui.RefreshAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[Inventory] PICKUP_ITEM: Invalid data length");
|
||||
}
|
||||
|
||||
var pCmdPickup = GPDataTypeHelper.FromBytes<cmd_pickup_item>(data);
|
||||
idItem = pCmdPickup.tid;
|
||||
iExpireDate = pCmdPickup.expire_date;
|
||||
iAmount = (int)pCmdPickup.iAmount;
|
||||
iCmdLastSlot = pCmdPickup.bySlot;
|
||||
iCmdSlotAmount = (int)pCmdPickup.iSlotAmount;
|
||||
iPack = pCmdPickup.byPackage;
|
||||
iMsg = (int)FixedMsg.FIXMSG_PICKUPITEM;
|
||||
break;
|
||||
}
|
||||
case CommandID.HOST_OBTAIN_ITEM:
|
||||
{
|
||||
var pCmdObtain = GPDataTypeHelper.FromBytes<cmd_host_obtain_item>(data);
|
||||
idItem = pCmdObtain.type;
|
||||
iExpireDate = pCmdObtain.expire_date;
|
||||
iAmount = (int)pCmdObtain.amount;
|
||||
iCmdLastSlot = pCmdObtain.index;
|
||||
iCmdSlotAmount = (int)pCmdObtain.slot_amount;
|
||||
iPack = pCmdObtain.where;
|
||||
iMsg = (int)FixedMsg.FIXMSG_GAINITEM;
|
||||
break;
|
||||
}
|
||||
case CommandID.PRODUCE_ONCE:
|
||||
{
|
||||
var pCmdProduce = GPDataTypeHelper.FromBytes<cmd_produce_once>(data);
|
||||
idItem = pCmdProduce.type;
|
||||
iExpireDate = 0;
|
||||
iAmount = (int)pCmdProduce.amount;
|
||||
iCmdLastSlot = pCmdProduce.index;
|
||||
iCmdSlotAmount = (int)pCmdProduce.slot_amount;
|
||||
iPack = pCmdProduce.where;
|
||||
iMsg = (int)FixedMsg.FIXMSG_PRODUCEITEM;
|
||||
var dlgProduce = UnityEngine.Object.FindFirstObjectByType<DlgProduce>();
|
||||
dlgProduce?.OnProduceOnce(pCmdProduce);
|
||||
break;
|
||||
}
|
||||
case CommandID.TASK_DELIVER_ITEM:
|
||||
cmd_task_deliver_item pCmd = GPDataTypeHelper.FromBytes<cmd_task_deliver_item>(data);
|
||||
// ASSERT(pCmd);
|
||||
|
||||
idItem = pCmd.type;
|
||||
iExpireDate = pCmd.expire_date;
|
||||
iAmount = (int)pCmd.amount;
|
||||
iCmdLastSlot = pCmd.index;
|
||||
iCmdSlotAmount = (int)pCmd.slot_amount;
|
||||
iPack = pCmd.where;
|
||||
{
|
||||
var pCmdTask = GPDataTypeHelper.FromBytes<cmd_task_deliver_item>(data);
|
||||
idItem = pCmdTask.type;
|
||||
iExpireDate = pCmdTask.expire_date;
|
||||
iAmount = (int)pCmdTask.amount;
|
||||
iCmdLastSlot = pCmdTask.index;
|
||||
iCmdSlotAmount = (int)pCmdTask.slot_amount;
|
||||
iPack = pCmdTask.where;
|
||||
iMsg = (int)FixedMsg.FIXMSG_GAINITEM;
|
||||
bDoOther = true;
|
||||
|
||||
|
||||
// Create new inventory item data
|
||||
var taskNewItem = EC_IvtrItem.CreateItem(idItem, iExpireDate, (int)iAmount);
|
||||
|
||||
// Add item to inventory
|
||||
var task_ivt = GetInventory((byte)iPack);
|
||||
if (!task_ivt.MergeItem(idItem, iExpireDate, iAmount, out var iLastSlot, out var iSlotNum) ||
|
||||
iLastSlot != iCmdLastSlot || iSlotNum != iCmdSlotAmount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
task_ivt.SetItem(iCmdLastSlot, taskNewItem);
|
||||
|
||||
//Debug.Log($"[Inventory] Successfully added item {tid} to package {byPackage}, slot {bySlot} with count {iAmount}");
|
||||
|
||||
// Trigger UI refresh if an EC_InventoryUI is present in scene
|
||||
var task_ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
if (task_ui != null)
|
||||
{
|
||||
task_ui.RefreshAll();
|
||||
}
|
||||
|
||||
break;
|
||||
case CommandID.PRODUCE_ONCE:
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Debug.Log($"[Inventory] PICKUP_FLOW cmd={cmd} pack={iPack} slot={iCmdLastSlot} tid={idItem} amt={iAmount} slotAmt={iCmdSlotAmount}");
|
||||
#endif
|
||||
EC_Inventory pInventory = GetPack(iPack);
|
||||
if (pInventory == null)
|
||||
return;
|
||||
|
||||
if (iCmdLastSlot >= pInventory.GetSize())
|
||||
pInventory.Resize(iCmdLastSlot + 1);
|
||||
|
||||
bool placed = pInventory.PutItemInSlot(iCmdLastSlot, idItem, iExpireDate, iAmount, out int iLastSlot, out int iSlotNum);
|
||||
if (!placed)
|
||||
{
|
||||
placed = pInventory.MergeItem(idItem, iExpireDate, iAmount, out iLastSlot, out iSlotNum);
|
||||
if (!placed || iLastSlot != iCmdLastSlot || iSlotNum != iCmdSlotAmount)
|
||||
{
|
||||
// Parse cmd_produce_once struct data
|
||||
cmd_produce_once produceCmd = GPDataTypeHelper.FromBytes<cmd_produce_once>(data);
|
||||
#if UNITY_EDITOR
|
||||
Debug.LogWarning($"[Inventory] PICKUP_FLOW desync: placed={placed} lastSlot={iLastSlot} slotNum={iSlotNum} expectedSlot={iCmdLastSlot} expectedSlotAmt={iCmdSlotAmount}");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int produceItemId = produceCmd.type;
|
||||
int produceExpireDate = 0;
|
||||
uint produceAmount = produceCmd.amount;
|
||||
byte producePack = produceCmd.where;
|
||||
byte produceSlot = produceCmd.index;
|
||||
if (cmd == CommandID.HOST_OBTAIN_ITEM && iPack == Inventory_type.IVTRTYPE_PACK)
|
||||
{
|
||||
// C++: CECShoppingManager::Instance().OnObtainItem(iPack, idItem, iAmount);
|
||||
}
|
||||
|
||||
Debug.Log(
|
||||
$"[PRODUCE_ONCE] Received: itemId={produceItemId}, amount={produceAmount}, pack={producePack}, slot={produceSlot}");
|
||||
EC_IvtrItem pItem = pInventory.GetItem(iCmdLastSlot, false);
|
||||
if (pItem != null)
|
||||
{
|
||||
pItem.Package = (byte)iPack;
|
||||
pItem.Slot = iCmdLastSlot;
|
||||
int cid = pItem.GetClassID();
|
||||
if (pItem.IsEquipment() ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKNMMATTER ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKDICE ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKITEM ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_GOBLIN_EXPPILL ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_WEDDINGBOOKCARD ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_WEDDINGINVITECARD ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_SKILLTOME ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_GOBLIN ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_PETEGG)
|
||||
{
|
||||
UnityGameSession.c2s_CmdGetItemInfo((byte)iPack, (byte)iCmdLastSlot);
|
||||
}
|
||||
if (iMsg >= 0)
|
||||
{
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
pGameRun?.AddFixedMessage(iMsg, iAmount, pItem.GetName());
|
||||
}
|
||||
}
|
||||
|
||||
// Get inventory
|
||||
var produce_ivt = GetInventory(producePack);
|
||||
if (produce_ivt == null)
|
||||
if (bDoOther)
|
||||
{
|
||||
// C++: m_pTaskInterface->DoAutoTeamForTask(idItem);
|
||||
}
|
||||
|
||||
if (cmd == CommandID.PICKUP_ITEM)
|
||||
{
|
||||
var pickupScript = UnityEngine.Object.FindFirstObjectByType<pickupItem>();
|
||||
pickupScript?.OnPickupSuccess(idItem);
|
||||
}
|
||||
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
ui?.RefreshAll();
|
||||
UpdateEquipSkins();
|
||||
}
|
||||
|
||||
/// <summary>Buy from NPC/booth: server sends PURCHASE_ITEM (cmd_purchase_item). C++ OnMsgHstPurchaseItems.</summary>
|
||||
public void OnMsgHstPurchaseItems(ECMSG Msg)
|
||||
{
|
||||
var data = Msg.dwParam1 as byte[];
|
||||
if (data == null || data.Length < 11)
|
||||
return;
|
||||
|
||||
var header = GPDataTypeHelper.FromBytes<cmd_purchase_item_header>(data);
|
||||
int index = 11;
|
||||
const int itemSize = 15; // item_id(4) + expire_date(4) + count(4) + inv_index(2) + booth_slot(1)
|
||||
EC_Inventory pPack = GetPack(Inventory_type.IVTRTYPE_PACK);
|
||||
if (pPack == null)
|
||||
return;
|
||||
|
||||
var slotsNeedingDetail = new System.Collections.Generic.List<byte>();
|
||||
|
||||
for (int i = 0; i < header.item_count && index + itemSize <= data.Length; i++)
|
||||
{
|
||||
int item_id = BitConverter.ToInt32(data, index); index += 4;
|
||||
int expire_date = BitConverter.ToInt32(data, index); index += 4;
|
||||
int count = (int)BitConverter.ToUInt32(data, index); index += 4;
|
||||
ushort inv_index = BitConverter.ToUInt16(data, index); index += 2;
|
||||
index += 1; // booth_slot
|
||||
|
||||
if (inv_index >= pPack.GetSize())
|
||||
pPack.Resize(inv_index + 1);
|
||||
|
||||
bool placed = pPack.PutItemInSlot(inv_index, item_id, expire_date, count, out int lastSlot, out int slotNum);
|
||||
if (!placed)
|
||||
{
|
||||
placed = pPack.MergeItem(item_id, expire_date, count, out lastSlot, out slotNum);
|
||||
if (!placed || lastSlot != inv_index)
|
||||
continue;
|
||||
}
|
||||
|
||||
var pItem = pPack.GetItem(inv_index, false);
|
||||
if (pItem != null)
|
||||
{
|
||||
pItem.Package = (byte)Inventory_type.IVTRTYPE_PACK;
|
||||
pItem.Slot = inv_index;
|
||||
int cid = pItem.GetClassID();
|
||||
if (pItem.IsEquipment() ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKNMMATTER ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKDICE ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_TASKITEM ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_GOBLIN_EXPPILL ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_WEDDINGBOOKCARD ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_WEDDINGINVITECARD ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_SKILLTOME ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_GOBLIN ||
|
||||
cid == (int)EC_IvtrItem.InventoryClassId.ICID_PETEGG)
|
||||
{
|
||||
Debug.LogWarning($"[PRODUCE_ONCE] Invalid inventory package {producePack}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the slot already has an item
|
||||
var existingItem = produce_ivt.GetItem(produceSlot, false);
|
||||
|
||||
if (existingItem != null)
|
||||
{
|
||||
if (existingItem.m_tid == produceItemId)
|
||||
{
|
||||
existingItem.m_iCount = (int)produceAmount;
|
||||
Debug.Log(
|
||||
$"[PRODUCE_ONCE] Updated existing item count at slot {produceSlot} to {produceAmount}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning(
|
||||
$"[PRODUCE_ONCE] Slot {produceSlot} already has different item (tid={existingItem.m_tid}), not overwriting with {produceItemId}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var produceNewItem = new EC_IvtrItem
|
||||
{
|
||||
Package = producePack,
|
||||
Slot = produceSlot,
|
||||
m_tid = produceItemId,
|
||||
m_expire_date = produceExpireDate,
|
||||
State = 0,
|
||||
m_iCount = (int)produceAmount,
|
||||
Crc = 0,
|
||||
Content = null
|
||||
};
|
||||
|
||||
produce_ivt.SetItem(produceSlot, produceNewItem);
|
||||
Debug.Log($"[PRODUCE_ONCE] Created new item at slot {produceSlot} with count {produceAmount}");
|
||||
}
|
||||
|
||||
// Trigger UI refresh
|
||||
var produce_ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
if (produce_ui != null)
|
||||
{
|
||||
produce_ui.RefreshAll();
|
||||
}
|
||||
|
||||
UpdateEquipSkins();
|
||||
|
||||
// Notify DlgProduce
|
||||
var dlgProduce = GameObject.FindFirstObjectByType<DlgProduce>();
|
||||
if (dlgProduce != null)
|
||||
{
|
||||
dlgProduce.OnProduceOnce(produceCmd);
|
||||
slotsNeedingDetail.Add((byte)inv_index);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
AddMoneyAmount(-(int)header.cost);
|
||||
|
||||
foreach (byte slot in slotsNeedingDetail)
|
||||
UnityGameSession.c2s_CmdGetItemInfo((byte)Inventory_type.IVTRTYPE_PACK, slot);
|
||||
|
||||
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
|
||||
ui?.RefreshAll();
|
||||
UpdateEquipSkins();
|
||||
}
|
||||
|
||||
private void OnMsgHstUseItem(ECMSG Msg)
|
||||
|
||||
+118
-423
@@ -9,6 +9,9 @@ using System.Runtime.InteropServices;
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.Players;
|
||||
using UnityEngine;
|
||||
using static BrewMonster.Scripts.Pet.CECPetData;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using static PerfectWorld.Scripts.Managers.EC_IvtrEquip;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
@@ -64,425 +67,21 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* Is host operating pet ?
|
||||
return value:
|
||||
return value:
|
||||
|
||||
0: host doesn't operating pet.
|
||||
1: host is summoning pet.
|
||||
2: host is recalling pet.
|
||||
3: host is banishing pet.
|
||||
*/
|
||||
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 (m_pWorkMan == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
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)
|
||||
@@ -494,7 +93,6 @@ namespace BrewMonster
|
||||
else if (pWork.GetDoWhat() == (int)CECHPWorkConcentrate.eDO_PET.DO_RESTOREPET)
|
||||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -505,6 +103,7 @@ namespace BrewMonster
|
||||
m_pActionSwitcher.PostMessge((int)EMsgActionSwitcher.MSG_MOUNTPET);
|
||||
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
CECUIManager pGameUI = pGameRun.GetUIManager();
|
||||
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(iPetIdx);
|
||||
if (pPet == null)
|
||||
@@ -517,7 +116,8 @@ namespace BrewMonster
|
||||
if (pPet.IsDead())
|
||||
{
|
||||
//pGameRun.AddFixedMessage(FIXMSG_PET_DEAD);
|
||||
Debug.LogError("FIXMSG_PET_DEAD");
|
||||
//Debug.LogError("FIXMSG_PET_DEAD");
|
||||
pGameUI.ShowMessageBox("MessageBox", "PET_DEAD", MessageBoxType.YesButton);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -534,15 +134,12 @@ namespace BrewMonster
|
||||
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));
|
||||
string strText = "";
|
||||
strText = string.Format(pGameUI.GetInGameUIMan().GetStringFromTable(10787), iLevelRequired);
|
||||
pGameUI.ShowMessageBox("MessageBox", strText, MessageBoxType.YesButton);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -551,9 +148,107 @@ namespace BrewMonster
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Recall pet
|
||||
public bool RecallPet()
|
||||
{
|
||||
if (m_pActionSwitcher != null)
|
||||
m_pActionSwitcher.PostMessge((int)EMsgActionSwitcher.MSG_MOUNTPET);
|
||||
|
||||
// If host could't stop naturally, cancel recalling
|
||||
if (!NaturallyStopMoving())
|
||||
return false;
|
||||
|
||||
UnityGameSession.c2s_CmdPetRecall();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get pet operation time counter
|
||||
public CECCounter GetPetOptTime() { return m_PetOptCnt; }
|
||||
public CECPetCorral GetPetCorral()
|
||||
{
|
||||
return m_pPetCorral;
|
||||
}
|
||||
|
||||
// Hatch pet
|
||||
public bool HatchPet(int iIvtrIdx)
|
||||
{
|
||||
EC_IvtrItem pItem = m_pPack.GetItem(iIvtrIdx);
|
||||
if (pItem == null || pItem.GetClassID() != (int)EQUIP_CLASS_ID.ICID_PETEGG)
|
||||
return false;
|
||||
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
|
||||
EC_IvtrPetEgg pEgg = (EC_IvtrPetEgg)pItem;
|
||||
IVTR_ESSENCE_PETEGG e = pEgg.GetEssence();
|
||||
|
||||
// Check profession
|
||||
if ((e.req_class & (1 << m_iProfession)) == 0)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_WRONGPROF);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check level
|
||||
int iLevelReq = Math.Max((int)e.level, e.req_level);
|
||||
if (GetMaxLevelSofar() < iLevelReq)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_LEVELTOOLOW);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check money
|
||||
if (GetMoneyAmount() < pEgg.GetDBEssence().money_hatched)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_NEEDMONEY);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check whether pet corral is full
|
||||
if (m_pPetCorral.GetEmptySlotNum() == 0)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_PET_CORRALFULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
UnityGameSession.c2s_CmdNPCSevHatchPet(iIvtrIdx, pItem.GetTemplateID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Restore pet
|
||||
public bool RestorePet(int iPetIdx)
|
||||
{
|
||||
CECPetData pPet = m_pPetCorral.GetPetData(iPetIdx);
|
||||
if (pPet == null || iPetIdx == m_pPetCorral.GetActivePetIndex())
|
||||
return false;
|
||||
|
||||
CECGameRun pGameRun = EC_Game.GetGameRun();
|
||||
|
||||
// Check money
|
||||
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
|
||||
object ob_pdbe = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)pPet.GetEggID(), ID_SPACE.ID_SPACE_ESSENCE,ref DataType);
|
||||
if (DataType != DATA_TYPE.DT_PET_EGG_ESSENCE || ob_pdbe == null)
|
||||
return false;
|
||||
|
||||
PET_EGG_ESSENCE pdbe = (PET_EGG_ESSENCE)ob_pdbe;
|
||||
|
||||
if (GetMoneyAmount() < pdbe.money_restored)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_NEEDMONEY);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check package space
|
||||
if (m_pPack.GetEmptySlotNum() == 0)
|
||||
{
|
||||
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_PACKISFULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
UnityGameSession.c2s_CmdNPCSevRestorePet(iPetIdx);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,13 +102,6 @@ namespace BrewMonster
|
||||
// }
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
private void OnMsgHstPressCancel(ECMSG Msg)
|
||||
{
|
||||
CECHPWork pCurWork = null;
|
||||
|
||||
@@ -43,18 +43,17 @@ namespace BrewMonster
|
||||
private CECHPWorkMan m_pWorkMan; // Host work manager
|
||||
private uint m_dwLIES; // Logic-influence extend states
|
||||
private FACTION_FORTRESS_ENTER m_fortressEnter; // ½øÈë»ùµØÐÅÏ¢
|
||||
private PVPINFO m_pvp; // pvp information
|
||||
private bool m_bInSanctuary = false; // true, player is in sanctuary
|
||||
private int m_idFaction = 0; // ID of player's faction
|
||||
//private PVPINFO m_pvp; // pvp information
|
||||
//private bool m_bInSanctuary = false; // true, player is in sanctuary
|
||||
//private int m_idFaction = 0; // ID of player's faction
|
||||
public bool m_bPrepareFight = false; // true, prepare to fight
|
||||
private int m_iJumpCount = 0;
|
||||
private bool m_bJumpInWater = false;
|
||||
|
||||
public A3DVECTOR3 m_vVelocity; // Velocity
|
||||
|
||||
public CECShortcutSet[] m_aSCSets1 = new CECShortcutSet[HostCfgConstants.NUM_HOSTSCSETS1];
|
||||
public CECShortcutSet[] m_aSCSets2 = new CECShortcutSet[HostCfgConstants.NUM_HOSTSCSETS2];
|
||||
bool m_bChangingFace;
|
||||
|
||||
|
||||
bool m_bChangingFace; // true, host is changing face
|
||||
private int m_iRoleCreateTime;
|
||||
private int m_iRoleLastLoginTime; // Role last login time
|
||||
private int m_iAccountTotalCash;
|
||||
@@ -297,15 +296,6 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
private static class HostCfgConstants
|
||||
{
|
||||
public const int HOSTCFG_VERSION = 11;
|
||||
public const int NUM_HOSTSCSETS1 = 5; // expanded from 3 to 5 (2009.05.27)
|
||||
public const int NUM_HOSTSCSETS2 = 3;
|
||||
public const int SIZE_HOSTSCSET1 = 9; // expanded from 6 to 9 (2009.05.27)
|
||||
public const int SIZE_HOSTSCSET2 = 8;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -331,6 +321,8 @@ namespace BrewMonster
|
||||
m_PetOptCnt.SetPeriod(1000);
|
||||
m_PetOptCnt.Reset(true);
|
||||
|
||||
|
||||
CreateInventories();
|
||||
// run a process on background to keep track of task status.
|
||||
UniTask.RunOnThreadPool(TickTask, false, this.GetCancellationTokenOnDestroy()).Forget();
|
||||
}
|
||||
@@ -567,12 +559,16 @@ namespace BrewMonster
|
||||
case EC_MsgDef.MSG_HST_PICKUPITEM:
|
||||
OnMsgHstPickupItem(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_PURCHASEITEMS:
|
||||
OnMsgHstPurchaseItems(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_PRODUCEITEM:
|
||||
OnMsgHstProduceItem(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_SELTARGET:
|
||||
OnMsgHstSelTarget(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_USEITEM:
|
||||
OnMsgHstUseItem(Msg);
|
||||
break;
|
||||
case EC_MsgDef.MSG_HST_ATKRESULT: OnMsgHstAttackResult(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_ATTACKED: OnMsgHstAttacked(Msg); break;
|
||||
@@ -586,8 +582,11 @@ namespace BrewMonster
|
||||
case EC_MsgDef.MSG_HST_STOPATTACK: OnMsgHstStopAttack(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_SKILLRESULT: OnMsgHstSkillResult(Msg); break;
|
||||
case EC_MsgDef.MSG_PM_CASTSKILL: OnMsgPlayerCastSkill(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_SETCOOLTIME: OnMsgHstSetCoolTime(Msg); break;
|
||||
case EC_MsgDef.MSG_PM_ENCHANTRESULT: OnMsgEnchantResult(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_LEARNSKILL: OnMsgHstLearnSkill(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_COMBO_SKILL_PREPARE: OnMsgComboSkillPrepare(Msg); break;
|
||||
case EC_MsgDef.MSG_HST_CONTINUECOMBOSKILL: OnMsgContinueComboSkill(Msg); break;
|
||||
|
||||
case EC_MsgDef.MSG_HST_OWNEXTPROP: OnMsgHstExtProp(Msg); break;
|
||||
case EC_MsgDef.MSG_PM_PLAYERDOEMOTE: OnMsgPlayerDoEmote(Msg); break;
|
||||
@@ -1353,65 +1352,6 @@ namespace BrewMonster
|
||||
return Mathf.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
||||
}
|
||||
|
||||
// Load configs data (shortcut, etc.) from specified buffer
|
||||
// Converted from: bool CECHostPlayer::LoadConfigData(const void* pDataBuf)
|
||||
public bool LoadConfigData(byte[] dataBuf)
|
||||
{
|
||||
if (dataBuf == null || dataBuf.Length < sizeof(uint))
|
||||
return false;
|
||||
|
||||
int offset = 0;
|
||||
|
||||
// Version number
|
||||
uint dwVer = GPDataTypeHelper.FromBytes<uint>(dataBuf, offset);
|
||||
offset += sizeof(uint);
|
||||
if (dwVer > HostCfgConstants.HOSTCFG_VERSION)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load shortcut configs...
|
||||
int iHostSCSets1 = (dwVer <= 4) ? 3 : HostCfgConstants.NUM_HOSTSCSETS1;
|
||||
|
||||
for (int i = 0; i < iHostSCSets1; i++)
|
||||
{
|
||||
if (offset >= dataBuf.Length)
|
||||
return false;
|
||||
|
||||
if (m_aSCSets1[i] == null)
|
||||
{
|
||||
m_aSCSets1[i] = new CECShortcutSet();
|
||||
m_aSCSets1[i].Init(HostCfgConstants.SIZE_HOSTSCSET1);
|
||||
}
|
||||
|
||||
if (!m_aSCSets1[i].LoadConfigData(dataBuf, dwVer, ref offset))
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < HostCfgConstants.NUM_HOSTSCSETS2; i++)
|
||||
{
|
||||
if (offset >= dataBuf.Length)
|
||||
break; // No more data; tolerate truncated optional parts
|
||||
|
||||
if (m_aSCSets2[i] == null)
|
||||
{
|
||||
m_aSCSets2[i] = new CECShortcutSet();
|
||||
m_aSCSets2[i].Init(HostCfgConstants.SIZE_HOSTSCSET2);
|
||||
}
|
||||
|
||||
if (!m_aSCSets2[i].LoadConfigData(dataBuf, dwVer, ref offset))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Notes:
|
||||
// - Auto fashion sets, system module shortcut sets, booth packs, and AutoYinpiao
|
||||
// sections from native are not loaded here in this Unity port yet.
|
||||
// The native format appends these after the two shortcut-set groups.
|
||||
// We intentionally ignore them safely for now.
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public int GetCharacterID()
|
||||
{
|
||||
return m_PlayerInfo.cid;
|
||||
@@ -1524,10 +1464,10 @@ namespace BrewMonster
|
||||
}
|
||||
|
||||
// Get faction ID
|
||||
public int GetFactionID()
|
||||
{
|
||||
return m_idFaction;
|
||||
}
|
||||
//public int GetFactionID()
|
||||
//{
|
||||
// return m_idFaction;
|
||||
//}
|
||||
public void SetPrayDistancePlus(float prayDistancePlus)
|
||||
{
|
||||
m_fPrayDistancePlus = prayDistancePlus;
|
||||
|
||||
@@ -486,7 +486,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
{
|
||||
get
|
||||
{
|
||||
if(m_iconlistIvtr == null)
|
||||
if(m_iconlistIvtr == null || m_iconlistIvtr.Length == 0)
|
||||
{
|
||||
m_iconlistIvtr = Resources.LoadAll<Sprite>("UI/IconSprites/iconlist_ivtrm_multisprite");
|
||||
}
|
||||
@@ -519,6 +519,22 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
pSC.Execute();
|
||||
}
|
||||
}
|
||||
public void OnClickFly()
|
||||
{
|
||||
CECHostPlayer hostPlayer = EC_Game.GetGameRun()?.GetHostPlayer();
|
||||
if (hostPlayer != null)
|
||||
{
|
||||
hostPlayer.CmdFly(true);
|
||||
}
|
||||
}
|
||||
public void OnChangeSkillShortcut()
|
||||
{
|
||||
CECHostPlayer hostPlayer = EC_Game.GetGameRun()?.GetHostPlayer();
|
||||
if (hostPlayer != null)
|
||||
{
|
||||
hostPlayer.CycleSkillShortcuts();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle second-click button click - triggers attack or move to NPC / 处理第二次点击按钮 - 触发攻击或移动到NPC
|
||||
|
||||
+10
-982
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2099d0c0fdfc641509729652b0ed485f
|
||||
guid: 41cc7432e34e34524831ab4de7b2a3ad
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c06ad6b249fe0464896bc0a9f05cb4bc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &1
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 65bae8b9f1bd244b3a27e92af4b23b2a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_data:
|
||||
_json: '{"dictionary":{"aotSafeMode":{"$content":true,"$type":"System.Boolean"},"favoriteMembers":{"$content":[],"$type":"System.Collections.Generic.HashSet`1[[Unity.VisualScripting.Member,
|
||||
Unity.VisualScripting.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"LinkerPropertyProviderSettings":{"$content":[true,true,true],"$type":"System.Collections.Generic.List`1[[System.Boolean,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"assemblyOptions":{"$content":["mscorlib","Assembly-CSharp-firstpass","Assembly-CSharp","UnityEngine","UnityEngine.CoreModule","UnityEngine.InputModule","UnityEngine.ClusterInputModule","UnityEngine.InputLegacyModule","UnityEngine.PhysicsModule","UnityEngine.Physics2DModule","UnityEngine.TerrainPhysicsModule","UnityEngine.VehiclesModule","UnityEngine.AudioModule","UnityEngine.AnimationModule","UnityEngine.VideoModule","UnityEngine.DirectorModule","UnityEngine.Timeline","UnityEngine.ParticleSystemModule","UnityEngine.ParticlesLegacyModule","UnityEngine.WindModule","UnityEngine.ClothModule","UnityEngine.TilemapModule","UnityEngine.SpriteMaskModule","UnityEngine.TerrainModule","UnityEngine.ImageConversionModule","UnityEngine.TextRenderingModule","UnityEngine.ClusterRendererModule","UnityEngine.ScreenCaptureModule","UnityEngine.AIModule","UnityEngine.UI","UnityEngine.UIModule","UnityEngine.IMGUIModule","UnityEngine.UIElementsModule","UnityEngine.StyleSheetsModule","UnityEngine.VR","UnityEngine.VRModule","UnityEngine.ARModule","UnityEngine.HoloLens","UnityEngine.SpatialTracking","UnityEngine.GoogleAudioSpatializer","UnityEngine.Networking","UnityEngine.Analytics","UnityEngine.Advertisements","UnityEngine.Purchasing","UnityEngine.UnityConnectModule","UnityEngine.UnityAnalyticsModule","UnityEngine.GameCenterModule","UnityEngine.AccessibilityModule","UnityEngine.AndroidJNIModule","UnityEngine.AssetBundleModule","UnityEngine.FileSystemHttpModule","UnityEngine.JSONSerializeModule","UnityEngine.UmbraModule","Unity.Timeline","Unity.Timeline.Editor","Cinemachine","com.unity.cinemachine.editor","Unity.InputSystem","Unity.TextMeshPro","Unity.VisualScripting.Core","Unity.VisualScripting.Flow","Unity.VisualScripting.State"],"$type":"System.Collections.Generic.List`1[[Unity.VisualScripting.LooseAssemblyName,
|
||||
Unity.VisualScripting.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"typeOptions":{"$content":["System.Object","System.Boolean","System.Int32","System.Single","System.String","UnityEngine.Vector2","UnityEngine.Vector3","UnityEngine.Vector4","UnityEngine.Quaternion","UnityEngine.Matrix4x4","UnityEngine.Rect","UnityEngine.Bounds","UnityEngine.Color","UnityEngine.AnimationCurve","UnityEngine.LayerMask","UnityEngine.Ray","UnityEngine.Ray2D","UnityEngine.RaycastHit","UnityEngine.RaycastHit2D","UnityEngine.ContactPoint","UnityEngine.ContactPoint2D","UnityEngine.ParticleCollisionEvent","UnityEngine.SceneManagement.Scene","UnityEngine.Application","UnityEngine.Resources","UnityEngine.Mathf","UnityEngine.Debug","UnityEngine.Input","UnityEngine.Touch","UnityEngine.Screen","UnityEngine.Cursor","UnityEngine.Time","UnityEngine.Random","UnityEngine.Physics","UnityEngine.Physics2D","UnityEngine.SceneManagement.SceneManager","UnityEngine.GUI","UnityEngine.GUILayout","UnityEngine.GUIUtility","UnityEngine.Audio.AudioMixerGroup","UnityEngine.AI.NavMesh","UnityEngine.Gizmos","UnityEngine.AnimatorStateInfo","UnityEngine.EventSystems.BaseEventData","UnityEngine.EventSystems.PointerEventData","UnityEngine.EventSystems.AxisEventData","System.Collections.IList","System.Collections.IDictionary","Unity.VisualScripting.AotList","Unity.VisualScripting.AotDictionary","System.Exception"],"$type":"System.Collections.Generic.List`1[[System.Type,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"projectSetupCompleted":{"$content":false,"$type":"System.Boolean"},"savedVersion":{"major":1,"minor":9,"patch":8,"label":null,"increment":0,"$type":"Unity.VisualScripting.SemanticVersion"}}}'
|
||||
_objectReferences: []
|
||||
Reference in New Issue
Block a user