Merge remote-tracking branch 'origin/develop' into feature/dynamic-terrain

This commit is contained in:
Le Duc Anh
2026-03-02 20:15:20 +07:00
63 changed files with 5157 additions and 3174 deletions
File diff suppressed because it is too large Load Diff
@@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 8841982213385894347}
- component: {fileID: 1981970930610958667}
- component: {fileID: 2949641406655472012}
- component: {fileID: 1500706965934165254}
m_Layer: 5
m_Name: AvatarNPCFrame
m_TagString: Untagged
@@ -75,6 +76,50 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1500706965934165254
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1273460584854605297}
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: 2949641406655472012}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &5010991128992349155
GameObject:
m_ObjectHideFlags: 0
@@ -125,6 +170,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d072871c8791e284dbad61ce13ba6887, type: 3}
m_Name:
m_EditorClassIdentifier:
_NPCIconBtn: {fileID: 1500706965934165254}
_healthText: {fileID: 8148604647689649493}
_nameText: {fileID: 8459104239633154731}
_statText: {fileID: 7225922753763360209}
@@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 369226366953714584}
- component: {fileID: 5824452892770569602}
m_Layer: 0
m_Name: Button
m_Name: ViewInfoBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -116,7 +116,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 369226366953714584}
m_OnClick:
m_PersistentCalls:
@@ -186,7 +186,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "Th\xF4ng tin"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
@@ -322,7 +322,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "H\u1EA3o h\u1EEFu"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
@@ -406,7 +406,7 @@ GameObject:
- component: {fileID: 3492245093881047436}
- component: {fileID: 3003899918887861263}
m_Layer: 0
m_Name: Button (3)
m_Name: AddFriendBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -509,7 +509,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 3492245093881047436}
m_OnClick:
m_PersistentCalls:
@@ -555,11 +555,11 @@ RectTransform:
- {fileID: 1669886433399658208}
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: -131.74634, y: 298}
m_SizeDelta: {x: -1613.0662, y: -755.5913}
m_Pivot: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 400, y: -37.5}
m_SizeDelta: {x: 150, y: 425}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &13802954905842244
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -709,7 +709,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "M\u1EADt th\u01B0"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
@@ -793,7 +793,7 @@ GameObject:
- component: {fileID: 406036714762731199}
- component: {fileID: 5865049054598941117}
m_Layer: 0
m_Name: Button (6)
m_Name: CloseBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -914,7 +914,7 @@ GameObject:
- component: {fileID: 813625907549247604}
- component: {fileID: 2850233128939703198}
m_Layer: 0
m_Name: Button (5)
m_Name: WhisperBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1017,7 +1017,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 813625907549247604}
m_OnClick:
m_PersistentCalls:
@@ -1035,7 +1035,7 @@ GameObject:
- component: {fileID: 5920694446394689008}
- component: {fileID: 4902789969648325767}
m_Layer: 0
m_Name: Button (4)
m_Name: DualBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1292,7 +1292,7 @@ GameObject:
- component: {fileID: 2244784699714630255}
- component: {fileID: 3824246320618496704}
m_Layer: 0
m_Name: Button (1)
m_Name: TeamInviteBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1395,7 +1395,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 2244784699714630255}
m_OnClick:
m_PersistentCalls:
@@ -1465,7 +1465,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "Giao d\u1ECBch"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
@@ -1549,7 +1549,7 @@ GameObject:
- component: {fileID: 5543320715835409967}
- component: {fileID: 3975306851607848952}
m_Layer: 0
m_Name: Button (2)
m_Name: TradeBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1652,7 +1652,7 @@ MonoBehaviour:
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_Interactable: 0
m_TargetGraphic: {fileID: 5543320715835409967}
m_OnClick:
m_PersistentCalls:
@@ -1722,7 +1722,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "\u0110\xF3ng"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
@@ -1858,7 +1858,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Invite
m_text: "T\u1ED5 \u0111\u1ED9i"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
+145 -6
View File
@@ -1427,6 +1427,7 @@ RectTransform:
- {fileID: 6747937870382540800}
- {fileID: 9145156114905100934}
- {fileID: 1392280977313824629}
- {fileID: 7829150308709081067}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@@ -1484,6 +1485,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 52c15f7b28624ef4697b1f7eb3a0d17c, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
Content_Teammates: {fileID: 2702288869473602435}
TeammateItemPrefab: {fileID: 5014101816795320943, guid: ef1af109634dbf44da065d64dc30fa38, type: 3}
Content_Nearby: {fileID: 4562375036863719405}
@@ -6166,6 +6169,138 @@ MonoBehaviour:
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &7140757019260147103
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7829150308709081067}
- component: {fileID: 615136352827836387}
- component: {fileID: 3391660217384508209}
- component: {fileID: 4321133568498195476}
m_Layer: 5
m_Name: close_btn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7829150308709081067
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7140757019260147103}
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: 7364890917756710219}
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: 426.97388, y: 272.67}
m_SizeDelta: {x: 30.682, y: 31.93}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &615136352827836387
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7140757019260147103}
m_CullTransparentMesh: 1
--- !u!114 &3391660217384508209
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7140757019260147103}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fb2f2f58be45f6e4890e85cc00b0bcc9, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4321133568498195476
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7140757019260147103}
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: 3391660217384508209}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2452003196178065293}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &7172228088205297695
GameObject:
m_ObjectHideFlags: 0
@@ -8448,7 +8583,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_AnchorMin.x
@@ -8456,15 +8591,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_SizeDelta.x
value: 0
value: 300
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_SizeDelta.y
value: 0
value: 60
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_LocalPosition.x
@@ -8496,11 +8631,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 154
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -35
objectReference: {fileID: 0}
- target: {fileID: 2128182273890188768, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -8522,6 +8657,10 @@ PrefabInstance:
propertyPath: m_Name
value: team_item
objectReference: {fileID: 0}
- target: {fileID: 8777891425110263910, guid: df9492e8a45f4b047bf5ffedaf2921ab, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
+243 -3
View File
@@ -892,8 +892,9 @@ GameObject:
- component: {fileID: 2091984348760918456}
- component: {fileID: 7421153329155037236}
- component: {fileID: 2013061949432893537}
- component: {fileID: 3809367002469310901}
m_Layer: 5
m_Name: EscapeBtn
m_Name: CheatBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -1001,6 +1002,25 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &3809367002469310901
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 934635620553056957}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 87e48b7c6bcd168488be9b7f20929389, type: 3}
m_Name:
m_EditorClassIdentifier:
_panelConsole: {fileID: 0}
_consoleInput: {fileID: 0}
_btnSend: {fileID: 0}
_btnOpen: {fileID: 0}
_btnClose: {fileID: 0}
_btnNoCooldown: {fileID: 0}
_btnToggleAutoWrath: {fileID: 2013061949432893537}
--- !u!1 &1131583467895984856
GameObject:
m_ObjectHideFlags: 0
@@ -1742,6 +1762,7 @@ RectTransform:
- {fileID: 3483809415181351540}
- {fileID: 7451658084820611230}
- {fileID: 7749074831901819156}
- {fileID: 5949267495910746152}
m_Father: {fileID: 2780428059708698453}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -3700,6 +3721,138 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ReviveOptionPopup: {fileID: 8167981555289453890}
--- !u!1 &5205684319691355829
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5949267495910746152}
- component: {fileID: 7890254496648781869}
- component: {fileID: 6788332871332871105}
- component: {fileID: 6273023266110177064}
m_Layer: 0
m_Name: team_btn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5949267495910746152
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5205684319691355829}
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: 3233441867675090637}
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: -917, y: 8}
m_SizeDelta: {x: 73, y: 73}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7890254496648781869
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5205684319691355829}
m_CullTransparentMesh: 1
--- !u!114 &6788332871332871105
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5205684319691355829}
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: c04ad7bf53935474098e0dc16aa3a0e5, 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 &6273023266110177064
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5205684319691355829}
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: 6788332871332871105}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1890210201668811196}
m_TargetAssemblyTypeName: CECUIManager, Assembly-CSharp
m_MethodName: ShowUI
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: Win_ArrangeTeam
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5490291313877083687
GameObject:
m_ObjectHideFlags: 0
@@ -5391,7 +5544,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Escape
m_text: Inf Fury
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
@@ -7964,7 +8117,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 776624419558043962, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
propertyPath: m_text
value: 44650
value: 74850388
objectReference: {fileID: 0}
- target: {fileID: 848034462487949471, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
propertyPath: m_AnchorMax.y
@@ -13481,6 +13634,46 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 3233441867675090637}
m_Modifications:
- target: {fileID: 129645434728095412, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 129645434728095412, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 129645434728095412, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 129645434728095412, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2328170557809189909, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_btnOpenCharacter
value:
objectReference: {fileID: 3803409312124193147}
- target: {fileID: 3450976418008317958, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 3.0769196
objectReference: {fileID: 0}
- target: {fileID: 3951120581356990872, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3951120581356990872, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3951120581356990872, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3951120581356990872, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4823752405346273106, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_Name
value: HUDPlayer
@@ -13565,6 +13758,42 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7087492923537698131, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7087492923537698131, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7087492923537698131, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7087492923537698131, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7708887638066944733, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7924665791547601326, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7924665791547601326, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7924665791547601326, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7924665791547601326, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -13575,6 +13804,17 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 6806681442789174374, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
m_PrefabInstance: {fileID: 8515915288329029910}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3803409312124193147 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4820812356310843501, guid: 76408ccdbeb4c654291462fcff24a8c5, type: 3}
m_PrefabInstance: {fileID: 8515915288329029910}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8966214373927126746
PrefabInstance:
m_ObjectHideFlags: 0
@@ -55,3 +55,5 @@ MonoBehaviour:
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}
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:84e412b6f5e36bb93f0b17ced95c929c8773b7ed9d513f792a0f4664d78b7014
size 282581
oid sha256:57bb52418b44eb7e3e333915973057be091b0826983b641ceb05263b4dffe2e4
size 287382
@@ -1,4 +1,6 @@
using BrewMonster.Network;
using System.Collections;
using EditorAttributes;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@@ -18,6 +20,10 @@ namespace BrewMonster.Scripts
[Space(10)]
[Header("Command Buttons")]
[SerializeField] Button _btnNoCooldown;
[SerializeField] Button _btnToggleAutoWrath;
private bool _isAutoAddWrathEnabled = false;
private Coroutine _autoAddWrathCoroutine;
private void Awake()
{
@@ -25,8 +31,21 @@ namespace BrewMonster.Scripts
_btnOpen?.onClick.AddListener(OnBtnOpenClicked);
_btnClose?.onClick.AddListener(OnBtnCloseClicked);
_btnNoCooldown?.onClick.AddListener(OnBtnNoCooldownClicked);
}
_btnToggleAutoWrath?.onClick.AddListener(OnBtnToggleAutoWrathClicked);
DontDestroyOnLoad(this);
}
private void OnDestroy()
{
// Stop coroutine if running when object is destroyed
// 对象销毁时如果协程正在运行则停止它
if (_autoAddWrathCoroutine != null)
{
StopCoroutine(_autoAddWrathCoroutine);
_autoAddWrathCoroutine = null;
}
}
#region button events
private void OnBtnSendClicked()
@@ -57,6 +76,60 @@ namespace BrewMonster.Scripts
{
UnityGameSession.c2s_CmdDebug(8903, 73125);
}
private void OnBtnAddWrathClicked()
{
UnityGameSession.c2s_CmdDebug(1992);
}
//1992
#endregion
[ContextMenu("Toggle Auto-Add Wrath")]
public void OnBtnToggleAutoWrathClicked()
{
ToggleAutoAddWrath();
}
/// <summary>
/// Toggle auto-add wrath feature (calls OnBtnAddWrathClicked every 3 seconds)
/// 切换自动添加怒气功能(每3秒调用OnBtnAddWrathClicked
/// </summary>
public void ToggleAutoAddWrath()
{
_isAutoAddWrathEnabled = !_isAutoAddWrathEnabled;
if (_isAutoAddWrathEnabled)
{
// Start the coroutine if not already running
// 如果尚未运行,则启动协程
if (_autoAddWrathCoroutine == null)
{
_autoAddWrathCoroutine = StartCoroutine(AutoAddWrathCoroutine());
}
}
else
{
// Stop the coroutine if running
// 如果正在运行,则停止协程
if (_autoAddWrathCoroutine != null)
{
StopCoroutine(_autoAddWrathCoroutine);
_autoAddWrathCoroutine = null;
}
}
}
/// <summary>
/// Coroutine that calls OnBtnAddWrathClicked every 3 seconds
/// 每3秒调用OnBtnAddWrathClicked的协程
/// </summary>
private IEnumerator AutoAddWrathCoroutine()
{
while (_isAutoAddWrathEnabled)
{
OnBtnAddWrathClicked();
yield return new WaitForSeconds(3.0f);
}
_autoAddWrathCoroutine = null;
}
}
}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 14a56e4ae79b92747a7e7d9361f3cbb7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace BrewMonster.Scripts
{
public class TestButtonAttribute : MonoBehaviour
{
[Button("Test Button")]
public void TestMethod()
{
Debug.Log("Test button clicked!");
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1354ffe4a2a98bf4babd611fa7f66452
@@ -104,6 +104,10 @@ namespace BrewMonster
return bRet;
}
public virtual void Dispose() {
Instance = null;
}
public bool AddOneSkillGfxEvent(
A3DSkillGfxComposer pComposer,
long nHostID,
@@ -11,7 +11,7 @@ using System.Text;
using ModelRenderer.Scripts.Common;
using BrewMonster.Scripts;
using UnityEngine;
using Cysharp.Threading.Tasks;
using Cysharp.Threading.Tasks;
namespace BrewMonster
{
@@ -30,7 +30,7 @@ namespace BrewMonster
protected override void OnDestroy()
{
m_targets = null;
SkillGfxMan.InstanceSub = null;
SkillGfxMan.InstanceSub.Dispose();
base.OnDestroy();
}
private void Start()
@@ -52,7 +52,7 @@ namespace BrewMonster
LoadAllSkillGfxAsync();
}
/// <summary>
/// Load GFX for a specific skill on-demand (async, non-blocking)
/// Call this when a skill is about to be used for the first time
@@ -62,7 +62,7 @@ namespace BrewMonster
// Check if already loaded
if (m_pSkillGfxComposerMan.GetSkillGfxComposer((int)skillId) != null)
return; // Already loaded
// Get SkillStub instance / 获取技能存根实例
SkillStub skillStub = SkillStub.GetStub(skillId);
if (skillStub == null)
@@ -70,9 +70,9 @@ namespace BrewMonster
BMLogger.LogWarning($"CECAttacksMan::LoadSkillGfxOnDemand() - SkillStub not found for skill {skillId}");
return;
}
(string flyGFXPath, string hitGrdGFXPath, string hitGFXPath) = ElementSkill.GetAllGFX(skillId);
// Pass skillStub to LoadOneComposerAsync / 将技能存根传递给LoadOneComposerAsync
bool loaded = await m_pSkillGfxComposerMan.LoadOneComposerAsync((int)skillId, skillStub, flyGFXPath, hitGrdGFXPath, hitGFXPath);
if (!loaded)
@@ -80,18 +80,18 @@ namespace BrewMonster
BMLogger.LogWarning($"CECAttacksMan::LoadSkillGfxOnDemand() - Failed to load GFX for skill {skillId}");
}
}
public async void LoadAllSkillGfxAsync()
{
uint idSkill = 0;
var skillMap = SkillStub.GetMap();
if (skillMap == null || skillMap.Count == 0)
{
BMLogger.LogWarning("CECAttacksMan::LoadAllSkillGfxAsync() - Skill map is empty");
return;
}
BMLogger.Log($"CECAttacksMan::LoadAllSkillGfxAsync() - Loading GFX for {skillMap.Count} skills...");
int loadedCount = 0;
int failedCount = 0;
@@ -120,14 +120,14 @@ namespace BrewMonster
loadedCount++;
else
failedCount++;
// Yield every 10 skills to keep Unity responsive
if ((loadedCount + failedCount) % 10 == 0)
{
await UniTask.Yield();
}
}
BMLogger.Log($"CECAttacksMan::LoadAllSkillGfxAsync() - Complete. Loaded: {loadedCount}, Failed: {failedCount}");
//TODO: convert this part
/* char szMultiSectionFile[MAX_PATH] = { 0 };
@@ -164,7 +164,8 @@ namespace BrewMonster
//BMLogger.LogError("HoangDev: Update CECAttackEvent node.Value.m_bFinished: " + node.Value.m_bFinished);
if (node.Value.m_bFinished)
m_targets.Remove(node);
else {
else
{
node.Value.Tick(dwDeltaTime);
}
node = next;
@@ -185,7 +186,7 @@ namespace BrewMonster
// Always draw gizmos (not just when selected)
// 始终绘制辅助线(不仅在选择时)
int gizmoCount = SkillGfxGizmoDrawer.GetGizmoCount();
// Draw test gizmo at origin to verify OnDrawGizmos is working
// 在原点绘制测试辅助线以验证OnDrawGizmos是否工作
if (gizmoCount == 0 && Time.frameCount % 120 == 0) // Log every 2 seconds when no gizmos
@@ -195,7 +196,7 @@ namespace BrewMonster
Gizmos.color = Color.magenta;
Gizmos.DrawWireSphere(Vector3.zero, 1.0f);
}
if (gizmoCount > 0)
{
// Only log occasionally to avoid spam
@@ -207,7 +208,7 @@ namespace BrewMonster
}
SkillGfxGizmoDrawer.DrawGizmos();
}
/// <summary>
/// Draw gizmos when selected (for debugging)
/// 选择时绘制辅助线(用于调试)
@@ -551,27 +552,41 @@ namespace BrewMonster
/// Load composer from file
/// 从文件加载组合器
/// </summary>
// #if UNITY_EDITOR
string hitGfxName;
string flyGfxName;
string hitGrdGfxName;
// #endif
#if UNITY_EDITOR
public string hitGfxName;
public string flyGfxName;
public string hitGrdGfxName;
#endif
public async UniTask<bool> Load(SkillStub skillStub, string flyGFXPath, string hitGrdGFXPath, string hitGFXPath)
{
#if UNITY_EDITOR
flyGfxName = flyGFXPath;
hitGfxName = hitGFXPath;
hitGrdGfxName = hitGrdGFXPath;
#else
string flyGfxName = flyGFXPath;
string hitGfxName = hitGFXPath;
string hitGrdGfxName = hitGrdGFXPath;
#endif
// Load GFX prefabs / 加载GFX预制体
flyGFX = string.IsNullOrEmpty(flyGfxName) ? null : await AddressableManager.Instance.LoadPrefabAsync("gfx/" + flyGfxName);
hitGFX = string.IsNullOrEmpty(hitGfxName) ? null : await AddressableManager.Instance.LoadPrefabAsync("gfx/" + hitGfxName);
hitGrdGFX = string.IsNullOrEmpty(hitGrdGfxName) ? null : await AddressableManager.Instance.LoadPrefabAsync("gfx/" + hitGrdGfxName);
//BMLogger.LogError("HoangDev: Load A3DSkillGfxComposer GFX name: " + name);
if (flyGFX == null && !string.IsNullOrEmpty(flyGfxName))
{
flyGFX = Resources.Load<GameObject>("GFX/" + "PlaceHolder");
}
if (hitGFX == null && !string.IsNullOrEmpty(hitGfxName))
{
hitGFX = Resources.Load<GameObject>("GFX/" + "PlaceHolder");
}
if (hitGrdGFX == null && !string.IsNullOrEmpty(hitGrdGfxName))
{
hitGrdGFX = Resources.Load<GameObject>("GFX/" + "PlaceHolder");
}
// Read parameters from SkillStub / 从技能存根读取参数
if (skillStub != null)
@@ -582,26 +597,26 @@ namespace BrewMonster
m_AttHitMode = skillStub.m_AttHitMode;
m_dwFlyTime = skillStub.m_dwFlyTime;
m_bTraceTarget = skillStub.m_bTraceTarget;
// Clustering / 集群
m_FlyCluster.m_ulCount = skillStub.m_FlyClusterCount;
m_FlyCluster.m_dwInterv = skillStub.m_FlyClusterInterval;
m_HitCluster.m_ulCount = skillStub.m_HitClusterCount;
m_HitCluster.m_dwInterv = skillStub.m_HitClusterInterval;
// Behavior / 行为
m_bOneHit = skillStub.m_bOneHit;
m_bFadeOut = skillStub.m_bFadeOut;
m_bRelScl = skillStub.m_bRelScl;
m_fDefTarScl = skillStub.m_fDefTarScl;
// Area / 区域
/* m_param.m_bArea = skillStub.m_bArea;
m_param.m_Shape = skillStub.m_Shape;
m_param.m_vSize = skillStub.m_vSize;
// Param value / 参数值
m_param.value = skillStub.m_param.value;*/
/* m_param.m_bArea = skillStub.m_bArea;
m_param.m_Shape = skillStub.m_Shape;
m_param.m_vSize = skillStub.m_vSize;
// Param value / 参数值
m_param.value = skillStub.m_param.value;*/
}
else
{
@@ -676,7 +691,7 @@ namespace BrewMonster
int originalCount = targets.Count;
targets = validTargets;
for (int i = 0; i < targets.Count; i++)
{
var tar = targets[i];
@@ -776,10 +791,10 @@ namespace BrewMonster
}
// 计算缩放 / Calculate scale
/* if (m_bRelScl)
fScale = SkillGfxMan.InstanceSub.GetTargetScale(_Target) / m_fDefTarScl * m_fHitGfxScale;
else
fScale = m_fHitGfxScale;*/
/* if (m_bRelScl)
fScale = SkillGfxMan.InstanceSub.GetTargetScale(_Target) / m_fDefTarScl * m_fHitGfxScale;
else
fScale = m_fHitGfxScale;*/
// 根据目标类型决定是否显示特效 / Determine whether to show effects based on target type
if ((nCastTargetID != 0 && tar.idTarget != nCastTargetID)
@@ -865,9 +880,8 @@ public class CECAttackEvent
m_timeToBeFired = (uint)nTimeToBeFired;
m_timeToDoDamage = (uint)nTimeToDoDamage;
m_bFinished = false;
#if UNITY_EDITOR
debugCounter = UnityEngine.Random.Range(0, 1000);
#endif
debugCounter = UnityEngine.Random.Range(0, 1000);
AddTarget(idTarget, dwModifier, nDamage);
}
public bool Tick(uint dwDeltaTime)
@@ -1498,3 +1512,8 @@ public enum GfxSkillValType
enumGfxSkillFloat,
enumGfxSkillValTypeNum
};
@@ -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
@@ -420,13 +420,6 @@ namespace BrewMonster
m_pHitGfx = pHitGfx;
}*/
// ===== Helper functions (static) =====
// 辅助函数(静态)
/// <summary>
/// Get position by ID (player or NPC)
/// 根据ID获取位置(玩家或NPC)
/// </summary>
private static bool get_pos_by_id(
EC_ManPlayer pPlayerMan,
CECNPCMan pNPCMan,
@@ -531,7 +524,6 @@ namespace BrewMonster
/*A3DSkeletonHook* pHook = pNPC->GetSgcHook(szHanger, bChildHook, szHook);
if (!pHook)
break;
A3DSkinModel *pSkin = pNPC->GetSgcSkinModel(szHanger, bChildHook, szHook);
if (bRelHook)
vPos = pHook->GetAbsoluteTM() * pOffset;
@@ -540,7 +532,6 @@ namespace BrewMonster
vPos = pSkin->GetAbsoluteTM() * pOffset;
vPos = vPos - pSkin->GetAbsoluteTM().GetRow(3) + pHook->GetAbsoluteTM().GetRow(3);
}
return true;*/
break;
}
@@ -611,14 +602,9 @@ namespace BrewMonster
return true;
}
}
return false;
}
/// <summary>
/// Get scale by ID (height from AABB)
/// 根据ID获取缩放(从AABB获取高度)
/// </summary>
public static float _get_scale_by_id(
EC_ManPlayer pPlayerMan,
CECNPCMan pNPCMan,
@@ -747,7 +733,11 @@ namespace BrewMonster
m_pNPCMan = EC_ManMessageMono.Instance?.CECNPCMan;
}
public override void Dispose()
{
base.Dispose();
InstanceSub = null;
}
public A3DSkillGfxEvent GetEmptyEvent(GfxMoveMode mode)
{
int modeIndex = (int)mode;
@@ -1268,7 +1268,18 @@ namespace BrewMonster.Scripts
{
if (m_pHost.IsFlying())
{
break;
if (CECUIManager.Instance != null)
{
string message = $"Please deactive the fly mode to start the path finding.";
CECUIManager.Instance.ShowMessageBox(
"Fly Mode", // 飞行模式
message, // 消息
BrewMonster.MessageBoxType.YesButton
);
Finish();
return;
}
}
// Brush test is not fully ported yet; pass null for now (static movemap only).
@@ -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;
///////////////////////////////////////////////////////////////////////////
@@ -60,7 +60,6 @@ namespace BrewMonster
}
if (Input.GetKeyDown(KeyCode.H))
{
BMLogger.LogError("Input.GetKeyDown(KeyCode.H)");
CycleSkillShortcuts();
}
#endif
@@ -69,10 +68,11 @@ namespace BrewMonster
void OnMsgRBtnClick()
{
int id = m_idSelTarget;
if (id == 0 || id == GetCharacterID() || !GPDataTypeHelper.ISPLAYERID(id))
return;
CECUIManager.Instance?.ShowPlayerOptionsDialog(id);
// already moved this to OnNPCIconBtnClick in HUDNPC.cs because mobile platform doesn't support right click.
// int id = m_idSelTarget;
// if (id == 0 || id == GetCharacterID() || !GPDataTypeHelper.ISPLAYERID(id))
// return;
// CECUIManager.Instance?.ShowPlayerOptionsDialog(id);
}
public void OnCommandSummon(int slot)
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
namespace BrewMonster.Scripts.Managers
@@ -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;
@@ -18,7 +18,7 @@ using UnityEngine.UI;
namespace BrewMonster.Scripts.Managers
{
public class EC_InventoryUI : AUIDialog, IRefreshLayout
public class EC_InventoryUI : AUIDialog
{
[Header("Pack Buttons (assign in Inspector)")]
@@ -30,9 +30,7 @@ namespace BrewMonster.Scripts.Managers
[SerializeField] private ItemInfo detailPanelRoot;
[SerializeField] private Vector2 detailPanelOffset = new Vector2(20f, 0f);
[SerializeField] private bool hideDetailOnStart = true;
[SerializeField] private EC_UIUtility.TextOutlet nameText;
[SerializeField] private EC_UIUtility.TextOutlet descriptionText;
[SerializeField] private EC_UIUtility.TextOutlet extendedDescText;
[SerializeField] private Button equipButton;
[SerializeField] private Button dropButton;
@@ -1023,8 +1021,6 @@ namespace BrewMonster.Scripts.Managers
// Get user-friendly name
string itemName = EC_IvtrItemUtils.Instance.ResolveItemName(item.m_tid);
nameText?.Set(string.IsNullOrEmpty(itemName) ? $"Item {item.m_tid}" : itemName);
// Centralised description:
// - For equipment, prefer EC_IvtrEquip description (includes stats, addons, sockets, etc.)
// - For other items, use EC_IvtrItem.GetDesc which reads from string tables.
@@ -1063,6 +1059,7 @@ namespace BrewMonster.Scripts.Managers
// Show panel first
// 先显示面板
ShowDetailPanel(true);
//Refresh the position of the description text. Used for UI logic purpose.
descriptionText.tmp.gameObject.GetComponent<ItemInfoText>()?.RefreshLayout();
}
@@ -1286,16 +1283,6 @@ 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
{
@@ -703,7 +703,6 @@ namespace BrewMonster.Scripts.Managers
public string m_strDesc = ""; // Item description
public bool m_bIsInNPCPack; // true, this item is in NPC package
public bool m_bLocalDetailData; // true, data from GetDetailDataFromLocal
public int m_iCurEndurance; // Current endurance
public EC_Inventory m_pDescIvtr; // Inventory only used to get item description
@@ -739,7 +738,6 @@ namespace BrewMonster.Scripts.Managers
m_bIsInNPCPack = false;
m_bLocalDetailData = false;
m_pDescIvtr = null;
m_iCurEndurance = 0;
}
@@ -1274,7 +1272,6 @@ namespace BrewMonster.Scripts.Managers
#endregion
#region Simple property-style accessors (1:1 with C++)
public int GetCurEndurance() { return m_iCurEndurance; }
public int GetClassID() => m_iCID;
public int GetTemplateID() => m_tid;
@@ -33,18 +33,6 @@ namespace PerfectWorld.Scripts.Managers
{
if (CECGameRun.Instance == null) return true;
if (CECGameRun.Instance.GetHostPlayer() == null) return true;
// Duel invite: show accept/reject popup (origin uses MSG_PM_DUELOPT with command DUEL_RECV_REQUEST = 214)
// dwParam2 is ushort (pCmdHeader from GameSession); use Convert to avoid InvalidCastException when unboxing
if ((int)Msg.dwMsg == EC_MsgDef.MSG_PM_DUELOPT && Convert.ToInt32(Msg.dwParam2) == CommandID.DUEL_RECV_REQUEST && Msg.dwParam1 is byte[] pDataBuf && pDataBuf.Length >= 4)
{
int inviterId = BitConverter.ToInt32(pDataBuf, 0);
CECUIManager.Instance?.ShowMessageBox(
title: "",
message: "You have received a duel request. Do you accept?",
messageBoxType: MessageBoxType.BothYesNoButton,
onClickedYes: () => UnityGameSession.c2s_CmdDuelReply(true, inviterId),
onClickedNo: () => UnityGameSession.c2s_CmdDuelReply(false, inviterId));
}
CECGameRun.Instance.GetHostPlayer().ProcessMessage(Msg);
}
else if (Msg.iSubID < 0)
@@ -104,14 +104,14 @@ namespace BrewMonster
}
private ElementSkill m_pSkillCore;
private int m_idSkill;
private int m_iLevel;
private int m_iCoolCnt;
private int m_iCoolTime;
private bool m_bCooling;
private int m_iChargeCnt;
private int m_iChargeMax;
private bool m_bCharging;
private int m_idSkill;
private int m_iLevel;
private int m_iCoolCnt;
private int m_iCoolTime;
private bool m_bCooling;
private int m_iChargeCnt;
private int m_iChargeMax;
private bool m_bCharging;
private static CECSkillStr l_SkillStr = new CECSkillStr();
@@ -196,6 +196,7 @@ namespace BrewMonster
m_iCoolCnt = iStartCnt;
m_bCooling = true;
}
public bool ValidWeapon(int idWeapon) { return m_pSkillCore.ValidWeapon(idWeapon); }
// Ready to be cast ?
public bool ReadyToCast()
@@ -290,10 +291,10 @@ namespace BrewMonster
return null;
StringBuilder sb = new StringBuilder(1024);
m_pSkillCore.GetIntroduction(sb, l_SkillStr);
m_pSkillCore.GetIntroduction(sb, l_SkillStr);
return sb;
}
public static StringBuilder GetDesc(int idSkill, int iLevel, StringBuilder szText, int iBufLen)
public static StringBuilder GetDesc(int idSkill, int iLevel, StringBuilder szText, int iBufLen)
{
if (szText == null || iBufLen == 0)
return null;
@@ -367,10 +368,6 @@ namespace BrewMonster
return m_pSkillCore != null ? m_pSkillCore.GetNativeName() ?? string.Empty : string.Empty;
}*/
public bool ValidWeapon(int idWeapon)
{
return m_pSkillCore != null && m_pSkillCore.ValidWeapon(idWeapon);
}
/*
public bool ValidShape(int iShape)
{
@@ -1,4 +1,3 @@
using Unity.VisualScripting;
using UnityEngine;
namespace BrewMonster
@@ -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
{
@@ -818,6 +818,18 @@ namespace CSNetwork.C2SCommand
return SerializeCommand(CommandID.TEAM_INVITE, new cmd_team_new_member { idMember = idPlayer });
}
/// <summary>C2S: accept team invite from leader. idLeader = who sent the invite, team_seq = invite sequence from TEAM_LEADER_INVITE.</summary>
public static Octets CreateTeamAgreeInviteCommand(int idLeader, int team_seq)
{
return SerializeCommand(CommandID.TEAM_AGREE_INVITE, new cmd_team_agree_invite { idLeader = idLeader, team_seq = team_seq });
}
/// <summary>C2S: reject team invite from leader.</summary>
public static Octets CreateTeamRejectInviteCommand(int idLeader)
{
return SerializeCommand(CommandID.TEAM_REJECT_INVITE, new cmd_team_reject_invite { idLeader = idLeader });
}
/// <summary>C2S: request duel with target player (same payload shape as team invite).</summary>
public static Octets CreateDuelRequestCommand(int idTarget)
{
@@ -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;
@@ -2188,6 +2208,21 @@ namespace CSNetwork.GPDataType
public int idMember;
}
/// <summary>C2S: accept team invite. idLeader = who sent the invite, team_seq = invite sequence.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_team_agree_invite
{
public int idLeader;
public int team_seq;
}
/// <summary>C2S: reject team invite. idLeader = who sent the invite.</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_team_reject_invite
{
public int idLeader;
}
/// <summary>C2S duel reply (origin: who = inviter id, param = 0 accept / non-zero reject reason).</summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_duel_reply
File diff suppressed because it is too large Load Diff
@@ -589,6 +589,14 @@ namespace BrewMonster.Network
{
Instance._gameSession.c2s_SendCmdTeamInvite(idPlayer);
}
public static void c2s_CmdTeamAgreeInvite(int idLeader, int team_seq)
{
Instance._gameSession.c2s_SendCmdTeamAgreeInvite(idLeader, team_seq);
}
public static void c2s_CmdTeamRejectInvite(int idLeader)
{
Instance._gameSession.c2s_SendCmdTeamRejectInvite(idLeader);
}
public static void c2s_CmdDuelRequest(int idTarget)
{
Instance._gameSession.c2s_SendCmdDuelRequest(idTarget);
@@ -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;
@@ -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
@@ -76,7 +76,7 @@ namespace BrewMonster.Scripts.Skills
public void SendHelloToSkillLearnNPC()
{
//BMLogger.LogError($"[Skill] Sent SEVNPC_HELLO to skill-learn NPC nid={m_skillLearnNPCNID}");
BMLogger.LogError($"[Skill] Sent SEVNPC_HELLO to skill-learn NPC nid={m_skillLearnNPCNID}");
if (m_skillLearnNPCNID != 0)
{
@@ -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
{
@@ -58,6 +58,13 @@ namespace BrewMonster.Scripts.Skills
return (int)tmp;
}
public override int GetItemCost() { return stub.itemcost; }
public override bool ValidWeapon(int idWeapon) { return stub.ValidWeapon(idWeapon); }
public override int GetMpCost() { return (int)stub.GetMpcost(this); }
public override bool IsAllowLand() { return stub.allow_land; }
public override bool IsAllowWater() { return stub.allow_water; }
public override bool IsAllowAir() { return stub.allow_air; }
public override int GetArrowCost() { return stub.arrowcost; }
public override bool GetNotuseInCombat() { return stub.notuse_in_combat; }
public int GetLevel() { return (int)level; }
public PlayerWrapper GetPlayer()
@@ -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,14 +1,9 @@
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts.Task;
using BrewMonster.UI;
using CSNetwork;
using ModelRenderer.Scripts.Common;
using PerfectWorld.Scripts.Managers;
using PerfectWorld.Scripts.Task;
using System;
using System.Collections.Generic;
using System.Text;
using BrewMonster.Scripts;
using TMPro;
using UnityEngine;
@@ -25,23 +20,26 @@ namespace BrewMonster
Disenchase
}
[Header("Mode")] [SerializeField] private InstallMode m_Mode = InstallMode.Enchase;
[Header("Mode")][SerializeField] private InstallMode m_Mode = InstallMode.Enchase;
[Header("Slot First")] [SerializeField]
[Header("Slot First")]
[SerializeField]
private Transform m_SlotFirstParent;
[SerializeField] private TextMeshProUGUI m_TxtFirstName;
[Header("Slot Second")] [SerializeField]
private Transform m_SlotSecondlParent;
[Header("Slot Second")]
[SerializeField]
private Transform m_SlotSecondParent;
[SerializeField] private TextMeshProUGUI m_TxtSecondName;
[Header("Buttons and Money")] [SerializeField]
[Header("Buttons and Money")]
[SerializeField]
private TextMeshProUGUI m_TxtMoney;
[SerializeField] private Button m_BtnMergeOrReset;
[SerializeField] private Button m_BtnCancel;
[SerializeField] private Button m_BtnClose;
[SerializeField] private Sprite khung_item;
[SerializeField] private Transform itemInventoryRoot;
@@ -63,10 +61,10 @@ namespace BrewMonster
RegisterDrop(m_SlotFirstParent, OnDropEquip);
RegisterClick(m_SlotFirstParent, OnClickEquipSlot);
if (m_Mode == InstallMode.Enchase && m_SlotSecondlParent != null)
if (m_Mode == InstallMode.Enchase && m_SlotSecondParent != null)
{
RegisterDrop(m_SlotSecondlParent, OnDropMaterial);
RegisterClick(m_SlotSecondlParent, OnClickMaterialSlot);
RegisterDrop(m_SlotSecondParent, OnDropMaterial);
RegisterClick(m_SlotSecondParent, OnClickMaterialSlot);
}
}
@@ -91,23 +89,21 @@ namespace BrewMonster
//todo need to set from other class
// SetName("Win_Enchase");
m_BtnMergeOrReset.onClick.AddListener(OnClickedMergeOrReset);
m_BtnCancel.onClick.AddListener(OnClickedCancel);
m_BtnCancel.onClick.AddListener(OnCommandCancel);
m_BtnClose.onClick.AddListener(OnCommandCancel);
m_install_price = -1;
if (m_SlotSecondlParent != null)
m_SlotSecondlParent.gameObject.SetActive(m_Mode == InstallMode.Enchase);
if (m_SlotSecondParent != null)
m_SlotSecondParent.gameObject.SetActive(m_Mode == InstallMode.Enchase);
ClearEquiment();
ClearStone();
}
public override void OnDisable()
{
base.OnDisable();
m_BtnMergeOrReset.onClick.RemoveListener(OnClickedMergeOrReset);
m_BtnCancel.onClick.RemoveListener(OnClickedCancel);
}
public void CloseInstall()
{
gameObject.SetActive(false);
RestoreInventoryColors();
m_BtnCancel.onClick.RemoveListener(OnCommandCancel);
m_BtnClose.onClick.RemoveListener(OnCommandCancel);
}
private void RestoreInventoryColors()
@@ -190,7 +186,7 @@ namespace BrewMonster
if (m_SelectedEquip != null)
{
ReturnItemToInventory(m_FirstInvSlot);
ClearEquipSlot();
ClearEquiment();
}
}
@@ -199,7 +195,7 @@ namespace BrewMonster
if (m_SelectedMaterial != null)
{
ReturnItemToInventory(m_SecondInvSlot);
ClearMaterialSlot();
ClearStone();
}
}
@@ -242,6 +238,9 @@ namespace BrewMonster
if (item == null)
return;
if(!item.IsEquipment())
return;
EC_IvtrItem detailedItem = EC_IvtrItem.CreateItem(item.m_tid, item.m_expire_date, item.m_iCount);
if (item.Content != null && item.Content.Length > 0)
detailedItem.SetItemInfo(item.Content, item.Content.Length);
@@ -283,6 +282,9 @@ namespace BrewMonster
if (item == null)
return;
if (item.GetClassID() != (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE)
return;
EC_IvtrItem detailedItem = EC_IvtrItem.CreateItem(item.m_tid, item.m_expire_date, item.m_iCount);
if (item.Content != null && item.Content.Length > 0)
detailedItem.SetItemInfo(item.Content, item.Content.Length);
@@ -301,7 +303,7 @@ namespace BrewMonster
m_SecondInvSlot = slotIndex;
m_TxtSecondName.text = detailedItem.GetName();
SetSlotIcon(m_SlotSecondlParent, detailedItem);
SetSlotIcon(m_SlotSecondParent, detailedItem);
SetInventorySlotGray(btn, true);
@@ -359,9 +361,10 @@ namespace BrewMonster
img.sprite = EC_IvtrItemUtils.Instance.ResolveItemIconSprite(item.m_tid);
img.enabled = img.sprite != null;
img.color = Color.white;
img.SetNativeSize();
// GetGameUIMan()?.PlayItemSound(item, true);
}
private void ReturnItemToInventory(int slotIndex)
@@ -373,7 +376,7 @@ namespace BrewMonster
SetInventorySlotGray(btn, false);
}
private void ClearEquipSlot()
private void ClearEquiment()
{
if (m_FirstInvSlot >= 0)
{
@@ -392,7 +395,7 @@ namespace BrewMonster
}
}
private void ClearMaterialSlot()
private void ClearStone()
{
if (m_SecondInvSlot >= 0)
{
@@ -403,7 +406,7 @@ namespace BrewMonster
m_SelectedMaterial = null;
m_SecondInvSlot = -1;
m_TxtSecondName.text = "___";
ClearSlotIcon(m_SlotSecondlParent);
ClearSlotIcon(m_SlotSecondParent);
m_TxtMoney.text = "0";
m_install_price = -1;
}
@@ -447,76 +450,76 @@ namespace BrewMonster
});
return;
}
EC_IvtrEquip pEquipA = (EC_IvtrEquip)pIvtrA;
if (pHost != null && m_Mode == InstallMode.Enchase)
{
if (m_Mode == InstallMode.Enchase)
if (pEquipA.GetEmptyHoleNum() <= 0)
{
if (pEquipA.GetEmptyHoleNum() <= 0)
{
message = GetGameUIMan().GetStringFromTable(224);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
EC_IvtrItem pIvtrB = m_SelectedMaterial;
if (pIvtrB == null || !pIvtrB.IsEmbeddable())
{
message = GetGameUIMan().GetStringFromTable(225);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
if (pIvtrB.GetClassID() != (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE)
return;
int nStoneLevel = ((EC_IvtrStone)pIvtrB).GetDBEssence().level;
int nEquipLevel = -1;
switch (pEquipA.GetClassID())
{
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_WEAPON:
nEquipLevel = ((CECIvtrWeapon)pEquipA).GetDBEssence().level;
break;
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_ARMOR:
nEquipLevel = ((EC_IvtrArmor)pEquipA).GetDBEssence().level;
break;
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_DECORATION:
nEquipLevel = ((EC_IvtrDecoration)pEquipA).GetDBEssence().level;
break;
}
if (nStoneLevel > nEquipLevel)
{
message = GetGameUIMan().GetStringFromTable(300);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
//pr
UnityGameSession.c2s_CmdNPCSevEmbed(
(ushort)m_SecondInvSlot, (ushort)m_FirstInvSlot,
pIvtrB.GetTemplateID(), pIvtrA.GetTemplateID());
pHost.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
message = GetGameUIMan().GetStringFromTable(228);
message = GetGameUIMan().GetStringFromTable(224);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
EC_IvtrItem pIvtrB = m_SelectedMaterial;
if (pIvtrB == null || !pIvtrB.IsEmbeddable())
{
message = GetGameUIMan().GetStringFromTable(225);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
if (pIvtrB.GetClassID() != (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE)
return;
int nStoneLevel = ((EC_IvtrStone)pIvtrB).GetDBEssence().level;
int nEquipLevel = -1;
switch (pEquipA.GetClassID())
{
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_WEAPON:
nEquipLevel = ((CECIvtrWeapon)pEquipA).GetDBEssence().level;
break;
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_ARMOR:
nEquipLevel = ((EC_IvtrArmor)pEquipA).GetDBEssence().level;
break;
case (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_DECORATION:
nEquipLevel = ((EC_IvtrDecoration)pEquipA).GetDBEssence().level;
break;
}
if (nStoneLevel > nEquipLevel)
{
message = GetGameUIMan().GetStringFromTable(300);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
return;
}
//pr
UnityGameSession.c2s_CmdNPCSevEmbed(
(ushort)m_SecondInvSlot, (ushort)m_FirstInvSlot,
pIvtrB.GetTemplateID(), pIvtrA.GetTemplateID());
ClearEquiment();
ClearStone();
pHost.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
message = GetGameUIMan().GetStringFromTable(228);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = message,
Dlg = this
});
}
else if (pHost != null && m_Mode == InstallMode.Disenchase)
{
@@ -536,7 +539,20 @@ namespace BrewMonster
{
Message = message,
Dlg = this,
MessageBoxType = MessageBoxType.BothYesNoButton
MessageBoxType = MessageBoxType.BothYesNoButton,
OnClickedYes = () =>
{
UnityGameSession.c2s_CmdNPCSevClearEmbeddedChip((ushort)m_FirstInvSlot, pIvtrA.GetTemplateID());
ClearEquiment();
pHost.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
string successMessage = GetGameUIMan().GetStringFromTable(230);
CECUIManager.Instance.ShowMessageBox(new MessageBoxData()
{
Message = successMessage,
Dlg = this
});
}
};
CECUIManager.Instance.ShowMessageBox(x);
}
@@ -546,35 +562,37 @@ namespace BrewMonster
}
}
private void OnClickedCancel()
private void OnCommandCancel()
{
Show(false);
}
m_SelectedEquip?.Freeze(false);
m_SelectedMaterial?.Freeze(false);
public void ResetInstallUI()
{
RestoreInventoryColors();
m_SelectedEquip = null;
if (m_Mode == InstallMode.Enchase)
{
m_SelectedMaterial = null;
m_SecondInvSlot = -1;
m_TxtSecondName.text = "___";
ClearSlotIcon(m_SlotSecondlParent);
}
m_FirstInvSlot = -1;
m_SelectedMaterial = null;
m_TxtFirstName.text = "___";
m_TxtMoney.text = "0";
m_install_price = -1;
if (m_Mode == InstallMode.Enchase)
m_TxtSecondName.text = "___";
ClearSlotIcon(m_SlotFirstParent);
if (m_Mode == InstallMode.Enchase)
{
ClearSlotIcon(m_SlotSecondParent);
}
m_install_price = -1;
var host = GetHostPlayer();
host?.EndNPCService();
host?.GetPack(InventoryConst.IVTRTYPE_PACK).UnfreezeAllItems();
gameObject.SetActive(false);
}
private void CheckHidePanel(Vector2 screenPos)
{
if (!RectTransformUtility.RectangleContainsScreenPoint(
@@ -596,7 +614,7 @@ namespace BrewMonster
//check if material is stone and show price to merge
if (m_Mode == InstallMode.Enchase)
{
if (m_SelectedMaterial != null)
if (m_SelectedMaterial != null && m_SelectedMaterial is EC_IvtrStone)
{
stone = (EC_IvtrStone)m_SelectedMaterial;
pEssence = stone.GetDBEssence();
@@ -606,6 +624,7 @@ namespace BrewMonster
}
else
{
m_install_price = 0;
m_TxtMoney.text = $"{0}";
}
}
@@ -622,12 +641,15 @@ namespace BrewMonster
stone = (EC_IvtrStone)EC_IvtrItem.CreateItem(idItem, 0, 1);
pEssence = stone.GetDBEssence();
nAmount += pEssence.uninstall_price;
stone = null;
}
m_install_price = nAmount;
m_TxtMoney.text = $"{nAmount}";
}
else
{
m_install_price = 0;
m_TxtMoney.text = $"{0}";
}
}
@@ -529,7 +529,6 @@ namespace BrewMonster.UI
{
pItem.Freeze(false);
GetHostPlayer().HatchPet(m_nSlot);
Debug.LogError("m_nSlot = " + m_nSlot);
SetDataPtr(null, "");
GetGameUIMan().EndNPCService();
Show(false);
@@ -58,32 +58,38 @@ namespace BrewMonster.UI
void OnViewInfo(int characterId)
{
Debug.Log("OnViewInfo: " + characterId);
var list = new List<int> { characterId };
UnityGameSession.GetRoleBaseInfo(1, list);
}
void OnTeamInvite(int characterId)
{
Debug.Log("OnTeamInvite: " + characterId);
UnityGameSession.c2s_CmdTeamInvite(characterId);
}
void OnTrade(int characterId)
{
// TODO: c2s trade request when available
Debug.Log("OnTrade: " + characterId);
// TODO: c2s trade request when availableP
}
void OnAddFriend(int characterId)
{
Debug.Log("OnAddFriend: " + characterId);
// TODO: c2s add friend when available
}
void OnDuel(int characterId)
{
Debug.Log("OnDuel: " + characterId);
UnityGameSession.c2s_CmdDuelRequest(characterId);
}
void OnWhisper(int characterId)
{
Debug.Log("OnWhisper: " + characterId);
// TODO: open whisper/chat input with target when available
}
@@ -50,6 +50,14 @@ namespace BrewMonster.Scripts.UI
itemInfoPanel.transform.GetChild(0).gameObject.SetActive(false);
m_pBtn_Confirm.onClick.AddListener(OnCommand_confirm);
}
void OnEnable()
{
// Refresh to toggle state.
foreach (var toggle in _radioButtons)
{
toggle.isOn = false;
}
}
private void InitRadioBtns()
{
@@ -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;
@@ -134,6 +134,7 @@ namespace BrewMonster
}
else
{
//BMLogger.LogError("HoangDev: QuickBar Skill CoolTime: " + (uint)pSkill.GetSkillID() + " : " + ElementSkill.GetIcon((uint)pSkill.GetSkillID()) + " CoolTime: " + pSkill.GetCoolingTime() + " CoolCnt: " + pSkill.GetCoolingCnt());
pClock.SetProgressPos(pSkill.GetCoolingTime() - pSkill.GetCoolingCnt());
}
}
@@ -1,4 +1,5 @@
using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
using BrewMonster.Network;
using BrewMonster.Scripts.Skills;
using BrewMonster.UI;
using CSNetwork.GPDataType;
@@ -56,7 +57,7 @@ namespace BrewMonster
{
uiManager.ShowMessageBox(new MessageBoxData()
{
Title = "MessageBox",
Title = "MessageBox",
Message = gameUIMan.GetStringFromTable(11327)
});
}
@@ -103,8 +104,9 @@ namespace BrewMonster
string str = GPDataTypeHelper.ReplacePercentD(GetStringFromTable(11326), needMoney, needSp);
var messagebox = uiManager.ShowMessageBox(new MessageBoxData()
{
Title = "Game_LearnSkill",
Title = "Game_LearnSkill",
Message = str,
OnClickedYes = () => UnityGameSession.c2s_SendCmdNPCSevLearnSkill(m_skillID)
});
messagebox.SetData((uint)m_skillID);
//GetGameUIMan()->MessageBox("Game_LearnSkill", str, //GetGameUIMan()->GetStringFromTable(231),
+32
View File
@@ -1,16 +1,48 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using BrewMonster.Network;
using CSNetwork.GPDataType;
namespace BrewMonster
{
public class HUDNPC : MonoBehaviour
{
[SerializeField] private Button _NPCIconBtn;
[SerializeField] private TextMeshProUGUI _healthText;
[SerializeField] private TextMeshProUGUI _nameText;
[SerializeField] private TextMeshProUGUI _statText;
[SerializeField] private Image healthImage;
private void OnEnable()
{
if (_NPCIconBtn != null)
{
_NPCIconBtn.onClick.AddListener(OnNPCIconBtnClick);
}
}
private void OnDisable()
{
if (_NPCIconBtn != null)
{
_NPCIconBtn.onClick.RemoveListener(OnNPCIconBtnClick);
}
}
private void OnNPCIconBtnClick()
{
var host = EC_Game.GetGameRun()?.GetHostPlayer();
if (host == null)
return;
int id = host.GetSelectedTarget();
if (id == 0 || id == host.GetCharacterID() || !GPDataTypeHelper.ISPLAYERID(id))
return;
CECUIManager.Instance?.ShowPlayerOptionsDialog(id, _NPCIconBtn.transform.position);
}
public void SetText(string healthText, string nameText, string statText)
{
_healthText.text = healthText;
+24 -1
View File
@@ -5,7 +5,7 @@ using CSNetwork.GPDataType;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
namespace BrewMonster
{
public class HUDPlayer : MonoBehaviour
@@ -15,9 +15,12 @@ namespace BrewMonster
public TextMeshProUGUI expText;
public TextMeshProUGUI nameText;
public TextMeshProUGUI levelText;
public TextMeshProUGUI spText;
public Image healthImage;
public Image manaImage;
public Image expImage;
public Image apImage;
public List<Toggle> apToggles;
[Tooltip("Optional. Assign to make this area open the character dialog on click. If unset, nothing opens.")]
[SerializeField] private Button m_btnOpenCharacter;
@@ -30,6 +33,8 @@ namespace BrewMonster
EventBus.Subscribe<CECHostPlayer.EXPToUpLevel>(UpdateNeededExp);
if (m_btnOpenCharacter != null)
m_btnOpenCharacter.onClick.AddListener(OnOpenCharacterClick);
}
private void OnDestroy()
@@ -55,9 +60,27 @@ namespace BrewMonster
manaText.text = $"{obj.iMP}/{obj.iMaxMP}";
expText.text = $"{((float)obj.iExp/neededExp)*100}%";
levelText.text = $"{obj.sLevel}";
spText.text = $"{obj.iAP%100}/100";
healthImage.fillAmount = (float)obj.iHP / (float)obj.iMaxHP;
manaImage.fillAmount = (float)obj.iMP / (float)obj.iMaxMP;
expImage.fillAmount = (float)obj.iExp / (float)neededExp;
apImage.fillAmount = (float)(obj.iAP%100) / (float)100;
int curAP = obj.iAP/100;
int maxAP = obj.iMaxAP/100;
for (int i = 0; i < apToggles.Count; i++)
{
if(i < maxAP)
{
apToggles[i].gameObject.SetActive(true);
apToggles[i].isOn = i < curAP;
}
else
{
apToggles[i].gameObject.SetActive(false);
}
}
}
private void OnOpenCharacterClick()
@@ -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;
@@ -24,7 +24,6 @@ namespace BrewMonster
/// </summary>
public override void StartMove(Vector3 vHost, Vector3 vTarget)
{
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.StartMove: Entry - host={vHost}, target={vTarget}, cluster={m_bOneOfCluser}, radius={m_fRadius}");
m_vPos = vTarget;
m_vMoveDir = vTarget - vHost;
@@ -32,7 +31,6 @@ namespace BrewMonster
if (Normalize(ref m_vMoveDir) == 0)
{
m_vMoveDir = Vector3.forward; // _unit_z
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.StartMove: MoveDir was zero, using forward");
}
if (m_bOneOfCluser)
@@ -43,15 +41,12 @@ namespace BrewMonster
m_vOffset.z = Mathf.Sin(fRandAng) * fRadius;
m_vOffset.y = 0;
m_vPos += m_vOffset;
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.StartMove: Cluster offset applied - offset={m_vOffset}, finalPos={m_vPos}");
}
else
{
m_vOffset = Vector3.zero;
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.StartMove: No cluster offset, pos={m_vPos}");
}
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.StartMove: Complete - pos={m_vPos}, dir={m_vMoveDir}");
}
/// <summary>
@@ -63,7 +58,6 @@ namespace BrewMonster
Vector3 oldPos = m_vPos;
m_vPos = vTargetPos + m_vOffset;
BMLogger.LogError($"[SKILL_GFX_DEBUG] CGfxOnTargetMove.TickMove: Updated pos from {oldPos} to {m_vPos} (target={vTargetPos}, offset={m_vOffset}), returning false (hit by timeout)");
return false; // C++ returns false — hit triggered by fly time timeout
}
+5 -3
View File
@@ -421,6 +421,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1fac4acd7d2948cb81a522265a3f3863, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
m_pBtn_Confirm: {fileID: 2022223185403607436}
_itemSize: {x: 6, y: 6}
_awardItemPrefab: {fileID: 421596072721705907}
@@ -769,7 +771,7 @@ RectTransform:
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: -4}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9121733115126255695
@@ -923,7 +925,7 @@ RectTransform:
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: -4}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3662653153686734878
@@ -1903,7 +1905,7 @@ RectTransform:
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: -4}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1542407570922745670
+141 -578
View File
@@ -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:
+8 -3
View File
@@ -3554,7 +3554,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@@ -10541,7 +10541,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@@ -10569,14 +10569,17 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0785d9ccbdc425a44b6ae1f4a3afad06, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
m_Mode: 0
m_SlotFirstParent: {fileID: 5489844476385409289}
m_TxtFirstName: {fileID: 3128721472606901163}
m_SlotSecondlParent: {fileID: 7151360590639773519}
m_SlotSecondParent: {fileID: 7151360590639773519}
m_TxtSecondName: {fileID: 4492084240745408081}
m_TxtMoney: {fileID: 6140428454487430115}
m_BtnMergeOrReset: {fileID: 8208092408021918524}
m_BtnCancel: {fileID: 4503836757578509720}
m_BtnClose: {fileID: 5942200196902544367}
khung_item: {fileID: 21300000, guid: a5366f3bce011c046902e39b6bd3a077, type: 3}
itemInventoryRoot: {fileID: 7750009739432212686}
--- !u!1 &5641506892578507279
@@ -12072,6 +12075,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 12345678901234567890123456789012, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
inventoryPackButtons:
- {fileID: 3263912320807982326}
- {fileID: 7118617704469309534}
+8 -3
View File
@@ -12611,6 +12611,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 12345678901234567890123456789012, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
inventoryPackButtons:
- {fileID: 7349348188983894504}
- {fileID: 3445126299409532821}
@@ -14368,7 +14370,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@@ -14396,14 +14398,17 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0785d9ccbdc425a44b6ae1f4a3afad06, type: 3}
m_Name:
m_EditorClassIdentifier:
skillNameText: {fileID: 0}
imageProgress: {fileID: 0}
m_Mode: 1
m_SlotFirstParent: {fileID: 7418547291555597629}
m_TxtFirstName: {fileID: 8969434063030871197}
m_SlotSecondlParent: {fileID: 0}
m_SlotSecondParent: {fileID: 0}
m_TxtSecondName: {fileID: 0}
m_TxtMoney: {fileID: 4189875348703427985}
m_BtnMergeOrReset: {fileID: 4189663341364179351}
m_BtnCancel: {fileID: 5948134181014720611}
m_BtnClose: {fileID: 7824290302850289289}
khung_item: {fileID: 21300000, guid: a5366f3bce011c046902e39b6bd3a077, type: 3}
itemInventoryRoot: {fileID: 7451395605081796144}
--- !u!1 &8698343819671822384
@@ -14744,7 +14749,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
+12 -12
View File
@@ -1018,7 +1018,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 335.91, y: -507.53912}
m_AnchoredPosition: {x: 335.91, y: -431.53912}
m_SizeDelta: {x: 651.82, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2731969899170380074
@@ -1692,9 +1692,9 @@ RectTransform:
- {fileID: 4504331075840543341}
m_Father: {fileID: 1361524257611413148}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 108.9562, y: -31.05}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 179.9124, y: 68.0217}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8804506040386004496
@@ -4482,9 +4482,9 @@ RectTransform:
- {fileID: 2027606699309904338}
m_Father: {fileID: 1361524257611413148}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 468.781, y: -31.05}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 179.9124, y: 68.0217}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6741821173640675138
@@ -10253,7 +10253,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 335.47, y: -263.3}
m_AnchoredPosition: {x: 335.47, y: -225.3}
m_SizeDelta: {x: 618.94, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5943966890611580968
@@ -11851,7 +11851,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 335.47, y: -530.58997}
m_AnchoredPosition: {x: 335.47, y: -454.59}
m_SizeDelta: {x: 618.94, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9030098628201859511
@@ -13973,9 +13973,9 @@ RectTransform:
- {fileID: 911293677621153352}
m_Father: {fileID: 1361524257611413148}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 288.8686, y: -31.05}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 179.9124, y: 68.0217}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5623009994815814977
+295 -202
View File
@@ -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:
@@ -71,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)
@@ -168,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];
@@ -184,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;
@@ -192,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
}
@@ -342,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();
@@ -354,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)
+12 -4
View File
@@ -797,7 +797,7 @@ namespace BrewMonster
byte byPVPMask = glb_BuildPVPMask(bForceAttack);
Debug.Log($"HoangDev: Cast Skill ID={m_pPrepSkill.GetSkillID()}");
Debug.LogError($"HoangDev: Cast Skill ID={m_pPrepSkill.GetSkillID()}");
// Handle instant skills
if (m_pPrepSkill.IsInstant())
@@ -1172,13 +1172,21 @@ namespace BrewMonster
CECIvtrWeapon pWeapon =
(CECIvtrWeapon)m_pEquipPack.GetItem((int)IndexOfIteminEquipmentInventory.EQUIPIVTR_WEAPON);
if (pWeapon == null || pWeapon.GetCurEndurance() == 0)
if (pWeapon == null || pWeapon.CurEndurance == 0)
{
//BMLogger.LogError(GetName() + " CheckSkillCastCondition: Weapon major type ID = " + Info.weapon);
Info.weapon = 0;
}
else if (!CanUseEquipment(pWeapon, ref iReason))
Info.weapon = (iReason == 5) ? (int)pWeapon.GetDBMajorType().id : 0;
{
Info.weapon = (iReason == 5) ? (int)pWeapon.GetDBMajorType().id : 0; }
else
Info.weapon = (int)pWeapon.GetDBMajorType().id;
{
Info.weapon = (int)pWeapon.GetDBMajorType().id; }
//BMLogger.LogError(GetName() + " CheckSkillCastCondition: Weapon major type ID = " + Info.weapon);
// Get remaining arrow number
CECIvtrArrow pArrow =
(CECIvtrArrow)m_pEquipPack.GetItem((int)IndexOfIteminEquipmentInventory.EQUIPIVTR_PROJECTILE);
+49 -13
View File
@@ -43,9 +43,9 @@ 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;
@@ -410,12 +410,6 @@ namespace BrewMonster
{
pointCam.rotation = Quaternion.identity;
}
#if UNITY_EDITOR
if (Input.GetKeyDown(KeyCode.C))
{
ApplySkillShortcut(1);
}
#endif
// Update cursor based on what's under mouse
EstimateCursor();
@@ -565,6 +559,9 @@ 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;
@@ -605,6 +602,7 @@ namespace BrewMonster
case EC_MsgDef.MSG_HST_JOINTEAM: OnMsgHstJoinTeam(Msg); break;
case EC_MsgDef.MSG_HST_LEAVETEAM: OnMsgHstLeaveTeam(Msg); break;
case EC_MsgDef.MSG_HST_NEWTEAMMEM: OnMsgHstNewTeamMem(Msg); break;
case EC_MsgDef.MSG_HST_TEAMINVITE: OnMsgHstTeamInvite(Msg); break;
case EC_MsgDef.MSG_HST_TEAMMEMBERDATA: OnMsgHstTeamMemberData(Msg); break;
case EC_MsgDef.MSG_PM_DUELOPT: OnMsgHstDuelOpt(Msg); break;
case EC_MsgDef.MSG_HST_CLEARTESSERA: OnMsgHstClearTessera(Msg); break;
@@ -650,6 +648,18 @@ namespace BrewMonster
idOpp = BitConverter.ToInt32(data, 0);
switch (cmdId)
{
case CommandID.DUEL_RECV_REQUEST:
// Duel invite: show accept/reject popup (origin MSG_PM_DUELOPT with command DUEL_RECV_REQUEST = 214)
if (idOpp != 0)
{
CECUIManager.Instance?.ShowMessageBox(
title: "",
message: "You have received a duel request. Do you accept?",
messageBoxType: MessageBoxType.BothYesNoButton,
onClickedYes: () => UnityGameSession.c2s_CmdDuelReply(true, idOpp),
onClickedNo: () => UnityGameSession.c2s_CmdDuelReply(false, idOpp));
}
break;
case CommandID.DUEL_PREPARE:
m_pvp.iDuelState = Duel_state.DUEL_ST_PREPARE;
m_pvp.idDuelOpp = idOpp;
@@ -680,6 +690,32 @@ namespace BrewMonster
}
}
/// <summary>Host received a team invite (MSG_HST_TEAMINVITE). Payload is cmd_team_leader_invite: idLeader, seq, pickFlag. Shows accept/reject message box and sends reply.</summary>
private void OnMsgHstTeamInvite(ECMSG Msg)
{
byte[] data = Msg.dwParam1 as byte[];
int idLeader = 0;
int team_seq = 0;
if (data != null && data.Length >= 8)
{
idLeader = BitConverter.ToInt32(data, 0);
team_seq = BitConverter.ToInt32(data, 4);
}
else if (data != null && data.Length >= 4)
{
idLeader = BitConverter.ToInt32(data, 0);
}
if (idLeader == 0)
return;
int seqCapture = team_seq;
CECUIManager.Instance?.ShowMessageBox(
title: "",
message: "You have received a team invite. Do you accept?",
messageBoxType: MessageBoxType.BothYesNoButton,
onClickedYes: () => UnityGameSession.c2s_CmdTeamAgreeInvite(idLeader, seqCapture),
onClickedNo: () => UnityGameSession.c2s_CmdTeamRejectInvite(idLeader));
}
/// <summary>Called when MSG_PM_PLAYERDUELOPT (229) is received; server may send duel start to both participants. If host is one of the two ids, set duel state.</summary>
public void OnMsgPlayerDuelStart(byte[] data)
{
@@ -1467,10 +1503,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;
+2 -1
View File
@@ -462,13 +462,14 @@ public class CECUIManager : MonoSingleton<CECUIManager>
}
/// <summary>Shows the player options menu for the given character. Requires a prefab with id "DlgPlayerOptions" in DialogScriptTableObject.</summary>
public void ShowPlayerOptionsDialog(int characterId)
public void ShowPlayerOptionsDialog(int characterId, Vector2 position)
{
if (characterId == 0 || canvasDlg == null) return;
var gui = GetInGameUIMan();
if (_dlgPlayerOptions == null)
_dlgPlayerOptions = gui.GetDialog("DlgPlayerOptions");
_dlgPlayerOptions?.ShowForPlayer(characterId);
_dlgPlayerOptions.transform.position = position;
}
/// <summary>
File diff suppressed because one or more lines are too long