Merge branch 'develop' of https://git.brew.monster/Unity/perfect-world-unity into update-in-game

This commit is contained in:
Chomper9981
2026-01-29 17:49:03 +07:00
84 changed files with 49622 additions and 6947 deletions
+46 -1
View File
@@ -611,7 +611,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 2.3, y: -33.9}
m_AnchoredPosition: {x: 2.300003, y: -33.9}
m_SizeDelta: {x: 199, y: 11}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4576936668814888857
@@ -799,6 +799,7 @@ GameObject:
- component: {fileID: 6806681442789174374}
- component: {fileID: 3549955056024652669}
- component: {fileID: 5615975604488516553}
- component: {fileID: 4820812356310843501}
m_Layer: 5
m_Name: HUD
m_TagString: Untagged
@@ -868,6 +869,50 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4820812356310843501
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4823752405346273106}
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: 5615975604488516553}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &4933898273451627870
GameObject:
m_ObjectHideFlags: 0
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6620f766cee7c8f4cb00dd457ac77675
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+1 -223
View File
@@ -3195,7 +3195,6 @@ RectTransform:
- {fileID: 6484535971067043072}
- {fileID: 4528532603973220147}
- {fileID: 4742272256638967314}
- {fileID: 7160948805882967074}
m_Father: {fileID: 3233441867675090637}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -6478,228 +6477,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1491425768019977722
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 3483809415181351540}
m_Modifications:
- target: {fileID: 261981060290751465, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 261981060290751465, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 261981060290751465, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 261981060290751465, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 261981060290751465, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2135374639804663431, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_Name
value: TaskTracePanel
objectReference: {fileID: 0}
- target: {fileID: 3329664456688940810, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3329664456688940810, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3329664456688940810, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3329664456688940810, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3329664456688940810, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5916681925339953764, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5916681925339953764, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5916681925339953764, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5916681925339953764, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5916681925339953764, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132532718725710246, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132532718725710246, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132532718725710246, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132532718725710246, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6132532718725710246, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8409588769955971680, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8409588769955971680, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8409588769955971680, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8409588769955971680, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8409588769955971680, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 400
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.y
value: 300
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9079729967523171228, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9079729967523171228, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9079729967523171228, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9079729967523171228, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9079729967523171228, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
--- !u!224 &7160948805882967074 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8634059274107523544, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
m_PrefabInstance: {fileID: 1491425768019977722}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1664243948601541739
PrefabInstance:
m_ObjectHideFlags: 0
@@ -10645,6 +10422,7 @@ MonoBehaviour:
healthImage: {fileID: 438005734506374002}
manaImage: {fileID: 4333904855430892836}
expImage: {fileID: 6435048883359665301}
m_btnOpenCharacter: {fileID: 0}
neededExp: 0
--- !u!114 &4333904855430892836 stripped
MonoBehaviour:
@@ -35,3 +35,6 @@ MonoBehaviour:
prefab: {fileID: 5636724581774400035, guid: de6ac6f2630425044a55299c703670f1, type: 3}
- id: Win_QuestMinion
prefab: {fileID: 2135374639804663431, guid: 474bf9c22c7c445aeb9bfb8b1b77ab55, type: 3}
- id: Win_Character
prefab: {fileID: 6310702841431484757, guid: 6620f766cee7c8f4cb00dd457ac77675, type: 3}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b73d3bcf7af48614d83352ff38677562
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 454cf3e89d0aaa54b9c60ca081ff5f46
guid: 17e402c0c7862cf4b9f5e46fb6959d1d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
@@ -43,7 +43,7 @@ TextureImporter:
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@@ -108,34 +108,12 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask2_0
rect:
serializedVersion: 2
x: 178
y: 221
width: 616
height: 628
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 88c7b386a6be7bd4dbb002f3a93895a1
internalID: -61588767
vertices: []
indices:
edges: []
weights: []
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: a16d633ba72e5c04487f3be78b1735bc
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
@@ -144,8 +122,7 @@ TextureImporter:
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask2_0: -61588767
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c27a0fab8aef4d74787fe56595601d9f
guid: 644d603639e0f694fb175a01c785befb
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
@@ -43,7 +43,7 @@ TextureImporter:
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@@ -108,34 +108,12 @@ TextureImporter:
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask5_0
rect:
serializedVersion: 2
x: 169
y: 91
width: 247
height: 246
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 81a887702ec996041a55a92f080c99e2
internalID: 1342343447
vertices: []
indices:
edges: []
weights: []
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: ee5d2861e27ff8f43bb7b8face30c7bb
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
@@ -144,8 +122,7 @@ TextureImporter:
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask5_0: 1342343447
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 28f5c415e1fb67c468a8e9ab189afc64
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 1d9cac8a967cec041833a94bf8664511
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: f4f93025e2fb2e444a408fbb4ff66164
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: cfea9e76bd5ae49418c53d06217ce344
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 2903ec456fb24dc4087d314650226d46
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 92da9939d75a3c247a86c43363fbacd8
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f666d782d2b84fa48912bb3166f214aa
guid: c216814d0c4f49c4b824cd83ad395719
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
@@ -110,23 +110,23 @@ TextureImporter:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask4_0
name: k2_0
rect:
serializedVersion: 2
x: 67
y: 108
width: 330
height: 312
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
border: {x: 6, y: 6, z: 6, w: 6}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 591aabfa2f20afb4ea7673f8c6f3b77b
internalID: 799372409
spriteID: fa671714873a84942a957d2da9aee664
internalID: -237910717
vertices: []
indices:
edges: []
@@ -135,7 +135,7 @@ TextureImporter:
customData:
physicsShape: []
bones: []
spriteID: c8e66269510e1524eb24b5af756fb09f
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
@@ -145,7 +145,7 @@ TextureImporter:
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask4_0: 799372409
k2_0: -237910717
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6deb3d497e3c2a44cb875be0f13bbf36
guid: 068aff4b7af527745aca099de55292ef
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
@@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
filterMode: 0
aniso: 1
mipBias: 0
wrapU: 1
@@ -110,23 +110,23 @@ TextureImporter:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask6_0
name: k3_0
rect:
serializedVersion: 2
x: 93
y: 79
width: 313
height: 343
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
border: {x: 6, y: 6, z: 6, w: 6}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 18be220273ab7564389626093c9fa09a
internalID: 1458661374
spriteID: 55e36f932250f9d40a9900037ca33666
internalID: -1880016052
vertices: []
indices:
edges: []
@@ -135,7 +135,7 @@ TextureImporter:
customData:
physicsShape: []
bones: []
spriteID: 33b9f9e65720df144a10109ca92117d7
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
@@ -145,7 +145,7 @@ TextureImporter:
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask6_0: 1458661374
k3_0: -1880016052
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
Binary file not shown.

After

Width:  |  Height:  |  Size: 582 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 783461a4a720d9f4cb4636827558ad8d
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: d50300f970462044ea222f7345e543e5
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: cf3db40b81ee39b42ac9e352b2b72d91
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -663,7 +663,7 @@ namespace BrewMonster.Common
{
int piMax = -1;
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
if (pHost.GetCoolTime((int)CSNetwork.GPDataType.CoolTimeIndex.GP_CT_QUERY_MAFIA_PVP_INFO, ref piMax) == 0)
if (pHost.GetCoolTime((int)CSNetwork.GPDataType.CoolTimeIndex.GP_CT_QUERY_MAFIA_PVP_INFO, out piMax) == 0)
{
UnityGameSession.Instance.GameSession.c2s_SendCmdQueryFactionPVPInfo(idFaction);
}
@@ -601,7 +601,7 @@ namespace BrewMonster.Scripts
case CECHPWork.Host_work_ID.WORK_TRACEOBJECT: pWork = new CECHPWorkTrace(this); break;
case CECHPWork.Host_work_ID.WORK_HACKOBJECT: pWork = new CECHPWorkMelee(this); break;
case CECHPWork.Host_work_ID.WORK_SPELLOBJECT: pWork = new CECHPWorkSpell(this); break;
//case CECHPWork.Host_work_ID.WORK_USEITEM: pWork = new CECHPWorkUse(this); break;
case CECHPWork.Host_work_ID.WORK_USEITEM: pWork = new CECHPWorkUse(this); break;
//case CECHPWork.Host_work_ID.WORK_DEAD: pWork = new CECHPWorkDead(this); break;
//case CECHPWork.Host_work_ID.WORK_FOLLOW: pWork = new CECHPWorkFollow(this); break;
case CECHPWork.Host_work_ID.WORK_FLYOFF: pWork = new CECHPWorkFly(this); break;
@@ -0,0 +1,189 @@
using BrewMonster.Scripts;
using BrewMonster.Scripts.Managers;
using CSNetwork.GPDataType;
using UnityEngine;
namespace BrewMonster.Scripts
{
/// <summary>
/// Host player work: Use item
/// 主角玩家工作:使用物品
/// </summary>
public class CECHPWorkUse : CECHPWork
{
// Fields / 字段
private int m_idItem; // Item template ID / 物品模板ID
private int m_idTarget; // Target object ID / 目标对象ID
private bool m_bWorkForMonsterSpirit; // Is this work for monster spirit gathering? / 是否为命轮采集工作
private CECCounter m_UseTimeCnt; // Use time counter / 使用时间计数器
/// <summary>
/// Constructor / 构造函数
/// </summary>
public CECHPWorkUse(CECHPWorkMan pWorkMan) : base(Host_work_ID.WORK_USEITEM, pWorkMan)
{
m_dwMask = Work_mask.MASK_USEITEM;
m_dwTransMask = Work_mask.MASK_STAND | Work_mask.MASK_MOVETOPOS;
Reset();
}
/// <summary>
/// Reset work / 重置工作
/// </summary>
public override void Reset()
{
base.Reset();
m_idItem = 0;
m_idTarget = 0;
m_bWorkForMonsterSpirit = false;
if (m_UseTimeCnt == null)
m_UseTimeCnt = new CECCounter();
m_UseTimeCnt.SetPeriod(100);
m_UseTimeCnt.Reset();
}
/// <summary>
/// Copy work data / 复制工作数据
/// </summary>
public override bool CopyData(CECHPWork pWork)
{
if (!base.CopyData(pWork))
return false;
CECHPWorkUse pSrc = pWork as CECHPWorkUse;
if (pSrc == null)
return false;
m_idItem = pSrc.m_idItem;
m_idTarget = pSrc.m_idTarget;
m_bWorkForMonsterSpirit = pSrc.m_bWorkForMonsterSpirit;
m_UseTimeCnt.SetPeriod(pSrc.m_UseTimeCnt.GetPeriod());
m_UseTimeCnt.SetCounter(pSrc.m_UseTimeCnt.GetCounter());
return true;
}
/// <summary>
/// On first tick / 第一帧执行
/// </summary>
protected override void OnFirstTick()
{
if (m_pHost == null)
return;
m_pHost.m_iMoveMode = (int)MoveMode.MOVE_STAND;
EC_IvtrItem pItem = EC_IvtrItem.CreateItem(m_idItem, 0, 1);
if (pItem == null)
return;
if (m_bWorkForMonsterSpirit)
{
// Play gather monster spirit action / 播放采集命轮动作
// TODO: Implement PlayGatherMonsterSpiritAction if needed
// m_pHost.PlayGatherMonsterSpiritAction();
Debug.Log($"[CECHPWorkUse] Playing gather monster spirit action for item {m_idItem}");
}
else
{
// Play start use item action / 播放开始使用物品动作
// TODO: Implement PlayStartUseItemAction if needed
// m_pHost.PlayStartUseItemAction(m_idItem);
Debug.Log($"[CECHPWorkUse] Playing start use item action for item {m_idItem}");
}
}
/// <summary>
/// Work is cancelled / 工作被取消
/// </summary>
public override void Cancel()
{
if (m_idTarget != 0 && m_pHost != null)
{
m_pHost.TurnFaceTo(0);
}
base.Cancel();
// TODO: Implement AP_ActionEvent if needed
// AP_ActionEvent(AP_EVENT_STOPUSEITEM);
Debug.Log("[CECHPWorkUse] Work cancelled - STOPUSEITEM event");
}
/// <summary>
/// Set parameters / 设置参数
/// </summary>
/// <param name="idItem">Item template ID / 物品模板ID</param>
/// <param name="dwUseTime">Use time in milliseconds / 使用时间(毫秒)</param>
/// <param name="idTarget">Target object ID / 目标对象ID</param>
/// <param name="bWorkForMonsterSpirit">Is for monster spirit gathering / 是否为命轮采集</param>
public void SetParams(int idItem, float dwUseTime, int idTarget, bool bWorkForMonsterSpirit)
{
m_idItem = idItem;
m_idTarget = idTarget;
m_bWorkForMonsterSpirit = bWorkForMonsterSpirit;
m_UseTimeCnt.SetPeriod(dwUseTime);
m_UseTimeCnt.Reset();
}
/// <summary>
/// Tick routine / 每帧更新
/// </summary>
public override bool Tick(float dwDeltaTime)
{
base.Tick(dwDeltaTime);
// Update use time counter / 更新使用时间计数器
if (m_UseTimeCnt.IncCounter(dwDeltaTime))
{
m_UseTimeCnt.Reset(true);
m_bFinished = true;
}
// Turn face to target if needed / 如果有目标则面向目标
if (m_idTarget != 0 && m_pHost != null)
{
m_pHost.TurnFaceTo(m_idTarget);
}
return true;
}
/// <summary>
/// Get item template ID / 获取物品模板ID
/// </summary>
public int GetItem()
{
return m_idItem;
}
/// <summary>
/// Get target object ID / 获取目标对象ID
/// </summary>
public int GetTarget()
{
return m_idTarget;
}
/// <summary>
/// Is this work for monster spirit gathering? / 是否为命轮采集工作
/// </summary>
public bool IsWorkForMonsterSpirit()
{
return m_bWorkForMonsterSpirit;
}
/// <summary>
/// Get use time counter / 获取使用时间计数器
/// </summary>
public CECCounter GetUseTimeCnt()
{
return m_UseTimeCnt;
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 965c8f617755486429a9f1bb88521065
@@ -134,6 +134,66 @@ namespace BrewMonster.Scripts.Managers
{
RefreshAll();
}
UpdateCooldownOverlays();
}
/// <summary>
/// Update all cooldown overlays
/// 更新所有冷却遮罩
/// </summary>
public void UpdateCooldownOverlays()
{
// Update inventory pack cooldowns
// 更新背包冷却
UpdatePackageCooldowns(inventoryPackButtons, PKG_INVENTORY);
}
/// <summary>
/// Update cooldown overlays for a specific package
/// 更新特定包裹的冷却遮罩
/// </summary>
private void UpdatePackageCooldowns(List<Button> buttons, byte package)
{
if (buttons == null)
{
Debug.LogWarning($"[UpdatePackageCooldowns] Buttons list is null for package {package}");
return;
}
var items = model.GetInventoryData(package);
if (items == null)
{
Debug.LogWarning($"[UpdatePackageCooldowns] Items dictionary is null for package {package}");
return;
}
Debug.Log($"[UpdatePackageCooldowns] Updating package {package} with {buttons.Count} buttons and {items.Count} items");
for (int slot = 0; slot < buttons.Count; slot++)
{
var button = buttons[slot];
if (button == null)
continue;
// Get item at this slot
// 获取此槽位的物品
EC_IvtrItem itemData = null;
bool hasItem = items.TryGetValue(slot, out itemData) && itemData != null;
if (hasItem)
{
// Use InventoryView's method to update cooldown
// 使用 InventoryView 的方法更新冷却
view.UpdateCooldownOverlay(button, itemData);
}
else
{
//// Hide overlay for empty slots
//// 空槽位隐藏遮罩
//view.HideCooldownOverlay(button);
}
}
}
public void RefreshAll()
@@ -335,14 +395,23 @@ namespace BrewMonster.Scripts.Managers
{
if (currentSelectedItem == null)
{
Debug.LogWarning("[InventoryUI] No item selected for equip/unequip operation");
Debug.LogWarning("[InventoryUI] No item selected for operation");
return;
}
if (currentSelectedPackage == PKG_INVENTORY)
{
// Equipping from inventory
EquipItem();
// Check if item is equipment
if (currentSelectedItem.IsEquipment())
{
// Equipping from inventory
EquipItem();
}
else
{
// Use item from inventory
UseItem();
}
}
else if (currentSelectedPackage == PKG_EQUIPMENT)
{
@@ -351,7 +420,56 @@ namespace BrewMonster.Scripts.Managers
}
else
{
Debug.LogWarning($"[InventoryUI] Equip/Unequip not supported for package {currentSelectedPackage}");
Debug.LogWarning($"[InventoryUI] Operation not supported for package {currentSelectedPackage}");
}
}
/// <summary>
/// Use the currently selected item from inventory
/// </summary>
private void UseItem()
{
if (currentSelectedItem == null)
{
Debug.LogWarning("[InventoryUI] No item selected for use");
return;
}
if (currentSelectedPackage != PKG_INVENTORY)
{
Debug.LogWarning("[InventoryUI] Can only use items from inventory package");
return;
}
Debug.Log($"[UseItem] Attempting to use item {currentSelectedItem.m_tid} from slot {currentSelectedSlot}");
// Get host player to call UseItemInPack
var host = CECGameRun.Instance?.GetHostPlayer();
if (host == null)
{
Debug.LogError("[InventoryUI] Cannot get host player");
return;
}
// Call UseItemInPack with current package and slot
bool success = host.UseItemInPack(currentSelectedPackage, currentSelectedSlot, true);
if (success)
{
Debug.Log($"[UseItem] Successfully used item {currentSelectedItem.m_tid} from slot {currentSelectedSlot}");
// Close detail panel after using item
ShowDetailPanel(false);
// Refresh inventory to reflect changes
RefreshAll();
Debug.Log($"[UseItem] Calling UpdateCooldownOverlays after item use");
UpdateCooldownOverlays();
}
else
{
Debug.LogWarning($"[UseItem] Failed to use item {currentSelectedItem.m_tid} from slot {currentSelectedSlot}");
}
}
@@ -598,6 +716,8 @@ namespace BrewMonster.Scripts.Managers
{
private static readonly Dictionary<Image, Sprite> _defaultSprites = new Dictionary<Image, Sprite>();
private static readonly Dictionary<Button, Image> _overlayImages = new Dictionary<Button, Image>();
public void RenderPackage(List<Button> buttons, Dictionary<int, EC_IvtrItem> items, byte package, System.Action<byte, int> onClick, System.Func<int, EC_IvtrItem, string> getDisplayText)
{
if (buttons == null)
@@ -615,34 +735,41 @@ namespace BrewMonster.Scripts.Managers
EC_IvtrItem itemData = null;
bool hasItem = items != null && items.TryGetValue(slot, out itemData);
button.onClick.RemoveAllListeners();
int capturedSlot = slot;
button.onClick.AddListener(() => onClick(package, capturedSlot));
// Optional visual tweaks based on state/count
// Update icon and count
var image = button.GetComponent<Image>();
if (image != null)
{
// Store the default sprite if we haven't seen this image before
// Store default sprite
if (!_defaultSprites.ContainsKey(image))
{
_defaultSprites[image] = image.sprite;
}
// Set icon sprite based on item TemplateId
// Set icon sprite based on item
if (hasItem && itemData != null && itemData.m_iCount > 0)
{
var sprite = EC_IvtrItemUtils.Instance.ResolveItemIconSprite(itemData.m_tid);
image.sprite = sprite;
image.enabled = true;
UpdateItemCountText(button, itemData.m_iCount);
}
else
{
// Restore the default sprite instead of setting to null
// Restore default sprite
image.sprite = _defaultSprites[image];
image.enabled = true;
UpdateItemCountText(button, 0);
}
}
// Setup drag-drop events
var eventTrigger = button.GetComponent<EventTrigger>();
if (eventTrigger == null)
eventTrigger = button.gameObject.AddComponent<EventTrigger>();
@@ -662,6 +789,166 @@ namespace BrewMonster.Scripts.Managers
AddEvent(EventTriggerType.Drop, (data) => ((EC_InventoryUI)button.GetComponentInParent<EC_InventoryUI>()).OnDrop((PointerEventData)data));
}
}
/// <summary>
/// Update cooldown overlay for item
/// 更新物品冷却遮罩
/// </summary>
public void UpdateCooldownOverlay(Button button, EC_IvtrItem itemData)
{
if (button == null || itemData == null)
{
Debug.LogWarning("[UpdateCooldownOverlay] Button or itemData is null");
return;
}
// Find or cache overlay image
// 查找或缓存遮罩图片
Image overlay = null;
if (_overlayImages.TryGetValue(button, out overlay))
{
if (overlay == null)
{
// Cached but destroyed, remove and search again
// 已缓存但被销毁,移除并重新查找
Debug.LogWarning($"[UpdateCooldownOverlay] Cached overlay was destroyed for button {button.name}");
_overlayImages.Remove(button);
}
}
if (overlay == null)
{
// Find image_overlay in button's children
// 在按钮子物体中查找 image_overlay
var overlayTransform = button.transform.Find("image_overlay");
if (overlayTransform != null)
{
overlay = overlayTransform.GetComponent<Image>();
if (overlay != null)
{
_overlayImages[button] = overlay;
}
else
{
Debug.LogWarning($"[UpdateCooldownOverlay] Found transform but no Image component on image_overlay for button {button.name}");
}
}
else
{
Debug.LogWarning($"[UpdateCooldownOverlay] Cannot find image_overlay child in button {button.name}");
}
}
if (overlay == null)
{
return;
}
// Get cooldown info from item
// 从物品获取冷却信息
int maxCooldown = -1;
int currentCooldown = itemData.GetCoolTime(out maxCooldown);
if (currentCooldown > 0)
{
// Show overlay and set fill amount
// 显示遮罩并设置填充量
overlay.gameObject.SetActive(true);
// Calculate fill amount (1 = full cooldown, 0 = ready)
// 计算填充量(1=完全冷却,0=就绪)
if (maxCooldown > 0)
{
float fillAmount = (float)currentCooldown / maxCooldown;
overlay.fillAmount = fillAmount;
}
}
else
{
// Hide overlay when not in cooldown
// 不在冷却时隐藏遮罩
overlay.gameObject.SetActive(false);
}
}
/// <summary>
/// Hide cooldown overlay
/// 隐藏冷却遮罩
/// </summary>
public void HideCooldownOverlay(Button button)
{
if (button == null)
return;
Image overlay = null;
if (_overlayImages.TryGetValue(button, out overlay) && overlay != null)
{
overlay.gameObject.SetActive(false);
}
}
/// <summary>
/// Update or create text component to show item count on the button
/// </summary>
/// <param name="button">The inventory button</param>
/// <param name="count">Item count (0 to hide)</param>
private void UpdateItemCountText(Button button, int count)
{
if (button == null) return;
TMPro.TextMeshProUGUI tmpText = null;
Text legacyText = null;
// Find text component
var textTransform = button.transform.Find("text_quality");
if (textTransform != null)
{
tmpText = textTransform.GetComponent<TMPro.TextMeshProUGUI>();
legacyText = textTransform.GetComponent<Text>();
}
else
{
// Fallback: find any text in children
tmpText = button.GetComponentInChildren<TMPro.TextMeshProUGUI>();
if (tmpText == null)
{
legacyText = button.GetComponentInChildren<Text>();
}
}
// Update text
if (count > 1)
{
string countText = count.ToString();
if (tmpText != null)
{
tmpText.text = countText;
tmpText.gameObject.SetActive(true);
}
else if (legacyText != null)
{
legacyText.text = countText;
legacyText.gameObject.SetActive(true);
}
}
else
{
// Hide when count <= 1
if (tmpText != null)
{
tmpText.text = "";
tmpText.gameObject.SetActive(false);
}
else if (legacyText != null)
{
legacyText.text = "";
legacyText.gameObject.SetActive(false);
}
}
}
}
// === Detail Panel Helpers ===
@@ -165,10 +165,11 @@ namespace PerfectWorld.Scripts.Managers
}
// Get item cool time
public int GetCoolTime(ref int piMax)
public override int GetCoolTime(out int piMax)
{
piMax = 0;
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
return pHost != null ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_AUTOHP, ref piMax) : 0;
return pHost != null ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_AUTOHP, out piMax) : 0;
}
}
}
@@ -168,7 +168,7 @@ namespace PerfectWorld.Scripts.Managers
public int GetCoolTime(ref int piMax)
{
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
return pHost != null ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_AUTOMP, ref piMax) : 0;
return pHost != null ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_AUTOMP, out piMax) : 0;
}
}
}
@@ -1,8 +1,11 @@
using BrewMonster;
using BrewMonster.Scripts.Managers;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDoubleExp : EC_IvtrItem
{
private DOUBLE_EXP_ESSENCE m_pDBEssence;
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
@@ -15,6 +18,11 @@ namespace PerfectWorld.Scripts.Managers
public EC_IvtrDoubleExp(EC_IvtrDoubleExp other) : base(other)
{
}
public DOUBLE_EXP_ESSENCE GetDBEssence()
{
return m_pDBEssence;
}
}
}
@@ -1138,9 +1138,9 @@ namespace BrewMonster.Scripts.Managers
}
/// <summary>Get item cool time in milliseconds (0 by default).</summary>
public virtual int GetCoolTime(out int? piMax)
public virtual int GetCoolTime(out int piMax)
{
piMax = null;
piMax = -1;
return 0;
}
@@ -65,8 +65,9 @@ namespace PerfectWorld.Scripts.Managers
{
return m_pDBEssence.Name;
}
public int GetCoolTime(ref int piMax/* NULL */)
public override int GetCoolTime(out int piMax/* NULL */)
{
piMax = 1;
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
if (!pHost)
return 0;
@@ -75,11 +76,11 @@ namespace PerfectWorld.Scripts.Managers
switch (m_pDBMajorType.id)
{
case 1810: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_REJUVENATION_POTION, ref piMax); break;
case 1794: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_HP_POTION, ref piMax); break;
case 1802: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_MP_POTION, ref piMax); break;
case 1810: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_REJUVENATION_POTION, out piMax); break;
case 1794: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_HP_POTION, out piMax); break;
case 1802: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_MP_POTION, out piMax); break;
case 1815:
case 2038: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_ANTIDOTE_POTION, ref piMax); break;
case 2038: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_ANTIDOTE_POTION, out piMax); break;
}
return iTime;
@@ -80,7 +80,7 @@ namespace PerfectWorld.Scripts.Managers
if (!pHost)
return 0;
int iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_FEED_PET, ref piMax);
int iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_FEED_PET, out piMax);
return iTime;
}
@@ -1,8 +1,14 @@
using BrewMonster;
using BrewMonster.Scripts.Managers;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTargetItem : EC_IvtrItem
{
private CECSkill m_pTargetSkill;
private TARGET_ITEM_ESSENCE m_pDBEssence;
private bool m_bEssenceLoaded = false; // Flag to track if essence is loaded
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
@@ -15,6 +21,33 @@ namespace PerfectWorld.Scripts.Managers
public EC_IvtrTargetItem(EC_IvtrTargetItem other) : base(other)
{
}
public TARGET_ITEM_ESSENCE GetDBEssence()
{
if (!m_bEmbeddable)
{
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
var pDataBuf = ElementDataManProvider.GetElementDataMan()
.get_data_ptr((uint)m_tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
if (DataType == DATA_TYPE.DT_TARGET_ITEM_ESSENCE && pDataBuf != null)
{
m_pDBEssence = (TARGET_ITEM_ESSENCE)pDataBuf;
m_bEssenceLoaded = true;
}
}
return m_pDBEssence;
}
public bool IsEssenceLoaded()
{
return m_bEssenceLoaded;
}
public CECSkill GetTargetSkill()
{
return m_pTargetSkill;
}
}
}
@@ -1,3 +1,4 @@
using BrewMonster;
using BrewMonster.Scripts.Managers;
namespace PerfectWorld.Scripts.Managers
{
@@ -15,6 +16,13 @@ namespace PerfectWorld.Scripts.Managers
public EC_IvtrTossMat(EC_IvtrTossMat other) : base(other)
{
}
protected TOSSMATTER_ESSENCE m_pDBEssence;
public TOSSMATTER_ESSENCE GetDBEssence()
{
return m_pDBEssence;
}
}
}
@@ -55,7 +55,7 @@ namespace PerfectWorld.Scripts.Managers
public int GetCoolTime(ref int piMax)
{
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
return pHost ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_TOWNSCROLL, ref piMax) : 0;
return pHost ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_TOWNSCROLL, out piMax) : 0;
}
protected override string GetNormalDesc(bool bRepair)
@@ -56,7 +56,7 @@ namespace PerfectWorld.Scripts.Managers
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
if (!pHost)
return 0;
int iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_TOWNSCROLL, ref piMax);
int iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_TOWNSCROLL, out piMax);
return iTime;
}
@@ -58,6 +58,7 @@ namespace BrewMonster
protected ROLEBASICPROP m_BasicProps;
public int m_iMoveEnv = Move_environment.MOVEENV_GROUND; // Move environment
public bool m_bWalkRun = true;
public bool m_bInSanctuary = true;
public A3DAABB m_aabbServer = new A3DAABB(); // Óë·þÎñÆ÷±£³ÖÒ»ÖµÄaabb£¬ ²»ÊÜËõ·ÅÓ°Ïì
public A3DAABB m_aabb = new A3DAABB(); // Player's aabb£¬ÓÃÓÚÏÔʾµÄaabb£¬ÊÜËõ·ÅÓ°Ïì
public int m_iProfession; // Profession
@@ -261,6 +262,11 @@ namespace BrewMonster
return (m_dwStates & PlayerNPCState.GP_STATE_INVISIBLE) != 0;
}
public bool IsInSanctuary()
{
return m_bInSanctuary;
}
public bool IsValidAction(int iIndex)
{
return (iIndex >= 0 && iIndex < (int)PLAYER_ACTION_TYPE.ACT_MAX) ? true : false;
@@ -243,9 +243,6 @@ public class CECNPCServer : CECNPC
uint idTask = outService.id_tasks[i];
if (idTask <= 0)
continue;
//BMLogger.Log($"[UpdateCurTaskIcon] Check OUT task {idTask}, CanShow={pTask.CanShowTask(idTask)}, CanDeliver={pTask.CanDeliverTask(idTask)}");
if (!pTask.CanShowTask(idTask))
continue;
@@ -258,7 +255,6 @@ public class CECNPCServer : CECNPC
if (pTaskTemp.IsKeyTask())
{
m_TaskIcon = IconTaskType.QI_OUT_K;
//BMLogger.Log($"[UpdateCurTaskIcon] Set icon QI_OUT_K for task {idTask}");
UpdateTaskIconUI();
return;
}
@@ -1583,6 +1583,15 @@ namespace CSNetwork.S2CCommand
public byte byPackage;
public int bySlot;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_set_status_pt
{
public int vitality;
public int energy;
public int strength;
public int agility;
}
}
// Player and NPC state
@@ -2,6 +2,7 @@ using BrewMonster;
using CSNetwork.GPDataType;
using CSNetwork.S2CCommand;
using System;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
@@ -825,6 +826,25 @@ namespace CSNetwork.C2SCommand
return SerializeCommand(CommandID.USE_ITEM, pCmd);
}
public static Octets CreateUseItemWithTarget(byte byPackage, byte bySlot, int tid, byte byPVPMask)
{
using (var stream = new MemoryStream())
using (var writer = new BinaryWriter(stream))
{
// Write command header
writer.Write((ushort)CommandID.USE_ITEM_T);
// Write cmd_use_item structure
writer.Write(byPackage); // where
writer.Write((byte)1); // byCount (always 1 for target items)
writer.Write((ushort)bySlot); // index
writer.Write(tid); // item_id
writer.Write(byPVPMask); // pvp_mask
return new Octets(stream.ToArray());
}
}
public static Octets CreateGivePresentCmd(int roleid, int mail_id, int goods_id, int goods_index, int goods_slot)
{
cmd_player_give_present pCmd = new cmd_player_give_present();
@@ -917,5 +937,17 @@ namespace CSNetwork.C2SCommand
pCmd.bySlot = bySlot;
return SerializeCommand(CommandID.QUERY_MAFIA_PVP_INFO, pCmd);
}
public static Octets CreateSetStatusPtCmd(int vitality, int energy, int strength, int agility)
{
var pCmd = new cmd_set_status_pt
{
vitality = vitality,
energy = energy,
strength = strength,
agility = agility
};
return SerializeCommand(CommandID.SET_STATUS_POINT, pCmd);
}
}
}
@@ -872,6 +872,15 @@ namespace CSNetwork.GPDataType
public int line;
};
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_host_use_item
{
public byte byPackage;
public byte bySlot;
public int item_id;
public ushort use_count;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct cmd_matter_pickup
{
@@ -1,4 +1,4 @@
using BrewMonster;
using BrewMonster;
using BrewMonster.Common;
using BrewMonster.Managers;
using BrewMonster.Network;
@@ -474,6 +474,13 @@ namespace CSNetwork
SendProtocol(gamedatasendRequest);
}
public void c2s_SendCmdUseItemWithTarget(byte byPackage, byte bySlot, int tid, byte byPVPMask)
{
gamedatasend gamedatasend = new gamedatasend();
gamedatasend.Data = C2SCommandFactory.CreateUseItemWithTarget(byPackage, bySlot, tid, byPVPMask);
SendProtocol(gamedatasend);
}
public void RequestOwnItemInfoAsync(
byte byPackage,
byte bySlot,
@@ -957,6 +964,9 @@ namespace CSNetwork
case CommandID.SET_COOLDOWN:
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_SETCOOLTIME, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
break;
case CommandID.HOST_USE_ITEM:
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_USEITEM, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
break;
case CommandID.COMBO_SKILL_PREPARE:
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_COMBO_SKILL_PREPARE, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader, dwDataSize);
break;
@@ -1764,5 +1774,12 @@ namespace CSNetwork
gamedatasend.Data = C2SCommandFactory.CreateGetItemInfoCmd(byPackage, bySlot);
SendProtocol(gamedatasend);
}
public void c2s_SendCmdSetStatusPts(int vitality, int energy, int strength, int agility)
{
gamedatasend gamedatasend = new gamedatasend();
gamedatasend.Data = C2SCommandFactory.CreateSetStatusPtCmd(vitality, energy, strength, agility);
SendProtocol(gamedatasend);
}
}
}
@@ -235,6 +235,10 @@ namespace BrewMonster.Network
{
Instance._gameSession.RequestReviveByPlayer();
}
public static void c2s_SendCmdUseItemWithTarget(byte byPackage, byte bySlot, int tid, byte byPVPMask)
{
Instance._gameSession.c2s_SendCmdUseItemWithTarget(byPackage, bySlot, tid, byPVPMask);
}
public void RequestMallShopping(uint count, int good_id, int good_index, int good_pos)
{
@@ -438,6 +442,12 @@ namespace BrewMonster.Network
Instance._gameSession.CmdCache.SendCmdExtProps();
}
/// <summary>Send C2S::SET_STATUS_POINT (attribute point allocation).</summary>
public static void c2s_CmdSetStatusPts(int vitality, int energy, int strength, int agility)
{
Instance._gameSession.c2s_SendCmdSetStatusPts(vitality, energy, strength, agility);
}
public static void c2s_SendCmdGivePresent(int roleid, int mail_id, int goods_id, int goods_index, int goods_slot)
{
Instance._gameSession.c2s_SendCmdGivePresent(roleid, mail_id, goods_id, goods_index, goods_slot);
@@ -787,6 +787,17 @@ namespace BrewMonster
return new CECShortcut();
}
public virtual bool Execute() { return true; }
public virtual int GetCoolTime(ref int piMax)
{
piMax = 0;
return 0;
}
public virtual string GetIconFile()
{
return "";
}
}
public class CECSCCommand : CECShortcut
@@ -15,6 +15,8 @@ namespace BrewMonster.UI
protected AUIManager m_pAUIManager = null;
protected string m_szName;
private bool m_bUpdateRenderTarget = false;
public virtual void Show(bool value)
{
gameObject.SetActive(value);
@@ -27,11 +29,14 @@ namespace BrewMonster.UI
}
public bool SetName(string pszName)
{
m_szName = pszName;
if (m_pAUIManager == null)
return false; // Will be registered when SetAUIManager is called
if (m_pAUIManager.m_DlgName.ContainsKey(pszName))
return false;
//m_pAUIManager.m_DlgName.Remove(m_szName);
m_szName = pszName;
m_pAUIManager.m_DlgName[m_szName] = this;
return true;
@@ -271,6 +276,11 @@ namespace BrewMonster.UI
public void SetAUIManager(AUIManager pAUIManager)
{
m_pAUIManager = pAUIManager;
// Register dialog name if it was set before manager was assigned
if (m_pAUIManager != null && !string.IsNullOrEmpty(m_szName) && !m_pAUIManager.m_DlgName.ContainsKey(m_szName))
{
m_pAUIManager.m_DlgName[m_szName] = this;
}
}
public virtual void OnEnable()
@@ -315,5 +325,23 @@ namespace BrewMonster.UI
m_pvData = null;
m_szName = "";
}
/// <summary>Override in dialogs that support attribute-point reset (e.g. DlgCharacter). No-op by default.</summary>
public virtual void ResetPoints() { }
public virtual void UpdateRenderTarget()
{
m_bUpdateRenderTarget = true;
}
public bool NeedRenderTargetUpdate()
{
return m_bUpdateRenderTarget;
}
public void ResetRenderTargetFlag()
{
m_bUpdateRenderTarget = false;
}
}
}
@@ -0,0 +1,550 @@
// Port of C++ CDlgCharacter (DlgCharacter.cpp / DlgCharacter.h)
// Character information panel: stats, attributes, equipment bonuses, attribute point allocation.
using System;
using System.Collections.Generic;
using System.Text;
using BrewMonster.Network;
using BrewMonster.Scripts;
using BrewMonster.Scripts.Managers;
using PerfectWorld.Scripts.Managers;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using TMPro;
namespace BrewMonster.UI
{
public class DlgCharacter : AUIDialog
{
private const int INTERAL_LONG = 618;
private const int INTERAL_SHORT = 100;
#region UI References (same names as C++)
[Header("Basic Info")]
[SerializeField] private TextMeshProUGUI m_pTxt_CharName;
[SerializeField] private TextMeshProUGUI m_pTxt_CharLevel;
[SerializeField] private TextMeshProUGUI m_pTxt_Profession;
[SerializeField] private TextMeshProUGUI m_pTxt_Faction;
[SerializeField] private TextMeshProUGUI m_pTxt_Partner;
[SerializeField] private TextMeshProUGUI m_pTxt_ExpCurrent;
[SerializeField] private TextMeshProUGUI m_pTxt_ExpRequire;
[SerializeField] private TextMeshProUGUI m_pTxt_Distinction;
[SerializeField] private TextMeshProUGUI m_pTxt_xz;
[Header("Resources")]
[SerializeField] private TextMeshProUGUI m_pTxt_HP;
[SerializeField] private TextMeshProUGUI m_pTxt_MP;
[SerializeField] private TextMeshProUGUI m_pTxt_SP;
[SerializeField] private TextMeshProUGUI m_pTxt_Point;
[Header("Attributes")]
[SerializeField] private TextMeshProUGUI m_pTxt_Str;
[SerializeField] private TextMeshProUGUI m_pTxt_Agi;
[SerializeField] private TextMeshProUGUI m_pTxt_Vit;
[SerializeField] private TextMeshProUGUI m_pTxt_Int;
[Header("Combat Stats")]
[SerializeField] private TextMeshProUGUI m_pTxt_Attack;
[SerializeField] private TextMeshProUGUI m_pTxt_AtkSpeed;
[SerializeField] private TextMeshProUGUI m_pTxt_Definition;
[SerializeField] private TextMeshProUGUI m_pTxt_Evade;
[SerializeField] private TextMeshProUGUI m_pTxt_MoveSpeed;
[SerializeField] private TextMeshProUGUI m_pTxt_MgcAttack;
[SerializeField] private TextMeshProUGUI m_pTxt_Critical;
[SerializeField] private TextMeshProUGUI m_pTxt_PhyDefense;
[SerializeField] private TextMeshProUGUI m_pTxt_MgcDefense;
[SerializeField] private TextMeshProUGUI m_pTxt_AttackLevel;
[SerializeField] private TextMeshProUGUI m_pTxt_DefenseLevel;
[SerializeField] private TextMeshProUGUI m_pTxt_CrtPower;
[SerializeField] private TextMeshProUGUI m_pTxt_SoulPower;
[Header("Hints / Additional")]
[SerializeField] private TextMeshProUGUI m_pNew_PhyDefense;
[SerializeField] private TextMeshProUGUI m_pNew_MgcDefense;
[SerializeField] private TextMeshProUGUI m_pNew_AttackLevel;
[SerializeField] private TextMeshProUGUI m_pNew_DefenseLevel;
[SerializeField] private TextMeshProUGUI m_pTxt_Force;
[SerializeField] private TextMeshProUGUI m_pTxt_Title;
[SerializeField] private TextMeshProUGUI m_pTxt_Realm;
[SerializeField] private TextMeshProUGUI m_pTxt_Vigour;
[SerializeField] private TextMeshProUGUI m_pTxt_Stealth;
[SerializeField] private TextMeshProUGUI m_pTxt_Antistealth;
[SerializeField] private TextMeshProUGUI m_pTxt_Penetration;
[SerializeField] private TextMeshProUGUI m_pTxt_Resilience;
[SerializeField] private TextMeshProUGUI m_pNew_Vigour;
[SerializeField] private TextMeshProUGUI m_pNew_SoulPower;
[SerializeField] private TextMeshProUGUI m_pNew_Penetration;
[SerializeField] private TextMeshProUGUI m_pNew_Resilience;
[Header("Character Portrait")]
[SerializeField] private RawImage m_pImg_Char;
[Tooltip("Optional. Pivot transform to rotate (Y) when dragging on portrait. E.g. character model or camera rig.")]
[SerializeField] private Transform m_pPortraitPivot;
[Header("Realm Progress")]
[SerializeField] private Slider m_pPro_RealmExp;
[Header("Buttons")]
[SerializeField] private Button m_pBtn_AddStr;
[SerializeField] private Button m_pBtn_AddAgi;
[SerializeField] private Button m_pBtn_AddVit;
[SerializeField] private Button m_pBtn_AddInt;
[SerializeField] private Button m_pBtn_MinusStr;
[SerializeField] private Button m_pBtn_MinusAgi;
[SerializeField] private Button m_pBtn_MinusVit;
[SerializeField] private Button m_pBtn_MinusInt;
[SerializeField] private Button m_pBtn_Confirm;
[SerializeField] private Button m_pBtn_Reset;
[SerializeField] private Button m_pBtn_Cancel;
[SerializeField] private Button m_pBtn_Force;
[SerializeField] private Button m_pBtn_TitleList;
[SerializeField] private Button m_pBtn_Book;
#endregion
#region State (same as C++)
private int m_nStatusPtUsed;
private ROLEEXTPROP_BASE m_repBase;
private int m_nMouseLastX;
private int m_nMouseOffset;
private int m_nMouseOffsetThis;
private float m_dwStartTime;
private float m_dwLastTime;
private int m_iIntervalTime;
private Button m_pButtonPress;
private bool m_bAdd;
private static readonly Color ColorBonus = new Color(0f, 1f, 0f);
private static readonly Color ColorNormal = Color.white;
private string m_cachedHostName = "";
#endregion
public override void OnEnable()
{
base.OnEnable();
EventBus.Subscribe<CECHostPlayer.InfoHostPlayer>(OnInfoHostPlayer);
}
public override void OnDisable()
{
EventBus.Unsubscribe<CECHostPlayer.InfoHostPlayer>(OnInfoHostPlayer);
base.OnDisable();
}
private void OnInfoHostPlayer(CECHostPlayer.InfoHostPlayer e)
{
m_cachedHostName = e.NameHostPlayer ?? "";
}
public override void Awake()
{
base.Awake();
SetName("Win_Character");
m_nMouseOffset = 0;
m_nMouseOffsetThis = 0;
m_iIntervalTime = INTERAL_LONG;
m_dwLastTime = 0;
m_pButtonPress = null;
ResetPoints();
}
public override void Start()
{
base.Start();
WireButtons();
WirePortraitDrag();
}
private void WirePortraitDrag()
{
if (m_pImg_Char == null) return;
var go = m_pImg_Char.gameObject;
var receiver = go.GetComponent<DlgCharacterPortraitDragReceiver>();
if (receiver == null) receiver = go.AddComponent<DlgCharacterPortraitDragReceiver>();
receiver.Init(this);
}
/// <summary>Called by portrait drag receiver. deltaX in screen space; rotation clamped to [-70,70] degrees.</summary>
public void OnPortraitDragDelta(float deltaX)
{
m_nMouseOffset += (int)deltaX;
m_nMouseOffset = Mathf.Clamp(m_nMouseOffset, -70, 70);
m_nMouseOffsetThis = m_nMouseOffset;
if (m_pPortraitPivot != null)
m_pPortraitPivot.localRotation = Quaternion.Euler(0f, m_nMouseOffset, 0f);
}
public override void Show(bool value)
{
m_bShow = value;
base.Show(value);
}
private void WireButtons()
{
if (m_pBtn_AddStr != null) m_pBtn_AddStr.onClick.AddListener(() => OnAddAttr(m_pBtn_AddStr, 0)); // Str
if (m_pBtn_AddAgi != null) m_pBtn_AddAgi.onClick.AddListener(() => OnAddAttr(m_pBtn_AddAgi, 1));
if (m_pBtn_AddVit != null) m_pBtn_AddVit.onClick.AddListener(() => OnAddAttr(m_pBtn_AddVit, 2)); // Vit maps to 3 in C++ iFourPro
if (m_pBtn_AddInt != null) m_pBtn_AddInt.onClick.AddListener(() => OnAddAttr(m_pBtn_AddInt, 3)); // Int/Energy
if (m_pBtn_MinusStr != null) m_pBtn_MinusStr.onClick.AddListener(OnMinusStr);
if (m_pBtn_MinusAgi != null) m_pBtn_MinusAgi.onClick.AddListener(OnMinusAgi);
if (m_pBtn_MinusVit != null) m_pBtn_MinusVit.onClick.AddListener(OnMinusVit);
if (m_pBtn_MinusInt != null) m_pBtn_MinusInt.onClick.AddListener(OnMinusInt);
if (m_pBtn_Confirm != null) m_pBtn_Confirm.onClick.AddListener(OnCommand_confirm);
if (m_pBtn_Reset != null) m_pBtn_Reset.onClick.AddListener(OnCommand_reset);
if (m_pBtn_Cancel != null) m_pBtn_Cancel.onClick.AddListener(OnCommand_CANCEL);
if (m_pBtn_Force != null) m_pBtn_Force.onClick.AddListener(OnCommand_force);
if (m_pBtn_TitleList != null) m_pBtn_TitleList.onClick.AddListener(OnCommand_Title);
if (m_pBtn_Book != null) m_pBtn_Book.onClick.AddListener(OnCommand_ReincarnationBook);
}
public override bool Render()
{
RefreshHostDetails();
return base.Render();
}
public override void Update()
{
OnTick();
base.Update();
}
private void OnTick()
{
if (m_pButtonPress == null) return;
if (!m_pButtonPress.gameObject.activeInHierarchy) { m_pButtonPress = null; return; }
float now = Time.realtimeSinceStartup * 1000f;
if (now - m_dwLastTime >= m_iIntervalTime)
{
if (m_bAdd)
PropertyAdd(m_pButtonPress);
else
PropertyMinus(m_pButtonPress);
m_dwLastTime += m_iIntervalTime;
if (m_iIntervalTime == INTERAL_LONG)
m_iIntervalTime = INTERAL_SHORT;
}
}
private void OnAddAttr(Button btn, int kind)
{
PropertyAdd(btn);
// Don't start continuous loop - only increment once per click
m_pButtonPress = null;
}
private void OnMinusStr() { PropertyMinus(m_pBtn_MinusStr); }
private void OnMinusAgi() { PropertyMinus(m_pBtn_MinusAgi); }
private void OnMinusVit() { PropertyMinus(m_pBtn_MinusVit); }
private void OnMinusInt() { PropertyMinus(m_pBtn_MinusInt); }
public override void ResetPoints()
{
m_nStatusPtUsed = 0;
m_repBase = new ROLEEXTPROP_BASE(false);
m_repBase.vitality = 0;
m_repBase.energy = 0;
m_repBase.strength = 0;
m_repBase.agility = 0;
}
private void PropertyAdd(Button btn)
{
CECHostPlayer host = GetHostPlayer();
if (host == null) return;
ROLEBASICPROP rbp = host.GetBasicProps();
if (m_nStatusPtUsed >= rbp.iStatusPt) return;
if (btn == m_pBtn_AddStr) { m_repBase.strength++; m_nStatusPtUsed++; }
else if (btn == m_pBtn_AddAgi) { m_repBase.agility++; m_nStatusPtUsed++; }
else if (btn == m_pBtn_AddVit) { m_repBase.vitality++; m_nStatusPtUsed++; }
else if (btn == m_pBtn_AddInt) { m_repBase.energy++; m_nStatusPtUsed++; }
}
private void PropertyMinus(Button btn)
{
if (btn == m_pBtn_MinusStr && m_repBase.strength > 0) { m_repBase.strength--; m_nStatusPtUsed--; }
else if (btn == m_pBtn_MinusAgi && m_repBase.agility > 0) { m_repBase.agility--; m_nStatusPtUsed--; }
else if (btn == m_pBtn_MinusVit && m_repBase.vitality > 0) { m_repBase.vitality--; m_nStatusPtUsed--; }
else if (btn == m_pBtn_MinusInt && m_repBase.energy > 0) { m_repBase.energy--; m_nStatusPtUsed--; }
}
private void OnCommand_confirm()
{
UnityGameSession.c2s_CmdSetStatusPts(
m_repBase.vitality, m_repBase.energy,
m_repBase.strength, m_repBase.agility);
ResetPoints();
// Request fresh ext props so host player gets updated values from server; UI will refresh when response arrives
UnityGameSession.c2s_SendCmdGetExtProps();
}
private void OnCommand_reset()
{
ResetPoints();
}
private void OnCommand_CANCEL()
{
Show(false);
}
private void OnCommand_force()
{
var pForce = m_pAUIManager?.GetDialog("Win_Force");
if (pForce != null) pForce.Show(!pForce.IsShow());
}
private void OnCommand_Title()
{
var pDlg = GetGameUIMan()?.GetDialog("Win_TitleList");
if (pDlg != null) pDlg.Show(!pDlg.IsShow());
}
private void OnCommand_ReincarnationBook()
{
CECHostPlayer host = GetHostPlayer();
if (host == null) return;
var pDlg = m_pAUIManager?.GetDialog("Win_ReincarnationBook");
if (pDlg != null && host.GetReincarnationCount() > 0) pDlg.Show(!pDlg.IsShow());
}
private void RefreshHostDetails()
{
if (!gameObject.activeSelf) return;
CECHostPlayer host = GetHostPlayer();
if (host == null) return;
ROLEBASICPROP rbp = host.GetBasicProps();
ROLEEXTPROP rep = host.GetExtendProps();
var gameRun = EC_Game.GetGameRun();
if (gameRun == null) return;
string charName = host.GetName();
if (string.IsNullOrEmpty(charName)) charName = m_cachedHostName;
if (string.IsNullOrEmpty(charName))
{
var ri = UnityGameSession.Instance?.GetRoleInfo();
if (ri?.name != null && ri.name.ByteArray != null && ri.name.ByteArray.Length > 0)
charName = Encoding.Unicode.GetString(ri.name.ByteArray);
}
SetText(m_pTxt_CharName, charName ?? "");
SetText(m_pTxt_CharLevel, rbp.iLevel.ToString());
SetText(m_pTxt_Profession, gameRun.GetProfName(host.GetProfession()));
int idFaction = host.GetFactionID();
string factionName = idFaction <= 0 ? GetStringFromTable(251) : "";
var factionMan = EC_Game.GetFactionMan();
if (idFaction > 0 && factionMan != null)
{
var fi = factionMan.GetFaction((uint)idFaction, false);
if (fi != null) factionName = fi.m_szName ?? "";
}
SetText(m_pTxt_Faction, factionName);
int spouse = 0; // TODO: host.GetSpouse() when exposed; use gameRun.GetPlayerName(spouse, false) when that API exists
if (spouse != 0)
{
string spouseName = ""; // TODO: gameRun.GetPlayerName(spouse, false)
SetText(m_pTxt_Partner, spouseName ?? "");
}
else
SetText(m_pTxt_Partner, GetStringFromTable(786));
int[] iFourPro = CalcEquipmentBonus(host);
SetText(m_pTxt_ExpCurrent, rbp.iExp.ToString());
SetText(m_pTxt_ExpRequire, host.GetLevelUpExp(rbp.iLevel).ToString());
int reputation = 0; // TODO: host.GetReputation() when exposed
SetText(m_pTxt_Distinction, reputation.ToString());
SetText(m_pTxt_xz, GetGameUIMan()?.GetStringFromTable(1001 + rbp.iLevel2) ?? "");
SetText(m_pTxt_HP, $"{rbp.iCurHP}/{rep.bs.max_hp}");
SetText(m_pTxt_MP, $"{rbp.iCurMP}/{rep.bs.max_mp}");
SetText(m_pTxt_SP, rbp.iSP.ToString());
SetText(m_pTxt_Point, (rbp.iStatusPt - m_nStatusPtUsed).ToString());
int strVal = rep.bs.strength + m_repBase.strength;
SetText(m_pTxt_Str, strVal.ToString());
SetColor(m_pTxt_Str, iFourPro[0] != 0 ? ColorBonus : ColorNormal);
int agiVal = rep.bs.agility + m_repBase.agility;
SetText(m_pTxt_Agi, agiVal.ToString());
SetColor(m_pTxt_Agi, iFourPro[1] != 0 ? ColorBonus : ColorNormal);
int vitVal = rep.bs.vitality + m_repBase.vitality;
SetText(m_pTxt_Vit, vitVal.ToString());
SetColor(m_pTxt_Vit, iFourPro[3] != 0 ? ColorBonus : ColorNormal);
int energyVal = rep.bs.energy + m_repBase.energy;
SetText(m_pTxt_Int, energyVal.ToString());
SetColor(m_pTxt_Int, iFourPro[2] != 0 ? ColorBonus : ColorNormal);
SetText(m_pTxt_Attack, $"{rep.ak.DamageLow}-{rep.ak.DamageHigh}");
string atkSpeedUnit = GetGameUIMan()?.GetStringFromTable(279) ?? "/s";
float atkSpeed = rep.ak.AttackSpeed != 0 ? 1f / (rep.ak.AttackSpeed * 0.05f) : 0f;
SetText(m_pTxt_AtkSpeed, $"{atkSpeed:F2} {atkSpeedUnit}");
SetText(m_pTxt_Definition, rep.ak.Attack.ToString());
SetText(m_pTxt_Evade, rep.df.armor.ToString());
string moveUnit = GetGameUIMan()?.GetStringFromTable(280) ?? "m/s";
SetText(m_pTxt_MoveSpeed, $"{rep.mv.run_speed:F1} {moveUnit}");
SetText(m_pTxt_MgcAttack, $"{rep.ak.DamageMagicLow}-{rep.ak.DamageMagicHigh}");
SetText(m_pTxt_Critical, $"{rbp.iCritRate}%");
int nLevel = rbp.iLevel;
float fReduce = DefenceToPercent(rep.df.defense, nLevel);
SetText(m_pTxt_PhyDefense, rep.df.defense.ToString());
SetText(m_pNew_PhyDefense, string.Format(GetGameUIMan()?.GetStringFromTable(490) ?? "{0} {1}", nLevel, fReduce));
if (m_pTxt_MgcDefense != null || m_pNew_MgcDefense != null)
{
int nSum = 0;
var parts = new System.Collections.Generic.List<string>();
for (int i = 0; i < GameConstants.NUM_MAGICCLASS; i++)
{
nSum += rep.df.resistance[i];
float r = DefenceToPercent(rep.df.resistance[i], nLevel);
parts.Add(string.Format(GetGameUIMan()?.GetStringFromTable(491 + i) ?? "", rep.df.resistance[i], nLevel, r));
}
if (m_pTxt_MgcDefense != null) SetText(m_pTxt_MgcDefense, (nSum / GameConstants.NUM_MAGICCLASS).ToString());
if (m_pNew_MgcDefense != null) SetText(m_pNew_MgcDefense, string.Join("\n", parts));
}
SetText(m_pTxt_AttackLevel, rbp.iAtkDegree.ToString());
SetText(m_pTxt_DefenseLevel, rbp.iDefDegree.ToString());
SetText(m_pTxt_CrtPower, $"{rbp.iCritDamageBonus + 200}%");
int soulPower = 0; // TODO: host.GetSoulPower() when exposed
SetText(m_pTxt_SoulPower, soulPower >= 0 ? soulPower.ToString() : "-");
string soulHint = GetStringFromTable(8135);
if (soulPower > 0 && host.GetProfession() == (int)PROFESSION.PROF_MONK)
{
soulHint = GetStringFromTable(8136) + "\n"
+ string.Format(GetStringFromTable(8130), soulPower) + "\n"
+ string.Format(GetStringFromTable(8131), (int)Mathf.Floor(soulPower * 0.08f * (1 + 0.01f * rbp.iAtkDegree))) + "\n"
+ string.Format(GetStringFromTable(8132), (int)Mathf.Floor(soulPower * 0.0002f + 1)) + "\n"
+ string.Format(GetStringFromTable(8133), soulPower * 0.0006f) + "\n"
+ string.Format(GetStringFromTable(8134), (int)Mathf.Floor(soulPower * 0.5f));
}
SetText(m_pNew_SoulPower, soulHint);
SetText(m_pTxt_Stealth, rbp.iInvisibleDegree.ToString());
SetText(m_pTxt_Antistealth, rbp.iAntiInvisibleDegree.ToString());
SetText(m_pTxt_Penetration, rbp.iPenetration.ToString());
SetText(m_pNew_Penetration, string.Format(GetStringFromTable(9380), (int)(100 * rbp.iPenetration * 3 / (float)(rbp.iPenetration + 300))));
SetText(m_pTxt_Resilience, rbp.iResilience.ToString());
SetText(m_pNew_Resilience, string.Format(GetStringFromTable(9381), nLevel, (int)(100 * rbp.iResilience / (float)(rbp.iResilience + nLevel))));
int vigourRealm = 0;
int realmLevel = host.GetRealmLevel();
if (m_pTxt_Realm != null) m_pTxt_Realm.gameObject.SetActive(realmLevel > 0);
if (m_pPro_RealmExp != null) m_pPro_RealmExp.gameObject.SetActive(realmLevel > 0);
if (realmLevel > 0)
{
SetText(m_pTxt_Realm, GetRealmDisplayName(realmLevel));
if (m_pPro_RealmExp != null)
{
int requireExp = 0; // TODO: host.GetRealmRequireExp() when exposed
if (requireExp > 0)
{
int realmExp = 0; // TODO: host.GetRealmExp() when exposed
m_pPro_RealmExp.value = Mathf.Clamp01((float)Math.Max(realmExp, 0) / requireExp);
SetText(m_pNew_Vigour, string.Format(GetGameUIMan()?.GetStringFromTable(11164) ?? "", realmExp, requireExp));
}
else
{
m_pPro_RealmExp.value = 1f;
}
}
}
SetText(m_pTxt_Vigour, rbp.iVigour.ToString());
SetText(m_pNew_Vigour, string.Format(GetStringFromTable(11146), vigourRealm));
int forceId = host.GetForce();
if (m_pBtn_Force != null) m_pBtn_Force.interactable = forceId > 0;
if (m_pTxt_Force != null)
SetText(m_pTxt_Force, ""); // TODO: force name when GetForceMgr/GetForceData exposed
if (m_pTxt_Title != null)
SetText(m_pTxt_Title, ""); // TODO: title when GetCurrentTitle/GetTitleConfig exposed
if (m_pBtn_Book != null) m_pBtn_Book.interactable = host.GetReincarnationCount() > 0;
}
private static void SetText(TextMeshProUGUI t, string s)
{
if (t != null) t.text = s ?? "";
}
private static void SetColor(TextMeshProUGUI t, Color c)
{
if (t != null) t.color = c;
}
private static float DefenceToPercent(int def, int nLevel)
{
float f = 100f * def / (def + 40f * nLevel - 25f);
return Mathf.Min(f, 95f);
}
private string GetRealmDisplayName(int realmLevel)
{
if (realmLevel <= 0) return "";
string s = GetGameUIMan()?.GetStringFromTable(11000 + realmLevel);
return s ?? "";
}
private int[] CalcEquipmentBonus(CECHostPlayer host)
{
int[] iFourPro = { 0, 0, 0, 0 };
var inv = host?.GetEquipment();
if (inv == null) return iFourPro;
int equipSlots = InventoryConst.SIZE_ALL_EQUIPIVTR;
for (int i = 0; i < equipSlots; i++)
{
var item = inv.GetItem(i);
if (item is EC_IvtrEquip equ && equ.Props != null)
{
int n = equ.Props.Count;
for (int j = 0; j < n; j++)
{
var pro = equ.Props[j];
int byPropType = pro.Type; // use Type as prop type; map via GetItemExtPropType if needed
int val = (pro.Params != null && pro.Params.Length > 0) ? pro.Params[0] : 0;
if (byPropType >= 41 && byPropType <= 44)
iFourPro[byPropType - 41] += val;
else if (byPropType >= 106 && byPropType <= 108)
iFourPro[byPropType - 106] += val;
else if (byPropType >= 95 && byPropType <= 98)
iFourPro[byPropType - 95] += val;
else if (byPropType >= 128 && byPropType <= 131)
{
int[] order = { 3, 0, 1, 2 };
iFourPro[order[byPropType - 128]] += val;
}
}
}
}
return iFourPro;
}
}
/// <summary>Forwards drag on the portrait RawImage to DlgCharacter for rotation.</summary>
public class DlgCharacterPortraitDragReceiver : MonoBehaviour, IBeginDragHandler, IDragHandler
{
private DlgCharacter m_dlg;
public void Init(DlgCharacter dlg) { m_dlg = dlg; }
public void OnBeginDrag(PointerEventData eventData) { }
public void OnDrag(PointerEventData eventData)
{
if (m_dlg != null)
m_dlg.OnPortraitDragDelta(eventData.delta.x);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 72e0e1668d68ee24284bf5db688c27a0
@@ -1,4 +1,5 @@
using System;
using BrewMonster.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
@@ -20,6 +21,12 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
[SerializeField] int cooldownTime;
[SerializeField] AUIClockIcon m_ClockCounter;
private Color m_color = Color.white;
private bool m_bUpdateRenderTarget;
private bool m_bForceDynamicRender;
private AUIDialog m_pParent;
private void Awake()
{
if (skillbutton == null)
@@ -27,6 +34,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
Debug.LogError("Skill Button is not assigned in AUIImagePicture");
}
skillbutton.onClick.AddListener(Execute);
m_pParent = GetComponentInParent<AUIDialog>();
}
public void SetDataPtr(CECShortcut pvData, string strName)
{
@@ -69,6 +77,24 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
skillbutton.interactable = true;
}
public AUIClockIcon GetClockIcon() => m_ClockCounter;
public void SetColor(Color color)
{
if (m_color != color)
UpdateRenderTargert();
m_color = color;
}
private void UpdateRenderTargert()
{
if (!NeedDynamicRender())
m_pParent.UpdateRenderTarget();
}
private bool NeedDynamicRender()
{
return m_bUpdateRenderTarget || m_bForceDynamicRender;
}
}
public struct OpenSkillUIEvent
{
@@ -1,8 +1,10 @@
using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
using BrewMonster.Network;
using BrewMonster.Scripts;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts.Skills;
using BrewMonster.UI;
using CSNetwork.GPDataType;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
@@ -43,6 +45,9 @@ namespace BrewMonster
var a_pszPanel = new List<string>();
GetQuickBarNameAndSC(pHost, a_pszPanel, a_pSCS, nCurPanel9, nCurPanel8);
if (a_pSCS == null || a_pSCS.Count < 2)
return false;
for (int i = 0; i <= 1/*(int)a_pSCS.Count*/; i++)
{
if (a_pSCS[i] == null)
@@ -50,10 +55,10 @@ namespace BrewMonster
/*CDlgQuickBar* pQuickBar = dynamic_cast<CDlgQuickBar*>(GetGameUIMan()->GetDialog(a_pszPanel[i]));
if (!pQuickBar || !pQuickBar->IsShow()) continue;*/
int slotIndex = 0;
for (int j = 0; j < a_pSCS.Count; j++)
int nSlots = Mathf.Min(a_pSCS[i].GetShortcutNum(), AUIImagePictureList.Count);
for (int j = 0; j < nSlots; j++)
{
pCell = AUIImagePictureList[slotIndex];
pCell = AUIImagePictureList[j];
pSC = a_pSCS[i].GetShortcut(j);
pClock = pCell.GetClockIcon();
pClock.SetProgressRange(0, 1);
@@ -194,6 +199,125 @@ namespace BrewMonster
pClock->SetColor(A3DCOLORRGBA(0, 0, 0, 128));
}
}*/
else if(pSC.GetType() == (int)CECShortcut.ShortcutType.SCT_ITEM)
{
iIconFile = (int)EC_GAMEUI_ICONS.ICONS_INVENTORY;
pCell.SetColor(new Color(1f, 1f, 1f));
CECSCItem pSCItem = (CECSCItem)pSC;
EC_Inventory pIvtr = pHost.GetPack(pSCItem.GetInventory());
EC_IvtrItem pItem = pIvtr?.GetItem(pSCItem.GetIvtrSlot());
if (pItem != null)
{
int maxNullable = -1;
int coolTime = pItem.GetCoolTime(out maxNullable);
nMax = maxNullable > 0 ? maxNullable: 0;
if (coolTime > 0)
{
pClock.SetProgressRange(0, nMax);
pClock.SetProgressPos(nMax - coolTime);
pClock.SetColor(new Color32(0, 0, 0, 128));
}
}
//if (pSCItem.GetInventory == InventoryConst.IVTRTYPE_EQUIPPACK)
//{
// pCell.SetColor(new Color(128, 128, 255, 128));
//}
if (pItem != null)
{
string itemIcon = pItem.GetIconFile();
GetGameUIMan().SetCover(pCell, itemIcon, EC_GAMEUI_ICONS.ICONS_INVENTORY);
}
}
//else if(pSC.GetType() == (int)CECShortcut.ShortcutType.SCT_PET)
//{
// // Pet shortcut handling
// CECSCPet pSCPet = (CECSCPet)pSC;
// EC_PetCorral pPetCorral = pHost.GetPetCorral();
// CECPetData pPet = pPetCorral?.GetPetData(pSCPet.GetPetIndex());
// iIconFile = (int)EC_GAMEUI_ICONS.ICONS_INVENTORY;
// //pCell.SetColor(new Color(1f, 1f, 1f)); // RGB(255, 255, 255)
// if (pPet != null)
// {
// // Dead combat pet - grayscale
// if ((pPet.GetClass() == (int)PetClass.GP_PET_CLASS_COMBAT ||
// pPet.GetClass() == (int)PetClass.GP_PET_CLASS_EVOLUTION) &&
// pPet.GetHPFactor() == 0.0f)
// {
// //pCell.SetColor(new Color32(128, 128, 128, 255));
// }
// // Current active pet - yellow highlight
// else if (pSCPet.IsActivePet())
// {
// //pCell.SetColor(new Color32(255, 255, 0, 255));
// }
// }
// // Set pet icon
// if (pPet != null)
// {
// slotIndex++;
// string petIcon = pSCPet.GetIconFile();
// GetGameUIMan().SetCover(pCell, petIcon, EC_GAMEUI_ICONS.ICONS_INVENTORY);
// }
//}
else if(pSC.GetType() == (int)CECShortcut.ShortcutType.SCT_AUTOFASHION)
{
iIconFile = (int)EC_GAMEUI_ICONS.ICONS_SUITE;
int fashionCoolTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_EQUIP_FASHION_ITEM, out int fashionCoolTimeMax);
pCell.SetColor(new Color(1f, 1f, 1f));
if (fashionCoolTimeMax > 0)
{
pClock.SetProgressRange(0, fashionCoolTimeMax);
pClock.SetProgressPos(fashionCoolTimeMax - fashionCoolTime);
pClock.SetColor(new Color32(0, 0, 0, 175));
}
}
else
{
iIconFile = (int)EC_GAMEUI_ICONS.ICONS_ACTION;
if (pSC.GetType() == (int)CECShortcut.ShortcutType.SCT_COMMAND)
{
CECSCCommand pCommandSC = (CECSCCommand)pSC;
if (pHost.IsInvisible())
{
if (pCommandSC.GetCommandID() == (int)CECSCCommand.CommandID.CMD_STARTTRADE ||
pCommandSC.GetCommandID() == (int)CECSCCommand.CommandID.CMD_SELLBOOTH ||
pCommandSC.GetCommandID() == (int)CECSCCommand.CommandID.CMD_BINDBUDDY)
{
pCell.SetColor(new Color(128, 128, 128, 255));
}
else
{
pCell.SetColor(new Color(1f, 1f, 1f));
}
}
else
{
pCell.SetColor(new Color(1f, 1f, 1f));
}
}
nMax = 0;
int cmdCoolTime = pSC.GetCoolTime(ref nMax);
if (cmdCoolTime > 0)
{
pClock.SetProgressRange(0, nMax);
pClock.SetProgressPos(nMax - cmdCoolTime);
pClock.SetColor(new Color32(0, 0, 0, 128));
}
string cmdIcon = pSC.GetIconFile();
GetGameUIMan().SetCover(pCell, cmdIcon, EC_GAMEUI_ICONS.ICONS_ACTION);
}
if (pSC != null)
{
pCell.SetDataPtr(pSC, "ptr_CECShortcut");
@@ -207,7 +331,6 @@ namespace BrewMonster
{
if (pSkill != null)
{
slotIndex++;
//BMLogger.Log("HoangDev: QuickBar Set Skill Icon: " + (uint)pSkill.GetSkillID() + " : " + ElementSkill.GetIcon((uint)pSkill.GetSkillID()));
var nameskill = ElementSkill.GetIcon((uint)pSkill.GetSkillID());
GetGameUIMan().SetCover(pCell, nameskill, EC_GAMEUI_ICONS.ICONS_SKILL);
@@ -11,6 +11,8 @@ namespace BrewMonster
[SerializeField] private int m_iMax;
[SerializeField] private int m_iPos;
private Color m_dwCol;
public Image GetClockIcon() => m_ClockIcon;
public void SetProgressPos(int progress)
{
@@ -36,5 +38,9 @@ namespace BrewMonster
m_ClockIcon.fillAmount = progress;
}
public void SetColor(Color dwCol)
{
m_dwCol = dwCol;
}
}
}
@@ -9,21 +9,21 @@ namespace BrewMonster
public enum IconTaskType
{
QI_NONE = -1,
QI_OUT = 2, // task tu chan (nhan)
QI_IN = 2, // task tu chan (hoan thanh)
QI_OUT_N = 3, // chua du dieu kien nhan task
QI_OUT = 0, // task tu chan (nhan)
QI_IN = 1, // task tu chan (hoan thanh)
QI_OUT_N = 2, // chua du dieu kien nhan task
QI_IN_N = 3, // task nhan nhung chua lam (chua xong)
QI_OUT_K = 0, // chua biet
QI_OUT_K = 4, // chua biet
QI_IN_K = 5, // chua biet
QI_OUT_TYPE1 = 5, // task bang hoi (nhan)
QI_IN_TYPE1 = 5, // task bang hoi (hoan thanh)
QI_OUT_TYPE2 = 1, // chua biet
QI_IN_TYPE2 = 1, // chua biet
QI_OUT_TYPE3 = -1, // task daily (nhan)
QI_IN_TYPE3 = -1, // task daily (hoan thanh)
QI_OUT_TYPE4 = 0, // task chinh (nhan)
QI_IN_TYPE4 = 4, // task chinh (hoan thanh)
QI_OUT_TYPE1 = 6, // task bang hoi (nhan)
QI_IN_TYPE1 = 7, // task bang hoi (hoan thanh)
QI_OUT_TYPE2 = 8, // chua biet
QI_IN_TYPE2 = 9, // chua biet
QI_OUT_TYPE3 = 10, // task daily (nhan)
QI_IN_TYPE3 = 11, // task daily (hoan thanh)
QI_OUT_TYPE4 = 12, // task chinh (nhan)
QI_IN_TYPE4 = 13, // task chinh (hoan thanh)
}
public class UINPC : MonoBehaviour
@@ -1,4 +1,6 @@
using System;
using BrewMonster.Network;
using BrewMonster.UI;
using CSNetwork.GPDataType;
using TMPro;
using UnityEngine;
@@ -17,12 +19,17 @@ namespace BrewMonster
public Image manaImage;
public Image expImage;
[Tooltip("Optional. Assign to make this area open the character dialog on click. If unset, nothing opens.")]
[SerializeField] private Button m_btnOpenCharacter;
public float neededExp;
private void Awake()
{
EventBus.Subscribe<cmd_self_info_00>(UpdateHostPlayerInfoUI);
EventBus.Subscribe<CECHostPlayer.InfoHostPlayer>(UpdateNameHostPlayer);
EventBus.Subscribe<CECHostPlayer.EXPToUpLevel>(UpdateNeededExp);
if (m_btnOpenCharacter != null)
m_btnOpenCharacter.onClick.AddListener(OnOpenCharacterClick);
}
private void OnDestroy()
@@ -52,5 +59,19 @@ namespace BrewMonster
manaImage.fillAmount = (float)obj.iMP / (float)obj.iMaxMP;
expImage.fillAmount = (float)obj.iExp / (float)neededExp;
}
private void OnOpenCharacterClick()
{
var gameUIMan = EC_Game.GetGameRun()?.GetUIManager()?.GetInGameUIMan();
if (gameUIMan == null) return;
var dlg = gameUIMan.GetDialog("Win_Character");
if (dlg == null) return;
if (!dlg.IsShow())
{
UnityGameSession.c2s_SendCmdGetExtProps();
dlg.ResetPoints();
}
dlg.Show(!dlg.IsShow());
}
}
}
@@ -0,0 +1,242 @@
using BrewMonster.Network;
using BrewMonster.Scripts.Skills;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity.VisualScripting;
using static BrewMonster.SkillArrayWrapper;
using UnityEngine;
using BrewMonster.Scripts.Managers;
using UnityEditorInternal.Profiling.Memory.Experimental;
using BrewMonster.Scripts;
namespace BrewMonster
{
// Item shortcut class - represents a shortcut to an inventory item
public class CECSCItem : CECShortcut
{
private int m_iIvtr;
private int m_iSlot;
private int m_tidItem;
private string m_strIconFile;
private bool m_bAutoFind;
// Constructor
public CECSCItem() : base()
{
m_iSCType = (int)ShortcutType.SCT_ITEM;
m_iIvtr = 0;
m_iSlot = 0;
m_tidItem = 0;
m_strIconFile = "";
m_bAutoFind = false;
}
// Copy constructor
public CECSCItem(CECSCItem src) : base()
{
m_iSCType = (int)ShortcutType.SCT_ITEM;
m_iIvtr = src.m_iIvtr;
m_iSlot = src.m_iSlot;
m_tidItem = src.m_tidItem;
m_strIconFile = src.m_strIconFile;
m_bAutoFind = src.m_bAutoFind;
}
// Initialize object
public bool Init(int iIvtr, int iSlot, EC_IvtrItem pItem)
{
m_iIvtr = iIvtr;
m_iSlot = iSlot;
if (pItem != null)
{
m_tidItem = pItem.GetTemplateID();
m_strIconFile = pItem.GetIconFile();
}
else
{
m_tidItem = 0;
m_strIconFile = "";
}
return true;
}
// Clone this shortcut
public override CECShortcut Clone()
{
return new CECSCItem(this);
}
// Execute this shortcut - use the item
public override bool Execute()
{
CECHostPlayer pHost = EC_Game.GetGameRun()?.GetHostPlayer();
if(pHost == null)
return false;
EC_IvtrItem pItem = GetItem();
if (pItem == null)
{
if (m_bAutoFind)
{
if(!AutoFindItem())
return false;
pItem = GetItem();
if(pItem == null)
return false;
}
else
{
return false;
}
}
return pHost.UseItemInPack(m_iIvtr, m_iSlot);
}
public virtual string GetIconFile()
{
return m_strIconFile;
}
public virtual string GetDesc()
{
EC_IvtrItem pItem = GetItem();
if (pItem != null)
{
return pItem.GetDesc();
}
return "";
}
public virtual int GetCoolTime(ref int piMax)
{
EC_IvtrItem pItem = GetItem();
if (pItem != null)
{
int maxNullable = -1;
int result = pItem.GetCoolTime(out maxNullable);
piMax = maxNullable >0 ? maxNullable: 0;
return result;
}
piMax = 0;
return 0;
}
public int GetInventory()
{
return m_iIvtr;
}
public int GetIvtrSlot()
{
return m_iSlot;
}
public int GetItemTID()
{
return m_tidItem;
}
public void MoveItem(int iIvtr, int iSlot)
{
m_iIvtr = iIvtr;
m_iSlot = iSlot;
UpdateItemData();
}
public bool GetAutoFindFlag()
{
return m_bAutoFind;
}
public void SetAutoFindFlag(bool bAutoFind)
{
m_bAutoFind = bAutoFind;
}
// Update item associated data after m_iIvtr or m_iSlot changed
private void UpdateItemData()
{
EC_IvtrItem pItem = GetItem();
if (pItem != null)
{
m_tidItem = pItem.GetTemplateID();
m_strIconFile = pItem.GetIconFile();
}
else
{
m_tidItem = 0;
m_strIconFile = "";
}
}
// Auto find item in all inventory slots by template ID
private bool AutoFindItem()
{
if(m_tidItem == 0)
return false;
CECHostPlayer pHost = EC_Game.GetGameRun()?.GetHostPlayer();
if(pHost == null)
return false;
EC_Inventory pPack = pHost.GetPack(EC_Inventory.Inventory_type.IVTRTYPE_PACK);
if (pPack != null)
{
int iSlot = pPack.FindItem(m_tidItem);
if (iSlot >= 0)
{
m_iIvtr = EC_Inventory.Inventory_type.IVTRTYPE_PACK;
m_iSlot = iSlot;
UpdateItemData();
return true;
}
}
EC_Inventory pEquipPack = pHost.GetPack(EC_Inventory.Inventory_type.IVTRTYPE_EQUIPPACK);
if (pEquipPack != null)
{
int iSlot = pPack.FindItem(m_tidItem);
if (iSlot >= 0)
{
m_iIvtr = InventoryConst.IVTRTYPE_EQUIPPACK;
m_iSlot = iSlot;
UpdateItemData();
return true;
}
}
EC_Inventory pTaskPack = pHost.GetPack(EC_Inventory.Inventory_type.IVTRTYPE_TASKPACK);
if (pTaskPack != null)
{
int iSlot = pPack.FindItem(m_tidItem);
if (iSlot >= 0)
{
m_iIvtr = InventoryConst.IVTRTYPE_TASKPACK;
m_iSlot = iSlot;
UpdateItemData();
return true;
}
}
return false;
}
private EC_IvtrItem GetItem()
{
CECHostPlayer pHost = EC_Game.GetGameRun()?.GetHostPlayer();
if(pHost == null)
return null;
EC_Inventory pIvtr = pHost.GetPack(m_iIvtr);
if (pIvtr == null)
return null;
return pIvtr.GetItem(m_iSlot);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 05cde8ef04e79fd449fdb73d3f3fdc0f
@@ -0,0 +1,197 @@
using BrewMonster.Assets.PerfectWorld.Scripts.Players;
using BrewMonster.Network;
using BrewMonster.Scripts;
using BrewMonster.Scripts.Managers;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
namespace BrewMonster
{
/// <summary>
/// Pet shortcut for quick summoning/recalling pets
/// </summary>
public class CECSCPet : CECShortcut
{
/*#region Fields
private int m_iPetIndex = -1; // Pet index in pet corral
private PET_ESSENCE m_pPetEssence; // Pet essence data
private bool m_bHasEssence = false; // Whether the pet essence has been loaded
#endregion
#region Constructors
/// <summary>
/// Default constructor
/// </summary>
public CECSCPet()
{
m_iSCType = (int)ShortcutType.SCT_PET;
m_iPetIndex = -1;
m_bHasEssence = false;
}
/// <summary>
/// Copy constructor
/// </summary>
/// <param name="src">Source pet shortcut to copy from</param>
public CECSCPet(CECSCPet src)
{
m_iSCType = src.m_iSCType;
m_iPetIndex = src.m_iPetIndex;
m_pPetEssence = src.m_pPetEssence;
m_bHasEssence = src.m_bHasEssence;
}
#endregion
#region Initialization
/// <summary>
/// Initialize the pet shortcut with a pet index
/// </summary>
/// <param name="iPetIndex">Index of the pet in the pet corral</param>
/// <returns>True if initialization succeeded</returns>
public bool Init(int iPetIndex)
{
CECHostPlayer pHost = EC_Game.GetGameRun()?.GetHostPlayer();
if (pHost == null)
return false;
EC_PetCorral pPetCorral = pHost.GetPetCorral();
if (pPetCorral == null)
return false;
//CECPetData pPet = pPetCorral.GetPetData(iPetIndex);
if (pPet == null)
return false;
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
if (pDB == null)
return false;
DATA_TYPE dataType = DATA_TYPE.DT_INVALID;
object essenceObj = pDB.get_data_ptr((uint)pPet.GetTemplateID(), ID_SPACE.ID_SPACE_ESSENCE, ref dataType);
if (essenceObj == null || !(essenceObj is PET_ESSENCE))
return false;
m_pPetEssence = (PET_ESSENCE)essenceObj;
m_bHasEssence = true;
m_iPetIndex = iPetIndex;
return true;
}
#endregion
#region CECShortcut Overrides
/// <summary>
/// Clone this pet shortcut
/// </summary>
/// <returns>A new instance with the same data</returns>
public override CECShortcut Clone()
{
return new CECSCPet(this);
}
/// <summary>
/// Execute the pet shortcut - summon or recall the pet
/// </summary>
/// <returns>True if execution succeeded</returns>
public override bool Execute()
{
if (m_iPetIndex < 0)
return false;
CECHostPlayer pHost = EC_Game.GetGameRun()?.GetHostPlayer();
if (pHost == null)
return false;
EC_PetCorral pPetCorral = pHost.GetPetCorral();
if (pPetCorral == null)
return false;
//if (pPetCorral.GetActivePetIndex() == m_iPetIndex)
//{
// // If this pet is the active one, recall it
// pHost.RecallPet();
//}
else
{
// Check action switcher for fly-to-ride transition
CECActionSwitcherBase pSwitcher = pHost.GetActionSwitcher();
//if (pSwitcher != null && pSwitcher.OnFlyToRideAction(m_iPetIndex))
//{
// return true;
//}
// Summon this pet
//pHost.SummonPet(m_iPetIndex);
}
return true;
}
/// <summary>
/// Get the icon file path for this pet
/// </summary>
/// <returns>Icon file path</returns>
//public override string GetIconFile()
//{
// return m_pPetEssence?.file_icon ?? string.Empty;
//}
/// <summary>
/// Get the description text for this pet
/// </summary>
/// <returns>Pet description</returns>
//public override string GetDesc()
//{
// // TODO: Implement pet description retrieval
//}
#endregion
#region Public Methods
/// <summary>
/// Check if this pet is currently active
/// </summary>
/// <returns>True if this pet is the active pet</returns>
//public bool IsActivePet()
//{
// EC_PetCorral pPetCorral = EC_Game.GetGameRun()?.GetHostPlayer()?.GetPetCorral();
// if (pPetCorral == null)
// return false;
// return pPetCorral.GetActivePetIndex() == m_iPetIndex;
//}
#endregion
#region Properties
/// <summary>
/// Get the pet index in pet corral
/// </summary>
/// <returns>Pet index</returns>
public int GetPetIndex()
{
return m_iPetIndex;
}
/// <summary>
/// Get the pet essence data
/// </summary>
/// <returns>Pet essence</returns>
public PET_ESSENCE GetPetEssence()
{
return m_pPetEssence;
}
#endregion*/
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0c1e98ce7d055204587eff3f6438ddc3
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 KiB

@@ -1,153 +0,0 @@
fileFormatVersion: 2
guid: 4276d7122cfaf624f8aa32336fc90f1c
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: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask1_0
rect:
serializedVersion: 2
x: 201
y: 163
width: 618
height: 700
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 3577b54168afc5242a9c02dce91f1260
internalID: 1049366989
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 16fc5ffd47ee2f1429eb79e647db644d
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask1_0: 1049366989
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@@ -0,0 +1,452 @@
fileFormatVersion: 2
guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1
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: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: taskIcon_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 29
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: c401c9872acf67a4d9a4f965415028a8
internalID: -1053361621
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_1
rect:
serializedVersion: 2
x: 31
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: c90f356087dae5f4b8468fdf2b5b4048
internalID: -263451151
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_2
rect:
serializedVersion: 2
x: 59
y: 0
width: 30
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 1011305479898d04296342f6319a54f7
internalID: 258506963
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_3
rect:
serializedVersion: 2
x: 91
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e73cd2beb28042b4f9b8cdba1fb2f33f
internalID: -2063219569
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_4
rect:
serializedVersion: 2
x: 119
y: 0
width: 30
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 7cef2e9b688fecf4fbee080e5dca3c35
internalID: -2122663845
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_5
rect:
serializedVersion: 2
x: 151
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 3090b71a3c7a95b4d9e457d465e4dddf
internalID: 1945827619
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_6
rect:
serializedVersion: 2
x: 179
y: 0
width: 30
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: bf71aa70e1051b9419dbea554d8e5c06
internalID: -1771957928
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_7
rect:
serializedVersion: 2
x: 211
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 5e9918f9fbffd3344a5bcd47c8f7aa72
internalID: -1558989898
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_8
rect:
serializedVersion: 2
x: 239
y: 0
width: 30
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 70fee8d291fccc54fb7ed9319313e7e8
internalID: 1189468312
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_9
rect:
serializedVersion: 2
x: 271
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 25f6ef50cffd11e40b4068f35e8099e7
internalID: 1077363315
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_10
rect:
serializedVersion: 2
x: 299
y: 0
width: 30
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: a9e5ccebcfe1de44abed45c34e37fa26
internalID: 1705495320
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_11
rect:
serializedVersion: 2
x: 331
y: 1
width: 27
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: fc138257c35f281499c3ac6c8c1947ef
internalID: 536497386
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_12
rect:
serializedVersion: 2
x: 360
y: 0
width: 29
height: 30
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: db8754701d3c56746b2dec56a980c3e2
internalID: -440769636
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: taskIcon_13
rect:
serializedVersion: 2
x: 391
y: 1
width: 29
height: 28
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: f8e2be44c29dc1c4a8319efa5759364b
internalID: 844877792
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: a8dc53b3ed0f48c419abbeca24c1c1b6
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
taskIcon_0: -1053361621
taskIcon_1: -263451151
taskIcon_10: 1705495320
taskIcon_11: 536497386
taskIcon_12: -440769636
taskIcon_13: 844877792
taskIcon_2: 258506963
taskIcon_3: -2063219569
taskIcon_4: -2122663845
taskIcon_5: 1945827619
taskIcon_6: -1771957928
taskIcon_7: -1558989898
taskIcon_8: 1189468312
taskIcon_9: 1077363315
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -1,7 +1,10 @@
fileFormatVersion: 2
guid: 13278f4394269834cb244620cd66c803
guid: b404da7f8f4b96f459d1c8caa65f7cf8
TextureImporter:
internalIDToNameTable: []
internalIDToNameTable:
- first:
213: 7482667652216324306
second: Square
externalObjects: {}
serializedVersion: 13
mipmaps:
@@ -39,7 +42,7 @@ TextureImporter:
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
@@ -48,12 +51,12 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spritePixelsToUnits: 256
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
spriteTessellationDetail: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
@@ -65,7 +68,7 @@ TextureImporter:
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
@@ -93,6 +96,19 @@ TextureImporter:
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: iOS
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
@@ -110,13 +126,13 @@ TextureImporter:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: iconTask3_0
name: Square
rect:
serializedVersion: 2
x: 154
y: 231
width: 632
height: 655
x: 0
y: 0
width: 256
height: 256
alignment: 0
pivot: {x: 0.5, y: 0.5}
border: {x: 0, y: 0, z: 0, w: 0}
@@ -125,17 +141,21 @@ TextureImporter:
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 252520bbad7c9374e90d1c950b8482d6
internalID: 1481922406
spriteID: 2d009a6b596c7d760800000000000000
internalID: 7482667652216324306
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
physicsShape:
- - {x: -128, y: 128}
- {x: -128, y: -128}
- {x: 128, y: -128}
- {x: 128, y: 128}
bones: []
spriteID: fdab89333c5e8344e98af4bef992c422
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
@@ -145,7 +165,7 @@ TextureImporter:
spriteCustomMetadata:
entries: []
nameFileIdTable:
iconTask3_0: 1481922406
Square: 7482667652216324306
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+14 -6
View File
@@ -363,12 +363,20 @@ MonoBehaviour:
_healthImage: {fileID: 0}
_iconTaskMain: {fileID: 5100466107490290627}
_listIconTask:
- {fileID: 1049366989, guid: 4276d7122cfaf624f8aa32336fc90f1c, type: 3}
- {fileID: -61588767, guid: 454cf3e89d0aaa54b9c60ca081ff5f46, type: 3}
- {fileID: 1481922406, guid: 13278f4394269834cb244620cd66c803, type: 3}
- {fileID: 799372409, guid: f666d782d2b84fa48912bb3166f214aa, type: 3}
- {fileID: 1342343447, guid: c27a0fab8aef4d74787fe56595601d9f, type: 3}
- {fileID: 1458661374, guid: 6deb3d497e3c2a44cb875be0f13bbf36, type: 3}
- {fileID: -1053361621, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -263451151, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 258506963, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -2063219569, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -2122663845, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 1945827619, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -1771957928, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -1558989898, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 1189468312, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 1077363315, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 1705495320, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 536497386, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: -440769636, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
- {fileID: 844877792, guid: 75fb3bbb7c9421e4d8bf0728cf2b59b1, type: 3}
--- !u!1 &6510845919681767284
GameObject:
m_ObjectHideFlags: 0
+178
View File
@@ -1,6 +1,7 @@
using BrewMonster;
using BrewMonster.Network;
using BrewMonster.Scripts;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts.World;
using BrewMonster.UI;
using CSNetwork;
@@ -46,6 +47,8 @@ public partial class CECGameRun
static RoleInfo l_SelRoleInfo; // Selected character's role info.
private int m_iDExpEndTime = 0;
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void AfterSceneLoad()
@@ -525,4 +528,179 @@ public partial class CECGameRun
}
return szRet;
}
/// <summary>
/// Add a fixed message to chat system with optional formatting parameters
/// 添加固定消息到聊天系统,支持可选的格式化参数
/// </summary>
/// <param name="iMsg">Fixed message ID / 固定消息ID</param>
/// <param name="args">Optional formatting arguments / 可选的格式化参数</param>
public void AddFixedMessage(int iMsg, params object[] args)
{
CECStringTab pStrTab = EC_Game.GetFixedMsgs();
if (pStrTab == null)
{
Debug.LogWarning("[AddFixedMessage] Failed to get fixed message table");
return;
}
string szFixMsg = pStrTab.GetWideString(iMsg);
if (string.IsNullOrEmpty(szFixMsg))
{
Debug.LogWarning($"[AddFixedMessage] Fixed message {iMsg} not found");
return;
}
// Format the message with provided arguments
string szFormattedMsg;
try
{
if (args != null && args.Length > 0)
{
szFormattedMsg = string.Format(szFixMsg, args);
}
else
{
szFormattedMsg = szFixMsg;
}
}
catch (System.FormatException ex)
{
Debug.LogError($"[AddFixedMessage] Format error for message {iMsg}: {ex.Message}");
szFormattedMsg = szFixMsg; // Use unformatted message as fallback
}
// Try to add to in-game UI chat
CECGameUIMan pGameUI = m_pUIManager?.GetInGameUIMan();
if (pGameUI != null)
{
//pGameUI.AddChatMessage(szFormattedMsg, (int)GP_CHAT.GP_CHAT_SYSTEM);
}
else
{
// Fallback to debug output if UI is not available
Debug.Log($"[System] {szFormattedMsg}");
}
}
/// <summary>
/// Add a fixed message to specific chat channel with optional formatting
/// 添加固定消息到指定聊天频道,支持可选的格式化
/// </summary>
/// <param name="iMsg">Fixed message ID / 固定消息ID</param>
/// <param name="cChannel">Chat channel ID / 聊天频道ID</param>
/// <param name="args">Optional formatting arguments / 可选的格式化参数</param>
public void AddFixedChannelMsg(int iMsg, int cChannel, params object[] args)
{
CECStringTab pStrTab = EC_Game.GetFixedMsgs();
if (pStrTab == null)
{
Debug.LogWarning("[AddFixedChannelMsg] Failed to get fixed message table");
return;
}
string szFixMsg = pStrTab.GetWideString(iMsg);
if (string.IsNullOrEmpty(szFixMsg))
{
Debug.LogWarning($"[AddFixedChannelMsg] Fixed message {iMsg} not found");
return;
}
// Format the message with provided arguments
string szFormattedMsg;
try
{
if (args != null && args.Length > 0)
{
szFormattedMsg = string.Format(szFixMsg, args);
}
else
{
szFormattedMsg = szFixMsg;
}
}
catch (System.FormatException ex)
{
Debug.LogError($"[AddFixedChannelMsg] Format error for message {iMsg}: {ex.Message}");
szFormattedMsg = szFixMsg; // Use unformatted message as fallback
}
// Try to add to in-game UI chat with specific channel
CECGameUIMan pGameUI = m_pUIManager?.GetInGameUIMan();
if (pGameUI != null)
{
//pGameUI.AddChatMessage(szFormattedMsg, cChannel);
}
else
{
// Fallback to debug output if UI is not available
Debug.Log($"[Channel {cChannel}] {szFormattedMsg}");
}
}
/// <summary>
/// Add a chat message with full parameters (matching C++ signature)
/// 添加聊天消息(完整参数版本,匹配C++签名)
/// </summary>
/// <param name="pszMsg">Message text / 消息文本</param>
/// <param name="cChannel">Chat channel / 聊天频道</param>
/// <param name="idPlayer">Player ID (default -1) / 玩家ID</param>
/// <param name="szName">Player name (optional) / 玩家名称</param>
/// <param name="byFlag">Message flag (default 0) / 消息标志</param>
/// <param name="cEmotion">Emotion ID (default 0) / 表情ID</param>
/// <param name="pItem">Related item (optional) / 相关物品</param>
/// <param name="pszMsgOrigion">Original message (optional) / 原始消息</param>
public void AddChatMessage(string pszMsg, int cChannel, int idPlayer = -1,
string szName = null, byte byFlag = 0, int cEmotion = 0,
EC_IvtrItem pItem = null, string pszMsgOrigion = null)
{
if (string.IsNullOrEmpty(pszMsg))
return;
CECGameUIMan pGameUI = m_pUIManager?.GetInGameUIMan();
if (pGameUI != null)
{
// Call UI manager's AddChatMessage with full parameters
//pGameUI.AddChatMessage(pszMsg, cChannel, idPlayer, szName, byFlag, cEmotion, pItem, pszMsgOrigion);
}
else
{
// Fallback to debug output if UI is not available
Debug.Log($"[Channel {cChannel}] {pszMsg}");
// Note: In C++ original, pItem is deleted here if UI is not available
// In C#, we don't need explicit deletion due to garbage collection
}
}
/// <summary>
/// Get remaining double experience time in seconds
/// 获取剩余双倍经验时间(秒)
/// </summary>
public int GetRemainDblExpTime()
{
int iRemainTime = m_iDExpEndTime - GetServerAbsTime();
if (iRemainTime < 0) iRemainTime = 0;
return iRemainTime;
}
/// <summary>
/// Get server absolute time
/// 获取服务器绝对时间
/// </summary>
public int GetServerAbsTime()
{
// TODO: Implement server time synchronization
// This should return the synchronized server timestamp
return (int)(System.DateTime.UtcNow.Subtract(new System.DateTime(1970, 1, 1))).TotalSeconds;
}
/// <summary>
/// Set double experience end time
/// 设置双倍经验结束时间
/// </summary>
public void SetDExpEndTime(int endTime)
{
m_iDExpEndTime = endTime;
}
}
+543 -7
View File
@@ -49,6 +49,7 @@ namespace BrewMonster
public bool m_bPrepareFight = false; // true, prepare to fight
private int m_iJumpCount = 0;
private bool m_bJumpInWater = false;
private int m_iMoveEnv;
public A3DVECTOR3 m_vVelocity; // Velocity
@@ -565,6 +566,8 @@ namespace BrewMonster
break;
case int value when value == EC_MsgDef.MSG_HST_SELTARGET:
OnMsgHstSelTarget(Msg); break;
case int value when value == EC_MsgDef.MSG_HST_USEITEM:OnMsgHstUseItem(Msg);
break;
case int value when value == EC_MsgDef.MSG_HST_ATKRESULT: OnMsgHstAttackResult(Msg); break;
case int value when value == EC_MsgDef.MSG_HST_ATTACKED: OnMsgHstAttacked(Msg); break;
case int value when value == EC_MsgDef.MSG_HST_HURTRESULT: OnMsgHstHurtResult(Msg); break;
@@ -678,8 +681,9 @@ namespace BrewMonster
COOLTIME ct = m_aCoolTimes[pCmd.cooldown_index];
ct.iCurTime = pCmd.cooldown_time;
ct.iMaxTime = pCmd.cooldown_time;
Debug.Log("New Max cool time forIvtrMedicine: it be: " + pCmd.cooldown_time);
Math.Min(ct.iCurTime, ct.iMaxTime);
m_aCoolTimes[pCmd.cooldown_index] = ct;
if (pCmd.cooldown_index == (int)CoolTimeIndex.GP_CT_CAST_ELF_SKILL)
{
int i;
@@ -707,7 +711,7 @@ namespace BrewMonster
CECSkill pSkill = GetPositiveSkillByIndex(i);
int fakeRef = 0;
if (pSkill != null && (pSkill.GetCommonCoolDown() & mask) != 0)
pSkill.StartCooling(GetCoolTime(pCmd.cooldown_index, ref fakeRef), GetCoolTime(pCmd.cooldown_index, ref fakeRef));
pSkill.StartCooling(GetCoolTime(pCmd.cooldown_index, out fakeRef), GetCoolTime(pCmd.cooldown_index, out fakeRef));
}
/*const std::map<unsigned int, CECSkill*>&inherentSkillMap = CECComboSkillState::Instance().GetInherentSkillMap();
std::map < unsigned int, CECSkill*>::const_iterator it;
@@ -3415,6 +3419,12 @@ namespace BrewMonster
return m_iJumpCount > 0;
}
public bool IsFalling()
{
return m_iMoveEnv == (int)MoveEnvironment.MOVEENV_GROUND
&& m_GndInfo.bOnGround == false;
}
public bool IsPlayingAction(int iAction)
{
if (iAction == (int)PLAYER_ACTION_TYPE.ACT_WALK) //&& _playerStateMachine.State is PlayerMoveState
@@ -6092,13 +6102,13 @@ namespace BrewMonster
}
// Get cool time
public int GetCoolTime(int iIndex, ref int piMax /* NULL */)
public virtual int GetCoolTime(int iIndex, out int piMax /* NULL */)
{
piMax = 1;
if (iIndex >= 0 && iIndex < (int)CoolTimeIndex.GP_CT_MAX)
{
if (piMax > 0)
piMax = m_aCoolTimes[iIndex].iMaxTime;
return m_aCoolTimes[iIndex].iCurTime;
}
@@ -6981,7 +6991,7 @@ namespace BrewMonster
}
return iItemCnt;
}
bool CanUseEquipment(EC_IvtrEquip pEquip, ref int piReason)
public bool CanUseEquipment(EC_IvtrEquip pEquip, ref int piReason)
{
int iReason = 0;
if(pEquip == null)
@@ -7063,8 +7073,6 @@ namespace BrewMonster
return m_pPetCorral;
}
// Get key object(NPC..) coordinates
public A3DVECTOR3 GetObjectCoordinates(int idTarget,ref ObjectCoords TargetCoord, ref bool bInTable)
{
@@ -7152,6 +7160,534 @@ namespace BrewMonster
}
return false;
}
public bool UseItemInPack(int iPack, int iSlot, bool showMsg = true)
{
if(!CanDo(ActionCanDo.CANDO_USEITEM))
return false;
EC_Inventory pPack = GetPack(iPack);
if (pPack == null)
return false;
EC_IvtrItem pItem = pPack.GetItem(iSlot);
if (pItem == null || pItem.IsFrozen())
return false;
if(pItem.Use_Persist() && (IsJumping() || IsFalling()))
return false;
CECGameRun pGameRun = EC_Game.GetGameRun();
//CECGameSession pSession = g_pGame.GetGameSession();
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_TRANSMITSCROLL)
{
CECGameUIMan pGameUI = pGameRun.GetUIManager().GetInGameUIMan();
if (pGameUI != null && !IsFighting())
{
// TODO: Implement travel map dialog
}
return true;
}
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_TARGETITEM)
{
EC_IvtrTargetItem pTargetItem = pItem as EC_IvtrTargetItem;
if(pTargetItem == null)
return false;
var essence = pTargetItem.GetDBEssence();
if(!pTargetItem.IsEssenceLoaded())
return false;
if (IsFighting() && essence.use_in_combat == 0)
{
if (showMsg)
if (showMsg) pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_CANNOT_USE_IN_BATTLE);
return false;
}
if (pTargetItem.GetDBEssence().use_in_sanctuary_only != 0 && !IsInSanctuary())
{
if (showMsg)
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_USE_IN_SANCTUARY_ONLY);
return false;
}
int iCurrMap = pGameRun.GetWorld().GetInstanceID();
if (pTargetItem.GetDBEssence().num_area != 0)
{
bool found = false;
for (int i = 0; i < pTargetItem.GetDBEssence().num_area; i++)
{
if (pTargetItem.GetDBEssence().area_id[i] == iCurrMap)
{
found = true;
break;
}
}
if (!found)
{
if(showMsg)
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_CANNOT_USE_IN_CURR_MAP);
return false;
}
}
if(!CanDo(ActionCanDo.CANDO_SPELLMAGIC))
return false;
if (InSlidingState())
return false;
if (m_idSelTarget == 0)
return false;
CECSkill pSkill = pTargetItem.GetTargetSkill();
if (pSkill == null)
return false;
if (IsSpellingMagic() && m_pCurSkill != null && m_pCurSkill.IsCharging() &&
m_pCurSkill.GetSkillID() == pSkill.GetSkillID())
{
m_pCurSkill.EndCharging();
UnityGameSession.c2s_SendCmdContinueAction();
return true;
}
int iCon = CheckSkillCastCondition(pSkill);
if (iCon != 0)
{
if (showMsg)
ProcessSkillCondition(iCon);
return false;
}
bool bForceAttack = glb_GetForceAttackFlag(0);
if (pSkill.GetType() == (int)CECSkill.SkillType.TYPE_ATTACK ||
pSkill.GetType() == (int)CECSkill.SkillType.TYPE_CURSE)
{
if (m_idSelTarget == m_PlayerInfo.cid)
{
if (showMsg)
pGameRun.AddFixedChannelMsg((int)FixedMsg.FIXMSG_TARGETWRONG, (int)ChatChannel.GP_CHAT_FIGHT);
return false;
}
else if (m_idSelTarget != 0)
{
if (AttackableJudge(m_idSelTarget, bForceAttack) != 1)
return false;
}
}
int idCastTarget = m_idSelTarget;
int iTargetType = pSkill.GetTargetType();
if (pSkill.GetType() == (int)CECSkill.SkillType.TYPE_BLESS ||
pSkill.GetType() == (int)CECSkill.SkillType.TYPE_NEUTRALBLESS)
{
if(iTargetType == 0 || !GPDataTypeHelper.ISPLAYERID(m_idSelTarget))
idCastTarget = m_PlayerInfo.cid;
if (GPDataTypeHelper.ISPLAYERID(idCastTarget) && idCastTarget != m_PlayerInfo.cid)
{
byte byBLSMask = EC_Utility.glb_BuildBLSMask();
if (pSkill.GetRangeType() == (int)CECSkill.RangeType.RANGE_POINT)
{
if (!IsTeamMember(idCastTarget))
{
if ((byBLSMask & (byte)PVPMask.GP_BLSMASK_SELF) != 0)
{
idCastTarget = m_PlayerInfo.cid;
}
else
{
EC_ElsePlayer pPlayer = EC_ManMessageMono.Instance.GetECManPlayer.GetElsePlayer(idCastTarget) as EC_ElsePlayer;
if(pPlayer == null)
return false;
if (pPlayer.IsInvader() || pPlayer.IsPariah())
{
if((byBLSMask & (byte)PVPMask.GP_BLSMASK_NORED) != 0)
idCastTarget = m_PlayerInfo.cid;
}
if (!IsFactionMember(pPlayer.GetFactionID()))
{
if ((byBLSMask & (byte)PVPMask.GP_BLSMASK_NOMAFIA) != 0)
idCastTarget = m_PlayerInfo.cid;
}
if (!IsFactionAllianceMember(pPlayer.GetFactionID()))
{
if((byBLSMask & (byte)PVPMask.GP_BLSMASK_NOALLIANCE) != 0)
idCastTarget = m_PlayerInfo.cid;
}
if (GetForce() != pPlayer.GetForce())
{
if((byBLSMask & (byte)PVPMask.GP_BLSMASK_NOFORCE) != 0)
idCastTarget = m_PlayerInfo.cid;
}
}
}
}
// If host is in dule
if(IsInDuel() && m_idSelTarget == m_pvp.idDuelOpp)
idCastTarget = m_PlayerInfo.cid;
// If host is in battle
if (IsInBattle())
{
EC_ElsePlayer pPlayer = EC_ManMessageMono.Instance.GetECManPlayer.GetElsePlayer(idCastTarget);
if (!InSameBattleCamp(pPlayer))
idCastTarget = m_PlayerInfo.cid;
}
}
}
if (iTargetType != 0)
{
int iAliveFlag = 0;
if (iTargetType == 1)
iTargetType = 1;
else if (iTargetType == 2)
iTargetType = 2;
CECObject pObject = EC_ManMessageMono.Instance.GetObject(idCastTarget, iAliveFlag);
if(pObject == null)
return false;
}
if (!IsMeleeing() && !IsSpellingMagic() &&
(iTargetType == 0 || idCastTarget == m_PlayerInfo.cid))
{
if(!pSkill.ReadyToCast())
return false;
if (!pSkill.IsInstant() && pSkill.GetType() != (int)CECSkill.SkillType.TYPE_FLASHMOVE)
{
// TODO: Implement NaturallyStopMoving
//if (!NaturallyStopMoving())
// return false;
}
else if (pSkill.GetType() == (int)CECSkill.SkillType.TYPE_FLASHMOVE)
{
if(!CanDo(ActionCanDo.CANDO_FLASHMOVE))
return false;
}
m_pPrepSkill = pSkill;
}
else if (IsSpellingMagic() && m_pCurSkill == pSkill && !pSkill.ReadyToCast())
{
return false;
}
}
if (pItem.IsEquipment())
{
if (iPack == Inventory_type.IVTRTYPE_EQUIPPACK)
{
// Take off equipment
int iEmpty = m_pPack.SearchEmpty();
if (iEmpty < 0)
return false;
UnityGameSession.RequestEquipItemAsync((byte)iEmpty, (byte)iSlot, null);
return true;
}
EC_IvtrEquip pEquip = pItem as EC_IvtrEquip;
if(pEquip == null)
return false;
int iReason = 0;
if(!CanUseEquipment(pEquip, ref iReason))
return false;
int iFirstFree = -1, iFirstCan = -1;
for (int i = 0; i < InventoryConst.SIZE_ALL_EQUIPIVTR; i++)
{
if (pItem.CanEquippedTo(i))
{
if (iFirstCan < 0)
iFirstCan = i;
if (m_pEquipPack.GetItem(i) == null && iFirstFree < 0)
{
iFirstFree = i;
break;
}
}
}
int iDst;
if (iFirstFree >= 0)
iDst = iFirstFree;
else if (iFirstCan >= 0)
iDst = iFirstCan;
else
{
Debug.Assert(false);
return false;
}
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_ARROW ||
pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_DYNSKILLEQUIP)
{
EC_IvtrItem pDstItem = m_pEquipPack.GetItem(iDst);
if (pDstItem == null || pItem.GetTemplateID() != pDstItem.GetTemplateID())
UnityGameSession.RequestEquipItemAsync((byte)iSlot, (byte)iDst, null);
else
{
//UnityGameSession.c2s_CmdMoveItemToEquip((byte)iSlot, (byte)iDst);
}
}
else
{
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_GENERALCARD)
{
//TODO: Add general card equip request
}
UnityGameSession.RequestEquipItemAsync((byte)iSlot, (byte)iDst, null);
}
return true;
}
if(iPack != Inventory_type.IVTRTYPE_PACK)
return false;
if (!pItem.CheckUseCondition())
{
if (showMsg)
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_ITEM_CANNOTUSE);
return false;
}
int piMax = -1;
if (pItem.GetCoolTime(out piMax) > 0)
{
if (showMsg)
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_ITEM_INCOOLTIME);
return false;
}
if (pItem.Use_AtkTarget() || pItem.Use_Target())
{
if(pItem.Use_AtkTarget() && CannotAttack())
return false;
if (m_idSelTarget == 0 || m_idSelTarget == m_PlayerInfo.cid)
{
if (showMsg)
{
CECStringTab pStrTab = EC_Game.GetFixedMsgs();
pGameRun.AddChatMessage(pStrTab.GetWideString((int)FixedMsg.FIXMSG_NOTARGET), (int)ChatChannel.GP_CHAT_SYSTEM);
}
return false;
}
float fAattackRange = 10000.0f;
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_TOSSMAT)
{
EC_IvtrTossMat pTossMat = pItem as EC_IvtrTossMat;
if (pTossMat != null)
fAattackRange = pTossMat.GetDBEssence().attack_range;
}
else if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_TANKCALLIN)
{
fAattackRange = 5.0f;
}
else if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_TARGETITEM)
{
EC_IvtrTargetItem pTargetItem = pItem as EC_IvtrTargetItem;
if (pTargetItem != null && pTargetItem.GetTargetSkill() != null)
{
fAattackRange = pTargetItem.GetTargetSkill().GetCastRange(m_ExtProps.ak.AttackRange, GetPrayDistancePlus());
}
}
float fDist = 0, fTargetRag = 0;
CECObject pObject = null;
//if (CalcDist(m_idSelTarget, ref fDist, ref pObject))
//{
// return false;
//}
if (GPDataTypeHelper.ISNPCID(m_idSelTarget))
{
CECNPC pNPC = pObject as CECNPC;
if (pNPC != null)
fTargetRag = pNPC.GetTouchRadius();
}
else if (GPDataTypeHelper.ISPLAYERID(m_idSelTarget))
{
EC_ElsePlayer pPlayer = pObject as EC_ElsePlayer;
if(pPlayer != null)
fTargetRag = pPlayer.GetTouchRadius();
}
if (fDist - fTargetRag > fAattackRange * 0.8f)
{
if (showMsg)
{
CECStringTab pStrTab = EC_Game.GetFixedMsgs();
pGameRun.AddChatMessage(pStrTab.GetWideString((int)FixedMsg.FIXMSG_TARGETISFAR), (int)ChatChannel.GP_CHAT_SYSTEM);
}
return false;
}
byte byPVPMask = glb_BuildPVPMask(glb_GetForceAttackFlag(0));
UnityGameSession.c2s_SendCmdUseItemWithTarget((byte)iPack, (byte)iSlot, pItem.GetTemplateID(), byPVPMask);
}
else
{
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_DOUBLEEXP)
{
EC_IvtrDoubleExp pDoubleExp = pItem as EC_IvtrDoubleExp;
if (pDoubleExp != null)
{
if (pDoubleExp.GetDBEssence().double_exp_time + pGameRun.GetRemainDblExpTime() > 3600 * 4)
{
if (showMsg)
{
CECGameUIMan pGameUI = pGameRun.GetUIManager().GetInGameUIMan();
}
return false;
}
}
}
if (pItem.GetClassID() == (int)EC_IvtrItem.InventoryClassId.ICID_SHARPENER)
{
if (showMsg)
pGameRun.AddFixedMessage((int)FixedMsg.FIXMSG_SHARPEN_ON_DRAG);
return false;
}
UnityGameSession.c2s_SendCmdUseItem((byte)iPack, (byte)iSlot, pItem.GetTemplateID(), 1);
}
return true;
}
private void OnMsgHstUseItem(ECMSG Msg)
{
cmd_host_use_item pCmd = GPDataTypeHelper.FromBytes<cmd_host_use_item>((byte[])Msg.dwParam1);
EC_Inventory pPack = GetPack(pCmd.byPackage);
if (pPack == null)
{
Debug.LogError("[OnMsgHstUseItem] Pack not found");
return;
}
EC_IvtrItem pItem = pPack.GetItem(pCmd.bySlot, false);
if (pItem == null || pItem.GetTemplateID() != pCmd.item_id)
{
Debug.LogError($"[OnMsgHstUseItem] Item mismatch at slot {pCmd.bySlot}");
return;
}
pItem.Use();
if (pCmd.use_count > 0)
{
bool removed = pPack.RemoveItem(pCmd.bySlot, pCmd.use_count);
if (removed)
{
if (pPack.GetItem(pCmd.bySlot, false) == null)
{
Debug.Log($"[OnMsgHstUseItem] Item {pCmd.item_id} removed from slot {pCmd.bySlot}");
}
}
else
{
Debug.LogError($"[OnMsgHstUseItem] Failed to remove item {pCmd.item_id} from slot {pCmd.bySlot}");
}
var ui = GameObject.FindFirstObjectByType<EC_InventoryUI>();
if (ui != null)
{
ui.RefreshAll();
ui.UpdateCooldownOverlays();
}
else
{
Debug.LogError("[OnMsgHstUseItem] EC_InventoryUI not found, UI may not update");
}
}
if (m_pWorkMan != null)
{
CECHPWork pWork = m_pWorkMan.GetRunningWork(Host_work_ID.WORK_USEITEM);
if (pWork is CECHPWorkUse useWork)
{
if(useWork.GetItem() == pCmd.item_id)
{
m_pWorkMan.FinishRunningWork(Host_work_ID.WORK_USEITEM);
}
}
}
}
/// <summary>
/// Calculate distance to an object and optionally retrieve the object reference
/// 计算到对象的距离,并可选地获取对象引用
/// </summary>
/// <param name="idObject">Target object ID / 目标对象ID</param>
/// <param name="pfDist">Output distance / 输出距离</param>
/// <param name="ppObject">Output object reference (optional) / 输出对象引用(可选)</param>
/// <returns>True if calculation succeeded / 计算成功返回true</returns>
//public bool CalcDist(int idObject, ref float pfDist, out CECObject ppObject)
//{
// ppObject = null;
// if (idObject == 0 || idObject == m_PlayerInfo.cid)
// return false;
// CECObject pObject = CECGameRun.Instance.GetWorld()?.GetObject(idObject, 1);
// if (pObject == null)
// return false;
// ppObject = pObject;
// float fDist = 0.0f;
// if (ISNPCID(idObject))
// {
// CECNPC pNPC = (CECNPC)pObject;
// fDist = pNPC.CalcDist(GetPos(), true);
// }
// else if (ISPLAYERID(idObject))
// {
// Debug.Assert(pObject.GetClassID() == CECObject.OCID_ELSEPLAYER);
// EC_ElsePlayer pPlayer = (EC_ElsePlayer)pObject;
// fDist = pPlayer.CalcDist(GetPos(), true);
// }
// else if (ISMATTERID(idObject))
// {
// Debug.Assert(pObject.GetClassID() == CECObject.OCID_MATTER);
// CECMatter pMatter = (CECMatter)pObject;
// fDist = (pMatter.GetPos() - GetPos()).magnitude;
// }
// else
// return false;
// pfDist = fDist;
// return true;
//}
//// Helper method overload without object output
//public bool CalcDist(int idObject, ref float pfDist)
//{
// CECObject pObject;
// return CalcDist(idObject, ref pfDist, out pObject);
//}
//// ID checking helper methods
//private bool ISNPCID(int id) => ((id & 0x80000000) != 0) && ((id & 0x40000000) == 0);
//private bool ISPLAYERID(int id) => id != 0 && (id & 0x80000000) == 0;
//private bool ISMATTERID(int id) => ((id) & 0xC0000000) == 0xC0000000;
}
}