Merge remote-tracking branch 'origin/develop' into feature/mini-map

This commit is contained in:
Le Duc Anh
2026-01-28 09:46:40 +07:00
177 changed files with 44850 additions and 5121 deletions
@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
m_currentHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
Hash: f31c7227b70701eab297439e808bd57d
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0
@@ -3644,42 +3644,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3394019089264214037
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5233116975597807035}
m_Layer: 5
m_Name: Sliding Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5233116975597807035
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3394019089264214037}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2343337405992641122}
m_Father: {fileID: 4269318562826283412}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3400309995061149671
GameObject:
m_ObjectHideFlags: 0
@@ -4526,7 +4490,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3841808193842114691}
- {fileID: 4269318562826283412}
m_Father: {fileID: 3413131598704007284}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -4594,9 +4557,9 @@ MonoBehaviour:
m_ScrollSensitivity: 1
m_Viewport: {fileID: 3841808193842114691}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 8166044353254338}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 1
m_HorizontalScrollbarSpacing: -3
m_VerticalScrollbarSpacing: -3
m_OnValueChanged:
@@ -6441,9 +6404,9 @@ RectTransform:
m_Father: {fileID: 3760164886363293420}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &5693552902337398956
CanvasRenderer:
@@ -6496,132 +6459,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!1 &6215509840863176641
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4269318562826283412}
- component: {fileID: 3156760942193843661}
- component: {fileID: 5649692143959903235}
- component: {fileID: 8166044353254338}
m_Layer: 5
m_Name: Scrollbar Vertical
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4269318562826283412
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215509840863176641}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5233116975597807035}
m_Father: {fileID: 3760164886363293420}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: -17}
m_Pivot: {x: 1, y: 1}
--- !u!222 &3156760942193843661
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215509840863176641}
m_CullTransparentMesh: 1
--- !u!114 &5649692143959903235
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215509840863176641}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8166044353254338
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6215509840863176641}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, 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: 7392889747821849613}
m_HandleRect: {fileID: 2343337405992641122}
m_Direction: 2
m_Value: 1
m_Size: 0.5000001
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6529812165440442340
GameObject:
m_ObjectHideFlags: 0
@@ -6959,81 +6796,6 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6825428412888061072
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2343337405992641122}
- component: {fileID: 1253204253337680264}
- component: {fileID: 7392889747821849613}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2343337405992641122
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6825428412888061072}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5233116975597807035}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1253204253337680264
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6825428412888061072}
m_CullTransparentMesh: 1
--- !u!114 &7392889747821849613
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6825428412888061072}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6853716367817320825
GameObject:
m_ObjectHideFlags: 0
@@ -8864,7 +8626,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8395333742829132721, guid: 9456de25596014039bd4d0d3927b709a, type: 3}
propertyPath: m_AnchoredPosition.y
value: 191.5136
value: 336.93
objectReference: {fileID: 0}
- target: {fileID: 8395333742829132721, guid: 9456de25596014039bd4d0d3927b709a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@@ -10,8 +10,8 @@ GameObject:
m_Component:
- component: {fileID: 5053903421260846465}
- component: {fileID: 4314770845850481090}
- component: {fileID: 4762263782091224632}
- component: {fileID: 4986645933044111193}
- component: {fileID: 1062363862839909147}
m_Layer: 5
m_Name: TreeViewItem
m_TagString: Untagged
@@ -31,7 +31,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3882154025378162395}
- {fileID: 2024997316782034639}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -51,19 +51,36 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3428dd2e9dd644e0b0cb408bd3202f21, type: 3}
m_Name:
m_EditorClassIdentifier:
m_text: {fileID: 1383932928540251694}
m_text:
legacy: {fileID: 0}
tmp: {fileID: 1383932928540251694}
m_Button: {fileID: 1762532130762754577}
_levelSprites:
- {fileID: 21300000, guid: e09a5d2cb3c3f4c858754a1e90a44abd, type: 3}
- {fileID: 21300000, guid: 73873399fec964578b62204f20c40517, type: 3}
_expandButton: {fileID: 1715406348461528812}
_collapseButton: {fileID: 8676942769405651249}
_expandToggle: {fileID: 5502308808383608272}
_expandText:
legacy: {fileID: 0}
tmp: {fileID: 8373064842616042426}
_space: {fileID: 5541755240357469011}
m_uItemData: 0
_treeLevel: 0
isLastItem: 0
OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4762263782091224632
--- !u!114 &4986645933044111193
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 700152255263326765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 1
--- !u!114 &1062363862839909147
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -82,27 +99,13 @@ MonoBehaviour:
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &4986645933044111193
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 700152255263326765}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &2040002976300010419
GameObject:
m_ObjectHideFlags: 0
@@ -115,6 +118,7 @@ GameObject:
- component: {fileID: 2230410216357545400}
- component: {fileID: 9062463037674165507}
- component: {fileID: 1762532130762754577}
- component: {fileID: 4801006375863435037}
m_Layer: 5
m_Name: MainButton
m_TagString: Untagged
@@ -129,20 +133,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5827054231092576763}
- {fileID: 7277676979067820762}
- {fileID: 2849245307131571463}
m_Father: {fileID: 5053903421260846465}
m_Father: {fileID: 2024997316782034639}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 313, y: 91}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2230410216357545400
CanvasRenderer:
@@ -165,14 +167,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 0.011764706}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: e09a5d2cb3c3f4c858754a1e90a44abd, type: 3}
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -226,6 +228,26 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4801006375863435037
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040002976300010419}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 0
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 0.5
m_FlexibleHeight: -1
m_LayoutPriority: 2
--- !u!1 &2916175606199835458
GameObject:
m_ObjectHideFlags: 0
@@ -261,8 +283,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 3.5497}
m_SizeDelta: {x: 0, y: -7.0993}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0.00000023841858}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5842649278580849339
CanvasRenderer:
@@ -319,14 +341,14 @@ MonoBehaviour:
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 40
m_fontSizeBase: 40
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1
m_enableAutoSizing: 0
m_fontSizeMin: 15
m_fontSizeMax: 40
m_fontStyle: 0
m_HorizontalAlignment: 2
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
@@ -383,7 +405,7 @@ MonoBehaviour:
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &4773363917894322918
--- !u!1 &6587684749681441909
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -391,133 +413,184 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2849245307131571463}
- component: {fileID: 8656005255261122099}
- component: {fileID: 9103345587361145036}
- component: {fileID: 8676942769405651249}
- component: {fileID: 2374156541160748953}
- component: {fileID: 5062486824527634889}
- component: {fileID: 7099288759002186546}
- component: {fileID: 8373064842616042426}
m_Layer: 5
m_Name: CollapseBtn
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2849245307131571463
--- !u!224 &5062486824527634889
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4773363917894322918}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_GameObject: {fileID: 6587684749681441909}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: -1, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3882154025378162395}
m_Father: {fileID: 7277676979067820762}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 156.5, y: 3.5497}
m_SizeDelta: {x: 313, y: 83.901}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.00048828125, y: 0}
m_SizeDelta: {x: 40.883, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8656005255261122099
--- !u!222 &7099288759002186546
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4773363917894322918}
m_GameObject: {fileID: 6587684749681441909}
m_CullTransparentMesh: 1
--- !u!114 &9103345587361145036
--- !u!114 &8373064842616042426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4773363917894322918}
m_GameObject: {fileID: 6587684749681441909}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 9de07872267c5419b9fa9c849eb45858, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8676942769405651249
m_text: +
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &6592915584227539970
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2930138263853700511}
- component: {fileID: 5541755240357469011}
m_Layer: 5
m_Name: Space
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2930138263853700511
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6592915584227539970}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2024997316782034639}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5541755240357469011
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4773363917894322918}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
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: 9103345587361145036}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &2374156541160748953
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4773363917894322918}
m_GameObject: {fileID: 6592915584227539970}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_IgnoreLayout: 0
m_MinWidth: 0
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
@@ -535,10 +608,10 @@ GameObject:
- component: {fileID: 7277676979067820762}
- component: {fileID: 885853373149276158}
- component: {fileID: 1569122208421759741}
- component: {fileID: 1715406348461528812}
- component: {fileID: 9213068811979301399}
- component: {fileID: 5502308808383608272}
- component: {fileID: 8681673894369501558}
m_Layer: 5
m_Name: ExpandBtn
m_Name: ExpandToggle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -555,13 +628,14 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3882154025378162395}
m_Children:
- {fileID: 5062486824527634889}
m_Father: {fileID: 2024997316782034639}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 156.5, y: 3.5497}
m_SizeDelta: {x: 313, y: 83.901}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &885853373149276158
CanvasRenderer:
@@ -591,7 +665,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Sprite: {fileID: 252815192406529888, guid: a141ce1b94af3cf46aa0695ab5ed6cdd, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -601,7 +675,7 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &1715406348461528812
--- !u!114 &5502308808383608272
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -610,11 +684,11 @@ MonoBehaviour:
m_GameObject: {fileID: 6863650808120944178}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
@@ -642,10 +716,14 @@ MonoBehaviour:
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1569122208421759741}
m_OnClick:
toggleTransition: 1
graphic: {fileID: 0}
m_Group: {fileID: 0}
onValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &9213068811979301399
m_IsOn: 0
--- !u!114 &8681673894369501558
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -657,11 +735,76 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_PreferredWidth: 40
m_PreferredHeight: 40
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &7973684205123875483
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2024997316782034639}
- component: {fileID: 6485915084394087119}
m_Layer: 5
m_Name: MainContent
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2024997316782034639
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7973684205123875483}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2930138263853700511}
- {fileID: 7277676979067820762}
- {fileID: 3882154025378162395}
m_Father: {fileID: 5053903421260846465}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 400, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6485915084394087119
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7973684205123875483}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 1
m_ChildScaleHeight: 1
m_ReverseArrangement: 0
+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:
File diff suppressed because it is too large Load Diff
@@ -29,3 +29,9 @@ MonoBehaviour:
prefab: {fileID: 6032603119232429246, guid: 8350aa55906d08448bb47e10a473ca61, type: 3}
- id: Win_Produce
prefab: {fileID: 5750242998044155948, guid: ecf0d8daf08db6f4a8d94a4bb07847ec, type: 3}
- id: Win_Inventory
prefab: {fileID: 5910006447059157136, guid: 22d3972b131ebdb4288f9cbdf996d691, type: 3}
- id: Win_Enchase
prefab: {fileID: 5636724581774400035, guid: de6ac6f2630425044a55299c703670f1, type: 3}
- id: Win_Character
prefab: {fileID: 6310702841431484757, guid: 6620f766cee7c8f4cb00dd457ac77675, type: 3}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: cfa464036967d9746abcfa0608211b2e
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:
@@ -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

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 17e402c0c7862cf4b9f5e46fb6959d1d
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.4 KiB

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: 644d603639e0f694fb175a01c785befb
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.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

@@ -0,0 +1,153 @@
fileFormatVersion: 2
guid: c216814d0c4f49c4b824cd83ad395719
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: 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: k2_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 6, y: 6, z: 6, w: 6}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: fa671714873a84942a957d2da9aee664
internalID: -237910717
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
k2_0: -237910717
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

