update Task: complete read task templ, log task name and description on UI, add sprites asset

This commit is contained in:
MinhHai
2025-11-12 16:56:35 +07:00
parent 58ae3d64b2
commit 2c3c44de4e
81 changed files with 16253 additions and 506 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dfcf99e0d0f5f4460989aafc79d64b82
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fbe0894d8bb02420b91603e804090540
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8027cada0ef5e4a9f827001b4747174d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,314 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &700152255263326765
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5053903421260846465}
- component: {fileID: 4314770845850481090}
m_Layer: 5
m_Name: TreeViewItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5053903421260846465
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 700152255263326765}
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: 3882154025378162395}
- {fileID: 5827054231092576763}
m_Father: {fileID: 0}
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: 250, y: 80}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4314770845850481090
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 700152255263326765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3428dd2e9dd644e0b0cb408bd3202f21, type: 3}
m_Name:
m_EditorClassIdentifier:
m_text: {fileID: 1383932928540251694}
m_Button: {fileID: 1762532130762754577}
m_uItemData: 0
OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2040002976300010419
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3882154025378162395}
- component: {fileID: 2230410216357545400}
- component: {fileID: 9062463037674165507}
- component: {fileID: 1762532130762754577}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3882154025378162395
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
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: 5053903421260846465}
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 &2230410216357545400
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
m_CullTransparentMesh: 1
--- !u!114 &9062463037674165507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1762532130762754577
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
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: 9062463037674165507}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2916175606199835458
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5827054231092576763}
- component: {fileID: 5842649278580849339}
- component: {fileID: 1383932928540251694}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5827054231092576763
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2916175606199835458}
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: 5053903421260846465}
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 &5842649278580849339
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2916175606199835458}
m_CullTransparentMesh: 1
--- !u!114 &1383932928540251694
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2916175606199835458}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: New Text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 61.25
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}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8752f9e95e4124abfb0d46a2cbe805e4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 32f72ac9a8ef64a2ebb76719571780c1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ac46beb7dcb944fc78a3e09d50be3a8a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 123746285331b4b27a5ca0293f881a6c
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 8690caffb21524eba944b517f4964558
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 18b0178edf1b14a1e9a19b2230e0e270
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 01b79c3dc401e4fdfb17b72d677f9fbd
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 950 B

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 00976b2e066af4e1f85ff5f3c94b5d48
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: f9eb4327d68ef4ce281200cbbdff3f96
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: f4b9078f8552646528dc61807b96dce2
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: ef3296c82b3934a24b288ac6309eb7a7
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: 3, y: 3, z: 3, w: 3}
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: 512
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: WebGL
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: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 429873f63148845839a3ecfe5aa4ed07
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 582 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 4744752b0496d42d0b1c52fcb705e044
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 42074c4f5f76b4cbc9043df8f430af5f
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 9de07872267c5419b9fa9c849eb45858
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 9d4b52827a31d42438c5b84e7f9729a0
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: c3391972be9854a8fa42de37bb973f08
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 8f24853d9cfea43389e8fb3101ffaae1
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: c2cc7625a1f3a4f569a5be891f29df19
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 73873399fec964578b62204f20c40517
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: e09a5d2cb3c3f4c858754a1e90a44abd
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: b545f49a479374ffaaec0c8f123b0c5f
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: 512
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: WebGL
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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 38df93573cefb49559326bf3e14ec118
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: 512
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: WebGL
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:
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6149c1f05e5a865965d9aa5c40ce4072e24ed37a77cb45a8c6d866b17127ea36
size 17657
oid sha256:3c602a4daacba2ea32dd2bdda69ac81ef5613c2afec5fde068ca6d58fe03ae4a
size 22217
@@ -0,0 +1,67 @@
using UnityEngine;
using System;
namespace BrewMonster.Network
{
public partial class EC_Game
{
private static uint m_AbsTickStart;
private static int m_AbsTimeStart;
private static int m_iTimeError; // 服务器与本机时间差(秒) // Time error in seconds
private static int m_iTimeZoneBias; // 服务器时区偏移(秒) // Server timezone bias in seconds
// 设置时间误差 // Set time error
public static void SetServerTime(int iSevTime, int iTimeZoneBias)
{
Debug.Log($"SetServerTime, iSevTime = {iSevTime}, iTimeZoneBias = {iTimeZoneBias}");
int iOldTimeError = m_iTimeError;
int nowUnix = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds();
m_iTimeError = iSevTime - nowUnix; // 记录与本机的时间差 // store delta with local
m_iTimeZoneBias = iTimeZoneBias; // 记录服务器时区偏移 // store server timezone bias
// 计算服务器本地时间并设置昼夜 // Compute server local time and set time of day
var serverLocal = DateTimeOffset.FromUnixTimeSeconds((long)iSevTime + iTimeZoneBias);
int nTimeInDay = serverLocal.Hour * 3600 + serverLocal.Minute * 60 + serverLocal.Second;
// GetGameRun()->GetWorld()->GetSunMoon()->SetTimeOfTheDay(nTimeInDay / (4.0f * 3600.0f));
// 设置昼夜时间(原逻辑保留为注释) // Set time of day (original call left commented)
// 防沉迷时长修正 // Anti-wallow playtime adjust
// S2C::player_wallow_info wallowinfo = GetGameRun()->GetWallowInfo();
// if (wallowinfo.anti_wallow_active)
// {
// wallowinfo.play_time += m_iTimeError - iOldTimeError;
// GetGameRun()->SetWallowInfo(wallowinfo);
// }
// 初始化绝对时间参考点 // Initialize absolute time reference
m_AbsTimeStart = iSevTime;
m_AbsTickStart = (uint)(Time.realtimeSinceStartup * 1000.0f);
Debug.Log($"timeGetTime(), TickStart = {m_AbsTickStart}");
}
public static int GetServerAbsTime()
{
uint curTick = (uint)(Time.realtimeSinceStartup * 1000.0f);
if (curTick < m_AbsTickStart)
{
// if player run this game more than 49.71 days...
uint sec = (((uint)~0u - m_AbsTickStart + 1u) + curTick) / 1000u;
m_AbsTickStart = curTick;
m_AbsTimeStart += (int)sec;
return m_AbsTimeStart;
}
else
{
uint sec = (curTick - m_AbsTickStart) / 1000u;
return m_AbsTimeStart + (int)sec;
}
}
public float timeGetTime()
{
return Time.time;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8a2ddad1f3474e129d674cb1626ee925
timeCreated: 1762332519
@@ -4,9 +4,11 @@ using UnityEngine;
using BrewMonster;
using System.Collections.Generic;
using System.IO;
using CSNetwork;
namespace BrewMonster.Network
{
public class EC_Game
public partial class EC_Game
{
#region Fields
private static ATaskTemplMan m_pTaskMan; // Task template manager
@@ -0,0 +1,11 @@
partial class CECPlayer
{
protected int m_iMoneyCnt; // Amount of money the player has
public int GetMoneyAmount(){ return m_iMoneyCnt; }
public byte GetShapeMask()
{
// restore the original data from 8~15 bit
return (byte)((m_iShape & 0xff00) >> 8);
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 374bbbec130949df8eabff08a278da8b
timeCreated: 1762416128
@@ -14,7 +14,7 @@ using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SceneManagement;
public abstract class CECPlayer : CECObject
public abstract partial class CECPlayer : CECObject
{
[SerializeField] protected Transform parentModel;
[SerializeField] protected TextMeshProUGUI txtName;
@@ -651,6 +651,12 @@ namespace CSNetwork
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_INFO00, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf,
pCmdHeader);
break;
case CommandID.SERVER_TIME:
{
cmd_server_time pcmd_server_time = GPDataTypeHelper.FromBytes<cmd_server_time>(pDataBuf);
EC_ManMessage.PostMessage(EC_MsgDef.MSG_SERVERTIME, -1, 0, pcmd_server_time.time, pcmd_server_time.timebias);
break;
}
case CommandID.SCENE_SERVICE_NPC_LIST:
{
CECHostSkillModel.Instance.RecvNPCServiceList(protocol.Data);
@@ -8,6 +8,7 @@ namespace BrewMonster.Scripts.Task
{
/// <summary>
/// contains and manages all task templates
/// init in EC_Game
/// </summary>
public class ATaskTemplMan
{
@@ -32,6 +33,7 @@ namespace BrewMonster.Scripts.Task
private List<ATaskTempl> m_SkillTaskLst = new List<ATaskTempl>();
private List<ATaskTempl> m_TmLmtChkLst = new List<ATaskTempl>();
private List<ATaskTempl> m_TasksCanSeekOut = new List<ATaskTempl>();
private elementdataman m_pEleDataMan;
@@ -73,21 +75,23 @@ namespace BrewMonster.Scripts.Task
// read File and prepare offset array before loading tasks
pOffs = AAssit.ReadArrayFromBinary<uint>(fs, (int)tph.item_count, ref readBytes);
//Debug.Log((int)tph.item_count);
Debug.Log((int)tph.item_count);
//BMLogger.Log($" [MH] Task File Lenght: {fs.Length}");
for (int i = 874; i < 875; i++) //TODO: tph.item_count
// for (int i = 2058; i < 2059; i++) //TODO: tph.item_count
Debug.Log($" Starting to load {tph.item_count} task templates...");
for (int i = 0; i < tph.item_count; i++)
{
// mvoe file pointer to task offset
fs.Seek(pOffs[i], SeekOrigin.Begin);
BMLogger.Log(" [MH] Loading Task Templ at offset: " + pOffs[i]);
// BMLogger.Log(" [MH] Loading Task Templ at offset: " + pOffs[i]);
ATaskTempl pTempl = new ATaskTempl();
g_ulNewCount++;
Debug.Log($"Task Index {i}: Attempting to load task template...");
// Debug.Log($"Task Index {i}: Attempting to load task template...");
if (!pTempl.LoadFromBinFile(fs))
{
EC_TaskInterface.WriteLog(0, (int)pTempl.m_FixedData.m_ID, 0, "Cant Load Task");
CECTaskInterface.WriteLog(0, (int)pTempl.m_FixedData.m_ID, 0, "Cant Load Task");
// LOG_DELETE(pTempl);
continue;
}
@@ -95,6 +99,8 @@ namespace BrewMonster.Scripts.Task
AddOneTaskTempl(pTempl);
// TaskInterface::WriteLog(0, pTempl->m_ID, 2, "LoadTask");
}
Debug.Log($" Finished loading {m_TaskTemplMap.Count} task templates.");
// // char log[1024];
// // sprintf(log, "LoadTask, Count = %d", m_TaskTemplMap.size());
@@ -139,13 +145,39 @@ namespace BrewMonster.Scripts.Task
{
}
public ATaskTempl GetTopTaskByID(uint ulID)
{
if (m_TaskTemplMap.TryGetValue(ulID, out ATaskTempl task))
{
return task;
}
return null;
}
public ATaskTempl GetTaskTemplByID(uint ulID)
{
if (m_TaskTemplMap.TryGetValue((uint)ulID, out ATaskTempl task))
{
return task;
}
return null;
}
public bool CanGiveUpTask(uint ulTaskId)
{
var pTempl = GetTaskTemplByID(ulTaskId);
if (pTempl == null) return false;
pTempl = pTempl.GetTopTask();
return pTempl.m_FixedData.m_bCanGiveUp;
}
private void AddOneTaskTempl(ATaskTempl pTask)
{
//todo: recheck - wrong logic
if (m_AllTemplMap.ContainsKey(pTask.m_FixedData.m_ID))
if (m_TaskTemplMap.ContainsKey(pTask.m_FixedData.m_ID))
{
EC_TaskInterface.WriteLog(0, (int)pTask.m_FixedData.m_ID, 0, "Dup Task Found");
CECTaskInterface.WriteLog(0, (int)pTask.m_FixedData.m_ID, 0, "Dup Task Found");
// Optionally log duplicate task found, e.g.:
// Debug.LogWarning($"Duplicate Task Found: {pTempl.m_ID}");
return;
@@ -165,7 +197,7 @@ namespace BrewMonster.Scripts.Task
{
if (m_DynTaskMap.TryGetValue(pTask.m_FixedData.m_ID, out ATaskTempl task))
{
EC_TaskInterface.WriteLog(0, (int)pTask.m_FixedData.m_ID, 0, "Dup Dyn Task Found");
CECTaskInterface.WriteLog(0, (int)pTask.m_FixedData.m_ID, 0, "Dup Dyn Task Found");
}
m_DynTaskMap[pTask.m_FixedData.m_ID] = pTask;
@@ -175,10 +207,10 @@ namespace BrewMonster.Scripts.Task
if (pTask.m_FixedData.m_bAutoDeliver && pTask.m_FixedData.m_bDisplayInExclusiveUI)
m_ExlusiveAwardTaskMap[pTask.m_FixedData.m_ID] = pTask;
//#if _TASK_CLIENT
// if (pTask.m_ulDelvNPC != 0 && pTask.m_bCanSeekOut)
// m_TasksCanSeekOut.Add(pTask);
//#endif
#if _TASK_CLIENT
if (pTask.m_FixedData.m_ulDelvNPC != 0 && pTask.m_FixedData.m_bCanSeekOut)
m_TasksCanSeekOut.Add(pTask);
#endif
AddTaskToMap(pTask);
}
@@ -229,7 +261,7 @@ namespace BrewMonster.Scripts.Task
if (pData.storage_id == 0) continue;
if (pData.storage_id > EC_TaskInterface.TASK_STORAGE_COUNT) return false;
if (pData.storage_id > CECTaskInterface.TASK_STORAGE_COUNT) return false;
if (m_StorageEssenseMap.ContainsKey(pData.storage_id)) return false;
m_StorageEssenseMap[pData.storage_id] = pData.id;
for (var i = 0; i < pData.id_tasks.Length; i++)
@@ -251,7 +283,7 @@ namespace BrewMonster.Scripts.Task
if (pData.storage_id == 0) continue;
if (pData.storage_id > EC_TaskInterface.TASK_STORAGE_COUNT) return false;
if (pData.storage_id > CECTaskInterface.TASK_STORAGE_COUNT) return false;
if (m_StorageEssenseMap.ContainsKey(pData.storage_id)) return false;
m_StorageEssenseMap[pData.storage_id] = pData.id;
for (var i = 0; i < pData.id_tasks.Length; i++)
@@ -265,5 +297,19 @@ namespace BrewMonster.Scripts.Task
}
return true;
}
#if _TASK_CLIENT
public bool IsTaskToPush(int id)
{
// TODO: Implement this method properly
// int count = m_TasksToPush.size();
// for (size_t i = 0; i < count; ++i) {
// ATaskTempl pTempl = m_TasksToPush[i].task;
// if (pTempl && (int)pTempl->m_ID == id) return true;
// }
return false;
}
#endif
}
}
@@ -0,0 +1,991 @@
using BrewMonster.Network;
using BrewMonster.Scripts.Player;
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
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public class Kill_Player_Requirements
{
public const uint MAX_OCCPU_MASK = ((uint)1 << TaskInterfaceConstants.MAX_OCCUPATIONS) - 1u;
public uint m_ulOccupations;
public int m_iMinLevel;
public int m_iMaxLevel;
public int m_iGender;
public int m_iForce;
public Kill_Player_Requirements()
{
m_iMinLevel = 10;
m_iMaxLevel = 100;
m_iGender = 0;
m_iForce = 0;
m_ulOccupations = MAX_OCCPU_MASK;
}
public bool IsMeetAllOccupation()
{
return m_ulOccupations == MAX_OCCPU_MASK;
}
public bool CheckRequirements(int iOccupation, int iLevel, bool bGender, int iForce)
{
bool bForce = false;
// У2ΪŮ // In editor: 1 is male, 2 is female
int iGender = bGender ? 2 : 1;
// 0ûҪ // In editor: 0 means no force requirement
if (m_iForce == 0)
{
bForce = true;
}
// ʾҪ // Otherwise indicates there is a force requirement
else
{
// ͻҹֱõһλʾ // Map force ids to bit positions
int iForceMask = 0;
if (iForce == 0)
{
return false;
}
else if (iForce == 1004)
{
iForceMask = 1 << 0;
}
else if (iForce == 1005)
{
iForceMask = 1 << 1;
}
else if (iForce == 1006)
{
iForceMask = 1 << 2;
}
bForce = (m_iForce & iForceMask) != 0;
}
return ((m_ulOccupations & (1u << iOccupation)) != 0)
&& m_iMinLevel <= iLevel
&& m_iMaxLevel >= iLevel
&& (m_iGender != 0 ? m_iGender == iGender : true)
&& bForce;
}
}
#if _TASK_CLIENT
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Task_State_info
{
public uint m_ulTimeLimit;
public uint m_ulTimePassed;
public uint m_ulNPCToProtect;
public uint m_ulProtectTime;
public uint m_ulWaitTime;
public uint m_ulErrCode;
public uint m_ulGoldWanted;
public uint m_ulReachLevel;
public uint m_ulReachReincarnation;
public uint m_ulReachRealm;
public uint m_ulPremLevelMin;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct m_MonsterWanted_s
{
public uint m_ulMonsterId;
public uint m_ulMonstersToKill;
public uint m_ulMonstersKilled;
}
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.MAX_MONSTER_WANTED)]
public m_MonsterWanted_s[] m_MonsterWanted;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct m_ItemsWanted_s
{
public uint m_ulItemId;
public uint m_ulItemsToGet;
public uint m_ulItemsGained;
public uint m_ulMonsterId;
}
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.MAX_ITEM_WANTED)]
public m_ItemsWanted_s[] m_ItemsWanted;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TASK_INFO_PLAYER
{
public uint m_ulPlayersToKill;
public uint m_ulPlayersKilled;
public Kill_Player_Requirements m_Requirements;
}
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.MAX_PLAYER_WANTED)]
public TASK_INFO_PLAYER[] m_PlayerWanted;
// abase::vector<wchar_t*> m_TaskCharArr (assumed 3 pointers: start, finish, end_of_storage; 32-bit layout)
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct abase_vector_wchar_t_ptr
{
public uint _start;
public uint _finish;
public uint _end_of_storage;
}
public abase_vector_wchar_t_ptr m_TaskCharArr;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Task_Award_Preview
{
public uint m_ulGold;
public uint m_ulExp;
public uint m_ulRealmExp;
public uint m_ulSP;
public bool m_bHasItem;
public bool m_bItemKnown;
public uint m_ulItemTypes;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.MAX_ITEM_AWARD)]
public uint[] m_ItemsId;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.MAX_ITEM_AWARD)]
public uint[] m_ItemsNum;
public int m_iForceActivity;
public int m_iForceContrib;
public int m_iForceRepu;
}
#endif
public class TaskInterfaceConstants
{
// Task Prerequisite Error Code
public const int TASK_PREREQU_FAIL_INDETERMINATE = 1;
public const int TASK_PREREQU_FAIL_NOT_ROOT = 2;
public const int TASK_PREREQU_FAIL_SAME_TASK = 3;
public const int TASK_PREREQU_FAIL_NO_SPACE = 4;
public const int TASK_PREREQU_FAIL_FULL = 5;
public const int TASK_PREREQU_FAIL_CANT_REDO = 6;
public const int TASK_PREREQU_FAIL_BELOW_LEVEL = 7;
public const int TASK_PREREQU_FAIL_ABOVE_LEVEL = 8;
public const int TASK_PREREQU_FAIL_NO_ITEM = 9;
public const int TASK_PREREQU_FAIL_BELOW_REPU = 10;
public const int TASK_PREREQU_FAIL_CLAN = 11;
public const int TASK_PREREQU_FAIL_WRONG_GENDER = 12;
public const int TASK_PREREQU_FAIL_NOT_IN_OCCU = 13;
public const int TASK_PREREQU_FAIL_WRONG_PERIOD = 14;
public const int TASK_PREREQU_FAIL_PREV_TASK = 15;
public const int TASK_PREREQU_FAIL_MAX_RCV = 16;
public const int TASK_PREREQU_FAIL_NO_DEPOSIT = 17;
public const int TASK_PREREQU_FAIL_NO_TASK = 18;
public const int TASK_PREREQU_FAIL_NOT_CAPTAIN = 19;
public const int TASK_PREREQU_FAIL_ILLEGAL_MEM = 20;
public const int TASK_PREREQU_FAIL_WRONG_TIME = 21;
public const int TASK_PREREQU_FAIL_NO_SUCH_SUB = 22;
public const int TASK_PREREQU_FAIL_MUTEX_TASK = 23;
public const int TASK_PREREQU_FAIL_NOT_IN_ZONE = 24;
public const int TASK_PREREQU_FAIL_WRONG_SUB = 25;
public const int TASK_PREREQU_FAIL_OUTOF_DIST = 26;
public const int TASK_PREREQU_FAIL_GIVEN_ITEM = 27;
public const int TASK_PREREQU_FAIL_LIVING_SKILL = 28;
public const int TASK_PREREQU_FAIL_SPECIAL_AWARD = 29;
public const int TASK_PREREQU_FAIL_GM = 30;
public const int TASK_PREREQU_FAIL_GLOBAL_KEYVAL = 31;
public const int TASK_PREREQU_FAIL_SHIELD_USER = 32;
public const int TASK_PREREQU_FAIL_ALREADY_HAS_PQ = 33;
public const int TASK_PREREQU_FAIL_MAX_ACC_CNT = 34;
public const int TASK_PREREQU_FAIL_RMB_NOT_ENOUGH = 35;
public const int TASK_PREREQU_FAIL_NOT_COUPLE = 36;
public const int TASK_PREREQU_FAIL_ERR_CHAR_TIME = 37;
public const int TASK_PREREQU_FAIL_NOT_IVTRSLOTNUM = 38; // version 81
public const int TASK_PREREQU_FAIL_BELOW_FACTION_CONTRIB = 39; // version 87
public const int TASK_PREREQU_FAIL_BELOW_RECORD_TASKS_NUM = 40; // version 91
public const int TASK_PREREQU_FAIL_OVER_RECEIVE_PER_DAY = 41;
public const int TASK_PREREQU_FAIL_TRANSFORM_MASK = 42;
public const int TASK_PREREQU_FAIL_FORCE = 43;
public const int TASK_PREREQU_FAIL_FORCE_REPUTATION = 44;
public const int TASK_PREREQU_FAIL_FORCE_CONTRIBUTION = 45;
public const int TASK_PREREQU_FAIL_EXP = 46;
public const int TASK_PREREQU_FAIL_SP = 47;
public const int TASK_PREREQU_FAIL_FORCE_AL = 48;
public const int TASK_PREREQU_FAIL_WEDDING_OWNER = 49;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_ACOUNT_LIMIT = 50;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_MARRIAGE = 51;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_FORCE = 52;
public const int TASK_PREREQU_FAIL_KING = 53;
public const int TASK_PREREQU_FAIL_IN_TEAM = 54;
public const int TASK_PREREQU_FAIL_TITLE = 55;
public const int TASK_PREREQU_FAIL_HISTORYSTAGE = 56;
public const int TASK_PREREQU_FAIL_NO_GIFTCARD_TASK = 57;
public const int TASK_PREREQU_FAIL_BELOW_REINCARNATION = 57;
public const int TASK_PREREQU_FAIL_ABOVE_REINCARNATION = 58;
public const int TASK_PREREQU_FAIL_BELOW_REALMLEVEL = 59;
public const int TASK_PREREQU_FAIL_ABOVE_REALMLEVEL = 60;
public const int TASK_PREREQU_FAIL_REALM_EXP_FULL = 61;
public const int TASK_PREREQU_FAIL_CARD_COUNT_COLLECTION = 62;
public const int TASK_PREREQU_FAIL_MAX_ROLE_CNT = 63;
public const int TASK_PREREQU_FAIL_CARD_COUNT_RANK = 64;
public const int TASK_PREREQU_FAIL_TASK_FORBID = 65;
public const int TASK_PREREQU_FAIL_NO_NAVIGATE_INSHPAED = 66;
public const int TASK_AWARD_FAIL_GIVEN_ITEM = 150;
public const int TASK_AWARD_FAIL_NEW_TASK = 151;
public const int TASK_AWARD_FAIL_REPUTATION = 152;
public const int TASK_AWARD_FAIL_GLOBAL_KEYVAL = 153;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_ACOUNT_LIMIT = 154;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_ACOUNT_STORAGE = 155;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_DIVORCE = 156;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_FACTION_RALATED = 157;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_FORCE_RALATED = 158;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_DIVIEND = 159;
public const int TASK_AWARD_FAIL_LEVEL_CHECK = 160;
// Task messages
public const int TASK_MSG_NEW = 1;
public const int TASK_MSG_SUCCESS = 2;
public const int TASK_MSG_FAIL = 3;
public const int TASK_ACTIVE_LIST_HEADER_LEN = 8;
public const int TASK_ACTIVE_LIST_MAX_LEN = 175;
public const int TASK_FINISHED_LIST_MAX_LEN = 2040;
public const int TASK_DATA_BUF_MAX_LEN = 32;
public const int TASK_FINISH_TIME_MAX_LEN = 1700;
public const int TASK_FINISH_COUNT_MAX_LEN = 730;
// 库任务 // Library tasks
public const int TASK_MAX_DELIVER_COUNT = 5;
public const int TASK_STORAGE_COUNT = 32;
public const int TASK_STORAGE_LEN = 10;
public const int TASK_STORAGE_WHELL_SCALE = 10000; // 10000.f originally
// 当前激活的任务列表缓冲区大小 // Current active task list buffer size
public const int TASK_ACTIVE_LIST_BUF_SIZE = (TASK_ACTIVE_LIST_MAX_LEN * TASK_DATA_BUF_MAX_LEN + TASK_ACTIVE_LIST_HEADER_LEN);
// 已完成的任务列表缓冲区大小 // Completed task list buffer size
public const int TASK_FINISHED_LIST_BUF_SIZE = 8192;
public const int TASK_FINISHED_LIST_BUF_SIZE_OLD = 4096;
// 任务全局数据大小 // Task global data size
public const int TASK_GLOBAL_DATA_SIZE = 256;
// 任务完成时间 // Task completion time
public const int TASK_FINISH_TIME_LIST_BUF_SIZE = 10240;
//任务完成次数 // Task completion count
public const int TASK_FINISH_COUNT_LIST_BUF_SIZE = 10240;
// 库任务 // Library tasks
public const int TASK_STORAGE_LIST_BUF_SIZE = 1024;
// Masks
public const int TASK_MASK_KILL_MONSTER = 0x00000001;
public const int TASK_MASK_COLLECT_ITEM = 0x00000002;
public const int TASK_MASK_TALK_TO_NPC = 0x00000004;
public const int TASK_MASK_REACH_SITE = 0x00000008;
public const int TASK_MASK_ANSWER_QUESTION = 0x00000010;
public const int TASK_MASK_TINY_GAME = 0x00000020;
public const int TASK_MASK_KILL_PQ_MONSTER = 0x00000040;
public const int TASK_MASK_KILL_PLAYER = 0x00000080;
public const int MAX_MONSTER_WANTED = 3; // 受ActiveTaskEntry大小限制,最大3 // Limited by ActiveTaskEntry size, max 3
public const int MAX_PLAYER_WANTED = MAX_MONSTER_WANTED;
public const int MAX_ITEM_WANTED = 10;
public const int MAX_ITEM_AWARD = 64;
public const int MAX_MONSTER_SUMMONED = 32; // 最大召唤出的怪物数量 // Maximum number of summoned monsters
public const int MAX_OCCUPATIONS = 12; // 职业 // Occupations
public const int TASK_MSG_CHANNEL_LOCAL = 0;
public const int TASK_MSG_CHANNEL_WORLD = 1;
public const int TASK_MSG_CHANNEL_BROADCAST = 9;
public const int TASK_TEAM_RELATION_MARRIAGE = 1;
public const int TASK_AWARD_MAX_CHANGE_VALUE = 255;
public const int TASK_AWARD_MAX_DISPLAY_VALUE = 64;
public const int TASK_AWARD_MAX_DISPLAY_EXP_CNT = 32; // 表达式的个数 // Number of expressions
public const int TASK_AWARD_MAX_DISPLAY_CHAR_LEN = 64; // 表达式的长度 // Length of expression
public const int TASK_WORLD_CONTRIBUTION_SPEND_PER_DAY = 30; // 免费玩家每日消费贡献度上限 // Daily contribution spend cap for free players
}
public class CECTaskInterface : TaskInterface
{
public const int TASK_MAX_DELIVER_COUNT = 5;
public const int TASK_STORAGE_COUNT = 32;
public const int TASK_STORAGE_LEN = 10;
public const float TASK_STORAGE_WHELL_SCALE = 10000;
public const int TASK_ACTIVE_LIST_HEADER_LEN = 8;
public const int TASK_ACTIVE_LIST_MAX_LEN = 175;
public const int TASK_FINISHED_LIST_MAX_LEN = 2040;
public const int TASK_DATA_BUF_MAX_LEN = 32;
public const int TASK_FINISH_TIME_MAX_LEN = 1700;
public const int TASK_FINISH_COUNT_MAX_LEN = 730;
// µ±Ç°¼¤»îµÄÈÎÎñÁÐ±í»º³åÇø´óС
public int TASK_ACTIVE_LIST_BUF_SIZE =>
(TASK_ACTIVE_LIST_MAX_LEN * TASK_DATA_BUF_MAX_LEN + TASK_ACTIVE_LIST_HEADER_LEN);
CECHostPlayer m_pHost;
ActiveTaskList m_pActiveListBuf; // Active task list buffer
// private byte[] m_pActiveListRawBuf; // raw buffer backing for active list (converted from C++)
byte[] m_pFinishedListBuf; // Finished task list buffer
byte[] m_pFinishedTimeListBuf; // Finished time list buffer
byte[] m_pFinishedCountListBuf;// Finished count list buffer
byte[] m_pStorageTaskListBuf; // Storage tasks list buffer
private Dictionary<int, bool> m_TasksToConfirm = new Dictionary<int, bool>();
private readonly System.Collections.Generic.Dictionary<uint, bool> m_emotionTask = new System.Collections.Generic.Dictionary<uint, bool>();
private bool m_bForceNavigateFinish;
public CECTaskInterface()
{
}
public CECTaskInterface(CECHostPlayer pHost)
{
m_pHost = pHost;
m_pActiveListBuf = null;
m_pFinishedListBuf = null;
m_pFinishedTimeListBuf = null;
m_pFinishedCountListBuf = null;
m_pStorageTaskListBuf = null;
}
// Initialize object
public bool Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
int iFinishedListLen, byte[] pFinishedTimeListBuf, int iFinishedTimeListLen,
byte[] pFinishedCountListBuf, int iFinishedCountListLen, byte[] pStorageTaskListBuf, int iStorageTaskListLen)
{
// basic argument check (converted from ASSERT)
if (pActiveListBuf == null || pFinishedListBuf == null || pFinishedTimeListBuf == null || pFinishedCountListBuf == null)
{
return false;
}
BMLogger.Log($"pActiveListBuf: {pActiveListBuf.Length} - {TaskInterfaceConstants.TASK_ACTIVE_LIST_BUF_SIZE}");
// allocate internal buffers and copy; remaining bytes are zero-initialized in C#
// m_pActiveListRawBuf = new byte[TaskInterfaceConstants.TASK_ACTIVE_LIST_BUF_SIZE];
// {
// int copy = Mathf.Min(iActiveListLen, TaskInterfaceConstants.TASK_ACTIVE_LIST_BUF_SIZE);
// if (copy > 0) System.Buffer.BlockCopy(pActiveListBuf, 0, m_pActiveListRawBuf, 0, copy);
// }
m_pActiveListBuf = new ActiveTaskList();
m_pActiveListBuf.ReadFromBuffer(pActiveListBuf);
m_pFinishedListBuf = new byte[TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE];
{
int copy = Mathf.Min(iFinishedListLen, TaskInterfaceConstants.TASK_FINISHED_LIST_BUF_SIZE);
if (copy > 0) System.Buffer.BlockCopy(pFinishedListBuf, 0, m_pFinishedListBuf, 0, copy);
}
m_pFinishedTimeListBuf = new byte[TaskInterfaceConstants.TASK_FINISH_TIME_LIST_BUF_SIZE];
{
int copy = Mathf.Min(iFinishedTimeListLen, TaskInterfaceConstants.TASK_FINISH_TIME_LIST_BUF_SIZE);
if (copy > 0) System.Buffer.BlockCopy(pFinishedTimeListBuf, 0, m_pFinishedTimeListBuf, 0, copy);
}
m_pFinishedCountListBuf = new byte[TaskInterfaceConstants.TASK_FINISH_COUNT_LIST_BUF_SIZE];
{
int copy = Mathf.Min(iFinishedCountListLen, TaskInterfaceConstants.TASK_FINISH_COUNT_LIST_BUF_SIZE);
if (copy > 0) System.Buffer.BlockCopy(pFinishedCountListBuf, 0, m_pFinishedCountListBuf, 0, copy);
}
m_pStorageTaskListBuf = new byte[TaskInterfaceConstants.TASK_STORAGE_LIST_BUF_SIZE];
{
int copy = Mathf.Min(iStorageTaskListLen, TaskInterfaceConstants.TASK_STORAGE_LIST_BUF_SIZE);
if (copy > 0) System.Buffer.BlockCopy(pStorageTaskListBuf, 0, m_pStorageTaskListBuf, 0, copy);
}
// Clear rest buffer // 清理剩余缓冲区
// No-op in C# because arrays are zero-initialized.
ATaskTemplMan pTaskMan = GetTaskTemplMan();
pTaskMan.Release();
string task_data_path = Path.Combine(Application.streamingAssetsPath, "data/tasks.data");
pTaskMan.LoadTasksFromPack(task_data_path, true);
pTaskMan.LoadNPCInfoFromPack("data\\task_npc.data");
pTaskMan.VerifyDynTasksPack("userdata\\dyn_tasks.data");
InitActiveTaskList();
m_bForceNavigateFinish = false;
return true;
}
public void CheckPQEnterWorldInit()
{
return;
ActiveTaskList pList = GetActiveTaskList();
List<ActiveTaskEntry> aEntries = new List<ActiveTaskEntry>(pList.m_TaskEntries);
for(var i = 0; i < pList.m_uTaskCount; i++)
{
var CurEntry = aEntries[i];
if (CurEntry.m_ulTemplAddr == 0)
continue;
ATaskTempl pTempl = CurEntry.GetTempl();
if (pTempl == null || !pTempl.m_FixedData.m_bPQTask)
continue;
pTempl.IncValidCount();
// _notify_svr(this, TASK_CLT_NOTIFY_PQ_CHECK_INIT, CurEntry.m_ID);
}
}
public static void WriteLog(int nPlayerId, int nTaskId, int nType, string szLog)
{
//do something?
}
public bool IsDeliverLegal()
{
// return !m_pHost->IsTrading() && m_pHost->GetBoothState() == 0 && !m_pHost->IsDead();
return m_pHost.IsTrading() && m_pHost.GetBoothState() == 0 && !m_pHost.IsDead();
}
public int GetCommonItemCount(uint ulCommonItem)
{
// CECInventory pPack = m_pHost.GetPack();
//EC_Inventory pPack = m_pHost.GetPack();
// return pPack != null ? EC_Inventory.GetItemTotalNum( 0, (int)ulCommonItem) : 0;
// paramater 1 to get type inventory (0:inventoty, 1:equip,...)
return EC_Inventory.GetItemTotalNum(EC_Inventory.IVTRTYPE_PACK, (int)ulCommonItem);
}
public int GetTaskItemCount(uint ulTaskItem)
{
// CECInventory* pPack = m_pHost->GetTaskPack();
// return pPack ? pPack->GetItemTotalNum((int)ulTaskItem) : 0;
return EC_Inventory.GetItemTotalNum(EC_Inventory.IVTRTYPE_TASKPACK, (int)ulTaskItem);
}
private ATaskTemplMan GetTaskTemplMan()
{
return EC_Game.GetTaskTemplateMan();
}
private ActiveTaskList GetActiveTaskList()
{
return m_pActiveListBuf;
}
private void InitActiveTaskList()
{
ActiveTaskList pLst = GetActiveTaskList();
if (pLst == null) return;
ATaskTemplMan pMan = GetTaskTemplMan();
if (pMan == null) return;
// reset counters
pLst.m_uTopShowTaskCount = 0;
pLst.m_uTopHideTaskCount = 0;
pLst.m_uTitleTaskCount = 0;
byte i = 0;
while (i < pLst.m_uTaskCount)
{
ActiveTaskEntry entry = pLst.m_TaskEntries[i];
if (entry == null)
{
i++;
continue;
}
// repair sibling linkage
if (entry.m_NextSblIndex != (char)0xff)
{
ActiveTaskEntry entryNextSbl = pLst.m_TaskEntries[entry.m_NextSblIndex];
if (entryNextSbl == null || entryNextSbl.m_PrevSblIndex != (char)i)
{
entry.m_NextSblIndex = (char)0xff;
}
}
// resolve template for top-level entries; children left unresolved in C#
if (entry.m_ParentIndex == (char)0xff)
{
entry.m_ulTemplAddr = 0u;
ATaskTempl topTempl = pMan.GetTopTaskByID(entry.m_ID);
if (topTempl != null)
{
if (topTempl.m_FixedData.m_bHidden)
pLst.m_uTopHideTaskCount++;
else if (topTempl.m_FixedData.m_bDisplayInTitleTaskUI)
pLst.m_uTitleTaskCount++;
else
pLst.m_uTopShowTaskCount++;
}
}
else
{
entry.m_ulTemplAddr = 0u;
}
// cap template best-effort (no pointer in managed)
if (entry.m_uCapTaskId != 0)
{
ATaskTempl cap = pMan.GetTopTaskByID(entry.m_uCapTaskId);
entry.m_ulCapTemplAddr = 0u;
if (cap == null)
{
entry.m_uCapTaskId = 0;
}
}
else
{
entry.m_ulCapTemplAddr = 0u;
}
i++;
}
// approximate used count
pLst.m_uUsedCount = pLst.m_uTaskCount;
}
public bool CheckTaskForbid(uint task_id){ return false; }
public bool IsAtCrossServer()
{
// TODO: cross server
// return CECCrossServer.Instance().IsOnSpecialServer();
return false;
}
public uint GetPlayerLevel()
{
return (uint)m_pHost.GetBasicProps().iLevel;
}
public uint GetGoldNum()
{
return (uint)m_pHost.GetMoneyAmount();
}
public int GetGlobalValue(int lKey)
{
return EC_Game.GetGameRun().GetCommonData(lKey);
}
public byte GetShapeMask()
{
return m_pHost.GetShapeMask();
}
public int GetPos(float[] pos)
{
A3DVECTOR3 vPos = m_pHost.GetPos();
if (pos != null && pos.Length >= 3)
{
pos[0] = vPos.x;
pos[1] = vPos.y;
pos[2] = vPos.z;
}
var world = World.CECWorld.Instance;
return world != null ? world.GetInstanceID() : 0;
}
public bool CheckSimpleTaskFinshConditon(uint task_id)
{
ATaskTempl pTempl = GetTaskTemplMan().GetTaskTemplByID(task_id);
if (pTempl == null) return false;
if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMSimpleClientTask && pTempl.m_FixedData.m_uiEmotion != 0)
{
if (m_emotionTask != null && m_emotionTask.TryGetValue(task_id, out bool finished))
return finished;
return false;
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMSimpleClientTaskForceNavi)
{
return GetForceNavigateFinishFlag();
}
return true;
}
public int GetFactionConsumeContrib()
{
return m_pHost.GetContribInfo().consume_contrib;
}
public int GetFactionExpContrib()
{
return m_pHost.GetContribInfo().exp_contrib;
}
public bool HasTask(uint ulTaskId)
{
ActiveTaskList pLst = GetActiveTaskList();
if (pLst == null) return false;
for (int i = 0; i < pLst.m_uTaskCount; i++)
{
ActiveTaskEntry entry = pLst.m_TaskEntries[i];
if ((uint)entry.m_ID == ulTaskId && entry.GetTempl() != null)
return true;
}
return false;
}
#if _TASK_CLIENT
// Prepare award preview based on task and state
public void GetTaskAwardPreview(uint ulTaskId, ref Task_Award_Preview p, bool bActiveTask=true)
{
// Zero and init output
p = default;
if (p.m_ItemsId == null) p.m_ItemsId = new uint[TaskInterfaceConstants.MAX_ITEM_AWARD];
if (p.m_ItemsNum == null) p.m_ItemsNum = new uint[TaskInterfaceConstants.MAX_ITEM_AWARD];
// Gather context
ActiveTaskList pLst = GetActiveTaskList();
uint ulCurTime = GetCurTime();
ATaskTempl pTempl = null;
AWARD_DATA ad = default;
uint ulMulti = 1u;
// Resolve template and dynamic award when active
if (bActiveTask && pLst != null)
{
for (int i = 0; i < pLst.m_uTaskCount; i++)
{
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[i];
if (CurEntry.m_ID != ulTaskId || CurEntry.m_ulTemplAddr == 0) continue;
pTempl = CurEntry.GetTempl();
// TODO: CalcAwardData/CalcAwardMulti not implemented yet in C#; use fixed success award and multiplier 1
if (pTempl != null)
{
ad = pTempl.m_FixedData.m_Award_S;
ulMulti = 1u;
}
if (ulMulti == 0u) return;
break;
}
}
// Fallback to top template when inactive
else
{
pTempl = GetTaskTemplMan().GetTopTaskByID(ulTaskId);
if (pTempl == null) return;
ad = pTempl.m_FixedData.m_Award_S;
}
// Fill basic award fields
unchecked
{
p.m_ulGold = ad.m_ulGoldNum * ulMulti;
p.m_ulExp = ad.m_ulExp * ulMulti;
p.m_ulSP = ad.m_ulSP * ulMulti;
}
p.m_iForceActivity = ad.m_iForceActivity;
p.m_iForceContrib = ad.m_iForceContribution;
p.m_iForceRepu = ad.m_iForceReputation;
p.m_ulRealmExp = ad.m_ulRealmExp;
// Apply level coefficient if configured (coefficient table not available; skip scaling)
if (ad.m_bUseLevCo)
{
uint ulLev = GetPlayerLevel();
if (ulLev == 0) ulLev = 1;
uint ulUpper = 0;
if (pTempl != null && pTempl.GetTopTask() != null)
ulUpper = pTempl.GetTopTask().m_FixedData.m_ulPremise_Lev_Max;
if (ulUpper != 0 && ulLev > ulUpper) ulLev = ulUpper;
// NOTE: Original code multiplies by _lev_co[ulLev-1]. Not available here; keep as-is.
}
// Candidate items handling
if (ad.m_ulCandItems == 1 && ad.m_CandItems != null && ad.m_CandItems.Length > 0)
{
p.m_bHasItem = true;
p.m_bItemKnown = true;
AWARD_ITEMS_CAND ic = ad.m_CandItems[0];
if (ic.m_bRandChoose)
{
p.m_bItemKnown = false;
}
else
{
for (int j = 0; j < ic.m_ulAwardItems; j++)
{
ITEM_WANTED wi = ic.m_AwardItems[j];
if (!wi.m_bCommonItem) continue;
else if (wi.m_fProb != 1.0f)
{
p.m_bItemKnown = false;
break;
}
else
{
// Period conversion not implemented; assume valid
if (p.m_ulItemTypes < TaskInterfaceConstants.MAX_ITEM_AWARD)
{
p.m_ItemsId[p.m_ulItemTypes] = wi.m_ulItemTemplId;
p.m_ItemsNum[p.m_ulItemTypes] = wi.m_ulItemNum;
p.m_ulItemTypes++;
}
}
}
}
}
else if (ad.m_ulCandItems > 1)
{
p.m_bHasItem = true;
}
// Done
return;
}
public uint GetTaskCount()
{
ActiveTaskList pLst = GetActiveTaskList();
uint ulCount = 0;
if (pLst == null) return 0u;
for (int i = 0; i < pLst.m_uTaskCount; i++)
{
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[i];
ATaskTempl pTempl = CurEntry.GetTempl();
if (pTempl != null
&& !pTempl.m_FixedData.m_bDisplayInTitleTaskUI
&& CurEntry.m_ParentIndex == (char)0xff)
{
if (!pTempl.m_FixedData.m_bHidden || pTempl.m_FixedData.m_bShowPrompt)
{
ulCount++;
}
}
}
return ulCount;
}
public uint GetTaskId(uint ulIndex)
{
ActiveTaskList pLst = GetActiveTaskList();
byte uTopCount = 0;
int uCount = 0;
if (pLst == null) return 0u;
while (uCount < pLst.m_uTaskCount)
{
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[uCount];
ATaskTempl pTempl = CurEntry.GetTempl();
if (pTempl != null
&& !pTempl.m_FixedData.m_bDisplayInTitleTaskUI
&& CurEntry.m_ParentIndex == (char)0xff)
{
if (!pTempl.m_FixedData.m_bHidden || pTempl.m_FixedData.m_bShowPrompt)
{
if (ulIndex == uTopCount)
return CurEntry.m_ID;
else
uTopCount++;
}
}
uCount++;
}
return 0u;
}
#endif
private bool GetForceNavigateFinishFlag()
{
return m_bForceNavigateFinish;
}
public void GetTaskStateInfo(uint ulTaskId, ref Task_State_info pInfo, bool bActiveTask=true)
{
// 清零并准备输出结构 // Zero and prepare output struct
pInfo = default;
if (pInfo.m_MonsterWanted == null)
pInfo.m_MonsterWanted = new Task_State_info.m_MonsterWanted_s[TaskInterfaceConstants.MAX_MONSTER_WANTED];
if (pInfo.m_ItemsWanted == null)
pInfo.m_ItemsWanted = new Task_State_info.m_ItemsWanted_s[TaskInterfaceConstants.MAX_ITEM_WANTED];
if (pInfo.m_PlayerWanted == null)
pInfo.m_PlayerWanted = new Task_State_info.TASK_INFO_PLAYER[TaskInterfaceConstants.MAX_PLAYER_WANTED];
ActiveTaskList pLst = GetActiveTaskList();
uint ulCurTime = GetCurTime(); // 当前时间 // current time
ATaskTempl pTempl = null;
ActiveTaskEntry foundEntry = default;
bool hasFoundEntry = false;
if (bActiveTask)
{
// 在激活任务列表中查找 // Search in active task list
for (int i = 0; i < pLst.m_uTaskCount; i++)
{
ActiveTaskEntry CurEntry = pLst.m_TaskEntries[i];
if (CurEntry.m_ID != ulTaskId || CurEntry.m_ulTemplAddr == 0) continue;
pTempl = CurEntry.GetTempl();
foundEntry = CurEntry;
hasFoundEntry = true;
// 检查任务是否可以完成 // Check if task can be completed
if (pTempl != null && pTempl.CanFinishTask(this, CurEntry, ulCurTime))
{
pInfo.m_ulErrCode = pTempl.RecursiveCheckAward(this, pLst, CurEntry, ulCurTime, -1);
if (pInfo.m_ulErrCode == TaskInterfaceConstants.TASK_AWARD_FAIL_LEVEL_CHECK)
{
ATaskTempl pParent = pTempl;
while (pParent != null && pParent.m_FixedData.m_ulPremise_Lev_Min == 0)
pParent = pParent.m_pParent;
if (pParent != null)
pInfo.m_ulPremLevelMin = pParent.m_FixedData.m_ulPremise_Lev_Min;
}
}
pInfo.m_ulTimePassed = ulCurTime > CurEntry.m_ulTaskTime ? (ulCurTime - CurEntry.m_ulTaskTime) : 0;
if (pTempl != null && pTempl.m_FixedData.m_ulPremise_Lev_Min != 0)
{
if (pTempl.m_FixedData.m_bPremCheckMaxHistoryLevel != 0 && GetPlayerLevel() < pTempl.m_FixedData.m_ulPremise_Lev_Min)
{
pInfo.m_ulErrCode = TaskInterfaceConstants.TASK_AWARD_FAIL_LEVEL_CHECK;
pInfo.m_ulPremLevelMin = pTempl.m_FixedData.m_ulPremise_Lev_Min;
}
}
break;
}
}
else
{
pTempl = GetTaskTemplMan().GetTopTaskByID(ulTaskId);
}
if (pTempl == null)
return;
// 基本任务要求 // Basic task requirements
if (pTempl.m_FixedData.m_ulTimeLimit != 0) pInfo.m_ulTimeLimit = pTempl.m_FixedData.m_ulTimeLimit;
if (pTempl.m_FixedData.m_ulGoldWanted != 0) pInfo.m_ulGoldWanted = pTempl.m_FixedData.m_ulGoldWanted;
// 任务类型分支 // Task method branches
if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMCollectNumArticle)
{
for (int j = 0; j < pTempl.m_FixedData.m_ulItemsWanted; j++)
{
var iw = pTempl.m_FixedData.m_ItemsWanted[j];
pInfo.m_ItemsWanted[j].m_ulItemId = iw.m_ulItemTemplId;
pInfo.m_ItemsWanted[j].m_ulItemsToGet = iw.m_ulItemNum;
pInfo.m_ItemsWanted[j].m_ulItemsGained = ATaskTempl._get_item_count(this, iw.m_ulItemTemplId, iw.m_bCommonItem);
}
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMKillNumMonster)
{
int ulItemCount = 0;
int ulMonsterCount = 0;
for (int j = 0; j < pTempl.m_FixedData.m_ulMonsterWanted; j++)
{
var mw = pTempl.m_FixedData.m_MonsterWanted[j];
if (mw.m_ulDropItemId != 0)
{
pInfo.m_ItemsWanted[ulItemCount].m_ulMonsterId = mw.m_ulMonsterTemplId;
pInfo.m_ItemsWanted[ulItemCount].m_ulItemId = mw.m_ulDropItemId;
pInfo.m_ItemsWanted[ulItemCount].m_ulItemsToGet = mw.m_ulDropItemCount;
pInfo.m_ItemsWanted[ulItemCount].m_ulItemsGained = ATaskTempl._get_item_count(this, mw.m_ulDropItemId, mw.m_bDropCmnItem);
ulItemCount++;
}
else
{
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonsterId = mw.m_ulMonsterTemplId;
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonstersToKill = mw.m_ulMonsterNum;
if (bActiveTask && hasFoundEntry)
{
pInfo.m_MonsterWanted[ulMonsterCount].m_ulMonstersKilled = foundEntry.m_wMonsterNum[j];
}
ulMonsterCount++;
}
}
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMKillPlayer)
{
int ulItemCount = 0;
int ulPlayerCount = 0;
for (int j = 0; j < pTempl.m_FixedData.m_ulPlayerWanted; j++)
{
var pw = pTempl.m_FixedData.m_PlayerWanted[j];
if (pw.m_ulDropItemId != 0)
{
pInfo.m_ItemsWanted[ulItemCount].m_ulItemId = pw.m_ulDropItemId;
pInfo.m_ItemsWanted[ulItemCount].m_ulItemsToGet = pw.m_ulDropItemCount;
pInfo.m_ItemsWanted[ulItemCount].m_ulItemsGained = ATaskTempl._get_item_count(this, pw.m_ulDropItemId, pw.m_bDropCmnItem);
ulItemCount++;
}
else
{
pInfo.m_PlayerWanted[ulPlayerCount].m_ulPlayersToKill = pw.m_ulPlayerNum;
if (bActiveTask && hasFoundEntry)
{
pInfo.m_PlayerWanted[ulPlayerCount].m_ulPlayersKilled = foundEntry.m_wMonsterNum[j];
}
pInfo.m_PlayerWanted[ulPlayerCount].m_Requirements = pw.m_Requirements;
ulPlayerCount++;
}
}
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMProtectNPC)
{
pInfo.m_ulNPCToProtect = pTempl.m_FixedData.m_ulNPCToProtect;
pInfo.m_ulProtectTime = pTempl.m_FixedData.m_ulProtectTimeLen;
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMWaitTime)
{
pInfo.m_ulWaitTime = pTempl.m_FixedData.m_ulWaitTime;
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMGlobalValOK)
{
pTempl.GetGlobalTaskChar(this, pInfo.m_TaskCharArr);
}
else if (pTempl.m_FixedData.m_enumMethod == (uint)TaskMethod.enumTMReachLevel)
{
pInfo.m_ulReachLevel = pTempl.m_FixedData.m_ulReachLevel;
pInfo.m_ulReachReincarnation = pTempl.m_FixedData.m_ulReachReincarnationCount;
pInfo.m_ulReachRealm = pTempl.m_FixedData.m_ulReachRealmLevel;
}
return;
}
private uint GetCurTime()
{
// use this to avoid task hack by changing the system time
return (uint)EC_Game.GetServerAbsTime();
}
}
}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 51efd16502ff14aba89b11b4a0a50acd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7c4d0bbc7b1d74528bf58ca8c5e1de34
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 02427e8a29d684a1da528b3d56458908
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,322 +0,0 @@
using BrewMonster.Network;
using BrewMonster.Scripts.Player;
using System.Collections.Generic;
using PerfectWorld.Scripts.Task;
using UnityEngine;
namespace BrewMonster.Scripts.Task
{
public class TaskInterfaceConstants
{
// Task Prerequisite Error Code
public const int TASK_PREREQU_FAIL_INDETERMINATE = 1;
public const int TASK_PREREQU_FAIL_NOT_ROOT = 2;
public const int TASK_PREREQU_FAIL_SAME_TASK = 3;
public const int TASK_PREREQU_FAIL_NO_SPACE = 4;
public const int TASK_PREREQU_FAIL_FULL = 5;
public const int TASK_PREREQU_FAIL_CANT_REDO = 6;
public const int TASK_PREREQU_FAIL_BELOW_LEVEL = 7;
public const int TASK_PREREQU_FAIL_ABOVE_LEVEL = 8;
public const int TASK_PREREQU_FAIL_NO_ITEM = 9;
public const int TASK_PREREQU_FAIL_BELOW_REPU = 10;
public const int TASK_PREREQU_FAIL_CLAN = 11;
public const int TASK_PREREQU_FAIL_WRONG_GENDER = 12;
public const int TASK_PREREQU_FAIL_NOT_IN_OCCU = 13;
public const int TASK_PREREQU_FAIL_WRONG_PERIOD = 14;
public const int TASK_PREREQU_FAIL_PREV_TASK = 15;
public const int TASK_PREREQU_FAIL_MAX_RCV = 16;
public const int TASK_PREREQU_FAIL_NO_DEPOSIT = 17;
public const int TASK_PREREQU_FAIL_NO_TASK = 18;
public const int TASK_PREREQU_FAIL_NOT_CAPTAIN = 19;
public const int TASK_PREREQU_FAIL_ILLEGAL_MEM = 20;
public const int TASK_PREREQU_FAIL_WRONG_TIME = 21;
public const int TASK_PREREQU_FAIL_NO_SUCH_SUB = 22;
public const int TASK_PREREQU_FAIL_MUTEX_TASK = 23;
public const int TASK_PREREQU_FAIL_NOT_IN_ZONE = 24;
public const int TASK_PREREQU_FAIL_WRONG_SUB = 25;
public const int TASK_PREREQU_FAIL_OUTOF_DIST = 26;
public const int TASK_PREREQU_FAIL_GIVEN_ITEM = 27;
public const int TASK_PREREQU_FAIL_LIVING_SKILL = 28;
public const int TASK_PREREQU_FAIL_SPECIAL_AWARD = 29;
public const int TASK_PREREQU_FAIL_GM = 30;
public const int TASK_PREREQU_FAIL_GLOBAL_KEYVAL = 31;
public const int TASK_PREREQU_FAIL_SHIELD_USER = 32;
public const int TASK_PREREQU_FAIL_ALREADY_HAS_PQ = 33;
public const int TASK_PREREQU_FAIL_MAX_ACC_CNT = 34;
public const int TASK_PREREQU_FAIL_RMB_NOT_ENOUGH = 35;
public const int TASK_PREREQU_FAIL_NOT_COUPLE = 36;
public const int TASK_PREREQU_FAIL_ERR_CHAR_TIME = 37;
public const int TASK_PREREQU_FAIL_NOT_IVTRSLOTNUM = 38; // version 81
public const int TASK_PREREQU_FAIL_BELOW_FACTION_CONTRIB = 39; // version 87
public const int TASK_PREREQU_FAIL_BELOW_RECORD_TASKS_NUM = 40; // version 91
public const int TASK_PREREQU_FAIL_OVER_RECEIVE_PER_DAY = 41;
public const int TASK_PREREQU_FAIL_TRANSFORM_MASK = 42;
public const int TASK_PREREQU_FAIL_FORCE = 43;
public const int TASK_PREREQU_FAIL_FORCE_REPUTATION = 44;
public const int TASK_PREREQU_FAIL_FORCE_CONTRIBUTION = 45;
public const int TASK_PREREQU_FAIL_EXP = 46;
public const int TASK_PREREQU_FAIL_SP = 47;
public const int TASK_PREREQU_FAIL_FORCE_AL = 48;
public const int TASK_PREREQU_FAIL_WEDDING_OWNER = 49;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_ACOUNT_LIMIT = 50;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_MARRIAGE = 51;
public const int TASK_PREREQU_FAIL_CROSSSERVER_NO_FORCE = 52;
public const int TASK_PREREQU_FAIL_KING = 53;
public const int TASK_PREREQU_FAIL_IN_TEAM = 54;
public const int TASK_PREREQU_FAIL_TITLE = 55;
public const int TASK_PREREQU_FAIL_HISTORYSTAGE = 56;
public const int TASK_PREREQU_FAIL_NO_GIFTCARD_TASK = 57;
public const int TASK_PREREQU_FAIL_BELOW_REINCARNATION = 57;
public const int TASK_PREREQU_FAIL_ABOVE_REINCARNATION = 58;
public const int TASK_PREREQU_FAIL_BELOW_REALMLEVEL = 59;
public const int TASK_PREREQU_FAIL_ABOVE_REALMLEVEL = 60;
public const int TASK_PREREQU_FAIL_REALM_EXP_FULL = 61;
public const int TASK_PREREQU_FAIL_CARD_COUNT_COLLECTION = 62;
public const int TASK_PREREQU_FAIL_MAX_ROLE_CNT = 63;
public const int TASK_PREREQU_FAIL_CARD_COUNT_RANK = 64;
public const int TASK_PREREQU_FAIL_TASK_FORBID = 65;
public const int TASK_PREREQU_FAIL_NO_NAVIGATE_INSHPAED = 66;
public const int TASK_AWARD_FAIL_GIVEN_ITEM = 150;
public const int TASK_AWARD_FAIL_NEW_TASK = 151;
public const int TASK_AWARD_FAIL_REPUTATION = 152;
public const int TASK_AWARD_FAIL_GLOBAL_KEYVAL = 153;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_ACOUNT_LIMIT = 154;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_ACOUNT_STORAGE = 155;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_DIVORCE = 156;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_FACTION_RALATED = 157;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_FORCE_RALATED = 158;
public const int TASK_AWARD_FAIL_CROSSSERVER_NO_DIVIEND = 159;
public const int TASK_AWARD_FAIL_LEVEL_CHECK = 160;
// Task messages
public const int TASK_MSG_NEW = 1;
public const int TASK_MSG_SUCCESS = 2;
public const int TASK_MSG_FAIL = 3;
public const int TASK_ACTIVE_LIST_HEADER_LEN = 8;
public const int TASK_ACTIVE_LIST_MAX_LEN = 175;
public const int TASK_FINISHED_LIST_MAX_LEN = 2040;
public const int TASK_DATA_BUF_MAX_LEN = 32;
public const int TASK_FINISH_TIME_MAX_LEN = 1700;
public const int TASK_FINISH_COUNT_MAX_LEN = 730;
// 库任务 // Library tasks
public const int TASK_MAX_DELIVER_COUNT = 5;
public const int TASK_STORAGE_COUNT = 32;
public const int TASK_STORAGE_LEN = 10;
public const int TASK_STORAGE_WHELL_SCALE = 10000; // 10000.f originally
// 当前激活的任务列表缓冲区大小 // Current active task list buffer size
public const int TASK_ACTIVE_LIST_BUF_SIZE = (TASK_ACTIVE_LIST_MAX_LEN * TASK_DATA_BUF_MAX_LEN + TASK_ACTIVE_LIST_HEADER_LEN);
// 已完成的任务列表缓冲区大小 // Completed task list buffer size
public const int TASK_FINISHED_LIST_BUF_SIZE = 8192;
public const int TASK_FINISHED_LIST_BUF_SIZE_OLD = 4096;
// 任务全局数据大小 // Task global data size
public const int TASK_GLOBAL_DATA_SIZE = 256;
// 任务完成时间 // Task completion time
public const int TASK_FINISH_TIME_LIST_BUF_SIZE = 10240;
//任务完成次数 // Task completion count
public const int TASK_FINISH_COUNT_LIST_BUF_SIZE = 10240;
// 库任务 // Library tasks
public const int TASK_STORAGE_LIST_BUF_SIZE = 1024;
// Masks
public const int TASK_MASK_KILL_MONSTER = 0x00000001;
public const int TASK_MASK_COLLECT_ITEM = 0x00000002;
public const int TASK_MASK_TALK_TO_NPC = 0x00000004;
public const int TASK_MASK_REACH_SITE = 0x00000008;
public const int TASK_MASK_ANSWER_QUESTION = 0x00000010;
public const int TASK_MASK_TINY_GAME = 0x00000020;
public const int TASK_MASK_KILL_PQ_MONSTER = 0x00000040;
public const int TASK_MASK_KILL_PLAYER = 0x00000080;
public const int MAX_MONSTER_WANTED = 3; // 受ActiveTaskEntry大小限制,最大3 // Limited by ActiveTaskEntry size, max 3
public const int MAX_PLAYER_WANTED = MAX_MONSTER_WANTED;
public const int MAX_ITEM_WANTED = 10;
public const int MAX_ITEM_AWARD = 64;
public const int MAX_MONSTER_SUMMONED = 32; // 最大召唤出的怪物数量 // Maximum number of summoned monsters
public const int MAX_OCCUPATIONS = 12; // 职业 // Occupations
public const int TASK_MSG_CHANNEL_LOCAL = 0;
public const int TASK_MSG_CHANNEL_WORLD = 1;
public const int TASK_MSG_CHANNEL_BROADCAST = 9;
public const int TASK_TEAM_RELATION_MARRIAGE = 1;
public const int TASK_AWARD_MAX_CHANGE_VALUE = 255;
public const int TASK_AWARD_MAX_DISPLAY_VALUE = 64;
public const int TASK_AWARD_MAX_DISPLAY_EXP_CNT = 32; // 表达式的个数 // Number of expressions
public const int TASK_AWARD_MAX_DISPLAY_CHAR_LEN = 64; // 表达式的长度 // Length of expression
public const int TASK_WORLD_CONTRIBUTION_SPEND_PER_DAY = 30; // 免费玩家每日消费贡献度上限 // Daily contribution spend cap for free players
}
public class EC_TaskInterface : TaskInterface
{
public const int TASK_MAX_DELIVER_COUNT = 5;
public const int TASK_STORAGE_COUNT = 32;
public const int TASK_STORAGE_LEN = 10;
public const float TASK_STORAGE_WHELL_SCALE = 10000;
public const int TASK_ACTIVE_LIST_HEADER_LEN = 8;
public const int TASK_ACTIVE_LIST_MAX_LEN = 175;
public const int TASK_FINISHED_LIST_MAX_LEN = 2040;
public const int TASK_DATA_BUF_MAX_LEN = 32;
public const int TASK_FINISH_TIME_MAX_LEN = 1700;
public const int TASK_FINISH_COUNT_MAX_LEN = 730;
// µ±Ç°¼¤»îµÄÈÎÎñÁÐ±í»º³åÇø´óС
public int TASK_ACTIVE_LIST_BUF_SIZE =>
(TASK_ACTIVE_LIST_MAX_LEN * TASK_DATA_BUF_MAX_LEN + TASK_ACTIVE_LIST_HEADER_LEN);
CECHostPlayer m_pHost;
ActiveTaskList m_pActiveListBuf; // Active task list buffer
object[] m_pFinishedListBuf; // Finished task list buffer
object[] m_pFinishedTimeListBuf; // Finished time list buffer
object[] m_pFinishedCountListBuf;// Finished count list buffer
object[] m_pStorageTaskListBuf; // Storage tasks list buffer
private Dictionary<int, bool> m_TasksToConfirm = new Dictionary<int, bool>();
public EC_TaskInterface()
{
}
public EC_TaskInterface(CECHostPlayer pHost)
{
m_pHost = pHost;
m_pActiveListBuf = null;
m_pFinishedListBuf = null;
m_pFinishedTimeListBuf = null;
m_pFinishedCountListBuf = null;
m_pStorageTaskListBuf = null;
}
public bool Init(object[] pActiveListBuf, int iActiveListLen, object[] pFinishedListBuf, int iFinishedListLen, object[] pFinishedTimeListBuf, int iFinishedTimeListLen, object[] pFinishedCountListBuf, int iFinishedCountListLen, object[] pStorageTaskListBuf, int iStorageTaskListLen)
{
// if (!(m_pActiveListBuf = a_malloc(TASK_ACTIVE_LIST_BUF_SIZE)))
// {
// glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECTaskInterface::Init", __LINE__);
// return false;
// }
//if (!(m_pFinishedListBuf = a_malloc(TASK_FINISHED_LIST_BUF_SIZE)))
//{
// a_free(m_pActiveListBuf);
// m_pFinishedListBuf = NULL;
// glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECTaskInterface::Init", __LINE__);
// return false;
//}
//if (!(m_pFinishedTimeListBuf = a_malloc(TASK_FINISH_TIME_LIST_BUF_SIZE)))
//{
// a_free(m_pActiveListBuf);
// a_free(m_pFinishedListBuf);
// glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECTaskInterface::Init", __LINE__);
// return false;
//}
//if (!(m_pFinishedCountListBuf = a_malloc(TASK_FINISH_COUNT_LIST_BUF_SIZE)))
//{
// a_free(m_pActiveListBuf);
// a_free(m_pFinishedListBuf);
// a_free(m_pFinishedCountListBuf);
// glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECTaskInterface::Init", __LINE__);
// return false;
//}
//if (!(m_pStorageTaskListBuf = a_malloc(TASK_STORAGE_LIST_BUF_SIZE)))
//{
// a_free(m_pActiveListBuf);
// a_free(m_pFinishedListBuf);
// a_free(m_pFinishedCountListBuf);
// a_free(m_pStorageTaskListBuf);
// glb_ErrorOutput(ECERR_NOTENOUGHMEMORY, "CECTaskInterface::Init", __LINE__);
// return false;
//}
//ASSERT(pActiveListBuf && pFinishedListBuf && pFinishedTimeListBuf && pFinishedCountListBuf);
//memcpy(m_pActiveListBuf, pActiveListBuf, iActiveListLen);
//memcpy(m_pFinishedListBuf, pFinishedListBuf, iFinishedListLen);
//memcpy(m_pFinishedTimeListBuf, pFinishedTimeListBuf, iFinishedTimeListLen);
//memcpy(m_pFinishedCountListBuf, pFinishedCountListBuf, iFinishedCountListLen);
//memcpy(m_pStorageTaskListBuf, pStorageTaskListBuf, iStorageTaskListLen);
//// Clear rest buffer
//if (iActiveListLen < TASK_ACTIVE_LIST_BUF_SIZE)
// memset((BYTE*)m_pActiveListBuf + iActiveListLen, 0, TASK_ACTIVE_LIST_BUF_SIZE - iActiveListLen);
//if (iFinishedListLen < TASK_FINISHED_LIST_BUF_SIZE)
// memset((BYTE*)m_pFinishedListBuf + iFinishedListLen, 0, TASK_FINISHED_LIST_BUF_SIZE - iFinishedListLen);
//if (iFinishedTimeListLen < TASK_FINISH_TIME_LIST_BUF_SIZE)
// memset((BYTE*)m_pFinishedTimeListBuf + iFinishedTimeListLen, 0, TASK_FINISH_TIME_LIST_BUF_SIZE - iFinishedTimeListLen);
//if (iFinishedCountListLen < TASK_FINISH_COUNT_LIST_BUF_SIZE)
// memset((BYTE*)m_pFinishedCountListBuf + iFinishedCountListLen, 0, TASK_FINISH_COUNT_LIST_BUF_SIZE - iFinishedCountListLen);
//if (iStorageTaskListLen < TASK_STORAGE_LIST_BUF_SIZE)
// memset((BYTE*)m_pStorageTaskListBuf + iStorageTaskListLen, 0, TASK_STORAGE_LIST_BUF_SIZE - iStorageTaskListLen);
Debug.Log("[Dat]- Init GetTaskTemplMan");
ATaskTemplMan pTaskMan = GetTaskTemplMan();
if (pTaskMan == null)
{
Debug.LogError("[Dat]- fail to create ATaskTemplMan");
return false;
}
pTaskMan.Release();
// pTaskMan.LoadTasksFromPack("data\\tasks.data", true);
// pTaskMan.LoadNPCInfoFromPack("data\\task_npc.data");
// pTaskMan.VerifyDynTasksPack("userdata\\dyn_tasks.data");
// InitActiveTaskList();
//m_bForceNavigateFinish = false;
return true;
}
public void CheckPQEnterWorldInit()
{
return;
ActiveTaskList pList = GetActiveTaskList();
List<ActiveTaskEntry> aEntries = new List<ActiveTaskEntry>(pList.m_TaskEntries);
for(var i = 0; i < pList.m_uTaskCount; i++)
{
var CurEntry = aEntries[i];
if (CurEntry.m_ulTemplAddr == 0)
continue;
ATaskTempl pTempl = CurEntry.GetTempl();
if (pTempl == null || !pTempl.m_FixedData.m_bPQTask)
continue;
pTempl.IncValidCount();
// _notify_svr(this, TASK_CLT_NOTIFY_PQ_CHECK_INIT, CurEntry.m_ID);
}
}
public static void WriteLog(int nPlayerId, int nTaskId, int nType, string szLog)
{
//do something?
}
private ATaskTemplMan GetTaskTemplMan()
{
return EC_Game.GetTaskTemplateMan();
}
private ActiveTaskList GetActiveTaskList()
{
return m_pActiveListBuf;
}
}
}
@@ -2,6 +2,50 @@ namespace BrewMonster.Scripts.Task
{
public interface TaskInterface
{
bool Init(object[] pActiveListBuf, int iActiveListLen, object[] pFinishedListBuf, int iFinishedListLen, object[] pFinishedTimeListBuf, int iFinishedTimeListLen, object[] pFinishedCountListBuf, int iFinishedCountListLen, object[] pStorageTaskListBuf, int iStorageTaskListLen);
bool Init(byte[] pActiveListBuf, int iActiveListLen, byte[] pFinishedListBuf,
int iFinishedListLen, byte[] pFinishedTimeListBuf, int iFinishedTimeListLen,
byte[] pFinishedCountListBuf, int iFinishedCountListLen, byte[] pStorageTaskListBuf,
int iStorageTaskListLen);
/// <summary>
/// Get task state info for a task id. 清理并填充任务状态信息 // Clean and fill task state info
/// </summary>
/// <param name="ulTaskId">任务ID // Task ID</param>
/// <param name="pInfo">输出任务状态 // Output task state</param>
/// <param name="bActiveTask">是否在激活列表中查找 // Whether to search in active list</param>
void GetTaskStateInfo(uint ulTaskId, ref Task_State_info pInfo, bool bActiveTask);
bool CheckTaskForbid(uint task_id);
bool IsAtCrossServer();
bool IsDeliverLegal();
int GetCommonItemCount(uint ulCommonItem);
int GetTaskItemCount(uint ulTaskItem);
uint GetPlayerLevel();
uint GetGoldNum();
int GetGlobalValue(int lKey);
byte GetShapeMask();
int GetPos(float[] pos);
bool CheckSimpleTaskFinshConditon(uint task_id);
int GetFactionConsumeContrib();
int GetFactionExpContrib();
bool HasTask(uint ulTaskId);
#if _TASK_CLIENT
void GetTaskAwardPreview(uint ulTaskId,ref Task_Award_Preview p, bool bActiveTask = true);
uint GetTaskCount();
uint GetTaskId(uint ulIndex);
#endif
}
}
+103 -12
View File
@@ -29,20 +29,66 @@ namespace PerfectWorld.Scripts.Task
public char m_NextSblIndex; // Next sibling node index
public char m_ChildIndex; // Child node index
public char m_uState; // Task state
public ulong m_ulTaskTime; // Timestamp
public uint m_ulTaskTime; // Timestamp
public ushort m_uCapTaskId; // Captain task ID
public ulong m_ulTemplAddr; // Template address
public ulong m_ulCapTemplAddr; // Captain task template address
public uint m_ulTemplAddr; // Template address
public uint m_ulCapTemplAddr; // Captain task template address
public static int Size()
{
return 2 + 1 + 1 + 1 + 1 + 1 + 4 + 2 + 4 + 4;
}
};
// ´óСΪTASK_DATA_BUF_MAX_LEN
public class ActiveTaskEntry : TASK_ENTRY_FIXED_DATA
{
// Buffer union simplified (C# does not support union directly)
public byte[] m_BufData; // Raw data buffer
public ushort[] m_wMonsterNum; // Monster numbers
// unsigned char m_BufData[TASK_DATA_BUF_MAX_LEN-sizeof(TASK_ENTRY_FIXED_DATA)];
public byte[] m_BufData = new byte[TaskInterfaceConstants.TASK_DATA_BUF_MAX_LEN - 21 ]; // Raw data buffer
// nsigned short m_wMonsterNum[MAX_MONSTER_WANTED];
public ushort[] m_wMonsterNum = new ushort[TaskInterfaceConstants.MAX_MONSTER_WANTED]; // Monster numbers
public int m_iUsefulData1;
public char m_iUsefulData2;
public void ReadFromBuffer(byte[] buffer, ref int offset)
{
m_ID = BitConverter.ToUInt16(buffer, offset);
offset += 2;
m_ParentIndex = (char)buffer[offset++];
m_PrevSblIndex = (char)buffer[offset++];
m_NextSblIndex = (char)buffer[offset++];
m_ChildIndex = (char)buffer[offset++];
m_uState = (char)buffer[offset++];
m_ulTaskTime = BitConverter.ToUInt32(buffer, offset);
offset += 4;
m_uCapTaskId = BitConverter.ToUInt16(buffer, offset);
offset += 2;
m_ulTemplAddr = BitConverter.ToUInt32(buffer, offset);
offset += 4;
m_ulCapTemplAddr = BitConverter.ToUInt32(buffer, offset);
offset += 4;
// Read remaining buffer data
Array.Copy(buffer, offset, m_BufData, 0, m_BufData.Length);
// offset += bufDataLength; // in C++ have union, so we dont plus offset here
// Additional fields can be read here as needed
m_wMonsterNum = new ushort[TaskInterfaceConstants.MAX_MONSTER_WANTED];
for (int i = 0; i < TaskInterfaceConstants.MAX_MONSTER_WANTED; i++)
{
m_wMonsterNum[i] = BitConverter.ToUInt16(buffer, offset);
// offset += 2; // in C++ have union, so we dont plus offset here
}
m_iUsefulData1 = BitConverter.ToInt32(buffer, offset);
// offset += 4; // in C++ have union, so we dont plus offset here
m_iUsefulData2 = (char)buffer[offset]; // in C++ have union, so we dont plus offset here
offset += m_BufData.Length;
}
// bool IsFinished() const { return (m_uState & TASK_STATE_FINISHED) != 0; }
// bool IsSuccess() const { return (m_uState & TASK_STATE_SUCCESS) != 0; }
@@ -73,11 +119,28 @@ namespace PerfectWorld.Scripts.Task
//
public ATaskTempl GetTempl()
{
if (m_ulTemplAddr == 0) return null;
return Marshal.PtrToStructure<ATaskTempl>(
new IntPtr(unchecked((long)m_ulTemplAddr))
);
// return reinterpret_cast<const ATaskTempl*>(m_ulTemplAddr);
// Managed fallback: resolve via template manager by ID
try
{
var man = BrewMonster.Network.EC_Game.GetTaskTemplateMan();
if (man != null)
{
var templ = man.GetTaskTemplByID(m_ID);
if (templ != null) return templ;
}
}
catch { }
// Legacy pointer path (likely unused in managed port)
if (m_ulTemplAddr != 0)
{
try
{
return Marshal.PtrToStructure<ATaskTempl>(new IntPtr(unchecked((long)m_ulTemplAddr)));
}
catch { }
}
return null;
}
// const ATaskTempl* GetCap() const { return reinterpret_cast<const ATaskTempl*>(m_ulCapTemplAddr); }
// const ATaskTempl* GetCapOrSelf() const
@@ -120,7 +183,7 @@ namespace PerfectWorld.Scripts.Task
public class ActiveTaskList
{
// --- Header Fields ---
public byte[] header = new byte[EC_TaskInterface.TASK_ACTIVE_LIST_HEADER_LEN];
public byte[] header = new byte[CECTaskInterface.TASK_ACTIVE_LIST_HEADER_LEN];
public byte m_uTaskCount; // number of tasks
public byte m_uUsedCount; // used count
@@ -147,7 +210,35 @@ namespace PerfectWorld.Scripts.Task
set => _flags = (byte)((_flags & 0x01) | ((value & 0x7F) << 1));
}
public ActiveTaskEntry[] m_TaskEntries = new ActiveTaskEntry[EC_TaskInterface.TASK_ACTIVE_LIST_MAX_LEN];
// ActiveTaskEntry m_TaskEntries[TASK_ACTIVE_LIST_MAX_LEN];
public ActiveTaskEntry[] m_TaskEntries = new ActiveTaskEntry[CECTaskInterface.TASK_ACTIVE_LIST_MAX_LEN];
// --- Methods ---
public void ReadFromBuffer(byte[] buffer)
{
// header use same data slot with m_uTaskCount etc. cause C++ use union here
// so, we dont plus into offset after copy header
int offset = 0;
Array.Copy(buffer, offset, header, 0, header.Length);
// offset += header.Length;
m_uTaskCount = buffer[offset++];
m_uUsedCount = buffer[offset++];
m_Version = BitConverter.ToUInt16(buffer, offset);
offset += 2;
m_uTopShowTaskCount = buffer[offset++];
m_uListState = buffer[offset++];
m_uTopHideTaskCount = buffer[offset++];
_flags = buffer[offset++];
for (int i = 0; i < m_uTaskCount; i++)
{
ActiveTaskEntry entry = new ActiveTaskEntry();
entry.ReadFromBuffer(buffer, ref offset);
m_TaskEntries[i] = entry;
}
}
// void UpdateTaskMask(unsigned long& ulMask) const;
// void UpdateUsedCount();
@@ -0,0 +1,294 @@
using BrewMonster.Scripts.Task;
using PerfectWorld.Scripts.Task;
namespace BrewMonster.Scripts.Task
{
public partial class ATaskTempl
{
#if _TASK_CLIENT
// bool CanShowTask (TaskInterface* pTask) const;
// bool HasShowCond() const;
public void GetGlobalTaskChar(TaskInterface pTask, Task_State_info.abase_vector_wchar_t_ptr TaskCharArr)
{
// Build display strings for global expressions
// 生成用于显示的全局表达式字符串
for (int i = 0; i < (int)m_FixedData.m_ulTaskCharCnt; i++)
{
// Read one UTF-16 row from m_pTaskChar and convert to C# string
// 从 m_pTaskChar 读取一行 UTF-16 并转换为 C# 字符串
int colCount = BrewMonster.Scripts.Task.TaskTemplConstants.TASK_AWARD_MAX_DISPLAY_CHAR_LEN;
ushort[] row = new ushort[colCount];
for (int j = 0; j < colCount; j++)
{
row[j] = m_FixedData.m_pTaskChar[i, j];
}
string src = ModelRenderer.Scripts.Common.ByteToStringUtils.UshortArrayToUnicodeString(row);
if (string.IsNullOrEmpty(src))
{
continue;
}
// Parse '%' placeholders like %1, %2... and replace with computed values
// 解析形如 %1, %2 的占位符并替换为计算结果
var sb = new System.Text.StringBuilder();
int idx = 0;
char percent = '%'; // Percent sign
// % (percent sign)
while (idx < src.Length)
{
int pos = src.IndexOf(percent, idx);
if (pos >= 0)
{
// Append text before '%'
// 追加 '%' 之前的文本
sb.Append(src, idx, pos - idx);
int j = pos + 1;
int startDigits = j;
while (j < src.Length && char.IsDigit(src[j])) j++;
string digits = (j > startDigits) ? src.Substring(startDigits, j - startDigits) : string.Empty;
int nVal;
// If there's a valid index after '%', compute the global expression value
// ȡõȫֱʽк (get referenced global expression index)
if (!string.IsNullOrEmpty(digits) && int.TryParse(digits, out nVal) && nVal != 0)
{
// Compute one global expression
// ȫֱʽ
int nRet = (int)CalcOneGlobalExp(pTask, nVal - 1);
// Convert number to string and append
// תַַ
sb.Append(nRet.ToString());
// Skip all digits after '%<digits>'
// 跳过 '%' 后面的所有数字
idx = j;
continue;
}
else
{
// No valid number found; keep the '%'
// 未找到合法数字;保留 '%'
sb.Append(percent);
idx = pos + 1;
}
}
else
{
// No more '%' found; append the rest
// δҵȫֱʽֱʾ
sb.Append(src, idx, src.Length - idx);
break;
}
}
string result = sb.ToString();
if (!string.IsNullOrEmpty(result))
{
// Original: TaskCharArr.push_back(pszNewchar);
// 原逻辑:将结果指针压入向量(此处托管环境不直接推入原生向量)
// NOTE: If needed, map 'result' into UI/managed list here.
}
}
}
private float CalcOneGlobalExp(TaskInterface pTask, int nIndex)
{
// Evaluate one global expression row
// 计算一行全局表达式
if (nIndex < 0 || nIndex >= (int)m_FixedData.m_ulExpCnt)
{
return 0f;
}
try
{
int colCount = BrewMonster.Scripts.Task.TaskTemplConstants.TASK_AWARD_MAX_DISPLAY_CHAR_LEN;
float result = 0f;
for (int i = 0; i < colCount; i++)
{
TASK_EXPRESSION expr = m_FixedData.m_pExpArr[nIndex, i];
if (expr.type == -1) break; // Sentinel terminator // 结束标记
// Fallback evaluation: accumulate values
// 回退求值:累加表达式值
result += expr.value;
}
return result;
}
catch (System.Exception ex)
{
CECTaskInterface.WriteLog(0, (int)m_FixedData.m_ID, 0, $"CalcOneGlobalExp, Expression run err: {ex.Message}");
return 0f;
}
}
// bool CanShowInExclusiveUI (TaskInterface* pTask, unsigned long ulCurTime) const;
#else
// void NotifyClient (TaskInterface* pTask, const ActiveTaskEntry* pEntry, unsigned char uReason, unsigned long ulCurTime, unsigned long ulParam = 0, int dps = 0, int dph = 0) const;
// bool CheckGlobalRequired (TaskInterface* pTask, unsigned long ulSubTaskId, const TaskPreservedData* pPreserve, const TaskGlobalData* pGlobal, unsigned short reason) const;
// bool CheckKillMonster (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, unsigned long ulTemplId, unsigned long ulLev, bool bTeam, float fRand, int dps, int dph) const;
// bool CheckKillPlayer (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, int iOccupation, int iLevel, bool bGender, int iForce, float fRand) const;
// void CheckCollectItem (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, bool bAtNPC, int nChoice) const;
// void CheckMonsterKilled (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, bool bAtNPC, int nChoice) const;
// void CheckMining (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry) const;
// void CheckWaitTime (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, unsigned long ulCurTime, bool bAtNPC, int nChoice) const;
// void GiveUpOneTask (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, bool bForce) const;
// void OnSetFinished (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, bool bNotifyMem = true) const;
// bool DeliverAward (TaskInterface* pTask, ActiveTaskList* pList, ActiveTaskEntry* pEntry, int nChoice, bool bNotifyTeamMem = true, TaskGlobalData* pGlobal = NULL) const;
// void RemoveAcquiredItem (TaskInterface* pTask, bool bClearTask, bool bSuccess) const;
// void TakeAwayGivenItems (TaskInterface* pTask) const;
// bool OnDeliverTeamMemTask (TaskInterface* pTask, TaskGlobalData* pGlobal) const;
// unsigned long CheckDeliverTask (TaskInterface* pTask, unsigned long ulSubTaskId, TaskGlobalData* pGlobal, bool bNotifyErr = true, bool bMemTask = false, unsigned long ulCapId = 0) const;
// bool HasGlobalData() const;
#endif
#if _TASK_CLIENT
// void SyncTaskType(); // ʹ
// bool GetShowGfxFlag() { return m_bShowGfxFinished;}
// const wchar_t* GetDescription() const { assert(m_pwstrDescript); return (wchar_t*)m_pwstrDescript; }
// const wchar_t* GetOkText() const { assert(m_pwstrOkText); return (wchar_t*)m_pwstrOkText; }
// const wchar_t* GetNoText() const { assert(m_pwstrNoText); return (wchar_t*)m_pwstrNoText; }
// const wchar_t* GetTribute() const { assert(m_pwstrTribute); return (wchar_t*)m_pwstrTribute; }
//
// const talk_proc* GetDeliverTaskTalk() const { return &m_DelvTaskTalk; }
// const talk_proc* GetUnqualifiedTalk() const { return &m_UnqualifiedTalk; }
// const talk_proc* GetDeliverItemTalk() const { return &m_DelvItemTalk; }
// const talk_proc* GetUnfinishedTalk() const { return &m_ExeTalk; }
// const talk_proc* GetAwardTalk() const { return &m_AwardTalk; }
//
// unsigned long GetDeliverNPC() const { return m_ulDelvNPC; }
public uint GetAwardNPC() { return m_FixedData.m_ulAwardNPC; }
//
// void SaveToTextFile(FILE* fp);
// bool SaveToTextFile(const char* szPath);
// void SaveToBinFile(FILE* fp) { SaveBinary(fp); }
// void SaveDescription(FILE* fp);
// void SaveDescriptionBin(FILE* fp);
// void SaveTribute(FILE* fp);
// void SaveTributeBin(FILE* fp);
// void SaveAllText(FILE* fp);
// int MarshalKillMonster(char* pData);
// int MarshalCollectItems(char* pData);
// int MarshalDynTask(char* pData);
// int MarshalSpecialAwardData(char* pData);
//
// ATaskTempl& operator= (const ATaskTempl& src);
// bool operator == (const ATaskTempl& src) const
// {
// return *(ATaskTemplFixedData*)this == *(const ATaskTemplFixedData*)&src;
// }
#endif
public bool _compare_key_value(TaskInterface pTask, COMPARE_KEY_VALUE CompKeyVal)
{
long lleftValue = CompKeyVal.lLeftNum;
if (CompKeyVal.nLeftType == 0)
{
lleftValue = pTask.GetGlobalValue(CompKeyVal.lLeftNum);
}
long lRightValue = CompKeyVal.lRightNum;
if (CompKeyVal.nRightType == 0)
{
lRightValue = pTask.GetGlobalValue(CompKeyVal.lRightNum);
}
switch(CompKeyVal.nCompOper)
{
case 0:
{
if (lleftValue > lRightValue)
return true;
}
break;
case 1:
{
if (lleftValue == lRightValue)
return true;
}
break;
case 2:
{
if (lleftValue < lRightValue)
return true;
}
break;
default:
break;
}
return false;
}
// Early out: skip if this phase does not require key-value comparison
public uint CheckGlobalKeyValue(TaskInterface pTask, bool bFinCheck)
{
if ((bFinCheck && !m_FixedData.m_bFinNeedComp)
|| (!bFinCheck && !m_FixedData.m_bPremNeedComp))
{
return 0;
}
// Initialize comparison flags
bool bFlag1 = false;
bool bFlag2 = false;
if (bFinCheck)
{
// Finish-conditions branch: evaluate two key-value comparisons
bFlag1 = _compare_key_value(pTask, m_FixedData.m_Fin1KeyValue);
bFlag2 = _compare_key_value(pTask, m_FixedData.m_Fin2KeyValue);
// Evaluate logical mode: 0 = OR, 1 = AND
if ((m_FixedData.m_nFinExp1AndOrExp2 == 0 && (bFlag1 || bFlag2))
|| (m_FixedData.m_nFinExp1AndOrExp2 == 1 && (bFlag1 && bFlag2)))
{
return 0;
}
}
else
{
// Premise-conditions branch: evaluate two key-value comparisons
bFlag1 = _compare_key_value(pTask, m_FixedData.m_Prem1KeyValue);
bFlag2 = _compare_key_value(pTask, m_FixedData.m_Prem2KeyValue);
// Evaluate logical mode: 0 = OR, 1 = AND
if ((m_FixedData.m_nPremExp1AndOrExp2 == 0 && (bFlag1 || bFlag2))
|| (m_FixedData.m_nPremExp1AndOrExp2 == 1 && (bFlag1 && bFlag2)))
{
return 0;
}
}
// Failure: global key-value prerequisite not satisfied
return (uint)TaskInterfaceConstants.TASK_PREREQU_FAIL_GLOBAL_KEYVAL;
}
public bool CheckReachLevel(BrewMonster.Scripts.Task.TaskInterface pTask)
{
bool bLevel = true, bReincarnationCount = true, bRealmLevel = true;
if (m_FixedData.m_ulReachLevel != 0) bLevel = pTask.GetPlayerLevel() >= m_FixedData.m_ulReachLevel;
if (m_FixedData.m_ulReachReincarnationCount != 0) bReincarnationCount = GetReincarnationCount(pTask) >= m_FixedData.m_ulReachReincarnationCount;
if (m_FixedData.m_ulReachRealmLevel != 0) bRealmLevel = GetRealmLevel(pTask) >= m_FixedData.m_ulReachRealmLevel;
return bLevel && bReincarnationCount && bRealmLevel;
}
private static uint GetReincarnationCount(BrewMonster.Scripts.Task.TaskInterface pTask)
{
return 0u;
}
private static uint GetRealmLevel(BrewMonster.Scripts.Task.TaskInterface pTask)
{
var host = BrewMonster.Network.EC_Game.GetGameRun()?.GetHostPlayer();
if (host != null)
{
var bp = host.GetBasicProps();
return (uint)bp.iLevel2;
}
return 0u;
}
public bool IsKeyTask()
{
ATaskTempl m = GetTopTask();
return m.m_FixedData.m_bKeyTask;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f79c86592e7741088fa3bb1ccfaab885
timeCreated: 1762413881
+246 -23
View File
@@ -298,9 +298,25 @@ namespace BrewMonster.Scripts.Task
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PLAYER_WANTED
{
public uint m_ulTemplID; // Player Template ID
public uint m_ulCount; // Count
public uint m_ulLevel; // Level
// old data of DUCK
// public uint m_ulTemplID; // Player Template ID
// public uint m_ulCount; // Count
// public uint m_ulLevel; // Level
// MH: New data
public uint m_ulPlayerNum;
public uint m_ulDropItemId;
public uint m_ulDropItemCount;
[MarshalAs(UnmanagedType.U1)]
public bool m_bDropCmnItem;
public float m_fDropProb;
public Kill_Player_Requirements m_Requirements;
public string GetLog()
{
return string.Format("PLAYER_WANTED: Num={0}, DropItemID={1}, DropItemCount={2}, DropCmnItem={3}, DropProb={4}",
m_ulPlayerNum, m_ulDropItemId, m_ulDropItemCount, m_bDropCmnItem, m_fDropProb);
}
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -411,10 +427,11 @@ namespace BrewMonster.Scripts.Task
{
public uint m_iRankingStart;
public uint m_iRankingEnd;
[MarshalAs(UnmanagedType.U1)]
public bool m_bCommonItem;
public ulong m_ulAwardItemId;
public ulong m_ulAwardItemNum;
public long m_lPeriod;
public uint m_ulAwardItemId;
public uint m_ulAwardItemNum;
public int m_lPeriod;
public bool Equals(RANKING_AWARD src)
{
@@ -1217,7 +1234,7 @@ namespace BrewMonster.Scripts.Task
/// 任务模板类 // Task Template Class
/// include
/// </summary>
public class ATaskTempl
public partial class ATaskTempl
{
public ATaskTemplFixedData m_FixedData;
@@ -1255,15 +1272,211 @@ namespace BrewMonster.Scripts.Task
CheckDepth();
return true;
}
public string GetDescription()
{
return ByteToStringUtils.UshortArrayToUnicodeString(m_pwstrDescript);
}
public bool CanFinishTask(TaskInterface pTask, ActiveTaskEntry pEntry, uint ulCurTime)
{
bool ret = false;
while (true)
{
// 若发放非法则不允许完成 // If delivery is illegal, cannot finish
if (pTask == null || pEntry == null) break;
if (!pTask.IsDeliverLegal()) break;
// 已完成直接返回 // Already finished -> true
if (pEntry.IsFinished())
{
ret = true;
break;
}
switch ((TaskCompletionMethod)m_FixedData.m_enumMethod)
{
case TaskCompletionMethod.enumTMCollectNumArticle:
// 背包中已拥有所有需要的物品 // Has all required items
ret = HasAllItemsWanted(pTask);
break;
case TaskCompletionMethod.enumTMWaitTime:
// 等待时间达成 // Wait time satisfied
ret = (m_FixedData.m_ulWaitTime == 0)
|| (pEntry.m_ulTaskTime + (ulong)m_FixedData.m_ulWaitTime < (ulong)ulCurTime);
break;
case TaskCompletionMethod.enumTMTalkToNPC:
// 对话类任务可直接完成 // Talk-to-NPC tasks complete immediately
ret = true;
break;
case TaskCompletionMethod.enumTMGlobalValOK:
// 全局变量满足条件 // Global variable meets condition
ret = CheckGlobalKeyValue(pTask, true) == 0;
break;
case TaskCompletionMethod.enumTMTransform:
{
int playerShapeType = pTask.GetShapeMask();
// 变身职业判断 // Transform occupation check
if (m_FixedData.m_ucTransformedForm == 0x80)
{
if ((playerShapeType >> 6) == 2) ret = true;
}
// 特定形态匹配 // Specific form match
else if (m_FixedData.m_ucTransformedForm == playerShapeType) ret = true;
}
break;
case TaskCompletionMethod.enumTMReachTreasureZone:
{
// 到达藏宝区网格 // Reach treasure zone grid
float[] pos = new float[3];
uint ulWorldId = (uint)pTask.GetPos(pos);
if (ulWorldId == 1)
{
ushort uTreasureLocIndex = (ushort)(pEntry.m_iUsefulData1 & 0xFFFF);
float fTreasureLocX = m_FixedData.m_TreasureStartZone.x + ((uTreasureLocIndex % m_FixedData.m_ucZonesNumX) - 1) * (float)m_FixedData.m_ucZoneSide;
float fTreasureLocZ = m_FixedData.m_TreasureStartZone.z + (uTreasureLocIndex / m_FixedData.m_ucZonesNumX) * (float)m_FixedData.m_ucZoneSide;
ret = pos[0] >= fTreasureLocX && pos[2] >= fTreasureLocZ
&& pos[0] <= fTreasureLocX + (float)m_FixedData.m_ucZoneSide
&& pos[2] <= fTreasureLocZ + (float)m_FixedData.m_ucZoneSide;
}
}
break;
case TaskCompletionMethod.enumTMSimpleClientTask:
case TaskCompletionMethod.enumTMSimpleClientTaskForceNavi:
{
// 简单客户端任务条件 // Simple client task condition
ret = pTask.CheckSimpleTaskFinshConditon(m_FixedData.m_ID);
}
break;
case TaskCompletionMethod.enumTMReachLevel:
// 达到等级条件 // Reach level condition
ret = CheckReachLevel(pTask);
break;
default:
break;
}
break;
}
// 等级前置校验 // Premise level check
if (m_FixedData.m_ulPremise_Lev_Min != 0)
{
if (m_FixedData.m_bPremCheckMaxHistoryLevel == 0 && pTask.GetPlayerLevel() < m_FixedData.m_ulPremise_Lev_Min)
ret = false;
}
return ret;
}
public bool HasAllItemsWanted(TaskInterface pTask)
{
if (m_FixedData.m_ulGoldWanted != 0 && pTask.GetGoldNum() < m_FixedData.m_ulGoldWanted)
return false;
if (m_FixedData.m_iFactionContribWanted != 0 && pTask.GetFactionConsumeContrib() < m_FixedData.m_iFactionContribWanted)
return false;
if (m_FixedData.m_iFactionExpContribWanted != 0 && pTask.GetFactionExpContrib() < m_FixedData.m_iFactionExpContribWanted)
return false;
int i = 0;
for (; i < (int)m_FixedData.m_ulItemsWanted; i++)
{
ITEM_WANTED iw = m_FixedData.m_ItemsWanted[i];
uint ulNum = _get_item_count(
pTask,
iw.m_ulItemTemplId,
iw.m_bCommonItem);
if (ulNum == 0 || ulNum < iw.m_ulItemNum) return false;
}
return true;
}
// 递归检查奖励条件并返回错误码 // Recursively check award prerequisites and return error code
public uint RecursiveCheckAward(TaskInterface pTask, ActiveTaskList pList, ActiveTaskEntry pEntry, uint ulCurTime, int nChoice)
{
// 计数器与预算初始化 // Initialize counters and budget
uint ulCmnCount = 0;
uint ulTskCount = 0;
uint ulTopCount = 0;
byte uBudget = 0;
long lReputation = 0;
// 任务屏蔽检查 // Task forbid check
if (pTask.CheckTaskForbid(m_FixedData.m_ID)) return (uint)TaskInterfaceConstants.TASK_PREREQU_FAIL_TASK_FORBID;
// 跨服限制检查 // Cross-server account limit check
if (m_FixedData.m_bAccountTaskLimit && pTask.IsAtCrossServer())
return (uint)TaskInterfaceConstants.TASK_AWARD_FAIL_CROSSSERVER_NO_ACOUNT_LIMIT;
// TODO: Implement recursive award calculation
// Recursively calculate award and return early on error
// uint ulRet = RecursiveCalcAward(pTask, pList, pEntry, ulCurTime, nChoice, out ulCmnCount, out ulTskCount, out ulTopCount, out uBudget, out lReputation);
// if (ulRet != 0) return ulRet;
// 顶部任务计数拆分 // Split top task counters
uint ulTopShowCount = (ulTopCount & 0xffff0000u) >> 16;
uint ulTopHideCount = (ulTopCount & 0x000000ffu);
uint ulTitleTaskCount = (ulTopCount & 0x0000ff00u) >> 8;
// 顶部任务数量上限检查 // Top task caps check
if ((ulTopShowCount != 0 && (uint)pList.m_uTopShowTaskCount + ulTopShowCount > (uint)GetMaxSimultaneousCount(pList))
|| (ulTopHideCount != 0 && (uint)pList.m_uTopHideTaskCount + ulTopHideCount > (uint)TASK_HIDDEN_COUNT)
|| (ulTitleTaskCount != 0 && (uint)pList.m_uTitleTaskCount + ulTitleTaskCount > (uint)TASK_TITLE_TASK_COUNT))
return (uint)TaskInterfaceConstants.TASK_PREREQU_FAIL_FULL;
// 活动列表容量检查 // Active list capacity check
if (uBudget != 0 && (uint)pList.m_uUsedCount + uBudget > (uint)CECTaskInterface.TASK_ACTIVE_LIST_MAX_LEN)
return (uint)TaskInterfaceConstants.TASK_PREREQU_FAIL_NO_SPACE;
// TODO: Item grant legality check
// if ((ulCmnCount != 0 && !pTask.CanDeliverCommonItem(ulCmnCount))
// || (ulTskCount != 0 && !pTask.CanDeliverTaskItem(ulTskCount)))
// return (uint)TaskInterfaceConstants.TASK_AWARD_FAIL_GIVEN_ITEM;
// TODO: Reputation non-negative check
// if (lReputation != 0 && pTask.GetReputation() + lReputation < 0)
// return (uint)TaskInterfaceConstants.TASK_AWARD_FAIL_REPUTATION;
// 一切正常 // All good
return 0u;
}
public static uint _get_item_count(TaskInterface pTask, uint ulItemId, bool bCommon)
{
return (uint)( bCommon ? pTask.GetCommonItemCount(ulItemId) : pTask.GetTaskItemCount(ulItemId) );
}
// 占位:最大同时任务上限 // Placeholder: maximum simultaneous tasks cap
private static int GetMaxSimultaneousCount(ActiveTaskList list)
{
return int.MaxValue;
}
// 占位:隐藏与标题任务上限 // Placeholder: hidden/title task caps
private const int TASK_HIDDEN_COUNT = int.MaxValue;
private const int TASK_TITLE_TASK_COUNT = int.MaxValue;
private void LoadBinary(FileStream fp)
{
LoadFixedDataFromBinFile(fp);
// BMLogger.Log($"---- Pointer Log {m_FixedData.m_ID} ---- \n {pointerLog} ");
LoadDescriptionBin(fp);
pointerLog += $" After LoadDescriptionBin : {fp.Position}\n";
LoadTributeBin(fp);
pointerLog += $" After LoadTributeBin : {fp.Position}\n";
BMLogger.Log($"---- Pointer Log ---- \n {pointerLog} ");
// TODO: Check task type consistency
# if _TASK_CLIENT
@@ -1314,6 +1527,9 @@ namespace BrewMonster.Scripts.Task
// 读取子任务数量 // Read subtask count
long readBytes = 0;
m_nSubCount = AAssit.ReadFromBinaryOf<int>(fp, ref readBytes);
pointerLog += $" After m_nSubCount : {fp.Position}\n";
// BMLogger.Log($"---- Pointer Log {m_FixedData.m_ID} ---- \n {pointerLog} ");
// for (int i = 0; i < m_nSubCount; i++)
// {
@@ -1377,7 +1593,7 @@ namespace BrewMonster.Scripts.Task
private void ConvertFixedData(FileStream fp, int x2)
{
long readBytes = 0;
BMLogger.Log($"LoadFixedDataFromBinFile: {fp.Length}");
// BMLogger.Log($"LoadFixedDataFromBinFile: {fp.Length}");
ATaskTemplFixedData fixedData = new ATaskTemplFixedData();
string logContent = "";
@@ -2343,7 +2559,7 @@ namespace BrewMonster.Scripts.Task
pointerLog += $" After read Raw of FixedData: {fp.Position} \n";
BMLogger.LogError($" === Task Data {fixedData.m_ID} loaded === \n {logContent} ");
// BMLogger.LogError($" === Task Data {fixedData.m_ID} loaded === \n {logContent} ");
ConvertPointersOfFixedData(fp, ref fixedData, ref readBytes);
@@ -2683,7 +2899,8 @@ namespace BrewMonster.Scripts.Task
for (int i = 0; i < fixedData.m_ulPlayerWanted; i++)
{
fixedData.m_PlayerWanted[i] = AAssit.ReadFromBinaryOf<PLAYER_WANTED>(fp, ref readBytes);
pwLog += $" {i} = (Tpl:{fixedData.m_PlayerWanted[i].m_ulTemplID}, Cnt:{fixedData.m_PlayerWanted[i].m_ulCount}, Lev:{fixedData.m_PlayerWanted[i].m_ulLevel}) || ";
//pwLog += $" {i} = (Tpl:{fixedData.m_PlayerWanted[i].m_ulTemplID}, Cnt:{fixedData.m_PlayerWanted[i].m_ulCount}, Lev:{fixedData.m_PlayerWanted[i].m_ulLevel}) || ";
pwLog += $" {i} = {fixedData.m_PlayerWanted[i].GetLog() }|| ";
}
logContent += $"m_PlayerWanted: {pwLog}\n";
}
@@ -2800,9 +3017,11 @@ namespace BrewMonster.Scripts.Task
logContent += $"m_pLeaveSite: {fixedData.m_pLeaveSite}\n";
}
BMLogger.LogError($" === Task Pointer Datas {fixedData.m_ID} loaded === \n {logContent} ");
// BMLogger.LogError($" === Task Pointer Datas {fixedData.m_ID} loaded === \n {logContent} ");
pointerLog += $" Start read m_Award_S , pointer at : {fp.Position} \n";
// BMLogger.Log($"---- Pointer Log {fixedData.m_ID} ---- \n {pointerLog} ");
LoadAwardDataBin(fp, ref fixedData.m_Award_S, TaskTemplConstants._task_templ_cur_version, ref readBytes);
pointerLog += $" Start read m_Award_F complete : {fp.Position} \n";
LoadAwardDataBin(fp, ref fixedData.m_Award_F, TaskTemplConstants._task_templ_cur_version, ref readBytes);
pointerLog += $" After Award_S and Award_F complete : {fp.Position} \n";
@@ -3049,7 +3268,7 @@ namespace BrewMonster.Scripts.Task
logContent += $"m_iWorldContribution: {ad.m_iWorldContribution} \n";
logContent += "------ Start Pointer datas of AWARD_DATA ------ \n";
pointerLog += $"After Raw Data of AWARD_DATA, pointer : {fp.Position}\n";
// Start convert Pointer Data of AWARD_DATA
//Debug.Log($"ad.m_ulCandItems : {ad.m_ulCandItems}");
if (ad.m_ulCandItems > 0)
@@ -3073,7 +3292,7 @@ namespace BrewMonster.Scripts.Task
LoadAwardMonstersBin(fp, ref ad.m_SummonedMonsters, ulVersion, ref readBytes);
}
logContent += $"m_SummonedMonsters : {ad.m_ulSummonedMonsters} elements / Pointer : {fp.Position} \n";
pointerLog += $" After LoadAwardMonstersBin, pointer : {fp.Position}\n";
if (ad.m_ulPQRankingAwardCnt > 0)
{
@@ -3082,6 +3301,7 @@ namespace BrewMonster.Scripts.Task
LoadAwardPQRankingBin(fp, ref ad.m_PQRankingAward, ulVersion, ref readBytes);
}
logContent += $" AWARD_DATA.m_PQRankingAward : {ad.m_ulPQRankingAwardCnt} elements / {fp.Position} \n";
pointerLog += $" After LoadAwardPQRankingBin, pointer : {fp.Position}\n";
ad.m_pTitleAward = AAssit.ReadArrayFromBinary<TITLE_AWARD>(fp, (int)ad.m_ulTitleNum,ref readBytes);
logContent += $" AWARD_DATA.m_pTitleAward : {ad.m_ulTitleNum} elements / {fp.Position} \n";
@@ -3097,6 +3317,7 @@ namespace BrewMonster.Scripts.Task
logContent += $" AWARD_DATA.m_plChangeKey : {ad.m_ulChangeKeyCnt} elements / {fp.Position} \n";
logContent += $" AWARD_DATA.m_plChangeKeyValue : {ad.m_ulChangeKeyCnt} elements / {fp.Position} \n";
logContent += $" AWARD_DATA.m_pbChangeType : {ad.m_ulChangeKeyCnt} elements / {fp.Position} \n";
pointerLog += $" After ad.m_pbChangeType, pointer : {fp.Position}\n";
if (ad.m_ulHistoryChangeCnt > 0)
{
@@ -3136,6 +3357,7 @@ namespace BrewMonster.Scripts.Task
}
}
logContent += $" AWARD_DATA.m_pszExp and m_pExpArr : {ad.m_ulExpCnt} rows / {fp.Position} \n";
pointerLog += $" After ad.m_pExpArr, pointer : {fp.Position}\n";
if (ad.m_ulTaskCharCnt > 0)
{
@@ -3149,8 +3371,9 @@ namespace BrewMonster.Scripts.Task
}
}
logContent += $" AWARD_DATA.m_pTaskChar : {ad.m_ulTaskCharCnt} rows / {fp.Position} \n";
pointerLog += $" After ad.m_pTaskChar, pointer : {fp.Position}\n";
BMLogger.LogError( $" ---- Data of AWARD_DATA ---- \n {logContent} " );
// BMLogger.LogError( $" ---- Data of AWARD_DATA ---- \n {logContent} " );
return true;
}
@@ -3169,7 +3392,7 @@ namespace BrewMonster.Scripts.Task
pointerLog += $" After Read AWARD_ITEMS_CAND.m_ulAwardItems : {fp.Position}\n";
Debug.Log( $"ic.m_bRandChoose : {ic.m_bRandChoose} ic.m_ulAwardItems : {ic.m_ulAwardItems}");
// Debug.Log( $"ic.m_bRandChoose : {ic.m_bRandChoose} ic.m_ulAwardItems : {ic.m_ulAwardItems}");
// return true;
@@ -3287,7 +3510,7 @@ namespace BrewMonster.Scripts.Task
valueLog += $" m_pwstrNoText : { ByteToStringUtils.UshortArrayToUnicodeString(m_pwstrNoText) } \n";
BMLogger.LogError( $" ---- Data of Task Description ---- \n {valueLog} " );
// BMLogger.LogError( $" ---- Data of Task Description ---- \n {valueLog} " );
return true;
}
@@ -3314,9 +3537,9 @@ namespace BrewMonster.Scripts.Task
convert_txt(m_pwstrTribute, (int)len, (char)m_FixedData.m_ID);
}
BMLogger.Log($" --- m_pwstrTribute ---- \n " +
$" Len : {len} \n " +
$" content: {ByteToStringUtils.UshortArrayToUnicodeString(m_pwstrTribute)}");
// BMLogger.Log($" --- m_pwstrTribute ---- \n " +
// $" Len : {len} \n " +
// $" content: {ByteToStringUtils.UshortArrayToUnicodeString(m_pwstrTribute)}");
return true;
}
@@ -3781,7 +4004,7 @@ namespace BrewMonster.Scripts.Task
}
// 同步任务类型 // Sync task type
private ATaskTempl GetTopTask()
public ATaskTempl GetTopTask()
{
ATaskTempl pTop = this;
while (pTop.m_pParent != null)
@@ -0,0 +1,77 @@
using System;
using UnityEngine;
using UnityEngine.Events;
namespace BrewMonster.PerfectWorld.Scripts.Task.UI
{
public class TaskTreeView : MonoBehaviour
{
[SerializeField] private TaskTreeViewItem m_pTreeViewItemPrefab;
private TaskTreeViewItem[] m_aTreeViewItems;
public void SetItemData(TaskTreeViewItem item, uint taskType)
{
item.SetItemData(taskType);
}
public uint GetItemData(TaskTreeViewItem item)
{
return item.GetItemData();
}
public TaskTreeViewItem GetNextSiblingItem(TaskTreeViewItem item)
{
if (m_aTreeViewItems == null)
{
m_aTreeViewItems = GetComponentsInChildren<TaskTreeViewItem>();
}
for (int i = 0; i < m_aTreeViewItems.Length - 1; i++)
{
if (m_aTreeViewItems[i] == item)
{
return m_aTreeViewItems[i + 1];
}
}
return null;
}
public TaskTreeViewItem InsertItem(string text, TaskTreeViewItem pParent, TaskTreeViewItem pAfter)
{
// Create a new item GameObject and component
TaskTreeViewItem pItem = Instantiate(m_pTreeViewItemPrefab);
GameObject go = pItem.gameObject;
if (pItem == null) return null;
// Parent: root (this) if null; otherwise under given parent item
var parentTransform = (pParent != null ? pParent.transform : this.transform);
go.transform.SetParent(parentTransform, false);
// Set sibling position: after specific item if provided; otherwise append to end
if (pAfter != null && pAfter.transform.parent == parentTransform)
{
int afterIndex = pAfter.transform.GetSiblingIndex();
go.transform.SetSiblingIndex(afterIndex + 1);
}
else
{
go.transform.SetAsLastSibling();
}
// Optionally set label text if a TMP_Text is attached under the item (not required here)
// var label = go.GetComponentInChildren<TMPro.TMP_Text>(true);
// if (label != null) label.text = text ?? string.Empty;
pItem.SetItemText(text);
// Refresh local cache of items
m_aTreeViewItems = GetComponentsInChildren<TaskTreeViewItem>();
return pItem;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8688b7d87bac4c16b9eaa3408f8ea419
timeCreated: 1762506361
@@ -0,0 +1,64 @@
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace BrewMonster.PerfectWorld.Scripts.Task.UI
{
public class TaskTreeViewItem : MonoBehaviour, IPointerClickHandler
{
[SerializeField] private TMP_Text m_text;
[SerializeField] private Button m_Button;
[Header("DEBUG")]
[SerializeField] private uint m_uItemData;
public UnityEvent<uint> OnClick = new UnityEvent<uint>();
public void SetItemData(uint uItemData)
{
m_uItemData = uItemData;
}
public uint GetItemData()
{
return m_uItemData;
}
public void SetItemTextColor(Color color)
{
if (m_text != null)
{
m_text.color = color;
}
}
public void SetItemText(string text)
{
if (m_text != null)
{
m_text.text = text;
}
}
public void OnPointerClick(PointerEventData eventData)
{
OnClick.Invoke(m_uItemData);
// EventBus.Publish(new TaskItemClickEvent() { Data = m_uItemData });
TaskWindow.Instance.OnEventLButtonDown_Tv_Quest(m_uItemData);
}
}
public struct TaskItemClickEvent
{
public uint Data;
public TaskItemClickEvent(uint data)
{
Data = data;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3428dd2e9dd644e0b0cb408bd3202f21
timeCreated: 1762506395
File diff suppressed because it is too large Load Diff
@@ -152,6 +152,7 @@ namespace BrewMonster.UI
private async void OnEnterWorldComplete()
{
EC_Game.Init();
await Task.Delay(2000);
// Request all known packages: 0=Inventory,1=Equipment,2=Task
UnityGameSession.RequestAllInventoriesAsync(() => { /*BMLogger.Log("Sent Inventory Detail Requests (all packs)");*/ }, 0, 1, 2);
@@ -160,7 +161,7 @@ namespace BrewMonster.UI
await Task.Delay(10000);
UnityGameSession.RequesrQueryPlayerCash();
await Task.Delay(1000);
EC_Game.Init();
}
//private void OnInventoryReceived(List<InventoryItem> inventoryData)
+7 -2
View File
@@ -3,12 +3,14 @@ using BrewMonster.Scripts.World;
using CSNetwork.GPDataType;
using CSNetwork.Protocols.RPCData;
using System.Data;
using BrewMonster.Network;
using CSNetwork;
using Unity.Cinemachine;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UIElements;
public partial class CECGameRun : MonoBehaviour
public partial class CECGameRun : MonoBehaviour, IMsgHandler
{
private static CECGameRun instance;
@@ -19,7 +21,7 @@ public partial class CECGameRun : MonoBehaviour
[SerializeField] private GameObject _testVfxPrefab;
//[SerializeField] private Transform ground;
CECHostPlayer hostPlayer;
public CinemachineFreeLook freeLookCam;
public float rotateSpeedX = 300f; // tốc độ xoay ngang
public float rotateSpeedY = 2f; // tốc độ xoay dọc
@@ -57,6 +59,8 @@ public partial class CECGameRun : MonoBehaviour
{
instance = this;
}
EC_ManMessage.RegisterHandler(this);
}
public void Log(string s)
@@ -118,6 +122,7 @@ public partial class CECGameRun : MonoBehaviour
GameObject character = Instantiate(characterPrefab, transform);
return character.gameObject;
}
private void OnDestroy()
{
instance = null;
+34 -3
View File
@@ -1,7 +1,38 @@
namespace BrewMonster
using System.Collections.Generic;
using BrewMonster.Network;
using CSNetwork;
using CSNetwork.GPDataType;
// Game runtime partial class
partial class CECGameRun : IMsgHandler
{
public class CECGameRun_Task
{
private readonly Dictionary<int, int> m_CommonDataTab = new Dictionary<int, int>();
public int GetCommonData(int key)
{
// Lookup a common data value by key
// 按键查找通用数据值
if (m_CommonDataTab != null && m_CommonDataTab.TryGetValue(key, out var value))
return value;
else
return 0;
}
private CECCounter l_QueryServerTime = new CECCounter(); // ѯǰʱ
public int HandlerId => -1;
public bool ProcessMessage(ECMSG Msg)
{
switch (Msg.dwMsg)
{
case CommandID.SERVER_TIME:
EC_Game.SetServerTime((int)Msg.dwParam1, (int)Msg.dwParam2);
l_QueryServerTime.Reset();
break;
}
return true;
}
}
+115
View File
@@ -0,0 +1,115 @@
using System;
using BrewMonster.Scripts.Task;
using CSNetwork;
using CSNetwork.GPDataType;
using UnityEngine;
using System.Runtime.InteropServices;
// ׶ // Contribution info
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CONTRIB_INFO
{
public int consume_contrib; // ѵ // Consume contribution
public int exp_contrib; // ɶһɾ // Experience contribution
public int cumulate_contrib; // ۻֵ // Cumulative contribution
// public CONTRIB_INFO()
// {
// consume_contrib = 0;
// exp_contrib = 0;
// cumulate_contrib = 0;
// }
}
public partial class CECHostPlayer
{
private int m_idTradePlayer; // ID of player who is trading with us
private CECTaskInterface m_pTaskInterface;
private CONTRIB_INFO m_contribInfo;
public CECTaskInterface GetTaskInterface()
{
return m_pTaskInterface;
}
// Is host player trading ?
public bool IsTrading() { return m_idTradePlayer != 0; }
public CONTRIB_INFO GetContribInfo()
{
return m_contribInfo;
}
private void OnMsgHstTaskData(ECMSG Msg)
{
// decode header to distinguish TASK_DATA vs TASK_VAR_DATA
// if (!(Msg.dwParam2 is cmd_header header))
// {
// Debug.LogError("OnMsgHstTaskData: invalid header");
// return;
// }
int header = Convert.ToInt32(Msg.dwParam2);
byte[] pDataBuf = Msg.dwParam1 as byte[];
if (pDataBuf == null)
{
Debug.LogError("OnMsgHstTaskData: missing payload buffer");
return;
}
if (header == CommandID.TASK_DATA)
{
#if !LOAD_TASK_TEMPL
return; // Task templates loading not implemented in C#
#endif
// Parse aggregated task buffers
cmd_task_data pCmd = cmd_task_data.FromBuffer(pDataBuf);
// cmd_task_data pCmd = GPDataTypeHelper.FromBytes<cmd_task_data>(pDataBuf);
// Release and recreate task interface
m_pTaskInterface = null;
m_pTaskInterface = new CECTaskInterface(this);
if (!m_pTaskInterface.Init(
pCmd.active_list, (int)pCmd.active_list_size,
pCmd.finished_list, (int)pCmd.finished_list_size,
pCmd.finished_time_list, (int)pCmd.finished_time_list_size,
pCmd.finished_count, (int)pCmd.finished_count_size,
pCmd.storage_task, (int)pCmd.storage_task_size))
{
Debug.LogError("CECHostPlayer::OnMsgHstTaskData, failed to initialize task interface");
return;
}
m_pTaskInterface.CheckPQEnterWorldInit();
// check if player has equipped goblin (not yet implemented in C#)
// TODO: implement goblin initialization when equipment system is ready
// GET_ALL_DATA end flag tasks were here in C++ (LoadConfigData), omitted in C#
// if (UpdateEquipSkills()) UpdateEquipSkillCoolDown(); // methods not ported yet
}
else if (header == CommandID.TASK_VAR_DATA)
{
// Minimal forwarding; original code passes inner data pointer and size
if (m_pTaskInterface != null)
{
OnServerNotify(m_pTaskInterface, pDataBuf, pDataBuf.Length);
}
else
{
Debug.LogError("OnMsgHstTaskData: m_pTaskInterface is null on TASK_VAR_DATA");
}
}
}
private void OnServerNotify(CECTaskInterface pInterface, byte[] data, int size)
{
// TODO: Implement server notify handling for task var data
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c3d2b8f770fdd49619648d2a7aace2f4
-80
View File
@@ -1144,87 +1144,7 @@ public partial class CECHostPlayer : CECPlayer
SetModelHostPlayer();
//Debug.LogError("Pos Character = " + pos);
}
#region Task
public void OnMsgHstTaskData(ECMSG Msg)
{
int cmd = Convert.ToInt32(Msg.dwParam2);
if (cmd == CommandID.TASK_DATA)
{
//Debug.Log("[Dat]- OnMsgHstTaskData- TASK_DATA");
//a_LogOutput(1, "[Dat]- EC_HostMsg- OnMsgHstTaskData- TASK_DATA");
//cmd_task_data* pCmd = (cmd_task_data*)Msg.dwParam1;
//ASSERT(pCmd);
//int iActiveListSize = (int)pCmd.active_list_size;
//BYTE* pData = (BYTE*)pCmd + sizeof(size_t);
//void* pActiveListbuf = pData;
//pData += iActiveListSize;
//int iFinishedListSize = *(int*)pData;
//pData += sizeof(int);
//void* pFinishedListBuf = pData;
//pData += iFinishedListSize;
//int iFinishTimeListSize = *(int*)pData;
//pData += sizeof(int);
//void* pFinishTimeListBuf = pData;
//pData += iFinishTimeListSize;
//int iFinishedCountListSize = *(int*)pData;
//pData += sizeof(int);
//void* pFinishedCountListBuf = pData;
//pData += iFinishedCountListSize;
//int iStorageTasksListSize = *(int*)pData;
//pData += sizeof(int);
//void* pStorageTaskListBuf = pData;
//pData += iStorageTasksListSize;
//A3DRELEASE(m_pTaskInterface);
//todo
//var m_pTaskInterface = new CECTaskInterface(this);
//if (!m_pTaskInterface.Init(null, 0, null, 0,
// null, 0, null, 0, null, 0))
//{
// //a_LogOutput(1, "CECHostPlayer::OnMsgHstTaskData, failed to initialize task interface");
// return;
//}
//m_pTaskInterface.CheckPQEnterWorldInit();
//// check if player has equipped goblin
//if (m_pEquipPack.GetItem(EQUIPIVTR_GOBLIN) != NULL)
//{
// CECIvtrGoblin* pIvtrGoblin = (CECIvtrGoblin*)m_pEquipPack.GetItem(EQUIPIVTR_GOBLIN);
// m_pGoblin = new CECHostGoblin();
// m_pGoblin.Init(pIvtrGoblin.GetTemplateID(), pIvtrGoblin, this);
//}
//// Note: this command now is also used as the end flag of responding
//// for GET_ALL_DATA request
//g_pGame.GetGameSession().LoadConfigData();
//// ¸ù¾Ý×°±¸°ü¹ü¸üÐÂ×°±¸¼¼Äܵ½¼¼ÄÜÁбí
//if (UpdateEquipSkills())
// UpdateEquipSkillCoolDown();
}
else if (cmd == CommandID.TASK_VAR_DATA)
{
//cmd_task_var_data* pCmd = (cmd_task_var_data*)Msg.dwParam1;
//ASSERT(pCmd);
//if (m_pTaskInterface)
// OnServerNotify(m_pTaskInterface, pCmd.data, pCmd.size);
//else
// ASSERT(m_pTaskInterface);
}
}
#endregion
private bool NormalAttackObject(int idTarget, bool bForceAttack, bool bMoreClose = false)
{
if (idTarget == 0 || idTarget == m_PlayerInfo.cid)
+8 -3
View File
@@ -33,18 +33,23 @@ struct cmd_notify_hostpos
struct cmd_task_data
{
public uint active_list_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] active_list;
public uint finished_list_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] finished_list;
public uint finished_time_list_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] finished_time_list;
public uint finished_count_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] finished_count;
public uint storage_task_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
public byte[] storage_task;
public static cmd_task_data FromPointer(IntPtr ptr)
@@ -62,7 +67,7 @@ struct cmd_task_data
cmd_task_data result = new cmd_task_data();
int offset = 0;
result.active_list_size = (uint)ReadULong(buffer, ref offset);
result.active_list_size = (uint)ReadULong(buffer, ref offset, 4);
result.active_list = ReadBytes(buffer, ref offset, (int)result.active_list_size);
result.finished_list_size = (uint)ReadULong(buffer, ref offset);
@@ -80,10 +85,10 @@ struct cmd_task_data
return result;
}
private static ulong ReadULong(byte[] buffer, ref int offset)
private static ulong ReadULong(byte[] buffer, ref int offset, int plusOffset = 4)
{
ulong value = BitConverter.ToUInt64(buffer, offset);
offset += 8;
offset += plusOffset;
return value;
}