From 3a127e252d9c18e55ae75033e1899a9c69af261e Mon Sep 17 00:00:00 2001 From: Osama Deep Date: Wed, 18 Jan 2023 19:52:42 +0300 Subject: [PATCH] v82 --- ...ArenaJoinSeasonInfoSessionProgressFill.mat | 2 +- .../Assets/AddressableAssetsData/link.xml | 11 - .../AddressableAssetsData/link.xml.meta | 7 - .../UI/Prefabs/UI_ChronoSettingsPopup.prefab | 18 +- .../UI/Prefabs/UI_ChronoSlotsPopup.prefab | 40 + .../Resources/UI/Prefabs/UI_Craft.prefab | 697 ++++++- .../Prefabs/UI_FriendInfoPopupPandora.prefab | 2 +- .../UI/Prefabs/UI_PandoraSettingPopup.prefab | 48 +- .../BlockChain/ActionRenderHandler.cs | 16 +- nekoyume/Assets/_Scripts/Game/Game.cs | 6 +- .../PandoraBox/Scripts/PandoraMaster.cs | 7 +- .../PandoraBox/Scripts/PandoraShopSlot.cs | 4 +- .../PandoraBox/Scripts/PandoraUtil.cs | 1 + .../PandoraBox/Scripts/Prime/Premium.cs | 1653 ++++++++++------- .../Assets/_Scripts/State/RxProps.Arena.cs | 38 +- nekoyume/Assets/_Scripts/State/States.cs | 4 + .../_Scripts/UI/Combination/SubRecipeView.cs | 31 +- .../Arena/Board/ArenaBoardPlayerCell.cs | 2 +- .../Assets/_Scripts/UI/Module/ChronoSlot.cs | 83 +- .../_Scripts/UI/Scroller/BuffBonusBuffCell.cs | 2 +- nekoyume/Assets/_Scripts/UI/Shop/BuyView.cs | 6 +- .../UI/Widget/ArenaBattlePreparation.cs | 4 +- .../Assets/_Scripts/UI/Widget/ArenaBoard.cs | 16 +- nekoyume/Assets/_Scripts/UI/Widget/Battle.cs | 2 +- .../_Scripts/UI/Widget/BattlePreparation.cs | 6 +- .../UI/Widget/Popup/ChronoSettingsPopup.cs | 74 +- .../UI/Widget/Popup/FriendInfoPopupPandora.cs | 8 +- .../UI/Widget/Popup/PandoraSettingPopup.cs | 83 +- .../UI/Widget/Popup/PandoraShopPopup.cs | 2 +- .../_Scripts/UI/Widget/Popup/StakingPopup.cs | 2 +- .../_Scripts/UI/Widget/Popup/SweepPopup.cs | 4 +- nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs | 2 +- .../Assets/_Scripts/UI/Widget/ShopSell.cs | 6 +- .../_Scripts/UI/Widget/Tooltip/ItemTooltip.cs | 12 +- .../ProjectSettings/ProjectSettings.asset | 4 +- 35 files changed, 1895 insertions(+), 1008 deletions(-) delete mode 100644 nekoyume/Assets/AddressableAssetsData/link.xml delete mode 100644 nekoyume/Assets/AddressableAssetsData/link.xml.meta diff --git a/nekoyume/Assets/AddressableAssets/UI/Module/Arena/Join/ArenaJoinSeasonInfoSessionProgressFill.mat b/nekoyume/Assets/AddressableAssets/UI/Module/Arena/Join/ArenaJoinSeasonInfoSessionProgressFill.mat index ae602d9b7dd..38d1d59b11f 100644 --- a/nekoyume/Assets/AddressableAssets/UI/Module/Arena/Join/ArenaJoinSeasonInfoSessionProgressFill.mat +++ b/nekoyume/Assets/AddressableAssets/UI/Module/Arena/Join/ArenaJoinSeasonInfoSessionProgressFill.mat @@ -128,7 +128,7 @@ Material: - OffsetUV_ZoomY_1: 1 - PinchUV_Size_1: 0.25 - PixelSnap: 0 - - PositionUV_X_1: 0.8588693 + - PositionUV_X_1: -0.60946596 - PositionUV_Y_1: 0 - ResizeUV_X_1: -1 - ResizeUV_X_2: 0 diff --git a/nekoyume/Assets/AddressableAssetsData/link.xml b/nekoyume/Assets/AddressableAssetsData/link.xml deleted file mode 100644 index 91707193b70..00000000000 --- a/nekoyume/Assets/AddressableAssetsData/link.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/nekoyume/Assets/AddressableAssetsData/link.xml.meta b/nekoyume/Assets/AddressableAssetsData/link.xml.meta deleted file mode 100644 index 230fa17ebdb..00000000000 --- a/nekoyume/Assets/AddressableAssetsData/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 033995232c039b540830cf1e345e7ca6 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSettingsPopup.prefab b/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSettingsPopup.prefab index ae2125dd724..9750763b450 100644 --- a/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSettingsPopup.prefab +++ b/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSettingsPopup.prefab @@ -191,6 +191,8 @@ MonoBehaviour: collectOffImage: {fileID: 7298765884402435231} spendOnImage: {fileID: 969537735218642756} spendOffImage: {fileID: 2854352182240252586} + sweepOnImage: {fileID: 565995738742260396} + sweepOffImage: {fileID: 4579684357541960451} sweepStageInput: {fileID: 6323229227522834357} craftModule: {fileID: 1404212856026150416} craftOnImage: {fileID: 1250911286662095980} @@ -2430,9 +2432,9 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: Nekoyume.UI.PandoraSettingPopup, Nekoyume - m_MethodName: ChangeMultipleLogin + - m_Target: {fileID: 7407895453931944160} + m_TargetAssemblyTypeName: Nekoyume.UI.ChronoSettingsPopup, Nekoyume + m_MethodName: ChangeSweep m_Mode: 6 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -3850,7 +3852,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &3243591504461266275 RectTransform: m_ObjectHideFlags: 0 @@ -5658,7 +5660,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &4036712308749684564 RectTransform: m_ObjectHideFlags: 0 @@ -13366,9 +13368,9 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} - m_TargetAssemblyTypeName: Nekoyume.UI.PandoraSettingPopup, Nekoyume - m_MethodName: ChangeMultipleLogin + - m_Target: {fileID: 7407895453931944160} + m_TargetAssemblyTypeName: Nekoyume.UI.ChronoSettingsPopup, Nekoyume + m_MethodName: ChangeSweep m_Mode: 6 m_Arguments: m_ObjectArgument: {fileID: 0} diff --git a/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSlotsPopup.prefab b/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSlotsPopup.prefab index 69e985fc073..95062a7895c 100644 --- a/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSlotsPopup.prefab +++ b/nekoyume/Assets/Resources/UI/Prefabs/UI_ChronoSlotsPopup.prefab @@ -1826,11 +1826,51 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: -9.700012 objectReference: {fileID: 0} + - target: {fileID: 3400444908460524209, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3400444908460524209, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3400444908460524209, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3400444908460524209, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3787858095262186575, guid: fc24ce4f14eae6841881a10ece115a81, type: 3} propertyPath: m_AnchoredPosition.y value: -9.700012 objectReference: {fileID: 0} + - target: {fileID: 7305666656154174503, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7305666656154174503, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7305666656154174503, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7305666656154174503, guid: fc24ce4f14eae6841881a10ece115a81, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 7778286864631315859, guid: fc24ce4f14eae6841881a10ece115a81, type: 3} propertyPath: m_Pivot.x diff --git a/nekoyume/Assets/Resources/UI/Prefabs/UI_Craft.prefab b/nekoyume/Assets/Resources/UI/Prefabs/UI_Craft.prefab index 9f7d6b78dd1..6d31ab4d09d 100644 --- a/nekoyume/Assets/Resources/UI/Prefabs/UI_Craft.prefab +++ b/nekoyume/Assets/Resources/UI/Prefabs/UI_Craft.prefab @@ -132,8 +132,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 124.015, y: -35} - m_SizeDelta: {x: 188.03, y: 70} + m_AnchoredPosition: {x: 124.5, y: -35} + m_SizeDelta: {x: 189, y: 70} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3642329534022869050 CanvasRenderer: @@ -8756,6 +8756,142 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &2755590011127310927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5547982315974116631} + - component: {fileID: 5992097749620978911} + - component: {fileID: 6806907317645670656} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5547982315974116631 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755590011127310927} + 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: 6717123217645576197} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 4.41} + m_SizeDelta: {x: 0, y: -2.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5992097749620978911 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755590011127310927} + m_CullTransparentMesh: 1 +--- !u!114 &6806907317645670656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755590011127310927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Copy ID + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2} + m_sharedMaterial: {fileID: -2364689171920820918, guid: 8a682b7747d4a664089b7b1065aa0035, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4291226111 + m_fontColor: {r: 1, g: 0.91372555, b: 0.77647066, 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: 17.45 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 8 + m_fontSizeMax: 32 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 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 &2800751207150234964 GameObject: m_ObjectHideFlags: 0 @@ -14645,6 +14781,140 @@ MonoBehaviour: m_ColorMode: 2 m_BlurMode: 0 m_AdvancedBlur: 0 +--- !u!1 &4402840149415606897 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7984251255793398067} + - component: {fileID: 1639668516304787535} + - component: {fileID: 567936222511140506} + - component: {fileID: 2389585185507743770} + m_Layer: 5 + m_Name: CopyIDButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7984251255793398067 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4402840149415606897} + 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: 4647255875676108741} + m_Father: {fileID: 6595395528814637352} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -52.8, y: -8.6} + m_SizeDelta: {x: 74.95999, y: 24.620003} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1639668516304787535 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4402840149415606897} + m_CullTransparentMesh: 1 +--- !u!114 &567936222511140506 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4402840149415606897} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2e596a6e4f454d439b735a988b14318, type: 3} + 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 &2389585185507743770 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4402840149415606897} + 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: 567936222511140506} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2600323959630890584} + m_TargetAssemblyTypeName: Nekoyume.UI.SubRecipeView, Nekoyume + m_MethodName: CopyItemID + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 1 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &4553714300762531096 GameObject: m_ObjectHideFlags: 0 @@ -15253,7 +15523,7 @@ MonoBehaviour: m_EditorClassIdentifier: UnlockText: {fileID: 6341403958387532912} maxButton: {fileID: 7794127991691461732} - copyItemIDBtn: {fileID: 792789051083710988} + copyItemIDBtn: {fileID: 2389585185507743770} toggleParent: {fileID: 0} categoryToggles: [] recipeCell: {fileID: 8612115018197644542} @@ -15451,6 +15721,142 @@ MonoBehaviour: defaultWordSpacing: 0 defaultLineSpacingInitialized: 0 defaultLineSpacing: 0 +--- !u!1 &4928487649513208111 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4647255875676108741} + - component: {fileID: 3027466075845838645} + - component: {fileID: 2805269476394447358} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4647255875676108741 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4928487649513208111} + 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: 7984251255793398067} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 4.41} + m_SizeDelta: {x: 0, y: -2.31} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3027466075845838645 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4928487649513208111} + m_CullTransparentMesh: 1 +--- !u!114 &2805269476394447358 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4928487649513208111} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Copy ID + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2} + m_sharedMaterial: {fileID: -2364689171920820918, guid: 8a682b7747d4a664089b7b1065aa0035, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4291226111 + m_fontColor: {r: 1, g: 0.91372555, b: 0.77647066, 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: 17.45 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 8 + m_fontSizeMax: 32 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 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 &4929604591243185802 GameObject: m_ObjectHideFlags: 0 @@ -17114,6 +17520,7 @@ RectTransform: m_Children: - {fileID: 5108811872237739041} - {fileID: 5941468721593676386} + - {fileID: 7984251255793398067} m_Father: {fileID: 6113406330494894079} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -18347,6 +18754,140 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &6529390311540169716 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6717123217645576197} + - component: {fileID: 8506164200263726923} + - component: {fileID: 6406330723328951240} + - component: {fileID: 7830059787850281045} + m_Layer: 5 + m_Name: CopyIDButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6717123217645576197 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6529390311540169716} + 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: 5547982315974116631} + m_Father: {fileID: 6397766389555901130} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -52.8, y: -8.6} + m_SizeDelta: {x: 74.95999, y: 24.620003} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8506164200263726923 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6529390311540169716} + m_CullTransparentMesh: 1 +--- !u!114 &6406330723328951240 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6529390311540169716} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: d2e596a6e4f454d439b735a988b14318, type: 3} + 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 &7830059787850281045 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6529390311540169716} + 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: 6406330723328951240} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1810561327042447032} + m_TargetAssemblyTypeName: Nekoyume.UI.SubRecipeView, Nekoyume + m_MethodName: CopyItemID + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 2 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &6537519657852618122 GameObject: m_ObjectHideFlags: 0 @@ -26876,7 +27417,7 @@ MonoBehaviour: m_EditorClassIdentifier: UnlockText: {fileID: 8007859064683777040} maxButton: {fileID: 8356823948326201907} - copyItemIDBtn: {fileID: 792789051083710988} + copyItemIDBtn: {fileID: 7830059787850281045} toggleParent: {fileID: 0} categoryToggles: [] recipeCell: {fileID: 6637037181918955125} @@ -27887,6 +28428,7 @@ RectTransform: m_Children: - {fileID: 1289804395671550225} - {fileID: 7614536433815229345} + - {fileID: 6717123217645576197} m_Father: {fileID: 6326526962718128226} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -28928,7 +29470,7 @@ PrefabInstance: - target: {fileID: 127022483933023597, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} propertyPath: m_AnchoredPosition.x - value: 244.3463 + value: 244.2462 objectReference: {fileID: 0} - target: {fileID: 127022483933023597, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} @@ -28958,7 +29500,7 @@ PrefabInstance: - target: {fileID: 565401734805337515, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} propertyPath: m_LocalScale.x - value: 159.99998 + value: 160 objectReference: {fileID: 0} - target: {fileID: 565401734805337515, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} @@ -29058,7 +29600,7 @@ PrefabInstance: - target: {fileID: 1303080921641022082, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} propertyPath: m_AnchoredPosition.x - value: 90.74629 + value: 90.646194 objectReference: {fileID: 0} - target: {fileID: 1303080921641022082, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} @@ -29443,7 +29985,7 @@ PrefabInstance: - target: {fileID: 5488085739400171351, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} propertyPath: m_AnchoredPosition.x - value: 193.1463 + value: 193.0462 objectReference: {fileID: 0} - target: {fileID: 5488085739400171351, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} @@ -29568,7 +30110,7 @@ PrefabInstance: - target: {fileID: 6323848774691998995, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} propertyPath: m_AnchoredPosition.x - value: 141.9463 + value: 141.8462 objectReference: {fileID: 0} - target: {fileID: 6323848774691998995, guid: a1c4fa5a429c14614a172512d3d2b929, type: 3} @@ -36067,27 +36609,27 @@ PrefabInstance: - target: {fileID: 2513778254814477136, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2513778254814477136, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2513778254814477136, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 2513778254814477136, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 160.6962 objectReference: {fileID: 0} - target: {fileID: 2513778254814477136, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -19 objectReference: {fileID: 0} - target: {fileID: 2569357165005067052, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -36152,22 +36694,22 @@ PrefabInstance: - target: {fileID: 2624429869659627077, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2624429869659627077, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2624429869659627077, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 2624429869659627077, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -61 objectReference: {fileID: 0} - target: {fileID: 2685476841557223253, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -36187,22 +36729,22 @@ PrefabInstance: - target: {fileID: 2752123737658513760, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2752123737658513760, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2752123737658513760, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 2752123737658513760, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -89 objectReference: {fileID: 0} - target: {fileID: 2868714009149328494, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -36562,22 +37104,22 @@ PrefabInstance: - target: {fileID: 4882496866317032963, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4882496866317032963, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4882496866317032963, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 4882496866317032963, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -117 objectReference: {fileID: 0} - target: {fileID: 4931175066889620624, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -36914,6 +37456,41 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8331261295541900346} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: CopyItemID + objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: Nekoyume.UI.SubRecipeView, Nekoyume + objectReference: {fileID: 0} + - target: {fileID: 6868450410003036760, guid: 9fca7ee6230131a4696b74efa4577486, + type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} - target: {fileID: 6939176487837263252, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y @@ -37247,22 +37824,22 @@ PrefabInstance: - target: {fileID: 7561536488631598027, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7561536488631598027, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 7561536488631598027, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 7561536488631598027, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -33 objectReference: {fileID: 0} - target: {fileID: 7566761056081315501, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -37573,27 +38150,27 @@ PrefabInstance: - target: {fileID: 9039383544273738076, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 9039383544273738076, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 9039383544273738076, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 321.3924 objectReference: {fileID: 0} - target: {fileID: 9039383544273738076, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 160.6962 objectReference: {fileID: 0} - target: {fileID: 9039383544273738076, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -149 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9fca7ee6230131a4696b74efa4577486, type: 3} @@ -37781,7 +38358,7 @@ PrefabInstance: - target: {fileID: 5730728711148222447, guid: f28b579a9755c49b5b5d1a1763a906a8, type: 3} propertyPath: m_SizeDelta.x - value: 49.04 + value: 47.13 objectReference: {fileID: 0} - target: {fileID: 5730728711148222447, guid: f28b579a9755c49b5b5d1a1763a906a8, type: 3} @@ -38271,12 +38848,12 @@ PrefabInstance: - target: {fileID: 389658087179533051, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 44.49 + value: 45.11 objectReference: {fileID: 0} - target: {fileID: 389658087179533051, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 74.490005 + value: 75.11 objectReference: {fileID: 0} - target: {fileID: 389658087179533051, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38296,7 +38873,7 @@ PrefabInstance: - target: {fileID: 466509903107873346, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 54.92 + value: 54.989998 objectReference: {fileID: 0} - target: {fileID: 466509903107873346, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38306,7 +38883,7 @@ PrefabInstance: - target: {fileID: 466509903107873346, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 130.65 + value: 128.6 objectReference: {fileID: 0} - target: {fileID: 466509903107873346, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38351,7 +38928,7 @@ PrefabInstance: - target: {fileID: 726377476948183902, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 64.490005 + value: 65.11 objectReference: {fileID: 0} - target: {fileID: 726377476948183902, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38386,12 +38963,12 @@ PrefabInstance: - target: {fileID: 1272376639976602735, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 24.92 + value: 24.99 objectReference: {fileID: 0} - target: {fileID: 1272376639976602735, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 54.92 + value: 54.989998 objectReference: {fileID: 0} - target: {fileID: 1272376639976602735, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38416,12 +38993,12 @@ PrefabInstance: - target: {fileID: 3122504549788044578, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 36.94 + value: 36.91 objectReference: {fileID: 0} - target: {fileID: 3122504549788044578, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 56.94 + value: 56.91 objectReference: {fileID: 0} - target: {fileID: 3122504549788044578, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38461,7 +39038,7 @@ PrefabInstance: - target: {fileID: 3233218670752174869, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 74.490005 + value: 73.89 objectReference: {fileID: 0} - target: {fileID: 3233218670752174869, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38471,7 +39048,7 @@ PrefabInstance: - target: {fileID: 3233218670752174869, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 71.94 + value: 71.91 objectReference: {fileID: 0} - target: {fileID: 3233218670752174869, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38511,7 +39088,7 @@ PrefabInstance: - target: {fileID: 3480436870340489609, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 195.56999 + value: 193.59 objectReference: {fileID: 0} - target: {fileID: 3480436870340489609, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38666,12 +39243,12 @@ PrefabInstance: - target: {fileID: 4142609966058106159, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 95.65 + value: 93.6 objectReference: {fileID: 0} - target: {fileID: 4142609966058106159, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 115.65 + value: 113.6 objectReference: {fileID: 0} - target: {fileID: 4142609966058106159, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38716,7 +39293,7 @@ PrefabInstance: - target: {fileID: 4972502282326135715, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 156.43001 + value: 155.8 objectReference: {fileID: 0} - target: {fileID: 4972502282326135715, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38761,7 +39338,7 @@ PrefabInstance: - target: {fileID: 5219439365102654018, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 74.490005 + value: 75.11 objectReference: {fileID: 0} - target: {fileID: 5219439365102654018, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38771,7 +39348,7 @@ PrefabInstance: - target: {fileID: 5219439365102654018, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 79.490005 + value: 80.11 objectReference: {fileID: 0} - target: {fileID: 5219439365102654018, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38791,12 +39368,12 @@ PrefabInstance: - target: {fileID: 5512662071495212693, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 44.49 + value: 43.89 objectReference: {fileID: 0} - target: {fileID: 5512662071495212693, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 74.490005 + value: 73.89 objectReference: {fileID: 0} - target: {fileID: 5512662071495212693, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38852,7 +39429,7 @@ PrefabInstance: - target: {fileID: 7313419872300304640, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 115.65 + value: 113.6 objectReference: {fileID: 0} - target: {fileID: 7313419872300304640, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38902,12 +39479,12 @@ PrefabInstance: - target: {fileID: 8285367980814858149, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 44.49 + value: 45.11 objectReference: {fileID: 0} - target: {fileID: 8285367980814858149, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_AnchoredPosition.x - value: 64.490005 + value: 65.11 objectReference: {fileID: 0} - target: {fileID: 8285367980814858149, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38927,7 +39504,7 @@ PrefabInstance: - target: {fileID: 8563028456115147020, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 163.98001 + value: 165.22 objectReference: {fileID: 0} - target: {fileID: 8563028456115147020, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} @@ -38958,7 +39535,7 @@ PrefabInstance: - target: {fileID: 9018176011571151629, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} propertyPath: m_SizeDelta.x - value: 56.94 + value: 56.91 objectReference: {fileID: 0} - target: {fileID: 9018176011571151629, guid: 63867f78a3a288049b3e8f4d0025b208, type: 3} diff --git a/nekoyume/Assets/Resources/UI/Prefabs/UI_FriendInfoPopupPandora.prefab b/nekoyume/Assets/Resources/UI/Prefabs/UI_FriendInfoPopupPandora.prefab index 637ddfc7e1e..91da3341212 100644 --- a/nekoyume/Assets/Resources/UI/Prefabs/UI_FriendInfoPopupPandora.prefab +++ b/nekoyume/Assets/Resources/UI/Prefabs/UI_FriendInfoPopupPandora.prefab @@ -6428,7 +6428,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 100 X Simulate + m_text: 1000 X Simulate m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2} m_sharedMaterial: {fileID: 2100000, guid: dcbb52baf62c642d5acfc9f7f61fc311, type: 2} diff --git a/nekoyume/Assets/Resources/UI/Prefabs/UI_PandoraSettingPopup.prefab b/nekoyume/Assets/Resources/UI/Prefabs/UI_PandoraSettingPopup.prefab index 7a22d1a4799..ab906a68085 100644 --- a/nekoyume/Assets/Resources/UI/Prefabs/UI_PandoraSettingPopup.prefab +++ b/nekoyume/Assets/Resources/UI/Prefabs/UI_PandoraSettingPopup.prefab @@ -110,6 +110,8 @@ MonoBehaviour: arenaPushImage: {fileID: 3461863697948026727} pushStepText: {fileID: 4188841604431101968} pushStepSlider: {fileID: 1907298472646794557} + arenaValidatorOnImage: {fileID: 4437602431051845832} + arenaValidatorOffImage: {fileID: 695983106921610175} --- !u!1 &85774913980834207 GameObject: m_ObjectHideFlags: 0 @@ -622,7 +624,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 4.999939, y: 0} m_SizeDelta: {x: 10, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -1203,7 +1205,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 4.999939, y: 0} m_SizeDelta: {x: 10, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -3151,7 +3153,7 @@ MonoBehaviour: m_Calls: - m_Target: {fileID: 4045792328042499618} m_TargetAssemblyTypeName: Nekoyume.UI.PandoraSettingPopup, Nekoyume - m_MethodName: ChangeArenaMethod + m_MethodName: ChangeArenaValidator m_Mode: 6 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -3159,7 +3161,7 @@ MonoBehaviour: m_IntArgument: 1 m_FloatArgument: 0 m_StringArgument: - m_BoolArgument: 1 + m_BoolArgument: 0 m_CallState: 2 --- !u!1 &2414889790541021067 GameObject: @@ -3951,7 +3953,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -4531,7 +4533,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 4.999939, y: 0} m_SizeDelta: {x: 10, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -5955,7 +5957,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -7027,7 +7029,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -7599,7 +7601,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &7227235838713448176 RectTransform: m_ObjectHideFlags: 0 @@ -7921,7 +7923,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1302117273332799275 RectTransform: m_ObjectHideFlags: 0 @@ -8796,7 +8798,7 @@ MonoBehaviour: m_Calls: - m_Target: {fileID: 4045792328042499618} m_TargetAssemblyTypeName: Nekoyume.UI.PandoraSettingPopup, Nekoyume - m_MethodName: ChangeArenaMethod + m_MethodName: ChangeArenaValidator m_Mode: 6 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -8804,7 +8806,7 @@ MonoBehaviour: m_IntArgument: 0 m_FloatArgument: 0 m_StringArgument: - m_BoolArgument: 0 + m_BoolArgument: 1 m_CallState: 2 --- !u!1 &6422097126280945008 GameObject: @@ -8840,7 +8842,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -9627,7 +9629,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -10247,8 +10249,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} - m_SizeDelta: {x: 0, y: -6} + m_AnchoredPosition: {x: -0.73999786, y: 0.5400009} + m_SizeDelta: {x: -17.24, y: -10.93} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &345277652260773643 CanvasRenderer: @@ -10278,7 +10280,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: 9cScan + m_text: Connected Node m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 7a651b26cd62dc0479659cbcab053405, type: 2} @@ -10305,7 +10307,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 20 + m_fontSize: 12.45 m_fontSizeBase: 14 m_fontWeight: 400 m_enableAutoSizing: 1 @@ -10321,7 +10323,7 @@ MonoBehaviour: m_lineSpacingMax: 0 m_paragraphSpacing: 0 m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 + m_enableWordWrapping: 0 m_wordWrappingRatios: 0.4 m_overflowMode: 0 m_linkedTextComponent: {fileID: 0} @@ -10382,7 +10384,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 4.999939, y: 0} m_SizeDelta: {x: 10, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -12067,7 +12069,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 4.999939, y: 0} m_SizeDelta: {x: 10, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -12240,7 +12242,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Connected Node + m_text: 9cScan.com m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8a682b7747d4a664089b7b1065aa0035, type: 2} m_sharedMaterial: {fileID: 2100000, guid: 7a651b26cd62dc0479659cbcab053405, type: 2} @@ -12267,7 +12269,7 @@ MonoBehaviour: m_faceColor: serializedVersion: 2 rgba: 4294967295 - m_fontSize: 13.4 + m_fontSize: 18.25 m_fontSizeBase: 14 m_fontWeight: 400 m_enableAutoSizing: 1 diff --git a/nekoyume/Assets/_Scripts/BlockChain/ActionRenderHandler.cs b/nekoyume/Assets/_Scripts/BlockChain/ActionRenderHandler.cs index c5e60157839..de0c54d765e 100644 --- a/nekoyume/Assets/_Scripts/BlockChain/ActionRenderHandler.cs +++ b/nekoyume/Assets/_Scripts/BlockChain/ActionRenderHandler.cs @@ -1825,7 +1825,7 @@ private void ResponseTransferAsset(ActionBase.ActionEvaluation ev //Debug.LogError("RESPONSE: " + eval.Action.Memo + " ," + PandoraMaster.CrystalTransferTx); - Premium.ConfirmCrystalRequest(eval.BlockIndex, eval.Action.Memo, (int)eval.Action.Amount.MajorUnit); + Premium.ACCOUNT_ConfirmCrystalRequest(eval.BlockIndex, eval.Action.Memo, (int)eval.Action.Amount.MajorUnit); } else if (eval.Action.Memo.Length > 12 && eval.Action.Memo.Substring(0, 12) == "Pandora Gems") { @@ -1839,7 +1839,7 @@ private void ResponseTransferAsset(ActionBase.ActionEvaluation ev int ncg = (int)eval.Action.Amount.MajorUnit; int gems = int.Parse(eval.Action.Memo.Substring(14)); //Debug.LogError("RESPONSE: " + eval.Action.Memo + " ," + PandoraMaster.CrystalTransferTx); - Premium.ConfirmGemsRequest(eval.BlockIndex, gems, ncg); + Premium.PANDORA_ConfirmGemsRequest(eval.BlockIndex, gems, ncg); } } //catch { } @@ -2164,7 +2164,7 @@ private async void ResponseBattleArenaAsync(ActionBase.ActionEvaluation callback) PandoraMaster.PlayFabCurrentPlayer = success.InfoResultPayload.PlayerProfile; //get players - Premium.GetDatabase(currentLoginAddress); - Premium.UpdateDatabasePeriodly().Forget(); + Premium.PANDORA_GetDatabase(currentLoginAddress); + Premium.PANDORA_UpdateDatabasePeriodly().Forget(); } }, failed => @@ -920,6 +920,8 @@ private void InitializeAnalyzer() isTrackable = false; } + + Analyzer = new Analyzer( uniqueId, rpcServerHost, diff --git a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraMaster.cs b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraMaster.cs index b6e78904b36..9ab05416603 100644 --- a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraMaster.cs +++ b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraMaster.cs @@ -24,8 +24,8 @@ public class PandoraMaster : MonoBehaviour public static PandoraMaster Instance; //Unsaved Reg Settings - public static string OriginalVersionId = "v100350-2"; - public static string VersionId = "010081"; + public static string OriginalVersionId = "v100351"; + public static string VersionId = "010082"; //Pandora Database public static PanDatabase PanDatabase; @@ -133,6 +133,7 @@ public class PandoraSettings [HideInInspector] public int ArenaListStep { get; set; } = 90; [HideInInspector] public bool ArenaPush { get; set; } = true; //push means send every 'ArenaPushStep' whatever its confirm or not [HideInInspector] public int ArenaPushStep { get; set; } = 5; + [HideInInspector] public bool ArenaValidator { get; set; } = true; //true = 9cscan, false = local node public void Save() { @@ -153,6 +154,7 @@ public void Save() PlayerPrefs.SetInt("_PandoraBox_PVP_ListCountStep", ArenaListStep); PlayerPrefs.SetInt("_PandoraBox_PVP_ArenaPush", System.Convert.ToInt32(ArenaPush)); PlayerPrefs.SetInt("_PandoraBox_PVP_ArenaPushStep", ArenaPushStep); + PlayerPrefs.SetInt("_PandoraBox_PVP_ArenaValidator", System.Convert.ToInt32(ArenaValidator)); //apply ingame changes DOTween.timeScale = MenuSpeed; @@ -194,6 +196,7 @@ public void Load() ArenaListStep = PlayerPrefs.GetInt("_PandoraBox_PVP_ListCountStep", ArenaListStep); ArenaPush = System.Convert.ToBoolean(PlayerPrefs.GetInt("_PandoraBox_PVP_ArenaPush",System.Convert.ToInt32(ArenaPush))); ArenaPushStep = PlayerPrefs.GetInt("_PandoraBox_PVP_ArenaPushStep", ArenaPushStep); + ArenaValidator = System.Convert.ToBoolean(PlayerPrefs.GetInt("_PandoraBox_PVP_ArenaValidator", System.Convert.ToInt32(ArenaValidator))); //Load ingame changes DOTween.timeScale = MenuSpeed; diff --git a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraShopSlot.cs b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraShopSlot.cs index b418aa6dfab..f2e37ace856 100644 --- a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraShopSlot.cs +++ b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraShopSlot.cs @@ -107,7 +107,7 @@ void BuyPandoraGems(int gems) (() => { Widget.Find().WaitingImage.SetActive(true); - Premium.BuyGems(ItemPrice, gems); + Premium.PANDORA_BuyGems(ItemPrice, gems); }), () => { Widget.Find().WaitingImage.SetActive(false); } ); @@ -144,7 +144,7 @@ void BuyMembership(int days) Widget.Find().Close(); //update database - Premium.UpdateDatabase(10).Forget(); + Premium.PANDORA_UpdateDatabase(10).Forget(); } else { diff --git a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraUtil.cs b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraUtil.cs index 6caa44348c0..b733945fd8b 100644 --- a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraUtil.cs +++ b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/PandoraUtil.cs @@ -51,6 +51,7 @@ public static bool IsBusy() Color.red }; + public static PandoraItem GetPandoraItem(string itemName) { //0 01 4 0002 diff --git a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/Prime/Premium.cs b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/Prime/Premium.cs index 59c606d127b..86300810d41 100644 --- a/nekoyume/Assets/_Scripts/PandoraBox/Scripts/Prime/Premium.cs +++ b/nekoyume/Assets/_Scripts/PandoraBox/Scripts/Prime/Premium.cs @@ -10,7 +10,6 @@ using UnityEngine; using UnityEngine.UI; using TMPro; -using ShopItem = Nekoyume.UI.Model.ShopItem; using Nekoyume.Model.State; using Nekoyume.BlockChain; using Libplanet; @@ -22,46 +21,33 @@ namespace Nekoyume.PandoraBox { using Bencodex.Types; using Cysharp.Threading.Tasks; - using mixpanel; using Nekoyume.Action; using Nekoyume.Arena; using Nekoyume.Battle; using Nekoyume.EnumType; - using Nekoyume.Extensions; using Nekoyume.Game.Controller; using Nekoyume.Helper; using Nekoyume.L10n; using Nekoyume.Model; - using Nekoyume.Model.BattleStatus; using Nekoyume.Model.EnumType; - using Nekoyume.Model.Rune; - using Nekoyume.Model.Skill; using Nekoyume.Model.Stat; - using Nekoyume.State.Subjects; using Nekoyume.TableData; + using Nekoyume.TableData.Event; using Nekoyume.UI.Model; using Nekoyume.UI.Module; using PlayFab; using PlayFab.ClientModels; - using System.Globalization; using System.Threading.Tasks; using UniRx; using UnityEditor; using UnityEngine.Networking; - using static Nekoyume.Model.WorldInformation; - using static Nekoyume.TableData.ArenaSheet; - using static Nekoyume.UI.BattlePreparation; - using static Nekoyume.UI.CombinationSlotPopup; using static Nekoyume.UI.SubRecipeView; public class Premium { - //List of all players grabbed from Playfab public static List Pandoraplayers { get; private set; } = new List(); - //info of current player public static PandoraPlayer CurrentPandoraPlayer { get; private set; } = new PandoraPlayer(); - //Arena public static int ArenaMaxBattleCount { get; private set; } public static int ArenaRemainsBattle { get; private set; } public static bool ArenaBattleInProgress { get; set; } @@ -74,30 +60,29 @@ public class Premium static int round; static int ticket; - public static void Initialize(PandoraPlayer pandoraPlayer) + #region PANDORA ACCOUNT METHODS + public static void PANDORA_Initialize(PandoraPlayer pandoraPlayer) { CurrentPandoraPlayer = pandoraPlayer; } - - public static bool CheckPremiumFeature() + public static bool PANDORA_CheckPremium() { if (CurrentPandoraPlayer.IsPremium()) return true; else { - OneLineSystem.Push(MailType.System,"Pandora Box: This is Premium Feature!",NotificationCell.NotificationType.Alert); + OneLineSystem.Push(MailType.System, "Pandora Box: This is Premium Feature!", NotificationCell.NotificationType.Alert); return false; } } - - public static void GetDatabase(Address agentAddress) + public static void PANDORA_GetDatabase(Address agentAddress) { //get players data PlayFabClientAPI.GetLeaderboard(new GetLeaderboardRequest { StatisticName = "PremiumEndBlock", ProfileConstraints = new PlayerProfileViewConstraints() { ShowDisplayName = true, ShowLinkedAccounts = true, }, - MaxResultsCount = 100, + MaxResultsCount = 100, }, success => { Pandoraplayers = new List(); @@ -110,16 +95,16 @@ public static void GetDatabase(Address agentAddress) Address = player.Profile.LinkedAccounts[0].PlatformUserId, PremiumEndBlock = player.StatValue }; - Pandoraplayers.Add(newPlayer) ; + Pandoraplayers.Add(newPlayer); } } //check current player stats var panplayer = Pandoraplayers.Find(x => x.Address.ToLower() == agentAddress.ToString().ToLower()); if (panplayer is null) - Initialize(new PandoraPlayer()); + PANDORA_Initialize(new PandoraPlayer()); else - Initialize(panplayer); + PANDORA_Initialize(panplayer); //get player inventory PlayFabClientAPI.GetUserInventory(new GetUserInventoryRequest(), @@ -133,30 +118,61 @@ public static void GetDatabase(Address agentAddress) Widget.Find().UpdateCurrency(); } catch { } - }, fail =>{PandoraUtil.ShowSystemNotification(322,NotificationCell.NotificationType.Alert);}); + }, fail => { PandoraUtil.ShowSystemNotification(322, NotificationCell.NotificationType.Alert); }); }, - fail =>{ PandoraUtil.ShowSystemNotification(362, NotificationCell.NotificationType.Alert);}); + fail => { PandoraUtil.ShowSystemNotification(362, NotificationCell.NotificationType.Alert); }); } - - public static void CollectStakeRewards() + public static async UniTask PANDORA_UpdateDatabase(float time) { - if (!CheckPremiumFeature()) - return; - PandoraUtil.ShowSystemNotification(600, NotificationCell.NotificationType.Information); - ActionManager.Instance.ClaimStakeReward(); + await Task.Delay(System.TimeSpan.FromSeconds(time)); + PANDORA_GetDatabase(States.Instance.CurrentAvatarState.agentAddress); + } + public static async UniTask PANDORA_UpdateDatabasePeriodly() + { + while (true) + { + await Task.Delay(System.TimeSpan.FromSeconds(1800)); //30m + PANDORA_GetDatabase(States.Instance.CurrentAvatarState.agentAddress); + } + } + public static async UniTask PANDORA_SendWebhookT(string hook, string message) + { + WWWForm form = new WWWForm(); + form.AddField("content", message); + using (UnityWebRequest www = UnityWebRequest.Post(hook, form)) + { + await www.SendWebRequest(); + } } + public static void PANDORA_BuyGems(int ncg, int gems) + { + var currency = Libplanet.Assets.Currency.Legacy("NCG", 2, new Address("47d082a115c63e7b58b1532d20e631538eafadde")); - public static void BuyFeatureShop(string itemID) + ActionManager.Instance + .TransferAsset( + States.Instance.CurrentAvatarState.agentAddress, + new Address("0x1012041FF2254f43d0a938aDF89c3f11867A2A58"), + new Libplanet.Assets.FungibleAssetValue(currency, ncg, 0), + $"Pandora Gems: {gems}") + .Subscribe(); + } + public static void PANDORA_ConfirmGemsRequest(long blockIndex, int gems, int ncg) { - //request buyMarketFeature cloud + if (string.IsNullOrEmpty(PandoraMaster.CrystalTransferTx)) //multi instanses is running + return; + + //auto fill PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest { - FunctionName = "buyMarketFeature", + FunctionName = "buyGems2", FunctionParameter = new { - itemID = itemID, - currentBlock = Game.Game.instance.Agent.BlockIndex, - address = States.Instance.CurrentAvatarState.agentAddress.ToString() + premium = Premium.CurrentPandoraPlayer.IsPremium(), + address = States.Instance.CurrentAvatarState.agentAddress.ToString(), + gems = gems, + currentBlock = blockIndex, + cost = ncg, + transaction = PandoraMaster.CrystalTransferTx } }, success => @@ -165,19 +181,31 @@ public static void BuyFeatureShop(string itemID) { //adding score success AudioController.instance.PlaySfx(AudioController.SfxCode.BuyItem); - PandoraMaster.PlayFabInventory.VirtualCurrency["PG"] -= PandoraMaster.PanDatabase.ShopFeaturePrice; //just UI update instead of request new call - NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, $"PandoraBox: Feature Item Request Sent!", - NotificationCell.NotificationType.Information); + PandoraMaster.PlayFabInventory.VirtualCurrency["PG"] += gems; //just UI update instead of request new call + NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, $"PandoraBox: {gems}Pandora Gems added Successfully!", NotificationCell.NotificationType.Information); + + //update database + PANDORA_UpdateDatabase(15).Forget(); } else { - NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, "PandoraBox: Feature Item Request Failed!", NotificationCell.NotificationType.Alert); + NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, "PandoraBox: Buy Failed!", NotificationCell.NotificationType.Alert); } }, - failed =>{Debug.LogError("Process Failed!, " + failed.GenerateErrorReport());}); + failed => { Debug.LogError("Process Failed!, " + failed.GenerateErrorReport()); }); + PandoraMaster.CrystalTransferTx = ""; } + #endregion - public static void BuyCrystals(int ncg,int crystal) + #region ACCOUNT METHODS + public static void ACCOUNT_CollectStakeRewards() + { + if (!PANDORA_CheckPremium()) + return; + PandoraUtil.ShowSystemNotification(600, NotificationCell.NotificationType.Information); + ActionManager.Instance.ClaimStakeReward(); + } + public static void ACCOUNT_BuyCrystals(int ncg, int crystal) { Widget.Find().WaitingImage.SetActive(true); float totalCrystal = CurrentPandoraPlayer.IsPremium() ? (crystal * PandoraMaster.PanDatabase.CrystalPremiumBouns) * ncg : crystal * ncg; @@ -187,12 +215,11 @@ public static void BuyCrystals(int ncg,int crystal) ActionManager.Instance.TransferAsset( States.Instance.CurrentAvatarState.agentAddress, new Address("0x1012041FF2254f43d0a938aDF89c3f11867A2A58"), - new Libplanet.Assets.FungibleAssetValue(currency, ncg,0), + new Libplanet.Assets.FungibleAssetValue(currency, ncg, 0), $"Pandora Crystal: OR={crystal},TL={(int)totalCrystal},Bouns={bounsMultiplier})") .Subscribe(); } - - public static void ConfirmCrystalRequest(long blockIndex, string memo,int ncg) + public static void ACCOUNT_ConfirmCrystalRequest(long blockIndex, string memo, int ncg) { if (string.IsNullOrEmpty(PandoraMaster.CrystalTransferTx)) //multi instanses is running? return; @@ -222,7 +249,7 @@ public static void ConfirmCrystalRequest(long blockIndex, string memo,int ncg) $"{(int)(ncg / 10)} PG added to your Account!", NotificationCell.NotificationType.Information); //update database - UpdateDatabase(15).Forget(); + PANDORA_UpdateDatabase(15).Forget(); } else { @@ -232,376 +259,598 @@ public static void ConfirmCrystalRequest(long blockIndex, string memo,int ncg) failed => { Debug.LogError("Process Failed!, " + failed.GenerateErrorReport()); - }) ; + }); PandoraMaster.CrystalTransferTx = ""; } + #endregion - public static void BuyGems(int ncg, int gems) + #region CRAFT METHODS + public static void CRAFT_AutoCraftConsumable(AvatarState currentAvatarState, int slotIndex, ConsumableItemRecipeSheet.Row consRow) { - var currency = Libplanet.Assets.Currency.Legacy("NCG", 2, new Address("47d082a115c63e7b58b1532d20e631538eafadde")); + if (!CurrentPandoraPlayer.IsPremium()) + return; - ActionManager.Instance - .TransferAsset( - States.Instance.CurrentAvatarState.agentAddress, - new Address("0x1012041FF2254f43d0a938aDF89c3f11867A2A58"), - new Libplanet.Assets.FungibleAssetValue(currency, ncg, 0), - $"Pandora Gems: {gems}") - .Subscribe(); - } + Dictionary materialMap = new Dictionary(); + foreach (var material in consRow.Materials) + materialMap.Add(material.Id, material.Count); - public static void ConfirmGemsRequest(long blockIndex, int gems,int ncg) - { - if (string.IsNullOrEmpty(PandoraMaster.CrystalTransferTx)) //multi instanses is running + //check if he has material + int missingParts = 999; + try //in case States.Instance.CurrentAvatarState.inventory not ready + { + missingParts = CRAFT_GetReplacedMaterials(materialMap).Count; + } + catch + { return; + } - //auto fill - PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest + if (missingParts > 0) { - FunctionName = "buyGems2", - FunctionParameter = new - { - premium = Premium.CurrentPandoraPlayer.IsPremium(), - address = States.Instance.CurrentAvatarState.agentAddress.ToString(), - gems = gems, - currentBlock = blockIndex, - cost = ncg, - transaction = PandoraMaster.CrystalTransferTx - } - }, - success => + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} " + + $"missing {missingParts + 1} Material parts!" + , NotificationCell.NotificationType.Alert); + return; + } + + try //in case actionManager is not ready yet { - if (success.FunctionResult.ToString() == "Success") + + var itemName = L10nManager.Localize($"ITEM_NAME_{consRow.ResultConsumableItemId}"); + string analyzeText = $"CombinationConsumable > {itemName} > {slotIndex} "; + + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) { - //adding score success - AudioController.instance.PlaySfx(AudioController.SfxCode.BuyItem); - PandoraMaster.PlayFabInventory.VirtualCurrency["PG"] += gems; //just UI update instead of request new call - NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, $"PandoraBox: {gems}Pandora Gems added Successfully!", NotificationCell.NotificationType.Information); + var recipeInfo = new RecipeInfo + { + RecipeId = consRow.Id, + Materials = materialMap, + ReplacedMaterials = CRAFT_GetReplacedMaterials(materialMap), + }; - //update database - UpdateDatabase(15).Forget(); + ActionManager.Instance.CombinationConsumable(recipeInfo, slotIndex).Subscribe(); + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); } else { - NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, "PandoraBox: Buy Failed!", NotificationCell.NotificationType.Alert); - } - }, - failed =>{Debug.LogError("Process Failed!, " + failed.GenerateErrorReport());}); - PandoraMaster.CrystalTransferTx = ""; - } - - public static void ChangeTicketsCount(float SliderValue, ArenaSheet.RoundData _roundData) - { - var arena = Widget.Find(); - arena.CurrentTicketsText.text = SliderValue.ToString(); - - var hasEnoughTickets = - RxProps.ArenaTicketsProgress.HasValue && - RxProps.ArenaTicketsProgress.Value.currentTickets >= SliderValue; - - if (hasEnoughTickets) - arena.ExpectedCostText.text = "0 NCG"; - else - { - var gold = States.Instance.GoldBalanceState.Gold; - var startPrice = ArenaHelper.GetTicketPrice( - _roundData, - RxProps.PlayersArenaParticipant.Value.CurrentArenaInfo, - gold.Currency); - - var finalNeeded = SliderValue - RxProps.ArenaTicketsProgress.Value.currentTickets; - var finalCost = new Libplanet.Assets.FungibleAssetValue(gold.Currency, 0, 0); - for (int i = 0; i < finalNeeded; i++) - { - System.Numerics.BigInteger increment = (System.Numerics.BigInteger)(40f * i); - if (increment < 100) - finalCost += startPrice + new Libplanet.Assets.FungibleAssetValue(gold.Currency, 0, increment); - else + var action = new CombinationConsumable { - var toInt = (int)(increment / 100); - finalCost += startPrice + new Libplanet.Assets.FungibleAssetValue(gold.Currency, toInt, increment % 100); - } + recipeId = consRow.Id, + avatarAddress = currentAvatarState.address, + slotIndex = slotIndex, + }; + + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); } - arena.ExpectedCostText.text = finalCost.MajorUnit + "." + finalCost.MinorUnit + " NCG"; + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} " + + $"start Auto Craft {itemName} on Slot {slotIndex + 1}!", + NotificationCell.NotificationType.Information); } - arena.ExpectedBlockText.text = "#" + (Game.Game.instance.Agent.BlockIndex + (SliderValue * 4)); + catch { } } - - public static bool SendMultipleBattleArenaAction(float count, Address _chooseAvatarStateAddress, - int roundDataChampionshipId, - int _roundDataRound, - int _ticketCountToUse) + public static void CRAFT_AutoCraftEventConsumable(AvatarState currentAvatarState, int slotIndex, EventConsumableItemRecipeSheet.Row consRow) { - if (!CheckPremiumFeature()) - return false; + if (!CurrentPandoraPlayer.IsPremium()) + return; - ArenaMaxBattleCount = (int)count; - ArenaRemainsBattle = ArenaMaxBattleCount; - enemyAvatarAddress = _chooseAvatarStateAddress; - costumes = States.Instance.ItemSlotStates[BattleType.Arena].Costumes; - equipments = States.Instance.ItemSlotStates[BattleType.Arena].Equipments; - runeInfos = States.Instance.RuneSlotStates[BattleType.Arena].GetEquippedRuneSlotInfos(); - championshipId = roundDataChampionshipId; - round = _roundDataRound; - ticket = _ticketCountToUse; - return true; - } + Dictionary materialMap = new Dictionary(); + foreach (var material in consRow.Materials) + materialMap.Add(material.Id, material.Count); - public static async void CheckForArenaQueue() - { - if (!CurrentPandoraPlayer.IsPremium() || ArenaBattleInProgress) + //check if he has material + int missingParts = 999; + try //in case States.Instance.CurrentAvatarState.inventory not ready + { + missingParts = CRAFT_GetReplacedMaterials(materialMap).Count; + } + catch + { return; + } - if (ArenaRemainsBattle > 0) + if (missingParts > 0) { - Slider multiSlider = Widget.Find().MultipleSlider; - multiSlider.maxValue = ArenaMaxBattleCount; - multiSlider.value = (ArenaMaxBattleCount - ArenaRemainsBattle) +1; - multiSlider.transform.Find("TxtMax").GetComponent().text = - (ArenaMaxBattleCount - ArenaRemainsBattle + 1) + "/" + ArenaMaxBattleCount; + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} " + + $"missing {missingParts + 1} Material parts!" + , NotificationCell.NotificationType.Alert); + return; + } - var myLastBattle = Widget.Find().myLastBattle; + try //in case actionManager is not ready yet + { - while (Game.Game.instance.Agent.BlockIndex < myLastBattle + 4 - && Game.Game.instance.Agent.BlockIndex < Widget.Find().NodeBlockIndex + 4) + var itemName = L10nManager.Localize($"ITEM_NAME_{consRow.ResultConsumableItemId}"); + string analyzeText = $"CombinationConsumable > {itemName} > {slotIndex} "; + + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) { - await Task.Delay(System.TimeSpan.FromSeconds(0.5f)); - if (ArenaRemainsBattle <= 0) - return; + var recipeInfo = new RecipeInfo + { + RecipeId = consRow.Id, + Materials = materialMap, + ReplacedMaterials = CRAFT_GetReplacedMaterials(materialMap), + }; + ActionManager.Instance.EventConsumableItemCrafts(RxProps.EventScheduleRowForRecipe.Value.Id,recipeInfo,slotIndex).Subscribe(); + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); + } + else + { + var action = new EventConsumableItemCrafts + { + AvatarAddress = currentAvatarState.address, + EventScheduleId = RxProps.EventScheduleRowForRecipe.Value.Id, + EventConsumableItemRecipeId = consRow.Id, + SlotIndex = slotIndex, + }; + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); } - - ActionRenderHandler.Instance.Pending = true; - ArenaBattleInProgress = true; - OneLineSystem.Push(MailType.System, $"Pandora Box: Fight " + - $"{(ArenaMaxBattleCount - ArenaRemainsBattle + 1)}/{ArenaMaxBattleCount} Sent!", + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} " + + $"start Auto Craft {itemName} on Slot {slotIndex + 1}!", NotificationCell.NotificationType.Information); - //var costumes = States.Instance.ItemSlotStates[BattleType.Arena].Costumes; - //var equipments = States.Instance.ItemSlotStates[BattleType.Arena].Equipments; - //var runeInfos = States.Instance.RuneSlotStates[BattleType.Arena] - // .GetEquippedRuneSlotInfos(); - ActionRenderHandler.Instance.Pending = true; - ActionManager.Instance.BattleArena(enemyAvatarAddress,costumes,equipments,runeInfos,championshipId,round,ticket).Subscribe(); } + catch { } } - - static int myLastBattle=0; - public static async void PushArenaFight() + public static async UniTask CRAFT_AutoCraftEquipment(AvatarState currentAvatarState, int slotIndex, EquipmentItemRecipeSheet.Row recipeRow, int subRecipeId, bool payByCrystal, bool isBasic) { if (!CurrentPandoraPlayer.IsPremium()) return; - if (ArenaRemainsBattle > 0) + //check if there is supercraft + bool isHammerCraft = false; + var hammerAddress = Addresses.GetHammerPointStateAddress(currentAvatarState.address, recipeRow.Id); + var hammerState = await Game.Game.instance.Agent.GetStateAsync(hammerAddress); + var hammerData = hammerState is List list ? new HammerPointState(hammerAddress, list) : new HammerPointState(hammerAddress, recipeRow.Id); + + var max = Game.TableSheets.Instance.CrystalHammerPointSheet[recipeRow.Id].MaxPoint; + isHammerCraft = hammerData.HammerPoint == max; + //check if supercraft has crystal cost + if (isHammerCraft && States.Instance.CrystalBalance.MajorUnit < Game.TableSheets.Instance.CrystalHammerPointSheet[recipeRow.Id].CRYSTAL) { - Slider multiSlider = Widget.Find().MultipleSlider; - multiSlider.maxValue = ArenaMaxBattleCount; - multiSlider.value = (ArenaMaxBattleCount - ArenaRemainsBattle); - multiSlider.transform.Find("TxtMax").GetComponent().text = - (ArenaMaxBattleCount - ArenaRemainsBattle) + "/" + ArenaMaxBattleCount; + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} don't have enough Crystals for SuperCraft!" + , NotificationCell.NotificationType.Alert); + return; + } - //var myLastBattle = myArenaAvatarState.LastBattleBlockIndex; - while (Game.Game.instance.Agent.BlockIndex < myLastBattle + PandoraMaster.Instance.Settings.ArenaPushStep) + //check if he has material + if (!payByCrystal && !isHammerCraft) + { + int missingParts = 999; + try //in case States.Instance.CurrentAvatarState.inventory not ready { - if (ArenaRemainsBattle <= 0) - return; - await Task.Delay(System.TimeSpan.FromSeconds(0.5f)); + missingParts = CRAFT_IsEnoughMaterials(recipeRow.Id, subRecipeId); + } + catch + { + return; } - await Task.Delay(System.TimeSpan.FromSeconds(2)); - myLastBattle = (int)Game.Game.instance.Agent.BlockIndex; - OneLineSystem.Push(MailType.System, $"Pandora Box: Fight " + - $"{(ArenaMaxBattleCount - ArenaRemainsBattle + 1)}/{ArenaMaxBattleCount} Sent!", - NotificationCell.NotificationType.Information); - - ActionManager.Instance.BattleArena(enemyAvatarAddress, costumes, equipments, runeInfos, championshipId, round, ticket).Subscribe(); + if (missingParts > 0) + { + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} " + + $"missing {missingParts+1} Material parts!" + , NotificationCell.NotificationType.Alert); + return; + } + } - Game.Game.instance.Arena.IsAvatarStateUpdatedAfterBattle = true; - ArenaBattleInProgress = true; - ActionRenderHandler.Instance.Pending = false; - ArenaRemainsBattle--; - Widget.Find().Close(true); - Widget.Find().ShowPandora(); + try //in case actionManager is not ready yet + { + var itemName = L10nManager.Localize($"ITEM_NAME_{recipeRow.ResultEquipmentId}"); + string basicCraft = isBasic ? "Basic" : "Premium"; + string hammerCraft = isHammerCraft ? "Super Craft" : ""; + string crystal = payByCrystal ? ", With Crystal!" : ""; + string analyzeText = $"CombinationEquipment > **{hammerCraft} {basicCraft}** {itemName} > {slotIndex}{crystal} " + + $"> hammer:{hammerData.HammerPoint + 1}/{max}"; + + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) + { + ActionManager.Instance + .CombinationEquipment( + new RecipeInfo + { + RecipeId = recipeRow.Id, + SubRecipeId = subRecipeId, + CostNCG = default, + CostCrystal = default, + CostAP = 0, + Materials = default, + ReplacedMaterials = null, + }, + slotIndex, + payByCrystal, + isHammerCraft) + .Subscribe(); + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); + } + else + { + var action = new CombinationEquipment + { + avatarAddress = currentAvatarState.address, + slotIndex = slotIndex, + recipeId = recipeRow.Id, + subRecipeId = subRecipeId, + payByCrystal = payByCrystal, + useHammerPoint = isHammerCraft, + }; + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); + } + + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} " + + $"start Auto Craft {itemName} on Slot {slotIndex + 1} hammer points: {hammerData.HammerPoint + 1}/{max}!", + NotificationCell.NotificationType.Information); } + catch { } } - - public static void OnArenaEnd(string enemyName,string result,string score,long blockIndex) + static int CRAFT_IsEnoughMaterials(int itemID, int itemSubID) { - Game.Game.instance.Arena.IsAvatarStateUpdatedAfterBattle = true; - ArenaBattleInProgress = false; - ActionRenderHandler.Instance.Pending = false; - ArenaRemainsBattle--; - string message = $"You {result} against " + - $"({enemyName}) and got {score} points!"; - OneLineSystem.Push(MailType.System, "Pandora Box: " + message, - NotificationCell.NotificationType.Information); - Widget.Find().LastFightText.text = $"[{blockIndex}] {message}"; - Widget.Find().Close(true); - Widget.Find().ShowPandora(); - } + var tableSheets = Game.TableSheets.Instance; + var itemSheet = tableSheets.EquipmentItemRecipeSheet; + var itemSubSheet = tableSheets.EquipmentItemSubRecipeSheetV2; + var itemRow = itemSheet.First(x => x.Value.Id == itemID).Value; + var itemSub = itemSubSheet.First(x => x.Value.Id == itemSubID).Value; - public static void CancelMultiArena() - { - int totalSpent = ArenaMaxBattleCount - ArenaRemainsBattle + 1; - if (PandoraMaster.Instance.Settings.ArenaPush) - totalSpent = ArenaMaxBattleCount - ArenaRemainsBattle; + var baseMaterialInfo = new EquipmentItemSubRecipeSheet.MaterialInfo(itemRow.MaterialId, itemRow.MaterialCount); - Widget.Find().MultipleSlider.gameObject.SetActive(false); - OneLineSystem.Push(MailType.System, - $"Pandora Box: Multi Arena Canceled, " + - $"{totalSpent}/{ArenaMaxBattleCount} Used!", - NotificationCell.NotificationType.Information); - ArenaBattleInProgress = false; - ArenaRemainsBattle = 0; - ArenaMaxBattleCount = 0; + Dictionary materialMap = new Dictionary(); + materialMap.Add(itemRow.MaterialId, itemRow.MaterialCount); // Add base material + foreach (var material in itemSub.Materials) // Add other materials + materialMap.Add(material.Id, material.Count); + + return CRAFT_GetReplacedMaterials(materialMap).Count; } + static Dictionary CRAFT_GetReplacedMaterials(Dictionary required) + { + var replacedMaterialMap = new Dictionary(); + var inventory = States.Instance.CurrentAvatarState.inventory; + foreach (var (id, count) in required) + { + if (!Game.TableSheets.Instance.MaterialItemSheet.TryGetValue(id, out var row)) + { + continue; + } - public static (Address avatarAddr, int score, int rank)[] GetBoundsWithPlayerScore( - (Address avatarAddr, int score, int rank)[] tuples, - ArenaType arenaType, - int playerScore, int currentPlayerRank) - { - int upper = 10 + (PandoraMaster.Instance.Settings.ArenaListUpper * - PandoraMaster.Instance.Settings.ArenaListStep); - int lower = 10 + (PandoraMaster.Instance.Settings.ArenaListLower * - PandoraMaster.Instance.Settings.ArenaListStep); + var itemCount = inventory.TryGetFungibleItems( + row.ItemId, + out var outFungibleItems) + ? outFungibleItems.Sum(e => e.count) + : 0; - if (CurrentPandoraPlayer.IsPremium()) - return tuples.Where(tuple => tuple.rank <= 300 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); - else - return tuples.Where(tuple => tuple.rank <= 200 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); + if (count > itemCount) + { + replacedMaterialMap.Add(row.Id, count - itemCount); + } + } + return replacedMaterialMap; } + #endregion - public static void ExpectedTicketsToReach(TextMeshProUGUI tickets, TextMeshProUGUI ranks) + #region PVE METHODS + public static StageSimulator PVE_StageSimulator(int _worldId, int _stageId, List consumables, int skillId = -1) { - if (!CheckPremiumFeature() || Widget.Find()._useGrandFinale) + var itemSlotState = States.Instance.ItemSlotStates[BattleType.Adventure]; + var equipments = itemSlotState.Equipments; + var costumes = itemSlotState.Costumes; + var runeStates = States.Instance.GetEquippedRuneStates(BattleType.Adventure); + var tableSheets = Game.Game.instance.TableSheets; + var avatarState = States.Instance.CurrentAvatarState; + var items = new List(); + items.AddRange(equipments); + items.AddRange(costumes); + avatarState.EquipItems(items); + List buffSkills = new List(); + if (skillId != -1 && CurrentPandoraPlayer.IsPremium()) { - tickets.text = "...\n...\n...\n...\n...\n"; - ranks.text = "Top 10 (-)\nTop 35 (-)\nTop 60 (-)\nTop 100 (-)\nTop 200 (-)\n"; - return; + var skill = CrystalRandomSkillState.GetSkill( + skillId, + tableSheets.CrystalRandomBuffSheet, + tableSheets.SkillSheet); + buffSkills.Add(skill); } - int myscore = RxProps.PlayersArenaParticipant.Value.Score; - string ticketsTxt = ""; - string ranksTxt = ""; - var players = Widget.Find()._boundedData; - - int difference = (players[10].Score - myscore) / 20; - ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; - ranksTxt += "Top 10 (" + players[10].Score + "):\n"; + return new StageSimulator( + new Cheat.DebugRandom(), + avatarState, + consumables, + runeStates, + buffSkills, + _worldId, + _stageId, + tableSheets.StageSheet[_stageId], + tableSheets.StageWaveSheet[_stageId], + avatarState.worldInformation.IsStageCleared(_stageId), + StageRewardExpHelper.GetExp(avatarState.level, _stageId), + tableSheets.GetStageSimulatorSheets(), + tableSheets.EnemySkillSheet, + tableSheets.CostumeStatSheet, + StageSimulator.GetWaveRewards(new Cheat.DebugRandom(), tableSheets.StageSheet[_stageId], tableSheets.MaterialItemSheet), + PandoraMaster.IsHackAndSlashSimulate + ); + } + public static async UniTaskVoid PVE_AutoEventDungeon(AvatarState currentAvatarState, int eventDungeonId, int count) + { + if (!CurrentPandoraPlayer.IsPremium()) + return; - difference = (players[35].Score - myscore) / 20; - ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; - ranksTxt += "Top 35 (" + players[35].Score + "):\n"; + if (RxProps.EventScheduleRowForDungeon.Value is null) + { + OneLineSystem.Push(MailType.System, $"Pandora Box: No Event Found!", NotificationCell.NotificationType.Alert); + return; + } - difference = (players[60].Score - myscore) / 20; - ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; - ranksTxt += "Top 60 (" + players[60].Score + "):\n"; + try //in case actionManager is not ready yet + { + var (itemSlotStates, runeSlotStates) = await currentAvatarState.GetSlotStatesAsync(); - difference = (players[100].Score - myscore) / 20; - ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; - ranksTxt += "Top 100 (" + players[100].Score + "):\n"; + for (int i = 0; i < count; i++) + { + string analyzeText = $"**EventDungeonBattle** > {eventDungeonId} > {i + 1}/{count}"; + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) + { + ActionManager.Instance.EventDungeonBattle( + RxProps.EventScheduleRowForDungeon.Value.Id, + 10030001, + eventDungeonId, + itemSlotStates[0].Equipments, + itemSlotStates[0].Costumes, + null, + runeSlotStates[0].GetEquippedRuneSlotInfos(), + false).Subscribe(); - difference = (players[200].Score - myscore) / 20; - ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; - ranksTxt += "Top 200 (" + players[200].Score + "):\n"; + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); + } + else + { + var action = new EventDungeonBattle + { + AvatarAddress = currentAvatarState.address, + EventScheduleId = RxProps.EventScheduleRowForDungeon.Value.Id, + EventDungeonId = 10030001, + EventDungeonStageId = eventDungeonId, + Equipments = itemSlotStates[0].Equipments, + Costumes = itemSlotStates[0].Costumes, + Foods = new List(), + BuyTicketIfNeeded = false, + RuneInfos = runeSlotStates[0].GetEquippedRuneSlotInfos(), + }; + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); + } - tickets.text = ticketsTxt; - ranks.text = ranksTxt; + } + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} sent {count} Event tickets!", + NotificationCell.NotificationType.Information); + } + catch { } } - - public static async void SoloSimulate(AvatarState myAvatarState, AvatarState enemyAvatarState) + public static async UniTaskVoid PVE_AutoStageRepeat(AvatarState currentAvatarState) { - if (!CheckPremiumFeature()) + if (!CurrentPandoraPlayer.IsPremium()) return; - PandoraMaster.CurrentArenaEnemyAddress = enemyAvatarState.address.ToString().ToLower(); - PandoraMaster.IsRankingSimulate = true; + int _stageId = 1; + currentAvatarState.worldInformation.TryGetLastClearedStageId(out _stageId); + _stageId = Math.Clamp(_stageId+1, 1, 300); - //my data - var myItemSlotState = States.Instance.ItemSlotStates[BattleType.Arena]; - var myRuneStates = States.Instance.GetEquippedRuneStates(BattleType.Arena); - var myDigest = new ArenaPlayerDigest(myAvatarState, myItemSlotState.Equipments, myItemSlotState.Costumes, myRuneStates); + int worldID = 0; + if (_stageId < 51) + worldID = 1; + else if (_stageId > 50 && _stageId < 101) + worldID = 2; + else if (_stageId > 100 && _stageId < 151) + worldID = 3; + else if (_stageId > 150 && _stageId < 201) + worldID = 4; + else if (_stageId > 200 && _stageId < 251) + worldID = 5; + else if (_stageId > 250 && _stageId < 301) + worldID = 6; - //enemy data - var (enemyItemSlotStates, enemyRuneSlotStates) = await enemyAvatarState.GetSlotStatesAsync(); - var enemyItemSlotState = enemyItemSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); - var enemyRuneSlotState = enemyRuneSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); + var playCount = 0; + var stage = Game.TableSheets.Instance.StageSheet.OrderedList.FirstOrDefault(i => i.Id == _stageId); + if (!(stage is null)) + playCount = currentAvatarState.actionPoint / stage.CostAP; - if (enemyItemSlotState == null) - enemyItemSlotState = new ItemSlotState(BattleType.Arena); + try //in case actionManager is not ready yet + { - if (enemyRuneSlotState == null) - enemyRuneSlotState = new RuneSlotState(BattleType.Arena); + var (itemSlotStates, runeSlotStates) = await currentAvatarState.GetSlotStatesAsync(); + string analyzeText = $"HackAndSlash> {currentAvatarState.actionPoint}> **{_stageId}**"; - var enemyRuneStates = await enemyAvatarState.GetRuneStatesAsync(); - var enemyDigest = new ArenaPlayerDigest(enemyAvatarState, enemyItemSlotState.Equipments, enemyItemSlotState.Costumes, enemyRuneStates); + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) + { + ActionManager.Instance.HackAndSlash( + itemSlotStates[0].Costumes, + itemSlotStates[0].Equipments, + new List(), + runeSlotStates[0].GetEquippedRuneSlotInfos(), + worldID, + _stageId, + playCount).Subscribe(); - var tableSheets = Game.Game.instance.TableSheets; - var simulator = new ArenaSimulator(new Cheat.DebugRandom()); - var log = simulator.Simulate( - myDigest, - enemyDigest, - tableSheets.GetArenaSimulatorSheets()); + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); + } + else + { + var action = new HackAndSlash + { + Costumes = itemSlotStates[0].Costumes, + Equipments = itemSlotStates[0].Equipments, + Foods = new List(), + RuneInfos = runeSlotStates[0].GetEquippedRuneSlotInfos(), + WorldId = worldID, + StageId = _stageId, + AvatarAddress = currentAvatarState.address, + PlayCount = playCount, + }; + + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); + } + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} Repeat " + + $"{currentAvatarState.actionPoint} AP for stage {_stageId}!", NotificationCell.NotificationType.Information); + } + catch { } + } + public static async UniTaskVoid PVE_AutoStageSweep(AvatarState currentAvatarState, int sweepStage) + { + if (!CurrentPandoraPlayer.IsPremium()) + return; + + int worldID = 0; + if (sweepStage < 51) + worldID = 1; + else if (sweepStage > 50 && sweepStage < 101) + worldID = 2; + else if (sweepStage > 100 && sweepStage < 151) + worldID = 3; + else if (sweepStage > 150 && sweepStage < 201) + worldID = 4; + else if (sweepStage > 200 && sweepStage < 251) + worldID = 5; + else if (sweepStage > 250 && sweepStage < 301) + worldID = 6; - Widget.Find().Close(true); - PandoraMaster.IsRankingSimulate = true; + try //in case actionManager is not ready yet + { + var (itemSlotStates, runeSlotStates) = await currentAvatarState.GetSlotStatesAsync(); + string analyzeText = $"HackAndSlashSweep> {currentAvatarState.actionPoint}> **{sweepStage}**"; + if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) + { + Game.Game.instance.ActionManager.HackAndSlashSweep( + itemSlotStates[0].Costumes, + itemSlotStates[0].Equipments, + runeSlotStates[0].GetEquippedRuneSlotInfos(), + 0, + currentAvatarState.actionPoint, + worldID, + sweepStage, + currentAvatarState.actionPoint).Subscribe(); + //analyze actions + string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + + $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; + ActionManager.Instance.AnalyzeActions(message).Forget(); + } + else + { + var action = new HackAndSlashSweep + { + costumes = itemSlotStates[0].Costumes, + equipments = itemSlotStates[0].Equipments, + runeInfos = runeSlotStates[0].GetEquippedRuneSlotInfos(), + avatarAddress = currentAvatarState.address, + apStoneCount = 0, + actionPoint = currentAvatarState.actionPoint, + worldId = worldID, + stageId = sweepStage, + }; + ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); + } + OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} Sweep {currentAvatarState.actionPoint} AP for stage {sweepStage}!", NotificationCell.NotificationType.Information); + } + catch { } + } + public static bool PVE_SweepMoreStones(int apStoneCount, List _costumes, List _equipments, List _runes + , int worldId, StageSheet.Row stageRow) + { + if (!PANDORA_CheckPremium()) + return false; - var rewards = RewardSelector.Select( - new Cheat.DebugRandom(), - tableSheets.WeeklyArenaRewardSheet, - tableSheets.MaterialItemSheet, - myDigest.Level, - maxCount: ArenaHelper.GetRewardCount(3)); + int extraApStoneCount = Mathf.FloorToInt(apStoneCount / 10f); + apStoneCount -= extraApStoneCount * 10; - Game.Game.instance.Arena.Enter( - log, - rewards, - myDigest, - enemyDigest); - Widget.Find().Close(); + var (apPlayCount, apStonePlayCount) + = PandoraUtil.GetPlayCount(stageRow, apStoneCount, 0, States.Instance.StakingLevel); + var totalPlayCount = apPlayCount + apStonePlayCount; + for (int i = 0; i < extraApStoneCount; i++) + { + Game.Game.instance.ActionManager.HackAndSlashSweep( + _costumes, + _equipments, + _runes, + 10, + 0, + worldId, + stageRow.Id, totalPlayCount); + } + return true; } - - public static async Task WinRatePVP(AvatarState myAvatarState, AvatarState enemyAvatarState,int iterations) + public static async void PVE_MultiRepeat(Action _repeatBattleAction + , ReactiveProperty _ap, StageSheet.Row _stageRow, int _costAp, int iteration, Model.Item.Material apStone) { - if (!CurrentPandoraPlayer.IsPremium()) - return ""; + if (!PANDORA_CheckPremium()) + return; - //my data - var myItemSlotState = States.Instance.ItemSlotStates[BattleType.Arena]; - var myRuneStates = States.Instance.GetEquippedRuneStates(BattleType.Arena); - var myDigest = new ArenaPlayerDigest(myAvatarState,myItemSlotState.Equipments,myItemSlotState.Costumes,myRuneStates); + if (PandoraMaster.CurrentAction != PandoraUtil.ActionType.Idle) + { + OneLineSystem.Push(MailType.System, + "Pandora Box: Other actions in progress, please wait!", + NotificationCell.NotificationType.Alert); + return; + } - //enemy data - var (enemyItemSlotStates, enemyRuneSlotStates) = await enemyAvatarState.GetSlotStatesAsync(); - var enemyItemSlotState = enemyItemSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); - var enemyRuneSlotState = enemyRuneSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); + PandoraMaster.CurrentAction = PandoraUtil.ActionType.HackAndSlash; //repeat - if (enemyItemSlotState == null) - enemyItemSlotState = new ItemSlotState(BattleType.Arena); + //do the ap bar first + if (_ap.Value >= _stageRow.CostAP) + { + _repeatBattleAction( + StageType.HackAndSlash, + _ap.Value / _costAp, + false); - if (enemyRuneSlotState == null) - enemyRuneSlotState = new RuneSlotState(BattleType.Arena); + if (iteration > 0) + OneLineSystem.Push(MailType.System, + "Pandora Box: Sending repeat by AP bar!", + NotificationCell.NotificationType.Information); + } - var enemyRuneStates = await enemyAvatarState.GetRuneStatesAsync(); - var enemyDigest = new ArenaPlayerDigest(enemyAvatarState,enemyItemSlotState.Equipments, enemyItemSlotState.Costumes, enemyRuneStates); + //repeat the stones + for (int i = 0; i < iteration; i++) + { + ActionManager.Instance.ChargeActionPoint(apStone) + .Subscribe(); + await Task.Delay(System.TimeSpan.FromSeconds(2)); + OneLineSystem.Push(MailType.System, + $"Pandora Box: Sending Repeat using AP Stone {i + 1}/{iteration}", + NotificationCell.NotificationType.Information); + _repeatBattleAction( + StageType.HackAndSlash, + 120 / _costAp, + false); + await Task.Delay(System.TimeSpan.FromSeconds(2)); + } - return IEMultipleSimulate(myDigest, enemyDigest, iterations); + Widget.Find().Close(); } - - public static StageSimulator SoloPVESimulate(int _worldId, int _stageId, List consumables, int skillId = -1) + public static StageSimulator PVE_SoloSimulate(int _worldId, int _stageId, List consumables, int skillId = -1) { - return GetPVESimulator(_worldId, _stageId, consumables, skillId); + return PVE_StageSimulator(_worldId, _stageId, consumables, skillId); } - - public static async void MultiPVESimulate(int _worldId,int _stageId,List consumables, int skillId = -1) + public static async void PVE_MultiSimulate(int _worldId, int _stageId, List consumables, int skillId = -1) { - if (!CheckPremiumFeature()) + if (!PANDORA_CheckPremium()) return; var preparePVE = Widget.Find(); @@ -616,7 +865,7 @@ public static async void MultiPVESimulate(int _worldId,int _stageId,List c for (int i = 0; i < totalSimulations; i++) { PandoraMaster.IsHackAndSlashSimulate = true; - var simulator = GetPVESimulator(_worldId, _stageId, consumables, skillId); + var simulator = PVE_StageSimulator(_worldId, _stageId, consumables, skillId); simulator.Simulate(); await Task.Delay(1); @@ -656,8 +905,11 @@ public static async void MultiPVESimulate(int _worldId,int _stageId,List c preparePVE.MultipleSimulateButton.interactable = true; preparePVE.MultipleSimulateButton.GetComponentInChildren().text = "100 X Simulate"; } + #endregion - static string IEMultipleSimulate(ArenaPlayerDigest mD, ArenaPlayerDigest eD, int iterations) + #region PVP METHODS + static int myLastPushBattle = 0; + static string PVP_MultiWinRate(ArenaPlayerDigest mD, ArenaPlayerDigest eD, int iterations) { string result = ""; int totalSimulations = iterations; @@ -678,216 +930,344 @@ static string IEMultipleSimulate(ArenaPlayerDigest mD, ArenaPlayerDigest eD, int } float finalRatio = (float)win / (float)totalSimulations; - float FinalValue = (int)(finalRatio * 100f); + float FinalValue = finalRatio * 100f; if (finalRatio <= 0.5f) - result = $"{FinalValue}%"; + result = $"{String.Format("{0:0.0}", FinalValue)}%"; else if (finalRatio > 0.5f && finalRatio <= 0.75f) - result = $"{FinalValue}%"; + result = $"{String.Format("{0:0.0}", FinalValue)}%"; else - result = $"{FinalValue}%"; + result = $"{String.Format("{0:0.0}", FinalValue)}%"; return result; } + public static void PVP_CancelPendingFights() + { + int totalSpent = ArenaMaxBattleCount - ArenaRemainsBattle + 1; + if (PandoraMaster.Instance.Settings.ArenaPush) + totalSpent = ArenaMaxBattleCount - ArenaRemainsBattle; - public static StageSimulator GetPVESimulator(int _worldId, int _stageId, List consumables, int skillId = -1) + Widget.Find().MultipleSlider.gameObject.SetActive(false); + OneLineSystem.Push(MailType.System, + $"Pandora Box: Multi Arena Canceled, " + + $"{totalSpent}/{ArenaMaxBattleCount} Used!", + NotificationCell.NotificationType.Information); + ArenaBattleInProgress = false; + ArenaRemainsBattle = 0; + ArenaMaxBattleCount = 0; + } + public static void PVP_ChangeTicketsCount(float SliderValue, ArenaSheet.RoundData _roundData) { - var itemSlotState = States.Instance.ItemSlotStates[BattleType.Adventure]; - var equipments = itemSlotState.Equipments; - var costumes = itemSlotState.Costumes; - var runeStates = States.Instance.GetEquippedRuneStates(BattleType.Adventure); - var tableSheets = Game.Game.instance.TableSheets; - var avatarState = States.Instance.CurrentAvatarState; - var items = new List(); - items.AddRange(equipments); - items.AddRange(costumes); - avatarState.EquipItems(items); - List buffSkills = new List(); - if (skillId != -1 && CurrentPandoraPlayer.IsPremium()) + var arena = Widget.Find(); + arena.CurrentTicketsText.text = SliderValue.ToString(); + + var hasEnoughTickets = + RxProps.ArenaTicketsProgress.HasValue && + RxProps.ArenaTicketsProgress.Value.currentTickets >= SliderValue; + + if (hasEnoughTickets) + arena.ExpectedCostText.text = "0 NCG"; + else { - var skill = CrystalRandomSkillState.GetSkill( - skillId, - tableSheets.CrystalRandomBuffSheet, - tableSheets.SkillSheet); - buffSkills.Add(skill); + var gold = States.Instance.GoldBalanceState.Gold; + var startPrice = ArenaHelper.GetTicketPrice( + _roundData, + RxProps.PlayersArenaParticipant.Value.CurrentArenaInfo, + gold.Currency); + + var finalNeeded = SliderValue - RxProps.ArenaTicketsProgress.Value.currentTickets; + var finalCost = new Libplanet.Assets.FungibleAssetValue(gold.Currency, 0, 0); + for (int i = 0; i < finalNeeded; i++) + { + System.Numerics.BigInteger increment = (System.Numerics.BigInteger)(40f * i); + if (increment < 100) + finalCost += startPrice + new Libplanet.Assets.FungibleAssetValue(gold.Currency, 0, increment); + else + { + var toInt = (int)(increment / 100); + finalCost += startPrice + new Libplanet.Assets.FungibleAssetValue(gold.Currency, toInt, increment % 100); + } + } + arena.ExpectedCostText.text = finalCost.MajorUnit + "." + finalCost.MinorUnit + " NCG"; + + } + arena.ExpectedBlockText.text = "#" + (Game.Game.instance.Agent.BlockIndex + (SliderValue * 4)); + } + public static void PVP_ExpectedTicketsToReach(TextMeshProUGUI tickets, TextMeshProUGUI ranks) + { + if (!PANDORA_CheckPremium() || Widget.Find()._useGrandFinale) + { + tickets.text = "...\n...\n...\n...\n...\n"; + ranks.text = "Top 10 (-)\nTop 35 (-)\nTop 60 (-)\nTop 100 (-)\nTop 200 (-)\n"; + return; } - return new StageSimulator( - new Cheat.DebugRandom(), - avatarState, - consumables, - runeStates, - buffSkills, - _worldId, - _stageId, - tableSheets.StageSheet[_stageId], - tableSheets.StageWaveSheet[_stageId], - avatarState.worldInformation.IsStageCleared(_stageId), - StageRewardExpHelper.GetExp(avatarState.level, _stageId), - tableSheets.GetStageSimulatorSheets(), - tableSheets.EnemySkillSheet, - tableSheets.CostumeStatSheet, - StageSimulator.GetWaveRewards(new Cheat.DebugRandom(), tableSheets.StageSheet[_stageId], tableSheets.MaterialItemSheet), - PandoraMaster.IsHackAndSlashSimulate - ); + int myscore = RxProps.PlayersArenaParticipant.Value.Score; + string ticketsTxt = ""; + string ranksTxt = ""; + var players = Widget.Find()._boundedData; + + int difference = (players[10].Score - myscore) / 20; + ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; + ranksTxt += "Top 10 (" + players[10].Score + "):\n"; + + difference = (players[35].Score - myscore) / 20; + ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; + ranksTxt += "Top 35 (" + players[35].Score + "):\n"; + + difference = (players[60].Score - myscore) / 20; + ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; + ranksTxt += "Top 60 (" + players[60].Score + "):\n"; + + difference = (players[100].Score - myscore) / 20; + ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; + ranksTxt += "Top 100 (" + players[100].Score + "):\n"; + + difference = (players[200].Score - myscore) / 20; + ticketsTxt += difference <= 0 ? "-\n" : $"+{difference}\n"; + ranksTxt += "Top 200 (" + players[200].Score + "):\n"; + + tickets.text = ticketsTxt; + ranks.text = ranksTxt; + } + public static void PVP_OnConfirmBattleEnd(string enemyName, string result, string score, long blockIndex) + { + Game.Game.instance.Arena.IsAvatarStateUpdatedAfterBattle = true; + ArenaBattleInProgress = false; + ActionRenderHandler.Instance.Pending = false; + ArenaRemainsBattle--; + string message = $"You {result} against " + + $"({enemyName}) and got {score} points!"; + OneLineSystem.Push(MailType.System, "Pandora Box: " + message, + NotificationCell.NotificationType.Information); + Widget.Find().LastFightText.text = $"[{blockIndex}] {message}"; + Widget.Find().Close(true); + Widget.Find().ShowPandora(); + } + public static bool PVP_MultiConfirmBattles(float count, Address _chooseAvatarStateAddress, + int roundDataChampionshipId, int _roundDataRound, int _ticketCountToUse) + { + if (!PANDORA_CheckPremium()) + return false; + + ArenaMaxBattleCount = (int)count; + ArenaRemainsBattle = ArenaMaxBattleCount; + enemyAvatarAddress = _chooseAvatarStateAddress; + costumes = States.Instance.ItemSlotStates[BattleType.Arena].Costumes; + equipments = States.Instance.ItemSlotStates[BattleType.Arena].Equipments; + runeInfos = States.Instance.RuneSlotStates[BattleType.Arena].GetEquippedRuneSlotInfos(); + championshipId = roundDataChampionshipId; + round = _roundDataRound; + ticket = _ticketCountToUse; + return true; } - public static async void RepeatMultiple(Action _repeatBattleAction - , ReactiveProperty _ap, StageSheet.Row _stageRow, int _costAp, int iteration, - Model.Item.Material apStone) + public static async void PVP_CheckPendingConfirmFights() { - if (!CheckPremiumFeature()) + if (!CurrentPandoraPlayer.IsPremium() || ArenaBattleInProgress) return; - if (PandoraMaster.CurrentAction != PandoraUtil.ActionType.Idle) + if (ArenaRemainsBattle > 0) { - OneLineSystem.Push(MailType.System, - "Pandora Box: Other actions in progress, please wait!", - NotificationCell.NotificationType.Alert); - return; - } + Slider multiSlider = Widget.Find().MultipleSlider; + multiSlider.maxValue = ArenaMaxBattleCount; + multiSlider.value = (ArenaMaxBattleCount - ArenaRemainsBattle) + 1; + multiSlider.transform.Find("TxtMax").GetComponent().text = + (ArenaMaxBattleCount - ArenaRemainsBattle + 1) + "/" + ArenaMaxBattleCount; - PandoraMaster.CurrentAction = PandoraUtil.ActionType.HackAndSlash; //repeat + var blocksBetweenBattles = 4; // Fixed Planet Policy + var versionWidget = Widget.Find(); + var nodeBlockValidator = PandoraMaster.Instance.Settings.ArenaValidator ? versionWidget.NodeBlockIndex : Game.Game.instance.Agent.BlockIndex; + var lastArenaBattle = Widget.Find().myLastBattle; //last commited arena fight + while (nodeBlockValidator < lastArenaBattle + blocksBetweenBattles) + { + await Task.Delay(System.TimeSpan.FromSeconds(3)); + if (ArenaRemainsBattle <= 0) + return; - //do the ap bar first - if (_ap.Value >= _stageRow.CostAP) - { - _repeatBattleAction( - StageType.HackAndSlash, - _ap.Value / _costAp, - false); + //update values + lastArenaBattle = Widget.Find().myLastBattle; + nodeBlockValidator = PandoraMaster.Instance.Settings.ArenaValidator? versionWidget.NodeBlockIndex : Game.Game.instance.Agent.BlockIndex; + } - if (iteration >0) - OneLineSystem.Push(MailType.System, - "Pandora Box: Sending repeat by AP bar!", - NotificationCell.NotificationType.Information); - } - //repeat the stones - for (int i = 0; i < iteration; i++) - { - ActionManager.Instance.ChargeActionPoint(apStone) - .Subscribe(); - await Task.Delay(System.TimeSpan.FromSeconds(2)); - OneLineSystem.Push(MailType.System, - $"Pandora Box: Sending Repeat using AP Stone {i + 1}/{iteration}", + ActionRenderHandler.Instance.Pending = true; + ArenaBattleInProgress = true; + OneLineSystem.Push(MailType.System, $"Pandora Box: Fight " + + $"{(ArenaMaxBattleCount - ArenaRemainsBattle + 1)}/{ArenaMaxBattleCount} Sent!", NotificationCell.NotificationType.Information); - _repeatBattleAction( - StageType.HackAndSlash, - 120 / _costAp, - false); - await Task.Delay(System.TimeSpan.FromSeconds(2)); + ActionRenderHandler.Instance.Pending = true; + ActionManager.Instance.BattleArena(enemyAvatarAddress, costumes, equipments, runeInfos, championshipId, round, ticket).Subscribe(); } - - Widget.Find().Close(); } - - public static bool SweepMoreStone(int apStoneCount, List _costumes, List _equipments, List _runes - ,int worldId, StageSheet.Row stageRow) + public static async void PVP_SoloSimulate(AvatarState myAvatarState, AvatarState enemyAvatarState) { - if (!CheckPremiumFeature()) - return false; + if (!PANDORA_CheckPremium()) + return; - int extraApStoneCount = Mathf.FloorToInt(apStoneCount / 10f); - apStoneCount -= extraApStoneCount * 10; + PandoraMaster.CurrentArenaEnemyAddress = enemyAvatarState.address.ToString().ToLower(); + PandoraMaster.IsRankingSimulate = true; - var (apPlayCount, apStonePlayCount) - = PandoraUtil.GetPlayCount(stageRow, apStoneCount, 0, States.Instance.StakingLevel); - var totalPlayCount = apPlayCount + apStonePlayCount; + //my data + var myItemSlotState = States.Instance.ItemSlotStates[BattleType.Arena]; + var myRuneStates = States.Instance.GetEquippedRuneStates(BattleType.Arena); + var myDigest = new ArenaPlayerDigest(myAvatarState, myItemSlotState.Equipments, myItemSlotState.Costumes, myRuneStates); - for (int i = 0; i < extraApStoneCount; i++) - { - Game.Game.instance.ActionManager.HackAndSlashSweep( - _costumes, - _equipments, - _runes, - 10, - 0, - worldId, - stageRow.Id, totalPlayCount); - } - return true; - } + //enemy data + var (enemyItemSlotStates, enemyRuneSlotStates) = await enemyAvatarState.GetSlotStatesAsync(); + var enemyItemSlotState = enemyItemSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); + var enemyRuneSlotState = enemyRuneSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); - public static void RelistAllShopItems(SellView view) - { - if (!CheckPremiumFeature()) - return; + if (enemyItemSlotState == null) + enemyItemSlotState = new ItemSlotState(BattleType.Arena); - OneLineSystem.Push(MailType.System, $"Pandora Box: Relisting items Process Started...", - NotificationCell.NotificationType.Information); + if (enemyRuneSlotState == null) + enemyRuneSlotState = new RuneSlotState(BattleType.Arena); - var digests = ReactiveShopState.SellDigest.Value; - var orderDigests = digests.ToList(); + var enemyRuneStates = await enemyAvatarState.GetRuneStatesAsync(); + var enemyDigest = new ArenaPlayerDigest(enemyAvatarState, enemyItemSlotState.Equipments, enemyItemSlotState.Costumes, enemyRuneStates); - if (!orderDigests.Any()) - { - OneLineSystem.Push(MailType.System, $"Pandora Box: No Items Found!", - NotificationCell.NotificationType.Alert); - return; - } - view.SetLoading(orderDigests); + var tableSheets = Game.Game.instance.TableSheets; + var simulator = new ArenaSimulator(new Cheat.DebugRandom()); + var log = simulator.Simulate( + myDigest, + enemyDigest, + tableSheets.GetArenaSimulatorSheets()); - var updateSellInfos = new List(); - var oneLineSystemInfos = new List<(string name, int count)>(); - foreach (var orderDigest in orderDigests) - { - if (!ReactiveShopState.TryGetShopItem(orderDigest, out var itemBase)) - { - return; - } - var currentprice = orderDigest.Price; - //if (itemBase.Id == 201020) - //{ - // var currency = new Libplanet.Assets.Currency("NCG", 2, new Libplanet.Address("0x47d082a115c63e7b58b1532d20e631538eafadde")); - // currentprice = new Libplanet.Assets.FungibleAssetValue(currency, 1, 79); - //} + Widget.Find().Close(true); + PandoraMaster.IsRankingSimulate = true; - var updateSellInfo = new UpdateSellInfo( - orderDigest.OrderId, - Guid.NewGuid(), - orderDigest.TradableId, - itemBase.ItemSubType, - //orderDigest.Price, - currentprice, - orderDigest.ItemCount - ); - updateSellInfos.Add(updateSellInfo); - oneLineSystemInfos.Add((itemBase.GetLocalizedName(), orderDigest.ItemCount)); - } - Game.Game.instance.ActionManager.UpdateSell(updateSellInfos).Subscribe(); + var rewards = RewardSelector.Select( + new Cheat.DebugRandom(), + tableSheets.WeeklyArenaRewardSheet, + tableSheets.MaterialItemSheet, + myDigest.Level, + maxCount: ArenaHelper.GetRewardCount(3)); + + Game.Game.instance.Arena.Enter( + log, + rewards, + myDigest, + enemyDigest); + Widget.Find().Close(); + } + public static async Task PVP_WinRate(AvatarState myAvatarState, AvatarState enemyAvatarState, int iterations) + { + if (!CurrentPandoraPlayer.IsPremium()) + return ""; + + //my data + var myItemSlotState = States.Instance.ItemSlotStates[BattleType.Arena]; + var myRuneStates = States.Instance.GetEquippedRuneStates(BattleType.Arena); + var myDigest = new ArenaPlayerDigest(myAvatarState, myItemSlotState.Equipments, myItemSlotState.Costumes, myRuneStates); + + //enemy data + var (enemyItemSlotStates, enemyRuneSlotStates) = await enemyAvatarState.GetSlotStatesAsync(); + var enemyItemSlotState = enemyItemSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); + var enemyRuneSlotState = enemyRuneSlotStates.FirstOrDefault(x => x.BattleType == BattleType.Arena); - public static void CancellLastShopItem() + if (enemyItemSlotState == null) + enemyItemSlotState = new ItemSlotState(BattleType.Arena); + + if (enemyRuneSlotState == null) + enemyRuneSlotState = new RuneSlotState(BattleType.Arena); + + var enemyRuneStates = await enemyAvatarState.GetRuneStatesAsync(); + var enemyDigest = new ArenaPlayerDigest(enemyAvatarState, enemyItemSlotState.Equipments, enemyItemSlotState.Costumes, enemyRuneStates); + + return PVP_MultiWinRate(myDigest, enemyDigest, iterations); + } + public static (Address avatarAddr, int score, int rank)[] PVP_GetListRange( + (Address avatarAddr, int score, int rank)[] tuples,ArenaType arenaType,int playerScore, int currentPlayerRank) { - if (!CheckPremiumFeature()) - return; + int upper = 10 + (PandoraMaster.Instance.Settings.ArenaListUpper * PandoraMaster.Instance.Settings.ArenaListStep); + int lower = 10 + (PandoraMaster.Instance.Settings.ArenaListLower * PandoraMaster.Instance.Settings.ArenaListStep); - var item = Widget.Find().LastItemSold; - if (item is null) + if (CurrentPandoraPlayer.IsPremium()) + return tuples.Where(tuple => tuple.rank <= 300 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); + else + return tuples.Where(tuple => tuple.rank <= 200 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); + } + public static async void PVP_PushFight() + { + if (!CurrentPandoraPlayer.IsPremium()) return; - try + if (ArenaRemainsBattle > 0) { - Game.Game.instance.ActionManager.SellCancellation( - States.Instance.CurrentAvatarState.address, - Widget.Find().LastItemSoldOrderID, - (item as ITradableItem).TradableId, - item.ItemSubType).Subscribe(); - OneLineSystem.Push(MailType.System, $"Pandora Box: {item.GetLocalizedName()} Order Canceled!", - NotificationCell.NotificationType.Alert); + Slider multiSlider = Widget.Find().MultipleSlider; + multiSlider.maxValue = ArenaMaxBattleCount; + multiSlider.value = (ArenaMaxBattleCount - ArenaRemainsBattle); + multiSlider.transform.Find("TxtMax").GetComponent().text = + (ArenaMaxBattleCount - ArenaRemainsBattle) + "/" + ArenaMaxBattleCount; - Widget.Find().LastItemSold = null; - Widget.Find().LastSoldTxt.text = ""; + var blocksBetweenBattles = PandoraMaster.Instance.Settings.ArenaPushStep; + var versionWidget = Widget.Find(); + var nodeBlockValidator = PandoraMaster.Instance.Settings.ArenaValidator ? versionWidget.NodeBlockIndex : Game.Game.instance.Agent.BlockIndex; + + while (nodeBlockValidator < myLastPushBattle + blocksBetweenBattles) + { + await Task.Delay(System.TimeSpan.FromSeconds(1)); + if (ArenaRemainsBattle <= 0) + return; + + //update values + nodeBlockValidator = PandoraMaster.Instance.Settings.ArenaValidator ? versionWidget.NodeBlockIndex : Game.Game.instance.Agent.BlockIndex; + } + + myLastPushBattle = (int)nodeBlockValidator; // 2 = this is the estimation block needed to send the tx + OneLineSystem.Push(MailType.System, $"Pandora Box: Fight " + + $"{(ArenaMaxBattleCount - ArenaRemainsBattle + 1)}/{ArenaMaxBattleCount} Sent!", + NotificationCell.NotificationType.Information); + + ActionManager.Instance.BattleArena(enemyAvatarAddress, costumes, equipments, runeInfos, championshipId, round, ticket).Subscribe(); + + Game.Game.instance.Arena.IsAvatarStateUpdatedAfterBattle = true; + ArenaBattleInProgress = true; + ActionRenderHandler.Instance.Pending = false; + ArenaRemainsBattle--; + Widget.Find().Close(true); + Widget.Find().ShowPandora(); } - catch - { Debug.LogError("Cancel Failed!"); } } - - public static void CancellAllShopItems(SellView view) + #endregion + + #region SHOP METHODS + public static void SHOP_FeatureItem(string itemID) + { + //request buyMarketFeature cloud + PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest + { + FunctionName = "buyMarketFeature", + FunctionParameter = new + { + itemID = itemID, + currentBlock = Game.Game.instance.Agent.BlockIndex, + address = States.Instance.CurrentAvatarState.agentAddress.ToString() + } + }, + success => + { + if (success.FunctionResult.ToString() == "Success") + { + //adding score success + AudioController.instance.PlaySfx(AudioController.SfxCode.BuyItem); + PandoraMaster.PlayFabInventory.VirtualCurrency["PG"] -= PandoraMaster.PanDatabase.ShopFeaturePrice; //just UI update instead of request new call + NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, $"PandoraBox: Feature Item Request Sent!", + NotificationCell.NotificationType.Information); + } + else + { + NotificationSystem.Push(Nekoyume.Model.Mail.MailType.System, "PandoraBox: Feature Item Request Failed!", NotificationCell.NotificationType.Alert); + } + }, + failed => { Debug.LogError("Process Failed!, " + failed.GenerateErrorReport()); }); + } + public static void SHOP_CancelAll(SellView view) { - if (!CheckPremiumFeature()) + if (!PANDORA_CheckPremium()) return; OneLineSystem.Push(MailType.System, $"Pandora Box: Cancel All items Process Started...", @@ -925,27 +1305,48 @@ public static void CancellAllShopItems(SellView view) subType).Subscribe(); } } + public static void SHOP_CancelLast() + { + if (!PANDORA_CheckPremium()) + return; + + var item = Widget.Find().LastItemSold; + if (item is null) + return; + + try + { + Game.Game.instance.ActionManager.SellCancellation( + States.Instance.CurrentAvatarState.address, + Widget.Find().LastItemSoldOrderID, + (item as ITradableItem).TradableId, + item.ItemSubType).Subscribe(); + OneLineSystem.Push(MailType.System, $"Pandora Box: {item.GetLocalizedName()} Order Canceled!", + NotificationCell.NotificationType.Alert); - public static void FirstSortShop(ReactiveProperty _selectedSortFilter) + Widget.Find().LastItemSold = null; + Widget.Find().LastSoldTxt.text = ""; + } + catch + { Debug.LogError("Cancel Failed!"); } + } + public static void SHOP_FirstFilter(ReactiveProperty _selectedSortFilter) { if (CurrentPandoraPlayer.IsPremium()) _selectedSortFilter.SetValueAndForceNotify(Nekoyume.EnumType.ShopSortFilter.Time); else _selectedSortFilter.SetValueAndForceNotify(Nekoyume.EnumType.ShopSortFilter.Class); } - - public static IEnumerable SortShopbyTime( - ReactiveProperty _isAscending, List models) + public static IEnumerable SHOP_TimeFilter(ReactiveProperty _isAscending, List models) { - if (!CheckPremiumFeature()) + if (!PANDORA_CheckPremium()) return new List(); return _isAscending.Value ? models.OrderBy(x => x.OrderDigest.StartedBlockIndex).ToList() : models.OrderByDescending(x => x.OrderDigest.StartedBlockIndex).ToList(); } - - public static async Task GetItemOwnerName(Guid guid) + public static async Task SHOP_GetItemOwnerName(Guid guid) { if (!CurrentPandoraPlayer.IsPremium()) return "PREMIUM FEATURE!"; @@ -974,8 +1375,7 @@ public static async Task GetItemOwnerName(Guid guid) return "PREMIUM FEATURE!"; } } - - public static async void ShopRefresh(BuyView view, Action clickItem, CancellationTokenSource _cancellationTokenSource) + public static async void SHOP_Refresh(BuyView view, Action clickItem, CancellationTokenSource _cancellationTokenSource) { int cooldown = 50; @@ -1042,43 +1442,17 @@ public static async void ShopRefresh(BuyView view, Action clickItem, C refreshButton.GetComponentInChildren().text = "Refresh"; refreshButton.interactable = true; } - - public static async UniTask SendWebhookT(string hook, string message) - { - WWWForm form = new WWWForm(); - form.AddField("content", message); - using (UnityWebRequest www = UnityWebRequest.Post(hook, form)) - { - await www.SendWebRequest(); - } - } - - public static async UniTask UpdateDatabasePeriodly() - { - while (true) - { - await Task.Delay(System.TimeSpan.FromSeconds(1800)); //30m - GetDatabase(States.Instance.CurrentAvatarState.agentAddress); - } - } - - public static async UniTask UpdateDatabase(float time) - { - await Task.Delay(System.TimeSpan.FromSeconds(time)); - GetDatabase(States.Instance.CurrentAvatarState.agentAddress); - } - - public static string GetStatePercentage(int itemID, StatView statView,int starCount,int level, out int percent100,UI.Module.SkillView skillView = null) + public static string SHOP_GetStatePercentage(int itemID, StatView statView, int starCount, int level, out int percent100, UI.Module.SkillView skillView = null) { percent100 = 0; var tableSheets = Game.TableSheets.Instance; var itemSheet = tableSheets.EquipmentItemRecipeSheet; - var itemRow = itemSheet.First(x=> x.Value.ResultEquipmentId == itemID).Value; + var itemRow = itemSheet.First(x => x.Value.ResultEquipmentId == itemID).Value; float levelStatsMultiply = 1; for (int i = 0; i <= level; i++) { - if (i == 4 || i==7) + if (i == 4 || i == 7) levelStatsMultiply *= 1.3f; else if (i > 7) levelStatsMultiply *= 1.1f; @@ -1174,210 +1548,55 @@ public static string GetStatePercentage(int itemID, StatView statView,int starCo return ""; } - - - - // CUSTOME ACTIONS - public static async UniTaskVoid AutoEventDungeon(AvatarState currentAvatarState, int eventDungeonId, int count) + public static void SHOP_RelistAll(SellView view) { - if (!CurrentPandoraPlayer.IsPremium()) - return; - - if (RxProps.EventScheduleRowForDungeon.Value is null) - { - OneLineSystem.Push(MailType.System, $"Pandora Box: No Event Found!", NotificationCell.NotificationType.Alert); + if (!PANDORA_CheckPremium()) return; - } - - try //in case actionManager is not ready yet - { - var (itemSlotStates, runeSlotStates) = await currentAvatarState.GetSlotStatesAsync(); - - for (int i = 0; i < count; i++) - { - string analyzeText = $"**EventDungeonBattle** > {eventDungeonId} > {i + 1}/{count}"; - if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) - { - ActionManager.Instance.EventDungeonBattle( - RxProps.EventScheduleRowForDungeon.Value.Id, - 10030001, - eventDungeonId, - itemSlotStates[0].Equipments, - itemSlotStates[0].Costumes, - null, - runeSlotStates[0].GetEquippedRuneSlotInfos(), - false).Subscribe(); - - //analyze actions - string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + - $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; - ActionManager.Instance.AnalyzeActions(message).Forget(); - } - else - { - var action = new EventDungeonBattle - { - AvatarAddress = currentAvatarState.address, - EventScheduleId = RxProps.EventScheduleRowForDungeon.Value.Id, - EventDungeonId = 10030001, - EventDungeonStageId = eventDungeonId, - Equipments = itemSlotStates[0].Equipments, - Costumes = itemSlotStates[0].Costumes, - Foods = new List(), - BuyTicketIfNeeded = false, - RuneInfos = runeSlotStates[0].GetEquippedRuneSlotInfos(), - }; - ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); - } - - } - OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} sent {count} Event tickets!", - NotificationCell.NotificationType.Information); - } - catch { } - } - public static async UniTask AutoCraft(AvatarState currentAvatarState, int slotIndex, int recipeId, int subRecipeId, bool payByCrystal, bool isBasic, int craftID) - { - if (!CurrentPandoraPlayer.IsPremium()) - return; + OneLineSystem.Push(MailType.System, $"Pandora Box: Relisting items Process Started...", + NotificationCell.NotificationType.Information); - //check if there is supercraft - bool isHammerCraft = false; - var hammerAddress = Addresses.GetHammerPointStateAddress(currentAvatarState.address, recipeId); - var hammerState = await Game.Game.instance.Agent.GetStateAsync(hammerAddress); - var hammerData = hammerState is List list? new HammerPointState(hammerAddress, list): new HammerPointState(hammerAddress, recipeId);; + var digests = ReactiveShopState.SellDigest.Value; + var orderDigests = digests.ToList(); - var max = Game.TableSheets.Instance.CrystalHammerPointSheet[recipeId].MaxPoint; - isHammerCraft = hammerData.HammerPoint == max; - //check if supercraft has crystal cost - if (isHammerCraft && States.Instance.CrystalBalance.MajorUnit < Game.TableSheets.Instance.CrystalHammerPointSheet[recipeId].CRYSTAL) + if (!orderDigests.Any()) { - OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.name} don't have enough Crystals for SuperCraft!" - ,NotificationCell.NotificationType.Alert); + OneLineSystem.Push(MailType.System, $"Pandora Box: No Items Found!", + NotificationCell.NotificationType.Alert); return; } + view.SetLoading(orderDigests); - - //check if he has material - if (!payByCrystal && !isHammerCraft) - { - - } - - try //in case actionManager is not ready yet + var updateSellInfos = new List(); + var oneLineSystemInfos = new List<(string name, int count)>(); + foreach (var orderDigest in orderDigests) { - - var itemName = L10nManager.Localize($"ITEM_NAME_{craftID}"); - string basicCraft = isBasic ? "Basic" : "Premium"; - string hammerCraft = isHammerCraft ? "Super Craft" : ""; - string crystal = payByCrystal ? ", With Crystal!" : ""; - string analyzeText = $"CombinationEquipment > **{hammerCraft} {basicCraft}** {itemName} > {slotIndex}{crystal} " + - $"> hammer:{hammerData.HammerPoint + 1}/{max}"; - - if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) - { - ActionManager.Instance - .CombinationEquipment( - new RecipeInfo - { - RecipeId = recipeId, - SubRecipeId = subRecipeId, - CostNCG = default, - CostCrystal = default, - CostAP = 0, - Materials = default, - ReplacedMaterials = null, - }, - slotIndex, - payByCrystal, - isHammerCraft) - .Subscribe(); - //analyze actions - string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + - $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; - ActionManager.Instance.AnalyzeActions(message).Forget(); - } - else + if (!ReactiveShopState.TryGetShopItem(orderDigest, out var itemBase)) { - var action = new CombinationEquipment - { - avatarAddress = currentAvatarState.address, - slotIndex = slotIndex, - recipeId = recipeId, - subRecipeId = subRecipeId, - payByCrystal = payByCrystal, - useHammerPoint = isHammerCraft, - }; - ActionManager.Instance.PreProcessAction(action, currentAvatarState,analyzeText).Forget(); + return; } + var currentprice = orderDigest.Price; + //if (itemBase.Id == 201020) + //{ + // var currency = new Libplanet.Assets.Currency("NCG", 2, new Libplanet.Address("0x47d082a115c63e7b58b1532d20e631538eafadde")); + // currentprice = new Libplanet.Assets.FungibleAssetValue(currency, 1, 79); + //} - OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} " + - $"start Auto Craft {itemName} on Slot {slotIndex + 1} hammer points: {hammerData.HammerPoint+1}/{max}!", - NotificationCell.NotificationType.Information); + var updateSellInfo = new UpdateSellInfo( + orderDigest.OrderId, + Guid.NewGuid(), + orderDigest.TradableId, + itemBase.ItemSubType, + //orderDigest.Price, + currentprice, + orderDigest.ItemCount + ); + updateSellInfos.Add(updateSellInfo); + oneLineSystemInfos.Add((itemBase.GetLocalizedName(), orderDigest.ItemCount)); } - catch { } - - } - - public static async UniTaskVoid AutoStageSweep(AvatarState currentAvatarState,int sweepStage) - { - if (!CurrentPandoraPlayer.IsPremium()) - return; - - int worldID = 0; - if (sweepStage < 51) - worldID = 1; - else if (sweepStage > 50 && sweepStage < 101) - worldID = 2; - else if (sweepStage > 100 && sweepStage < 151) - worldID = 3; - else if (sweepStage > 150 && sweepStage < 201) - worldID = 4; - else if (sweepStage > 200 && sweepStage < 251) - worldID = 5; - else if (sweepStage > 250 && sweepStage < 301) - worldID = 6; - try //in case actionManager is not ready yet - { - var (itemSlotStates, runeSlotStates) = await currentAvatarState.GetSlotStatesAsync(); - string analyzeText = $"HackAndSlashSweep> {currentAvatarState.actionPoint}> **{sweepStage}**"; - - if (currentAvatarState.address == States.Instance.CurrentAvatarState.address) - { - Game.Game.instance.ActionManager.HackAndSlashSweep( - itemSlotStates[0].Costumes, - itemSlotStates[0].Equipments, - runeSlotStates[0].GetEquippedRuneSlotInfos(), - 0, - currentAvatarState.actionPoint, - worldID, - sweepStage, - currentAvatarState.actionPoint).Subscribe(); - //analyze actions - string message = $"[{Game.Game.instance.Agent.BlockIndex}] **{currentAvatarState.name}** Lv.**{currentAvatarState.level}** " + - $"<:NCG:1009757564256407592>**{States.Instance.GoldBalanceState.Gold.MajorUnit}** > {currentAvatarState.agentAddress}, " + analyzeText; - ActionManager.Instance.AnalyzeActions(message).Forget(); - } - else - { - var action = new HackAndSlashSweep - { - costumes = itemSlotStates[0].Costumes, - equipments = itemSlotStates[0].Equipments, - runeInfos = runeSlotStates[0].GetEquippedRuneSlotInfos(), - avatarAddress = currentAvatarState.address, - apStoneCount = 0, - actionPoint = currentAvatarState.actionPoint, - worldId = worldID, - stageId = sweepStage, - }; - ActionManager.Instance.PreProcessAction(action, currentAvatarState, analyzeText).Forget(); - } - OneLineSystem.Push(MailType.System, $"Pandora Box: {currentAvatarState.NameWithHash} Sweep {currentAvatarState.actionPoint} AP for stage {sweepStage}!", NotificationCell.NotificationType.Information); - } - catch { } + Game.Game.instance.ActionManager.UpdateSell(updateSellInfos).Subscribe(); } + #endregion } } diff --git a/nekoyume/Assets/_Scripts/State/RxProps.Arena.cs b/nekoyume/Assets/_Scripts/State/RxProps.Arena.cs index c89c97530ae..995420bd136 100644 --- a/nekoyume/Assets/_Scripts/State/RxProps.Arena.cs +++ b/nekoyume/Assets/_Scripts/State/RxProps.Arena.cs @@ -363,7 +363,7 @@ scores[scoreAddr] is List scoreList // currentRoundData.ArenaType, // playerScore, playerTuple.rank); //|||||||||||||| PANDORA START CODE ||||||||||||||||||| - avatarAddrAndScoresWithRank = Premium.GetBoundsWithPlayerScore( + avatarAddrAndScoresWithRank = Premium.PVP_GetListRange( avatarAddrAndScoresWithRank, currentRoundData.ArenaType, playerScore, playerTuple.rank); @@ -388,7 +388,7 @@ scores[scoreAddr] is List scoreList // currentRoundData.ArenaType, // playerScore, 0); //|||||||||||||| PANDORA START CODE ||||||||||||||||||| - avatarAddrAndScoresWithRank = Premium.GetBoundsWithPlayerScore( + avatarAddrAndScoresWithRank = Premium.PVP_GetListRange( avatarAddrAndScoresWithRank, currentRoundData.ArenaType, playerScore, 0); @@ -603,39 +603,5 @@ public static (Address avatarAddr, int score, int rank)[] AddRank( return result.ToArray(); } - - //private static (Address avatarAddr, int score, int rank)[] GetBoundsWithPlayerScore( - // (Address avatarAddr, int score, int rank)[] tuples, - // ArenaType arenaType, - // int playerScore,int currentPlayerRank) - //{ - - // //if (!ArenaHelper.ScoreLimits.ContainsKey(arenaType)) - // //{ - // // throw new ArgumentOutOfRangeException(nameof(arenaType), arenaType, null); - // //} - - // //var bounds = ArenaHelper.ScoreLimits[arenaType]; - // //bounds = (bounds.upper + playerScore, bounds.lower + playerScore); - // //return tuples - // // .Where(tuple => tuple.score <= bounds.upper && tuple.score >= bounds.lower) - // // .ToArray(); - - // //|||||||||||||| PANDORA START CODE ||||||||||||||||||| - // //int upper = 10 + (PandoraMaster.Instance.Settings.ArenaListUpper * - // // PandoraMaster.Instance.Settings.ArenaListStep); - // //int lower = 10 + (PandoraMaster.Instance.Settings.ArenaListLower * - // // PandoraMaster.Instance.Settings.ArenaListStep); - // //if (PandoraMaster.CurrentPandoraPlayer.IsPremium()) - // //{ - // // return tuples.Where(tuple => tuple.rank < 100 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); - // //} - // //else - // //{ - // // return tuples.Where(tuple => tuple.rank < 10 || (tuple.rank >= currentPlayerRank - upper && tuple.rank <= currentPlayerRank + lower)).ToArray(); - // //} - // return Premium.GetBoundsWithPlayerScore(tuples); - // //|||||||||||||| PANDORA END CODE ||||||||||||||||||| - //} } } diff --git a/nekoyume/Assets/_Scripts/State/States.cs b/nekoyume/Assets/_Scripts/State/States.cs index dea2b57588c..703942cf4dc 100644 --- a/nekoyume/Assets/_Scripts/State/States.cs +++ b/nekoyume/Assets/_Scripts/State/States.cs @@ -115,6 +115,10 @@ AgentState is null || { await AddOrReplaceAvatarStateAsync(pair.Value, pair.Key); } + + //|||||||||||||| PANDORA START CODE ||||||||||||||||||| + //Prime.AllOfAvatarStates().Forget(); + //|||||||||||||| PANDORA END CODE ||||||||||||||||||| } public void SetGoldBalanceState(GoldBalanceState goldBalanceState) diff --git a/nekoyume/Assets/_Scripts/UI/Combination/SubRecipeView.cs b/nekoyume/Assets/_Scripts/UI/Combination/SubRecipeView.cs index 1da2e0b3ac9..8b3e5ce4b24 100644 --- a/nekoyume/Assets/_Scripts/UI/Combination/SubRecipeView.cs +++ b/nekoyume/Assets/_Scripts/UI/Combination/SubRecipeView.cs @@ -180,7 +180,7 @@ private void Awake() maxButton.OnClickSubject .Subscribe(state => { StartCoroutine(MaxCombineCurrentRecipe()); }) .AddTo(gameObject); - copyItemIDBtn.onClick.AddListener(() => { CopyItemID(); }); + //copyItemIDBtn.onClick.AddListener(() => { CopyItemID(); }); //|||||||||||||| PANDORA END CODE ||||||||||||||||||| button.OnClickDisabledSubject @@ -602,7 +602,6 @@ private Dictionary GetReplacedMaterials(Dictionary required) replacedMaterialMap.Add(row.Id, count - itemCount); } } - return replacedMaterialMap; } @@ -772,23 +771,31 @@ private void SetOptions( } //|||||||||||||| PANDORA START CODE ||||||||||||||||||| - void CopyItemID() + public void CopyItemID(int craftType) { OneLineSystem.Push(MailType.System, $"Pandora Box: Item ID copied to clipboard!", - NotificationCell.NotificationType.Information); - var tableSheets = TableSheets.Instance; - var equipmentRow = tableSheets.EquipmentItemRecipeSheet[_selectedRecipeInfo.RecipeId]; - ClipboardHelper.CopyToClipboard(equipmentRow.ResultEquipmentId.ToString()); + NotificationCell.NotificationType.Information); + switch (craftType) + { + case 0: + var equipmentRow = _recipeRow as EquipmentItemRecipeSheet.Row; + ClipboardHelper.CopyToClipboard(equipmentRow.Id.ToString()); + break; + case 1: + var consumableRow = _recipeRow as ConsumableItemRecipeSheet.Row; + ClipboardHelper.CopyToClipboard(consumableRow.Id.ToString()); + break; + case 2: + var eventMaterialRow = _recipeRow as EventConsumableItemRecipeSheet.Row; + ClipboardHelper.CopyToClipboard(eventMaterialRow.Id.ToString()); + break; + } } public System.Collections.IEnumerator MaxCombineCurrentRecipe() { - if (!CanCraft - && _selectedRecipeInfo.RecipeId != 10020001 - && _selectedRecipeInfo.RecipeId != 10020002 - && _selectedRecipeInfo.RecipeId != 10020003 - && _selectedRecipeInfo.RecipeId != 10020004) + if (!CanCraft) { OneLineSystem.Push(MailType.System, "Pandora Box: You didnt Unlock this item yet!", NotificationCell.NotificationType.Alert); diff --git a/nekoyume/Assets/_Scripts/UI/Module/Arena/Board/ArenaBoardPlayerCell.cs b/nekoyume/Assets/_Scripts/UI/Module/Arena/Board/ArenaBoardPlayerCell.cs index c48fd638938..d67ab6d7eb2 100644 --- a/nekoyume/Assets/_Scripts/UI/Module/Arena/Board/ArenaBoardPlayerCell.cs +++ b/nekoyume/Assets/_Scripts/UI/Module/Arena/Board/ArenaBoardPlayerCell.cs @@ -265,7 +265,7 @@ async void SetWinRate() { rateText.text = "..."; //prevent old value if (Premium.CurrentPandoraPlayer.IsPremium()) - rateText.text = await Premium.WinRatePVP(States.Instance.CurrentAvatarState, selectedEnemyAvatarState, 10); + rateText.text = await Premium.PVP_WinRate(States.Instance.CurrentAvatarState, selectedEnemyAvatarState, 15); } public void GetGuildInfo() diff --git a/nekoyume/Assets/_Scripts/UI/Module/ChronoSlot.cs b/nekoyume/Assets/_Scripts/UI/Module/ChronoSlot.cs index 9c4366238ce..77a8ff533e5 100644 --- a/nekoyume/Assets/_Scripts/UI/Module/ChronoSlot.cs +++ b/nekoyume/Assets/_Scripts/UI/Module/ChronoSlot.cs @@ -29,6 +29,8 @@ namespace Nekoyume.UI.Module using Nekoyume.Model.Mail; using Nekoyume.PandoraBox; using Nekoyume.State.Subjects; + using Nekoyume.TableData; + using Nekoyume.TableData.Event; using Nekoyume.UI.Module.Common; using Nekoyume.UI.Module.WorldBoss; using Nekoyume.UI.Scroller; @@ -54,7 +56,7 @@ public class ChronoSlot : MonoBehaviour int updateAvatarInterval = 90; //blocks to periodly update avatar int updateCraftInterval = 200; //blocks to periodly update craft slots int updateEventInterval = 200; //blocks to periodly update event EventDungeonInfo - int urgentUpdateInterval = 7; //blocks to update if there is an action (auto collect,craft ...) + int urgentUpdateInterval = 15; //blocks to update if there is an action (auto collect,craft ...) [Space(5)] @@ -74,6 +76,7 @@ public class ChronoSlot : MonoBehaviour bool IsStageNotify; bool IsAutoCollect; bool IsAutoSpend; + bool IsSweep; int sweepStage; [Space(5)] @@ -176,6 +179,7 @@ void LoadSettings() IsStageNotify = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsStageNotify", 1)); IsAutoCollect = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsAutoCollect", 1)); IsAutoSpend = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsAutoSpend", 0)); + IsSweep = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsSweep", 1)); sweepStage = PlayerPrefs.GetInt(addressKey + "_SweepStage", 0); //CRAFT @@ -199,6 +203,7 @@ void LoadSettings() IsStageNotify = true; IsAutoCollect = true; IsAutoSpend = false; + IsSweep = true; sweepStage = 0; //register CRAFT variables @@ -224,12 +229,30 @@ void LoadSettings() stageModule.SetActive(IsStage); ProsperityImage.SetActive(IsAutoCollect); APImage.SetActive(IsAutoSpend); - SweepStageText.text = "Sweep > " + sweepStage.ToString(); //change sweep method later + if (IsSweep) + SweepStageText.text = "Sweep > " + sweepStage; + else + { + int _stageId = 1; + currentAvatarState.worldInformation.TryGetLastClearedStageId(out _stageId); + _stageId = Math.Clamp(_stageId + 1, 1, 300); + + SweepStageText.text = "Progress > " + _stageId; + } //craft craftModule.SetActive(IsCraft); + var tableSheets = Game.TableSheets.Instance; isCraftedImage.gameObject.SetActive(IsAutoCraft); - isCraftedImage.sprite = SpriteHelper.GetItemIcon(craftID); + if (IsAutoCraft) + { + if (tableSheets.EquipmentItemRecipeSheet.TryGetValue(craftID, out var equipRow)) + isCraftedImage.sprite = SpriteHelper.GetItemIcon(equipRow.ResultEquipmentId); + else if (tableSheets.ConsumableItemRecipeSheet.TryGetValue(craftID, out var consumableRow)) + isCraftedImage.sprite = SpriteHelper.GetItemIcon(consumableRow.ResultConsumableItemId); + else if (tableSheets.EventConsumableItemRecipeSheet.TryGetValue(craftID, out var eventConsumableRow)) + isCraftedImage.sprite = SpriteHelper.GetItemIcon(eventConsumableRow.ResultConsumableItemId); + } //event eventAddress = Nekoyume.Model.Event.EventDungeonInfo.DeriveAddress(currentAvatarState.address, RxProps.EventDungeonRow.Id); @@ -264,7 +287,7 @@ private void UpdateInformation() { var prosperityBlocks = Mathf.Clamp(currentBlockIndex - currentAvatarState.dailyRewardReceivedIndex + 1, 0, 1700); bool isFull = prosperityBlocks == 1700; - //urgent upgrade + //urgent upgrade because prosperity is full if (IsAutoCollect && isFull && stageCooldown > currentBlockIndex + urgentUpdateInterval) stageCooldown = currentBlockIndex + urgentUpdateInterval; long diff = (long)(1700 - prosperityBlocks); @@ -286,7 +309,7 @@ private void UpdateInformation() ProsperityText.text = isFull ? $"FULL" : value; APText.text = currentAvatarState.actionPoint > 5 ? $"{currentAvatarState.actionPoint}" : currentAvatarState.actionPoint.ToString(); - //urgent upgrade + //urgent upgrade because there is some action points if (IsAutoSpend && currentAvatarState.actionPoint > 5 && stageCooldown > currentBlockIndex + urgentUpdateInterval) stageCooldown = currentBlockIndex + urgentUpdateInterval; @@ -309,7 +332,7 @@ private void UpdateInformation() craftCooldownImage.fillAmount = (updateCraftInterval - cooldownBar) * 1f / updateCraftInterval; if (craftCooldown < currentBlockIndex) - SetCombinationSlotStatesAsync().Forget(); + SetCombinationSlotStatesAsync().Forget(); } //Event @@ -378,10 +401,17 @@ async UniTaskVoid UpdateAvatar() catch { } } //check for sweep, we used else if to not doing twice - else if (IsAutoSpend && sweepStage != 0 && currentAvatarState.actionPoint >= 5) + else if (IsAutoSpend && IsSweep && sweepStage != 0 && currentAvatarState.actionPoint >= 5) { try //in case actionManager is not ready yet - {Premium.AutoStageSweep(currentAvatarState, sweepStage).Forget(); stageCooldown = currentBlockIndex + urgentUpdateInterval; } + {Premium.PVE_AutoStageSweep(currentAvatarState, sweepStage).Forget(); stageCooldown = currentBlockIndex + urgentUpdateInterval; } + catch { } + } + //check for repeat, we used else if to not doing twice + else if (IsAutoSpend && !IsSweep && currentAvatarState.actionPoint >= 5) + { + try //in case actionManager is not ready yet + { Premium.PVE_AutoStageRepeat(currentAvatarState).Forget(); stageCooldown = currentBlockIndex + urgentUpdateInterval; } catch { } } } @@ -406,7 +436,7 @@ is Bencodex.Types.List serialized else realLevelID = int.Parse("100300" + eventLevel.ToString()); - Premium.AutoEventDungeon(currentAvatarState, realLevelID, ticketsCount).Forget(); + Premium.PVE_AutoEventDungeon(currentAvatarState, realLevelID, ticketsCount).Forget(); eventCooldown = currentBlockIndex + urgentUpdateInterval; } } @@ -424,11 +454,27 @@ public async UniTask SetCombinationSlotStatesAsync() if (currentBlockIndex > Combinationslotstates[i].UnlockBlockIndex && IsAutoCraft) { - await AutoCraftEquipment(i); - craftCooldown = currentBlockIndex + urgentUpdateInterval; - break; //enforce break to wait new craft count the hammer points + //check if its consumable or equipment + var tableSheets = Game.TableSheets.Instance; + if (tableSheets.EquipmentItemRecipeSheet.TryGetValue(craftID, out var equipRow)) + { + await AutoCraftEquipment(i, equipRow); + craftCooldown = currentBlockIndex + urgentUpdateInterval; + break; //enforce break to wait new craft count the hammer points + } + else if (tableSheets.ConsumableItemRecipeSheet.TryGetValue(craftID, out var consumableRow)) + { + if (consumableRow != null) + Premium.CRAFT_AutoCraftConsumable(currentAvatarState, i, consumableRow); + } + else if (tableSheets.EventConsumableItemRecipeSheet.TryGetValue(craftID, out var eventConsumableRow)) + { + if (eventConsumableRow != null) + Premium.CRAFT_AutoCraftEventConsumable(currentAvatarState, i, eventConsumableRow); + } } - } + } + craftCooldown = currentBlockIndex + urgentUpdateInterval; } bool UpdateCraftingSlots() @@ -474,21 +520,18 @@ bool UpdateCraftingSlots() return isEmptySlot; } - async UniTask AutoCraftEquipment(int slotIndex) + async UniTask AutoCraftEquipment(int slotIndex,EquipmentItemRecipeSheet.Row equipRow) { var tableSheets = Game.TableSheets.Instance; - var itemSheet = tableSheets.EquipmentItemRecipeSheet; var itemSubSheet = tableSheets.EquipmentItemSubRecipeSheetV2; - var itemRow = itemSheet.First(x => x.Value.ResultEquipmentId == craftID).Value; int indexSub = IsBasicCraft ? 0 : 1; - if (itemRow != null) + if (equipRow != null) { - var itemSub = itemSubSheet.First(x => x.Value.Id == itemRow.SubRecipeIds[indexSub]).Value; - await Premium.AutoCraft(currentAvatarState, slotIndex, itemRow.Id, itemSub.Id, IsCraftFillCrystal, IsBasicCraft, craftID); + var itemSub = itemSubSheet.First(x => x.Value.Id == equipRow.SubRecipeIds[indexSub]).Value; + await Premium.CRAFT_AutoCraftEquipment(currentAvatarState, slotIndex, equipRow, itemSub.Id, IsCraftFillCrystal, IsBasicCraft); } } - async void SwitchChar() { var loadingScreen = Widget.Find(); diff --git a/nekoyume/Assets/_Scripts/UI/Scroller/BuffBonusBuffCell.cs b/nekoyume/Assets/_Scripts/UI/Scroller/BuffBonusBuffCell.cs index 87565dc1237..fe58bc7fad7 100644 --- a/nekoyume/Assets/_Scripts/UI/Scroller/BuffBonusBuffCell.cs +++ b/nekoyume/Assets/_Scripts/UI/Scroller/BuffBonusBuffCell.cs @@ -44,7 +44,7 @@ public void Set(CrystalRandomBuffSheet.Row itemData) CrystalRandomBuffSheet.Row itemDataSimulation; public void SetSimulateBuff() { - if (!Premium.CheckPremiumFeature()) + if (!Premium.PANDORA_CheckPremium()) return; PandoraUtil.ShowSystemNotification(1002, NotificationCell.NotificationType.Information); PlayerPrefs.SetInt("_PandoraBox_PVE_SelectedCrystalBuff", itemDataSimulation.Id); diff --git a/nekoyume/Assets/_Scripts/UI/Shop/BuyView.cs b/nekoyume/Assets/_Scripts/UI/Shop/BuyView.cs index 7b9596ebf7f..303a7dd4115 100644 --- a/nekoyume/Assets/_Scripts/UI/Shop/BuyView.cs +++ b/nekoyume/Assets/_Scripts/UI/Shop/BuyView.cs @@ -220,7 +220,7 @@ protected override void OnAwake() World6Toggle.onValueChanged.AddListener(_ => { if (World6Toggle.isOn) - World6Toggle.isOn = Premium.CheckPremiumFeature(); + World6Toggle.isOn = Premium.PANDORA_CheckPremium(); UpdateView();}); priceValueTxt.onValueChanged.AddListener(_ => { if (priceValueTxt.text.Length > 0) @@ -415,7 +415,7 @@ protected override void Reset() SpellToggle.isOn = false; AddressTxt.text = ""; World6Toggle.isOn = false; - PandoraBox.Premium.FirstSortShop(_selectedSortFilter); + PandoraBox.Premium.SHOP_FirstFilter(_selectedSortFilter); //|||||||||||||| PANDORA END CODE ||||||||||||||||||| } @@ -557,7 +557,7 @@ BigInteger GetCrystalPerPrice(ShopItem item) Nekoyume.EnumType.ShopSortFilter.Crystal => _isAscending.Value ? models.OrderBy(GetCrystalPerPrice).ToList() : models.OrderByDescending(GetCrystalPerPrice).ToList(), - Nekoyume.EnumType.ShopSortFilter.Time => PandoraBox.Premium.SortShopbyTime(_isAscending, models), + Nekoyume.EnumType.ShopSortFilter.Time => PandoraBox.Premium.SHOP_TimeFilter(_isAscending, models), Nekoyume.EnumType.ShopSortFilter.Level => _isAscending.Value ? models.OrderBy(x => x.OrderDigest.Level).ToList() : models.OrderByDescending(x => x.OrderDigest.Level).ToList(), diff --git a/nekoyume/Assets/_Scripts/UI/Widget/ArenaBattlePreparation.cs b/nekoyume/Assets/_Scripts/UI/Widget/ArenaBattlePreparation.cs index 09e59aba9dc..d3f74de2db9 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/ArenaBattlePreparation.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/ArenaBattlePreparation.cs @@ -222,7 +222,7 @@ public void ChangeTicketsCount() { try { - Premium.ChangeTicketsCount(maxTriesSld.value, _roundData); + Premium.PVP_ChangeTicketsCount(maxTriesSld.value, _roundData); } catch { @@ -394,7 +394,7 @@ public void ExtraTicket(UnityEngine.UI.Toggle extra) void SendMultipleBattleArenaAction() { - if (Premium.SendMultipleBattleArenaAction(maxTriesSld.value, _chooseAvatarState.address, + if (Premium.PVP_MultiConfirmBattles(maxTriesSld.value, _chooseAvatarState.address, _roundData.ChampionshipId, _roundData.Round, TicketCountToUse)) { Close(); diff --git a/nekoyume/Assets/_Scripts/UI/Widget/ArenaBoard.cs b/nekoyume/Assets/_Scripts/UI/Widget/ArenaBoard.cs index dbec4bba334..4f67fb5a9a6 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/ArenaBoard.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/ArenaBoard.cs @@ -121,7 +121,6 @@ async UniTaskVoid GetDifferenceAttack() while (true) { - try { long diff = 0; @@ -136,7 +135,8 @@ async UniTaskVoid GetDifferenceAttack() ? new Nekoyume.Model.State.ArenaAvatarState(serialized) : null; myLastBattle = myArenaAvatarState.LastBattleBlockIndex; - diff = Game.Game.instance.Agent.BlockIndex - myLastBattle; + var blockValidator = PandoraMaster.Instance.Settings.ArenaValidator ? Find().NodeBlockIndex : Game.Game.instance.Agent.BlockIndex; + diff = (long)Mathf.Clamp(blockValidator - myLastBattle,0,999); } @@ -260,12 +260,12 @@ public void ShowPandora(bool ignoreShowAnimation = false) public void ExpectedTicketsToReach() { - Premium.ExpectedTicketsToReach(ExpectedTicketsText,ExpectedRankText); + Premium.PVP_ExpectedTicketsToReach(ExpectedTicketsText,ExpectedRankText); } public void CancelMultiArena() { - Premium.CancelMultiArena(); + Premium.PVP_CancelPendingFights(); } //|||||||||||||| PANDORA END CODE ||||||||||||||||||| @@ -339,9 +339,9 @@ public void Show( StartCoroutine(LastUpdateCounter()); RefreshObj.SetActive(false); if (!PandoraMaster.Instance.Settings.ArenaPush) - Premium.CheckForArenaQueue(); + Premium.PVP_CheckPendingConfirmFights(); else - Premium.PushArenaFight(); + Premium.PVP_PushFight(); //|||||||||||||| PANDORA END CODE ||||||||||||||||||| } @@ -617,9 +617,9 @@ public void Show( StartCoroutine(LastUpdateCounter()); RefreshObj.SetActive(false); if (!PandoraMaster.Instance.Settings.ArenaPush) - Premium.CheckForArenaQueue(); + Premium.PVP_CheckPendingConfirmFights(); else - Premium.PushArenaFight(); + Premium.PVP_PushFight(); //|||||||||||||| PANDORA END CODE ||||||||||||||||||| } diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Battle.cs b/nekoyume/Assets/_Scripts/UI/Widget/Battle.cs index c3b418f95a7..b79f6493aef 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Battle.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Battle.cs @@ -98,7 +98,7 @@ protected override void Awake() //|||||||||||||| PANDORA START CODE ||||||||||||||||||| exitMenu.onClick.AddListener(() => { - if (Premium.CheckPremiumFeature()) + if (Premium.PANDORA_CheckPremium()) Game.Game.instance.Stage.IsSkip = true; }); //|||||||||||||| PANDORA END CODE ||||||||||||||||||| diff --git a/nekoyume/Assets/_Scripts/UI/Widget/BattlePreparation.cs b/nekoyume/Assets/_Scripts/UI/Widget/BattlePreparation.cs index bdd7a30dcdb..1285cf0665c 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/BattlePreparation.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/BattlePreparation.cs @@ -285,7 +285,7 @@ public void Show( public void OpenSimulatorBuff() { - if (!Premium.CheckPremiumFeature()) + if (!Premium.PANDORA_CheckPremium()) return; Widget.Find().Show(); Widget.Find().OnClickBuffListButton(); @@ -901,7 +901,7 @@ IEnumerator SimulatorIE() PandoraMaster.IsHackAndSlashSimulate = true; var consumables = information.GetEquippedConsumables().Select(x => x.ItemId).ToList(); var skillId = PlayerPrefs.GetInt("_PandoraBox_PVE_SelectedCrystalBuff", -1); - var simulator = Premium.SoloPVESimulate(_worldId, _stageId, consumables, skillId); + var simulator = Premium.PVE_SoloSimulate(_worldId, _stageId, consumables, skillId); simulator.Simulate(); GoToStage(simulator.Log); } @@ -910,7 +910,7 @@ public void MultipleSimulate() { var consumables = information.GetEquippedConsumables().Select(x => x.ItemId).ToList(); var skillId = PlayerPrefs.GetInt("_PandoraBox_PVE_SelectedCrystalBuff", -1); - Premium.MultiPVESimulate(_worldId, _stageId, consumables, skillId); + Premium.PVE_MultiSimulate(_worldId, _stageId, consumables, skillId); } //|||||||||||||| PANDORA END CODE ||||||||||||||||||| } diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/ChronoSettingsPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/ChronoSettingsPopup.cs index 9f54fa03ade..e838c187535 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/ChronoSettingsPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/ChronoSettingsPopup.cs @@ -11,10 +11,12 @@ using Nekoyume.Helper; using Nekoyume.Model.Item; using Nekoyume.Model.Mail; +using Nekoyume.Model.Quest; using Nekoyume.Model.State; using Nekoyume.PandoraBox; using Nekoyume.State; using Nekoyume.TableData; +using Nekoyume.TableData.Event; using Nekoyume.UI.Scroller; using TMPro; using UniRx; @@ -50,12 +52,16 @@ public class ChronoSettingsPopup : PopupWidget [SerializeField] Image spendOnImage; [SerializeField] Image spendOffImage; + [SerializeField] Image sweepOnImage; + [SerializeField] Image sweepOffImage; + [SerializeField] TMP_InputField sweepStageInput; bool IsStage; bool IsStageNotify; bool IsAutoCollect; bool IsAutoSpend; + bool IsSweep; int sweepStage; [Space(5)] @@ -130,6 +136,7 @@ public void SaveSettings() PlayerPrefs.SetInt(addressKey + "_IsStageNotify", System.Convert.ToInt32(IsStageNotify)); PlayerPrefs.SetInt(addressKey + "_IsAutoCollect", System.Convert.ToInt32(IsAutoCollect)); PlayerPrefs.SetInt(addressKey + "_IsAutoSpend", System.Convert.ToInt32(IsAutoSpend)); + PlayerPrefs.SetInt(addressKey + "_IsSweep", System.Convert.ToInt32(IsSweep)); PlayerPrefs.SetInt(addressKey + "_SweepStage", sweepStage); //CRAFT @@ -164,6 +171,7 @@ public void Show(AvatarState avatarState,int _index) IsStageNotify = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsStageNotify", 1)); IsAutoCollect = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsAutoCollect", 1)); IsAutoSpend = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsAutoSpend", 0)); + IsSweep = System.Convert.ToBoolean(PlayerPrefs.GetInt(addressKey + "_IsSweep", 1)); sweepStage = PlayerPrefs.GetInt(addressKey + "_SweepStage", 0); //CRAFT @@ -187,6 +195,7 @@ public void Show(AvatarState avatarState,int _index) IsStageNotify = true; IsAutoCollect = true; IsAutoSpend = false; + IsSweep = true; sweepStage = 0; //register CRAFT variables @@ -201,7 +210,7 @@ public void Show(AvatarState avatarState,int _index) IsEvent = false; IsEventNotify = true; IsAutoEvent = false; - eventLevel = 20; + eventLevel = 1; } //reflect on UI @@ -212,6 +221,7 @@ public void Show(AvatarState avatarState,int _index) LoadStage(); LoadAutoCollect(); LoadAutoSpend(); + LoadSweep(); LoadSweepStage(); LoadStageNotify(); @@ -253,7 +263,7 @@ void LoadEventAutoFight() public void ChangeEventAutoFight(bool value) { - if (value && !Premium.CheckPremiumFeature()) + if (value && !Premium.PANDORA_CheckPremium()) return; IsAutoEvent = value; LoadEventAutoFight(); @@ -293,23 +303,46 @@ public void ChangeEventLevel() void LoadCraftID() { craftIDInput.text = craftID.ToString(); - CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(craftID); + var tableSheets = Game.TableSheets.Instance; + if (tableSheets.EquipmentItemRecipeSheet.TryGetValue(craftID, out var equipRow)) + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(equipRow.ResultEquipmentId); + else if (tableSheets.ConsumableItemRecipeSheet.TryGetValue(craftID, out var consumableRow)) + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(consumableRow.ResultConsumableItemId); + else if (tableSheets.EventConsumableItemRecipeSheet.TryGetValue(craftID, out var eventConsumableRow)) + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(eventConsumableRow.ResultConsumableItemId); } public void ChangeCraftID() { - if (!string.IsNullOrEmpty(craftIDInput.text) && craftIDInput.text.Length == 8) + try { - int tempCraftID = int.Parse(craftIDInput.text); - var tableSheets = Game.TableSheets.Instance; - var itemSheet = tableSheets.EquipmentItemRecipeSheet; - var itemRow = itemSheet.First(x => x.Value.ResultEquipmentId == tempCraftID).Value; - if (itemRow != null && currentAvatarState.worldInformation.IsStageCleared(itemRow.UnlockStage)) + if (!string.IsNullOrEmpty(craftIDInput.text)) { - craftID = tempCraftID; + int tempCraftID = int.Parse(craftIDInput.text); + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(0); + + var tableSheets = Game.TableSheets.Instance; + if (tableSheets.EquipmentItemRecipeSheet.TryGetValue(tempCraftID, out var equipRow)) + { + if (currentAvatarState.worldInformation.IsStageCleared(equipRow.UnlockStage)) + { + craftID = tempCraftID; //equip + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(equipRow.ResultEquipmentId); + } + } + else if (tableSheets.ConsumableItemRecipeSheet.TryGetValue(tempCraftID, out var consumableRow)) + { + craftID = tempCraftID; //consumable + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(consumableRow.ResultConsumableItemId); + } + else if (tableSheets.EventConsumableItemRecipeSheet.TryGetValue(tempCraftID, out var eventConsumableRow)) + { + craftID = tempCraftID; //event consumable + CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(eventConsumableRow.ResultConsumableItemId); + } } } - CraftIconIDImage.sprite = SpriteHelper.GetItemIcon(craftID); + catch { } } void LoadBasicCraft() @@ -344,7 +377,7 @@ void LoadAutoCraft() public void ChangeAutoCraft(bool value) { - if (value && !Premium.CheckPremiumFeature()) + if (value && !Premium.PANDORA_CheckPremium()) return; IsAutoCraft = value; LoadAutoCraft(); @@ -412,6 +445,21 @@ public void ChangeAutoCollect(bool value) LoadAutoCollect(); } + void LoadSweep() + { + sweepOnImage.color = IsSweep ? Color.white : new Color(0.5f, 0.5f, 0.5f); + sweepOffImage.color = !IsSweep ? Color.white : new Color(0.5f, 0.5f, 0.5f); + } + + public void ChangeSweep(bool value) + { + if (value && !Premium.PANDORA_CheckPremium()) + return; + IsSweep = value; + sweepStageInput.transform.parent.gameObject.SetActive(IsSweep); + LoadSweep(); + } + void LoadAutoSpend() { spendOnImage.color = IsAutoSpend ? Color.white : new Color(0.5f, 0.5f, 0.5f); @@ -420,7 +468,7 @@ void LoadAutoSpend() public void ChangeAutoSpend(bool value) { - if (value && !Premium.CheckPremiumFeature()) + if (value && !Premium.PANDORA_CheckPremium()) return; IsAutoSpend = value; LoadAutoSpend(); diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/FriendInfoPopupPandora.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/FriendInfoPopupPandora.cs index 03c91b10822..20b2915ef7e 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/FriendInfoPopupPandora.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/FriendInfoPopupPandora.cs @@ -130,16 +130,16 @@ protected override void Awake() void SoloSimulate() { - Premium.SoloSimulate(States.Instance.CurrentAvatarState, _avatarState); + Premium.PVP_SoloSimulate(States.Instance.CurrentAvatarState, _avatarState); } async void MultipleSimulate() { rateText.text = "Win Rate :" + "..."; //prevent old value - if (Premium.CheckPremiumFeature()) - rateText.text = "Win Rate :" + await Premium.WinRatePVP(States.Instance.CurrentAvatarState, _avatarState, 100); + if (Premium.PANDORA_CheckPremium()) + rateText.text = "Win Rate :" + await Premium.PVP_WinRate(States.Instance.CurrentAvatarState, _avatarState, 1000); multipleSimulateButton.interactable = true; - multipleSimulateButton.GetComponentInChildren().text = "100 X Simulate"; + multipleSimulateButton.GetComponentInChildren().text = "1000 X Simulate"; } public void ResetAllNemesis() diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraSettingPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraSettingPopup.cs index babf6a914a8..426a23482ec 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraSettingPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraSettingPopup.cs @@ -29,67 +29,43 @@ public class PandoraSettingPopup : PopupWidget [SerializeField] TextMeshProUGUI nodeText; //Time Scale Elements - [SerializeField] - Image timeImage; - - [SerializeField] - Image blockImage; - - [SerializeField] - Image bothImage; + [SerializeField] Image timeImage; + [SerializeField] Image blockImage; + [SerializeField] Image bothImage; //Menu Speed Elements - [SerializeField] - TextMeshProUGUI menuSpeedText; - - [SerializeField] - Slider menuSpeedSlider; + [SerializeField] TextMeshProUGUI menuSpeedText; + [SerializeField] Slider menuSpeedSlider; //Fight Speed Elements - [SerializeField] - TextMeshProUGUI fightSpeedText; - - [SerializeField] - Slider fightSpeedSlider; + [SerializeField] TextMeshProUGUI fightSpeedText; + [SerializeField] Slider fightSpeedSlider; //Arena Speed Elements - [SerializeField] - TextMeshProUGUI arenaUpText; - [SerializeField] - TextMeshProUGUI arenaLoText; - - [SerializeField] - Slider arenaUpSlider; - [SerializeField] - Slider arenaLoSlider; + [SerializeField] TextMeshProUGUI arenaUpText; + [SerializeField] TextMeshProUGUI arenaLoText; + [SerializeField] Slider arenaUpSlider; + [SerializeField] Slider arenaLoSlider; //multiple login - [SerializeField] - Image multiLogOnImage; - - [SerializeField] - Image multiLogOffImage; + [SerializeField] Image multiLogOnImage; + [SerializeField] Image multiLogOffImage; //intro story - [SerializeField] - Image introStoryOnImage; - - [SerializeField] - Image introStoryOffImage; + [SerializeField] Image introStoryOnImage; + [SerializeField] Image introStoryOffImage; //arena multi method - [SerializeField] - Image arenaConfirmImage; - - [SerializeField] - Image arenaPushImage; + [SerializeField] Image arenaConfirmImage; + [SerializeField] Image arenaPushImage; //Arena Push Step Count - [SerializeField] - TextMeshProUGUI pushStepText; + [SerializeField] TextMeshProUGUI pushStepText; + [SerializeField] Slider pushStepSlider; - [SerializeField] - Slider pushStepSlider; + //arena validator + [SerializeField] Image arenaValidatorOnImage; + [SerializeField] Image arenaValidatorOffImage; int blockShowType; @@ -124,6 +100,7 @@ protected override void OnEnable() LoadMultipleLogin(); LoadIntroStory(); LoadArenaMethod(); + LoadArenaValidator(); SubmitWidget = () => Close(true); CloseWidget = () => Close(true); @@ -180,8 +157,22 @@ public void ResetDefault() LoadMultipleLogin(); LoadIntroStory(); LoadArenaMethod(); + LoadArenaValidator(); } + public void ChangeArenaValidator(bool value) + { + PandoraMaster.Instance.Settings.ArenaValidator = value; + LoadArenaValidator(); + } + + void LoadArenaValidator() + { + arenaValidatorOnImage.color = PandoraMaster.Instance.Settings.ArenaValidator ? Color.white : new Color(0.5f, 0.5f, 0.5f); + arenaValidatorOffImage.color = !PandoraMaster.Instance.Settings.ArenaValidator ? Color.white : new Color(0.5f, 0.5f, 0.5f); + } + + public void ChangeTimeScale(int value) { blockShowType = value; diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraShopPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraShopPopup.cs index a038ff2eebc..403d9401253 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraShopPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/PandoraShopPopup.cs @@ -114,7 +114,7 @@ public void BuyCrystal() string content = $"Are you sure to spend {currentNcg} NCG to get {(int)totalchoosenCrystal} CRYSTALS ?"; Find().Show(content, "Yes","No", (() => { - Premium.BuyCrystals(currentNcg, choosenCrystalPrice); + Premium.ACCOUNT_BuyCrystals(currentNcg, choosenCrystalPrice); StopCoroutine(ChangeCrystalValue()); })); } diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/StakingPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/StakingPopup.cs index 83a38b3a83c..5072e8d0c4f 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/StakingPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/StakingPopup.cs @@ -142,7 +142,7 @@ protected override void Awake() void CollectRewards() { collectButton.interactable = false; - Premium.CollectStakeRewards(); + Premium.ACCOUNT_CollectStakeRewards(); } //|||||||||||||| PANDORA END CODE ||||||||||||||||||| diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Popup/SweepPopup.cs b/nekoyume/Assets/_Scripts/UI/Widget/Popup/SweepPopup.cs index 2cc170e2b45..8f99390bd43 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Popup/SweepPopup.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Popup/SweepPopup.cs @@ -297,7 +297,7 @@ void GetApStoneCount() //bool RepeatMultipleIsOn = false; public void RepeatMultiple() { - Premium.RepeatMultiple(_repeatBattleAction, _ap, _stageRow, _costAp, + Premium.PVE_MultiRepeat(_repeatBattleAction, _ap, _stageRow, _costAp, (int)(apStoneSlider.slider.value), apStonePandora.item as Nekoyume.Model.Item.Material); } //|||||||||||||| PANDORA END CODE ||||||||||||||||||| @@ -480,7 +480,7 @@ private void Sweep(int apStoneCount, int ap, int worldId, StageSheet.Row stageRo //|||||||||||||| PANDORA START CODE ||||||||||||||||||| if (apStoneCount > 10) - if (!Premium.SweepMoreStone(apStoneCount, costumes, equipments, runeInfos, worldId, stageRow)) + if (!Premium.PVE_SweepMoreStones(apStoneCount, costumes, equipments, runeInfos, worldId, stageRow)) return; //|||||||||||||| PANDORA END CODE ||||||||||||||||||| diff --git a/nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs b/nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs index 42c4a10c5f7..5294f596aaf 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/ShopBuy.cs @@ -156,7 +156,7 @@ private async void ShowAsync(bool ignoreShowAnimation = false) private void Refresh() { RefreshButton.interactable = false; - PandoraBox.Premium.ShopRefresh(view, ShowItemTooltip, _cancellationTokenSource); + PandoraBox.Premium.SHOP_Refresh(view, ShowItemTooltip, _cancellationTokenSource); } //|||||||||||||| PANDORA END CODE ||||||||||||||||||| diff --git a/nekoyume/Assets/_Scripts/UI/Widget/ShopSell.cs b/nekoyume/Assets/_Scripts/UI/Widget/ShopSell.cs index 69100a0c11e..65098d9d438 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/ShopSell.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/ShopSell.cs @@ -75,17 +75,17 @@ public void EnableMarketHelper(TextMeshProUGUI text) void ReturnAll() { - Premium.CancellAllShopItems(view); + Premium.SHOP_CancelAll(view); } void ReturnLast() { - Premium.CancellLastShopItem(); + Premium.SHOP_CancelLast(); } public void RelistAll() { - Premium.RelistAllShopItems(view); + Premium.SHOP_RelistAll(view); } diff --git a/nekoyume/Assets/_Scripts/UI/Widget/Tooltip/ItemTooltip.cs b/nekoyume/Assets/_Scripts/UI/Widget/Tooltip/ItemTooltip.cs index 6df398a3230..3d4a510cf9b 100644 --- a/nekoyume/Assets/_Scripts/UI/Widget/Tooltip/ItemTooltip.cs +++ b/nekoyume/Assets/_Scripts/UI/Widget/Tooltip/ItemTooltip.cs @@ -130,7 +130,7 @@ protected override void Update() $"Pandora Gems to Feature this item in market for 36500 Blocks(5 days)?"; Find().Show(content, "Yes", "No", (() => { - Premium.BuyFeatureShop(nonFungibleItem.NonFungibleId.ToString()); + Premium.SHOP_FeatureItem(nonFungibleItem.NonFungibleId.ToString()); })); } } @@ -178,7 +178,7 @@ protected override void Update() public async void SetItemOwner(Guid guid) { - OwnerName.text = await Premium.GetItemOwnerName(guid); + OwnerName.text = await Premium.SHOP_GetItemOwnerName(guid); OwnerName.gameObject.SetActive(!string.IsNullOrEmpty(OwnerName.text)); } @@ -299,7 +299,7 @@ void SetStatsPercentage() if (star.gameObject.activeInHierarchy) stars++; } - statView.valueText.text += Premium.GetStatePercentage(currentItemBase.Id, statView, stars, level,out int percent1); + statView.valueText.text += Premium.SHOP_GetStatePercentage(currentItemBase.Id, statView, stars, level,out int percent1); if (stars == 1) PandoraScore += (int)(percent1 * 0.25f); else if (stars == 2) @@ -315,7 +315,7 @@ void SetStatsPercentage() if (star.gameObject.activeInHierarchy) stars++; } - statView.valueText.text += Premium.GetStatePercentage(currentItemBase.Id, statView, stars, level, out int percent2); + statView.valueText.text += Premium.SHOP_GetStatePercentage(currentItemBase.Id, statView, stars, level, out int percent2); if (stars == 1) PandoraScore += (int)(percent2 * 0.25f); else if (stars == 2) @@ -331,7 +331,7 @@ void SetStatsPercentage() if (star.gameObject.activeInHierarchy) stars++; } - statView.valueText.text += Premium.GetStatePercentage(currentItemBase.Id, statView, stars, level, out int percent3); + statView.valueText.text += Premium.SHOP_GetStatePercentage(currentItemBase.Id, statView, stars, level, out int percent3); if (stars == 1) PandoraScore += (int)(percent3 * 0.25f); else if (stars == 2) @@ -341,7 +341,7 @@ void SetStatsPercentage() if (content.Find("SkillView").gameObject.activeInHierarchy) { var skillView = content.Find("SkillView").GetComponent(); - skillView.powerText.text += Premium.GetStatePercentage(currentItemBase.Id, null, 1, level, out int percent4,skillView); + skillView.powerText.text += Premium.SHOP_GetStatePercentage(currentItemBase.Id, null, 1, level, out int percent4,skillView); if (percent4 == 0) PandoraScore += 25; else diff --git a/nekoyume/ProjectSettings/ProjectSettings.asset b/nekoyume/ProjectSettings/ProjectSettings.asset index 2163aeac323..0beb145ca7a 100644 --- a/nekoyume/ProjectSettings/ProjectSettings.asset +++ b/nekoyume/ProjectSettings/ProjectSettings.asset @@ -632,7 +632,9 @@ PlayerSettings: --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping - --emit-source-mapping --emit-source-mapping --emit-source-mapping' + --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping + --emit-source-mapping --emit-source-mapping --emit-source-mapping --emit-source-mapping + --emit-source-mapping' scriptingRuntimeVersion: 1 gcIncremental: 0 assemblyVersionValidation: 0