ui info hosst player and npc done
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd9dd347b6fd0d0448728c426759cd2e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76408ccdbeb4c654291462fcff24a8c5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,689 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1273460584854605297
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8841982213385894347}
|
||||
- component: {fileID: 1981970930610958667}
|
||||
- component: {fileID: 2949641406655472012}
|
||||
m_Layer: 5
|
||||
m_Name: AvatarNPCFrame
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8841982213385894347
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1273460584854605297}
|
||||
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: 7601428160728630082}
|
||||
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: -160, y: -42}
|
||||
m_SizeDelta: {x: 123, y: 123}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1981970930610958667
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1273460584854605297}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2949641406655472012
|
||||
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: 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: db18cbc4c576c7145862557ebdd51721, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5010991128992349155
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7601428160728630082}
|
||||
- component: {fileID: 9105272519104429228}
|
||||
m_Layer: 5
|
||||
m_Name: HUDNPC
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7601428160728630082
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5010991128992349155}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.8888889, y: 0.8888889, z: 0.8888889}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7183588826468540253}
|
||||
- {fileID: 8841982213385894347}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -50}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &9105272519104429228
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5010991128992349155}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d072871c8791e284dbad61ce13ba6887, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &5230218528339883288
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7183588826468540253}
|
||||
- component: {fileID: 6172505155667263140}
|
||||
- component: {fileID: 3698845693087953935}
|
||||
m_Layer: 5
|
||||
m_Name: InfoNPCFrame
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7183588826468540253
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5230218528339883288}
|
||||
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: 3267022032878559059}
|
||||
- {fileID: 32787377066272636}
|
||||
- {fileID: 1333050478342715942}
|
||||
m_Father: {fileID: 7601428160728630082}
|
||||
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: 22, y: -42.000004}
|
||||
m_SizeDelta: {x: 336, y: 95}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6172505155667263140
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5230218528339883288}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3698845693087953935
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5230218528339883288}
|
||||
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: 82ad58252b552294bafd78600e329adf, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7164650417342813199
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3267022032878559059}
|
||||
- component: {fileID: 3703095907353088660}
|
||||
- component: {fileID: 391766345810538963}
|
||||
m_Layer: 5
|
||||
m_Name: HealthNPCBar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3267022032878559059
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7164650417342813199}
|
||||
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: 6650353791342631994}
|
||||
m_Father: {fileID: 7183588826468540253}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 28.5}
|
||||
m_SizeDelta: {x: 313, y: 21}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3703095907353088660
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7164650417342813199}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &391766345810538963
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7164650417342813199}
|
||||
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: 9ef86922851818c4e9e58040f51c491f, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7483462528009603224
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6650353791342631994}
|
||||
- component: {fileID: 8071545074518398122}
|
||||
- component: {fileID: 8148604647689649493}
|
||||
m_Layer: 5
|
||||
m_Name: HealthText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6650353791342631994
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7483462528009603224}
|
||||
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: 3267022032878559059}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8071545074518398122
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7483462528009603224}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8148604647689649493
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7483462528009603224}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 100%
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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: 22
|
||||
m_fontSizeBase: 22
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8058160227183985436
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 32787377066272636}
|
||||
- component: {fileID: 6237368962895350952}
|
||||
- component: {fileID: 8459104239633154731}
|
||||
m_Layer: 5
|
||||
m_Name: NPCNameText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &32787377066272636
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8058160227183985436}
|
||||
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: 7183588826468540253}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -1.6}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6237368962895350952
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8058160227183985436}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8459104239633154731
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8058160227183985436}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Chu tiem tap hoa
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4278301439
|
||||
m_fontColor: {r: 1, g: 0.6982597, b: 0.0047169924, 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: 23
|
||||
m_fontSizeBase: 23
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8340737021475261245
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1333050478342715942}
|
||||
- component: {fileID: 1511151077524208679}
|
||||
- component: {fileID: 7225922753763360209}
|
||||
m_Layer: 5
|
||||
m_Name: StatText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1333050478342715942
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8340737021475261245}
|
||||
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: 7183588826468540253}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -26}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1511151077524208679
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8340737021475261245}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7225922753763360209
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8340737021475261245}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "Kh\xF4ng"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 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: 20
|
||||
m_fontSizeBase: 20
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 1
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7130d91d43d72c145a379b373c8c27b0
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64cc3f3f3f7aa254c9df21dc1a27b5ed
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -53,7 +53,7 @@ public struct ROLEEXTPROP
|
||||
public ROLEEXTPROP_ATK ak;
|
||||
public ROLEEXTPROP_DEF df;
|
||||
|
||||
int max_ap;
|
||||
public int max_ap;
|
||||
public ROLEEXTPROP(bool initialize = true)
|
||||
{
|
||||
bs = new ROLEEXTPROP_BASE();
|
||||
|
||||
@@ -337,6 +337,7 @@ public class CECNPCMan : IMsgHandler
|
||||
}
|
||||
case CommandID.NPC_INFO_00:
|
||||
{
|
||||
BMLogger.LogError("HoangDev: NPCMAN NPC_INFO_00");
|
||||
var buffer = (byte[])msg.dwParam1;
|
||||
cmd_npc_info_00 pCmd = GPDataTypeHelper.FromBytes<cmd_npc_info_00>(buffer);
|
||||
//cmd_npc_info_00 pCmd = MemoryMarshal.Read<cmd_npc_info_00>(buffer.AsSpan(0, cmd_npc_info_00.));
|
||||
@@ -349,6 +350,7 @@ public class CECNPCMan : IMsgHandler
|
||||
bp.iCurHP = pCmd.iHP;
|
||||
ep.bs.max_hp = pCmd.iMaxHP;
|
||||
pNPC.SetSelectedTarget(pCmd.iTargetID);
|
||||
EventBus.Publish(new NPCINFO(pNPC.GetName(),pCmd.iHP,pCmd.iMaxHP));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,27 +20,28 @@ public abstract class CECPlayer : CECObject
|
||||
[SerializeField] internal INFO m_PlayerInfo;
|
||||
protected GameObject _pPlayerModel;
|
||||
protected float rotationSpeed = 5;
|
||||
internal int m_iMoveMode; // Player's move mode
|
||||
internal int m_iMoveMode; // Player's move mode
|
||||
internal int m_idSelTarget;
|
||||
protected int m_iShape; // Ñ¡ÖÐÄ¿±êµÄID
|
||||
protected uint m_dwStates; // Player's basic states
|
||||
protected uint m_dwStates; // Player's basic states
|
||||
protected uint m_uAttackType;
|
||||
protected int[] m_aEquips;
|
||||
protected ROLEEXTPROP m_ExtProps; // Extend properties
|
||||
protected ROLEEXTPROP m_ExtProps; // Extend properties
|
||||
protected int m_iFashionWeaponType;
|
||||
protected float m_fTouchRad = 0.3f; // Touch radius
|
||||
protected float m_fTouchRad = 0.3f; // Touch radius
|
||||
protected bool m_bWeaponAttached;
|
||||
protected int m_iBattleCamp = Player_camp_in_battle.GP_BATTLE_CAMP_NONE; // Battle this player belongs to
|
||||
byte m_factionPVPMask; // pvp mask
|
||||
protected uint m_dwResFlags; // pvp mask
|
||||
protected bool m_bFight;
|
||||
protected int m_iBattleCamp = Player_camp_in_battle.GP_BATTLE_CAMP_NONE; // Battle this player belongs to
|
||||
byte m_factionPVPMask; // pvp mask
|
||||
protected uint m_dwResFlags; // pvp mask
|
||||
protected ROLEBASICPROP m_BasicProps;
|
||||
public int m_iMoveEnv = Move_environment.MOVEENV_GROUND; // Move environment
|
||||
public int m_iMoveEnv = Move_environment.MOVEENV_GROUND; // Move environment
|
||||
public bool m_bWalkRun;
|
||||
public A3DAABB m_aabbServer = new A3DAABB(); // Óë·þÎñÆ÷±£³ÖÒ»ÖµÄaabb£¬ ²»ÊÜËõ·ÅÓ°Ïì
|
||||
public A3DAABB m_aabb = new A3DAABB(); // Player's aabb£¬ÓÃÓÚÏÔʾµÄaabb£¬ÊÜËõ·ÅÓ°Ïì
|
||||
public int m_iProfession; // Profession
|
||||
public A3DAABB m_aabbServer = new A3DAABB(); // Óë·þÎñÆ÷±£³ÖÒ»ÖµÄaabb£¬ ²»ÊÜËõ·ÅÓ°Ïì
|
||||
public A3DAABB m_aabb = new A3DAABB(); // Player's aabb£¬ÓÃÓÚÏÔʾµÄaabb£¬ÊÜËõ·ÅÓ°Ïì
|
||||
public int m_iProfession; // Profession
|
||||
public float m_fScaleBySkill;
|
||||
public int m_iGender; // Gender
|
||||
public int m_iGender; // Gender
|
||||
protected bool m_bFashionMode;
|
||||
public bool m_bShowWeapon;
|
||||
private QueueActionEvent queueActionEvent;
|
||||
@@ -48,75 +49,75 @@ public abstract class CECPlayer : CECObject
|
||||
protected int NUM_WEAPON_TYPE = 15;
|
||||
public static readonly int[] m_sciStateIDForStateAction = { 117 };
|
||||
|
||||
public MOVECONST m_MoveConst; // Const used when moving control
|
||||
public MOVECONST m_MoveConst; // Const used when moving control
|
||||
|
||||
public MOVECONST[] aMoveConsts = new MOVECONST[PROFESSION.NUM_PROFESSION * GENDER.NUM_GENDER]
|
||||
{
|
||||
// ÎäÏÀ
|
||||
// fStepHei fMinAirHei fMinWaterHei fShoreDepth fWaterSurf
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ·¨Ê¦
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Î×ʦ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Ñý¾«
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÑýÊÞ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.8f, 0.7f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
// ´Ì¿Í
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Óðâ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÓðÁé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ½£Áé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÷ÈÁé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Ò¹Ó°
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÔÂÏÉ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
};
|
||||
{
|
||||
// ÎäÏÀ
|
||||
// fStepHei fMinAirHei fMinWaterHei fShoreDepth fWaterSurf
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ·¨Ê¦
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Î×ʦ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Ñý¾«
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÑýÊÞ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.8f, 0.7f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
// ´Ì¿Í
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Óðâ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÓðÁé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ½£Áé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÷ÈÁé
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// Ò¹Ó°
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
// ÔÂÏÉ
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.6f, 0.6f),
|
||||
new MOVECONST(0.8f, 1.6f, 0.3f, 1.5f, 0.55f),
|
||||
};
|
||||
|
||||
public A3DVECTOR3[] aExts = new A3DVECTOR3[PROFESSION.NUM_PROFESSION * GENDER.NUM_GENDER]
|
||||
{
|
||||
new A3DVECTOR3(0.4f, 0.9f, 0.4f), // ÎäÏÀ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ·¨Ê¦
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Î×ʦ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Ñý¾«
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.5f, 1.05f, 0.5f), // ÑýÊÞ
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ´Ì¿Í
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Óðâ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÓðÁé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ½£Áé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÷ÈÁé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Ò¹Ó°
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÔÂÏÉ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.4f, 0.9f, 0.4f), // ÎäÏÀ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ·¨Ê¦
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Î×ʦ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Ñý¾«
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.5f, 1.05f, 0.5f), // ÑýÊÞ
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ´Ì¿Í
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Óðâ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÓðÁé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ½£Áé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÷ÈÁé
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // Ò¹Ó°
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
new A3DVECTOR3(0.3f, 0.9f, 0.3f), // ÔÂÏÉ
|
||||
new A3DVECTOR3(0.3f, 0.85f, 0.3f),
|
||||
};
|
||||
|
||||
protected void Awake()
|
||||
@@ -126,14 +127,17 @@ public abstract class CECPlayer : CECObject
|
||||
m_aEquips = new int[(int)IndexOfIteminEquipmentInventory.SIZE_ALL_EQUIPIVTR];
|
||||
queueActionEvent = new QueueActionEvent("", null, false, null);
|
||||
}
|
||||
|
||||
public void SetUpPlayer()
|
||||
{
|
||||
m_dwResFlags = 0;
|
||||
}
|
||||
|
||||
public void SetPlayerInfor(INFO playinfo)
|
||||
{
|
||||
m_PlayerInfo = playinfo;
|
||||
}
|
||||
|
||||
public INFO GetPlayInfo()
|
||||
{
|
||||
return m_PlayerInfo;
|
||||
@@ -153,10 +157,20 @@ public abstract class CECPlayer : CECObject
|
||||
BuildActionList();
|
||||
}
|
||||
|
||||
public bool IsDead() { return (m_dwStates & PlayerNPCState.GP_STATE_CORPSE) != 0; }
|
||||
public bool IsDead()
|
||||
{
|
||||
return (m_dwStates & PlayerNPCState.GP_STATE_CORPSE) != 0;
|
||||
}
|
||||
|
||||
public bool IsValidAction(int iIndex) { return (iIndex >= 0 && iIndex < (int)PLAYER_ACTION_TYPE.ACT_MAX) ? true : false; }
|
||||
public int GetCharacterID() { return m_PlayerInfo.cid; }
|
||||
public bool IsValidAction(int iIndex)
|
||||
{
|
||||
return (iIndex >= 0 && iIndex < (int)PLAYER_ACTION_TYPE.ACT_MAX) ? true : false;
|
||||
}
|
||||
|
||||
public int GetCharacterID()
|
||||
{
|
||||
return m_PlayerInfo.cid;
|
||||
}
|
||||
|
||||
|
||||
private static void BuildActionList()
|
||||
@@ -189,7 +203,6 @@ public abstract class CECPlayer : CECObject
|
||||
{
|
||||
if (!actionMap.TryAdd(data.ActionName, data))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -215,20 +228,25 @@ public abstract class CECPlayer : CECObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool PlayAction(int iAction, bool bRestart = true, int iTransTime = 200, bool bQueue = false)
|
||||
{
|
||||
return PlayActionWithConfig(iAction, 0, bRestart, iTransTime, bQueue);
|
||||
}
|
||||
public bool PlayActionWithConfig(int iAction, int actionConfigID, bool bRestart = true, int iTransTime = 200, bool bQueue = false)
|
||||
|
||||
public bool PlayActionWithConfig(int iAction, int actionConfigID, bool bRestart = true, int iTransTime = 200,
|
||||
bool bQueue = false)
|
||||
{
|
||||
if (iAction < 0 || iAction >= (int)PLAYER_ACTION_TYPE.ACT_MAX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (actionConfigID > 0)
|
||||
{
|
||||
DATA_TYPE dt = DATA_TYPE.DT_INVALID;
|
||||
var p = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)actionConfigID, ID_SPACE.ID_SPACE_CONFIG, ref dt);
|
||||
var p = ElementDataManProvider.GetElementDataMan()
|
||||
.get_data_ptr((uint)actionConfigID, ID_SPACE.ID_SPACE_CONFIG, ref dt);
|
||||
if (dt == DATA_TYPE.DT_PLAYER_ACTION_INFO_CONFIG)
|
||||
{
|
||||
PLAYER_ACTION actionConfig;
|
||||
@@ -238,13 +256,14 @@ public abstract class CECPlayer : CECObject
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return PlayActionWithConfig(iAction, m_PlayerActions[iAction], bRestart, iTransTime, bQueue);
|
||||
}
|
||||
|
||||
public bool PlayActionWithConfig(int iAction, in PLAYER_ACTION actionConfig,
|
||||
bool bRestart = true, int iTransTime = 200, bool bQueue = false)
|
||||
bool bRestart = true, int iTransTime = 200, bool bQueue = false)
|
||||
{
|
||||
PLAYER_ACTION action = actionConfig;
|
||||
|
||||
@@ -252,154 +271,162 @@ public abstract class CECPlayer : CECObject
|
||||
EventBus.PublishChannel(m_PlayerInfo.cid, new PlayActionEvent(szAct));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void Dispose()
|
||||
{
|
||||
_default_actions = null;
|
||||
_turning_actions = null;
|
||||
}
|
||||
|
||||
public struct PLAYER_ACTION
|
||||
{
|
||||
public PLAYER_ACTION_TYPE type;
|
||||
public PLAYER_ACTION_INFO_CONFIG data;
|
||||
};
|
||||
public INFO GetPlayerInfo() { return m_PlayerInfo; }
|
||||
|
||||
public INFO GetPlayerInfo()
|
||||
{
|
||||
return m_PlayerInfo;
|
||||
}
|
||||
|
||||
public enum PLAYER_ACTION_TYPE
|
||||
{
|
||||
// 0
|
||||
ACT_STAND = 0, // Đứng
|
||||
ACT_FIGHTSTAND, // Đứng chiến đấu
|
||||
ACT_WALK, // Đi bộ
|
||||
ACT_RUN, // Chạy
|
||||
ACT_JUMP_START, // Bắt đầu nhảy
|
||||
ACT_STAND = 0, // Đứng
|
||||
ACT_FIGHTSTAND, // Đứng chiến đấu
|
||||
ACT_WALK, // Đi bộ
|
||||
ACT_RUN, // Chạy
|
||||
ACT_JUMP_START, // Bắt đầu nhảy
|
||||
|
||||
// 5
|
||||
ACT_JUMP_LOOP, // Nhảy trên không lặp lại
|
||||
ACT_JUMP_LAND, // Nhảy tiếp đất
|
||||
ACT_SWIM, // Bơi
|
||||
ACT_HANGINWATER, // Lơ lửng trong nước
|
||||
ACT_TAKEOFF, // Cất cánh (should be ACT_TAKEOFF_WING)
|
||||
ACT_JUMP_LOOP, // Nhảy trên không lặp lại
|
||||
ACT_JUMP_LAND, // Nhảy tiếp đất
|
||||
ACT_SWIM, // Bơi
|
||||
ACT_HANGINWATER, // Lơ lửng trong nước
|
||||
ACT_TAKEOFF, // Cất cánh (should be ACT_TAKEOFF_WING)
|
||||
|
||||
// 10
|
||||
ACT_HANGINAIR, // Treo trên không (should be ACT_HANGINAIR_WING)
|
||||
ACT_FLY, // Bay (should be ACT_FLY_WING)
|
||||
ACT_FLYDOWN, // Bay xuống cao (should be ACT_FLYDOWN_WING_HIGH)
|
||||
ACT_FLYDOWN_WING_LOW, // Bay xuống thấp (should be ACT_FLYDOWN_WING_LOW)
|
||||
ACT_LANDON, // Hạ cánh (should be ACT_LAND_WING)
|
||||
ACT_HANGINAIR, // Treo trên không (should be ACT_HANGINAIR_WING)
|
||||
ACT_FLY, // Bay (should be ACT_FLY_WING)
|
||||
ACT_FLYDOWN, // Bay xuống cao (should be ACT_FLYDOWN_WING_HIGH)
|
||||
ACT_FLYDOWN_WING_LOW, // Bay xuống thấp (should be ACT_FLYDOWN_WING_LOW)
|
||||
ACT_LANDON, // Hạ cánh (should be ACT_LAND_WING)
|
||||
|
||||
// 15
|
||||
ACT_TAKEOFF_SWORD, // Kiếm bay - cất cánh
|
||||
ACT_HANGINAIR_SWORD, // Kiếm bay - treo không trung
|
||||
ACT_FLY_SWORD, // Kiếm bay - tiến tới
|
||||
ACT_FLYDOWN_SWORD_HIGH, // Kiếm bay - rơi cao
|
||||
ACT_FLYDOWN_SWORD_LOW, // Kiếm bay - rơi thấp
|
||||
ACT_TAKEOFF_SWORD, // Kiếm bay - cất cánh
|
||||
ACT_HANGINAIR_SWORD, // Kiếm bay - treo không trung
|
||||
ACT_FLY_SWORD, // Kiếm bay - tiến tới
|
||||
ACT_FLYDOWN_SWORD_HIGH, // Kiếm bay - rơi cao
|
||||
ACT_FLYDOWN_SWORD_LOW, // Kiếm bay - rơi thấp
|
||||
|
||||
// 20
|
||||
ACT_LANDON_SWORD, // Kiếm bay - hạ cánh
|
||||
ACT_SITDOWN, // Ngồi
|
||||
ACT_SITDOWN_LOOP, // Ngồi lặp lại
|
||||
ACT_STANDUP, // Đứng dậy
|
||||
ACT_WOUNDED, // Bị thương
|
||||
ACT_LANDON_SWORD, // Kiếm bay - hạ cánh
|
||||
ACT_SITDOWN, // Ngồi
|
||||
ACT_SITDOWN_LOOP, // Ngồi lặp lại
|
||||
ACT_STANDUP, // Đứng dậy
|
||||
ACT_WOUNDED, // Bị thương
|
||||
|
||||
// 25
|
||||
ACT_GROUNDDIE, // Chết trên mặt đất
|
||||
ACT_GROUNDDIE_LOOP, // Chết trên đất (loop)
|
||||
ACT_WATERDIE, // Chết trong nước
|
||||
ACT_WATERDIE_LOOP, // Chết trong nước (loop)
|
||||
ACT_AIRDIE_ST, // Chết trên không (bắt đầu)
|
||||
ACT_GROUNDDIE, // Chết trên mặt đất
|
||||
ACT_GROUNDDIE_LOOP, // Chết trên đất (loop)
|
||||
ACT_WATERDIE, // Chết trong nước
|
||||
ACT_WATERDIE_LOOP, // Chết trong nước (loop)
|
||||
ACT_AIRDIE_ST, // Chết trên không (bắt đầu)
|
||||
|
||||
// 30
|
||||
ACT_AIRDIE, // Chết trên không (loop rơi)
|
||||
ACT_AIRDIE_ED, // Chết trên không (chạm đất)
|
||||
ACT_AIRDIE_LAND_LOOP, // Chết rơi đất (loop)
|
||||
ACT_REVIVE, // Hồi sinh
|
||||
ACT_CUSTOMIZE, // Động tác tùy chỉnh
|
||||
ACT_AIRDIE, // Chết trên không (loop rơi)
|
||||
ACT_AIRDIE_ED, // Chết trên không (chạm đất)
|
||||
ACT_AIRDIE_LAND_LOOP, // Chết rơi đất (loop)
|
||||
ACT_REVIVE, // Hồi sinh
|
||||
ACT_CUSTOMIZE, // Động tác tùy chỉnh
|
||||
|
||||
// 35
|
||||
ACT_STRIKEBACK, // Bị đánh lùi
|
||||
ACT_STRIKEDOWN, // Bị đánh ngã
|
||||
ACT_STRIKEDOWN_LOOP, // Bị đánh ngã (loop)
|
||||
ACT_STRIKEDOWN_STANDUP, // Bị đánh ngã rồi đứng dậy
|
||||
ACT_PICKUP, // Nhặt đồ
|
||||
ACT_STRIKEBACK, // Bị đánh lùi
|
||||
ACT_STRIKEDOWN, // Bị đánh ngã
|
||||
ACT_STRIKEDOWN_LOOP, // Bị đánh ngã (loop)
|
||||
ACT_STRIKEDOWN_STANDUP, // Bị đánh ngã rồi đứng dậy
|
||||
ACT_PICKUP, // Nhặt đồ
|
||||
|
||||
// 40
|
||||
ACT_PICKUP_LOOP, // Nhặt đồ (loop)
|
||||
ACT_PICKUP_STANDUP, // Nhặt đồ đứng dậy
|
||||
ACT_PICKUP_MATTER, // Nhặt vật thể
|
||||
ACT_GAPE, // Há miệng
|
||||
ACT_LOOKAROUND, // Nhìn quanh
|
||||
ACT_PICKUP_LOOP, // Nhặt đồ (loop)
|
||||
ACT_PICKUP_STANDUP, // Nhặt đồ đứng dậy
|
||||
ACT_PICKUP_MATTER, // Nhặt vật thể
|
||||
ACT_GAPE, // Há miệng
|
||||
ACT_LOOKAROUND, // Nhìn quanh
|
||||
|
||||
// 45
|
||||
ACT_PLAYWEAPON, // Vung vũ khí
|
||||
ACT_EXP_WAVE, // Vẫy tay
|
||||
ACT_EXP_NOD, // Gật đầu
|
||||
ACT_EXP_SHAKEHEAD, // Lắc đầu
|
||||
ACT_EXP_SHRUG, // Nhún vai
|
||||
ACT_PLAYWEAPON, // Vung vũ khí
|
||||
ACT_EXP_WAVE, // Vẫy tay
|
||||
ACT_EXP_NOD, // Gật đầu
|
||||
ACT_EXP_SHAKEHEAD, // Lắc đầu
|
||||
ACT_EXP_SHRUG, // Nhún vai
|
||||
|
||||
// 50
|
||||
ACT_EXP_LAUGH, // Cười lớn
|
||||
ACT_EXP_ANGRY, // Tức giận
|
||||
ACT_EXP_STUN, // Choáng
|
||||
ACT_EXP_DEPRESSED, // Buồn bã
|
||||
ACT_EXP_KISSHAND, // Hôn tay
|
||||
ACT_EXP_LAUGH, // Cười lớn
|
||||
ACT_EXP_ANGRY, // Tức giận
|
||||
ACT_EXP_STUN, // Choáng
|
||||
ACT_EXP_DEPRESSED, // Buồn bã
|
||||
ACT_EXP_KISSHAND, // Hôn tay
|
||||
|
||||
// 55
|
||||
ACT_EXP_SHY, // Ngại ngùng
|
||||
ACT_EXP_SALUTE, // Chào
|
||||
ACT_EXP_SITDOWN, // Ngồi xuống
|
||||
ACT_EXP_SITDOWN_LOOP, // Ngồi xuống (loop)
|
||||
ACT_EXP_SITDOWN_STANDUP, // Ngồi xuống rồi đứng dậy
|
||||
ACT_EXP_SHY, // Ngại ngùng
|
||||
ACT_EXP_SALUTE, // Chào
|
||||
ACT_EXP_SITDOWN, // Ngồi xuống
|
||||
ACT_EXP_SITDOWN_LOOP, // Ngồi xuống (loop)
|
||||
ACT_EXP_SITDOWN_STANDUP, // Ngồi xuống rồi đứng dậy
|
||||
|
||||
// 60
|
||||
ACT_EXP_ASSAULT, // Tấn công
|
||||
ACT_EXP_THINK, // Suy nghĩ
|
||||
ACT_EXP_DEFIANCE, // Thách thức
|
||||
ACT_EXP_VICTORY, // Chiến thắng
|
||||
ACT_EXP_KISS, // Hôn
|
||||
ACT_EXP_ASSAULT, // Tấn công
|
||||
ACT_EXP_THINK, // Suy nghĩ
|
||||
ACT_EXP_DEFIANCE, // Thách thức
|
||||
ACT_EXP_VICTORY, // Chiến thắng
|
||||
ACT_EXP_KISS, // Hôn
|
||||
|
||||
// 65
|
||||
ACT_EXP_KISS_LOOP, // Hôn (loop)
|
||||
ACT_EXP_KISS_END, // Kết thúc hôn
|
||||
ACT_ATTACK_1, // Tấn công 1
|
||||
ACT_ATTACK_2, // Tấn công 2
|
||||
ACT_ATTACK_3, // Tấn công 3
|
||||
ACT_EXP_KISS_LOOP, // Hôn (loop)
|
||||
ACT_EXP_KISS_END, // Kết thúc hôn
|
||||
ACT_ATTACK_1, // Tấn công 1
|
||||
ACT_ATTACK_2, // Tấn công 2
|
||||
ACT_ATTACK_3, // Tấn công 3
|
||||
|
||||
// 70
|
||||
ACT_ATTACK_4, // Tấn công 4
|
||||
ACT_ATTACK_TOSS, // Ném vũ khí
|
||||
ACT_TRICK_RUN, // Chiêu khi chạy
|
||||
ACT_TRICK_JUMP, // Chiêu khi nhảy
|
||||
ACT_FLY_GLIDE, // Lượn
|
||||
ACT_ATTACK_4, // Tấn công 4
|
||||
ACT_ATTACK_TOSS, // Ném vũ khí
|
||||
ACT_TRICK_RUN, // Chiêu khi chạy
|
||||
ACT_TRICK_JUMP, // Chiêu khi nhảy
|
||||
ACT_FLY_GLIDE, // Lượn
|
||||
|
||||
// 75
|
||||
ACT_FLY_GLIDE_SWORD, // Kiếm bay - lượn
|
||||
ACT_EXP_FIGHT, // Tư thế chiến đấu
|
||||
ACT_EXP_ATTACK1, // Tấn công diễn xuất 1
|
||||
ACT_EXP_ATTACK2, // Tấn công diễn xuất 2
|
||||
ACT_EXP_ATTACK3, // Tấn công diễn xuất 3
|
||||
ACT_FLY_GLIDE_SWORD, // Kiếm bay - lượn
|
||||
ACT_EXP_FIGHT, // Tư thế chiến đấu
|
||||
ACT_EXP_ATTACK1, // Tấn công diễn xuất 1
|
||||
ACT_EXP_ATTACK2, // Tấn công diễn xuất 2
|
||||
ACT_EXP_ATTACK3, // Tấn công diễn xuất 3
|
||||
|
||||
// 80
|
||||
ACT_EXP_ATTACK4, // Tấn công diễn xuất 4
|
||||
ACT_EXP_DEFENCE, // Phòng thủ
|
||||
ACT_EXP_FALL, // Té ngã
|
||||
ACT_EXP_FALLONGROUND, // Ngã xuống đất
|
||||
ACT_EXP_LOOKAROUND, // Nhìn quanh
|
||||
ACT_EXP_ATTACK4, // Tấn công diễn xuất 4
|
||||
ACT_EXP_DEFENCE, // Phòng thủ
|
||||
ACT_EXP_FALL, // Té ngã
|
||||
ACT_EXP_FALLONGROUND, // Ngã xuống đất
|
||||
ACT_EXP_LOOKAROUND, // Nhìn quanh
|
||||
|
||||
// 85
|
||||
ACT_EXP_DANCE, // Nhảy múa
|
||||
ACT_EXP_FASHIONWEAPON, // Động tác vũ khí thời trang
|
||||
ACT_USEITEM, // Dùng item
|
||||
ACT_USEITMELOOP, // Dùng item (loop)
|
||||
ACT_TWO_KISS, // Hôn đôi
|
||||
ACT_EXP_DANCE, // Nhảy múa
|
||||
ACT_EXP_FASHIONWEAPON, // Động tác vũ khí thời trang
|
||||
ACT_USEITEM, // Dùng item
|
||||
ACT_USEITMELOOP, // Dùng item (loop)
|
||||
ACT_TWO_KISS, // Hôn đôi
|
||||
|
||||
// 90
|
||||
ACT_USING_TARGET_ITEM, // Dùng đạo cụ
|
||||
ACT_SWIM_FOR_MOVESKILL, // Bơi trong lúc dùng skill di chuyển
|
||||
ACT_USING_TARGET_ITEM, // Dùng đạo cụ
|
||||
ACT_SWIM_FOR_MOVESKILL, // Bơi trong lúc dùng skill di chuyển
|
||||
|
||||
ACT_MAX,
|
||||
ACT_CASTSKILL // Chỉ là placeholder cho skill actions
|
||||
ACT_CASTSKILL // Chỉ là placeholder cho skill actions
|
||||
}
|
||||
|
||||
public void PlayAttackEffect(int idTarget, int idSkill, int skillLevel, int nDamage,
|
||||
uint dwModifier, int nAttackSpeed, ref int piAttackTime , int nSection = 0)
|
||||
uint dwModifier, int nAttackSpeed, ref int piAttackTime, int nSection = 0)
|
||||
{
|
||||
if (!IsAllResReady())
|
||||
return;
|
||||
@@ -413,7 +440,8 @@ public abstract class CECPlayer : CECObject
|
||||
{
|
||||
// ¿´¿´ÊDz»ÊÇÔ¶³ÌÎäÆ÷
|
||||
DATA_TYPE dt = default;
|
||||
WEAPON_ESSENCE? pWeapon = (WEAPON_ESSENCE)ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)idWeapon, ID_SPACE.ID_SPACE_ESSENCE, ref dt);
|
||||
WEAPON_ESSENCE? pWeapon = (WEAPON_ESSENCE)ElementDataManProvider.GetElementDataMan()
|
||||
.get_data_ptr((uint)idWeapon, ID_SPACE.ID_SPACE_ESSENCE, ref dt);
|
||||
|
||||
if (dt == DATA_TYPE.DT_WEAPON_ESSENCE && pWeapon != null && pWeapon.Value.require_projectile != 0)
|
||||
{
|
||||
@@ -437,9 +465,9 @@ public abstract class CECPlayer : CECObject
|
||||
if (pAttack != null)
|
||||
{
|
||||
if (!IsDead() && (dwModifier & (uint)MOD.MOD_RETORT) == 0
|
||||
&& (dwModifier & (uint)MOD.MOD_ATTACK_AURA) == 0
|
||||
&& PlayAttackAction(nAttackSpeed, ref piAttackTime, pAttack)
|
||||
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
||||
&& (dwModifier & (uint)MOD.MOD_ATTACK_AURA) == 0
|
||||
&& PlayAttackAction(nAttackSpeed, ref piAttackTime, pAttack)
|
||||
&& (dwModifier & (uint)MOD.MOD_BEAT_BACK) == 0)
|
||||
{
|
||||
}
|
||||
else
|
||||
@@ -515,14 +543,17 @@ public abstract class CECPlayer : CECObject
|
||||
{
|
||||
EventBus.PublishChannel(m_PlayerInfo.cid, new CleearComActFlagAllRankNodesEvent(v));
|
||||
}
|
||||
|
||||
public struct CleearComActFlagAllRankNodesEvent
|
||||
{
|
||||
public bool v;
|
||||
|
||||
public CleearComActFlagAllRankNodesEvent(bool value)
|
||||
{
|
||||
v = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PlayAttackAction(int nAttackSpeed, ref int attackTime, CECAttackEvent attackEvent)
|
||||
{
|
||||
//attackTime = 0;
|
||||
@@ -648,28 +679,33 @@ public abstract class CECPlayer : CECObject
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetApplyDamage(bool isApplyDamage, CECAttackEvent cECAttackEvent)
|
||||
{
|
||||
cECAttackEvent.m_bSignaled = isApplyDamage;
|
||||
}
|
||||
|
||||
public void ShowWeaponByConfig(PLAYER_ACTION_INFO_CONFIG p)
|
||||
{
|
||||
m_bShowWeapon = p.hide_weapon != 0 ? false : true;
|
||||
//ShowWeapon(m_bShowWeapon);
|
||||
}
|
||||
|
||||
public int GetShowingWeaponType()
|
||||
{
|
||||
int weapon_type = 0;
|
||||
if (CanShowFashionWeapon((int)m_uAttackType, m_iFashionWeaponType) && m_aEquips[(int)IndexOfIteminEquipmentInventory.EQUIPIVTR_FASHION_WEAPON] != 0)
|
||||
if (CanShowFashionWeapon((int)m_uAttackType, m_iFashionWeaponType) &&
|
||||
m_aEquips[(int)IndexOfIteminEquipmentInventory.EQUIPIVTR_FASHION_WEAPON] != 0)
|
||||
{
|
||||
weapon_type = (m_iFashionWeaponType == DEFAULT_ACTION_TYPE || !IsWeaponAttached()) ?
|
||||
10 : m_iFashionWeaponType;
|
||||
weapon_type = (m_iFashionWeaponType == DEFAULT_ACTION_TYPE || !IsWeaponAttached())
|
||||
? 10
|
||||
: m_iFashionWeaponType;
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon_type = (m_uAttackType == DEFAULT_ACTION_TYPE || !IsWeaponAttached()) ?
|
||||
10 : (int)m_uAttackType;
|
||||
weapon_type = (m_uAttackType == DEFAULT_ACTION_TYPE || !IsWeaponAttached()) ? 10 : (int)m_uAttackType;
|
||||
}
|
||||
|
||||
return weapon_type;
|
||||
}
|
||||
|
||||
@@ -677,11 +713,17 @@ public abstract class CECPlayer : CECObject
|
||||
{
|
||||
return m_bWeaponAttached;
|
||||
}
|
||||
public bool InFashionMode() { return m_bFashionMode; }
|
||||
|
||||
public bool InFashionMode()
|
||||
{
|
||||
return m_bFashionMode;
|
||||
}
|
||||
|
||||
public bool CanShowFashionWeapon(int weapon_type, int fashion_weapon_type)
|
||||
{
|
||||
return IsFashionWeaponTypeFit(weapon_type, fashion_weapon_type) && InFashionMode();
|
||||
}
|
||||
|
||||
public bool IsFashionWeaponTypeFit(int weapon_type, int fashion_weapon_type)
|
||||
{
|
||||
if (fashion_weapon_type < 0 || fashion_weapon_type >= NUM_WEAPON_TYPE) return false;
|
||||
@@ -691,9 +733,11 @@ public abstract class CECPlayer : CECObject
|
||||
BMLogger.LogError("CECPlayer::GetFashionConfig, Failed to load fashion weapon config");
|
||||
return false;
|
||||
}
|
||||
|
||||
int fashion_weapon_mask = (int)pConfig.Value.action_mask[fashion_weapon_type];
|
||||
return (fashion_weapon_mask & (1 << GetWeaponType(weapon_type))) != 0;
|
||||
}
|
||||
|
||||
public FASHION_WEAPON_CONFIG GetFashionConfig()
|
||||
{
|
||||
FASHION_WEAPON_CONFIG? pFashionConfig = null;
|
||||
@@ -705,16 +749,30 @@ public abstract class CECPlayer : CECObject
|
||||
|
||||
if (tid != 0)
|
||||
{
|
||||
pFashionConfig = (FASHION_WEAPON_CONFIG)pDataMan.get_data_ptr(tid, ID_SPACE.ID_SPACE_CONFIG, ref DataType);
|
||||
pFashionConfig =
|
||||
(FASHION_WEAPON_CONFIG)pDataMan.get_data_ptr(tid, ID_SPACE.ID_SPACE_CONFIG, ref DataType);
|
||||
BMLogger.LogError($"HoangDev : get_data_ptr {pFashionConfig.GetType()}");
|
||||
}
|
||||
}
|
||||
|
||||
return pFashionConfig.Value;
|
||||
}
|
||||
public int GetSelectedTarget() { return m_idSelTarget; }
|
||||
public float GetTouchRadius() { return m_fTouchRad; }
|
||||
|
||||
public int GetSelectedTarget()
|
||||
{
|
||||
return m_idSelTarget;
|
||||
}
|
||||
|
||||
public float GetTouchRadius()
|
||||
{
|
||||
return m_fTouchRad;
|
||||
}
|
||||
|
||||
// Is player in battle
|
||||
public bool IsInBattle() { return m_iBattleCamp != Player_camp_in_battle.GP_BATTLE_CAMP_NONE; }
|
||||
public bool IsInBattle()
|
||||
{
|
||||
return m_iBattleCamp != Player_camp_in_battle.GP_BATTLE_CAMP_NONE;
|
||||
}
|
||||
|
||||
// Check whether specified npc in a same battle camp
|
||||
public bool InSameBattleCamp(CECNPC pNPC)
|
||||
@@ -726,14 +784,24 @@ public abstract class CECPlayer : CECObject
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public const uint DEFAULT_ACTION_TYPE = 0xFFFFFFFF;
|
||||
public static int GetWeaponType(int iWeaponType) { return iWeaponType == DEFAULT_ACTION_TYPE ? 10 : iWeaponType; }
|
||||
|
||||
public static int GetWeaponType(int iWeaponType)
|
||||
{
|
||||
return iWeaponType == DEFAULT_ACTION_TYPE ? 10 : iWeaponType;
|
||||
}
|
||||
|
||||
public bool IsInFactionPVP() => (m_factionPVPMask & 0x01) != 0;
|
||||
public bool CanAttackFactionPVPMineCar() => (m_factionPVPMask & 0x02) != 0;
|
||||
public bool CanAttackFactionPVPMineBase() => (m_factionPVPMask & 0x04) != 0;
|
||||
|
||||
// Get basic properties
|
||||
public ROLEBASICPROP GetBasicProps() { return m_BasicProps; }
|
||||
public ROLEBASICPROP GetBasicProps()
|
||||
{
|
||||
return m_BasicProps;
|
||||
}
|
||||
|
||||
public override void TurnFaceTo(int idTarget, float dwTime = 200)
|
||||
{
|
||||
if (idTarget != 0)
|
||||
@@ -742,17 +810,21 @@ public abstract class CECPlayer : CECObject
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsWorkMoveRunning() /*&& !IsPlayingCastingSkillAndMoveActions()*/)
|
||||
{ // ÒÆ¶¯Ê±Ò»°ãÓ¦ÃæÏòÒÆ¶¯·½Ïò¡¢Ö»ÔÚÒÆ¶¯Ê©·¨ÖвÅתÏò
|
||||
{
|
||||
// ÒÆ¶¯Ê±Ò»°ãÓ¦ÃæÏòÒÆ¶¯·½Ïò¡¢Ö»ÔÚÒÆ¶¯Ê©·¨ÖвÅתÏò
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var target = EC_ManMessageMono.Instance?.GetObject(idTarget, 0)?.gameObject.transform;
|
||||
if (target == null)
|
||||
{
|
||||
BMLogger.LogError("HoangDev: ko có transform ");
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 direction = (target.position - transform.position).normalized;
|
||||
direction.y = 0f;
|
||||
int turnSpeed = 5;
|
||||
@@ -769,10 +841,12 @@ public abstract class CECPlayer : CECObject
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsWorkMoveRunning()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* public bool IsPlayingCastingSkillAndMoveActions()
|
||||
{
|
||||
return IsPlayingCastingSkillAction() && IsPlayingMoveAction();
|
||||
@@ -849,6 +923,7 @@ public abstract class CECPlayer : CECObject
|
||||
|
||||
return iAction;
|
||||
}
|
||||
|
||||
public void Damaged(int nDamage, uint dwModifier = 0, int skill = 0)
|
||||
{
|
||||
BMLogger.LogError($"HoangDev: Damaged nDamage={nDamage} ");
|
||||
@@ -893,7 +968,7 @@ public abstract class CECPlayer : CECObject
|
||||
PlayAction((int)PLAYER_ACTION_TYPE.ACT_WOUNDED);
|
||||
|
||||
DamageTextManager.Instance.ShowDamageText(
|
||||
transform.position,nDamage, Color.yellow, 1.0f);
|
||||
transform.position, nDamage, Color.yellow, 1.0f);
|
||||
/* if (dwModifier & CECAttackEvent::MOD_IMMUNE)
|
||||
BubbleText(BUBBLE_IMMUNE, 0);
|
||||
else if (dwModifier & CECAttackEvent::MOD_REBOUND)
|
||||
@@ -911,6 +986,7 @@ public abstract class CECPlayer : CECObject
|
||||
BubbleText(BUBBLE_HITMISSED, 0);*/
|
||||
}
|
||||
}
|
||||
|
||||
public bool OnDamaged(int skill)
|
||||
{
|
||||
var atkMan = CECAttacksMan.Instance;
|
||||
@@ -930,6 +1006,7 @@ public abstract class CECPlayer : CECObject
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetSkillStateActionName(int skill, int state, string name1, string name2)
|
||||
{
|
||||
/* for (int i = 0; i < (int)m_SkillStateActionVec.size(); i++)
|
||||
@@ -951,15 +1028,32 @@ public abstract class CECPlayer : CECObject
|
||||
}
|
||||
|
||||
// Get move environment
|
||||
public int GetMoveEnv() { return m_iMoveEnv; }
|
||||
public bool IsShapeChanged() { return m_iShape != 0; }
|
||||
public int GetWeaponID() { return m_aEquips[(int)IndexOfIteminEquipmentInventory.EQUIPIVTR_WEAPON] & 0xffff; }
|
||||
public bool IsAllResReady() { return (m_dwResFlags & (uint)PlayerResourcesReadyFlag.RESFG_ALL) == (uint)PlayerResourcesReadyFlag.RESFG_ALL; }
|
||||
public int GetMoveEnv()
|
||||
{
|
||||
return m_iMoveEnv;
|
||||
}
|
||||
|
||||
public bool IsShapeChanged()
|
||||
{
|
||||
return m_iShape != 0;
|
||||
}
|
||||
|
||||
public int GetWeaponID()
|
||||
{
|
||||
return m_aEquips[(int)IndexOfIteminEquipmentInventory.EQUIPIVTR_WEAPON] & 0xffff;
|
||||
}
|
||||
|
||||
public bool IsAllResReady()
|
||||
{
|
||||
return (m_dwResFlags & (uint)PlayerResourcesReadyFlag.RESFG_ALL) == (uint)PlayerResourcesReadyFlag.RESFG_ALL;
|
||||
}
|
||||
// Get character ID
|
||||
}
|
||||
|
||||
public struct PlayActionEvent
|
||||
{
|
||||
public string AnimationName;
|
||||
|
||||
public PlayActionEvent(string animationName)
|
||||
{
|
||||
this.AnimationName = animationName;
|
||||
@@ -972,14 +1066,18 @@ public class QueueActionEvent
|
||||
public Action<bool, CECAttackEvent> SetFlag;
|
||||
public CECAttackEvent AttackEvent;
|
||||
public bool IsHitAnim;
|
||||
public QueueActionEvent(string animationName, Action<bool, CECAttackEvent> setFlag, bool isHitAnim, CECAttackEvent attackEvent)
|
||||
|
||||
public QueueActionEvent(string animationName, Action<bool, CECAttackEvent> setFlag, bool isHitAnim,
|
||||
CECAttackEvent attackEvent)
|
||||
{
|
||||
this.AnimationName = animationName;
|
||||
SetFlag = setFlag;
|
||||
IsHitAnim = isHitAnim;
|
||||
AttackEvent = attackEvent;
|
||||
}
|
||||
public void SetData(string animationName, Action<bool, CECAttackEvent> setFlag, bool isHitAnim, CECAttackEvent attackEvent)
|
||||
|
||||
public void SetData(string animationName, Action<bool, CECAttackEvent> setFlag, bool isHitAnim,
|
||||
CECAttackEvent attackEvent)
|
||||
{
|
||||
this.AnimationName = animationName;
|
||||
SetFlag = setFlag;
|
||||
@@ -987,12 +1085,14 @@ public class QueueActionEvent
|
||||
AttackEvent = attackEvent;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct INFO
|
||||
{
|
||||
public int cid; // Character ID
|
||||
public int crc_c; // customized data crc
|
||||
public int crc_e; // Equipment data crc
|
||||
public int cid; // Character ID
|
||||
public int crc_c; // customized data crc
|
||||
public int crc_e; // Equipment data crc
|
||||
|
||||
public INFO(int cid, int crc_c, int crc_)
|
||||
{
|
||||
this.cid = cid;
|
||||
@@ -1000,6 +1100,7 @@ public struct INFO
|
||||
this.crc_e = crc_;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PlayerResourcesReadyFlag
|
||||
|
||||
{
|
||||
@@ -1009,12 +1110,13 @@ public enum PlayerResourcesReadyFlag
|
||||
RESFG_ASSEMBLED = 0x08,
|
||||
RESFG_ALL = 0x0f,
|
||||
};
|
||||
public static class Duel_state // Duel state
|
||||
|
||||
public static class Duel_state // Duel state
|
||||
{
|
||||
public const int DUEL_ST_NONE = 0,
|
||||
DUEL_ST_PREPARE = 1,
|
||||
DUEL_ST_INDUEL = 2,
|
||||
DUEL_ST_STOPPING = 3;
|
||||
DUEL_ST_PREPARE = 1,
|
||||
DUEL_ST_INDUEL = 2,
|
||||
DUEL_ST_STOPPING = 3;
|
||||
}
|
||||
|
||||
//// Move mode
|
||||
|
||||
@@ -61,6 +61,11 @@ public class CECNPC : CECObject
|
||||
m_vServerPos = new Vector3();
|
||||
m_iCID = (int)Class_ID.OCID_NPC;
|
||||
}
|
||||
|
||||
public string GetName()
|
||||
{
|
||||
return m_strName;
|
||||
}
|
||||
public virtual bool Init(int tid, in info_npc info, ReadOnlySpan<byte> packet, int infoOffset)
|
||||
{
|
||||
m_NPCInfo.nid = info.nid;
|
||||
|
||||
@@ -771,6 +771,21 @@ namespace CSNetwork.GPDataType
|
||||
|
||||
//TO DO: Check Valid
|
||||
}
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_self_info_00
|
||||
{
|
||||
public short sLevel;
|
||||
public byte State;
|
||||
public byte Level2;
|
||||
public int iHP;
|
||||
public int iMaxHP;
|
||||
public int iMP;
|
||||
public int iMaxMP;
|
||||
public int iExp;
|
||||
public int iSP;
|
||||
public int iAP;
|
||||
public int iMaxAP;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct info_player_1
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace CSNetwork
|
||||
{
|
||||
public class GameSession : IDisposable
|
||||
{
|
||||
private static IPrefixedLogger _logger = LoggerFactory.GetLogger(nameof(GameSession)); // Get class-specific logger
|
||||
private static IPrefixedLogger
|
||||
_logger = LoggerFactory.GetLogger(nameof(GameSession)); // Get class-specific logger
|
||||
|
||||
private NetworkManager _networkManager;
|
||||
private string _host;
|
||||
@@ -31,8 +32,10 @@ namespace CSNetwork
|
||||
private string _password;
|
||||
private int _currentUserId = -1; // To store the UserID after successful login
|
||||
private int m_iCharID;
|
||||
private int m_idLastSelTarget = 0; // ID of selected item last time
|
||||
private int m_idLastSelTarget = 0; // ID of selected item last time
|
||||
|
||||
CECStringTab m_ErrorMsgs;
|
||||
|
||||
// State management for async operations and callbacks
|
||||
private Action<bool> _loginCallback;
|
||||
private Action<List<RoleInfo>> _roleListCallback;
|
||||
@@ -41,6 +44,16 @@ namespace CSNetwork
|
||||
private RoleInfo _selectedRole;
|
||||
public bool IsConnected => _networkManager?.IsConnected ?? false;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public bool isDebug;
|
||||
public bool IsDebug
|
||||
{
|
||||
get => isDebug;
|
||||
set => isDebug = value;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
public GameSession()
|
||||
{
|
||||
_networkManager = new NetworkManager();
|
||||
@@ -55,6 +68,7 @@ namespace CSNetwork
|
||||
_logger = LoggerFactory.GetCustomLogger(path, nameof(GameSession) + GetHashCode(), LoggerType.File);
|
||||
_networkManager.SetLogPath(path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connects to the game server asynchronously.
|
||||
/// </summary>
|
||||
@@ -68,6 +82,7 @@ namespace CSNetwork
|
||||
_logger.Log(LogType.Warning, "ConnectAsync called but already connected.");
|
||||
return;
|
||||
}
|
||||
|
||||
_host = host;
|
||||
_port = port;
|
||||
_logger.Log(LogType.Info, $"Attempting to connect to {_host}:{_port}...");
|
||||
@@ -80,7 +95,8 @@ namespace CSNetwork
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Log(LogType.Warning, "Connection failed after ConnectAsync completed (check NetworkManager logs/events).");
|
||||
_logger.Log(LogType.Warning,
|
||||
"Connection failed after ConnectAsync completed (check NetworkManager logs/events).");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -111,6 +127,7 @@ namespace CSNetwork
|
||||
callback?.Invoke(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_loginCallback != null)
|
||||
{
|
||||
_logger.Log(LogType.Warning, "LoginAsync called while another login is already in progress.");
|
||||
@@ -138,15 +155,18 @@ namespace CSNetwork
|
||||
callback?.Invoke(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_currentUserId == -1)
|
||||
{
|
||||
_logger.Log(LogType.Warning, "GetRoleListAsync called but not logged in.");
|
||||
callback?.Invoke(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_roleListCallback != null)
|
||||
{
|
||||
_logger.Log(LogType.Warning, "GetRoleListAsync called while another role list retrieval is already in progress.");
|
||||
_logger.Log(LogType.Warning,
|
||||
"GetRoleListAsync called while another role list retrieval is already in progress.");
|
||||
callback?.Invoke(null);
|
||||
return;
|
||||
}
|
||||
@@ -156,10 +176,12 @@ namespace CSNetwork
|
||||
_logger.Log(LogType.Info, "Requesting role list...");
|
||||
RequestRoleListInternal();
|
||||
}
|
||||
|
||||
public RoleInfo GetRoleInfo()
|
||||
{
|
||||
return _selectedRole;
|
||||
}
|
||||
|
||||
public void SelectRoleAsync(RoleInfo role, Action<RoleInfo> callback)
|
||||
{
|
||||
_selectedRole = role;
|
||||
@@ -170,8 +192,8 @@ namespace CSNetwork
|
||||
Roleid = role.roleid,
|
||||
Flag = 0
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void EnterWorldAsync(RoleInfo role, Action callback)
|
||||
{
|
||||
SendProtocol(new enterworld()
|
||||
@@ -180,12 +202,14 @@ namespace CSNetwork
|
||||
Provider_link_id = 0,
|
||||
}, callback);
|
||||
}
|
||||
|
||||
public void RequestDropIvtrItem(byte index, int amount)
|
||||
{
|
||||
gamedatasend gamedatasendRequest = new gamedatasend();
|
||||
gamedatasendRequest.Data = C2SCommandFactory.CreateDropIvtrItem(index, amount);
|
||||
SendProtocol(gamedatasendRequest);
|
||||
}
|
||||
|
||||
public void RequestDropEquipItem(byte index)
|
||||
{
|
||||
gamedatasend gamedatasendRequest = new gamedatasend();
|
||||
@@ -199,6 +223,7 @@ namespace CSNetwork
|
||||
gamedatasendRequest.Data = C2SCommandFactory.CreatePickupItem(idItem, tid);
|
||||
SendProtocol(gamedatasendRequest);
|
||||
}
|
||||
|
||||
public void RequestInventoryAsync(byte byPackage, Action callback)
|
||||
{
|
||||
gamedatasend gamedatasendRequest = new gamedatasend();
|
||||
@@ -212,6 +237,7 @@ namespace CSNetwork
|
||||
gamedatasendRequest.Data = C2SCommandFactory.CreateQueryPlayerCash();
|
||||
SendProtocol(gamedatasendRequest);
|
||||
}
|
||||
|
||||
public void RequestCheckSecurityPassWd(string password)
|
||||
{
|
||||
gamedatasend gamedatasendRequest = new gamedatasend();
|
||||
@@ -232,6 +258,7 @@ namespace CSNetwork
|
||||
gamedatasendRequest.Data = CSNetwork.C2SCommand.C2SCommandFactory.CreateGetMallShopping(count, goodsArray);
|
||||
SendProtocol(gamedatasendRequest);
|
||||
}
|
||||
|
||||
public void RequestOwnItemInfoAsync(
|
||||
byte byPackage,
|
||||
byte bySlot,
|
||||
@@ -245,7 +272,8 @@ namespace CSNetwork
|
||||
Action callback)
|
||||
{
|
||||
gamedatasend gamedatasendRequest = new gamedatasend();
|
||||
gamedatasendRequest.Data = C2SCommandFactory.CreateOwnItemInfo(byPackage, bySlot, type, expire_date, state, count, crc, content_length, content);
|
||||
gamedatasendRequest.Data = C2SCommandFactory.CreateOwnItemInfo(byPackage, bySlot, type, expire_date, state,
|
||||
count, crc, content_length, content);
|
||||
SendProtocol(gamedatasendRequest, callback);
|
||||
}
|
||||
|
||||
@@ -254,7 +282,8 @@ namespace CSNetwork
|
||||
{
|
||||
if (IsConnected)
|
||||
{
|
||||
_logger.Log(LogType.Debug, $"Sending protocol: {protocol.GetType().Name} (Detail: {protocol.ToString})");
|
||||
_logger.Log(LogType.Debug,
|
||||
$"Sending protocol: {protocol.GetType().Name} (Detail: {protocol.ToString})");
|
||||
_networkManager.Send(protocol);
|
||||
complete?.Invoke();
|
||||
}
|
||||
@@ -268,13 +297,11 @@ namespace CSNetwork
|
||||
|
||||
private void OnProtocolReceived(Protocol protocol)
|
||||
{
|
||||
|
||||
_logger.Log(LogType.Debug, $"Received protocol: {protocol.GetType().Name} (Type: {protocol.Type})");
|
||||
if (protocol is null)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
// Route protocol to appropriate handler
|
||||
switch (protocol.GetPType())
|
||||
{
|
||||
@@ -334,11 +361,16 @@ namespace CSNetwork
|
||||
pDataBuf[i - lenghtHeader] = protocol.Data.ByteArray[i];
|
||||
}
|
||||
}
|
||||
|
||||
var pCmdHeader = BitConverter.ToUInt16(byteArrHeader);
|
||||
//sss
|
||||
//BMLogger.LogError($"### GameDataSend: CMDID {pCmdHeader}");
|
||||
#if UNITY_EDITOR
|
||||
if (isDebug)
|
||||
{
|
||||
BMLogger.LogError($"### GameDataSend: CMDID {pCmdHeader}");
|
||||
}
|
||||
#endif
|
||||
int iHostID = _selectedRole.roleid;
|
||||
// BMLogger.LogError($"### GameDataSend: " + pCmdHeader);
|
||||
|
||||
switch (pCmdHeader)
|
||||
{
|
||||
@@ -358,7 +390,8 @@ namespace CSNetwork
|
||||
case CommandID.PLAYER_INFO_00:
|
||||
case CommandID.SELF_INFO_1:
|
||||
// OnMsgPlayerInfo(-1, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERINFO, (int)MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader, iHostID, _selectedRole);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERINFO, (int)MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf,
|
||||
pCmdHeader, iHostID, _selectedRole);
|
||||
break;
|
||||
case CommandID.OBJECT_MOVE:
|
||||
int lenghtDataType = Marshal.SizeOf<int>();
|
||||
@@ -366,31 +399,38 @@ namespace CSNetwork
|
||||
int idObjMove = BitConverter.ToInt32(arrByteData);
|
||||
if (ISPLAYERID(idObjMove))
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERMOVE, (int)MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader, iHostID);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERMOVE, (int)MANAGER_INDEX.MAN_PLAYER, -1,
|
||||
pDataBuf, pCmdHeader, iHostID);
|
||||
}
|
||||
else if (ISNPCID(idObjMove))
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCMOVE, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCMOVE, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
}
|
||||
|
||||
break;
|
||||
case CommandID.OBJECT_STOP_MOVE:
|
||||
{
|
||||
int id1 = GPDataTypeHelper.FromBytes<int>(pDataBuf);
|
||||
if (ISPLAYERID(id1))
|
||||
{
|
||||
int id1 = GPDataTypeHelper.FromBytes<int>(pDataBuf);
|
||||
if (ISPLAYERID(id1))
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERSTOPMOVE, (int)MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
}
|
||||
else if (ISNPCID(id1))
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCSTOPMOVE, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf, pCmdHeader);
|
||||
}
|
||||
break;
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERSTOPMOVE, (int)MANAGER_INDEX.MAN_PLAYER, -1,
|
||||
pDataBuf, pCmdHeader);
|
||||
}
|
||||
else if (ISNPCID(id1))
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCSTOPMOVE, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.OWN_IVTR_DATA:
|
||||
case CommandID.OWN_IVTR_DETAIL_DATA:
|
||||
case CommandID.OWN_IVTR_DETAIL_DATA:
|
||||
case CommandID.GET_OWN_MONEY:
|
||||
case CommandID.CHANGE_IVTR_SIZE:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_IVTRINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, iHostID);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_IVTRINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader, iHostID);
|
||||
break;
|
||||
case CommandID.EXG_IVTR_ITEM:
|
||||
case CommandID.MOVE_IVTR_ITEM:
|
||||
@@ -400,49 +440,61 @@ namespace CSNetwork
|
||||
case CommandID.MOVE_EQUIP_ITEM:
|
||||
case CommandID.UNFREEZE_IVTR_SLOT:
|
||||
case CommandID.PLAYER_EQUIP_TRASHBOX_ITEM:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ITEMOPERATION, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ITEMOPERATION, (int)MANAGER_INDEX.MAN_PLAYER, 0,
|
||||
pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.PLAYER_CASH:
|
||||
{
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_IVTRINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, iHostID);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_IVTRINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader, iHostID);
|
||||
break;
|
||||
}
|
||||
case CommandID.MATTER_INFO_LIST:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_MM_MATTERINFO, (int)MANAGER_INDEX.MAN_MATTER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_MM_MATTERINFO, (int)MANAGER_INDEX.MAN_MATTER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.MATTER_ENTER_WORLD:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_MM_MATTERENTWORLD, (int)MANAGER_INDEX.MAN_MATTER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_MM_MATTERENTWORLD, (int)MANAGER_INDEX.MAN_MATTER, 0,
|
||||
pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.PICKUP_ITEM:
|
||||
case CommandID.PICKUP_ITEM:
|
||||
case CommandID.HOST_OBTAIN_ITEM:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PICKUPITEM, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PICKUPITEM, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.MATTER_PICKUP:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PICKUPMATTER, (int)MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PICKUPMATTER, (int)MANAGER_INDEX.MAN_PLAYER, -1,
|
||||
pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.PICKUP_MONEY:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PICKUPMONEY, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_PICKUPMONEY, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.HOST_CORRECT_POS:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_CORRECTPOS, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, iHostID);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_CORRECTPOS, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader, iHostID);
|
||||
break;
|
||||
case CommandID.OWN_ITEM_INFO:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_OWNITEMINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, iHostID);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_OWNITEMINFO, (int)MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader, iHostID);
|
||||
break;
|
||||
case CommandID.NPC_ENTER_SLICE:
|
||||
case CommandID.NPC_INFO_LIST:
|
||||
case CommandID.NPC_INFO_00:
|
||||
case CommandID.NPC_ENTER_WORLD:
|
||||
case CommandID.NPC_VISIBLE_TID_NOTIFY:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCINFO, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf, pCmdHeader, dwDataSize);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCINFO, (int)MANAGER_INDEX.MAN_NPC, 0, pDataBuf,
|
||||
pCmdHeader, dwDataSize);
|
||||
break;
|
||||
case CommandID.TASK_DATA:
|
||||
case CommandID.TASK_VAR_DATA:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_TASKDATA, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, dwDataSize);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_TASKDATA, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader, dwDataSize);
|
||||
break;
|
||||
case CommandID.BE_HURT:
|
||||
case CommandID.HURT_RESULT:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_HURTRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_HURTRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.OBJECT_ATTACK_RESULT:
|
||||
//int id = GPDataTypeHelper.FromBytes<int>(pDataBuf);
|
||||
@@ -450,38 +502,39 @@ namespace CSNetwork
|
||||
//BMLogger.LogError($"OBJECT_ATTACK_RESULT: npc ? " + ISNPCID(id));
|
||||
|
||||
if (ISPLAYERID(pCmdAtk.attacker_id))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERATKRESULT, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERATKRESULT, MANAGER_INDEX.MAN_PLAYER, -1,
|
||||
pDataBuf, pCmdHeader);
|
||||
else if (ISNPCID(pCmdAtk.attacker_id))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCATKRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCATKRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.HOST_ATTACKRESULT:
|
||||
_logger.Info($"HOST_ATTACKRESULT: " + pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ATKRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ATKRESULT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.HOST_ATTACKED:
|
||||
_logger.Info($"HOST_ATTACKED: " + pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ATTACKED, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_ATTACKED, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
|
||||
case CommandID.ERROR_MESSAGE:
|
||||
_logger.Info($"### GameDataSend: ERROR_MESSAGE: {BitConverter.ToInt32(pDataBuf, 0)}");
|
||||
cmd_error_msg pCmd = GPDataTypeHelper.FromBytes<cmd_error_msg>(pDataBuf);
|
||||
cmd_error_msg pCmd = GPDataTypeHelper.FromBytes<cmd_error_msg>(pDataBuf);
|
||||
BMLogger.LogError("hOANGdEV : ERROR_MESSAGE pCmd.iMessage!=0 " + pCmd.iMessage);
|
||||
|
||||
if (pCmd.iMessage!=0)
|
||||
if (pCmd.iMessage != 0)
|
||||
{
|
||||
|
||||
string szMsg = m_ErrorMsgs.GetWideString(pCmd.iMessage);
|
||||
if (string.IsNullOrEmpty( szMsg))
|
||||
BMLogger.LogError("SERVER - unknown error !");
|
||||
if (string.IsNullOrEmpty(szMsg))
|
||||
BMLogger.LogError("SERVER - unknown error !");
|
||||
//else if (pCmd.iMessage != 2)
|
||||
//g_pGame->GetGameRun()->AddChatMessage(szMsg, GP_CHAT_MISC);
|
||||
|
||||
//g_pGame->GetGameRun()->AddChatMessage(szMsg, GP_CHAT_MISC);
|
||||
}
|
||||
|
||||
if (pCmd.iMessage == 2)
|
||||
{
|
||||
|
||||
// Attack target is too far
|
||||
//pGameRun->PostMessage(MSG_HST_TARGETISFAR, MAN_PLAYER, 0, (DWORD)pDataBuf, pCmdHeader->cmd);
|
||||
}
|
||||
@@ -502,15 +555,18 @@ namespace CSNetwork
|
||||
}
|
||||
else if (pCmd.iMessage == 108 /*&& pGameRun->GetHostPlayer()->IsInKingService()*/)
|
||||
{
|
||||
/* CECGameUIMan* pGameUI = pGameRun->GetUIManager()->GetInGameUIMan();
|
||||
if (pGameUI)
|
||||
pGameUI->EndNPCService();*/
|
||||
/* CECGameUIMan* pGameUI = pGameRun->GetUIManager()->GetInGameUIMan();
|
||||
if (pGameUI)
|
||||
pGameUI->EndNPCService();*/
|
||||
}
|
||||
else if (pCmd.iMessage == 108 /*&& pGameRun->GetHostPlayer()->GetOfflineShopCtrl()->GetNPCSevFlag() != COfflineShopCtrl::NPCSEV_NULL*/)
|
||||
else if
|
||||
(pCmd.iMessage ==
|
||||
108 /*&& pGameRun->GetHostPlayer()->GetOfflineShopCtrl()->GetNPCSevFlag() != COfflineShopCtrl::NPCSEV_NULL*/
|
||||
)
|
||||
{
|
||||
/* CECGameUIMan* pGameUI = pGameRun->GetUIManager()->GetInGameUIMan();
|
||||
if (pGameUI)
|
||||
pGameUI->EndNPCService();*/
|
||||
/* CECGameUIMan* pGameUI = pGameRun->GetUIManager()->GetInGameUIMan();
|
||||
if (pGameUI)
|
||||
pGameUI->EndNPCService();*/
|
||||
}
|
||||
else if (pCmd.iMessage == 175)
|
||||
{
|
||||
@@ -526,7 +582,8 @@ namespace CSNetwork
|
||||
case CommandID.SELECT_TARGET:
|
||||
case CommandID.UNSELECT:
|
||||
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_SELTARGET, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_SELTARGET, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
case CommandID.NPC_DIED:
|
||||
case CommandID.NPC_DIED2:
|
||||
@@ -534,18 +591,23 @@ namespace CSNetwork
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCDIED, MANAGER_INDEX.MAN_NPC, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.OBJECT_DISAPPEAR:
|
||||
{
|
||||
int lenghtDataType1 = Marshal.SizeOf<int>();
|
||||
byte[] arrByteData1 = GetBytes(pDataBuf, lenghtDataType1, 0);
|
||||
int idObjMove1 = BitConverter.ToInt32(arrByteData1);
|
||||
if (ISPLAYERID(idObjMove1))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERDISAPPEAR, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
else if (ISNPCID(idObjMove1))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCDISAPPEAR, MANAGER_INDEX.MAN_NPC, 0, pDataBuf, pCmdHeader);
|
||||
|
||||
break;
|
||||
}
|
||||
{
|
||||
int lenghtDataType1 = Marshal.SizeOf<int>();
|
||||
byte[] arrByteData1 = GetBytes(pDataBuf, lenghtDataType1, 0);
|
||||
int idObjMove1 = BitConverter.ToInt32(arrByteData1);
|
||||
if (ISPLAYERID(idObjMove1))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERDISAPPEAR, MANAGER_INDEX.MAN_PLAYER, -1,
|
||||
pDataBuf, pCmdHeader);
|
||||
else if (ISNPCID(idObjMove1))
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCDISAPPEAR, MANAGER_INDEX.MAN_NPC, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
|
||||
break;
|
||||
}
|
||||
case CommandID.SELF_INFO_00:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_INFO00, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
|
||||
pCmdHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -553,7 +615,6 @@ namespace CSNetwork
|
||||
{
|
||||
if (iSubID == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else if (iSubID < 0)
|
||||
{
|
||||
@@ -564,24 +625,25 @@ namespace CSNetwork
|
||||
{
|
||||
byteArray[i] = data[i];
|
||||
}
|
||||
|
||||
int cid = BitConverter.ToInt32(byteArray);
|
||||
switch (pCmdHeader)
|
||||
{
|
||||
case CommandID.PLAYER_INFO_1:
|
||||
case CommandID.PLAYER_ENTER_WORLD:
|
||||
case CommandID.PLAYER_ENTER_SLICE:
|
||||
{
|
||||
if (cid != iHostID)
|
||||
{
|
||||
if (cid != iHostID)
|
||||
{
|
||||
_logger.Info("### OnMsgPlayerInfo: ElsePlayer join");
|
||||
}
|
||||
break;
|
||||
_logger.Info("### OnMsgPlayerInfo: ElsePlayer join");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,7 +751,8 @@ namespace CSNetwork
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.Log(LogType.Debug, $"Received RoleListResponse. Handle: {response.handle}, Result: {response.result}, Count: {response.rolelist.Count}");
|
||||
_logger.Log(LogType.Debug,
|
||||
$"Received RoleListResponse. Handle: {response.handle}, Result: {response.result}, Count: {response.rolelist.Count}");
|
||||
|
||||
if (response.result == 0)
|
||||
{
|
||||
@@ -774,10 +837,12 @@ namespace CSNetwork
|
||||
_networkManager.Dispose();
|
||||
_networkManager = null;
|
||||
}
|
||||
|
||||
_loginCallback = null;
|
||||
_roleListCallback = null;
|
||||
_accumulatedRoles = null;
|
||||
}
|
||||
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
@@ -792,8 +857,10 @@ namespace CSNetwork
|
||||
{
|
||||
return id != 0 && (id & 0x80000000) == 0;
|
||||
}
|
||||
|
||||
public bool ISNPCID(int id) => ((id & unchecked((int)0x80000000)) != 0)
|
||||
&& ((id & 0x40000000) == 0);
|
||||
&& ((id & 0x40000000) == 0);
|
||||
|
||||
private byte[] GetBytes(byte[] bytes, int length, int index)
|
||||
{
|
||||
byte[] arrByteData = new byte[length];
|
||||
@@ -801,25 +868,30 @@ namespace CSNetwork
|
||||
{
|
||||
arrByteData[i] = bytes[i + index];
|
||||
}
|
||||
|
||||
return arrByteData;
|
||||
}
|
||||
|
||||
public void c2s_CmdPlayerMove(in Vector3 vCurPos, in Vector3 vDest,
|
||||
int iTime, float fSpeed, int iMoveMode, ushort wStamp)
|
||||
int iTime, float fSpeed, int iMoveMode, ushort wStamp)
|
||||
{
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
|
||||
gamedatasend.Data = C2SCommandFactory.CreatePlayerMove(vCurPos, vDest, (ushort)iTime, fSpeed, (byte)iMoveMode, wStamp);
|
||||
gamedatasend.Data =
|
||||
C2SCommandFactory.CreatePlayerMove(vCurPos, vDest, (ushort)iTime, fSpeed, (byte)iMoveMode, wStamp);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
public void c2s_SendCmdStopMove(in Vector3 vDest, float fSpeed, int iMoveMode,
|
||||
byte byDir, ushort wStamp, int iTime)
|
||||
byte byDir, ushort wStamp, int iTime)
|
||||
{
|
||||
|
||||
gamedatasend gamedatasend = new gamedatasend();
|
||||
|
||||
gamedatasend.Data = C2SCommandFactory.CreatePlayerStop(vDest, fSpeed, (byte)iMoveMode, byDir, wStamp, (ushort)iTime);
|
||||
gamedatasend.Data =
|
||||
C2SCommandFactory.CreatePlayerStop(vDest, fSpeed, (byte)iMoveMode, byDir, wStamp, (ushort)iTime);
|
||||
SendProtocol(gamedatasend);
|
||||
}
|
||||
|
||||
public void SendChatData(byte cChannel, in string szMsg, int iPack, int iSlot)
|
||||
{
|
||||
publicchat publicChat = new publicchat();
|
||||
@@ -831,7 +903,12 @@ namespace CSNetwork
|
||||
_logger.Log(LogType.Warning, $"HoangDev : publicChat {publicChat}");
|
||||
SendProtocol(publicChat);
|
||||
}
|
||||
private void SetCharacterID(int iCharID) { m_iCharID = iCharID; }
|
||||
|
||||
private void SetCharacterID(int iCharID)
|
||||
{
|
||||
m_iCharID = iCharID;
|
||||
}
|
||||
|
||||
private void OnPrtcChatMessage(Protocol pProtocol, bool bCalledagain)
|
||||
{
|
||||
chatmessage p = (chatmessage)pProtocol;
|
||||
@@ -845,7 +922,11 @@ namespace CSNetwork
|
||||
public struct ChatMessageEvent
|
||||
{
|
||||
public string context;
|
||||
public ChatMessageEvent(string context) { this.context = context; }
|
||||
|
||||
public ChatMessageEvent(string context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
|
||||
public void c2s_SendCmdGetAllData(bool byPack, bool byEquip, bool byTask)
|
||||
@@ -900,4 +981,4 @@ namespace CSNetwork
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,19 @@ namespace BrewMonster.Network
|
||||
private string _username = "";
|
||||
private string _password = "";
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public bool isDebg;
|
||||
private bool lastDebug;
|
||||
public void OnValidate()
|
||||
{
|
||||
if (isDebg != lastDebug)
|
||||
{
|
||||
_gameSession.IsDebug = isDebg;
|
||||
lastDebug = isDebg;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class HUDNPC : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TextMeshProUGUI _healthText;
|
||||
[SerializeField] private TextMeshProUGUI _nameText;
|
||||
[SerializeField] private TextMeshProUGUI _statText;
|
||||
|
||||
public void SetText(string healthText, string nameText, string statText)
|
||||
{
|
||||
_healthText.text = healthText;
|
||||
_nameText.text = nameText;
|
||||
_statText.text = statText;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d072871c8791e284dbad61ce13ba6887
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using CSNetwork.GPDataType;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class HUDPlayer : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI healthText;
|
||||
public TextMeshProUGUI manaText;
|
||||
public TextMeshProUGUI expText;
|
||||
public TextMeshProUGUI nameText;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventBus.Subscribe<cmd_self_info_00>(UpdateHostPlayerInfoUI);
|
||||
EventBus.Subscribe<InfoHostPlayer>(UpdateNameHostPlayer);
|
||||
}
|
||||
|
||||
private void UpdateNameHostPlayer(InfoHostPlayer obj)
|
||||
{
|
||||
nameText.text = obj.NameHostPlayer;
|
||||
}
|
||||
|
||||
private void UpdateHostPlayerInfoUI(cmd_self_info_00 obj)
|
||||
{
|
||||
healthText.text = $"{obj.iHP}/{obj.iMaxHP}";
|
||||
manaText.text = $"{obj.iMP}/{obj.iMaxMP}";
|
||||
expText.text = $"{obj.iExp}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 706d0ac515335b446be8840000ff0fab
|
||||
@@ -1,19 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17a6ba7084fc0de4ea88ad040dfd2a84
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15301adfd593e1b069ebc9089fed021e7be983af79263007cfe4d9e8bb1f879a
|
||||
size 33048888
|
||||
oid sha256:68ca9467e615cbe49f5a293c85be002ab71745181674fe8395cb9e65d1a57b84
|
||||
size 32996450
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:78669dc5fa14a381c579516583b1cbd4aae51ff6e2ae606ff286dd51f78fe266
|
||||
size 543980635
|
||||
oid sha256:fae5696c45c05b5436fc10874f3d8270331d564a36c0780be638c9aeb1f69a4b
|
||||
size 532496171
|
||||
|
||||
+486
-328
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BrewMonster;
|
||||
using UnityEngine;
|
||||
|
||||
public class CECUIManager : MonoBehaviour
|
||||
public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
[SerializeField] private Transform uiRoot; // nơi chứa UI được spawn (Canvas hoặc Transform)
|
||||
[SerializeField] private List<GameObject> uiPrefabs; // drag các prefab UI vào đây
|
||||
|
||||
private readonly Dictionary<System.Type, GameObject> _spawnedUIs = new();
|
||||
|
||||
[SerializeField] private HUDNPC npsUI;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
|
||||
base.Awake();
|
||||
EventBus.Subscribe<NPCINFO>(ShowUINPC);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
||||
EventBus.Unsubscribe<NPCINFO>(ShowUINPC);
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowUINPC(NPCINFO obj)
|
||||
{
|
||||
npsUI.gameObject.SetActive(true);
|
||||
npsUI.SetText($"{obj.CurrentHealth}/{obj.MaxHealth}",obj.Name,"");
|
||||
}
|
||||
|
||||
private void HideUINPC(NPCINFO obj)
|
||||
{
|
||||
npsUI.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lấy hoặc spawn UI mới nếu chưa có
|
||||
/// </summary>
|
||||
public T ShowUI<T>() where T : Component
|
||||
{
|
||||
var type = typeof(T);
|
||||
|
||||
// Nếu đã spawn rồi thì bật lại
|
||||
if (_spawnedUIs.TryGetValue(type, out var uiGo))
|
||||
{
|
||||
uiGo.SetActive(true);
|
||||
return uiGo.GetComponent<T>();
|
||||
}
|
||||
|
||||
// Tìm prefab phù hợp
|
||||
var prefab = uiPrefabs.Find(p => p.GetComponent<T>() != null);
|
||||
if (prefab == null)
|
||||
{
|
||||
Debug.LogError($"Không tìm thấy prefab chứa component {type.Name}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Spawn mới
|
||||
var instance = Instantiate(prefab, uiRoot ? uiRoot : transform);
|
||||
instance.name = $"{type.Name}_UI";
|
||||
_spawnedUIs[type] = instance;
|
||||
instance.SetActive(true);
|
||||
|
||||
return instance.GetComponent<T>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ẩn UI (disable thay vì destroy)
|
||||
/// </summary>
|
||||
public void HideUI<T>() where T : Component
|
||||
{
|
||||
var type = typeof(T);
|
||||
if (_spawnedUIs.TryGetValue(type, out var uiGo))
|
||||
{
|
||||
uiGo.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kiểm tra UI có đang active không
|
||||
/// </summary>
|
||||
public bool IsUIActive<T>() where T : Component
|
||||
{
|
||||
var type = typeof(T);
|
||||
return _spawnedUIs.TryGetValue(type, out var uiGo) && uiGo.activeSelf;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ẩn tất cả UI hiện tại
|
||||
/// </summary>
|
||||
public void HideAll()
|
||||
{
|
||||
foreach (var kv in _spawnedUIs)
|
||||
{
|
||||
kv.Value.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
+44
-17
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user