@@ -0,0 +1,153 @@
fileFormatVersion: 2
guid: 068aff4b7af527745aca099de55292ef
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: 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: k3_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 32
height: 32
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 6, y: 6, z: 6, w: 6}
customData:
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: 55e36f932250f9d40a9900037ca33666
internalID: -1880016052
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
k3_0: -1880016052
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
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:
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f3553c5fdd68230c6a591df1fde22cf360896fc818007787595189f0cc036b5c
size 69312
oid sha256:eadad766c90d9a2f8f33468f1b6b21e6fd78e55f555200887eb9f6198720424a
size 76688
File diff suppressed because it is too large Load Diff
@@ -458,10 +458,43 @@ namespace BrewMonster
ret = generate_item_temp.generate_armor(id, ID_SPACE.ID_SPACE_ESSENCE,
out item,out size,SPECIFIC.SPECIFIC_RAND,GEN_ADDON_MODE.ADDON_LIST_SHOP,tag);
break;
case DATA_TYPE.DT_DECORATION_ESSENCE:
ret = generate_item_temp.generate_decoration(id,ID_SPACE.ID_SPACE_ESSENCE,
out item,out size,SPECIFIC.SPECIFIC_RAND,GEN_ADDON_MODE.ADDON_LIST_SHOP,tag);
break;
case DATA_TYPE.DT_PROJECTILE_ESSENCE:
ret = generate_item_temp.generate_projectile(id,ID_SPACE.ID_SPACE_ESSENCE,
out item,out size,SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_FASHION_ESSENCE:
ret = generate_item_temp.generate_fashion_item(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND, tag);
break;
case DATA_TYPE.DT_TASKDICE_ESSENCE:
ret = generate_item_temp.generate_taskdice(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_TASKNORMALMATTER_ESSENCE:
ret = generate_item_temp.generate_tasknormalmatter(id,ID_SPACE.ID_SPACE_ESSENCE,
out item,out size,SPECIFIC.SPECIFIC_RAND,GEN_ADDON_MODE.ADDON_LIST_SHOP,tag);
break;
case DATA_TYPE.DT_MEDICINE_ESSENCE:
ret = generate_item_temp.generate_medicine(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_MATERIAL_ESSENCE:
ret = generate_item_temp.generate_material(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_SKILLTOME_ESSENCE:
ret = generate_item_temp.generate_skilltome(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_PET_EGG_ESSENCE:
ret = generate_item_temp.generate_pet_egg(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_PET_FOOD_ESSENCE:
ret = generate_item_temp.generate_pet_food(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
case DATA_TYPE.DT_TOWNSCROLL_ESSENCE:
ret = generate_item_temp.generate_townscroll(id, ID_SPACE.ID_SPACE_ESSENCE, out item, out size, SPECIFIC.SPECIFIC_RAND);
break;
default:
ret = -1;
break;
@@ -55,12 +55,15 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Weapon sub-type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_hitgfx; // Hit effect file path
public string FileHitGfx => ByteToStringUtils.ByteArrayToCP936String(file_hitgfx);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_hitsfx; // Hit sound effect file path
public byte[] file_hitsfx; // Hit sound effect file pathpublic string FileHitSfx => ByteToStringUtils.ByteArrayToCP936String(file_hitsfx);
public string FileHitSfx => ByteToStringUtils.ByteArrayToCP936String(file_hitsfx);
public float probability_fastest; // Attack frequency probability: Fastest -0.1
public float probability_fast; // Attack frequency probability: Fast -0.05
public float probability_normal; // Attack frequency probability: Normal 0
@@ -250,14 +253,20 @@ namespace BrewMonster
+ ByteToStringUtils.ByteArrayToCP936String(file_model_left) + "\n";
}
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MagicDefence
{
public int low; // Minimum magic defense
public int high; // Maximum magic defense
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ARMOR_MAJOR_TYPE
{
public uint id; // Armor major type ID
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Armor major type name
public ushort[] name; // Armor major type name public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -267,6 +276,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Armor sub-type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
public uint equip_mask; // Equipment slot mask
}
@@ -321,12 +331,7 @@ namespace BrewMonster
public int defence_low; // Minimum physical defense
public int defence_high; // Maximum physical defense
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MagicDefence
{
public int low; // Minimum magic defense
public int high; // Maximum magic defense
}
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
public MagicDefence[] magic_defences; // Magic defenses for 5 elements
@@ -433,6 +438,8 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Decoration sub-type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
public uint equip_mask; // Equipment slot mask
}
@@ -447,16 +454,22 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Decoration name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
// Display information
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model; // Model file path
public string FileModel => ByteToStringUtils.ByteArrayToCP936String(file_model);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int level; // Decoration level
// Equipment requirements
@@ -482,13 +495,6 @@ namespace BrewMonster
public int defence_low; // Minimum physical defense
public int defence_high; // Maximum physical defense
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MagicDefence
{
public int low; // Minimum magic defense
public int high; // Maximum magic defense
}
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
public MagicDefence[] magic_defences; // Magic defenses for 5 elements
@@ -737,6 +743,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Fashion sub-type name
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
public uint equip_fashion_mask; // Fashion equipment slot mask
}
@@ -751,18 +758,18 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Fashion name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] realname; // Real fashion name
public string RealName => ByteToStringUtils.ByteArrayToUnicodeString(realname);
// Display information
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
@@ -793,7 +800,6 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] wear_action; // Wear action
public string WearAction => ByteToStringUtils.ByteArrayToUnicodeString(wear_action);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
@@ -827,6 +833,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Medicine major type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -847,13 +854,18 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Medicine name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int require_level; // Required level
public int cool_time; // Cooldown time (seconds)
@@ -933,12 +945,18 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int total_hp; // Total HP recovery
public float trigger_amount; // Trigger HP threshold
public int cool_time; // Cooldown time (seconds)
@@ -959,13 +977,18 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int total_mp; // Total MP recovery
public float trigger_amount; // Trigger MP threshold
public int cool_time; // Cooldown time (seconds)
@@ -1038,6 +1061,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Material major type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -1047,6 +1071,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Material sub-type name
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
@@ -1058,13 +1083,15 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // Material name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int price; // Base price
public int shop_price; // Shop price
@@ -1304,10 +1331,10 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Matter model file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int price; // Base price
public int shop_price; // Shop price
@@ -1576,10 +1603,11 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Material file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public float use_time; // Use time (seconds)
public int price; // Price
@@ -1600,9 +1628,11 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Material file path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
public int price; // Price
public int shop_price; // Shop price
@@ -1717,6 +1747,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
public int pile_num_max; // Max stack count
public uint has_guid; // Whether item has GUID
@@ -1733,9 +1764,11 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // Material file path
public string FileMatter { get { return ByteToStringUtils.ByteArrayToCP936String(file_matter); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // Icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
public int price; // Price
public int shop_price; // Shop price
@@ -1754,9 +1787,10 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // matter file path
public string FileMatter { get { return ByteToStringUtils.ByteArrayToCP936String(file_matter); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
[StructLayout(LayoutKind.Sequential)]
public struct TaskList
@@ -1825,6 +1859,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // name, max 15 chars
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
}
public struct PROJECTILE_ESSENCE
@@ -1837,12 +1872,14 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model; // model file path
public string FileModel { get { return ByteToStringUtils.ByteArrayToCP936String(file_model); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // matter file path
public string FileMatter { get { return ByteToStringUtils.ByteArrayToCP936String(file_matter); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_firegfx; // fire effect file
@@ -2086,6 +2123,7 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
public int id_pet; // pet ID
@@ -2124,9 +2162,11 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // matter file path
public string FileMatter { get { return ByteToStringUtils.ByteArrayToCP936String(file_matter); } }
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon; // icon file path
public string FileIcon { get { return ByteToStringUtils.ByteArrayToCP936String(file_icon); } }
public int level; // level
@@ -2965,31 +3005,29 @@ namespace BrewMonster
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public ushort[] name; // name, max 15 characters
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model1; // state 1 model file
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model2; // state 2 model file
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model3; // state 3 model file
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_model4; // state 4 model file
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_matter; // matter model path
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon1; // state 1 icon path
public string FileIcon1 => ByteToStringUtils.ByteArrayToCP936String(file_icon1);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon2; // state 2 icon path
public string FileIcon2 => ByteToStringUtils.ByteArrayToCP936String(file_icon2);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon3; // state 3 icon path
public string FileIcon3 => ByteToStringUtils.ByteArrayToCP936String(file_icon3);
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public byte[] file_icon4; // state 4 icon path
@@ -80,4 +80,14 @@ namespace BrewMonster.Scripts
SIZE_FASHIONSCSET = 240,
};
// Pet food type
enum PetFoodType
{
PET_FOOD_GRASS = 0,
PET_FOOD_MEAT,
PET_FOOD_VEGETABLE,
PET_FOOD_FRUIT,
PET_FOOD_WATER,
MAX_PET_FOOD,
};
}
@@ -84,7 +84,6 @@ namespace BrewMonster.Network
}
public static Dictionary<int, int> GetSuiteEquipTab()
{
Debug.Log("[EC_Game] GetSuiteEquipTab: " + m_SuiteEquipTab.Count);
return m_SuiteEquipTab;
}
public static bool TryGetItemMsg(int templateId, out int messageId, out int displayMode)
@@ -64,7 +64,9 @@ using BrewMonster.Scripts;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Armor item class (Mu + Ao + Quan + Giay) / Armor item class (Helmet + Armor + Pants + Boots)
/// </summary>
public class EC_IvtrArmor : EC_IvtrEquip
{
//Attributes
@@ -75,6 +77,11 @@ namespace PerfectWorld.Scripts.Managers
protected ARMOR_SUB_TYPE m_pDBSubType;
protected ARMOR_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for armor item (Mu + Ao + Quan + Giay) / Constructor for armor item (Helmet + Armor + Pants + Boots)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrArmor(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_ARMOR;
@@ -93,6 +100,10 @@ namespace PerfectWorld.Scripts.Managers
RepairFee = m_pDBEssence.repairfee;
ReputationReq = m_pDBEssence.require_reputation;
}
/// <summary>
/// Copy constructor for armor item (Mu + Ao + Quan + Giay) / Copy constructor for armor item (Helmet + Armor + Pants + Boots)
/// </summary>
/// <param name="other">Other armor item to copy from</param>
public EC_IvtrArmor(EC_IvtrArmor other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
@@ -386,10 +397,9 @@ namespace PerfectWorld.Scripts.Managers
AddDestroyingDesc((int)m_pDBEssence.id_drop_after_damaged, m_pDBEssence.num_drop_after_damaged);
AddExpireTimeDesc();
// Sub class name
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_CLASSNAME), m_pDBSubType.name.ToString());
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_CLASSNAME), m_pDBSubType.Name);
// Weapon level
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVEL), m_pDBEssence.level);
// Physical defence
if (m_Essence.defense - aPEEVals[PEEI_PHYDEF] + aRefines[REFINE_PHYDEF] != 0)
{
@@ -4,6 +4,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrArmorrune : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrArmorrune(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,14 +1,170 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Arrow item class (cac loai mui ten)
/// </summary>
public class EC_IvtrArrow : EC_IvtrEquip
{
protected IVTR_ESSENCE_ARROW m_Essence; // Arrow essence data
// Data in database
protected PROJECTILE_TYPE m_pDBType;
protected PROJECTILE_ESSENCE m_pDBEssence;
/// <summary>
/// Arrow item class (cac loai mui ten)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrArrow(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_ARROW;
m_Essence = new IVTR_ESSENCE_ARROW();
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (PROJECTILE_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBType = (PROJECTILE_TYPE)pDB.get_data_ptr((uint)m_pDBEssence.type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = EC_IvtrType.EQUIP_MASK64_PROJECTILE;
}
public EC_IvtrArrow(EC_IvtrArrow other) : base(other)
{
m_pDBType = other.m_pDBType;
m_pDBEssence = other.m_pDBEssence;
m_Essence = other.m_Essence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if (pInfoData == null || iDataLen == 0)
return true;
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
// Skip equip requirements and endurance
dr.Offset(5 * sizeof (int), CECDataReader.SEEK_CUR);
int iEssenceSize = dr.ReadInt();
//ASSERT(iEssenceSize == sizeof (IVTR_ESSENCE_ARROW));
m_Essence = new IVTR_ESSENCE_ARROW(dr.ReadData(iEssenceSize));
}
catch (Exception e)
{
Debug.LogError("CECIvtrArrow::SetItemInfo, data read error (" + e.GetType() + e.StackTrace + ")");
return false;
}
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
return "";
// Build addon and refine properties and save it
m_strDesc = "";
BuildAddOnPropDesc(null, null);
string strAddon = m_strDesc;
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Weapon requirement
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_WEAPONREQ), m_Essence.iWeaponReqLow,
m_Essence.iWeaponReqHigh, m_pDBType.Name);
// Damage enhance
if (m_pDBEssence.damage_enhance != 0)
{
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDPHYDAMAGE));
AddDescText(-1, true, " %+d", m_pDBEssence.damage_enhance);
}
// Add addon properties
if (strAddon.Length > 0)
m_strDesc += strAddon;
// Price
AddPriceDesc(white, bRepair);
// Suite description
AddSuiteDesc();
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
@@ -1,15 +1,174 @@
///////////////////////////////////////////////////////////////////////////
//
// Define and Macro
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Reference to External variables and functions
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Local Types and Variables and Global variables
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Local functions
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Implement CECIvtrDecoration
//
///////////////////////////////////////////////////////////////////////////
using BrewMonster;
using ModelRenderer.Scripts.GameData;
using System.Collections.Generic;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using System.Runtime.InteropServices;
using System;
using CSNetwork.GPDataType;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrAutoHp : EC_IvtrItem
/// <summary>
/// Auto HP item class (tu dong hoi mau). This is a part of CEC_IvtrEquipMatter(C++)
/// </summary>
public class EC_IvtrAutoHp : EC_IvtrEquip
{
public IVTR_ESSENCE_AUTOHP m_Essence;
// Data in database
public AUTOHP_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for auto HP item (tu dong hoi mau) / Constructor for auto HP item (automatic HP recovery)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrAutoHp(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_AUTOHP;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (AUTOHP_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = (long)EC_IvtrType.EQUIP_MASK64_AUTOHP;
}
/// <summary>
/// Copy constructor for auto HP item (tu dong hoi mau) / Copy constructor for auto HP item (automatic HP recovery)
/// </summary>
/// <param name="other">Other auto HP item to copy from</param>
public EC_IvtrAutoHp(EC_IvtrAutoHp other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_Essence = other.m_Essence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if (pInfoData == null || iDataLen == 0)
return true;
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
m_Essence = new IVTR_ESSENCE_AUTOHP(dr.ReadData(Marshal.SizeOf<IVTR_ESSENCE_AUTOHP>()));
}
catch (Exception e)
{
BMLogger.LogError("CECIvtrAutoHP::SetItemInfo, data read error (" + e.GetType() + ")");
return false;
}
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
return m_pDBEssence.Name;
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
return null;
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
if (m_iCount > 1)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddBindDescText();
AddExpireTimeDesc();
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AUTOHP1), m_Essence.hp_left, m_pDBEssence.total_hp);
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AUTOHP2), (int)(m_pDBEssence.trigger_amount * 100.0f + 0.5f));
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COOLTIME), m_pDBEssence.cool_time / 1000);
// Price
AddPriceDesc(white, bRepair);
// Suite description
AddSuiteDesc();
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
// Get item cool time
public int GetCoolTime(ref int piMax)
{
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
return pHost != null ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_AUTOHP, ref piMax) : 0;
}
}
}
@@ -1,14 +1,174 @@
///////////////////////////////////////////////////////////////////////////
//
// Define and Macro
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Reference to External variables and functions
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Local Types and Variables and Global variables
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Local functions
//
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
// Implement CECIvtrDecoration
//
///////////////////////////////////////////////////////////////////////////
using BrewMonster;
using ModelRenderer.Scripts.GameData;
using System.Collections.Generic;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using System.Runtime.InteropServices;
using System;
using CSNetwork.GPDataType;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrAutoMp : EC_IvtrItem
/// <summary>
/// Auto MP item class (tu dong hoi mana). This is a part of CEC_IvtrEquipMatter(C++)
/// </summary>
public class EC_IvtrAutoMp : EC_IvtrEquip
{
public IVTR_ESSENCE_AUTOMP m_Essence;
// Data in database
public AUTOMP_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for auto MP item (tu dong hoi mana) / Constructor for auto MP item (automatic MP recovery)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrAutoMp(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_AUTOMP;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (AUTOMP_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = (long)EC_IvtrType.EQUIP_MASK64_AUTOMP;
}
/// <summary>
/// Copy constructor for auto MP item (tu dong hoi mana) / Copy constructor for auto MP item (automatic MP recovery)
/// </summary>
/// <param name="other">Other auto MP item to copy from</param>
public EC_IvtrAutoMp(EC_IvtrAutoMp other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_Essence = other.m_Essence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if (pInfoData == null || iDataLen == 0)
return true;
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
m_Essence = new IVTR_ESSENCE_AUTOMP(dr.ReadData(Marshal.SizeOf<IVTR_ESSENCE_AUTOMP>()));
}
catch (Exception e)
{
BMLogger.LogError("CECIvtrAutoHP::SetItemInfo, data read error (" + e.GetType() + ")");
return false;
}
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
return m_pDBEssence.Name;
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
return null;
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
if (m_iCount > 1)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddBindDescText();
AddExpireTimeDesc();
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AUTOMP1), m_Essence.mp_left, m_pDBEssence.total_mp);
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AUTOMP2), (int)(m_pDBEssence.trigger_amount * 100.0f + 0.5f));
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COOLTIME), m_pDBEssence.cool_time / 1000);
// Price
AddPriceDesc(white, bRepair);
// Suite description
AddSuiteDesc();
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
// Get item cool time
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;
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrBible : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrBible(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrCertificate : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrCertificate(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrCongregate : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrCongregate(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDamagerune : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDamagerune(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -39,7 +39,9 @@ using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Decoration item class (boi + nhan + ) / Decoration item class (various types of decorations)
/// </summary>
public class EC_IvtrDecoration : EC_IvtrEquip
{
protected IVTR_ESSENCE_DECORATION m_Essence;
@@ -47,6 +49,11 @@ namespace PerfectWorld.Scripts.Managers
protected DECORATION_SUB_TYPE m_pDBSubType;
protected DECORATION_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for decoration item (cac loai trang suc) / Constructor for decoration item (various types of decorations)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDecoration(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_DECORATION;
@@ -66,6 +73,10 @@ namespace PerfectWorld.Scripts.Managers
ReputationReq = m_pDBEssence.require_reputation;
}
/// <summary>
/// Copy constructor for decoration item (cac loai trang suc) / Copy constructor for decoration item (various types of decorations)
/// </summary>
/// <param name="other">Other decoration item to copy from</param>
public EC_IvtrDecoration(EC_IvtrDecoration other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
@@ -73,7 +84,435 @@ namespace PerfectWorld.Scripts.Managers
m_pDBSubType = other.m_pDBSubType;
m_Essence = other.m_Essence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if(pInfoData == null || iDataLen == 0)
{
return true;
}
try
{
CECDataReader dr = new CECDataReader(pInfoData ,iDataLen);
// Skip equip requirements and endurance
dr.Offset(6 * sizeof(short), CECDataReader.SEEK_CUR);
dr.Offset(2 * sizeof(int), CECDataReader.SEEK_CUR);
int iEssenceSize = dr.ReadShort();
// Skip maker's information
dr.ReadByte();
int iMakerLen = dr.ReadByte();
dr.Offset(iMakerLen, CECDataReader.SEEK_CUR);
byte[] iEssenceData = dr.ReadData(iEssenceSize);
m_Essence = new IVTR_ESSENCE_DECORATION(iEssenceData);
// ˵
if(m_pDBEssence.fixed_props != 0 && m_pDBEssence.probability_addon_num0 != 1.0f)
{
// Get database data
elementdataman pDataMan = ElementDataManProvider.GetElementDataMan();
CECStringTab PropTab = EC_Game.GetItemExtProp();
int i, iSize = 0;
for(i=0;i<32;i++)
{
if(m_pDBEssence.addons[i].id_addon != 0)
iSize++;
}
if(iSize > 0 && Props.Count == 0)
{
Props.Capacity = iSize;
for(i=0;i<32;i++)
{
if(m_pDBEssence.addons[i].id_addon != 0)
{
Property Prop = new Property();
Prop.Type = (int)m_pDBEssence.addons[i].id_addon;
Prop.Embed = false;
Prop.Suite = false;
Prop.Engraved = false;
Prop.Local = false;
byte bType = PropTab.GetWideString(Prop.Type) != null ? (byte)0xff : (byte)0xff;
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
object pData = pDataMan.get_data_ptr(m_pDBEssence.addons[i].id_addon, ID_SPACE.ID_SPACE_ADDON, ref DataType);
if (DataType != DATA_TYPE.DT_EQUIPMENT_ADDON)
{
return false;
}
EQUIPMENT_ADDON pAddon = (EQUIPMENT_ADDON)pData;
Prop.NumParam = pAddon.num_params;
for(int j=0; j < Prop.NumParam; j++)
{
if(j==0)
{
Prop.Params[0] = pAddon.param1;
}
else if(j==1)
{
Prop.Params[1] = pAddon.param2;
}
else if(j==2)
{
Prop.Params[2] = pAddon.param3;
}
}
Props.Add(Prop);
}
}
}
}
return true;
}
catch ( System.Exception e)
{
return false;
}
}
public override void DefaultInfo()
{
LevelReq = m_pDBEssence.require_level;
StrengthReq = 0;
AgilityReq = 0;
ReputationReq = m_pDBEssence.require_reputation;
CurEndurance = m_pDBEssence.durability_min * ENDURANCE_SCALE;
MaxEndurance = m_pDBEssence.durability_min * ENDURANCE_SCALE;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
return m_pDBEssence.Name;
}
public override string GetPreviewInfo()
{
int[] aPEEVals = new int[MAX_PEEINDEX];
int[] aRefines = new int[MAX_REFINEINDEX];
for(int i=0; i<MAX_PEEINDEX; i++)
aPEEVals[i] = 0;
for(int i=0; i<MAX_REFINEINDEX; i++)
aRefines[i] = 0;
m_strDesc = "";
BuildAddOnPropDesc(aPEEVals, aRefines);
CECStringTab pDescTab = EC_Game.GetItemDesc();
// Add physical damage
if (m_Essence.damage - aPEEVals[PEEI_PHYDAMAGE] + aRefines[REFINE_PHYDAMAGE] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDAMAGE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.damage - aPEEVals[PEEI_PHYDAMAGE] + aRefines[REFINE_PHYDAMAGE]);
}
// Add magic damage
if (m_Essence.magic_damage - aPEEVals[PEEI_MAGICDAMAGE] + aRefines[REFINE_MAGICDAMAGE] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_MAGICDAMAGE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.magic_damage - aPEEVals[PEEI_MAGICDAMAGE] + aRefines[REFINE_MAGICDAMAGE]);
}
// Physical defense
if (m_Essence.defense - aPEEVals[PEEI_PHYDEF] + aRefines[REFINE_PHYDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.defense - aPEEVals[PEEI_PHYDEF] + aRefines[REFINE_PHYDEF]);
}
// Dodge
if (m_Essence.armor - aPEEVals[PEEI_DODGE] + aRefines[REFINE_DODGE] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_DODGE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.armor - aPEEVals[PEEI_DODGE] + aRefines[REFINE_DODGE]);
}
//Gold Resistance
if (m_Essence.resistance[0] - aPEEVals[PEEI_GOLDDEF] + aRefines[REFINE_GOLDDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_GOLDDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.resistance[0] - aPEEVals[PEEI_GOLDDEF] + aRefines[REFINE_GOLDDEF]);
}
//Wood Resistance
if (m_Essence.resistance[1] - aPEEVals[PEEI_WOODDEF] + aRefines[REFINE_WOODDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_WOODDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.resistance[1] - aPEEVals[PEEI_WOODDEF] + aRefines[REFINE_WOODDEF]);
}
//Water Resistance
if (m_Essence.resistance[2] - aPEEVals[PEEI_WATERDEF] + aRefines[REFINE_WATERDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_WATERDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.resistance[2] - aPEEVals[PEEI_WATERDEF] + aRefines[REFINE_WATERDEF]);
}
//Fire Resistance
if (m_Essence.resistance[3] - aPEEVals[PEEI_FIREDEF] + aRefines[REFINE_FIREDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_FIREDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.resistance[3] - aPEEVals[PEEI_FIREDEF] + aRefines[REFINE_FIREDEF]);
}
//Earth Resistance
if (m_Essence.resistance[4] - aPEEVals[PEEI_EARTHDEF] + aRefines[REFINE_EARTHDEF] != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_EARTHDEFENCE));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, " %+d", m_Essence.resistance[4] - aPEEVals[PEEI_EARTHDEF] + aRefines[REFINE_EARTHDEF]);
}
return m_strDesc;
}
public override bool GetRefineEffectFor(string strEffect, RefineEffect rhs){
strEffect = "";
if (!m_bNeedUpdate){
switch (rhs.RefineIndex){
case REFINE_PHYDAMAGE:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDAMAGE),
m_Essence.damage - rhs.APEEVals[PEEI_PHYDAMAGE] + rhs.ARefines[REFINE_PHYDAMAGE] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_MAGICDAMAGE:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_MAGICDAMAGE),
m_Essence.magic_damage - rhs.APEEVals[PEEI_MAGICDAMAGE] + rhs.ARefines[REFINE_MAGICDAMAGE] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_PHYDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDEFENCE),
m_Essence.defense - rhs.APEEVals[PEEI_PHYDEF] + rhs.ARefines[REFINE_PHYDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_DODGE:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_DODGE),
m_Essence.armor - rhs.APEEVals[PEEI_DODGE] + rhs.ARefines[REFINE_DODGE] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_GOLDDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_GOLDDEFENCE),
m_Essence.resistance[0] - rhs.APEEVals[PEEI_GOLDDEF] + rhs.ARefines[REFINE_GOLDDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_WOODDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_WOODDEFENCE),
m_Essence.resistance[1] - rhs.APEEVals[PEEI_WOODDEF] + rhs.ARefines[REFINE_WOODDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_WATERDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_WATERDEFENCE),
m_Essence.resistance[2] - rhs.APEEVals[PEEI_WATERDEF] + rhs.ARefines[REFINE_WATERDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_FIREDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_FIREDEFENCE),
m_Essence.resistance[3] - rhs.APEEVals[PEEI_FIREDEF] + rhs.ARefines[REFINE_FIREDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
case REFINE_EARTHDEF:
strEffect = string.Format("{0}{1} {2}(+{3})",
rhs.GetClrAttribute(),
EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_EARTHDEFENCE),
m_Essence.resistance[4] - rhs.APEEVals[PEEI_EARTHDEF] + rhs.ARefines[REFINE_EARTHDEF] + rhs.GetIncEffect(),
rhs.GetClrEffect(),
rhs.GetIncEffect());
break;
}
}
return !string.IsNullOrEmpty(strEffect);
}
protected override string GetNormalDesc(bool bRepair){
if (m_bNeedUpdate)
return null;
int[] aPEEVals = new int[MAX_PEEINDEX];
int[] aRefines = new int[MAX_REFINEINDEX];
for(int i=0; i<MAX_PEEINDEX; i++)
aPEEVals[i] = 0;
for(int i=0; i<MAX_REFINEINDEX; i++)
aRefines[i] = 0;
m_strDesc = "";
BuildAddOnPropDesc(aPEEVals, aRefines);
string strAddon = m_strDesc;
m_strDesc = "";
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int lblue = (int)DescriptipionMsg.ITEMDESC_COL_LIGHTBLUE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
int namecol = DecideNameCol();
uint dwPEE = PropEffectEssence();
AddDescText(namecol, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
// Refine level
if (RefineLvl > 0)
AddDescText(-1, true, "{0} +{1}", pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVEL), RefineLvl);
else
m_strDesc += "\\r";
AddIDDescText();
AddBindDescText();
// Is destroying?
AddDestroyingDesc((int)m_pDBEssence.id_drop_after_damaged, m_pDBEssence.num_drop_after_damaged);
AddExpireTimeDesc();
// Sub class name
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_CLASSNAME), m_pDBSubType.Name);
// Decoration level
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVEL), m_pDBEssence.level);
//add Physical damage
if (m_Essence.damage - aPEEVals[PEEI_PHYDAMAGE] + aRefines[REFINE_PHYDAMAGE] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDAMAGE));
AddDescText(white, true, " +{0}", m_Essence.damage - aPEEVals[PEEI_PHYDAMAGE] + aRefines[REFINE_PHYDAMAGE]);
}
//add Magic damage
if (m_Essence.magic_damage - aPEEVals[PEEI_MAGICDAMAGE] + aRefines[REFINE_MAGICDAMAGE] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_MAGICDAMAGE));
AddDescText(white, true, " +{0}", m_Essence.magic_damage - aPEEVals[PEEI_MAGICDAMAGE] + aRefines[REFINE_MAGICDAMAGE]);
}
// Physical defence
if (m_Essence.defense - aPEEVals[PEEI_PHYDEF] + aRefines[REFINE_PHYDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.defense - aPEEVals[PEEI_PHYDEF] + aRefines[REFINE_PHYDEF]);
}
// Dodge
if (m_Essence.armor - aPEEVals[PEEI_DODGE] + aRefines[REFINE_DODGE] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_DODGE));
AddDescText(white, true, " +{0}", m_Essence.armor - aPEEVals[PEEI_DODGE] + aRefines[REFINE_DODGE]);
}
// Gold Resistance
if (m_Essence.resistance[0] - aPEEVals[PEEI_GOLDDEF] + aRefines[REFINE_GOLDDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOLDDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.resistance[0] - aPEEVals[PEEI_GOLDDEF] + aRefines[REFINE_GOLDDEF]);
}
// Wood Resistance
if (m_Essence.resistance[1] - aPEEVals[PEEI_WOODDEF] + aRefines[REFINE_WOODDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_WOODDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.resistance[1] - aPEEVals[PEEI_WOODDEF] + aRefines[REFINE_WOODDEF]);
}
// Water Resistance
if (m_Essence.resistance[2] - aPEEVals[PEEI_WATERDEF] + aRefines[REFINE_WATERDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_WATERDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.resistance[2] - aPEEVals[PEEI_WATERDEF] + aRefines[REFINE_WATERDEF]);
}
// Fire Resistance
if (m_Essence.resistance[3] - aPEEVals[PEEI_FIREDEF] + aRefines[REFINE_FIREDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FIREDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.resistance[3] - aPEEVals[PEEI_FIREDEF] + aRefines[REFINE_FIREDEF]);
}
// Earth Resistance
if (m_Essence.resistance[4] - aPEEVals[PEEI_EARTHDEF] + aRefines[REFINE_EARTHDEF] != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_EARTHDEFENCE));
AddDescText(white, true, " +{0}", m_Essence.resistance[4] - aPEEVals[PEEI_EARTHDEF] + aRefines[REFINE_EARTHDEF]);
}
// Endurance
int col = white;
if (CurEndurance == 0)
col = red;
else if ((dwPEE & PEE_ENDURANCE) != 0)
col = lblue;
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ENDURANCE));
AddDescText(col, true, " {0}/{1}", VisualizeEndurance(CurEndurance), VisualizeEndurance(MaxEndurance));
// Profession requirement
AddProfReqDesc((uint)ProfReq);
// Level requirment
if (LevelReq != 0)
{
col = pHost.GetMaxLevelSofar() >= LevelReq ? white : red;
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), LevelReq);
}
// Strength requirment
if (StrengthReq != 0)
{
col = pHost.GetExtendProps().bs.strength < StrengthReq ? red : ((dwPEE & PEE_STRENGTHREQ) != 0 ? lblue : white);
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_STRENGTHREQ), StrengthReq);
}
// Agility requirment
if (AgilityReq != 0)
{
col = pHost.GetExtendProps().bs.agility < AgilityReq ? red : ((dwPEE & PEE_AGILITYREQ) != 0 ? lblue : white);
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AGILITYREQ), AgilityReq);
}
// Vitality requirment
if (VitalityReq != 0)
{
col = pHost.GetExtendProps().bs.vitality < VitalityReq ? red : ((dwPEE & PEE_VITALITYREQ) != 0 ? lblue : white);
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_VITALITYREQ), VitalityReq);
}
// Energy requirment
if (EnergyReq != 0)
{
col = pHost.GetExtendProps().bs.energy < EnergyReq ? red : ((dwPEE & PEE_ENERGYREQ) != 0 ? lblue : white);
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ENERGYREQ), EnergyReq);
}
// Reputation requirement
AddReputationReqDesc();
// Add addon properties
if (!string.IsNullOrEmpty(strAddon))
m_strDesc += strAddon;
// Build tessera description
BuildTesseraDesc();
if(m_pDBEssence.fixed_props == 0 && m_bIsInNPCPack)
AddDescText((int)DescriptipionMsg.ITEMDESC_COL2_BRIGHTBLUE, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_HASRANDOM_PROP));
// Price
AddPriceDesc(white, bRepair);
AddSharpenerDesc();
AddEngravedDesc();
AddMakerDesc();
m_strDesc += "\\r";
AddSuiteDesc();
AddExtDescText();
return m_strDesc;
}
public bool HasRandomProp()
{
for (int i = 0; i < Props.Count; i++)
{
if (!Props[i].Embed && !Props[i].Engraved && Props[i].Type == 472)
return true;
}
return false;
}
public int GetRefineMaterialNum()
{
return m_pDBEssence.material_need;
}
public override uint GetRefineAddOn()
{
return (uint)m_pDBEssence.levelup_addon;
}
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
public override bool IsRare()
{
return base.IsRare() || m_pDBEssence.level >= 6;
}
public override int GetItemLevel()
{
return m_pDBEssence.level;
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDestroyingEssence : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDestroyingEssence(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDoubleExp : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDoubleExp(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDyeTicket : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDyeTicket(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrDynSkillEquip : EC_IvtrEquip
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrDynSkillEquip(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrElement : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrElement(int tid, int expire_date) : base(tid, expire_date)
{
}
File diff suppressed because it is too large Load Diff
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFacePill : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFacePill(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFaceTicket : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFaceTicket(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFactionMaterial : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFactionMaterial(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,14 +1,242 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFashion : EC_IvtrItem
public class EC_IvtrFashion : EC_IvtrEquip
{
protected int m_iGender; // required gender
protected ushort m_wColor; // color in X1R5G5B5 format
protected uint m_color; // color in X8R8G8B8 format
protected IVTR_ESSENCE_FASHION m_Essence; // Fashion essence data
// Data in database
protected FASHION_MAJOR_TYPE m_pDBMajorType;
protected FASHION_SUB_TYPE m_pDBSubType;
protected FASHION_ESSENCE m_pDBEssence;
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFashion(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_FASHION;
m_Essence = new IVTR_ESSENCE_FASHION();
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (FASHION_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBMajorType = (FASHION_MAJOR_TYPE)pDB.get_data_ptr(m_pDBEssence.id_major_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBSubType = (FASHION_SUB_TYPE)pDB.get_data_ptr(m_pDBEssence.id_sub_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_i64EquipMask = m_pDBSubType.equip_fashion_mask;
m_iProcType = (int)m_pDBEssence.proc_type;
// reset the info
DefaultInfo();
}
public EC_IvtrFashion(EC_IvtrFashion other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_pDBMajorType = other.m_pDBMajorType;
m_pDBSubType = other.m_pDBSubType;
m_Essence = other.m_Essence;
m_iGender = other.m_iGender;
m_wColor = other.m_wColor;
m_color = other.m_color;
}
// Set item detail information
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
// Note: because fashion is not an absolute equipment, so skip
// CECIvtrEquip::SetItemInfo().
if (pInfoData == null || iDataLen == 0)
{
m_bNeedUpdate = false;
return true;
}
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
var size = Marshal.SizeOf<IVTR_ESSENCE_FASHION>();
m_Essence = new IVTR_ESSENCE_FASHION(dr.ReadData(size));
}
catch (Exception e)
{
Debug.LogError("CECIvtrFashion::SetItemInfo, data read error (" + e.GetType() + e.StackTrace + ")");
return false;
}
LevelReq = m_Essence.require_level;
m_wColor = m_Essence.color;
m_iGender = m_Essence.gender;
m_color = (uint)FASHION_WORDCOLOR_TO_A3DCOLOR(m_wColor).GetHashCode();
m_bNeedUpdate = false;
return true;
}
// Get item default information from database
public override void DefaultInfo()
{
LevelReq = m_pDBEssence.require_level;
m_wColor = 0x7fff;
m_iGender = m_pDBEssence.gender;
m_color = 0xffffffff;
// these data also stored in essence, sync it here
m_Essence.require_level = LevelReq;
m_Essence.color = m_wColor;
m_Essence.gender = (ushort)m_iGender;
}
public static Color FASHION_WORDCOLOR_TO_A3DCOLOR(ushort color)
{
return new Color(((color & (0x1f << 10)) >> 7), ((color & (0x1f << 5)) >> 2), ((color & 0x1f) << 3));
}
public string GetSubTypeName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBSubType.name != null && m_pDBSubType.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBSubType.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBSubType.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return "";
}
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
return "";
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
int namecol = DecideNameCol();
// Item name
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddBindDescText();
AddExpireTimeDesc();
// Sub class name
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_CLASSNAME), GetSubTypeName());
// Color
// Use m_iScaleType == SCALE_BUY to judge whether this item is in NPC's pack,
// this may not be a valid way
if (m_pDBEssence.equip_location != (int)enumSkinShow.enumSkinShowArmet && m_pDBEssence.equip_location != (int)enumSkinShow.enumSkinShowHand)
{
if (m_iScaleType == (int)EC_IvtrItem.ScaleType.SCALE_BUY)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLOR));
AddDescText(white, true, (" ???"));
}
else
{
// Extract RGB components from m_color (X8R8G8B8 format)
int colorRed = (int)((m_color >> 16) & 0xFF);
int colorGreen = (int)((m_color >> 8) & 0xFF);
int colorBlue = (int)(m_color & 0xFF);
string szCol = string.Format("^{0:X2}{1:X2}{2:X2}", colorRed, colorGreen, colorBlue);
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLOR));
m_strDesc += " ";
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLORRECT), szCol);
}
}
// Level requirment
if (LevelReq > 0)
{
int lcol = pHost.GetMaxLevelSofar() >= LevelReq ? white : red;
AddDescText(lcol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), LevelReq);
}
// fashion weapon profession requirment and weapon action type
if (m_pDBEssence.equip_location == (int)enumSkinShow.enumSkinShowHand)
{
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVEL), m_pDBEssence.level);
AddProfReqDesc(m_pDBEssence.character_combo_id);
AddActionTypeDescText((int)m_pDBEssence.action_type);
}
// Gender requirement
CECStringTab pFixMsg = EC_Game.GetFixedMsgs();
int col = (pHost.GetGender() == m_iGender) ? white : red;
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GENDERREQ));
m_strDesc += " ";
if (m_iGender == (int)GENDER.GENDER_MALE)
AddDescText(col, true, pFixMsg.GetWideString((int)FixedMsg.FIXMSG_GENDER_MALE));
else
AddDescText(col, true, pFixMsg.GetWideString((int)FixedMsg.FIXMSG_GENDER_FEMALE));
// Price
AddPriceDesc(white, bRepair);
// Fashion level
if (m_pDBEssence.level > 0)
{
m_strDesc += "\\r";
m_strDesc += pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COL_WHITE);
for (int i=0; i < m_pDBEssence.level; i++)
m_strDesc += pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PENTAGON);
}
// Extend description
AddExtDescText();
return m_strDesc;
}
public bool HasRandomProp()
{
return false;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
public int GetFashionSuiteID()
{
Dictionary<int, int> suiteEquipTab = EC_Game.GetSuiteEquipTab();
return suiteEquipTab.ContainsKey(TemplateId) ? suiteEquipTab[TemplateId] : 0;
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFirework : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFirework(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,228 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrFlysword : EC_IvtrItem
/// <summary>
/// Flysword Item (Phi kiem).
/// </summary>
public class EC_IvtrFlysword : EC_IvtrEquip
{
protected int m_iCurTime; // Current time counter in ms
protected IVTR_ESSENCE_FLYSWORD m_Essence;
protected FLYSWORD_ESSENCE m_pDBEssence;
/// <summary>
/// Flysword Item (Phi kiem)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrFlysword(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_FLYSWORD;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (FLYSWORD_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = EC_IvtrType.EQUIP_MASK64_FLYSWORD;
m_bUseable = true;
m_bNeedUpdate = false;
}
public EC_IvtrFlysword(EC_IvtrFlysword other) : base(other)
{
m_iCurTime = other.m_iCurTime;
m_Essence = other.m_Essence;
m_pDBEssence = other.m_pDBEssence;
MadeFrom = other.MadeFrom;
Maker = other.Maker;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
// Note: because fly sword isn't an absolute equipment, so skip
// CECIvtrEquip::SetItemInfo().
if (pInfoData == null || iDataLen == 0)
{
m_bNeedUpdate = false;
return true;
}
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
m_Essence = new IVTR_ESSENCE_FLYSWORD(dr.ReadData(Marshal.SizeOf<IVTR_ESSENCE_FLYSWORD>()));
base.ReadMakerInfo(dr);
}
catch (Exception e)
{
Debug.LogError("CECIvtrFlySword::SetItemInfo, data read error (" + e.GetType() + ")");
return false;
}
LevelReq = m_Essence.require_level;
m_bNeedUpdate = false;
m_iCurTime = m_Essence.cur_time * 1000;
return true;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
return string.Empty;
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddBindDescText();
// Is destroying?
AddDestroyingDesc((int)m_pDBEssence.id_drop_after_damaged, m_pDBEssence.num_drop_after_damaged);
AddExpireTimeDesc();
// level
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVEL), m_Essence.level);
// whether can be improved
if (IsImprovable())
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_GREEN,true,pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FLYSWORD_IMPROVE),m_Essence.improve_level,GetMaxImproveLevel());
else
AddDescText(white,true,pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FLYSWORD_NOIMPROVED));
// Normal fly speed bonus
if (m_Essence.speed_increase > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDFLYSPEED), m_Essence.speed_increase);
// Quick fly speed bonus
if (m_Essence.speed_increase2 > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDFLYSPEED2), m_Essence.speed_increase2);
// Remain time
if (GetMaxTime() > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_REMAINTIME), GetCurTime(), GetMaxTime());
// Profession requirement
AddProfReqDesc((uint)m_Essence.profession);
// Level requirement
if (LevelReq > 0)
{
int col = pHost.GetMaxLevelSofar() >= LevelReq ? white : red;
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), LevelReq);
}
// Element consume
// AddDescText(white, true, pDescTab->GetWideString(ITEMDESC_ELEMENTTIME), m_Essence.time_per_element);
// Price
AddPriceDesc(white, bRepair);
AddMakerDesc();
// Suite description
AddSuiteDesc();
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get max time
protected int GetMaxTime()
{
return (int)m_Essence.max_time;
}
// Get max element number
protected int GetMaxElement()
{
return (int)((float)m_Essence.max_time / m_Essence.time_per_element + 0.5f);
}
// Get time each element equal to
protected int GetElementTime()
{
return m_Essence.time_per_element;
}
// Get number of element if time is filled to full. This is just the number
// of element which has been used
protected int GetUsedElementNum()
{
return (int)((m_Essence.max_time - GetCurTime()) / (float)m_Essence.time_per_element);
}
// Get drop model for shown
protected string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
public override bool IsRare()
{
return base.IsRare() || m_Essence.level >= 6;
}
protected bool IsImprovable()
{
return m_pDBEssence.max_improve_level > 0 && m_pDBEssence.improve_config[0].require_item_num > 0;
}
protected bool CanBeImproved()
{
if(m_pDBEssence.max_improve_level <=0) return false;
if(m_Essence.improve_level>= GetMaxImproveLevel()) return false;
return m_pDBEssence.improve_config[m_Essence.improve_level].require_item_num > 0;
}
protected int GetMaxImproveLevel()
{
int maxL = m_pDBEssence.improve_config.Length;
int i = 0;
for (i = 0; i < maxL; i++)
{
if(m_pDBEssence.improve_config[i].require_item_num == 0)
break;
}
return Mathf.Min(m_pDBEssence.max_improve_level, i);
}
protected int GetCurTime() { return m_Essence.cur_time; }
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrForceToken : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrForceToken(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGeneralCard : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGeneralCard(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGeneralCardDice : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGeneralCardDice(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGmGenerator : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGmGenerator(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,763 @@
using BrewMonster.Scripts.Managers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
using BrewMonster.Scripts;
using BrewMonster.Scripts.Skills;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGoblin : EC_IvtrItem
/// <summary>
/// The goblin item class (cac loai tinh linh).(not completed, need generate class).
/// This feature is skip for now.
/// </summary>
public class EC_IvtrGoblin : EC_IvtrEquip
{
#region const, enum and struct
const int MAX_ELF_REFINE_LEVEL = 36;
const int INITIAL_MAX_VIGOR = 1000;
enum ElfSkillNum
{
MAX_SKILLNUM = 8, // Max skill num
SKILL_LEARN_PT = 40, // ÿSKILL_LEARN_PTܶѧһ (ѹʱ 2009-08-24)
INIT_SKILL_NUM = 4, // ʼ
};
public struct GOBLINSKILL
{
public ushort skill;
public short level;
}
#endregion
#region Array and List declaration
// Refine effect of goblin
int[,] m_iRefineEffect = new int[MAX_ELF_REFINE_LEVEL, 3] {
{45,0,0},
{100,0,0},
{165,0,0},
{240,0,0},
{325,0,0},
{420,0,0},
{420,1,0},
{420,2,0},
{420,2,1},
{420,2,2}, // 10
{420,3,3},
{420,4,4},
{420,6,5},
{420,9,6},
{420,12,7},
{420,16,8},
{420,20,9},
{420,24,11},
{420,28,13},
{420,32,15}, // 20
{420,36,17},
{420,41,19},
{420,46,21},
{420,51,24},
{420,56,27},
{420,61,30},
{420,66,33},
{420,72,36},
{420,78,39},
{420,84,42}, // 30
{420,90,45},
{420,96,48},
{420,102,51},
{420,108,54},
{420,114,57},
{420,120,60}
};
int[] m_iRefineMaterial = new int[MAX_ELF_REFINE_LEVEL] {
1, 2, 7, 20, 50, 110, 220, 390, 500, 550, // 10
600, 650, 700, 750, 800, 850, 900, 950, 1000, 1050, // 20
1100, 1150, 1200, 1250, 1300, 1350, 1400, 1450, 1500, 1550, // 30
1600, 1650, 1700, 1750, 1800, 1850,
};
static int[] elf_exp_loss_constant = new int[151] {0, //no use
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
100, 100, 100, 100, 100, //105
// ΪڷԳȼ150
100, 100, 100, 100, 100, //110
100, 100, 100, 100, 100,
100, 100, 100, 100, 100, //120
100, 100, 100, 100, 100,
100, 100, 100, 100, 100, //130
100, 100, 100, 100, 100,
100, 100, 100, 100, 100, //140
100, 100, 100, 100, 100,
100, 100, 100, 100, 100, //150
};
//ʹrmbĿȼӦijɹ
float[] elf_refine_succ_prob_ticket0 = new float[MAX_ELF_REFINE_LEVEL+1] {
1.0f, 0.4f, 0.315789474f, 0.338983051f, 0.377358491f, 0.417754569f, 0.463208685f, 0.510769231f, 0.55f, 0.55f,
0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f,
0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f,
0.55f, 0.55f, 0.55f, 0.55f, 0.55f, 0.55f,
0.0f}; // [36]: cannot refine any more
//ʹ絤(߳ɹʣʧܵȼ0)ĿȼӦijɹ
static float[] elf_refine_succ_prob_ticket1 = new float[MAX_ELF_REFINE_LEVEL+1]{
1.0f, 0.6f, 0.368421053f, 0.355932203f, 0.383647799f, 0.420365535f, 0.464414958f, 0.511384615f, 0.557001027f, 0.60032861f,
0.640836732f, 0.678052261f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f,
0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f,
0.7f, 0.7f, 0.7f, 0.7f, 0.7f, 0.7f,
0.0f
};
//ʹϵ(ɹʣʧܵȼ1)ĿȼӦijɹ
static float[] elf_refine_succ_prob_ticket2 = new float[MAX_ELF_REFINE_LEVEL+1]{
1.0f, 0.6f, 0.333333333f, 0.296296296f, 0.3f, 0.314814815f, 0.337313433f, 0.360708535f, 0.381453155f, 0.4f,
0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f,
0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f,
0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 0.4f,
0.0f
};
//ʹλõ(ɹʹøиޣʧܵȼ)ĿȼӦʹɹ=/Էŵ
static int[] elf_refine_max_use_ticket3 = new int[MAX_ELF_REFINE_LEVEL+1]{
1 , 2 , 7 , 20 , 50 , 112 , 223 , 398 , 648 , 974 ,
1366 , 1806 , 2271 , 2739 , 3191 , 3612 , 3993 , 4331 , 4623 , 4873 ,
5084 , 5260 , 5405 , 5525 , 5623 , 5702 , 5767 , 5819 , 5861 , 5895 ,
5923 , 5945 , 5962 , 5977 , 5988 , 5997,
100000000
};
#endregion
List<GOBLINSKILL> m_aSkills;
List<uint> m_aEquipID;
IVTR_ESSENCE_GOBLIN m_Essence; // Goblin essence data
// Data in database
GOBLIN_ESSENCE m_pDBEssence;
/// <summary>
/// Create goblin item (cac loai tinh linh).
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGoblin(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_GOBLIN;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (GOBLIN_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
Price = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_bNeedUpdate = false;
m_i64EquipMask = (long)EC_IvtrType.EQUIP_MASK64_GOBLIN;
CurEndurance = 1;
MaxEndurance = 1;
}
public EC_IvtrGoblin(EC_IvtrGoblin other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_Essence = other.m_Essence; // Copy essence
// Copy skills
int i, iNumSkill = other.m_aSkills.Count;
m_aSkills = new List<GOBLINSKILL>(iNumSkill);
for (i=0; i < iNumSkill; i++)
m_aSkills[i] = other.m_aSkills[i];
// Copy equipments
int iNumEquip = other.m_aEquipID.Count;
m_aEquipID = new List<uint>(iNumEquip);
for(i=0; i< iNumEquip; i++)
m_aEquipID[i] = other.m_aEquipID[i];
}
public IVTR_ESSENCE_GOBLIN GetEssence() { return m_Essence; }
// Get database data
public GOBLIN_ESSENCE GetDBEssence() { return m_pDBEssence; }
// Get skill number
public int GetSkillNum() { return m_aSkills.Count; }
public GOBLINSKILL GetSkill(int id) { if(id>=0 && id<m_aSkills.Count) return m_aSkills[id]; else throw new Exception("id is out of range"); }
// Set Goblin inventory stamina
void SetStamina(int iStamina) { m_Essence.data.stamina = iStamina; }
// Set Goblin Exp
public void SetExp(int iExp) { m_Essence.data.exp = (uint)iExp; }
float GetRefineSuccProb0(int iLevel)
{
return elf_refine_succ_prob_ticket0[iLevel];
}
float GetRefineSuccProb1(int iLevel)
{
if (iLevel < 0 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return elf_refine_succ_prob_ticket1[iLevel];
}
float GetRefineSuccProb2(int iLevel)
{
if (iLevel < 0 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return elf_refine_succ_prob_ticket2[iLevel];
}
float GetRefineSuccProb3(int iLevel, int iNum)
{
if (iLevel < 0 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
if (iNum >= elf_refine_max_use_ticket3[iLevel])
{
return 1.0f;
}
if (iLevel == MAX_ELF_REFINE_LEVEL)
{
return 0.0f;
}
return (float)iNum / (float)elf_refine_max_use_ticket3[iLevel];
}
int GetRefineLife(int iLevel)
{
if (iLevel < 1 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return m_iRefineEffect[iLevel-1, 0];
}
int GetRefineAtkLvl(int iLevel)
{
if (iLevel < 1 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return m_iRefineEffect[iLevel-1, 1];
}
int GetRefineDfsLvl(int iLevel)
{
if (iLevel < 1 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return m_iRefineEffect[iLevel-1, 2];
}
int GetRefineMaterial(int iLevel)
{
if (iLevel < 1 || iLevel > MAX_ELF_REFINE_LEVEL)
{
throw new Exception("iLevel is out of range");
}
return m_iRefineMaterial[iLevel-1];
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if (pInfoData == null || iDataLen == 0)
return true;
try
{
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
// Set _GOBLIN_DATA info
// Calculate size manually: uint(4) + 7*short(14) + short[5](10) + short(2) + 2*int(8) = 40 bytes
const int GOBLIN_DATA_SIZE = 40;
m_Essence.data = new IVTR_ESSENCE_GOBLIN._GOBLIN_DATA(dr.ReadData(GOBLIN_DATA_SIZE));
// Change proc type
if(m_Essence.data.status_value < 0)
{
m_iProcType |= (int)ProcType.PROC_SELLABLE;
m_iProcType |= (int)ProcType.PROC_TRADEABLE;
}
else
{
m_iProcType &= ~(int)ProcType.PROC_SELLABLE;
m_iProcType &= ~(int)ProcType.PROC_TRADEABLE;
}
// Set equipment info
int i, iEquipCnt = dr.ReadInt();
m_Essence.equip_cnt = iEquipCnt;
m_aEquipID = new List<uint>(iEquipCnt);
for(i=0; i< iEquipCnt; i++)
{
m_aEquipID[i] = (uint)dr.ReadInt();
}
// Set skill info
int iSkillCnt = dr.ReadInt();
m_Essence.skill_cnt = iSkillCnt;
m_aSkills = new List<GOBLINSKILL>(iSkillCnt);
for(i=0; i< iSkillCnt; i++)
{
GOBLINSKILL s = m_aSkills[i];
s.skill = (ushort)dr.ReadShort();
s.level = (short)dr.ReadShort();
}
}
catch (Exception e)
{
Debug.LogError("CECIvtrGoblin::SetItemInfo, data read error (" + e.GetType() + ")");
return false;
}
return true;
}
public override void DefaultInfo()
{
base.DefaultInfo();
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon1;
}
public override string GetName()
{
return m_pDBEssence.Name;
}
protected override string GetNormalDesc(bool bRepair)
{
if (m_bNeedUpdate)
{
return string.Empty;
}
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int yellow = (int)DescriptipionMsg.ITEMDESC_COL_YELLOW;
int green = (int)DescriptipionMsg.ITEMDESC_COL_GREEN;
int color = white;
int i;
int namecol = DecideNameCol();
// Item name: always use the name in template
if(m_Essence.data.refine_level != 0)
{
AddDescText(namecol, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), m_pDBEssence.Name);
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_REFINE_LEVEL), m_Essence.data.refine_level);
}
else
{
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), m_pDBEssence.Name);
}
AddIDDescText();
// Goblin level
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_LEVEL), m_Essence.data.level);
// Strength, Agility, Vitality, Energy + gained from equipment
int iEquipStrength = 0;
int iEquipAgility = 0;
int iEquipTili = 0;
int iEquipEnergy = 0;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
GOBLIN_EQUIP_ESSENCE pDBEssence;
for(i=0; i< m_aEquipID.Count; i++)
{
pDBEssence = (GOBLIN_EQUIP_ESSENCE)pDB.get_data_ptr(m_aEquipID[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
iEquipStrength += pDBEssence.strength;
iEquipAgility += pDBEssence.agility;
iEquipTili += pDBEssence.tili;
iEquipEnergy += pDBEssence.energy;
}
color = (iEquipStrength == 0) ? white : green;
AddDescText(color, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_STRENGTH), iEquipStrength + m_Essence.data.strength + m_pDBEssence.init_strength);
color = (iEquipAgility == 0) ? white : green;
AddDescText(color, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_AGILITY), iEquipAgility + m_Essence.data.agility + m_pDBEssence.init_agility);
color = (iEquipTili == 0) ? white : green;
AddDescText(color, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_VITALITY), iEquipTili + m_Essence.data.vitality + m_pDBEssence.init_tili);
color = (iEquipEnergy == 0) ? white : green;
AddDescText(color, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ENERGY), iEquipEnergy + m_Essence.data.energy + m_pDBEssence.init_energy);
// Grow degree
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_GROW_DEGREE), GetGrowDegree());
// Random status point
int iMaxRandPt = GetMaxRandomStatusPt();
if(iMaxRandPt != 0)
{
int iRandPt = GetRandomStatusPt();
int iGrowDegree = GetGrowDegree();
int iRandomPt = GetRandomStatusPt();
int iMaxPt= GetMaxStautsPt();
if(iRandomPt <= iGrowDegree*0.8)
color = (int)DescriptipionMsg.ITEMDESC_COL_GREEN;
else if(iRandomPt <= iGrowDegree)
color = (int)DescriptipionMsg.ITEMDESC_COL_LIGHTBLUE;
else if(iRandomPt <= (iMaxPt - iGrowDegree)*0.2 + iGrowDegree)
color = (int)DescriptipionMsg.ITEMDESC_COL_PURPLE;
else if(iRandomPt < iMaxPt)
color = (int)DescriptipionMsg.ITEMDESC_COL_YELLOW;
else if(iRandomPt == iMaxPt)
color = (int)DescriptipionMsg.ITEMDESC_COL_DARKGOLD;
AddDescText(color, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_RANDPT), iRandPt, iMaxRandPt);
}
// Energy
int iEnergy = INITIAL_MAX_VIGOR + GetBasicProp(2);
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_ENERGY), iEnergy);
// Energy restore speed
float fRestoreSpeed = 1.0f + GetBasicProp(3)*0.02f;
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_ENERGY_RESTORE), fRestoreSpeed);
// Current stamina
int iCurrStamina = m_Essence.data.stamina;
if(iCurrStamina > 999999)
iCurrStamina = 999999;
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_STAMINA), iCurrStamina);
// Current refine effect
if(m_Essence.data.refine_level != 0)
{
int iAttackLevel, iDefenceLevel, iLife;
iLife = GetRefineLife(m_Essence.data.refine_level);
iAttackLevel = GetRefineAtkLvl(m_Essence.data.refine_level);
iDefenceLevel = GetRefineDfsLvl(m_Essence.data.refine_level);
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_REFINE_EFFECT), iLife, iAttackLevel, iDefenceLevel);
}
// Trade state
int iTradeState = m_Essence.data.status_value;
if(iTradeState == 0)
AddDescText(white,true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_TRADE_PROTECT));
else if(iTradeState > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_TRADE_UNPROTECT));
else if(iTradeState < 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLIN_CANTRADE));
// Price
AddPriceDesc(white, bRepair);
// Equipment info
if(m_aEquipID.Count != 0)
m_strDesc += "\\r";
for(i=0; i< m_aEquipID.Count; i++)
{
pDBEssence = (GOBLIN_EQUIP_ESSENCE)pDB.get_data_ptr(m_aEquipID[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_GOBLINEQUIP_POS_1 + pDBEssence.equip_type));
AddDescText(white, true, " %s", pDBEssence.name);
}
// Skill list
if(m_aSkills.Count != 0 && m_aEquipID.Count == 0)
m_strDesc += "\\r";
for (i=0; i < m_aSkills.Count; i++)
{
GOBLINSKILL gSkill = m_aSkills[i];
string szName = EC_Game.GetSkillDesc().GetWideString(gSkill.skill * 10);
if(i==m_aSkills.Count-1)
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_YELLOW, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PETSKILL), szName != null ? szName : "", gSkill.level);
else
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_YELLOW, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PETSKILL), szName != null ? szName : "", gSkill.level);
}
AddExtDescText();
return m_strDesc;
}
// Get grow degree
int GetGrowDegree()
{
float fGrowDegree = 0.0f;
for(int i=0;i<10;i++)
{
fGrowDegree += m_pDBEssence.rand_prop[i].rand_num * m_pDBEssence.rand_prop[i].rand_rate;
}
return (int)(fGrowDegree*10 + 0.5f);
}
// Max random status points that this goblin can get, depending on player's RP value
int GetMaxRandomStatusPt()
{
return (GetMaxStautsPt()/10) * (m_Essence.data.level/10);
}
// Max status points that this goblin can get
int GetMaxStautsPt()
{
int iMaxPt = 0;
for(int i= 0;i<10;i++)
{
if(iMaxPt < m_pDBEssence.rand_prop[i].rand_num)
iMaxPt = m_pDBEssence.rand_prop[i].rand_num;
}
return iMaxPt * 10;
}
// Current random status point
int GetRandomStatusPt()
{
return m_Essence.data.total_attribute - (m_Essence.data.level-1);
}
// Get basic property
int GetBasicProp(int iIndex)
{
if(iIndex < 0 || iIndex >= 4)
{
throw new Exception("iIndex is out of range");
}
int i, iRet = 0;
// Strength, Agility, Vitality, Energy + gained from equipment
int iEquipStrength = 0;
int iEquipAgility = 0;
int iEquipTili = 0;
int iEquipEnergy = 0;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
GOBLIN_EQUIP_ESSENCE pDBEssence;
for(i=0; i< m_aEquipID.Count; i++)
{
pDBEssence = (GOBLIN_EQUIP_ESSENCE)pDB.get_data_ptr(m_aEquipID[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
iEquipStrength += pDBEssence.strength;
iEquipAgility += pDBEssence.agility;
iEquipTili += pDBEssence.tili;
iEquipEnergy += pDBEssence.energy;
}
if(iIndex == 0)
iRet = iEquipStrength + m_Essence.data.strength + m_pDBEssence.init_strength;
else if(iIndex == 1)
iRet = iEquipAgility + m_Essence.data.agility + m_pDBEssence.init_agility;
else if(iIndex == 2)
iRet = iEquipTili + m_Essence.data.vitality + m_pDBEssence.init_tili;
else if(iIndex == 3)
iRet = iEquipEnergy + m_Essence.data.energy + m_pDBEssence.init_energy;
return iRet;
}
uint GetDestroyExp()
{
double dRetExp = 0;
int iLevel = m_Essence.data.level;
uint iCurrExp = m_Essence.data.exp;
double factor = 0.0f;
for(int i=1;i<iLevel;i++)
{
uint iPlayerLvlUpExp = (uint)(EC_Game.GetGameRun().GetHostPlayer().GetLevelUpExp(i) * m_pDBEssence.exp_factor);
factor = (double)elf_exp_loss_constant[i]/(double)elf_exp_loss_constant[m_Essence.data.level];
dRetExp += (((double)iPlayerLvlUpExp * 0.1) / factor);
}
dRetExp += ((double)iCurrExp * 0.1);
return (dRetExp>4200000000.0) ? 4200000000 : (uint)dRetExp;
}
// Check whether goblin can trade
public override bool IsTradeable()
{
return (m_iProcType & (int)ProcType.PROC_TRADEABLE) != 0;
}
// Get drop model for shown
public override string GetDropModel() => m_pDBEssence.FileMatter;
// Get Equipment id
public uint GetEquip(int id)
{
if(id<0 || id>=4)
throw new Exception("id is out of range");
int iEquipPos = (int)m_aEquipID[id];
if(iEquipPos == id)
return m_aEquipID[id];
return 0;
}
// Check whether goblin can learn specified skill
// 0:ɹ 1:SP 2:
// 3: 4:ܸ 5:ID
// 6:Ǯ 7:С 8:ûм
// 9:ȼ 10:޲ 11:ְҵƥ
// 12:޲ְҵƥ
int CheckSkillLearnCondition(int idSkill, bool bCheckBook)
{
int iLevel = 1, i;
for(i=0;i<m_aSkills.Count;i++)
{
if(m_aSkills[i].skill == idSkill)
{
iLevel = m_aSkills[i].level + 1;
break;
}
}
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
if (iLevel == 1 && bCheckBook)
{
// Do we have the skill book ?
int idBook = ElementSkill.GetRequiredBook((uint)idSkill, iLevel);
if ((idBook != 0) && (pHost.GetPack().FindItem(idBook) == -1))
return 8;
}
// Build player information
GoblinRequirement Info;
Info = new GoblinRequirement();
for(i=0;i<5;i++)
{
Info.genius[i] = GetGenius(i);
}
Info.profession = pHost.GetProfession();
Info.sp = pHost.GetBasicProps().iSP;
Info.money = (int)pHost.GetMoneyAmount();
Info.level = m_Essence.data.level;
Info.mp = INITIAL_MAX_VIGOR + GetBasicProp(2);
int iRet = ElementSkill.GoblinLearn((uint)idSkill, Info, iLevel);
if(iRet == 0) // success
{
if((GetSkillNum() > GetCurrMaxSkillNum()) ||
(GetSkillNum() == GetCurrMaxSkillNum() && iLevel == 1))
return 4;
}
return iRet;
}
// Get genius point
int GetGenius(int iIndex)
{
if(iIndex < 0 || iIndex >= 5)
{
throw new Exception("iIndex is out of range");
}
int i, iRet = m_Essence.data.genius[iIndex];
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
GOBLIN_EQUIP_ESSENCE pDBEssence;
for(i=0; i< m_aEquipID.Count; i++)
{
pDBEssence = (GOBLIN_EQUIP_ESSENCE)pDB.get_data_ptr(m_aEquipID[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
iRet += pDBEssence.magic[iIndex];
}
return (iRet > 8) ? 8 : iRet;
}
int GetCurrMaxSkillNum()
{
int iRandPt = GetRandomStatusPt();
if(iRandPt > 90)
return 8;
else if(iRandPt > 80)
return 7;
else if(iRandPt > 70)
return 6;
else if(iRandPt > 50)
return 5;
return (int)ElfSkillNum.INIT_SKILL_NUM;
}
//Check whether goblin can cast specified skill
/// <summary>
/// implement later
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
bool CheckSkillCastCondition(int index)
{
return true;
// if(index<0 || index >= m_aSkills.Count)
// {
// throw new Exception("index is out of range");
// return false;
// }
// if (EC_Game.GetGameRun().GetHostPlayer().GetBattleInfo().IsChariotWar())
// return false; // սս ֹ
// GNET::GoblinUseRequirement Info;
// memset(&Info, 0, sizeof(Info));
// for(int i=0;i<5;i++)
// {
// Info.genius[i] = GetGenius(i);
// }
// Info.level = m_Essence.data.level;
// Info.move_env = g_pGame->GetGameRun()->GetHostPlayer()->GetMoveEnv();
// GOBLINSKILL pSkill = GetSkill(index);
// int ret = GNET::ElementSkill::GoblinCondition(pSkill.skill, Info, pSkill.level);
// if(ret == 4)
// return false;
// return true;
}
int GetModelLevel()
{
int iGrowDegree = GetGrowDegree();
int iRandomPt = GetRandomStatusPt();
int iMaxPt= GetMaxStautsPt();
int iModelLvl = 0;
// ɳȡģ͵Ĺϵ֪ͬ
if(iRandomPt <= iGrowDegree*0.8)
iModelLvl = 1;
else if(iRandomPt <= iGrowDegree)
iModelLvl = 2;
else if(iRandomPt <= (iMaxPt - iGrowDegree)*0.2 + iGrowDegree)
iModelLvl = 3;
else
iModelLvl = 4;
return iModelLvl;
}
}
}
// Get current max skill number
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGoblinEquip : EC_IvtrEquip
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGoblinEquip(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrGoblinExpPill : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrGoblinExpPill(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrIncSkillAbility : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrIncSkillAbility(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -807,7 +807,8 @@ namespace BrewMonster.Scripts.Managers
var pItem = new EC_IvtrItem(tid, expire_date);
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
object data = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
Debug.Log("DataType: " + DataType);
//Active this to log the data type of item when creating an item
//Debug.Log("Create item data: DataType: " + DataType + " tid: " + tid );
switch(DataType)
{
case DATA_TYPE.DT_WEAPON_ESSENCE:
@@ -844,7 +845,7 @@ namespace BrewMonster.Scripts.Managers
pItem = new EC_IvtrFlysword(tid, expire_date);
break;
case DATA_TYPE.DT_TOWNSCROLL_ESSENCE:
pItem = new EC_IvtrTownscroll(tid, expire_date);
pItem = new EC_IvtrTownScroll(tid, expire_date);
break;
case DATA_TYPE.DT_UNIONSCROLL_ESSENCE:
pItem = new EC_IvtrUnionscroll(tid, expire_date);
@@ -859,7 +860,7 @@ namespace BrewMonster.Scripts.Managers
pItem = new EC_IvtrTossMat(tid, expire_date);
break;
case DATA_TYPE.DT_TASKMATTER_ESSENCE:
pItem = new EC_IvtrTaskmatter(tid, expire_date);
pItem = new EC_IvtrTaskItem(tid, expire_date);
break;
case DATA_TYPE.DT_STONE_ESSENCE:
pItem = new EC_IvtrStone(tid, expire_date);
@@ -1199,9 +1200,11 @@ namespace BrewMonster.Scripts.Managers
/// <summary>Add item amount. Returns new amount of item.</summary>
public int AddAmount(int iAmount)
{
Debug.Log($"[EC_IvtrItem] Old Amount: {m_iCount}");
m_iCount += iAmount;
if (m_iCount < 0) m_iCount = 0;
if (m_iCount > m_iPileLimit) m_iCount = m_iPileLimit;
//if (m_iCount > m_iPileLimit) m_iCount = m_iPileLimit;
Debug.Log($"[EC_IvtrItem] New Amount: {m_iCount}");
return m_iCount;
}
@@ -1383,6 +1386,8 @@ namespace BrewMonster.Scripts.Managers
CECStringTab pDescTab = EC_Game.GetItemDesc();
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ERRORITEM));
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, "({0})", m_tid);
m_strDesc += "\\r";
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_RED, false, "This Item Type is not implemented yet. Type of {0}", this.GetType().Name);
TrimLastReturn();
return m_strDesc;
@@ -1401,9 +1406,63 @@ namespace BrewMonster.Scripts.Managers
protected virtual void AddPriceDesc(int col, bool bRepair)
{
// Basic price string using scaled price; color is ignored at this level.
int price = GetScaledPrice();
if (price <= 0) return;
AddDescText(col, true, "Price: {0}", price);
if ((!IsEquipment() && bRepair) || m_iPrice == 0 || m_fPriceScale == 0.0f)
{
TrimLastReturn();
return;
}
// use specific color for the item price
if((int)DescriptipionMsg.ITEMDESC_COL_WHITE == col)
{
if( m_iPrice >= 100000000) // 100 million
col = (int)DescriptipionMsg.ITEMDESC_COL_GREEN;
else if ( m_iPrice >= 10000000) // 10 million
col = (int)DescriptipionMsg.ITEMDESC_COL_DARKGOLD;
else if ( m_iPrice >= 1000000) // 1 million
col = (int)DescriptipionMsg.ITEMDESC_COL_YELLOW;
}
CECStringTab pDescTab = EC_Game.GetItemDesc();
if (m_iScaleType == (int)ScaleType.SCALE_OFFLINESHOP)
{
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PRICE));
string s1,s2;
BuildPriceNumberStr(m_iPrice, out s1);
if (GetCount()>1)
{
s2 = (m_iPrice * (long)GetCount()).ToString();
AddDescText(-1, false, " %s (%s)", s1, s2);
}
else
AddDescText(-1, false, " %s", s1);
}
else if (m_iScaleType == (int)ScaleType.SCALE_BOOTH || m_tid == 21652) // 21651: yinpiao
{
string s1;
BuildPriceNumberStr(m_iPrice, out s1);
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_UNITPRICE));
AddDescText(-1, false, " %s", s1);
}
else if (m_iScaleType == (int)ScaleType.SCALE_SELL && m_iCount > 1 && m_tid != 21652)
{
string s1, s2;
BuildPriceNumberStr(m_iPrice, out s1);
BuildPriceNumberStr(GetScaledPrice(), out s2);
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PRICE));
AddDescText(-1, false, " %s (%s)", s1, s2);
}
else
{
string s1;
BuildPriceNumberStr(GetScaledPrice(), out s1);
AddDescText(col, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PRICE));
AddDescText(-1, false, " %s", s1);
}
}
protected virtual void AddProfReqDesc(uint iProfReq)
@@ -1445,12 +1504,131 @@ namespace BrewMonster.Scripts.Managers
protected virtual void AddDescText(int iCol, bool bRet, string szText, params object[] args)
{
string line = (args != null && args.Length > 0) ? string.Format(szText, args) : szText;
// Add color prefix if color is specified
if (iCol >= 0)
{
string colorStr = GetColorString((DescriptipionMsg)iCol);
m_strDesc += colorStr;
}
string line;
if (args != null && args.Length > 0)
{
// Accept both C#-style ("{0}") and printf-style ("%d", "%+d", "%.2f", "%%") formats
if (szText.IndexOf('%') >= 0 && szText.IndexOf('{') < 0)
{
line = FormatPrintfLike(szText, args);
}
else
{
line = string.Format(szText, args);
}
}
else
{
line = szText;
}
m_strDesc += line;
if (bRet)
m_strDesc += "\n";
}
/// <summary>
/// Get color string for color ID
/// Returns color codes in ^RRGGBB format (6 hex digits) for text formatting
/// </summary>
protected virtual string GetColorString(DescriptipionMsg colorId)
{
switch (colorId)
{
case DescriptipionMsg.ITEMDESC_COL_WHITE: return "^FFFFFF"; // White
case DescriptipionMsg.ITEMDESC_COL_GREEN: return "^00FF00"; // Green
case DescriptipionMsg.ITEMDESC_COL_YELLOW: return "^FFFF00"; // Yellow
case DescriptipionMsg.ITEMDESC_COL_DARKGOLD: return "^FF8C00"; // Dark Gold / Orange
case DescriptipionMsg.ITEMDESC_COL_LIGHTBLUE: return "^5998FF"; // Light Blue
case DescriptipionMsg.ITEMDESC_COL_CYANINE: return "^00FFFF"; // Cyan
case DescriptipionMsg.ITEMDESC_COL_RED: return "^FF0000"; // Red
case DescriptipionMsg.ITEMDESC_COL_GRAY: return "^808080"; // Gray
default: return "^FFFFFF"; // Default to white
}
}
/// <summary>
/// Format string using printf-style format specifiers (%d, %+d, %.2f, %s, etc.)
/// Converts printf-style formats to C# string formatting
/// </summary>
private static string FormatPrintfLike(string fmt, object[] args)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
int argIndex = 0;
for (int i = 0; i < fmt.Length; i++)
{
char c = fmt[i];
if (c != '%')
{
sb.Append(c);
continue;
}
if (i + 1 < fmt.Length && fmt[i + 1] == '%')
{
sb.Append('%');
i += 1;
continue;
}
bool plus = false;
int precision = -1;
int j = i + 1;
if (j < fmt.Length && fmt[j] == '+') { plus = true; j++; }
if (j < fmt.Length && fmt[j] == '.')
{
// precision like %.2f
j++;
int start = j;
while (j < fmt.Length && char.IsDigit(fmt[j])) j++;
int.TryParse(fmt.Substring(start, j - start), out precision);
}
if (j < fmt.Length)
{
char spec = fmt[j];
if (spec == 'd')
{
object val = argIndex < args.Length ? args[argIndex++] : 0;
long iv = Convert.ToInt64(val);
string s = iv.ToString();
if (plus && iv >= 0) s = "+" + s;
sb.Append(s);
i = j;
continue;
}
else if (spec == 'f')
{
object val = argIndex < args.Length ? args[argIndex++] : 0.0;
double dv = Convert.ToDouble(val);
string s = precision >= 0 ? dv.ToString("F" + precision) : dv.ToString("F");
if (plus && dv >= 0) s = "+" + s;
sb.Append(s);
i = j;
continue;
}
else if (spec == 's')
{
object val = argIndex < args.Length ? args[argIndex++] : "";
string s = val != null ? val.ToString() : "";
sb.Append(s);
i = j;
continue;
}
}
// Fallback: treat '%' as literal if format not recognized
sb.Append('%');
}
return sb.ToString();
}
// Add extend description to description string / 添加扩展描述到描述字符串
protected void AddExtDescText()
{
@@ -1467,22 +1645,9 @@ namespace BrewMonster.Scripts.Managers
var pDescTab = EC_Game.GetItemDesc();
// Note: ITEMDESC_COL2_BRIGHTBLUE constant - adjust based on actual string table / 注意:ITEMDESC_COL2_BRIGHTBLUE常量 - 根据实际字符串表调整
int green = (int)DescriptipionMsg.ITEMDESC_COL2_BRIGHTBLUE; // ITEMDESC_COL2_BRIGHTBLUE placeholder - adjust this value
if(typeof(EC_IvtrArmor) == this.GetType())
{
Debug.Log("This is an armor");
}
Debug.Log("armor m_iCID: " + m_iCID);
Debug.Log("armor m_iProcType: " + m_iProcType);
if (m_iCID != (int)InventoryClassId.ICID_GOBLIN) // goblin does not need to display these special properties / 地精不需要显示这些特殊属性
{
Debug.Log("m_iCID != (int)InventoryClassId.ICID_GOBLIN");
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_NO_USER_TRASH: " + (m_iProcType & (int)ProcType.PROC_NO_USER_TRASH));
Debug.Log("!((m_iProcType & (int)ProcType.PROC_BINDING) != 0): " + !((m_iProcType & (int)ProcType.PROC_BINDING) != 0));
Debug.Log("((m_iProcType & (int)ProcType.PROC_DROPWHENDIE) != 0): " + ((m_iProcType & (int)ProcType.PROC_DROPWHENDIE) != 0));
Debug.Log("((m_iProcType & (int)ProcType.PROC_DROPPABLE) != 0): " + ((m_iProcType & (int)ProcType.PROC_DROPPABLE) != 0));
Debug.Log("((m_iProcType & (int)ProcType.PROC_SELLABLE) != 0): " + ((m_iProcType & (int)ProcType.PROC_SELLABLE) != 0));
// Exact C++ logic: (PROC_NO_USER_TRASH) || (!PROC_BINDING && (PROC_DROPWHENDIE || ...))
// 精确的C++逻辑:(PROC_NO_USER_TRASH) || (!PROC_BINDING && (PROC_DROPWHENDIE || ...))
if ((m_iProcType & (int)ProcType.PROC_NO_USER_TRASH) != 0
@@ -1506,8 +1671,6 @@ namespace BrewMonster.Scripts.Managers
m_strDesc += szCol;
}
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_DROPWHENDIE: " + (m_iProcType & (int)ProcType.PROC_DROPWHENDIE));
if ((m_iProcType & (int)ProcType.PROC_DROPWHENDIE) != 0)
{
m_strDesc += "\\r";
@@ -1517,10 +1680,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_DROPPABLE: " + (m_iProcType & (int)ProcType.PROC_DROPPABLE));
if ((m_iProcType & (int)ProcType.PROC_DROPPABLE) != 0)
{
m_strDesc += "\\r";
@@ -1530,10 +1690,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_SELLABLE: " + (m_iProcType & (int)ProcType.PROC_SELLABLE));
if ((m_iProcType & (int)ProcType.PROC_SELLABLE) != 0)
{
m_strDesc += "\\r";
@@ -1543,10 +1700,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_TRADEABLE: " + (m_iProcType & (int)ProcType.PROC_TRADEABLE));
if ((m_iProcType & (int)ProcType.PROC_TRADEABLE) != 0)
{
m_strDesc += "\\r";
@@ -1556,10 +1710,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_DISAPEAR: " + (m_iProcType & (int)ProcType.PROC_DISAPEAR));
if ((m_iProcType & (int)ProcType.PROC_DISAPEAR) != 0)
{
m_strDesc += "\\r";
@@ -1569,10 +1720,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_USE: " + (m_iProcType & (int)ProcType.PROC_USE));
if ((m_iProcType & (int)ProcType.PROC_USE) != 0)
{
m_strDesc += "\\r";
@@ -1582,10 +1730,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_DEADDROP: " + (m_iProcType & (int)ProcType.PROC_DEADDROP));
if ((m_iProcType & (int)ProcType.PROC_DEADDROP) != 0)
{
m_strDesc += "\\r";
@@ -1595,10 +1740,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_OFFLINE: " + (m_iProcType & (int)ProcType.PROC_OFFLINE));
if ((m_iProcType & (int)ProcType.PROC_OFFLINE) != 0)
{
m_strDesc += "\\r";
@@ -1608,10 +1750,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_UNREPAIRABLE: " + (m_iProcType & (int)ProcType.PROC_UNREPAIRABLE));
if ((m_iProcType & (int)ProcType.PROC_UNREPAIRABLE) != 0)
{
m_strDesc += "\\r";
@@ -1621,10 +1760,7 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
Debug.Log("m_iProcType: " + m_iProcType);
Debug.Log("m_iProcType & (int)ProcType.PROC_NO_USER_TRASH: " + (m_iProcType & (int)ProcType.PROC_NO_USER_TRASH));
if ((m_iProcType & (int)ProcType.PROC_NO_USER_TRASH) != 0)
{
m_strDesc += "\\r";
@@ -1634,12 +1770,10 @@ namespace BrewMonster.Scripts.Managers
if (!string.IsNullOrEmpty(desc))
m_strDesc += desc;
}
Debug.Log("m_strDesc: " + m_strDesc);
}
}
else
{
Debug.Log("m_iCID == (int)InventoryClassId.ICID_GOBLIN");
TrimLastReturn();
}
}
@@ -1673,7 +1807,10 @@ namespace BrewMonster.Scripts.Managers
protected void AddIDDescText()
{
// Optional: show internal id for debugging
AddDescText(0, true, "ID: {0}", m_tid);
#if UNITY_EDITOR
AddDescText(0, true, "ID: {0}", m_tid);
#endif
}
protected void AddBindDescText()
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrLookInfoItem : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrLookInfoItem(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,104 @@
using BrewMonster.Scripts.Managers;
using BrewMonster;
using BrewMonster.Scripts;
using ModelRenderer.Scripts.GameData;
using ModelRenderer.Scripts.Common;
using BrewMonster.Network;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrMaterial : EC_IvtrItem
{
protected MATERIAL_MAJOR_TYPE m_pDBMajorType;
protected MATERIAL_SUB_TYPE m_pDBSubType;
protected MATERIAL_ESSENCE m_pDBEssence;
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrMaterial(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_MATERIAL;
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (MATERIAL_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBMajorType = (MATERIAL_MAJOR_TYPE)pDB.get_data_ptr(m_pDBEssence.id_major_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBSubType = (MATERIAL_SUB_TYPE)pDB.get_data_ptr(m_pDBEssence.id_sub_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
m_bNeedUpdate = false;
}
public EC_IvtrMaterial(EC_IvtrMaterial other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_pDBMajorType = other.m_pDBMajorType;
m_pDBSubType = other.m_pDBSubType;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
}
@@ -1,15 +1,192 @@
using BrewMonster;
using ModelRenderer.Scripts.GameData;
using System.Collections.Generic;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Medicine item class (cac loai thuoc).
/// This is a part of CEC_IvtrConsume(C++)
/// </summary>
public class EC_IvtrMedicine : EC_IvtrItem
{
protected MEDICINE_MAJOR_TYPE m_pDBMajorType;
protected MEDICINE_SUB_TYPE m_pDBSubType;
protected MEDICINE_ESSENCE m_pDBEssence;
protected int m_iLevelReq;
/// <summary>
/// Create medicine item (cac loai thuoc)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrMedicine(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_MEDICINE;
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (MEDICINE_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBMajorType = (MEDICINE_MAJOR_TYPE)pDB.get_data_ptr(m_pDBEssence.id_major_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBSubType = (MEDICINE_SUB_TYPE)pDB.get_data_ptr(m_pDBEssence.id_sub_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_i64EquipMask = 0;
m_iLevelReq = m_pDBEssence.require_level;
m_iProcType = (int)m_pDBEssence.proc_type;
m_bUseable = true;
m_bNeedUpdate = false;
}
public EC_IvtrMedicine(EC_IvtrMedicine other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_pDBMajorType = other.m_pDBMajorType;
m_pDBSubType = other.m_pDBSubType;
m_iLevelReq = other.m_iLevelReq;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
return m_pDBEssence.Name;
}
public int GetCoolTime(ref int piMax/* NULL */)
{
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
if (!pHost)
return 0;
int iTime = 0;
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 1815:
case 2038: iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_ANTIDOTE_POTION, ref piMax); break;
}
return iTime;
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = string.Empty;
BMLogger.Log("EC_IvtrMedicine: GetNormalDesc: m_iLevelReq: " + m_iLevelReq);
// Level requirement
if (m_iLevelReq > 0)
{
BMLogger.Log("EC_IvtrMedicine: m_iLevelReq: " + m_iLevelReq);
BMLogger.Log("EC_IvtrMedicine: GetMaxLevelSofar: " + CECGameRun.Instance.GetHostPlayer().GetMaxLevelSofar());
int col = CECGameRun.Instance.GetHostPlayer().GetMaxLevelSofar() >= m_iLevelReq ? (int)DescriptipionMsg.ITEMDESC_COL_WHITE : (int)DescriptipionMsg.ITEMDESC_COL_RED;
AddDescText(col, true, EC_Game.GetItemDesc().GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), m_iLevelReq);
}
// Build effect description
BuildEffectDesc();
// Price
AddPriceDesc((int)DescriptipionMsg.ITEMDESC_COL_WHITE, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
// Build medicine effect description
protected void BuildEffectDesc()
{
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_USEEFFECT));
switch (m_pDBMajorType.id)
{
case 1794: // Recruit HP
if (m_pDBEssence.hp_add_total > 0)
{
BMLogger.Log("EC_IvtrMedicine: BuildEffectDesc: m_pDBEssence.hp_add_total: " + m_pDBEssence.hp_add_total);
BMLogger.Log("EC_IvtrMedicine: BuildEffectDesc: m_pDBEssence.hp_add_time: " + m_pDBEssence.hp_add_time);
if (m_pDBEssence.hp_add_time > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDHPINTIME), m_pDBEssence.hp_add_time, m_pDBEssence.hp_add_total);
else
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_RECRUITHP), m_pDBEssence.hp_add_total);
}
break;
case 1802: // Recruit MP
if (m_pDBEssence.mp_add_total > 0)
{
if (m_pDBEssence.mp_add_time > 0)
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDMPINTIME), m_pDBEssence.mp_add_time, m_pDBEssence.mp_add_total);
else
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_RECRUITMP), m_pDBEssence.mp_add_total);
}
break;
case 1810: // Recruit HP and MP
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_RECRUITHPMP), m_pDBEssence.hp_add_total, m_pDBEssence.mp_add_total);
break;
case 1815:
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_DECHALFPOISON));
break;
case 2038:
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ANTIDOTE));
break;
default:
BMLogger.LogError("EC_IvtrMedicine: Unknown major type: " + m_pDBMajorType.id);
return;
}
}
// Check item use condition
protected bool CheckUseCondition()
{
CECHostPlayer pHost = CECGameRun.Instance.GetHostPlayer();
if (pHost.GetMaxLevelSofar() < m_iLevelReq)
return false;
return true;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrMoneyConvertible : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrMoneyConvertible(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrMonsterSpirit : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrMonsterSpirit(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,434 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
public struct PETSKILL
{
public int idSkill;
public int iLevel;
};
/// <summary>
/// Class for Pet Egg(cac loai trung pet(thu cuoi, chien dau, di theo, p2w pet)). This is a part of IvtrPetItem(C++)
/// </summary>
public class EC_IvtrPetEgg : EC_IvtrItem
{
List<PETSKILL> m_aSkills;
IVTR_ESSENCE_PETEGG m_Essence;
string m_strName;
// Data in database
PET_EGG_ESSENCE m_pDBEssence;
PET_ESSENCE m_pPetEssence;
PET_ESSENCE m_pEvoPetEssence;
PET_EVOLVED_SKILL_CONFIG m_pEvoNatureConfig;
_evo_prop m_EvoProp; // ̳
/// <summary>
/// Constructor for Pet Egg(cac loai trung pet(thu cuoi, chien dau, di theo, p2w pet))
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrPetEgg(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_PETEGG;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (PET_EGG_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pPetEssence = (PET_ESSENCE)pDB.get_data_ptr((uint)m_pDBEssence.id_pet, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
// ASSERT(m_pPetEssence);
//struct can't be null
//m_pEvoPetEssence = null;
m_pEvoPetEssence = new PET_ESSENCE();
if (m_pPetEssence.id >=0)
{
object pTempDBEssenceObj = pDB.get_data_ptr((uint)m_pPetEssence.id_pet_egg_evolved, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
if (pTempDBEssenceObj != null)
{
PET_EGG_ESSENCE pTempDBEssence = (PET_EGG_ESSENCE)pTempDBEssenceObj;
if (pTempDBEssence.id >=0)
{
object pEvoPetEssenceObj = pDB.get_data_ptr((uint)pTempDBEssence.id_pet, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
if (pEvoPetEssenceObj != null)
m_pEvoPetEssence = (PET_ESSENCE)pEvoPetEssenceObj;
}
}
}
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
// m_bUseable = true;
// m_dwUseFlags = USE_PERSIST;
m_Essence = new IVTR_ESSENCE_PETEGG();
m_EvoProp = new _evo_prop{
r_attack = 0,
r_defense = 0,
r_hp = 0,
r_atk_lvl = 0,
r_def_lvl = 0,
nature = 0
};
m_pEvoNatureConfig = new PET_EVOLVED_SKILL_CONFIG();
}
public EC_IvtrPetEgg(EC_IvtrPetEgg other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_pPetEssence = other.m_pPetEssence;
m_Essence = other.m_Essence;
m_strName = other.m_strName;
// Copy skills
int i, iNumSkill = other.m_aSkills.Count;
m_aSkills = new List<PETSKILL>(iNumSkill);
for (i=0; i < iNumSkill; i++)
m_aSkills[i] = other.m_aSkills[i];
m_EvoProp = other.m_EvoProp;
m_pEvoNatureConfig = other.m_pEvoNatureConfig;
m_pEvoPetEssence = other.m_pEvoPetEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
if (pInfoData == null || iDataLen == 0)
return true;
try {
CECDataReader dr = new CECDataReader(pInfoData, iDataLen);
m_Essence = new IVTR_ESSENCE_PETEGG(dr.ReadData(Marshal.SizeOf<IVTR_ESSENCE_PETEGG>()));
if (m_Essence.name_len != 0)
{
m_strName = ByteToStringUtils.UshortArrayToUnicodeString(m_Essence.name);
EC_Game.GetGameRun().GetUIManager().FilterBadWords(m_strName);
}
m_aSkills = new List<PETSKILL>(m_Essence.skill_count);
for (int i=0; i < m_Essence.skill_count; i++)
{
PETSKILL s = new PETSKILL();
s.idSkill = dr.ReadInt();
s.iLevel = dr.ReadInt();
m_aSkills.Add(s);
}
if (m_Essence.pet_class == (int)GP_PET_TYPE.GP_PET_CLASS_EVOLUTION)
{
m_EvoProp.r_attack = dr.ReadInt();
m_EvoProp.r_defense = dr.ReadInt();
m_EvoProp.r_hp = dr.ReadInt();
m_EvoProp.r_atk_lvl = dr.ReadInt();
m_EvoProp.r_def_lvl = dr.ReadInt();
m_EvoProp.nature = dr.ReadInt();
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
object pDBData = pDB.get_data_ptr((uint)m_EvoProp.nature, ID_SPACE.ID_SPACE_CONFIG, ref DataType);
if (pDBData != null && DataType == DATA_TYPE.DT_PET_EVOLVED_SKILL_CONFIG)
m_pEvoNatureConfig = (PET_EVOLVED_SKILL_CONFIG)pDBData;
}
}
catch (Exception e)
{
Debug.LogError("EC_IvtrPetEgg::SetItemInfo, data read error (" + e.GetType() + e.StackTrace + ")");
return false;
}
return true;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
protected override string GetNormalDesc(bool bRepair)
{
string szDesc = "";
switch (m_Essence.pet_class)
{
case (int)GP_PET_TYPE.GP_PET_CLASS_MOUNT: szDesc = GetRidingPetDesc(bRepair); break;
case (int)GP_PET_TYPE.GP_PET_CLASS_COMBAT: szDesc = GetCombatPetDesc(bRepair); break;
case (int)GP_PET_TYPE.GP_PET_CLASS_FOLLOW: szDesc = GetFollowPetDesc(bRepair); break;
case (int)GP_PET_TYPE.GP_PET_CLASS_EVOLUTION:szDesc = GetEvolutionPetDesc(bRepair); break;
}
return szDesc;
}
private string GetRidingPetDesc(bool bRepair)
{
if (m_bNeedUpdate)
return "";
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
int namecol = DecideNameCol();
// Item name: always use the name in template
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), m_pDBEssence.name/* GetName() */, m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), m_pDBEssence.name/* GetName() */);
AddIDDescText();
AddBindDescText();
AddExpireTimeDesc();
// ɫϢ
if (m_pPetEssence.id != 0 && m_pPetEssence.require_dye_count > 0)
{
if (m_iScaleType == (int)ScaleType.SCALE_BUY)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLOR));
AddDescText(white, true, " ???");
}
else
{
Color clr = new Color(255, 255, 255);
if (RIDINGPET.GetColor(m_Essence.color, clr))
clr = RIDINGPET.GetDefaultColor();
string strColor = string.Format("^{0:X2}{1:X2}{2:X2}", clr.r, clr.g, clr.b);
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLOR));
m_strDesc += " ";
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_COLORRECT), strColor);
}
}
// Food type requirement
AddFoodTypeDesc();
if (m_pPetEssence.id != 0)
{
// Pet level
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PETLEVEL), m_Essence.level);
// Move speed
float fSpeed = m_pPetEssence.speed_a + (m_Essence.level - 1) * m_pPetEssence.speed_b;
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_MOVESPEED), fSpeed);
// Profession requirement
AddProfReqDesc(m_pPetEssence.character_combo_id);
}
// Level requirement
int iLevelReq = Mathf.Max((int)m_Essence.level, m_Essence.req_level);
if (iLevelReq > 0)
{
int col = pHost.GetMaxLevelSofar() >= iLevelReq ? white : red;
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), iLevelReq);
}
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
private string GetCombatPetDesc(bool bRepair)
{
if (m_bNeedUpdate)
return "";
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int red = (int)DescriptipionMsg.ITEMDESC_COL_RED;
int namecol = DecideNameCol();
// Item name: always use the name in template
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddBindDescText();
AddExpireTimeDesc();
// Food type requirement
AddFoodTypeDesc();
if (m_pPetEssence.id != 0)
{
// Pet level
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PETLEVEL), m_Essence.level);
// Physical damage
int iVal = (int)(((PET_ESSENCE)m_pPetEssence).damage_a * (((PET_ESSENCE)m_pPetEssence).damage_b * m_Essence.level * m_Essence.level + ((PET_ESSENCE)m_pPetEssence).damage_c * m_Essence.level + ((PET_ESSENCE)m_pPetEssence).damage_d));
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_DAMAGE), iVal);
// Attack speed
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ATKSPEED));
AddDescText(-1, true, " %.2f", 1.0f / ((PET_ESSENCE)m_pPetEssence).attack_speed);
//Attack rating
iVal = (int)(((PET_ESSENCE)m_pPetEssence).attack_a * (m_Essence.level - ((PET_ESSENCE)m_pPetEssence).attack_b * ((PET_ESSENCE)m_pPetEssence).level_require + ((PET_ESSENCE)m_pPetEssence).attack_c));
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ATTACKRATE), iVal);
// Physical defence
iVal = (int)(((PET_ESSENCE)m_pPetEssence).physic_defence_a * (((PET_ESSENCE)m_pPetEssence).physic_defence_b * (m_Essence.level - ((PET_ESSENCE)m_pPetEssence).physic_defence_c * ((PET_ESSENCE)m_pPetEssence).level_require) + ((PET_ESSENCE)m_pPetEssence).physic_defence_d));
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PHYDEFENCE));
AddDescText(-1, true, " %d", iVal);
// Magic defence
iVal = (int)(((PET_ESSENCE)m_pPetEssence).magic_defence_a * (((PET_ESSENCE)m_pPetEssence).magic_defence_b * (m_Essence.level - ((PET_ESSENCE)m_pPetEssence).magic_defence_c * ((PET_ESSENCE)m_pPetEssence).level_require) + ((PET_ESSENCE)m_pPetEssence).magic_defence_d));
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ALLMAGICDEF));
AddDescText(-1, true, " %d", iVal);
// Dodge
iVal = (int)(((PET_ESSENCE)m_pPetEssence).armor_a * (m_Essence.level - ((PET_ESSENCE)m_pPetEssence).armor_b * ((PET_ESSENCE)m_pPetEssence).level_require + ((PET_ESSENCE)m_pPetEssence).armor_c));
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_DODGE));
AddDescText(-1, true, " %d", iVal);
// hp
iVal = (int)(((PET_ESSENCE)m_pPetEssence).hp_a * (m_Essence.level - ((PET_ESSENCE)m_pPetEssence).hp_b * ((PET_ESSENCE)m_pPetEssence).level_require + ((PET_ESSENCE)m_pPetEssence).hp_c));
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_ADDHP));
AddDescText(-1, true, " %d", iVal);
// Profession requirement
AddProfReqDesc(((PET_ESSENCE)m_pPetEssence).character_combo_id);
}
// Level requirement
int iLevelReq = Mathf.Max((int)m_Essence.level, m_Essence.req_level);
if (iLevelReq > 0)
{
int col = pHost.GetMaxLevelSofar() >= iLevelReq ? white : red;
AddDescText(col, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_LEVELREQ), iLevelReq);
}
// Skill list
for (int i=0; i < m_aSkills.Count; i++)
{
PETSKILL skill = m_aSkills[i];
string szName = EC_Game.GetSkillDesc().GetWideString(skill.idSkill * 10);
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_YELLOW, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PETSKILL), szName != null ? szName : "", skill.iLevel);
}
// ɽ
if (m_pEvoPetEssence.id != 0)
{
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_PET_EVO_NAME), ByteToStringUtils.UshortArrayToUnicodeString(((PET_ESSENCE)m_pEvoPetEssence).name));
}
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
private string GetFollowPetDesc(bool bRepair)
{
Debug.Log("[THN]GetFollowPetDesc. This is not implemented yet.");
return "";
}
private string GetEvolutionPetDesc(bool bRepair)
{
Debug.Log("[THN]GetEvolutionPetDesc. This is not implemented yet.");
return "";
}
private void AddFoodTypeDesc()
{
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
object pPetEssence = pDB.get_data_ptr((uint)m_Essence.pet_tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
if (pPetEssence == null)
return;
CECStringTab pDescTab = EC_Game.GetItemDesc();
AddDescText((int)DescriptipionMsg.ITEMDESC_COL_WHITE, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FOODTYPE));
for (int i=0; i < (int)PetFoodType.MAX_PET_FOOD; i++)
{
if ((((PET_ESSENCE)pPetEssence).food_mask & (1 << i)) != 0)
{
m_strDesc += " ";
AddDescText(-1, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FOOD_GRASS+i));
}
}
m_strDesc += "\\r";
}
// Get item description for booth buying
protected override string GetBoothBuyDesc()
{
m_strDesc = "";
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
// Item name
AddDescText(white, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name));
// Price
AddPriceDesc(white, false);
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return ByteToStringUtils.ByteArrayToCP936String(m_pDBEssence.file_matter);
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrPetFaceTicket : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrPetFaceTicket(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,152 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrPetFood : EC_IvtrItem
{
protected PET_FOOD_ESSENCE m_pDBEssence;
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrPetFood(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_PETFOOD;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (PET_FOOD_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
m_bUseable = true;
m_bNeedUpdate = false;
}
public EC_IvtrPetFood(EC_IvtrPetFood other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
// Get item cool time
public int GetCoolTime(ref int piMax)
{
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
if (!pHost)
return 0;
int iTime = pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_FEED_PET, ref piMax);
return iTime;
}
// Check item use condition
public override bool CheckUseCondition()
{
CECPetData pPet = EC_Game.GetGameRun().GetHostPlayer().GetPetCorral().GetActivePet();
if (pPet == null)
return false;
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
object temp = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)pPet.GetTemplateID(), ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
if (temp == null)
return false;
PET_ESSENCE pPetEssence = (PET_ESSENCE)temp;
return ((m_pDBEssence.food_type & pPetEssence.food_mask) != 0) ? true : false;
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
// Item name
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Food type
for (int i=0; i < (int)PetFoodType.MAX_PET_FOOD; i++)
{
if ((m_pDBEssence.food_type & (1 << i)) != 0)
{
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FOODTYPE));
m_strDesc += " ";
AddDescText(-1, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_FOOD_GRASS+i));
break;
}
}
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrRecipe : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrRecipe(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrRefineTicket : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrRefineTicket(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrRevScroll : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrRevScroll(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrSharpener : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrSharpener(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrShopToken : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrShopToken(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrSkillMat : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrSkillMat(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,116 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Skill tome item class(sach ky nang). This is a part of CEC_IvtrScroll(C++)
/// </summary>
public class EC_IvtrSkilltome : EC_IvtrItem
{
protected SKILLTOME_ESSENCE m_pDBEssence;
protected SKILLTOME_SUB_TYPE m_pDBSubType;
/// <summary>
/// Create skill tome item(sach ky nang)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrSkilltome(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_SKILLTOME;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (SKILLTOME_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_pDBSubType = (SKILLTOME_SUB_TYPE)pDB.get_data_ptr(m_pDBEssence.id_sub_type, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
m_bNeedUpdate = false;
}
/// <summary>
/// Copy constructor for skill tome item(sach ky nang)
/// </summary>
/// <param name="other">Other skill tome item</param>
public EC_IvtrSkilltome(EC_IvtrSkilltome other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
m_pDBSubType = other.m_pDBSubType;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrSpeaker : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrSpeaker(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrStone : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrStone(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTargetItem : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrTargetItem(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,14 +1,84 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Task Dice Item (Tui qua random).
/// This is a part of IvtrTaskItem(C++)
/// </summary>
public class EC_IvtrTaskDice : EC_IvtrItem
{
public EC_IvtrTaskDice(int tid, int expire_date) : base(tid, expire_date)
protected TASKDICE_ESSENCE m_pDBEssence;
/// <summary>
/// Task Dice Item
/// </summary>
/// <param name="tid"></param>
/// <param name="expire_date"></param>
public EC_IvtrTaskDice(int tid, int expire_date) : base(tid, expire_date)
{
}
m_iCID = (int)InventoryClassId.ICID_TASKDICE;
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (TASKDICE_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = 0;
m_iShopPrice = 0;
m_iProcType = (int)m_pDBEssence.proc_type;
m_bUseable = true;
m_bNeedUpdate = false;
}
public EC_IvtrTaskDice(EC_IvtrTaskDice other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = "";
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
@@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTaskItem : EC_IvtrItem
{
protected TASKMATTER_ESSENCE m_pDBEssence;
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrTaskItem(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_TASKITEM;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (TASKMATTER_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = 0;
m_iShopPrice = 0;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
m_bNeedUpdate = false;
}
public EC_IvtrTaskItem(EC_IvtrTaskItem other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item name
public override string GetName()
{
// Try Unicode first (for Vietnamese/wide char names), then fallback to CP936
if (m_pDBEssence.name != null && m_pDBEssence.name.Length > 0)
{
string s = ByteToStringUtils.UshortArrayToUnicodeString(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s) && !string.IsNullOrWhiteSpace(s))
return s;
// Fallback to legacy CP936 if Unicode was empty
s = ByteToStringUtils.UshortArrayToCP936String(m_pDBEssence.name);
if (!string.IsNullOrEmpty(s))
return s;
}
return base.GetName(); // Fallback to base class method
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Task item
AddDescText(white, false, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_TASKITEM));
// Extend description
AddExtDescText();
return m_strDesc;
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ec738837a1a3f40e38926d3365da3df5
@@ -1,15 +1,93 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.IO;
using BrewMonster;
using ModelRenderer.Scripts.Common;
using ModelRenderer.Scripts.GameData;
using UnityEngine;
using PerfectWorld.Scripts.Managers;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
using System.Runtime.InteropServices;
namespace PerfectWorld.Scripts.Managers
{
/// <summary>
/// Task Normal Matter Item.(non interactable quest item). it is a part of IvtrTaskItem(C++)
/// </summary>
public class EC_IvtrTaskNmMatter : EC_IvtrItem
{
protected TASKNORMALMATTER_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for Task Normal Matter Item.
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrTaskNmMatter(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_TASKNMMATTER;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (TASKNORMALMATTER_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_bNeedUpdate = false;
}
public EC_IvtrTaskNmMatter(EC_IvtrTaskNmMatter other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
// Get item icon file name
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item description text
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}
@@ -1,15 +0,0 @@
using BrewMonster.Scripts.Managers;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTaskmatter : EC_IvtrItem
{
public EC_IvtrTaskmatter(int tid, int expire_date) : base(tid, expire_date)
{
}
public EC_IvtrTaskmatter(EC_IvtrTaskmatter other) : base(other)
{
}
}
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: ee5181c9a0786409fb452d21d947eab7
@@ -3,6 +3,11 @@ namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTossMat : EC_IvtrItem
{
/// <summary>
/// Not create logic yet (add summary later)
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrTossMat(int tid, int expire_date) : base(tid, expire_date)
{
}
@@ -1,15 +1,95 @@
using BrewMonster;
using ModelRenderer.Scripts.GameData;
using BrewMonster.Network;
using BrewMonster.Scripts.Managers;
using BrewMonster.Scripts;
using CSNetwork.GPDataType;
namespace PerfectWorld.Scripts.Managers
{
public class EC_IvtrTownscroll : EC_IvtrItem
/// <summary>
/// Town scroll item class (hoi thanh phu). It is a part of EC_IvtrScroll(c++)
/// TownScroll allow player to teleport to towns inside one map.
/// </summary>
public class EC_IvtrTownScroll : EC_IvtrItem
{
public EC_IvtrTownscroll(int tid, int expire_date) : base(tid, expire_date)
protected TOWNSCROLL_ESSENCE m_pDBEssence;
/// <summary>
/// Constructor for Town Scroll
/// </summary>
/// <param name="tid">Template id</param>
/// <param name="expire_date">Expire date</param>
public EC_IvtrTownScroll(int tid, int expire_date) : base(tid, expire_date)
{
m_iCID = (int)InventoryClassId.ICID_TOWNSCROLL;
// Get database data
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
m_pDBEssence = (TOWNSCROLL_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
m_iPileLimit = m_pDBEssence.pile_num_max;
m_iPrice = m_pDBEssence.price;
m_iShopPrice = m_pDBEssence.shop_price;
m_iProcType = (int)m_pDBEssence.proc_type;
m_i64EquipMask = 0;
m_bUseable = true;
m_dwUseFlags = (uint)UseCondition.USE_PERSIST;
m_bNeedUpdate = false;
}
public EC_IvtrTownscroll(EC_IvtrTownscroll other) : base(other)
public EC_IvtrTownScroll(EC_IvtrTownScroll other) : base(other)
{
m_pDBEssence = other.m_pDBEssence;
}
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
{
base.SetItemInfo(pInfoData, iDataLen);
return true;
}
public override string GetIconFile()
{
return m_pDBEssence.FileIcon;
}
// Get item cool time
public int GetCoolTime(ref int piMax)
{
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
return pHost ? pHost.GetCoolTime((int)CoolTimeIndex.GP_CT_TOWNSCROLL, ref piMax) : 0;
}
protected override string GetNormalDesc(bool bRepair)
{
m_strDesc = string.Empty;
// Try to build item description
CECStringTab pDescTab = EC_Game.GetItemDesc();
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
int namecol = DecideNameCol();
if (m_iCount > 1)
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
else
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
AddIDDescText();
AddExpireTimeDesc();
// Price
AddPriceDesc(white, bRepair);
// Extend description
AddExtDescText();
return m_strDesc;
}
// Get drop model for shown
public override string GetDropModel()
{
return m_pDBEssence.FileMatter;
}
}
}

Some files were not shown because too many files have changed in this diff Show More