diff --git a/Assets/PerfectWorld/Prefab/GameController.prefab b/Assets/PerfectWorld/Prefab/GameController.prefab index 4fbfe83d50..1488984af0 100644 --- a/Assets/PerfectWorld/Prefab/GameController.prefab +++ b/Assets/PerfectWorld/Prefab/GameController.prefab @@ -1,5 +1,106 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2486392142327362049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3233441867675090637} + - component: {fileID: 7894129013412138377} + - component: {fileID: 1184637750286334292} + - component: {fileID: 7240944814921333938} + m_Layer: 0 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3233441867675090637 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2486392142327362049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2780428059708698453} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!223 &7894129013412138377 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2486392142327362049} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 100 + m_TargetDisplay: 0 +--- !u!114 &1184637750286334292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2486392142327362049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!114 &7240944814921333938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2486392142327362049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 --- !u!1 &6950113420985123515 GameObject: m_ObjectHideFlags: 0 @@ -30,7 +131,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 3233441867675090637} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1890210201668811196 @@ -49,6 +151,8 @@ MonoBehaviour: uiPrefabs: [] npsUI: {fileID: 0} currentTargetNPCID: 0 + dialogResouce: {fileID: 11400000, guid: 540bc8e61556ba4479407a2d68e17580, type: 2} + canvasDlg: {fileID: 7894129013412138377} --- !u!114 &6919949516443544071 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset b/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset new file mode 100644 index 0000000000..a9fbcb99ec --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b5ec8ff401272d4ebb5be4f47b02464, type: 3} + m_Name: DialogScriptTableObject + m_EditorClassIdentifier: + lstPrefabDialog: + - id: DialogNPC + prefab: {fileID: 8237288432181259026, guid: 7653e7e64393ec24c903f0606499b8c4, type: 3} diff --git a/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset.meta b/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset.meta new file mode 100644 index 0000000000..e7e7d360c9 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/DialogScriptTableObject.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 540bc8e61556ba4479407a2d68e17580 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Resources/UI/Notification.meta b/Assets/PerfectWorld/Resources/UI/Notification.meta new file mode 100644 index 0000000000..bcef7b50f4 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/Notification.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8da53776c0d93a4cb3248d89be94d91 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Resources/UI/Notification/close.png b/Assets/PerfectWorld/Resources/UI/Notification/close.png new file mode 100644 index 0000000000..44cff04d42 Binary files /dev/null and b/Assets/PerfectWorld/Resources/UI/Notification/close.png differ diff --git a/Assets/PerfectWorld/Resources/UI/Notification/close.png.meta b/Assets/PerfectWorld/Resources/UI/Notification/close.png.meta new file mode 100644 index 0000000000..32ec997db8 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/Notification/close.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: fb2f2f58be45f6e4890e85cc00b0bcc9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png b/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png new file mode 100644 index 0000000000..6b26ed95ec Binary files /dev/null and b/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png differ diff --git a/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png.meta b/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png.meta new file mode 100644 index 0000000000..d6405ebce2 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/Notification/khung thongbao.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 6d3e1de5b0b9eec47930f9f2dc926d84 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png b/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png new file mode 100644 index 0000000000..1e4dc23ec9 Binary files /dev/null and b/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png differ diff --git a/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png.meta b/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png.meta new file mode 100644 index 0000000000..afc87f4b63 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/Notification/pw thongbao mini.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 208d836ca21070845bd58e58b10c8de9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png b/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png new file mode 100644 index 0000000000..66f6216e61 Binary files /dev/null and b/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png differ diff --git a/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png.meta b/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png.meta new file mode 100644 index 0000000000..c2cd4a7ff0 --- /dev/null +++ b/Assets/PerfectWorld/Resources/UI/Notification/tieude2.png.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 50648e5dab4e12f44bbbdac9313e24a4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 0 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Scripts/Common/AWScriptFile.cs b/Assets/PerfectWorld/Scripts/Common/AWScriptFile.cs index ad3eb9d2d9..ec7e2f888b 100644 --- a/Assets/PerfectWorld/Scripts/Common/AWScriptFile.cs +++ b/Assets/PerfectWorld/Scripts/Common/AWScriptFile.cs @@ -251,5 +251,10 @@ namespace BrewMonster.Common GetNextToken(bCrossLine); return int.Parse(ByteToStringUtils.UshortArrayToUnicodeString(m_szToken)); } + + // Reach end of file ? + public bool IsEnd() { return m_Script.pCurIndex >= m_Script.pFileBuf.Length; } + // Get current line + public int GetCurLine() { return m_Script.iLine; } } } \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Common/CECTimeSafeChecker.cs b/Assets/PerfectWorld/Scripts/Common/CECTimeSafeChecker.cs new file mode 100644 index 0000000000..626b27770c --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Common/CECTimeSafeChecker.cs @@ -0,0 +1,83 @@ +using UnityEngine; + +namespace BrewMonster.Common +{ + public class CECTimeSafeChecker + { + uint m_dwBeginTick; + uint m_dwTimeLength; + + public CECTimeSafeChecker() + { + m_dwBeginTick = 0; + m_dwTimeLength = 0; + } + + void Reset(uint dwCurrentTickCount, uint dwTimeLength) + { + m_dwBeginTick = dwCurrentTickCount; + m_dwTimeLength = dwTimeLength; + } + + void Reset(uint dwTimeLength) + { + Reset((uint)Time.realtimeSinceStartupAsDouble, dwTimeLength); + } + + public void Reset() + { + Reset((uint)Time.realtimeSinceStartupAsDouble, m_dwTimeLength); + } + + public bool IsTimeArrived() + { + return IsTimeArrived((uint)Time.realtimeSinceStartupAsDouble); + + } + + bool IsTimeArrived(uint dwCurrentTickCount) + { + return ElapsedTime(dwCurrentTickCount) >= TimeLength(); + } + + uint ElapsedTime(uint dwEndTickCount, uint dwBeginTickCount) + { + return (dwEndTickCount >= dwBeginTickCount) ? (dwEndTickCount - dwBeginTickCount) : 0; + } + + uint ElapsedTime(uint dwCurrentTickCount) + { + return ElapsedTime(dwCurrentTickCount, m_dwBeginTick); + } + + uint ElapsedTimeFor(uint dwBeginTickCount) + { + return ElapsedTime((uint)Time.realtimeSinceStartupAsDouble, dwBeginTickCount); + } + + uint ElapsedTime() + { + return ElapsedTime((uint)Time.realtimeSinceStartupAsDouble); + } + + uint TimeLength() + { + return m_dwTimeLength; + } + + uint LeftTime(uint dwCurrentTickCount) + { + + uint result = 0; + uint dwElapsedTime = ElapsedTime(dwCurrentTickCount); + if (dwElapsedTime lstPrefabDialog; + + public GameObject GetPrefabDialog(string id) + { + return lstPrefabDialog.Find(x => x.id.Equals(id)).prefab; + } + } + + [Serializable] + public struct DialogResouce + { + public string id; + public GameObject prefab; + } +} diff --git a/Assets/PerfectWorld/Scripts/Common/DialogScriptTableObject.cs.meta b/Assets/PerfectWorld/Scripts/Common/DialogScriptTableObject.cs.meta new file mode 100644 index 0000000000..71d2325470 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Common/DialogScriptTableObject.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3b5ec8ff401272d4ebb5be4f47b02464 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs b/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs new file mode 100644 index 0000000000..5cfdbe0dc4 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs @@ -0,0 +1,30 @@ +using BrewMonster.Common; +using DG.Tweening; +using NUnit.Framework; +using System.Collections.Generic; +using UnityEngine; + +namespace BrewMonster.Common +{ + public class CECStubbornFactionInfoSender + { + CECTimeSafeChecker m_timer; + List m_factionIDs; + + public void Add(int iNumFaction, int[] aFactionIDs) + { + if (iNumFaction <= 0 || aFactionIDs == null) + { + return; + } + for (int i = 0; i < iNumFaction; ++i) + { + int idFaction = aFactionIDs[i]; + if (idFaction > 0 && !m_factionIDs.Contains(idFaction)) + { + m_factionIDs.Add(idFaction); + } + } + } + } +} diff --git a/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs.meta b/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs.meta new file mode 100644 index 0000000000..9b7235cfd1 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Common/EC_StubbornFactionInfoSender.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c2856691c4dd1e948914ea59c1d2e443 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/MainFiles/EC_Game.cs b/Assets/PerfectWorld/Scripts/MainFiles/EC_Game.cs index 32ed834533..eedd5da4d4 100644 --- a/Assets/PerfectWorld/Scripts/MainFiles/EC_Game.cs +++ b/Assets/PerfectWorld/Scripts/MainFiles/EC_Game.cs @@ -1,10 +1,11 @@ -using ModelRenderer.Scripts.GameData; -using BrewMonster.Scripts.Task; -using UnityEngine; using BrewMonster; +using BrewMonster.Scripts.Task; +using CSNetwork; +using ModelRenderer.Scripts.GameData; +using System; using System.Collections.Generic; using System.IO; -using CSNetwork; +using UnityEngine; namespace BrewMonster.Network { @@ -12,6 +13,8 @@ namespace BrewMonster.Network { #region Fields + private static CECFactionMan m_pFactionMan; // Faction manager + public static bool g_bEnableFortressDeclareWar = false; private static ATaskTemplMan m_pTaskMan; // Task template manager private static elementdataman m_pElementDataMan; // global element templates manager private static CECGameRun m_pGameRun; // Game running object @@ -41,6 +44,7 @@ namespace BrewMonster.Network } // String table getters + public static CECFactionMan GetFactionMan() { return m_pFactionMan; } public static BrewMonster.CECStringTab GetFixedMsgs() { return m_FixedMsgs; @@ -251,6 +255,12 @@ namespace BrewMonster.Network return iOldCursor; } + // Get server GMT(UTC) time + public static int GetServerGMTTime() + { + long unixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); + return (int)unixTime + m_iTimeError; + } #endregion } } \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs b/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs new file mode 100644 index 0000000000..5961887f3e --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs @@ -0,0 +1,34 @@ +using BrewMonster.Network; +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace BrewMonster +{ + public class Faction_Info + { + public uint m_id; + public string m_szName; + public int m_nLev; + public int m_nMemNum; + + public int GetLevel() { return m_nLev; } +} + + public class CECFactionMan + { + Dictionary m_FactionMap; + + public Faction_Info GetFaction(uint uId, bool bRequestFromServer) + { + if (!m_FactionMap.TryGetValue(uId, out var it)) + { + if (bRequestFromServer) + UnityGameSession.Instance.GetFactionInfo(1, new int[] { (int)uId }); + return null; + } + + return it; + } + } +} diff --git a/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs.meta b/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs.meta new file mode 100644 index 0000000000..a5139e5ca3 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/Managers/EC_Faction.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: f317e7b8bfb4c1e45b5cb1a2c4af9e82 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs b/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs index db1ef4e8c8..d360988e14 100644 --- a/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs +++ b/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs @@ -17,6 +17,7 @@ using TMPro; using Unity.VisualScripting; using UnityEngine; using UnityEngine.SceneManagement; +using BrewMonster.Network; public abstract partial class CECPlayer : CECObject { @@ -60,6 +61,14 @@ public abstract partial class CECPlayer : CECObject protected int NUM_WEAPON_TYPE = 15; public static readonly int[] m_sciStateIDForStateAction = { 117 }; + protected int m_iBoothState = 0; // Booth state. 0, none; 1, prepare; 2, open booth; 3, visite other's booth + public int m_idFRole = GNETRoles._R_UNMEMBER; // ID of player's faction role + protected int m_idCountry = 0; // ¹úÕ½ÕóÓª id + public static int MAX_REINCARNATION = 2; + protected List m_aCurEffects = new List(); // Current effects + byte m_ReincarnationCount = 0; + string m_strName; // Player name + public MOVECONST m_MoveConst; // Const used when moving control public Move_Mode m_MoveMode; public MOVECONST[] aMoveConsts = new MOVECONST[PROFESSION.NUM_PROFESSION * GENDER.NUM_GENDER] @@ -131,7 +140,12 @@ public abstract partial class CECPlayer : CECObject new A3DVECTOR3(0.3f, 0.85f, 0.3f), }; + public static class Effect_type + { + public const int EFF_FACEPILL = 1; + } private BaseVfxObject _levelUpVfx; + protected void Awake() { m_PlayerActions = _default_actions; @@ -1216,6 +1230,42 @@ public abstract partial class CECPlayer : CECObject BMLogger.LogError($"Failed to load level up effect prefab at: {path}"); } } + + // Get booth state + public int GetBoothState() { return m_iBoothState; } + + // Check whether player has effect of specified type + public bool HasEffectType(int iEffType) + { + int i; + + switch (iEffType) + { + case Effect_type.EFF_FACEPILL: + { + elementdataman pDataMan = EC_Game.GetElementDataMan(); + + // Get item data type + for (i = 0; i < m_aCurEffects.Count; i++) + { + DATA_TYPE DataType = pDataMan.get_data_type((uint)m_aCurEffects[i], ID_SPACE.ID_SPACE_ESSENCE); + if (DataType == DATA_TYPE.DT_FACEPILL_ESSENCE) + return true; + } + + break; + } + } + + return false; + } + + public byte GetReincarnationCount() { return m_ReincarnationCount; } + + public string GetName() + { + return m_strName; + } } public struct PlayActionEvent diff --git a/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs b/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs index 45ac186c69..38c650a54b 100644 --- a/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs +++ b/Assets/PerfectWorld/Scripts/NPC/CECNPCServer.cs @@ -13,7 +13,7 @@ public class CECNPCServer : CECNPC public override void SetUpCECNPC(CECNPCMan pNPCMan) { base.SetUpCECNPC(pNPCMan); - m_iCID = (int)Class_ID.OCID_MONSTER; + m_iCID = (int)Class_ID.OCID_SERVER; m_pDBEssence = null; } public override bool Init(int tid, in info_npc info, ReadOnlySpan packet, int infoOffset) @@ -58,4 +58,17 @@ public class CECNPCServer : CECNPC StartWork((int)WorkType.WT_NOTHING, (int)WorkID.WORK_STAND); return true; } + + // Get way point ID bound with this NPC + public uint? GetWayPointID() + { + uint? dwID = 0; + if ((m_pDBEssence?.combined_services & 0x08) != 0) + dwID = m_pDBEssence?.id_to_discover; + + return dwID; + } + + // Get essence data in database + public NPC_ESSENCE? GetDBEssence() { return m_pDBEssence; } } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs index 2691da3e60..78946e471a 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommand.cs @@ -1359,6 +1359,12 @@ namespace CSNetwork.S2CCommand { public int id; }; + + public struct cmd_sevnpc_serve + { + public int service_type; + public uint len; + }; } // Player and NPC state \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs index 87315311d4..9fc23a5f7c 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/C2SCommand/C2SCommandFactory.cs @@ -503,5 +503,15 @@ namespace CSNetwork.C2SCommand { return SerializeCommand(iCmd); } + + public static Octets CreateNPCSevWaypointCmd(int serviceType, uint len) + { + var cmd = new cmd_sevnpc_serve + { + service_type = serviceType, + len = len + }; + return SerializeCommand(CommandID.SEVNPC_SERVE, cmd); + } } } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/Common/ExpTypes.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/Common/ExpTypes.cs index 3fec6ebd3b..f9487dfb33 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/Common/ExpTypes.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/Common/ExpTypes.cs @@ -111,5 +111,72 @@ namespace CSNetwork.Common } } + public enum SERVICE_TYPE : int + { + // ½»Ì¸·þÎñ + NPC_TALK = int.MinValue, + // ³öÊÛÉÌÆ·µÄ·þÎñ + NPC_SELL, + // ÊÕ¹ºÉÌÆ·µÄ·þÎñ + NPC_BUY, + // ÐÞÀíÉÌÆ·µÄ·þÎñ + NPC_REPAIR, + // ÏâǶ·þÎñ + NPC_INSTALL, + // ²ð³ý·þÎñ + NPC_UNINSTALL, + // ÈÎÎñÏà¹Ø·þÎñ,·Ö·¢ÈÎÎñºÍÍê³ÉÈÎÎñÒÔ¼°·¢·ÅÈÎÎñÎïÆ· + NPC_GIVE_TASK, + NPC_COMPLETE_TASK, + NPC_GIVE_TASK_MATTER, + // ½ÌÊÚÏà¹Ø·þÎñ + NPC_SKILL, + // ÖÎÁÆ·þÎñ + NPC_HEAL, + // ´«ËÍ·þÎñ + NPC_TRANSMIT, + // ÔËÊä·þÎñ + NPC_TRANSPORT, + // ´úÊÛ·þÎñ + NPC_PROXY, + // ´æ´¢ÎïÆ·¡¢½ðÇ® + NPC_STORAGE, + // Éú²ú·þÎñ + NPC_MAKE, + // ·Ö½â·þÎñ + NPC_DECOMPOSE, + // TALK·µ»Ø + TALK_RETURN, + // ½áÊø¶Ô»° + TALK_EXIT, + // ²Ö¿âÃÜÂë + NPC_STORAGE_PASSWORD, + // ¼ø¶¨·þÎñ + NPC_IDENTIFY, + // ·ÅÆúÈÎÎñ + TALK_GIVEUP_TASK, + // ³ÇÕ½ÅÚËþ½¨Ôì·þÎñ + NPC_WAR_TOWERBUILD, + // Ï´µã·þÎñ + NPC_RESETPROP, + // ³èÎï¸ÄÃû·þÎñ + NPC_PETNAME, + // ³èÎïѧϰ¼¼ÄÜ·þÎñ + NPC_PETLEARNSKILL, + // ³èÎïÒÅÍü¼¼ÄÜ·þÎñ + NPC_PETFORGETSKILL, + // ×°±¸°ó¶¨·þÎñ + NPC_EQUIPBIND, + // ×°±¸Ïú»Ù·þÎñ + NPC_EQUIPDESTROY, + // ×°±¸½â³ýÏú»Ù·þÎñ + NPC_EQUIPUNDESTROY, + // ÕʺŲֿâ + NPC_ACCOUNT_STORAGE, + // ïÔ¿Ì·þÎñ + NPC_ENGRAVE, + // ×°±¸ÖØÖý£¨Ëæ»úÊôÐÔ£© + NPC_RANDPROP, + }; } } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs index 0cbb8b5287..4640848533 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs @@ -518,6 +518,126 @@ namespace CSNetwork.GPDataType public const int PRAY_DISTANCE_CHANGE = 396; // Ò÷³ª¾àÀë²ÎÊý } + // NPC service type + public static class NPC_service_type + { + public const int GP_NPCSEV_SELL = 1, // 1, NPC sell to player + GP_NPCSEV_BUY = 2, // 2, NPC buy from player + GP_NPCSEV_REPAIR = 3, // 3 + GP_NPCSEV_HEAL = 4, // 4 + GP_NPCSEV_TRANSMIT = 5, // 5, Transmit to somewhere + + GP_NPCSEV_TASK_RETURN = 6, // 6, Return task + GP_NPCSEV_TASK_ACCEPT = 7, // 7, Accept task + GP_NPCSEV_TASK_MATTER = 8, // 8, Task matter + GP_NPCSEV_LEARN = 9, // 9, Learn skill + GP_NPCSEV_EMBED = 10, // 10, Embed stone + + GP_NPCSEV_CLEAR_TESSERA = 11, // 11, Clear tessear + GP_NPCSEV_MAKEITEM = 12, // 12 + GP_NPCSEV_BREAKITEM = 13, // 13 + GP_NPCSEV_TRASHPSW = 14, // 14, Change trash password + GP_NPCSEV_OPENTRASH = 15, // 15, Open trash + + GP_NPCSEV_RESERVED = 16, // 16 + GP_NPCSEV_IDENTIFY = 17, // 17, Identify item + GP_NPCSEV_FACTION = 18, // 18, About faction + GP_NPCSEV_BOOTHSELL = 19, // 19, Player booth sell + GP_NPCSEV_TRAVEL = 20, // 20, Travel + + GP_NPCSEV_BOOTHBUY = 21, // 21, Player booth buy + GP_NPCSEV_WAYPOINT = 22, // 22 + GP_NPCSEV_FORGETSKILL = 23, // 23 + GP_NPCSEV_FACECHANGE = 24, // 24 + GP_NPCSEV_MAIL = 25, // 25 + + GP_NPCSEV_VENDUE = 26, // 26 + GP_NPCSEV_DBLEXPTIME = 27, // 27 + GP_NPCSEV_HATCHPET = 28, // 28 + GP_NPCSEV_RESTOREPET = 29, // 29 + GP_NPCSEV_BATTLE = 30, // 30 + + GP_NPCSEV_BUILDTOWER = 31, // 31 + GP_NPCSEV_LEAVEBATTLE = 32, // 32 + GP_NPCSEV_RETURNSTATUSPT = 33, // 33 + GP_NPCSEV_ACCOUNTPOINT = 34, // 34 + GP_NPCSEV_REFINE = 35, // 35 + + GP_NPCSEV_PETNAME = 36, // 36, change pet name + GP_NPCSEV_PETSKILL_DEL = 37, // 37, Delete pet skill + GP_NPCSEV_PETSKILL_LEARN = 38, // 38, Learn pet skill + GP_NPCSEV_BIND_ITEM = 39, // 39, Bind item + GP_NPCSEV_DESTROY_BIND = 40, // 40, Destroy bind item + + CP_NPCSEV_CANCEL_DESTROY = 41, // 41, Cancel destroy bind item + GP_NPCSEV_STOCK_TRANSACTION = 42,// 42 + GP_NPCSEV_STOCK_OPERATION = 43, // 43 + GP_NPCSEV_DYE = 44, // 44 + GP_NPCSEV_REFINE_TRANS = 45, // 45 + + GP_NPCSEV_COMPOSE = 46, // 46 + GP_NPCSEV_MAKE_SLOT = 47, // 47 + GP_NPCSEV_GOBLIN_RETURNSTATUSPT = 48, // 48, Return goblin status point + GP_NPCSEV_GOBLIN_RETURNGENIUSPT = 49, // 49, Return goblin genius point + GP_NPCSEV_GOBLINSKILL_LEARN = 50, // 50, Learn goblin skill + + GP_NPCSEV_GOBLINSKILL_DEL = 51, // 51, delete goblin skill + GP_NPCSEV_GOBLIN_REFINE = 52, // 52, Refine goblin + GP_NPCSEV_GOBLIN_REFINETRANSFER = 53, // 53, Transfer refine level + GP_NPCSEV_GOBLIN_DESTROY = 54, // 54, Destroy goblin + GP_NPCSEV_GOBLINEQUIP_DESTROY = 55, // 55, Destroy goblin's equipment + + GP_NPCSEV_DYE_BY_SUIT = 56, // 56, Dye by suit + GP_NPCSEV_REPAIR_DESTROYING_ITEM = 57, // 57, Repair destroying item + GP_NPCSEV_LEVELUP_PRODUCE = 58, // 58, Level up produce + GP_NPCSEV_OPEN_ACCOUNT_BOX = 59, // 59, Open account box + GP_NPCSEV_WEBTRADE = 60, // 60, Web trade + + GP_NPCSEV_GODEVILCONVERT = 61, // 61, Convert between god and evil + GP_NPCSEV_WEDDING_BOOK = 62, // 62 + GP_NPCSEV_WEDDING_INVITE = 63, // 63 + GP_NPCSEV_FACTION_FORTRESS_SERVICE_1 = 64, // 64 + GP_NPCSEV_FACTION_FORTRESS_SERVICE_2 = 65, // 65 + + GP_NPCSEV_FACTION_FORTRESS_SERVICE_3 = 66, // 66 + GP_NPCSEV_PET_DYE = 67, // 67 + GP_NPCSEV_VIEW_TRASHBOX = 68, // 68, check the trash box without password + GP_NPCSEV_ENGRAVE = 69, // 69 + GP_NCPSEV_DPS_DPH_RANK = 70, // 70 + + GP_NPCSEV_ADDONREGEN = 71, // 71 + GP_NPCSEV_FORCE = 72, // 72 + GP_NPCSEV_TRANSMIT_DIRECT = 73, // 73 + GP_NPCSEV_PREVIEW_PRODUCE = 74, // 74 + GP_NPCSEV_COUNTRY_JOINLEAVE = 75,// 75 + + GP_NPCSEV_COUNTRY_LEAVEWAR = 76, // 76 + GP_NPCSEV_MARK = 77, // 77 + GP_NPCSEV_CROSSSERVER_GETIN = 78,// 78 + GP_NPCSEV_CROSSSERVER_GETOUT = 79,// 79 + + GP_NPCSEV_PLAYER_RENAME = 80, // 80 + GP_NPCSEV_STONE_TRANSFER = 81, // 81 + GP_NPCSEV_STONE_REPLACE = 82, // 82 + GP_NPCSEV_KINGSEV = 83, // 83 + GP_NPCSEV_SPLIT_FASHION = 84, // 84 + + GP_NPCSEV_OFFLINESHOP = 85, // 85 + GP_NPCSEV_REINCARNATION = 86, // 86 + GP_NPCSEV_GIFTCARD = 87, // 87 + + GP_NPCSEV_TRICKBATTLE = 88, // 88 + GP_NPCSEV_CARDRESPAWN = 89, // 89 + GP_NPCSEV_FLYSWORDIMPROVE = 90, // 90 + GP_NPCSEV_OPEN_FACTION_PVP = 91, // 91 + + GP_NPCSEV_ADVANCED_PRODUCE = 92, // 92 + GP_NPCSEV_GOLD_SHOP = 93, // 93 + GP_NPCSEV_DIVIDEND_GOLD_SHOP = 94, // 94 + GP_NPCSEV_PLAYER_CHANGE_GENDER = 95; // 95 + } + + // Constants used in moving control public struct MOVECONST { @@ -1465,7 +1585,27 @@ namespace CSNetwork.GPDataType { public byte type; }; - + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_npc_greeting + { + public int idObject; // ID of NPC or player + }; + + public struct cmd_activate_waypoint + { + public ushort waypoint; + }; + + public static class GNETRoles + { + public const int _R_UNMEMBER = 0, + _R_SYSTEM = 1, + _R_MASTER = 2, + _R_VICEMASTER = 3, + _R_BODYGUARD = 4, + _R_POINEER = 5, + _R_MEMBER = 6; + }; //end of Roles public struct cmd_server_time { public int time; diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs index f706650f10..88fe0edc17 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs @@ -395,7 +395,7 @@ namespace CSNetwork } #endif int iHostID = _selectedRole.roleid; - + BMLogger.LogError($"### GameDataSend: CMDID {pCmdHeader}"); switch (pCmdHeader) { case CommandID.PLAYER_INFO_2: @@ -654,6 +654,16 @@ namespace CSNetwork EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_INFO00, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader); break; + case CommandID.NPC_GREETING: + { + EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_NPCGREETING, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader); + break; + } + case CommandID.ACTIVATE_WAYPOINT: + case CommandID.WAYPOINT_LIST: + + EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_WAYPOINT, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader); + break; case CommandID.SERVER_TIME: { cmd_server_time pcmd_server_time = GPDataTypeHelper.FromBytes(pDataBuf); @@ -1052,6 +1062,12 @@ namespace CSNetwork } } + public void c2s_SendCmdNPCSevWaypoint() + { + gamedatasend gamedatasend = new gamedatasend(); + gamedatasend.Data = C2SCommandFactory.CreateNPCSevWaypointCmd(NPC_service_type.GP_NPCSEV_WAYPOINT, 0); + SendProtocol(gamedatasend); + } public void GetRoleBaseInfo(int iNumRole, List aRoleIDs) { int iNumLimit = 128; diff --git a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs index afa6725627..3185b0a712 100644 --- a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs @@ -1,4 +1,5 @@ using BrewMonster; +using BrewMonster.Common; using CSNetwork; using CSNetwork.C2SCommand; using CSNetwork.Protocols; @@ -29,6 +30,8 @@ namespace BrewMonster.Network private string _username = ""; private string _password = ""; + CECStubbornFactionInfoSender m_stubbornFactionInfoSender; + #if UNITY_EDITOR public bool isDebg; private bool lastDebug; @@ -257,6 +260,15 @@ namespace BrewMonster.Network { Instance._gameSession.c2s_CmdSelectTarget(idTarget); } + public static void c2s_CmdNPCSevWaypoint() + { + Instance._gameSession.c2s_SendCmdNPCSevWaypoint(); + } + + public void GetFactionInfo(int iNumFaction, int[] aFactinoIDs) + { + m_stubbornFactionInfoSender.Add(iNumFaction, aFactinoIDs); + } public static void c2s_CmdSendEnterPKPrecinct() { Instance._gameSession.c2s_CmdSendEnterPKPrecinctint(); diff --git a/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs b/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs index 9db97d4859..f3c3990cd2 100644 --- a/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs +++ b/Assets/PerfectWorld/Scripts/Task/CECTaskInterface.cs @@ -1,11 +1,12 @@ using BrewMonster.Network; +using BrewMonster.Scripts.Managers; using BrewMonster.Scripts.Player; +using CSNetwork.GPDataType; +using PerfectWorld.Scripts.Task; +using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using BrewMonster.Scripts.Managers; -using CSNetwork.GPDataType; -using PerfectWorld.Scripts.Task; using UnityEngine; namespace BrewMonster.Scripts.Task @@ -1150,7 +1151,18 @@ namespace BrewMonster.Scripts.Task // use this to avoid task hack by changing the system time return (uint)EC_Game.GetServerAbsTime(); } - } + + private const string SYMBOL_HOSTNAME = "$name"; + + public string FormatTaskTalk(string taskTalk) + { + string ret = taskTalk ?? string.Empty; + if (taskTalk == null) return ret; + + string strName = m_pHost.GetName(); // assumes string; use ToString() if needed + return ret.Replace(SYMBOL_HOSTNAME, $"&{strName}&"); + } + } } diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs.meta b/Assets/PerfectWorld/Scripts/UI/Dialogs.meta new file mode 100644 index 0000000000..2729910a4b --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 072fe2eeccf3b7c4a98f9474ad26f60c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs new file mode 100644 index 0000000000..cc1bc4f40a --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UIElements; + +namespace BrewMonster.UI +{ + public class AUIListBox : MonoBehaviour + { + [SerializeField] private RectTransform content; + [SerializeField] private ScrollView scrollView; + [SerializeField] private ItemUIListBox prefabItemUIListBox; + [SerializeField] private float heightItem = 100f; + [SerializeField] private float paddingY = 10f; + + List m_Item = new List(); + int m_nCurSel = 0; + + const uint AUILISTBOX_ERROR = 0xFFFFFFFF; // same as -1 for uint + public void ResetContent() + { + foreach(var item in m_Item) + { + Destroy(item.gameObject); + } + m_Item.Clear(); + content.anchoredPosition = Vector2.zero; + content.sizeDelta = Vector2.zero; + } + + public void AddString(string pszString) + { + ItemUIListBox item = Instantiate(prefabItemUIListBox, content); + item.SetText(pszString); + item.gameObject.SetActive(true); + m_Item.Add(item); + Vector2 size = content.sizeDelta; + size.y = heightItem * m_Item.Count + m_Item.Count * paddingY; + content.sizeDelta = size; + } + + public int SetItemData(int nIndex, uint dwItemData, int nSubIndex = 0, string strName = "") + { + if (nIndex < 0 || nIndex >= (m_Item.Count)) + return -1; + if (nSubIndex < 0 || nSubIndex >= 20) // #define AUILISTBOX_DATA_NUM AUILISTBOX_MAX_COLUMN 20 + return -1; + m_Item[nIndex].strDataName[nSubIndex] = strName; + m_Item[nIndex].dwData[nSubIndex] = dwItemData; + return nIndex; + } + + public int SetItemDataPtr(int nIndex, object pData, int nSubIndex = 0, string strName = "") + { + if (nIndex < 0 || nIndex >= (m_Item.Count)) + return -1; + if (nSubIndex < 0 || nSubIndex >= 20) // #define AUILISTBOX_DATA_NUM AUILISTBOX_MAX_COLUMN 20 + return -1; + + m_Item[nIndex].strDataPtrName[nSubIndex] = strName; + m_Item[nIndex].pvData[nSubIndex] = pData; + return nIndex; + } + + public int GetCount() + { + return m_Item.Count; + } + + public object GetItemDataPtr(int nIndex, int nSubIndex, string strName) + { + if (nIndex < 0 || nIndex >= m_Item.Count) + return null; + if (nSubIndex < 0 || nSubIndex >= 20) // #define AUILISTBOX_DATA_NUM AUILISTBOX_MAX_COLUMN 20 + return null; + + //if (0 != m_Item[nIndex].pvData[nSubIndex] && strName != m_Item[nIndex].strDataPtrName[nSubIndex]) + // AUI_ReportError(__LINE__, 1, "AUIListBox::GetItemDataPtr(), data name not match"); + return m_Item[nIndex].pvData[nSubIndex]; + } + + public uint GetItemData(int nIndex, int nSubIndex, string strName) + { + if (nIndex < 0 || nIndex >= m_Item.Count) + return AUILISTBOX_ERROR; + if (nSubIndex < 0 || nSubIndex >= 20) + return AUILISTBOX_ERROR; + + //if (0 != m_Item[nIndex].dwData[nSubIndex] && strName != m_Item[nIndex].strDataName[nSubIndex]) + // AUI_ReportError(__LINE__, 1, "AUIListBox::GetItemData(), data name not match"); + return m_Item[nIndex].dwData[nSubIndex]; + } + + public void SetCurSel(int nIndex) + { + //if (nIndex != m_nCurSel) + // UpdateRenderTarget(); + + m_nCurSel = nIndex; + } + + public int GetCurSel() + { + return m_nCurSel; + } + + public string GetText(int nIndex) + { + if (nIndex < 0 || nIndex >= (m_Item.Count)) + return ""; + else + return m_Item[nIndex].strText; + } + } +} diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs.meta b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs.meta new file mode 100644 index 0000000000..cf94da4719 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/AUIListBox.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: e94504b96a4532444acf89e50910d8e1 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs new file mode 100644 index 0000000000..2df0a89c74 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs @@ -0,0 +1,2619 @@ +using BrewMonster.Common; +using BrewMonster.Managers; +using BrewMonster.Network; +using BrewMonster.Scripts.Task; +using CSNetwork; +using CSNetwork.Common; +using CSNetwork.GPDataType; +using ModelRenderer.Scripts.Common; +using ModelRenderer.Scripts.GameData; +using System; +using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Text; +using TMPro; +using UnityEngine; +using static CSNetwork.Common.ExpTypes; + +namespace BrewMonster.UI +{ + public class DlgNPC : MonoBehaviour + { + [SerializeField] private TextMeshProUGUI m_pTxt_npc; + [SerializeField] private TextMeshProUGUI m_pTxt_Content; + [SerializeField] private AUIListBox m_pLst_Main; + + int m_iTracedTaskID; + int m_iTracedTaskNPCID; + CECTimeSafeChecker m_tracedTaskTimer; + bool m_bShow = false; + string m_strDataName = ""; + string m_strDataPtrName = ""; + uint m_dwData; + object m_pvData; + + bool HasTracedTask() + { + return m_iTracedTaskID > 0; + } + + void ResetTraceTaskInfo() + { + m_iTracedTaskNPCID = 0; + m_iTracedTaskID = 0; + m_tracedTaskTimer.Reset(); + } + + public static class NPC_DIALOG + { + public const uint NPC_DIALOG_NULL = 0, + NPC_DIALOG_ESSENCE = 1, + NPC_DIALOG_TALK = 2, + NPC_DIALOG_TASK_LIST = 3, + NPC_DIALOG_TASK_TALK = 4, + NPC_DIALOG_TASK_AWARD = 5; + }; + + public static class CDLGNPC + { + public const uint CDLGNPC_FORGET = 0xFFFFF01, + CDLGNPC_FACTION_CREATE = 0xFFFFF02, + CDLGNPC_FACTION_UPGRADE = 0xFFFFF03, + CDLGNPC_FACTION_DISMISS = 0xFFFFF04, + CDLGNPC_FACE = 0xFFFFF05, + CDLGNPC_MAIL = 0xFFFFF06, + CDLGNPC_AUCTION = 0xFFFFF07, + CDLGNPC_DOUBLEEXP = 0xFFFFF08, + CDLGNPC_PETHATCH = 0xFFFFF09, + CDLGNPC_PETREC = 0xFFFFF0A, + CDLGNPC_BATTLECHALLENGE = 0xFFFFF0B, + CDLGNPC_BATTLEENTER = 0xFFFFF0C, + CDLGNPC_BATTLELEAVE = 0xFFFFF0D, + CDLGNPC_GOLDTRADE = 0xFFFFF0E, + CDLGNPC_EQUIPREFINE = 0xFFFFF10, + CDLGNPC_EQUIPDYE = 0xFFFFF11, + CDLGNPC_REFINETRANS = 0xFFFFF12, + CDLGNPC_EQUIPSLOT = 0xFFFFF13, + CDLGNPC_ELFPRORESET = 0xFFFFF14, + CDLGNPC_ELFGENIUSRESET = 0xFFFFF15, + CDLGNPC_ELFFORGET = 0xFFFFF16, + CDLGNPC_ELFREFINE = 0xFFFFF17, + CDLGNPC_ELFREFINETRANS = 0xFFFFF18, + CDLGNPC_ELFTOPILL = 0xFFFFF19, + CDLGNPC_ELFEQUIPOFF = 0xFFFFF1A, + CDLGNPC_EQUIPREPAIR = 0xFFFFF1B, + CDLGNPC_WEBTRADE = 0xFFFFF1C, + CDLGNPC_GODEVILCONVERT = 0xFFFFF1D, + CDLGNPC_WEDDING_BOOK = 0xFFFFF1E, + CDLGNPC_WEDDING_INVITE = 0xFFFFF1F, + CGLDNPC_FORTRESS_CREATE = 0xFFFFF20, + CGLDNPC_FORTRESS_WAR = 0xFFFFF21, + CGLDNPC_FORTRESS_UPGRADE = 0xFFFFF22, + CGLDNPC_FORTRESS_HANDIN_MATERIAL = 0xFFFFF23, + CGLDNPC_FORTRESS_HANDIN_CONTRIB = 0xFFFFF24, + CGLDNPC_FORTRESS_EXCHANGE_MATERIAL = 0xFFFFF25, + CGLDNPC_FORTRESS_ENTER = 0xFFFFF26, + CGLDNPC_FORTRESS_WARLIST = 0xFFFFF27, + CGLDNPC_FORTRESS_LEAVE = 0xFFFFF28, + CDLGNPC_PETDYE = 0xFFFFF29, + CDLGNPC_VIEW_TRASHBOX = 0xFFFFF30, + CDLGNPC_VIEW_DPS_DPH_RANK = 0xFFFFF31, + CDLGNPC_FORCE_JOIN = 0xFFFFF32, + CDLGNPC_FORCE_QUIT = 0xFFFFF33, + CDLGNPC_JOIN_COUNTRY = 0xFFFFF34, + CDLGNPC_QUIT_COUNTRY = 0xFFFFF35, + CDLGNPC_LEAVE_COUNTRY_WAR = 0xFFFFF36, + CDLGNPC_EQUIP_MARK = 0xFFFFF37, + CDLGNPC_GOTO_SPECIALSERVER = 0xFFFFF38, + CDLGNPC_GOTO_ORIGINALSERVER = 0xFFFFF39, + CDLGNPC_PLAYER_RENAME = 0xFFFFF40, + + CDLGNPC_STONE_CHANGE = 0xFFFFF41, + CDLGNPC_KING_SERVICE = 0xFFFFF42, + CDLGNPC_SPLIT_FASHION = 0xFFFFF43, + CDLGNPC_OFFLINESHOP_SETTING = 0xFFFFF44, + CDLGNPC_OFFLINESHOP_SELLBUY = 0xFFFFF45, + CDLGNPC_REINCARNATION = 0xFFFFF46, + CDLGNPC_GIFTCARD = 0xFFFFF47, + CDLGNPC_TRICKBATTLE = 0xFFFFF48, // , ս + CDLGNPC_CARDRESPAWN = 0xFFFFF49, // ת + CDLGNPC_QUERYCHARIOTAMOUNT = 0xFFFFF50, // ս + CDLGNPC_FLYSWORDIMPROVE = 0xFFFFF51, // ɽǿ + CDLGNPC_OPEN_FACTION_PVP = 0xFFFFF52, // Ӷ + CDLGNPC_FACTION_RENAME = 0xFFFFF53, + CDLGNPC_GOLD_SHOP = 0xFFFFF54, + CDLGNPC_PLAYER_CHANGE_GENDER = 0xFFFFF55; // ޸Ա + }; + + bool PopupTracedTaskDialog(NPC_ESSENCE pEssence) + { + PopupNPCDialog(pEssence); + //if (GetData() == NPC_DIALOG.NPC_DIALOG_ESSENCE) + //{ + // for (int i = 0; i < m_pLst_Main.GetCount() - 1; ++i) + // { + // object pData = m_pLst_Main.GetItemDataPtr(i, 0, ""); + // uint iService = m_pLst_Main.GetItemData(i, 0, ""); + // DATA_TYPE DataType = DATA_TYPE.DT_INVALID; + // EC_Game.GetElementDataMan().get_data_ptr(iService, ID_SPACE.ID_SPACE_ESSENCE, ref DataType); + // if (DataType == DATA_TYPE.DT_NPC_TASK_IN_SERVICE || + // DataType == DATA_TYPE.DT_NPC_TASK_OUT_SERVICE || + // DataType == DATA_TYPE.DT_NPC_TASK_MATTER_SERVICE) + // { + // SelectListItem(i); + // break; + // } + // } + //} + //if (GetData() == NPC_DIALOG.NPC_DIALOG_TASK_LIST) + //{ + // for (int i = 0; i < m_pLst_Main.GetCount() - 1; ++i) + // { + // UINT64 taskid = m_pLst_Main.GetItemData64(i, 0, "TaskID"); + // if (taskid == m_iTracedTaskID) + // { + // SelectListItem(i); + // return GetData() == NPC_DIALOG.NPC_DIALOG_TASK_TALK; + // } + // } + //} + return false; + } + + public void PopupDialog(NPC_ESSENCE pEssence) + { + if (HasTracedTask()) + { + if (m_tracedTaskTimer.IsTimeArrived()) + { + ResetTraceTaskInfo(); + } + } + if (HasTracedTask()) + { + CECNPC pNPC = (EC_ManMessageMono.Instance._CECNPCMan.SeekOutNPC(m_iTracedTaskNPCID)); + if (pNPC) + { + if (pEssence.id == pNPC.GetNPCID()) + { + if (!PopupTracedTaskDialog(pEssence)) + { + if (!m_bShow) + { + ResetTraceTaskInfo(); + return; + } + PopupNPCDialog(pEssence); + } + } + } + else + { + GetGameUIMan().EndNPCService(); + } + ResetTraceTaskInfo(); + } + else + { + PopupNPCDialog(pEssence); + } + } + + private string GetStringFromTable(int idString) + { + CECGameUIMan gameUIMan = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan(); + string str = gameUIMan.GetStringFromAuiDialogTable(idString); + if(str == null) + { + return gameUIMan.GetStringFromTable(idString); + } + return str; + } + + private void Show(bool value) + { + + } + + private CECGameUIMan GetGameUIMan() + { + return EC_Game.GetGameRun().GetUIManager().GetInGameUIMan(); + } + + private CECHostPlayer GetHostPlayer() + { + return EC_ManMessageMono.Instance.EC_ManPlayer.GetHostPlayer(); + } + + void PopupNPCDialog(NPC_ESSENCE pEssence) + { + + int i; + object pData; + DATA_TYPE DataType = new DATA_TYPE(); + string strText = GetStringFromTable(249); + elementdataman pDataMan = EC_Game.GetElementDataMan(); + + Show(true); + + //test + // pEssence.id_goblin_skill_service = 1; + uint[] a_uiService = + { + pEssence.id_talk_service, // ̸ķID + pEssence.id_sell_service, // ƷķID + pEssence.id_buy_service, // չƷķID + pEssence.id_install_service, // װǶƷķID + pEssence.id_uninstall_service, // ǶƷķID + pEssence.id_skill_service, // ڼܵķID + pEssence.id_heal_service, // ƵķID + pEssence.id_transmit_service, // ͵ķID + pEssence.id_transport_service, // ķID + pEssence.id_proxy_service, // ۵ķID + pEssence.id_storage_service, // ֿķID + pEssence.id_make_service, // ķID + pEssence.id_decompose_service, // ֽķID + pEssence.id_identify_service, // ķID + pEssence.id_war_towerbuild_service,// ķID + pEssence.id_resetprop_service, // ϴķID + pEssence.id_petname_service, // + pEssence.id_petlearnskill_service, // ѧϰܷ + pEssence.id_petforgetskill_service,// ܷ + pEssence.id_equipbind_service, // װ󶨷 + pEssence.id_equipdestroy_service, // װٷ + pEssence.id_equipundestroy_service,// װٷ + pEssence.id_goblin_skill_service, // Сѧϰ + pEssence.id_engrave_service, // Կ̷ + pEssence.id_randprop_service, // + pEssence.id_force_service, // + }; + + GetGameUIMan().m_pCurNPCEssence = (NPC_ESSENCE)pEssence; + + SetData(NPC_DIALOG.NPC_DIALOG_ESSENCE, ""); + m_pTxt_npc.SetText(Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pEssence.name))); + m_pTxt_Content.SetText(Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pEssence.hello_msg))); + + //m_pLst_Main.SetHOver(true); + m_pLst_Main.ResetContent(); + + + //add for test by czx + // int old = pEssence.combined_services | 0xFFFE0000; + // ((NPC_ESSENCE *)pEssence).combined_services = old; + + //if ((pEssence.combined_services & 0x01) != 0) // Add "forget" skill. + //{ + // CECSkill pSkill; + + // for (i = 0; i < GetHostPlayer().GetPassiveSkillNum(); i++) + // { + // pSkill = GetHostPlayer().GetPassiveSkillByIndex(i); + // if (pSkill.GetType() == CECSkill::TYPE_PRODUCE) + // { + // m_pLst_Main.AddString(strText + GetStringFromTable(558)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC_FORGET); + // m_pLst_Main.SetItemDataPtr(m_pLst_Main.GetCount() - 1, (void*)pSkill); + // break; + // } + // } + //} + if ((pEssence.combined_services & 0x02) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(885)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_EQUIPSLOT); + } + if ((pEssence.combined_services & 0x10) != 0) // Add "faction" service. + { + if (GetHostPlayer().GetFactionID() <= 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(592)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FACTION_CREATE); + } + else if (GetHostPlayer().GetFRoleID() == GNETRoles._R_MASTER) + { + int idFaction = GetHostPlayer().GetFactionID(); + CECFactionMan pFMan = EC_Game.GetFactionMan(); + Faction_Info pInfo = pFMan.GetFaction((uint)idFaction, false); + + if (pInfo != null && pInfo.GetLevel() <= 1) + { + m_pLst_Main.AddString(strText + GetStringFromTable(593)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FACTION_UPGRADE); + } + + m_pLst_Main.AddString(strText + GetStringFromTable(11436)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FACTION_RENAME); + + m_pLst_Main.AddString(strText + GetStringFromTable(594)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FACTION_DISMISS); + } + } + if ((pEssence.combined_services & 0x20) != 0 && + !GetHostPlayer().HasEffectType(CECPlayer.Effect_type.EFF_FACEPILL)) + { + m_pLst_Main.AddString(strText + GetStringFromTable(595)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FACE); + } + + if ((pEssence.combined_services & 0x40) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(634)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_MAIL); + } + + if ((pEssence.combined_services & 0x80) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(644)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_AUCTION); + } + + // if( pEssence.combined_services & 0x100 ) + // { + // m_pLst_Main.AddString(strText + GetStringFromTable(683)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC_DOUBLEEXP); + // } + + if ((pEssence.combined_services & 0x200) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(691)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_PETHATCH); + } + + if ((pEssence.combined_services & 0x400) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(692)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_PETREC); + } + + if ((pEssence.combined_services & 0x2000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(734)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GOLDTRADE); + } + + + if ((pEssence.combined_services & 0x4000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(769)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_EQUIPREFINE); + } + + if ((pEssence.combined_services & 0x8000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(874)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_EQUIPDYE); + + m_pLst_Main.AddString(strText + GetStringFromTable(9323)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_PETDYE); + } + + if ((pEssence.combined_services & 0x10000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(878)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_REFINETRANS); + } + + if ((pEssence.combined_services & 0x800000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7921)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_EQUIPREPAIR); + } + + if ((pEssence.combined_services & 0x1000000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(8600)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_WEBTRADE); + } + + if ((pEssence.combined_services & 0x2000000) != 0) + { + if (GetHostPlayer().GetBasicProps().iLevel2 >= 20) + { + m_pLst_Main.AddString(strText + GetStringFromTable(8601)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GODEVILCONVERT); + } + } + + if ((pEssence.combined_services & 0x4000000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(8740)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_WEDDING_BOOK); + m_pLst_Main.AddString(strText + GetStringFromTable(8741)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_WEDDING_INVITE); + } + + bool bFortressOK = false; + while (true) + { + int idFaction = GetHostPlayer().GetFactionID(); + if (idFaction <= 0 || + EC_Game.GetFactionMan().GetFaction((uint)idFaction, false) == null) + { + // ްɡ߰Ϣδѯ + break; + } + + if (GetHostPlayer().GetFactionFortressConfig().require_level == int.MinValue) // this replace logic == null + { + // ûлñ + break; + } + + bFortressOK = true; + break; + } + + bool bMaster = false, bViceMaster = false, bBodyGuard = false; + CECHostPlayer pHost = GetHostPlayer(); + if (pHost.GetFactionID() > 0) + { + switch (pHost.GetFRoleID()) + { + case GNETRoles._R_MASTER: + bMaster = true; + break; + case GNETRoles._R_VICEMASTER: + bViceMaster = true; + break; + case GNETRoles._R_BODYGUARD: + bBodyGuard = true; + break; + } + } + bool bInFortressNow = pHost.IsInFortress(); + + if (bFortressOK) + { + // ɻ + + if ((pEssence.combined_services & 0x8000000) != 0) + { + if (bMaster) + { + // Դ + m_pLst_Main.AddString(strText + GetStringFromTable(9101)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_CREATE); + } + // if (bMaster || bViceMaster) + // { + // // Դս + // m_pLst_Main.AddString(strText + GetStringFromTable(9102)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CGLDNPC_FORTRESS_WAR); + // } + + if (!bInFortressNow) + { + // ʱɽҷ + m_pLst_Main.AddString(strText + GetStringFromTable(9107)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_ENTER); + } + + // ʱɲ鿴ս + // m_pLst_Main.AddString(strText + GetStringFromTable(9108)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CGLDNPC_FORTRESS_WARLIST); + } + + if ((pEssence.combined_services & 0x10000000) != 0) + { + if (bMaster) + { + if (!GetHostPlayer().IsInFortressWar()) + { + // սʱʩ + m_pLst_Main.AddString(strText + GetStringFromTable(9103)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_UPGRADE); + } + } + + // ڿԽɲ + m_pLst_Main.AddString(strText + GetStringFromTable(9104)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_HANDIN_MATERIAL); + + // ڿԽɹ׶ + m_pLst_Main.AddString(strText + GetStringFromTable(9105)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_HANDIN_CONTRIB); + + if (bInFortressNow) + { + // ڿ뿪 + m_pLst_Main.AddString(strText + GetStringFromTable(9109)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_LEAVE); + } + } + + if ((pEssence.combined_services & 0x20000000) != 0) + { + if (bMaster) + { + // Զһ + m_pLst_Main.AddString(strText + GetStringFromTable(9106)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_EXCHANGE_MATERIAL); + } + } + } + + if ((pEssence.combined_services & 0x8000000) != 0) + { + if (EC_Game.g_bEnableFortressDeclareWar) + { + m_pLst_Main.AddString(strText + GetStringFromTable(9102)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CGLDNPC_FORTRESS_WAR); + } + } + + // check the storage without password + if ((pEssence.combined_services & 0x40000000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(9299)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_VIEW_TRASHBOX); + } + + if ((pEssence.combined_services & 0x80000000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(9340)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_VIEW_DPS_DPH_RANK); + } + + if ((pEssence.combined_services2 & 0x00000001) != 0) + { + bool bHasCountry = GetHostPlayer().GetCountry() > 0; + m_pLst_Main.AddString(strText + GetStringFromTable(bHasCountry ? 9763 : 9762)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, bHasCountry ? CDLGNPC.CDLGNPC_QUIT_COUNTRY : CDLGNPC.CDLGNPC_JOIN_COUNTRY); + } + + if ((pEssence.combined_services2 & 0x00000002) != 0) + { + //if (GetHostPlayer().IsInCountryWar()) + //{ + // m_pLst_Main.AddString(strText + GetStringFromTable(9914)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_LEAVE_COUNTRY_WAR); + //} + } + + if ((pEssence.combined_services2 & 0x00000004) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(9994)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_EQUIP_MARK); + } + + if ((pEssence.combined_services2 & 0x00000008) != 0) + { + //if (!CECCrossServer.Instance().IsOnSpecialServer()) + //{ + // m_pLst_Main.AddString(strText + GetStringFromTable(10132)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GOTO_SPECIALSERVER); + //} + } + + if ((pEssence.combined_services2 & 0x00000010) != 0) + { + //if (CECCrossServer.Instance().IsOnSpecialServer()) + //{ + // m_pLst_Main.AddString(strText + GetStringFromTable(10133)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GOTO_ORIGINALSERVER); + //} + } + // + if ((pEssence.combined_services2 & 0x00000020) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10150)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_PLAYER_RENAME); + } + // ʯת + bool bHasStoneChange = (pEssence.combined_services2 & 0x00000040) != 0; + if (bHasStoneChange) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10172)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_STONE_CHANGE); + } + // + if ((pEssence.combined_services2 & 0x00000080) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10304)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_KING_SERVICE); + } + // + if ((pEssence.combined_services2 & 0x00000100) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10508)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_OFFLINESHOP_SETTING); + + m_pLst_Main.AddString(strText + GetStringFromTable(10513)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_OFFLINESHOP_SELLBUY); + } + // ʱװ + if ((pEssence.combined_services2 & 0x00000200) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10430)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_SPLIT_FASHION); + } + if ((pEssence.combined_services2 & 0x00000400) != 0) + { + // ת汾 + if (GetHostPlayer().GetReincarnationCount() < CECPlayer.MAX_REINCARNATION) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10800)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_REINCARNATION); + } + } + if ((pEssence.combined_services2 & 0x00000800) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10820)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GIFTCARD); + } + if ((pEssence.combined_services2 & 0x00001000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(10890)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_TRICKBATTLE); + } + if ((pEssence.combined_services2 & 0x00002000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(11000)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_CARDRESPAWN); + } + if ((pEssence.combined_services2 & 0x00001000) != 0) // սnpc Զиķͻˣ + { + m_pLst_Main.AddString(strText + GetStringFromTable(10912)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_QUERYCHARIOTAMOUNT); + } + if ((pEssence.combined_services2 & 0x00004000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(11193)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_FLYSWORDIMPROVE); + } + if ((pEssence.combined_services2 & 0x00008000) != 0) + { + if (!pHost.IsInFactionPVP() && (bMaster || bViceMaster || bBodyGuard)) + { + m_pLst_Main.AddString(strText + GetStringFromTable(11270)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_OPEN_FACTION_PVP); + } + } + if ((pEssence.combined_services2 & 0x00010000) != 0 || + (pEssence.combined_services2 & 0x00020000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(11437)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_GOLD_SHOP); + } + + if ((pEssence.combined_services2 & 0x00040000) != 0) + { + //if (CECProfConfig::Instance().IsExist(GetHostPlayer().GetProfession(), CECProfConfig::Instance().GetCounterpartGender(GetHostPlayer().GetGender()))) + //{ + // m_pLst_Main.AddString(strText + GetStringFromTable(11438)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_PLAYER_CHANGE_GENDER); + //} + } + + for (i = 0; i < a_uiService.Length; i++) + { + if (a_uiService[i] == 0) continue; + + pData = ElementDataManProvider.GetElementDataMan().get_data_ptr(a_uiService[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType); + + if (DataType == DATA_TYPE.DT_NPC_TALK_SERVICE) + { + NPC_TALK_SERVICE pService = (NPC_TALK_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_SELL_SERVICE) + { + NPC_SELL_SERVICE pService = (NPC_SELL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_BUY_SERVICE) + { + continue; + } + else if (DataType == DATA_TYPE.DT_NPC_REPAIR_SERVICE) + { + NPC_REPAIR_SERVICE pService = (NPC_REPAIR_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_INSTALL_SERVICE) + { + NPC_INSTALL_SERVICE pService = (NPC_INSTALL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_UNINSTALL_SERVICE) + { + NPC_UNINSTALL_SERVICE pService = (NPC_UNINSTALL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_SKILL_SERVICE) + { + NPC_SKILL_SERVICE pService = (NPC_SKILL_SERVICE)pData; + if (i >= 18) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7107)); + } + else + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_HEAL_SERVICE) + { + NPC_HEAL_SERVICE pService = (NPC_HEAL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_TRANSMIT_SERVICE) + { + NPC_TRANSMIT_SERVICE pService = (NPC_TRANSMIT_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_TRANSPORT_SERVICE) + { + NPC_TRANSPORT_SERVICE pService = (NPC_TRANSPORT_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_PROXY_SERVICE) + { + NPC_PROXY_SERVICE pService = (NPC_PROXY_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_STORAGE_SERVICE) + { + NPC_STORAGE_SERVICE pService = (NPC_STORAGE_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, a_uiService[i]); + m_pLst_Main.AddString(strText + GetStringFromTable(253)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, a_uiService[i]); + m_pLst_Main.AddString(strText + GetStringFromTable(8080)); + } + else if (DataType == DATA_TYPE.DT_NPC_MAKE_SERVICE) + { + NPC_MAKE_SERVICE pService = (NPC_MAKE_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_DECOMPOSE_SERVICE) + { + //NPC_DECOMPOSE_SERVICE pService = (NPC_DECOMPOSE_SERVICE)pData; + //CECHostPlayer pHost = GetHostPlayer(); + //CECSkill pSkill; + //int j = 0; + //for (j = 0; j < pHost.GetPassiveSkillNum(); j++) + //{ + // pSkill = pHost.GetPassiveSkillByIndex(j); + // if ((pSkill.GetType() == CECSkill::TYPE_LIVE || + // pSkill.GetType() == CECSkill::TYPE_PRODUCE) && + // (int)pService.id_decompose_skill == pSkill.GetSkillID()) + // { + // m_pLst_Main.AddString(strText + pService.name); + // break; + // } + //} + //if (j == pHost.GetPassiveSkillNum()) + // continue; + } + else if (DataType == DATA_TYPE.DT_NPC_IDENTIFY_SERVICE) + { + NPC_IDENTIFY_SERVICE pService = (NPC_IDENTIFY_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_WAR_TOWERBUILD_SERVICE) + { + NPC_WAR_TOWERBUILD_SERVICE pService = (NPC_WAR_TOWERBUILD_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_RESETPROP_SERVICE) + { + NPC_RESETPROP_SERVICE pService = (NPC_RESETPROP_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_PETNAME_SERVICE) + { + NPC_PETNAME_SERVICE pService = (NPC_PETNAME_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_PETLEARNSKILL_SERVICE) + { + NPC_PETLEARNSKILL_SERVICE pService = (NPC_PETLEARNSKILL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_PETFORGETSKILL_SERVICE) + { + NPC_PETFORGETSKILL_SERVICE pService = (NPC_PETFORGETSKILL_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPBIND_SERVICE) + { + NPC_EQUIPBIND_SERVICE pService = (NPC_EQUIPBIND_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPDESTROY_SERVICE) + { + NPC_EQUIPDESTROY_SERVICE pService = (NPC_EQUIPDESTROY_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPUNDESTROY_SERVICE) + { + NPC_EQUIPUNDESTROY_SERVICE pService = (NPC_EQUIPUNDESTROY_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_ENGRAVE_SERVICE) + { + NPC_ENGRAVE_SERVICE pService = (NPC_ENGRAVE_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_RANDPROP_SERVICE) + { + NPC_RANDPROP_SERVICE pService = (NPC_RANDPROP_SERVICE)pData; + m_pLst_Main.AddString(strText + Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pService.name))); + } + else if (DataType == DATA_TYPE.DT_NPC_FORCE_SERVICE) + { + //NPC_FORCE_SERVICE pService = (NPC_FORCE_SERVICE)pData; + //uint npcForce = pService.force_id; + //int playerForce = GetHostPlayer().GetForce(); + //FORCE_CONFIG pConfig = CECForceMgr::GetForceData(npcForce); + //if (pConfig && (npcForce == playerForce || !playerForce)) + //{ + // string strForce; + // strForce.Format(GetStringFromTable(playerForce ? 9401 : 9400), pConfig.name); + // m_pLst_Main.AddString(strText + strForce); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, playerForce ? CDLGNPC_FORCE_QUIT : CDLGNPC_FORCE_JOIN); + // m_pLst_Main.SetItemDataPtr(m_pLst_Main.GetCount() - 1, (void*)pData); + //} + + // hide the invalid force option + continue; + } + else + { + // δʶķ + continue; + } + + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, a_uiService[i]); + m_pLst_Main.SetItemDataPtr(m_pLst_Main.GetCount() - 1, pData); + } + //add for goblin by czx + if ((pEssence.combined_services & 0x400000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7106)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFEQUIPOFF); + } + if ((pEssence.combined_services & 0x200000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7100)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFPRORESET); + } + if ((pEssence.combined_services & 0x40000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7101)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFGENIUSRESET); + } + if ((pEssence.combined_services & 0x80000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7102)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFFORGET); + } + if ((pEssence.combined_services & 0x200000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7105)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFTOPILL); + } + if ((pEssence.combined_services & 0x100000) != 0) + { + m_pLst_Main.AddString(strText + GetStringFromTable(7103)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFREFINE); + m_pLst_Main.AddString(strText + GetStringFromTable(7104)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC.CDLGNPC_ELFREFINETRANS); + } + + //if (UnityGameSession.GetServerAttr().battle == 1) + //{ + // if (GetGameUIMan().m_pDlgGuildMap.IsBattleOpen() && + // (pEssence.combined_services & 0x800)) + // { + // long stime = GetGame().GetServerGMTTime(); + // stime -= GetGame().GetTimeZoneBias() * 60; // localtime = UTC - bias, in which bias is minute + // tm* gtime = gmtime(&stime); + // // if( gtime.tm_wday == 1 && gtime.tm_hour >= 19 ) + // if (GetGameUIMan().m_pDlgGuildMap.IsBattleChallengeOpen()) + // // && GetHostPlayer().GetFRoleID() == GNETRoles._R_MASTER ) + // { + // m_pLst_Main.AddString(strText + GetStringFromTable(699)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC_BATTLECHALLENGE); + // } + // // if( gtime.tm_wday == 5 && gtime.tm_hour >= 18 || + // // gtime.tm_wday == 6 || + // // gtime.tm_wday == 0 ) + // if (GetHostPlayer().GetFRoleID() != GNETRoles._R_UNMEMBER) + // { + // m_pLst_Main.AddString(strText + GetStringFromTable(722)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC_BATTLEENTER); + // } + // } + + // if (pEssence.combined_services & 0x1000) + // { + // m_pLst_Main.AddString(strText + GetStringFromTable(724)); + // m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, CDLGNPC_BATTLELEAVE); + // } + //} + + // ĩβӣжԡءʾбֱʾб + CheckTaskService(pEssence); + + if (pEssence.domain_related == 1) + { + if (GetHostPlayer().GetFRoleID() == GNETRoles._R_UNMEMBER) + m_pLst_Main.ResetContent(); + //else + //{ + // CECNPCMan pNPCMan = GetWorld().GetNPCMan(); + // CECNPC pNPC = pNPCMan.GetNPC(GetHostPlayer().GetCurServiceNPC()); + // if (pNPC) + // { + // A3DVECTOR3 pos = pNPC.GetServerPos(); + // CECWorld pWorld = GetWorld(); + // CELPrecinct pPrecinct = pWorld.GetPrecinctSet().IsPointIn( + // pos.x, pos.z, pWorld.GetInstanceID()); + // if (pPrecinct) + // { + // int idDomain = pPrecinct.GetDomainID(); + // DOMAIN_INFO* pInfo = CECDomainGuildInfo::Instance().Find(idDomain); + // int idFaction = pInfo ? pInfo.id_owner : -1; + + // if (GetHostPlayer().GetFactionID() != idFaction) + // m_pLst_Main.ResetContent(); + // } + // } + //} + } + + // Add "EXIT" choice. + m_pLst_Main.AddString(GetStringFromTable(503)); + + // Update list height for diffent service count + //if (pEssence.id != m_lastNPCID) + //{ + // m_lastNPCID = pEssence.id; + + // // Compute new list height + // const float fScale = GetGameUIMan().GetWindowScale(); + // const int c_heightPerItem = int(18 * fScale); + // const int c_minListHeight = int(101 * fScale); + // const int c_minTextHeight = int(135 * fScale); + // int itemCount = m_pLst_Main.GetCount(); + // int newListHeight = itemCount * c_heightPerItem + 1; + // newListHeight = max(newListHeight, c_minListHeight); + // SIZE sizeText = m_pTxt_Content.GetSize(); + // SIZE sizeList = m_pLst_Main.GetSize(); + // if (sizeText.cy - (newListHeight - sizeList.cy) < c_minTextHeight) + // newListHeight = sizeText.cy - c_minTextHeight + sizeList.cy; + + // // Compute list height change + // int deltaListHeight = newListHeight - sizeList.cy; + + // // Adjust controls according to height change + // if (deltaListHeight) + // { + // POINT pos = m_pLst_Main.GetPos(true); + // m_pLst_Main.SetPos(pos.x, pos.y - deltaListHeight); + // m_pLst_Main.SetSize(sizeList.cx, sizeList.cy + deltaListHeight); + // m_pTxt_Content.SetSize(sizeText.cx, sizeText.cy - deltaListHeight); + // } + //} + + //GetGameUIMan().m_bShowAllPanels = true; + } + + void CheckTaskService(NPC_ESSENCE pEssence) + { + + uint[] a_uiService2 = + { + pEssence.id_task_out_service, // صķID: + pEssence.id_task_in_service, // صķID: ֤ + pEssence.id_task_matter_service, // صķID: Ʒ + }; + + object pData; + DATA_TYPE DataType = new DATA_TYPE(); + string strText = GetStringFromTable(249); + elementdataman pDataMan = EC_Game.GetElementDataMan(); + + // flag if this NPC contains task related service + uint validTaskService = 0; + + // flag if we only got storage task service + bool isStorageTaskOnly = true; + + // flag if storage task exists + NPC_TASK_OUT_SERVICE pStorageService = new NPC_TASK_OUT_SERVICE(); + pStorageService.storage_deliver_per_day = int.MinValue; + + // + // this loop will set values to these flags by checking current NPC data + // + for (int i = 0; i < a_uiService2.Length; i++) + { + if (a_uiService2[i] == 0) continue; + + pData = ElementDataManProvider.GetElementDataMan().get_data_ptr(a_uiService2[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType); + + // ignore other service + if (DataType != DATA_TYPE.DT_NPC_TASK_IN_SERVICE && + DataType != DATA_TYPE.DT_NPC_TASK_OUT_SERVICE && + DataType != DATA_TYPE.DT_NPC_TASK_MATTER_SERVICE) + { + continue; + } + + if (DataType != DATA_TYPE.DT_NPC_TASK_OUT_SERVICE) + { + validTaskService = a_uiService2[i]; + isStorageTaskOnly = false; + } + else + { + // do not update if we got other task service already + if (validTaskService == 0) validTaskService = a_uiService2[i]; + + // check whether this is a task storage + NPC_TASK_OUT_SERVICE pService = (NPC_TASK_OUT_SERVICE)pData; + if (pService.storage_id == 0 || pService.storage_open_item == 0) + { + isStorageTaskOnly = false; + } + else + { + pStorageService = pService; + } + } + } + // make sure this flag is not conflicted with others + isStorageTaskOnly = isStorageTaskOnly && validTaskService != 0 && pStorageService.storage_deliver_per_day != int.MinValue; + + + // setup the menu item based on these flags + if (validTaskService != 0) + { + bool isEmptyMenu = (m_pLst_Main.GetCount() <= 0); + + if (isEmptyMenu && pStorageService.storage_deliver_per_day == int.MinValue) + { + // ûзѡֱӵ + PopupTaskDialog(true); + } + else + { + if (pStorageService.storage_deliver_per_day != int.MinValue) + { + // add a menu item for task storage + m_pLst_Main.AddString(strText + ("") + pStorageService.name + ""); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, pEssence.id_task_out_service); + m_pLst_Main.SetItemDataPtr(m_pLst_Main.GetCount() - 1, pStorageService); + } + + isEmptyMenu = (m_pLst_Main.GetCount() <= 0); + + if (!isEmptyMenu && !isStorageTaskOnly) + { + pData = pDataMan.get_data_ptr(validTaskService, ID_SPACE.ID_SPACE_ESSENCE, ref DataType); + + // ݣؼзڡء + m_pLst_Main.AddString(strText + GetStringFromTable(244)); + m_pLst_Main.SetItemData(m_pLst_Main.GetCount() - 1, validTaskService); + m_pLst_Main.SetItemDataPtr(m_pLst_Main.GetCount() - 1, pData); + } + } + } + } + + void PopupTaskDialog(bool bTaskNPC) + { + //NPC_ESSENCE pCurNPCEssence = GetGameUIMan().m_pCurNPCEssence; + //NPC_ESSENCE pEssence = pCurNPCEssence; + ////if (!pEssence) return; + + //int i, j, idTask; + //object pData; + //DATA_TYPE DataType = new DATA_TYPE(); + //unsigned int* a_idTask; + //uint[] a_uiService = + //{ + // pEssence.id_task_out_service, // صķID: + // pEssence.id_task_in_service, // صķID: ֤ + // pEssence.id_task_matter_service // صķID: Ʒ + // }; + //int idLastTask = 0, nLastTaskTime = 0, nFinishTime; + //elementdataman pDataMan = EC_Game.GetElementDataMan(); + //abase::vector taskIn, taskOut, taskMatter; + //CECTaskInterface* pTask = GetHostPlayer().GetTaskInterface(); + + //for (i = 0; i < sizeof(a_uiService) / sizeof(unsigned int) ; i++ ) + //{ + // pData = pDataMan.get_data_ptr(a_uiService[i], ID_SPACE_ESSENCE, DataType); + + // if (DataType == DT_NPC_TASK_IN_SERVICE || + // DataType == DT_NPC_TASK_OUT_SERVICE) + // { + // int total_count = 0; + + // if (DataType == DT_NPC_TASK_IN_SERVICE) + // { + // NPC_TASK_IN_SERVICE* pService = (NPC_TASK_IN_SERVICE*)pData; + // a_idTask = pService.id_tasks; + // total_count = sizeof(pService.id_tasks) / sizeof(pService.id_tasks[0]); + // } + // else + // { + // NPC_TASK_OUT_SERVICE* pService = (NPC_TASK_OUT_SERVICE*)pData; + + // // if storage task not exists + // if (pService.storage_id == 0 || pService.storage_open_item == 0) + // { + // a_idTask = pService.id_tasks; + // total_count = sizeof(pService.id_tasks) / sizeof(pService.id_tasks[0]); + // } + // } + + // for (j = 0; j < total_count; j++) + // { + // idTask = a_idTask[j]; + // if (idTask <= 0) continue; + + // if (DataType == DT_NPC_TASK_IN_SERVICE) + // taskIn.push_back(TASK_ITEM(idTask, a_uiService[i])); + // else + // taskOut.push_back(TASK_ITEM(idTask, a_uiService[i])); + + // nFinishTime = (int)pTask.GetTaskFinishedTime(idTask); + // if (nFinishTime > nLastTaskTime) + // { + // idLastTask = idTask; + // nLastTaskTime = nFinishTime; + // } + // } + // } + // else if (DataType == DT_NPC_TASK_MATTER_SERVICE) + // { + // NPC_TASK_MATTER_SERVICE* pService = (NPC_TASK_MATTER_SERVICE*)pData; + + // for (j = 0; j < 16; j++) + // { + // idTask = pService.tasks[j].id_task; + // if (idTask > 0) + // { + // taskMatter.push_back(TASK_ITEM(idTask, a_uiService[i])); + // } + // } + // } + //} + + //A3DCOLOR color; + //string strText; + //const talk_proc* pTalk; + //ATaskTempl* pTemp, *pTempRoot; + //int nIndex, nNumTasks = 0; + //int nHostLevel = GetHostPlayer().GetBasicProps().iLevel; + //ATaskTemplMan* pTempMan = g_pGame.GetTaskTemplateMan(); + + //m_pLst_Main.ResetContent(); + //abase::vector* a_uiTasks[] = { &taskIn, &taskOut, &taskMatter }; + //for (int idx = 0; idx < sizeof(a_uiTasks) / sizeof(a_uiTasks[0]); idx++) + //{ + // abase::vector::iterator it; + // for (it = a_uiTasks[idx].begin(); it != a_uiTasks[idx].end(); ++it) + // { + // idTask = it.task_id; + + // color = 0; + // bool bNeedSetSpecialColor = false; + // pTemp = NULL; + // pTalk = NULL; + // color = m_pLst_Main.GetColor(); + // strText = GetStringFromTable(249); + + // if (idx == 1) + // { + // if (pTask.HasTask(idTask)) + // { + // if (!pTask.CanFinishTask(idTask)) + // { + // pTemp = pTempMan.GetTaskTemplByID(idTask); + // pTalk = pTemp.GetUnfinishedTalk(); + // } + // } + // else if (pTask.CanShowTask(idTask)) + // { + // pTemp = pTempMan.GetTaskTemplByID(idTask); + + // if (0 == pTask.CanDeliverTask(idTask)) + // pTalk = pTemp.GetDeliverTaskTalk(); + // else + // { + // pTalk = pTemp.GetUnqualifiedTalk(); + // color = A3DCOLORRGB(128, 128, 128); + // bNeedSetSpecialColor = true; + // } + // } + // } + + // if (idx == 0 && pTask.HasTask(idTask) + // && pTask.CanFinishTask(idTask) && !pTalk) + // { + // pTemp = pTempMan.GetTaskTemplByID(idTask); + // pTalk = pTemp.GetAwardTalk(); + // strText = GetStringFromTable(302); + // } + + // if (pTemp && pTalk && (pTalk.num_window > 1 || pTalk.num_window == 1 && wcslen(pTalk.windows[0].talk_text))) + // { + // if (pTemp.IsKeyTask()) + // { + // color = A3DCOLORRGB(255, 162, 0); + // bNeedSetSpecialColor = true; + // } + // else if (color != 0) + // { + // // ȥ񼶱ıɫ߼ + // /* + // nLevel = pTemp.GetSuitableLevel(); + // if( nHostLevel <= nLevel - 2 ) + // color = A3DCOLORRGB(255, 54, 0); + // else if( nHostLevel >= nLevel + 3 ) + // color = A3DCOLORRGB(22, 142, 54); + // */ + // } + + + // pTempRoot = (ATaskTempl*)pTemp.GetTopTask(); + // if (pTemp != pTempRoot) + // { + // if (bNeedSetSpecialColor) + // { + // strText += CDlgTask::GetTaskNameWithOutColor(pTempRoot); + // } + // else + // { + // strText += CDlgTask::GetTaskNameWithColor(pTempRoot); + // } + // strText += _AL(" - "); + // } + // if (bNeedSetSpecialColor) + // { + // strText += CDlgTask::GetTaskNameWithOutColor(pTemp); + // } + // else + // { + // strText += CDlgTask::GetTaskNameWithColor(pTemp); + // } + // m_pLst_Main.AddString(strText); + // nIndex = m_pLst_Main.GetCount() - 1; + // m_pLst_Main.SetItemData(nIndex, it.service); // Service ID. + // m_pLst_Main.SetItemDataPtr(nIndex, (void*)pTalk); // Talk data. + // m_pLst_Main.SetItemData64(nIndex, pTemp.GetID(), 0, "TaskID"); + + // if (bNeedSetSpecialColor) + // { + // m_pLst_Main.SetItemTextColor(nIndex, color); + // } + // nNumTasks++; + // } + // } + //} + + //if (idLastTask > 0) + //{ + // pTemp = pTempMan.GetTaskTemplByID(idLastTask); + // if (a_strlen(pTemp.GetTribute()) > 0) + // m_pTxt_Content.SetText(pTemp.GetTribute()); + // else + // { + // if (nNumTasks > 0) + // m_pTxt_Content.SetText(GetStringFromTable(502)); + // else + // m_pTxt_Content.SetText(GetStringFromTable(501)); + // } + //} + //else if (bTaskNPC) + // m_pTxt_Content.SetText(pCurNPCEssence.hello_msg); + //else + //{ + // if (nNumTasks > 0) + // m_pTxt_Content.SetText(GetStringFromTable(502)); + // else + // m_pTxt_Content.SetText(GetStringFromTable(501)); + //} + + //SetData(NPC_DIALOG_TASK_LIST); + } + + void SetData(uint dwData, string strName) + { + m_strDataName = strName; + m_dwData = dwData; + } + + uint GetData() + { + return m_dwData; + } + + object GetDataPtr(string strName) + { + //if (0 != m_pvData && strName != m_strDataPtrName) + // AUI_ReportError(__LINE__, 1, "AUIDialog::GetDataPtr(), data name not match"); + return m_pvData; + } + + bool IsShow() + { + return m_bShow; + } + + void SetDataPtr(object pvData, string strName) + { + m_strDataPtrName = strName; + m_pvData = pvData; + } + + public void PopupNPCDialog(talk_proc pTalk) + { + if (pTalk.num_window == 0) return; + + int i, nIndex; + string strText = ""; + CECTaskInterface pTask = GetHostPlayer().GetTaskInterface(); + + string talkText = Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pTalk.windows[0].talk_text)); + m_pTxt_Content.SetText(pTask.FormatTaskTalk(talkText)); + m_pTxt_npc.SetText(""); + + m_pLst_Main.ResetContent(); + for (i = 0; i < pTalk.windows[0].num_option; i++) + { + strText = GetStringFromTable(249); + strText += pTalk.windows[0].options[i].text; + m_pLst_Main.AddString(strText); + nIndex = m_pLst_Main.GetCount() - 1; + m_pLst_Main.SetItemData(nIndex, pTalk.windows[0].options[i].id); + m_pLst_Main.SetItemDataPtr(nIndex, pTalk.windows[0].options[i]); + } + + SetDataPtr(pTalk, "ptr_talk_proc"); + if (!IsShow()) Show(true); + } + + void SelectListItem(int index) + { + m_pLst_Main.SetCurSel(index); + int nCurSel = m_pLst_Main.GetCurSel(); + if (nCurSel < 0 || nCurSel >= m_pLst_Main.GetCount()) + return; + + int i, j, nIndex; + string strText; + DATA_TYPE DataType = new DATA_TYPE(); + CECTaskInterface pTask = GetHostPlayer().GetTaskInterface(); + + if (GetData() == NPC_DIALOG.NPC_DIALOG_TALK || + GetData() == NPC_DIALOG.NPC_DIALOG_TASK_TALK) + { + uint id = m_pLst_Main.GetItemData(nCurSel, 0, ""); + talk_proc pTalk = (talk_proc)GetDataPtr("ptr_talk_proc"); + + if (CECGameUIMan.TALKPROC_IS_TERMINAL(id)) // Ternimal. + { + for (i = 0; i < pTalk.num_window; i++) + { + if (id != pTalk.windows[i].id) continue; + + // TO DO: fix later + // TO DO: show popup with content is talk_text and 1 btn OK + //GetGameUIMan().MessageBox("", pTask.FormatTaskTalk(pTalk.windows[i].talk_text), + // MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + GetGameUIMan().EndNPCService(); + Show(false); + + break; + } + + } + else if (CECGameUIMan.TALKPROC_IS_FUNCTION(id)) // Function. + { + if (GetGameUIMan().m_pCurNPCEssence != null) + { + NPC_ESSENCE pEssence = GetGameUIMan().m_pCurNPCEssence.Value; + int nIndex1 = (int)CECGameUIMan.TALKPROC_GET_FUNCTION_ID(id); + uint[] a_uiService = + { + pEssence.id_talk_service, // ̸ķID + pEssence.id_sell_service, // ƷķID + pEssence.id_buy_service, // չƷķID + pEssence.id_repair_service, // ƷķID + pEssence.id_install_service, // װǶƷķID + pEssence.id_uninstall_service, // ǶƷķID + pEssence.id_task_out_service, // صķID: + pEssence.id_task_in_service, // صķID: ֤ + pEssence.id_task_matter_service, // صķID: Ʒ + pEssence.id_skill_service, // ڼܵķID + pEssence.id_heal_service, // ƵķID + pEssence.id_transmit_service, // ͵ķID + pEssence.id_transport_service, // ķID + pEssence.id_proxy_service, // ۵ķID + pEssence.id_storage_service, // ֿķID + pEssence.id_make_service, // ķID + pEssence.id_decompose_service, // ֽķID + pEssence.id_identify_service, // ķID + 0, // Talk return. + 0, // Talk exit. + 0 // Storage password. + }; + //TO DO: fix later + // This show popup service NPC + //PopupCorrespondingServiceDialog(id, + // a_uiService[nIndex], m_pLst_Main.GetItemDataPtr(nCurSel)); + } + else + { + //TO DO: fix later + // This show popup service NPC + //PopupCorrespondingServiceDialog( + // id, 0, m_pLst_Main.GetItemDataPtr(nCurSel)); + } + } + else // Window. + { + for (i = 0; i < pTalk.num_window; i++) + { + if (id != pTalk.windows[i].id) continue; + string talkText = Encoding.Unicode.GetString(MemoryMarshal.AsBytes(pTalk.windows[i].talk_text)); + m_pTxt_Content.SetText(pTask.FormatTaskTalk(talkText)); + //m_pTxt_Content.SetData(pTalk.windows[i].id_parent); + + m_pLst_Main.ResetContent(); + for (j = 0; j < pTalk.windows[i].num_option; j++) + { + strText = GetStringFromTable(249); + strText += pTalk.windows[i].options[j].text; + m_pLst_Main.AddString(strText); + nIndex = m_pLst_Main.GetCount() - 1; + m_pLst_Main.SetItemData(nIndex, pTalk.windows[i].options[j].id); + m_pLst_Main.SetItemDataPtr(nIndex, pTalk.windows[i].options[j]); + } + + break; + } + } + } + else if (GetData() == NPC_DIALOG.NPC_DIALOG_TASK_LIST) + { + if (nCurSel == m_pLst_Main.GetCount() - 1) + { + GetGameUIMan().EndNPCService(); + Show(false); + } + else + { + //if (CDlgAutoHelp::IsAutoHelp()) + //{ + // UINT64 taskid = m_pLst_Main.GetItemData64(nCurSel, 0, "TaskID"); + // CDlgWikiShortcut::PopQuestWiki(GetGameUIMan(), (int)taskid); + //} + //else + { + talk_proc pTalk = (talk_proc)m_pLst_Main.GetItemDataPtr(nCurSel, 0, ""); + + GetGameUIMan().PopupNPCDialog(pTalk); + //m_pTxt_Content.SetData(0xFFFFFFFF); + SetData(NPC_DIALOG.NPC_DIALOG_TASK_TALK, ""); + } + } + } + else if (GetData() == NPC_DIALOG.NPC_DIALOG_ESSENCE) + { + if (nCurSel == m_pLst_Main.GetCount() - 1) + { + GetGameUIMan().EndNPCService(); + Show(false); + return; + } + + int iService = (int)m_pLst_Main.GetItemData(nCurSel, 0, ""); + NPC_ESSENCE? pEssence = GetGameUIMan().m_pCurNPCEssence; + if (pEssence != null) + { + if (iService == CDLGNPC.CDLGNPC_FORGET && (pEssence?.combined_services & 0x01) != 0) + { + // TO DO: fix later + //PAUIDIALOG pMsgBox; + + //GetGameUIMan().MessageBox("Game_ForgetSkill", GetStringFromTable(559), + // MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160), &pMsgBox); + //pMsgBox.SetDataPtr(m_pLst_Main.GetItemDataPtr(nCurSel)); + GetGameUIMan().EndNPCService(); + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_EQUIPSLOT && (pEssence?.combined_services & 0x02) != 0) + { + Show(false); + // TO DO: fix later + //GetGameUIMan().m_pDlgInventory.Show(true); + //GetGameUIMan().m_pDlgEquipSlot.Show(true); + return; + } + else if ((pEssence?.combined_services & 0x10) != 0 + && (iService == CDLGNPC.CDLGNPC_FACTION_CREATE + || iService == CDLGNPC.CDLGNPC_FACTION_UPGRADE + || iService == CDLGNPC.CDLGNPC_FACTION_RENAME + || iService == CDLGNPC.CDLGNPC_FACTION_DISMISS)) + { + // TO DO: fix later + //if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + //} + //else if (iService == CDLGNPC.CDLGNPC_FACTION_CREATE) + //{ + // if (GetHostPlayer().GetBasicProps().iLevel < 20 || + // GetHostPlayer().GetMoneyAmount() < 100000) + // { + // GetGameUIMan().MessageBox("", GetStringFromTable(607), + // MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + // } + // else + // GetGameUIMan().m_pDlgGuildCreate.Show(true); + //} + //else if (iService == CDLGNPC.CDLGNPC_FACTION_UPGRADE) + //{ + // int idFaction = GetHostPlayer().GetFactionID(); + // CECFactionMan pFMan = EC_Game.GetFactionMan(); + // Faction_Info pInfo = pFMan.GetFaction(idFaction); + + // if (pInfo) + // { + // if (pInfo.GetLevel() == 0) + // { + // GetGameUIMan().MessageBox( + // "Faction_Upgrade", GetStringFromTable(608), + // MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160)); + // } + // else if (pInfo.GetLevel() == 1) + // { + // GetGameUIMan().MessageBox( + // "Faction_Upgrade", GetStringFromTable(690), + // MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160)); + // } + // else if (pInfo.GetLevel() == 2) + // { + // GetGameUIMan().MessageBox("", GetStringFromTable(609), + // MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + // } + // else + // { + // GetGameUIMan().MessageBox("", GetStringFromTable(610), + // MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + // } + // } + //} + //else if (iService == CDLGNPC_FACTION_RENAME) + //{ + // CDlgModifyName* pDlgModifyName = GetGameUIMan().m_pDlgModifyName; + // if (!pDlgModifyName.IsShow()) + // { + // pDlgModifyName.SetPolicy(new CDlgFactionRenamePolicy()); + // pDlgModifyName.Show(true); + // } + //} + //else if (iService == CDLGNPC_FACTION_DISMISS) + //{ + // GetGameUIMan().MessageBox("Faction_Dismiss", GetStringFromTable(596), + // MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160)); + //} + //GetGameUIMan().EndNPCService(); + //Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_FACE && (pEssence?.combined_services & 0x20) != 0) + { + // TO DO: fix later + //if (GetHostPlayer().IsFlying() || + // GetHostPlayer().IsSitting() || + // GetHostPlayer().IsShapeChanged()) + //{ + // GetGameUIMan().MessageBox("", GetStringFromTable(603), + // MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + //} + //else + //{ + // GetGameUIMan().m_pDlgInventory.Show(true); + // GetGameUIMan().m_pDlgFaceLift.Show(true); + // GetGameUIMan().EndNPCService(); + // Show(false); + //} + return; + } + else if (iService == CDLGNPC.CDLGNPC_MAIL && (pEssence?.combined_services & 0x40) != 0) + { + // TO DO: fix later + Show(false); + //GetGameUIMan().m_pDlgMailList.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_AUCTION && (pEssence?.combined_services & 0x80 ) != 0) + { + Show(false); + // TO DO: fix later + //if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + // GetGameUIMan().EndNPCService(); + //} + //else + //{ + // GetGameSession().auction_AttendList(); + // GetGameUIMan().m_pDlgAuctionBuyList.Show(true); + // GetGameUIMan().m_pDlgAuctionBuyList.m_nIDNext = 0; + // GetGameUIMan().m_pDlgAuctionBuyList.m_nPageNext = 0; + // string szText; + // szText.Format(GetStringFromTable(3501), GetStringFromTable(3509)); + // GetGameUIMan().m_pDlgAuctionBuyList.m_pTxt_RefreshStatus.SetText(szText); + // GetGameUIMan().m_pDlgAuctionBuyList.m_pTxt_Search. + // SetText(GetStringFromTable(3509)); + //} + return; + } + else if (iService == CDLGNPC.CDLGNPC_DOUBLEEXP && (pEssence?.combined_services & 0x100) != 0) + { + Show(false); + // TO DO: fix later + //GetGameUIMan().m_pDlgDoubleExp.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_PETHATCH && (pEssence?.combined_services & 0x200) != 0) + { + Show(false); + // TO DO: fix later + //GetGameUIMan().m_pDlgInventory.Show(true); + //GetGameUIMan().m_pDlgPetHatch.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_PETREC && (pEssence?.combined_services & 0x400) != 0) + { + Show(false); + // TO DO: fix later + //GetGameUIMan().m_pDlgPetList.Show(true); + //GetGameUIMan().m_pDlgPetRec.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_BATTLECHALLENGE && (pEssence?.combined_services & 0x800) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGuildMap.SetType(CDlgGuildMap::FACTIONMAP_TYPE_CHALLENGE); + //GetGameUIMan().m_pDlgGuildMap.Show(true); + //GetGameUIMan().m_pDlgGMapStatus2.Show(true); + //GetGameUIMan().m_pDlgGMapStatus2.SetCanMove(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_BATTLEENTER && (pEssence?.combined_services & 0x800) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGuildMap.SetType(CDlgGuildMap::FACTIONMAP_TYPE_ENTER); + //GetGameUIMan().m_pDlgGuildMap.Show(true); + //GetGameUIMan().m_pDlgGMapStatus1.Show(true); + //GetGameUIMan().m_pDlgGMapStatus1.SetCanMove(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_BATTLELEAVE && (pEssence?.combined_services & 0x1000) != 0) + { + Show(false); + //GetGameUIMan().MessageBox("Game_BattleLeave", GetStringFromTable(725), + // MB_OKCANCEL, A3DCOLORRGBA(255, 255, 255, 160)); + return; + } + else if (iService == CDLGNPC.CDLGNPC_GOLDTRADE && (pEssence?.combined_services & 0x2000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGoldTrade.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_EQUIPREFINE && (pEssence?.combined_services & 0x4000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgEquipRefine.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_EQUIPDYE && (pEssence?.combined_services & 0x8000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgEquipDye.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + //GetGameUIMan().m_pDlgFittingRoom.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_PETDYE && (pEssence?.combined_services & 0x8000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgPetDye.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + //GetGameUIMan().m_pDlgPetList.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_REFINETRANS && (pEssence?.combined_services & 0x10000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgRefineTrans.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFPRORESET && (pEssence?.combined_services & 0x20000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFXiDian.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFGENIUSRESET && (pEssence?.combined_services & 0x40000) != 0) + { + //µĶԻ + Show(false); + //GetGameUIMan().m_pDlgELFGeniusReset.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFFORGET && (pEssence?.combined_services & 0x80000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFRetrain.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFREFINE && (pEssence?.combined_services & 0x100000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFRefine.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFREFINETRANS && (pEssence?.combined_services & 0x100000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFRefineTrans.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFTOPILL && (pEssence?.combined_services & 0x200000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFToPill.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_ELFEQUIPOFF && (pEssence?.combined_services & 0x400000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgELFEquipRemove.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_EQUIPREPAIR && (pEssence?.combined_services & 0x800000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgDamageRep.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_WEBTRADE && (pEssence?.combined_services & 0x1000000) != 0) + { + Show(false); + //if (GetGameUIMan().m_pDlgAutoLock.IsLocked()) + //{ + // GetGameUIMan().AddChatMessage(GetStringFromTable(5520), GP_CHAT_MISC); + // GetGameUIMan().EndNPCService(); + //} + //else if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + // GetGameUIMan().EndNPCService(); + //} + //else + //{ + // GetGameUIMan().m_pDlgWebViewProduct.Show(true); + //} + return; + } + else if (iService == CDLGNPC.CDLGNPC_GODEVILCONVERT && (pEssence?.combined_services & 0x2000000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGodEvilConvert.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_WEDDING_BOOK && (pEssence?.combined_services & 0x4000000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgWedding.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_WEDDING_INVITE && (pEssence?.combined_services & 0x4000000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgWeddingInvite.Show(true); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_CREATE && (pEssence?.combined_services & 0x8000000) != 0) + { + // + //CECHostPlayer pHost = GetHostPlayer(); + + //int idFaction = pHost.GetFactionID(); + //CECFactionMan pFMan = EC_Game.GetFactionMan(); + //Faction_Info pInfo = pFMan.GetFaction(idFaction); + + //FACTION_FORTRESS_CONFIG pConfig = pHost.GetFactionFortressConfig(); + + //if (pInfo && pConfig) + //{ + // string strMsg = GetStringFromTable(9114); + // string strTemp; + // string strColorRed = _AL("^FF0000"); + // string strColorWhite = _AL("^FFFFFF"); + // string strNextLine = _AL("\r"); + + // bool bOK = true; + + // // ɵȼ + // if (pInfo.GetLevel() < pConfig.require_level) + // bOK = false; + + // strTemp.Format(GetStringFromTable(9112) + // , (pInfo.GetLevel() < pConfig.require_level) ? strColorRed : strColorWhite + // , pConfig.require_level + 1); + + // strMsg += strNextLine; + // strMsg += strTemp; + + // // + // CECInventory* pPack = pHost.GetPack(); + // int nItems = sizeof(pConfig.require_item) / sizeof(pConfig.require_item[0]); + // for (int i = 0; i < nItems; ++i) + // { + // if (pConfig.require_item[i].id && pConfig.require_item[i].count > 0) + // { + // int count = pPack.GetItemTotalNum(pConfig.require_item[i].id); + // if (count < pConfig.require_item[i].count) + // bOK = false; + + // CECIvtrItem* pItem = CECIvtrItem::CreateItem(pConfig.require_item[i].id, 0, 1); + // strTemp.Format(GetStringFromTable(9113) + // , (count < pConfig.require_item[i].count) ? strColorRed : strColorWhite + // , pItem.GetName() + // , pConfig.require_item[i].count); + // delete pItem; + + // strMsg += strNextLine; + // strMsg += strTemp; + // } + // } + + // strMsg += strNextLine; + // strMsg += GetStringFromTable(bOK ? 9110 : 9111); + + // if (!bOK) + // { + // // 㣬ʾϢ + // GetGameUIMan().MessageBox("", strMsg, MB_OK, A3DCOLORRGB(255, 255, 255)); + // GetGameUIMan().EndNPCService(); + // } + // else + // { + // // 㣬Իȷ + // GetGameUIMan().MessageBox("Fortress_Create", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160)); + // } + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_WAR && (pEssence?.combined_services & 0x8000000) != 0) + { + // ս + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressWar"); + //if (pDlg1) + //{ + // pDlg1.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + //Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_ENTER && (pEssence?.combined_services & 0x8000000) != 0) + { + // + //GetGameSession().factionFortress_Enter(GetHostPlayer().GetFactionID()); + //GetGameUIMan().EndNPCService(); + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_WARLIST && (pEssence?.combined_services & 0x8000000) != 0) + { + // ضս + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressWarList"); + //if (pDlg1) + //{ + // pDlg1.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_UPGRADE && (pEssence?.combined_services & 0x10000000) != 0) + { + // + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressInfo"); + //PAUIDIALOG pDlg2 = GetGameUIMan().GetDialog("Win_FortressBuild"); + //if (pDlg1 && pDlg2) + //{ + // pDlg1.Show(true); + // pDlg2.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_HANDIN_MATERIAL && (pEssence?.combined_services & 0x10000000) != 0) + { + // ɲ + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressInfo"); + //PAUIDIALOG pDlg2 = GetGameUIMan().GetDialog("Win_FortressMaterial"); + //if (pDlg1 && pDlg2) + //{ + // pDlg1.Show(true); + // pDlg2.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + //Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_HANDIN_CONTRIB && (pEssence?.combined_services & 0x10000000) != 0) + { + // ɹ׶ + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressInfo"); + //PAUIDIALOG pDlg2 = GetGameUIMan().GetDialog("Win_FortressContrib"); + //if (pDlg1 && pDlg2) + //{ + // pDlg1.Show(true); + // pDlg2.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_LEAVE && (pEssence?.combined_services & 0x10000000) != 0) + { + // 뿪 + //GetGameSession().c2s_CmdNPCSevFactionFortressLeave(); + GetGameUIMan().EndNPCService(); + Show(false); + return; + } + else if (iService == CDLGNPC.CGLDNPC_FORTRESS_EXCHANGE_MATERIAL && (pEssence?.combined_services & 0x200000000) != 0) + { + // һ + //PAUIDIALOG pDlg1 = GetGameUIMan().GetDialog("Win_FortressInfo"); + //PAUIDIALOG pDlg2 = GetGameUIMan().GetDialog("Win_FortressExchange"); + //if (pDlg1 && pDlg2) + //{ + // pDlg1.Show(true); + // pDlg2.Show(true); + //} + //else + //{ + // GetGameUIMan().EndNPCService(); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_VIEW_TRASHBOX && (pEssence?.combined_services & 0x40000000) != 0) + { + //GetGameSession().c2s_CmdNPCSevViewTrash(); + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_VIEW_DPS_DPH_RANK && (pEssence?.combined_services & 0x80000000) != 0) + { + //GetGameUIMan().m_pDlgEarthBagRank.Show(true); + Show(false); + return; + } + else if ((iService == CDLGNPC.CDLGNPC_FORCE_QUIT || iService == CDLGNPC.CDLGNPC_FORCE_JOIN) && pEssence?.id_force_service > 0) + { + //void* pData = m_pLst_Main.GetItemDataPtr(nCurSel); + //NPC_FORCE_SERVICE* pService = (NPC_FORCE_SERVICE*)pData; + //int npcForce = pService.force_id; + + //PAUIDIALOG pDlg = NULL; + //if (iService == CDLGNPC_FORCE_QUIT) pDlg = GetGameUIMan().GetDialog("Win_ForceQuit"); + //else if (iService == CDLGNPC_FORCE_JOIN) pDlg = GetGameUIMan().GetDialog("Win_ForceJoin"); + //if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + // GetGameUIMan().EndNPCService(); + //} + //else if (pDlg) + //{ + // pDlg.SetData(npcForce); + // pDlg.Show(true); + //} + + Show(false); + return; + } + else if ((iService == CDLGNPC.CDLGNPC_JOIN_COUNTRY || iService == CDLGNPC.CDLGNPC_QUIT_COUNTRY) + && (pEssence?.combined_services2 & 0x00000001) != 0) + { + //if (iService == CDLGNPC.CDLGNPC_JOIN_COUNTRY) + //{ + // CECHostPlayer* pHost = GetHostPlayer(); + // string strMsg = GetStringFromTable(9765); + // string strTemp; + // string strColorRed = _AL("^FF0000"); + // string strColorWhite = _AL("^FFFFFF"); + // string strNextLine = _AL("\r"); + + // bool bOK(true); + + // // ҵȼ + // const int REQUIRE_LEVEL = CECUIConfig::Instance().GetGameUI().nCountryWarEnterLevel; + // int iLevel = GetHostPlayer().GetMaxLevelSofar(); + // if (iLevel < REQUIRE_LEVEL) bOK = false; + + // strTemp.Format(GetStringFromTable(9766) + // , (iLevel < REQUIRE_LEVEL) ? strColorRed : strColorWhite + // , REQUIRE_LEVEL); + + // strMsg += strNextLine; + // strMsg += strTemp; + + // // + // const int REQUIRE_ITEM = CECUIConfig::Instance().GetGameUI().nCountryWarEnterItem; + // const int REQUIRE_COUNT = CECUIConfig::Instance().GetGameUI().nCountryWarEnterItemCount; + // CECInventory* pPack = pHost.GetPack(); + // int count = pPack.GetItemTotalNum(REQUIRE_ITEM); + // if (count < REQUIRE_COUNT) bOK = false; + + // CECIvtrItem* pItem = CECIvtrItem::CreateItem(REQUIRE_ITEM, 0, 1); + // strTemp.Format(GetStringFromTable(9767) + // , (count < REQUIRE_COUNT) ? strColorRed : strColorWhite + // , pItem.GetName() + // , REQUIRE_COUNT); + // delete pItem; + + // strMsg += strNextLine; + // strMsg += strTemp; + + // // ҪǶӳ + // CECTeam* pTeam = pHost.GetTeam(); + // if (pTeam != NULL) + // { + // bool bLeader = (pTeam.GetLeaderID() == pHost.GetCharacterID()); + // if (!bLeader) bOK = false; + // strTemp.Format(GetStringFromTable(9771) + // , (!bLeader) ? strColorRed : strColorWhite + // , GetStringFromTable(bLeader ? 9772 : 9773)); + // strMsg += strNextLine; + // strMsg += strTemp; + // } + + // // ȴ + // bool bCoolDown = pHost.GetCoolTime(GP_CT_COUNTRY_BATTLE_APPLY) > 0; + // if (bCoolDown) bOK = false; + // strTemp.Format(GetStringFromTable(9774) + // , bCoolDown ? strColorRed : strColorWhite + // , GetStringFromTable(bCoolDown ? 9772 : 9773)); + // strMsg += strNextLine; + // strMsg += strTemp; + + // strMsg += strNextLine; + // strMsg += GetStringFromTable(bOK ? 9768 : 9769); + + // if (!bOK) + // { + // // 㣬ʾϢ + // GetGameUIMan().MessageBox("", strMsg, MB_OK, A3DCOLORRGB(255, 255, 255)); + // GetGameUIMan().EndNPCService(); + // } + // else + // { + // // 㣬Իȷ + // PAUIDIALOG pDlgMsgBox = NULL; + // GetGameUIMan().MessageBox("Country_JoinLeave", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160), &pDlgMsgBox); + // pDlgMsgBox.SetData(1); + // } + //} + //else + //{ + // // 뿪ȷ + // PAUIDIALOG pDlgMsgBox = NULL; + // string strMsg = GetStringFromTable(9770); + // GetGameUIMan().MessageBox("Country_JoinLeave", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160), &pDlgMsgBox); + // pDlgMsgBox.SetData(2); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_LEAVE_COUNTRY_WAR && (pEssence?.combined_services2 & 0x00000002) != 0) + { + // 뿪ȷ + string strMsg = GetStringFromTable(9915); + //GetGameUIMan().MessageBox("Country_LeaveWar", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160)); + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_EQUIP_MARK && (pEssence?.combined_services2 & 0x00000004) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgEquipMark.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_GOTO_SPECIALSERVER && (pEssence?.combined_services2 & 0x00000008) != 0) + { + //if (!CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // CECHostPlayer* pHost = GetHostPlayer(); + // string strMsg = GetStringFromTable(10134); + // string strTemp; + // string strColorRed = _AL("^FF0000"); + // string strColorWhite = _AL("^FFFFFF"); + // string strNextLine = _AL("\r"); + + // bool bOK(true); + + // // ҵȼ + // const int REQUIRE_LEVEL = CECUIConfig::Instance().GetGameUI().nCrossServerEnterLevel; + // int iLevel = GetHostPlayer().GetMaxLevelSofar(); + // if (iLevel < REQUIRE_LEVEL) bOK = false; + + // strTemp.Format(GetStringFromTable(9766) + // , (iLevel < REQUIRE_LEVEL) ? strColorRed : strColorWhite + // , REQUIRE_LEVEL); + + // strMsg += strNextLine; + // strMsg += strTemp; + + // // Ҫ + // const int REQUIRE_LEVEL2 = CECUIConfig::Instance().GetGameUI().nCrossServerEnterLevel2; + // int iLevel2 = GetHostPlayer().GetBasicProps().iLevel2; + // if (iLevel2 < REQUIRE_LEVEL2) bOK = false; + + // strTemp.Format(GetStringFromTable(10135) + // , (iLevel2 < REQUIRE_LEVEL2) ? strColorRed : strColorWhite + // , GetGameRun().GetLevel2NameForCondition(REQUIRE_LEVEL2)); + + // strMsg += strNextLine; + // strMsg += strTemp; + + // // ȴ + // bool bCoolDown = pHost.GetCoolTime(GP_CT_CROSS_SERVER_APPLY) > 0; + // if (bCoolDown) bOK = false; + // strTemp.Format(GetStringFromTable(9774) + // , bCoolDown ? strColorRed : strColorWhite + // , GetStringFromTable(bCoolDown ? 9772 : 9773)); + + // strMsg += strNextLine; + // strMsg += strTemp; + + // strMsg += strNextLine; + // strMsg += GetStringFromTable(bOK ? 10136 : 10137); + + // if (!bOK) + // { + // // 㣬ʾϢ + // GetGameUIMan().MessageBox("", strMsg, MB_OK, A3DCOLORRGB(255, 255, 255)); + // GetGameUIMan().EndNPCService(); + // } + // else + // { + // // 㣬Իȷ + // GetGameUIMan().MessageBox("CrossServer_GetIn", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160)); + // } + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_GOTO_ORIGINALSERVER && (pEssence?.combined_services2 & 0x00000010) != 0) + { + //if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // string strMsg = GetStringFromTable(10138); + // GetGameUIMan().MessageBox("CrossServer_GetOut", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160)); + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_PLAYER_RENAME && (pEssence?.combined_services2 & 0x00000020) != 0) + {// + //if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + // GetGameUIMan().EndNPCService(); + //} + //else if (!CECUIConfig::Instance().GetGameUI().bEnablePlayerRename) + //{ + // // δʾöԻ + // GetGameUIMan().ShowErrorMsg(10152); + // GetGameUIMan().EndNPCService(); + //} + //else + //{ + // CDlgModifyName* pDlgModifyName = GetGameUIMan().m_pDlgModifyName; + // if (!pDlgModifyName.IsShow()) + // { + // pDlgModifyName.SetPolicy(new CDlgPlayerRenamePolicy()); + // pDlgModifyName.Show(true); + // } + //} + Show(false); + return; + } + else if (iService == CDLGNPC.CDLGNPC_STONE_CHANGE && (pEssence?.combined_services2 & 0x00000040) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgStoneChange.SetType(CDlgStoneChange::EM_ALL); + //GetGameUIMan().m_pDlgStoneChange.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_KING_SERVICE && (pEssence?.combined_services2 & 0x00000080) != 0) + { + Show(false); + //GetGameSession().king_GetCandidateStatus(); + //GetHostPlayer().SetInKingService(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_OFFLINESHOP_SETTING && (pEssence?.combined_services2 & 0x00000100) != 0) + { + Show(false); + //if (g_pGame.GetConfigs().IsMiniClient() || glb_IsInMapForMiniClient()) + //{ + // GetGameUIMan().MessageBox("", GetStringFromTable(10713), MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + // return; + //} + + //// Get shop info + //GetGameSession().OffShop_GetMyShopInfo(); + //GetHostPlayer().GetOfflineShopCtrl().SetNPCSevFlag(COfflineShopCtrl::NPCSEV_SETTING); + return; + } + else if (iService == CDLGNPC.CDLGNPC_OFFLINESHOP_SELLBUY && (pEssence?.combined_services2 & 0x00000100) != 0) + { + Show(false); + GetGameUIMan().EndNPCService(); + //if (g_pGame.GetConfigs().IsMiniClient() || glb_IsInMapForMiniClient()) + //{ + // GetGameUIMan().MessageBox("", GetStringFromTable(10713), MB_OK, A3DCOLORRGBA(255, 255, 255, 160)); + // return; + //} + + //if (GetGameUIMan().m_pDlgAutoLock.IsLocked()) + //{ + // GetGameUIMan().AddChatMessage(GetStringFromTable(10524), GP_CHAT_MISC); + //} + //else + //{ + // // Get shop info + // GetGameSession().OffShop_QueryShops(COfflineShopCtrl::OSTM_ALL); + // GetHostPlayer().GetOfflineShopCtrl().SetNPCSevFlag(COfflineShopCtrl::NPCSEV_SELLBUY); + //} + + return; + } + else if (iService == CDLGNPC.CDLGNPC_SPLIT_FASHION && (pEssence?.combined_services2 & 0x00000200) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgFashionSplit.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_REINCARNATION && (pEssence?.combined_services2 & 0x00000400) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgReincarnation.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_GIFTCARD && (pEssence?.combined_services2 & 0x00000800) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGiftCard.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_TRICKBATTLE && (pEssence?.combined_services2 & 0x00001000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgChariotWarApply.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_CARDRESPAWN && (pEssence?.combined_services2 & 0x00002000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgGenCardRespawn.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_QUERYCHARIOTAMOUNT && (pEssence?.combined_services2 & 0x00001000) != 0) + { + Show(false); + //GetGameSession().tankBattle_GetRank(); + //GetGameUIMan().m_pDlgChariotRankList.SetNPCSevFlag(true); + //if (!GetGameUIMan().m_pDlgChariotRankList.IsShow()) + // GetGameUIMan().m_pDlgChariotRankList.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_FLYSWORDIMPROVE && (pEssence?.combined_services2 & 0x00004000) != 0) + { + Show(false); + //GetGameUIMan().m_pDlgFlySwordImprove.Show(true); + //GetGameUIMan().m_pDlgInventory.Show(true); + return; + } + else if (iService == CDLGNPC.CDLGNPC_OPEN_FACTION_PVP && (pEssence?.combined_services2 & 0x00008000) != 0) + { + Show(false); + string strMsg = GetStringFromTable(11271); + //GetGameUIMan().MessageBox("Faction_PVP_Open", strMsg, MB_YESNO, A3DCOLORRGBA(255, 255, 255, 160)); + return; + } + else if (iService == CDLGNPC.CDLGNPC_GOLD_SHOP + && ((pEssence?.combined_services2 & 0x00010000) != 0 || (pEssence?.combined_services2 & 0x00020000) != 0)) + { + Show(false); + //bool bEnableQShop = (pEssence.combined_services2 & 0x00010000); + //bool bEnableBackShop = (pEssence.combined_services2 & 0x00020000); + //if (bEnableQShop) + //{ + // CECUIHelper::ShowQShop(pEssence.id, bEnableBackShop); + //} + //else if (bEnableBackShop) + //{ + // CECUIHelper::ShowBackShop(pEssence.id, bEnableQShop); + //} + return; + } + else if (iService == CDLGNPC.CDLGNPC_PLAYER_CHANGE_GENDER && (pEssence?.combined_services2 & 0x00040000) != 0) + { + //if (GetGameUIMan().m_pDlgAutoLock.IsLocked()) + //{ + // GetGameUIMan().AddChatMessage(GetGameUIMan().GetStringFromTable(10524), GP_CHAT_MISC); + // GetGameUIMan().EndNPCService(); + //} + //else if (CECCrossServer::Instance().IsOnSpecialServer()) + //{ + // GetGameUIMan().ShowErrorMsg(10130); + // GetGameUIMan().EndNPCService(); + //} + //else if (!CECUIConfig::Instance().GetGameUI().bEnablePlayerChangeGender) + //{ + // GetGameUIMan().ShowErrorMsg(10152); + // GetGameUIMan().EndNPCService(); + //} + //else + //{ + // CDlgSimpleCostItemService* pDlgSimpleCostItemService = GetGameUIMan().m_pDlgSimpleCostItemService; + // if (!pDlgSimpleCostItemService.IsShow()) + // { + // GetHostPlayer().StopAutoFashion(); + // pDlgSimpleCostItemService.SetPolicy(new CDlgChangeGenderPolicy()); + // pDlgSimpleCostItemService.Show(true); + // } + //} + Show(false); + return; + } + } + + int idFunction, id_dialog = 0; + object pData = m_pLst_Main.GetItemDataPtr(nCurSel, 0, ""); + + EC_Game.GetElementDataMan().get_data_ptr((uint)iService, ID_SPACE.ID_SPACE_ESSENCE, ref DataType); + + if (DataType == DATA_TYPE.DT_NPC_TASK_IN_SERVICE || + DataType == DATA_TYPE.DT_NPC_TASK_OUT_SERVICE || + DataType == DATA_TYPE.DT_NPC_TASK_MATTER_SERVICE) + { + // pop-up storage task dialog + if (DataType == DATA_TYPE.DT_NPC_TASK_OUT_SERVICE) + { + NPC_TASK_OUT_SERVICE pService = (NPC_TASK_OUT_SERVICE)pData; + if (!(pService.storage_id == 0 || pService.storage_open_item == 0)) + { + //PopupStorageTaskDialog(pService, false); + return; + } + } + + PopupTaskDialog(false); + m_pLst_Main.AddString(GetStringFromTable(503)); + return; + } + else if (DataType == DATA_TYPE.DT_NPC_TALK_SERVICE) + { + NPC_TALK_SERVICE pService = (NPC_TALK_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_TALK; + } + else if (DataType == DATA_TYPE.DT_NPC_SELL_SERVICE) + { + NPC_SELL_SERVICE pService = (NPC_SELL_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_SELL; + } + else if (DataType == DATA_TYPE.DT_NPC_BUY_SERVICE) + { + NPC_BUY_SERVICE pService = (NPC_BUY_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_BUY; + } + else if (DataType == DATA_TYPE.DT_NPC_REPAIR_SERVICE) + { + NPC_REPAIR_SERVICE pService = (NPC_REPAIR_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_REPAIR; + } + else if (DataType == DATA_TYPE.DT_NPC_INSTALL_SERVICE) + { + NPC_INSTALL_SERVICE pService = (NPC_INSTALL_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_INSTALL; + } + else if (DataType == DATA_TYPE.DT_NPC_UNINSTALL_SERVICE) + { + NPC_UNINSTALL_SERVICE pService = (NPC_UNINSTALL_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_UNINSTALL; + } + else if (DataType == DATA_TYPE.DT_NPC_SKILL_SERVICE) + { + NPC_SKILL_SERVICE pService = (NPC_SKILL_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_SKILL; + } + else if (DataType == DATA_TYPE.DT_NPC_HEAL_SERVICE) + { + NPC_HEAL_SERVICE pService = (NPC_HEAL_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_HEAL; + } + else if (DataType == DATA_TYPE.DT_NPC_TRANSMIT_SERVICE) + { + NPC_TRANSMIT_SERVICE pService = (NPC_TRANSMIT_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_TRANSMIT; + } + else if (DataType == DATA_TYPE.DT_NPC_TRANSPORT_SERVICE) + { + NPC_TRANSPORT_SERVICE pService = (NPC_TRANSPORT_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_TRANSPORT; + } + else if (DataType == DATA_TYPE.DT_NPC_PROXY_SERVICE) + { + NPC_PROXY_SERVICE pService = (NPC_PROXY_SERVICE)pData; + id_dialog = (int)pService.id_dialog; + idFunction = (int)SERVICE_TYPE.NPC_PROXY; + } + else if (DataType == DATA_TYPE.DT_NPC_STORAGE_SERVICE) + { + NPC_STORAGE_SERVICE pService = (NPC_STORAGE_SERVICE)pData; + string strText1 = m_pLst_Main.GetText(nCurSel); + string strComp1 = (GetStringFromTable(249)) + (GetStringFromTable(253)); + string strComp2 = (GetStringFromTable(249)) + (GetStringFromTable(8080)); + + if (string.Equals(strText1, strComp1, StringComparison.OrdinalIgnoreCase)) + idFunction = (int)SERVICE_TYPE.NPC_STORAGE_PASSWORD; + else if (string.Equals(strText1, strComp2, StringComparison.OrdinalIgnoreCase)) + idFunction = (int)SERVICE_TYPE.NPC_ACCOUNT_STORAGE; + else + idFunction = (int)SERVICE_TYPE.NPC_STORAGE; + } + else if (DataType == DATA_TYPE.DT_NPC_MAKE_SERVICE) + { + NPC_MAKE_SERVICE pService = (NPC_MAKE_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_MAKE; + } + else if (DataType == DATA_TYPE.DT_NPC_DECOMPOSE_SERVICE) + { + NPC_DECOMPOSE_SERVICE pService = (NPC_DECOMPOSE_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_DECOMPOSE; + } + else if (DataType == DATA_TYPE.DT_NPC_IDENTIFY_SERVICE) + { + NPC_IDENTIFY_SERVICE pService = (NPC_IDENTIFY_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_IDENTIFY; + } + else if (DataType == DATA_TYPE.DT_NPC_WAR_TOWERBUILD_SERVICE) + { + NPC_WAR_TOWERBUILD_SERVICE pService = (NPC_WAR_TOWERBUILD_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_WAR_TOWERBUILD; + } + else if (DataType == DATA_TYPE.DT_NPC_RESETPROP_SERVICE) + { + NPC_RESETPROP_SERVICE pService = (NPC_RESETPROP_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_RESETPROP; + } + else if (DataType == DATA_TYPE.DT_NPC_PETNAME_SERVICE) + { + NPC_PETNAME_SERVICE pService = (NPC_PETNAME_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_PETNAME; + } + else if (DataType == DATA_TYPE.DT_NPC_PETLEARNSKILL_SERVICE) + { + NPC_PETLEARNSKILL_SERVICE pService = (NPC_PETLEARNSKILL_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_PETLEARNSKILL; + } + else if (DataType == DATA_TYPE.DT_NPC_PETFORGETSKILL_SERVICE) + { + NPC_PETFORGETSKILL_SERVICE pService = (NPC_PETFORGETSKILL_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_PETFORGETSKILL; + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPBIND_SERVICE) + { + NPC_EQUIPBIND_SERVICE pService = (NPC_EQUIPBIND_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_EQUIPBIND; + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPDESTROY_SERVICE) + { + NPC_EQUIPDESTROY_SERVICE pService = (NPC_EQUIPDESTROY_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_EQUIPDESTROY; + } + else if (DataType == DATA_TYPE.DT_NPC_EQUIPUNDESTROY_SERVICE) + { + NPC_EQUIPUNDESTROY_SERVICE pService = (NPC_EQUIPUNDESTROY_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_EQUIPUNDESTROY; + } + else if (DataType == DATA_TYPE.DT_NPC_ENGRAVE_SERVICE) + { + NPC_ENGRAVE_SERVICE pService = (NPC_ENGRAVE_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_ENGRAVE; + } + else if (DataType == DATA_TYPE.DT_NPC_RANDPROP_SERVICE) + { + NPC_RANDPROP_SERVICE pService = (NPC_RANDPROP_SERVICE)pData; + idFunction = (int)SERVICE_TYPE.NPC_RANDPROP; + } + + if (id_dialog > 0) + { + object result = EC_Game.GetElementDataMan() + .get_data_ptr((uint)id_dialog, ID_SPACE.ID_SPACE_TALK, ref DataType); + if (result != null) + { + talk_proc pTalk = (talk_proc)result; + GetGameUIMan().PopupNPCDialog(pTalk); + //m_pTxt_Content.SetData(0xFFFFFFFF); + SetData(NPC_DIALOG.NPC_DIALOG_TALK, ""); + } + } + else + { + object pData1 = m_pLst_Main.GetItemDataPtr(nCurSel, 0 ,""); + //PopupCorrespondingServiceDialog(idFunction, iService, pData1); + } + } + } + } +} diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs.meta b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs.meta new file mode 100644 index 0000000000..f2c685430b --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/DlgNPC.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 1a69ae0024fdd744f8481223fa2dc85c \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs new file mode 100644 index 0000000000..0c94883f22 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs @@ -0,0 +1,23 @@ +using TMPro; +using UnityEngine; + +namespace BrewMonster +{ + public class ItemUIListBox : MonoBehaviour + { + [SerializeField] private TextMeshProUGUI txtItem; + + public string[] strDataName = new string[20]; + public string[] strDataPtrName = new string[20]; + public uint[] dwData = new uint[20]; + public object[] pvData = new object[20]; + + public string strText; + + public void SetText(string txt) + { + strText = txt; + txtItem.text = txt; + } + } +} diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs.meta b/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs.meta new file mode 100644 index 0000000000..6ae3084515 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/ItemUIListBox.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ce1dfcc5e6936e547a2a2b7d112ebea1 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs new file mode 100644 index 0000000000..e96094ab29 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs @@ -0,0 +1,306 @@ +using BrewMonster.Common; +using BrewMonster.Managers; +using BrewMonster.Network; +using ModelRenderer.Scripts.Common; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEngine; + +namespace BrewMonster.UI +{ + public class CECGameUIMan + { + DlgNPC m_pDlgNPC; + public NPC_ESSENCE? m_pCurNPCEssence; + private DialogScriptTableObject m_dialogResouce; + private Canvas m_canvas; + Dictionary m_StringTable = new Dictionary(); + Dictionary m_auiDialog_stringTable = new Dictionary(); + + public static bool TALKPROC_IS_TERMINAL(uint id) + { + return ((id & 0x80000000u) != 0) && ((id & 0x40000000u) != 0); + } + + public static bool TALKPROC_IS_FUNCTION(uint id) + { + return ((id) & 0x80000000) != 0; + } + + public static uint TALKPROC_GET_FUNCTION_ID(uint id) + { + return ((id) & 0x7FFFFFFF); + } + + public string GetStringFromTable(int idString) + { + if (m_StringTable.TryGetValue(idString, out var str)) + return str; + return null; + } + + + public string GetStringFromAuiDialogTable(int idString) + { + if (m_auiDialog_stringTable.TryGetValue(idString, out var str)) + return str; + return null; + } + + public void SetDependency(DialogScriptTableObject resouce, Canvas canvas) + { + m_dialogResouce = resouce; + m_canvas = canvas; + } + + public void Init() + { + ImportStringTable("ingame.stf"); + ImportAuiDialogStringTable("msgbox.stf"); + } + + public string Translate(ushort[] str) + { + if (str == null || str.Length == 0) + return null; + string m_AWString = ""; + string input = new string(str.Where(c => c != 0).Select(c => (char)c).ToArray()); + m_AWString = input; + + var result = new System.Text.StringBuilder(); + + int i = 0; + while (i < input.Length) + { + char c = input[i]; + + if (c != '\\') + { + result.Append(c); + i++; + continue; + } + + i++; + if (i >= input.Length) + break; + + char next = input[i]; + + switch (next) + { + case '\n': + i++; + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int value = 0; + int count = 3; + while (i < input.Length && input[i] >= '0' && input[i] <= '7' && count > 0) + { + count--; + value = value * 8 + (input[i] - '0'); + i++; + } + if (value <= 255) + result.Append((char)(value & 0xFF)); + break; + } + + case '"': + case '\'': + case '\\': + result.Append(next); + i++; + break; + + case 'n': + result.Append('\n'); + i++; + break; + case 'r': + result.Append('\r'); + i++; + break; + case 't': + result.Append('\t'); + i++; + break; + case 'v': + result.Append('\v'); + i++; + break; + + default: + i++; + break; + } + } + + m_AWString = result.ToString(); + return m_AWString; + } + + private bool ImportStringTable(string pszFilename) + { + //AWScriptFile s = new AWScriptFile(); + string szFilename = Path.Combine(Application.streamingAssetsPath, pszFilename); + + foreach (var line in File.ReadLines(szFilename)) + { + if (string.IsNullOrWhiteSpace(line)) + continue; + + var parts = line.Split('\t', StringSplitOptions.RemoveEmptyEntries); + if (parts.Length < 2) + continue; + + if (int.TryParse(parts[0], out int key)) + { + string value = parts[1].Trim(); + if (value.StartsWith("\"") && value.EndsWith("\"")) + value = value.Substring(1, value.Length - 2); + + m_StringTable[key] = value; + } + } + + return true; + //bool bval = s.Open(szFilename); + //if (!bval) return false; + + //while (!s.IsEnd()) + //{ + // bval = s.GetNextToken(true); + // if (!bval) break; // End of file. + // int idString = int.Parse(ByteToStringUtils.UshortArrayToUnicodeString(s.m_szToken)); + + // bval = s.GetNextToken(true); + // if (!bval) return false; + // string str = (Translate(s.m_szToken)); + // m_StringTable[idString] = str; + //} + //s.Close(); + + //if (a_stricmp(GetStringFromTable(1), _AL("")) == 0) //1 ĬÈÏ×ÖÌå + // m_StringTable[1] = _AL("·½ÕýϸºÚÒ»¼òÌå"); + //m_strDefaultFontName = GetStringFromTable(1); + //if (a_stricmp(GetStringFromTable(2), _AL("")) == 0) //2 ĬÈÏ×ÖÌå´óС + // m_StringTable[2] = _AL("10"); + //m_nDefaultFontSize = a_atoi(GetStringFromTable(2)); + //if (a_stricmp(GetStringFromTable(3), _AL("")) == 0) //3 ·ûºÅ '\t' Ï൱ÓÚ¶àÉÙ¸ö 'W'µÄ¿í¶È + // m_StringTable[3] = _AL("30"); + //_tab_char = a_atoi(GetStringFromTable(3)); + //if (a_stricmp(GetStringFromTable(4), _AL("")) == 0) //4 m_FontImagePicture ×ÖÌå´óС + // m_StringTable[4] = m_StringTable[2]; + //if (a_stricmp(GetStringFromTable(5), _AL("")) == 0) //5 MessageBox ×ÖÌå´óС + // m_StringTable[5] = m_StringTable[2]; + //if (a_stricmp(GetStringFromTable(6), _AL("")) == 0) //6 MessageBox shadow + // m_StringTable[6] = _AL("0"); + //if (a_stricmp(GetStringFromTable(7), _AL("")) == 0) //7 MessageBox outline + // m_StringTable[7] = _AL("0"); + //if (a_stricmp(GetStringFromTable(8), _AL("")) == 0) //8 MessageBox outline color + // m_StringTable[8] = _AL("0"); + + //m_FontHint.szFontName = GetStringFromTable(1); + //m_FontHint.nFontSize = a_atoi(GetStringFromTable(2)); + //m_FontImagePicture.szFontName = GetStringFromTable(1); + //m_FontImagePicture.nFontSize = a_atoi(GetStringFromTable(4)); + //m_FontImagePicture.nOutline = 1; + //m_FontMessageBox.szFontName = GetStringFromTable(1); + //m_FontMessageBox.nFontSize = a_atoi(GetStringFromTable(5)); + //m_FontMessageBox.nShadow = a_atoi(GetStringFromTable(6)); + //m_FontMessageBox.nOutline = a_atoi(GetStringFromTable(7)); + //return true; + } + + public bool ImportAuiDialogStringTable(string pszFilename) + { + + //bool bval; + //int idString; + //string str; + //AWScriptFile s = new AWScriptFile(); + string szFilename = Path.Combine(Application.streamingAssetsPath, pszFilename); + //bval = s.Open(szFilename); + //if (!bval) return true; // Ignore error. + //while (!s.IsEnd()) + //{ + // bval = s.GetNextToken(true); + // if (!bval) break; // End of file. + // idString = int.Parse(ByteToStringUtils.UshortArrayToUnicodeString(s.m_szToken)); + + // bval = s.GetNextToken(true); + // if (!bval) return false; + + // str = ByteToStringUtils.UshortArrayToUnicodeString(s.m_szToken); + // if(m_auiDialog_stringTable.TryGetValue(idString, out string value)) + // { + // m_auiDialog_stringTable[idString] = str; + // } + // else + // { + // m_auiDialog_stringTable.Add(idString, str); + // } + //} + + //s.Close(); + foreach (var line in File.ReadLines(szFilename)) + { + if (string.IsNullOrWhiteSpace(line)) + continue; + + var parts = line.Split('\t', StringSplitOptions.RemoveEmptyEntries); + if (parts.Length < 2) + continue; + + if (int.TryParse(parts[0], out int key)) + { + string value = parts[1].Trim(); + if (value.StartsWith("\"") && value.EndsWith("\"")) + value = value.Substring(1, value.Length - 2); + + m_auiDialog_stringTable[key] = value; + } + } + return true; + } + + public void PopupNPCDialog(NPC_ESSENCE pEssence) + { + if(m_pDlgNPC == null) + { + GameObject ob = m_dialogResouce.GetPrefabDialog("DialogNPC"); + m_pDlgNPC = GameObject.Instantiate(ob, m_canvas.transform).GetComponent(); + } + m_pDlgNPC.PopupDialog(pEssence); + } + + public void PopupNPCDialog(talk_proc pTalk) + { + if(m_pDlgNPC == null) + { + GameObject ob = m_dialogResouce.GetPrefabDialog("DialogNPC"); + m_pDlgNPC = GameObject.Instantiate(ob, m_canvas.transform).GetComponent(); + } + m_pDlgNPC.PopupNPCDialog(pTalk); + } + + public void EndNPCService() + { + m_pCurNPCEssence = null; + //EC_Game.GetGameRun().GetHostPlayer().EndNPCService(); + EC_ManMessageMono.Instance.EC_ManPlayer.GetHostPlayer().EndNPCService(); + } + } +} diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs.meta b/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs.meta new file mode 100644 index 0000000000..ed6da608b3 --- /dev/null +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/EC_GameUIMan.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 450eac8e68388db418e23a6896c839c1 \ No newline at end of file diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs index 2d2ca6fd84..60536c8431 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/UINPC.cs @@ -16,11 +16,13 @@ namespace BrewMonster } public void SetHealthImage(float health) { - _healthImage.fillAmount = health; + if(_healthImage != null) + _healthImage.fillAmount = health; } public void SetHealthText(string healthText) { - _healthText.text = healthText; + if(_healthText != null) + _healthText.text = healthText; } } } diff --git a/Assets/Prefabs/NPCServer.prefab b/Assets/Prefabs/NPCServer.prefab index 691ade3c5f..61c8fc5501 100644 --- a/Assets/Prefabs/NPCServer.prefab +++ b/Assets/Prefabs/NPCServer.prefab @@ -11,6 +11,7 @@ GameObject: - component: {fileID: 5975684648087068252} - component: {fileID: 1882963580244400679} - component: {fileID: -5899287755522118344} + - component: {fileID: 1637622316711963511} m_Layer: 0 m_Name: NPCServer m_TagString: Untagged @@ -66,6 +67,29 @@ MonoBehaviour: m_npcUI: {fileID: 0} m_fMoveSpeed: 0 _characterController: {fileID: 0} +--- !u!136 &1637622316711963511 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2426933851766496167} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 1, z: 0} --- !u!1 &3297168817873124018 GameObject: m_ObjectHideFlags: 0 @@ -93,7 +117,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3297168817873124018} - m_LocalRotation: {x: -0.002627404, y: 0.9181325, z: 0.3962182, w: 0.0060883234} + m_LocalRotation: {x: 8.102368e-16, y: 1, z: 0.000000046460137, w: -0.000000017439397} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -255,7 +279,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6510845919681767284} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0.015657494, y: 0.89469767, z: -0.03145985, w: -0.44528785} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 diff --git a/Assets/Prefabs/UI/DialogNPC.prefab b/Assets/Prefabs/UI/DialogNPC.prefab new file mode 100644 index 0000000000..2b720e15bb --- /dev/null +++ b/Assets/Prefabs/UI/DialogNPC.prefab @@ -0,0 +1,1493 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &127501564762295495 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1091462352906544451} + - component: {fileID: 43324519852461835} + - component: {fileID: 8493998618141770687} + m_Layer: 0 + m_Name: TextContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1091462352906544451 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127501564762295495} + 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: 617338231045505643} + 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: -26.0479, y: 78.75635} + m_SizeDelta: {x: 518.0898, y: 197.7065} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &43324519852461835 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127501564762295495} + m_CullTransparentMesh: 1 +--- !u!114 &8493998618141770687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127501564762295495} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 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: 256 + 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 &227740078161399208 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4508900108135688843} + - component: {fileID: 1334248510954733382} + - component: {fileID: 3535356980335466858} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4508900108135688843 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 227740078161399208} + 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: 6721994976154660856} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1334248510954733382 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 227740078161399208} + m_CullTransparentMesh: 1 +--- !u!114 &3535356980335466858 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 227740078161399208} + 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: Back + 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: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &782714985240968117 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 334443298950881809} + - component: {fileID: 7193160187579287240} + - component: {fileID: 4924672906491014107} + - component: {fileID: 6927273031412389844} + m_Layer: 0 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &334443298950881809 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 782714985240968117} + 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: 2833199425536027860} + m_Father: {fileID: 3993049682140785046} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 284.9078, y: -25} + m_SizeDelta: {x: 550, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7193160187579287240 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 782714985240968117} + m_CullTransparentMesh: 1 +--- !u!114 &4924672906491014107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 782714985240968117} + 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: 0} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &6927273031412389844 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 782714985240968117} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ce1dfcc5e6936e547a2a2b7d112ebea1, type: 3} + m_Name: + m_EditorClassIdentifier: + txtItem: {fileID: 478583687716476312} + strDataName: + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + strDataPtrName: + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + dwData: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +--- !u!1 &936487781243711958 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5268642982485591419} + - component: {fileID: 4609017267167709729} + - component: {fileID: 5458476677817196736} + m_Layer: 0 + m_Name: Mask + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5268642982485591419 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 936487781243711958} + 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: 2620840836205932051} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4609017267167709729 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 936487781243711958} + m_CullTransparentMesh: 1 +--- !u!114 &5458476677817196736 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 936487781243711958} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4319722768531036698 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7678860290128617065} + - component: {fileID: 5675498646709247354} + - component: {fileID: 1475340083305523789} + - component: {fileID: 6997269796834025946} + - component: {fileID: 4816029163115819860} + m_Layer: 0 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7678860290128617065 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4319722768531036698} + 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: 5284007697029292396} + m_Father: {fileID: 617338231045505643} + 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.1842, y: -95.82376} + m_SizeDelta: {x: 569.8156, y: 151.4545} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5675498646709247354 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4319722768531036698} + m_CullTransparentMesh: 1 +--- !u!114 &1475340083305523789 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4319722768531036698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &6997269796834025946 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4319722768531036698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 3993049682140785046} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 5284007697029292396} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &4816029163115819860 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4319722768531036698} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e94504b96a4532444acf89e50910d8e1, type: 3} + m_Name: + m_EditorClassIdentifier: + content: {fileID: 3993049682140785046} + prefabItemUIListBox: {fileID: 6927273031412389844} + heightItem: 50 + paddingY: 9 +--- !u!1 &5271452121222737074 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4417434749515336320} + - component: {fileID: 8154688967091664002} + - component: {fileID: 6005572965024863275} + m_Layer: 0 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4417434749515336320 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5271452121222737074} + 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: 1194270759418128024} + m_Father: {fileID: 617338231045505643} + 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: -4.7} + m_SizeDelta: {x: 425.8265, y: 49.6644} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8154688967091664002 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5271452121222737074} + m_CullTransparentMesh: 1 +--- !u!114 &6005572965024863275 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5271452121222737074} + 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: 50648e5dab4e12f44bbbdac9313e24a4, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5475358239089109801 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6721994976154660856} + - component: {fileID: 5149405871995786751} + - component: {fileID: 853022486708302467} + - component: {fileID: 6071484966713915762} + m_Layer: 0 + m_Name: BtnBack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6721994976154660856 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5475358239089109801} + 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: 4508900108135688843} + m_Father: {fileID: 617338231045505643} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 30.9} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5149405871995786751 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5475358239089109801} + m_CullTransparentMesh: 1 +--- !u!114 &853022486708302467 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5475358239089109801} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &6071484966713915762 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5475358239089109801} + 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: 853022486708302467} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &5717174923209038532 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 617338231045505643} + - component: {fileID: 6592696758485443604} + - component: {fileID: 3475191290517847910} + m_Layer: 0 + m_Name: Main + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &617338231045505643 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5717174923209038532} + 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: 4417434749515336320} + - {fileID: 6721994976154660856} + - {fileID: 4320535810812211952} + - {fileID: 1091462352906544451} + - {fileID: 7678860290128617065} + m_Father: {fileID: 2620840836205932051} + 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: 626.6056, y: 443.9768} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6592696758485443604 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5717174923209038532} + m_CullTransparentMesh: 1 +--- !u!114 &3475191290517847910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5717174923209038532} + 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: 6d3e1de5b0b9eec47930f9f2dc926d84, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5821441220344757699 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2833199425536027860} + - component: {fileID: 5184637415993654362} + - component: {fileID: 478583687716476312} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2833199425536027860 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5821441220344757699} + 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: 334443298950881809} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5184637415993654362 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5821441220344757699} + m_CullTransparentMesh: 1 +--- !u!114 &478583687716476312 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5821441220344757699} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 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: 1 + m_fontSizeMax: 20 + 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!1 &6297753662624094075 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3993049682140785046} + - component: {fileID: 5013028528407243044} + m_Layer: 0 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3993049682140785046 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6297753662624094075} + 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: 334443298950881809} + m_Father: {fileID: 5284007697029292396} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 151.45} + m_Pivot: {x: 0, y: 1} +--- !u!114 &5013028528407243044 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6297753662624094075} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 1 + m_StartCorner: 1 + m_StartAxis: 1 + m_CellSize: {x: 550, y: 30} + m_Spacing: {x: 0, y: 9} + m_Constraint: 1 + m_ConstraintCount: 1 +--- !u!1 &6633469441158179173 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5284007697029292396} + - component: {fileID: 140255837948671979} + - component: {fileID: 7758491183939353016} + - component: {fileID: 3466085057438846393} + m_Layer: 0 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5284007697029292396 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6633469441158179173} + 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: 3993049682140785046} + m_Father: {fileID: 7678860290128617065} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!222 &140255837948671979 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6633469441158179173} + m_CullTransparentMesh: 1 +--- !u!114 &7758491183939353016 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6633469441158179173} + 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: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &3466085057438846393 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6633469441158179173} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &6866895224463907868 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1194270759418128024} + - component: {fileID: 2546182332578229405} + - component: {fileID: 6706225607899780532} + m_Layer: 0 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1194270759418128024 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6866895224463907868} + 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: 4417434749515336320} + 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: 1.7736, y: -1.3302} + m_SizeDelta: {x: 361.0429, y: 42.7282} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2546182332578229405 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6866895224463907868} + m_CullTransparentMesh: 1 +--- !u!114 &6706225607899780532 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6866895224463907868} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: New Text + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 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: 33.45 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &8237288432181259026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2620840836205932051} + - component: {fileID: 4112406733878090153} + m_Layer: 0 + m_Name: DialogNPC + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2620840836205932051 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8237288432181259026} + 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: 5268642982485591419} + - {fileID: 617338231045505643} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4112406733878090153 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8237288432181259026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1a69ae0024fdd744f8481223fa2dc85c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_pTxt_npc: {fileID: 6706225607899780532} + m_pTxt_Content: {fileID: 8493998618141770687} + m_pLst_Main: {fileID: 4816029163115819860} +--- !u!1 &8376521380240807646 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4320535810812211952} + - component: {fileID: 5579461427788977358} + - component: {fileID: 8015040921499929893} + - component: {fileID: 1639099275032120166} + m_Layer: 0 + m_Name: BtnClose + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4320535810812211952 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8376521380240807646} + 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: 617338231045505643} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -16.2, y: -10.6} + m_SizeDelta: {x: 58, y: 58} + m_Pivot: {x: 1, y: 1} +--- !u!222 &5579461427788977358 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8376521380240807646} + m_CullTransparentMesh: 1 +--- !u!114 &8015040921499929893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8376521380240807646} + 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 &1639099275032120166 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8376521380240807646} + 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: 8015040921499929893} + m_OnClick: + m_PersistentCalls: + m_Calls: [] diff --git a/Assets/Prefabs/UI/DialogNPC.prefab.meta b/Assets/Prefabs/UI/DialogNPC.prefab.meta new file mode 100644 index 0000000000..3a5e1fcbec --- /dev/null +++ b/Assets/Prefabs/UI/DialogNPC.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7653e7e64393ec24c903f0606499b8c4 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/CECGameRun.cs b/Assets/Scripts/CECGameRun.cs index 40aab69b2b..2d3cf37a93 100644 --- a/Assets/Scripts/CECGameRun.cs +++ b/Assets/Scripts/CECGameRun.cs @@ -1,11 +1,12 @@ -using CSNetwork.GPDataType; using BrewMonster; +using BrewMonster.Network; using BrewMonster.Scripts.World; +using BrewMonster.UI; +using CSNetwork; +using CSNetwork.GPDataType; using CSNetwork.GPDataType; using CSNetwork.Protocols.RPCData; using System.Data; -using BrewMonster.Network; -using CSNetwork; using Unity.Cinemachine; using UnityEngine; @@ -25,6 +26,8 @@ public partial class CECGameRun : MonoBehaviour, IMsgHandler public float rotateSpeedX = 300f; // tốc độ xoay ngang public float rotateSpeedY = 2f; // tốc độ xoay dọc private CECWorld m_pWorld; + + protected CECUIManager m_pUIManager; // UI manager public CECWorld GetWorld() { return m_pWorld; } public bool StartGame(int idInst, Vector3 vHostPos) { @@ -160,4 +163,15 @@ public partial class CECGameRun : MonoBehaviour, IMsgHandler // freeLookCam.m_YAxis.m_MaxSpeed = 0; // } //} + + + // Get UI manager + public CECUIManager GetUIManager() + { + if(m_pUIManager == null) + { + m_pUIManager = CECUIManager.Instance; + } + return m_pUIManager; + } } diff --git a/Assets/Scripts/CECHostPlayer.cs b/Assets/Scripts/CECHostPlayer.cs index 9bb50e31eb..12b5eccc79 100644 --- a/Assets/Scripts/CECHostPlayer.cs +++ b/Assets/Scripts/CECHostPlayer.cs @@ -1,6 +1,5 @@ using BrewMonster; using BrewMonster.Assets.PerfectWorld.Scripts.Players; -using BrewMonster.Assets.PerfectWorld.Scripts.Skills; using BrewMonster.Managers; using BrewMonster.Network; using BrewMonster.Scripts; @@ -8,34 +7,21 @@ using BrewMonster.Scripts.Managers; using BrewMonster.Scripts.Player; using BrewMonster.Scripts.Skills; using CSNetwork; -using CSNetwork.Common; using CSNetwork.GPDataType; -using CSNetwork.Protocols; using CSNetwork.Protocols.RPCData; -using NUnit.Framework; -using PerfectWorld.Scripts.Managers; -using PerfectWorld.Scripts.Managers.BrewMonster.Managers; +using ModelRenderer.Scripts.GameData; using PerfectWorld.Scripts.Player; using System; using System.Collections.Generic; -using System.IO; using System.Runtime.InteropServices; using System.Text; using BrewMonster.PerfectWorld.Scripts.Vfx; -using TMPro; -using Unity.VisualScripting; -using UnityEditor.Experimental.GraphView; using UnityEngine; -using UnityEngine.InputSystem; using UnityEngine.SceneManagement; using UnityEngine.UI; -using static Unity.Burst.Intrinsics.X86.Avx; -using static UnityEditor.PlayerSettings; -using Scene = UnityEngine.SceneManagement.Scene; using Trace_reason = CECHPWorkTrace.Trace_reason; using Host_work_ID = BrewMonster.Scripts.CECHPWork.Host_work_ID; -using BrewMonster.Scripts; -using BrewMonster.Scripts.World; +using PerfectWorld.Scripts.Managers; public partial class CECHostPlayer : CECPlayer { @@ -86,6 +72,10 @@ public partial class CECHostPlayer : CECPlayer public GNDINFO m_GndInfo; private int m_idUCSelTarget; // Uncertificately selected object's ID public float m_fVertSpeed = 0f; + int m_idSevNPC = 0; // Current service NPC + bool m_bTalkWithNPC = false; // true, is talking with NPC + List m_aWayPoints = new List(); // Active way points + bool m_bIsInKingService = false; // ÊÇ·ñÕýÔÚ½øÐйúÍõ·þÎñ²Ù×÷ CECActionSwitcherBase m_pActionSwitcher; // ====== Ground cast config ====== @@ -110,6 +100,8 @@ public partial class CECHostPlayer : CECPlayer float ccRadius, ccSkin; RaycastHit lastGroundHit; Camera mainCam; + Ray ray; + RaycastHit hit; private BaseVfxObject m_pSelectedGFX; private BaseVfxObject m_pHoverGFX; @@ -230,14 +222,11 @@ public partial class CECHostPlayer : CECPlayer int iTraceReason = CECHPWorkTrace.Trace_reason.TRACE_NONE; bool bWikiMonster = false; - Ray ray = mainCam.ScreenPointToRay(Input.mousePosition); - RaycastHit hit; + ray = mainCam.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit)) { - CECObject clickedObject = hit.collider.gameObject.GetComponent(); - - if (clickedObject != null) + if (hit.collider.gameObject.TryGetComponent(out CECObject clickedObject)) { int idObject = CECObject.GetObjectID(clickedObject); if (idObject != 0) @@ -262,6 +251,36 @@ public partial class CECHostPlayer : CECPlayer } } } + else + { + // pCDS.m_RayTraceRt.iEntity == ECENT_PLAYER + CECPlayer pPlayer = EC_ManMessageMono.Instance.EC_ManPlayer.GetPlayer(idObject); + + // 1. Msg.dwParam4 is double click flag. + // 2. Buddy player counld't be traced + if (!pPlayer.IsDead() /*&& pPlayer.GetCharacterID() != m_iBuddyId*/ && + (m_idSelTarget == idObject /*|| (Msg.dwParam4 && m_idUCSelTarget == idObject)*/)) + { + idTraceTarget = idObject; + //bForceAttack = glb_GetForceAttackFlag(&Msg.dwParam3); + + if (AttackableJudge(idObject, bForceAttack) == 1) + iTraceReason = CECHPWorkTrace.Trace_reason.TRACE_ATTACK; + else if (pPlayer.GetBoothState() != 0) + iTraceReason = CECHPWorkTrace.Trace_reason.TRACE_TALK; + } + else + { + idSelTarget = idObject; + } + } + + // cancel this action if not selectable + if (!CanSelectTarget(idTraceTarget)) + { + idTraceTarget = 0; + //return; + } } } } @@ -281,6 +300,31 @@ public partial class CECHostPlayer : CECPlayer return; NormalAttackObject(idTraceTarget, bForceAttack); } + else + { + if (!CanDo(ActionCanDo.CANDO_MOVETO)) + return; + CECHPWork pWork; + if (iTraceReason == CECHPWorkTrace.Trace_reason.TRACE_PICKUP) + { + //PickupObject(idTraceTarget, false); + } + else if (iTraceReason == CECHPWorkTrace.Trace_reason.TRACE_GATHER) + { + //PickupObject(idTraceTarget, true); + } + else if ((pWork = m_pWorkMan.GetWork(CECHPWork.Host_work_ID.WORK_TRACEOBJECT)) != null) + { + CECHPWorkTrace pWorkTrace = (pWork) as CECHPWorkTrace; + pWorkTrace.SetTraceTarget(pWorkTrace.CreatTraceTarget(idTraceTarget, iTraceReason, bForceAttack)); + } + else if (m_pWorkMan.CanStartWork(CECHPWork.Host_work_ID.WORK_TRACEOBJECT) && !bWikiMonster) + { + CECHPWorkTrace pWorkTrace = (CECHPWorkTrace)m_pWorkMan.CreateWork(CECHPWork.Host_work_ID.WORK_TRACEOBJECT); + pWorkTrace.SetTraceTarget(pWorkTrace.CreatTraceTarget(idTraceTarget, iTraceReason, bForceAttack)); + m_pWorkMan.StartWork_p1(pWorkTrace); + } + } } } m_pWorkMan?.Tick(Time.deltaTime); @@ -428,6 +472,8 @@ public partial class CECHostPlayer : CECPlayer case int value when value == EC_MsgDef.MSG_HST_ATTACKED: OnMsgHstAttacked(Msg); break; case int value when value == EC_MsgDef.MSG_HST_HURTRESULT: OnMsgHstHurtResult(Msg); break; case int value when value == EC_MsgDef.MSG_HST_INFO00: OnMsgHstInfo00(Msg); break; + case int value when value == EC_MsgDef.MSG_HST_NPCGREETING: OnMsgHstNPCGreeting(Msg); break; + case int value when value == EC_MsgDef.MSG_HST_WAYPOINT: OnMsgHstWayPoint(Msg); break; case int value when value == EC_MsgDef.MSG_HST_SKILLDATA: OnMsgHstSkillData(Msg); break; case int value when value == EC_MsgDef.MSG_HST_DIED: OnMsgHstDied(Msg); break; case int value when value == EC_MsgDef.MSG_HST_GOTO: OnMsgHstGoto(Msg); break; @@ -548,24 +594,24 @@ public partial class CECHostPlayer : CECPlayer if (pCmd.iHP < m_BasicProps.iCurHP && m_BasicProps.iCurHP >= iLimit && pCmd.iHP < iLimit) { - /*if (CECUIHelper::GetGameUIMan()->IsShowLowHP()) { + /*if (CECUIHelper::GetGameUIMan().IsShowLowHP()) { // ѪÁ¿µÍÓÚÁÙ½çÖµÔò²¥·ÅÌØÐ§ const int GfxLastTime = 10000; // ³ÖÐøÊ±¼ä10Ãë - CECUIHelper::GetGameUIMan()->GetScreenEffectMan()->StartEffect(CECScreenEffect::EFFECT_REDSPARK, GfxLastTime); + CECUIHelper::GetGameUIMan().GetScreenEffectMan().StartEffect(CECScreenEffect::EFFECT_REDSPARK, GfxLastTime); }*/ } /*if (pCmd.iHP >= iLimit || pCmd.iHP <= 0) { // ѪÁ¿¸ßÓÚÁÙ½çÖµ»òËÀÍö£¬ÔòÍ£Ö¹²¥·ÅÌØÐ§ - CECUIHelper::GetGameUIMan()->GetScreenEffectMan()->FinishEffect(CECScreenEffect::EFFECT_REDSPARK); + CECUIHelper::GetGameUIMan().GetScreenEffectMan().FinishEffect(CECScreenEffect::EFFECT_REDSPARK); }*/ /*iLimit = (int)(pCmd.iMaxMP * 0.2f); if (pCmd.iMP < m_BasicProps.iCurMP && m_BasicProps.iCurMP >= iLimit && pCmd.iMP < iLimit) BubbleText(BUBBLE_MPWARN, 0);*/ - /*if (m_ExtProps.max_ap != pCmd->iMaxAP) - g_pGame->GetGameRun()->AddFixedMessage(FIXMSG_ADDMAXAP, pCmd->iMaxAP - m_ExtProps.max_ap);*/ + /*if (m_ExtProps.max_ap != pCmd.iMaxAP) + g_pGame.GetGameRun().AddFixedMessage(FIXMSG_ADDMAXAP, pCmd.iMaxAP - m_ExtProps.max_ap);*/ } m_BasicProps.iLevel = pCmd.sLevel; @@ -586,10 +632,10 @@ public partial class CECHostPlayer : CECPlayer // UpdateGodEvilSprite(); - /*CECGameUIMan* pGameUI = g_pGame->GetGameRun()->GetUIManager()->GetInGameUIMan(); - CDlgAutoHelp *pDlgHelp = dynamic_cast(pGameUI->GetDialog("Win_WikiPop"));*/ + /*CECGameUIMan* pGameUI = g_pGame.GetGameRun().GetUIManager().GetInGameUIMan(); + CDlgAutoHelp *pDlgHelp = dynamic_cast(pGameUI.GetDialog("Win_WikiPop"));*/ /*if(pDlgHelp && m_bFight) - pDlgHelp->SetAutoHelpState(false);*/ + pDlgHelp.SetAutoHelpState(false);*/ } void SetLevel2(int level2, bool bFirstTime) { @@ -607,9 +653,9 @@ public partial class CECHostPlayer : CECPlayer if (pCmd.iDamage != 0 && (pCmd.cEquipment & 0x7f) != 0x7f) { /* char cEquip = (char)(pCmd.cEquipment & 0x7f); - CECIvtrEquip pEquip = (CECIvtrEquip)m_pEquipPack->GetItem(cEquip); + CECIvtrEquip pEquip = (CECIvtrEquip)m_pEquipPack.GetItem(cEquip); if (pEquip) - pEquip->AddCurEndurance(ARMOR_RUIN_SPEED);*/ + pEquip.AddCurEndurance(ARMOR_RUIN_SPEED);*/ } // The host player is attacked, we should make an effect here @@ -674,7 +720,7 @@ public partial class CECHostPlayer : CECPlayer { cmd_be_hurt pCmd = (cmd_be_hurt)Msg.dwParam1; if (pCmd.damage != 0) - Damaged(pCmd->damage); + Damaged(pCmd.damage); } else if (cmd == CommandID.HURT_RESULT) { @@ -686,7 +732,7 @@ public partial class CECHostPlayer : CECPlayer { CECElsePlayer pTarget = m_pPlayerMan.GetElsePlayer(pCmd.target_id); if (pTarget) - pTarget->Damaged(pCmd->damage); + pTarget.Damaged(pCmd.damage); } else if (UnityGameSession.Instance.GameSession.ISNPCID(pCmd.target_id)) { @@ -1368,8 +1414,8 @@ public partial class CECHostPlayer : CECPlayer CECNPC pNPC = (CECNPC)pObject; // If this npc is host's pet, cannot be attacked - //if (pNPC.GetMasterID() == m_PlayerInfo.cid) - // return 0; + if (pNPC.GetMasterID() == m_PlayerInfo.cid) + return 0; // If it's a pet and can not be attacked, pet can be attacked only if it's a fighting pet //if (pNPC.IsPetNPC() && !((CECPet)pNPC).CanBeAttacked()) @@ -1597,7 +1643,7 @@ public partial class CECHostPlayer : CECPlayer return (m_dwLIES & mask) != 0; } - bool IsInFortress() + public bool IsInFortress() { return m_fortressEnter.role_in_war != 0; } @@ -1608,7 +1654,7 @@ public partial class CECHostPlayer : CECPlayer } // Get faction ID - int GetFactionID() + public int GetFactionID() { return m_idFaction; } @@ -2119,7 +2165,7 @@ public partial class CECHostPlayer : CECPlayer case ActionCanDo.CANDO_ASSISTSEL: if (IsDead() || !GPDataTypeHelper.ISPLAYERID(m_idSelTarget) || m_idSelTarget == m_PlayerInfo.cid /*|| - !m_pTeam || !m_pTeam->GetMemberByID(m_idSelTarget) || m_iBuddyId || IsPassiveMove() || + !m_pTeam || !m_pTeam.GetMemberByID(m_idSelTarget) || m_iBuddyId || IsPassiveMove() || m_playerLimits.test(PLAYER_LIMIT_NOCHANGESELECT)*/) bRet = false; @@ -2249,7 +2295,7 @@ public partial class CECHostPlayer : CECPlayer // if (IsDead() || IsAboutToDie() || IsTrading() || IsUsingTrashBox() || IsTalkingWithNPC() || // IsJumping() || IsFlashMoving() || IsFalling() || IsChangingFace() || GetBoothState() != 0 || IsTakingOff() || - // m_pWorkMan->HasWorkRunningOnPriority(CECHPWorkMan::PRIORITY_2) || + // m_pWorkMan.HasWorkRunningOnPriority(CECHPWorkMan::PRIORITY_2) || // m_iBuddyId || IsOperatingPet() || IsRebuildingPet() || IsUsingItem() || IsPassiveMove()) // bRet = false; @@ -2261,7 +2307,7 @@ public partial class CECHostPlayer : CECPlayer // IsMeleeing() || IsTrading() || IsUsingTrashBox() || IsTalkingWithNPC() || // IsChangingFace() || IsReviving() || IsSpellingMagic() || IsPicking() || // IsGathering() || IsRooting() || GetBoothState() != 0 || - // !m_pWorkMan->IsStanding() || m_iBuddyId || + // !m_pWorkMan.IsStanding() || m_iBuddyId || // IsOperatingPet() || IsRebuildingPet() || IsUsingItem() || GetShapeType() == PLAYERMODEL_DUMMYTYPE2 || IsPassiveMove() || // m_playerLimits.test(PLAYER_LIMIT_NOBIND)) // bRet = false; @@ -2345,6 +2391,198 @@ public partial class CECHostPlayer : CECPlayer // } // return fSpeedSev; //} + + private void OnMsgHstNPCGreeting(ECMSG Msg) + { + cmd_npc_greeting pCmd = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1); + + if (GPDataTypeHelper.ISNPCID(pCmd.idObject)) + { + // רÃÅ´¦Àíѧϰ¼¼ÄܵÄÒþ²ØNPC + //if (CECHostSkillModel::Instance().IsSkillLearnNPC(pCmd.idObject)) + //{ + // CECGameUIMan* pGameUI = g_pGame.GetGameRun().GetUIManager().GetInGameUIMan(); + // //m_idSevNPC = pCmd.idObject; + // //m_bTalkWithNPC = true; + // //pGameUI.GetDialog("Win_SkillAction").Show(true); + // //CDlgSkillAction* dlg = dynamic_cast(pGameUI.GetDialog("Win_SkillAction")); + // //dlg.ForceShowDialog(); + // CDlgSkillAction* dlg = dynamic_cast(pGameUI.GetDialog("Win_SkillAction")); + // dlg.SetReceivedNPCGreeting(true); + // return; + //} + + CECNPC pNPC = EC_ManMessageMono.Instance._CECNPCMan.GetNPC(pCmd.idObject); + if (!pNPC || !pNPC.IsServerNPC()) + { + return; + } + + // Check distance again + if (!CanTouchTarget(pNPC.GetPos(), pNPC.GetTouchRadius(), 3)) + return; + + m_idSevNPC = pCmd.idObject; + m_bTalkWithNPC = true; + + // Check way point service on NPC + var dwID = (pNPC as CECNPCServer).GetWayPointID(); + if (dwID != null && !HasWayPoint(dwID)) + UnityGameSession.c2s_CmdNPCSevWaypoint(); + //g_pGame.GetGameSession().c2s_CmdNPCSevWaypoint(); + + var pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan(); + NPC_ESSENCE? result = (pNPC as CECNPCServer).GetDBEssence(); + if (result != null) + { + pGameUI.PopupNPCDialog(result.Value); + } + } + //else if (GPDataTypeHelper.ISPLAYERID(pCmd.idObject)) + //{ + // EC_ElsePlayer pPlayer = m_pPlayerMan.GetElsePlayer(pCmd.idObject); + + // // Check distance again + // if (!pPlayer || !CanTouchTarget(pPlayer.GetPos(), 0.0f, 3)) + // return; + + // m_idSevNPC = pCmd.idObject; + // m_bTalkWithNPC = true; + // m_iBoothState = 3; + + // g_pGame.GetGameSession().c2s_CmdNPCSevGetContent(GP_NPCSEV_BOOTHSELL); + + // m_pBuyPack.RemoveAllItems(); + // m_pSellPack.RemoveAllItems(); + // m_pEPBoothBPack.RemoveAllItems(); + // m_pEPBoothSPack.RemoveAllItems(); + + // CECGameUIMan* pGameUI = g_pGame.GetGameRun().GetUIManager().GetInGameUIMan(); + // pGameUI.PopupBoothDialog(true, false, pCmd.idObject); + //} + else + { + return; + } + } + + // Does host player have specified way point ? + bool HasWayPoint(uint? wID) + { + if (wID == null) + { + return false; + } + for (int i = 0; i < m_aWayPoints.Count; i++) + { + if (m_aWayPoints[i] == wID) + return true; + } + + return false; + } + + void OnMsgHstWayPoint(ECMSG Msg) + { + //CECGameUIMan pGameUI = EC_Game.GetGameRun().GetUIManager().GetInGameUIMan(); + + //if (Convert.ToInt32(Msg.dwParam2) == CommandID.ACTIVATE_WAYPOINT) + //{ + // cmd_activate_waypoint pCmd = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1); + // m_aWayPoints.Add(pCmd.waypoint); + + // // add to waypoints array + // pGameUI.GetMapDlgsMgr().UpdateWayPoints(&pCmd.waypoint, 1, false); + + // // Print a notify message + // const CECMapDlgsMgr::PointMap& aWayPoints = pGameUI.GetMapDlgsMgr().GetTransPoint(); + // CECMapDlgsMgr::PointMap::const_iterator itr = aWayPoints.find(pCmd.waypoint); + // if(itr != aWayPoints.end()) + // { + // g_pGame.GetGameRun().AddFixedMessage(FIXMSG_NEWWAYPOINT, (itr.second).strName); + + // bool bCanPopUITips = true; + // int count = CECUIConfig::Instance().GetGameUI().GetTaskIDDisableWayPointsUITipsCount(); + // // ¼ì²éÉíÉÏÊÇ·ñÓнûÖ¹µ¯³ötipsµÄÈÎÎñ + // for (int i=0;i serverTime) + bInWar = true; + } + return bInWar; + } + + public int GetCountry() { return m_idCountry; } + + // Get battle info. + //public BATTLEINFO GetBattleInfo() { return m_BattleInfo; } + + //public bool IsInCountryWar() { return IsInBattle() && GetBattleInfo().IsCountryWar(); } + + // End NPC service + public void EndNPCService() + { + m_idSevNPC = 0; + m_bTalkWithNPC = false; + m_iBoothState = 0; + m_bIsInKingService = false; + //m_pOffShopCtrl.SetNPCSevFlag(COfflineShopCtrl::NPCSEV_NULL); + } void UpdateGFXs(float dwDeltaTime) { diff --git a/Assets/Scripts/CECUIManager.cs b/Assets/Scripts/CECUIManager.cs index 8501016035..34c4e98d6c 100644 --- a/Assets/Scripts/CECUIManager.cs +++ b/Assets/Scripts/CECUIManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using BrewMonster; +using BrewMonster.UI; using UnityEngine; public class CECUIManager : MonoSingleton @@ -13,7 +14,9 @@ public class CECUIManager : MonoSingleton [SerializeField] private HUDNPC npsUI; [SerializeField] private int currentTargetNPCID; - + CECGameUIMan gameUI; + [SerializeField] private DialogScriptTableObject dialogResouce; + [SerializeField] private Canvas canvasDlg; protected override void Awake() { base.Awake(); @@ -104,4 +107,15 @@ public class CECUIManager : MonoSingleton kv.Value.SetActive(false); } } + + public CECGameUIMan GetInGameUIMan() + { + if (gameUI == null) + { + gameUI = new CECGameUIMan(); + gameUI.SetDependency(dialogResouce, canvasDlg); + gameUI.Init(); + } + return gameUI; + } } \ No newline at end of file diff --git a/Assets/StreamingAssets/ingame.stf b/Assets/StreamingAssets/ingame.stf new file mode 100644 index 0000000000..0d48821a45 Binary files /dev/null and b/Assets/StreamingAssets/ingame.stf differ diff --git a/Assets/StreamingAssets/ingame.stf.meta b/Assets/StreamingAssets/ingame.stf.meta new file mode 100644 index 0000000000..e2e7596615 --- /dev/null +++ b/Assets/StreamingAssets/ingame.stf.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 900c2b23089d0e1488dfae0059db9425 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/StreamingAssets/msgbox.stf b/Assets/StreamingAssets/msgbox.stf new file mode 100644 index 0000000000..52c84ea390 Binary files /dev/null and b/Assets/StreamingAssets/msgbox.stf differ diff --git a/Assets/StreamingAssets/msgbox.stf.meta b/Assets/StreamingAssets/msgbox.stf.meta new file mode 100644 index 0000000000..e58db4bc55 --- /dev/null +++ b/Assets/StreamingAssets/msgbox.stf.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: de3ba170288dec647b1957bf1af29f86 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 80e957ebe4..0b5a17407d 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -773,7 +773,7 @@ PlayerSettings: webGLCloseOnQuit: 0 webWasm2023: 0 scriptingDefineSymbols: - Android: DOTWEEN;TESTFAST + Android: DOTWEEN;TESTFAST;_TASK_CLIENT EmbeddedLinux: DOTWEEN GameCoreScarlett: DOTWEEN GameCoreXboxOne: DOTWEEN