Merge pull request 'feature/item-percent-info' (#374) from feature/item-percent-info into develop
Reviewed-on: https://git.pthub.vn/Unity/perfect-world-unity/pulls/374
This commit is contained in:
@@ -1775,6 +1775,7 @@ MonoBehaviour:
|
||||
m_iMin: 0
|
||||
m_iMax: 0
|
||||
m_iPos: 0
|
||||
m_skillGroupIndex: -1
|
||||
--- !u!222 &4529057318008104088
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2535,6 +2536,139 @@ MonoBehaviour:
|
||||
m_PointerBehavior: 0
|
||||
m_CursorLockBehavior: 0
|
||||
m_ScrollDeltaPerTick: 6
|
||||
--- !u!1 &1260673443396960607
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 665101671249071216}
|
||||
- component: {fileID: 5852019988558300524}
|
||||
- component: {fileID: 4807528781054845854}
|
||||
- component: {fileID: 2271817625555567393}
|
||||
m_Layer: 5
|
||||
m_Name: ShowLocalItem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &665101671249071216
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260673443396960607}
|
||||
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: 5274902618964925175}
|
||||
m_Father: {fileID: 7304194108989414091}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 46.5, y: -408.5}
|
||||
m_SizeDelta: {x: 73, y: 73}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5852019988558300524
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260673443396960607}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4807528781054845854
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260673443396960607}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &2271817625555567393
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1260673443396960607}
|
||||
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: 4807528781054845854}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1890210201668811196}
|
||||
m_TargetAssemblyTypeName: CECUIManager, Assembly-CSharp
|
||||
m_MethodName: ShowDlgAwardEquippedItemsLocalTest
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &1287587630908865938
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -5148,12 +5282,13 @@ RectTransform:
|
||||
- {fileID: 7009781864899289290}
|
||||
- {fileID: 306866035769036868}
|
||||
- {fileID: 7749074831901819156}
|
||||
- {fileID: 665101671249071216}
|
||||
m_Father: {fileID: 4771507653765862825}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -60, y: 192.35}
|
||||
m_SizeDelta: {x: 114.55328, y: 384.7}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 114.5533, y: 470.53}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &7541624867441988093
|
||||
MonoBehaviour:
|
||||
@@ -5569,7 +5704,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -225}
|
||||
m_SizeDelta: {x: 120, y: 384.7}
|
||||
m_SizeDelta: {x: 120, y: 470.53}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!1 &2844154145387244641
|
||||
GameObject:
|
||||
@@ -11021,6 +11156,7 @@ MonoBehaviour:
|
||||
m_iMin: 0
|
||||
m_iMax: 0
|
||||
m_iPos: 0
|
||||
m_skillGroupIndex: -1
|
||||
--- !u!222 &7047362733096336047
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13952,6 +14088,144 @@ MonoBehaviour:
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!1 &8742329132410766305
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5274902618964925175}
|
||||
- component: {fileID: 1324878229102893980}
|
||||
- component: {fileID: 3472526562790816081}
|
||||
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 &5274902618964925175
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8742329132410766305}
|
||||
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: 665101671249071216}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1324878229102893980
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8742329132410766305}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3472526562790816081
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8742329132410766305}
|
||||
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: 'Local Item Data
|
||||
|
||||
'
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4281479730
|
||||
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24.3
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &8760950483244738372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -977,7 +977,7 @@ namespace BrewMonster
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public ushort[] name; // Name, max 15 characters
|
||||
public string Name => ByteToStringUtils.UshortArrayToCP936String(name);
|
||||
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_matter; // Matter model file path
|
||||
@@ -1951,13 +1951,14 @@ namespace BrewMonster
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public ushort[] name; // name, max 15 chars
|
||||
public string Name => ByteToStringUtils.UshortArrayToUnicodeString(name);
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_matter; // matter file path
|
||||
|
||||
public string FileMatter => ByteToStringUtils.ByteArrayToCP936String(file_matter);
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] file_icon; // icon file path
|
||||
|
||||
public string FileIcon => ByteToStringUtils.ByteArrayToCP936String(file_icon);
|
||||
public int level; // level
|
||||
public int color; // color (0-7)
|
||||
|
||||
|
||||
@@ -519,18 +519,11 @@ namespace BrewMonster.Scripts.Managers
|
||||
return null;
|
||||
|
||||
var equipment = EC_IvtrItem.CreateItem(itemData.m_tid, itemData.m_expire_date, itemData.m_iCount);
|
||||
|
||||
// Parse item info if available (use Content field)
|
||||
if (itemData.Content != null && itemData.Content.Length > 0)
|
||||
{
|
||||
equipment.SetItemInfo(itemData.Content, itemData.Content.Length);
|
||||
}
|
||||
|
||||
// Align with GetDetailDataFromLocal() (e.g. CDlgAward): parsed addon params use prop.Local so
|
||||
// AddOneAddOnPropDesc uses the same branches as shop/tooltip (IntToFloat, VisualizeFloatPercent).
|
||||
if (equipment is EC_IvtrEquip ivtrEquip)
|
||||
ivtrEquip.SetLocalProps();
|
||||
|
||||
return equipment;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Common;
|
||||
using BrewMonster.Network;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Reflection;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
/// <summary>
|
||||
@@ -982,14 +982,13 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
if (m_iScaleType != (int)EC_IvtrItem.ScaleType.SCALE_SELL)
|
||||
return base.GetScaledPrice();
|
||||
|
||||
|
||||
int price = m_iPrice * Count;
|
||||
|
||||
|
||||
if (MaxEndurance == CurEndurance || MaxEndurance == 0)
|
||||
{
|
||||
return (int)(price * m_fPriceScale + 0.5f);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return (int)(price * m_fPriceScale * CurEndurance / (float)MaxEndurance + 0.5f);
|
||||
@@ -1198,7 +1197,6 @@ namespace BrewMonster.Scripts
|
||||
// refine props – do not change mask further
|
||||
break;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1205,7 @@ namespace BrewMonster.Scripts
|
||||
/// </summary>
|
||||
private static Dictionary<int, byte> s_propIdToType;
|
||||
private static bool s_propMapLoaded;
|
||||
private static readonly object s_propLock = new object();
|
||||
private static readonly object s_propLock = new();
|
||||
|
||||
private static void EnsurePropMapLoaded()
|
||||
{
|
||||
@@ -1222,20 +1220,20 @@ namespace BrewMonster.Scripts
|
||||
// Load item_ext_prop.txt from Addressables
|
||||
// Address must match the Addressables "Address" configured in Assets/AddressableAssetsData/...
|
||||
const string address = "Assets/Addressable/item_ext_prop.txt";
|
||||
|
||||
|
||||
// Initialize Addressables if not already initialized
|
||||
Addressables.InitializeAsync().WaitForCompletion();
|
||||
|
||||
|
||||
// Load the TextAsset synchronously (since GetPropertyType is called synchronously)
|
||||
var textAsset = Addressables.LoadAssetAsync<TextAsset>(address).WaitForCompletion();
|
||||
|
||||
|
||||
if (textAsset != null && !string.IsNullOrEmpty(textAsset.text))
|
||||
{
|
||||
// Parse the text content
|
||||
int currentType = -1;
|
||||
bool inTypeBlock = false;
|
||||
bool inBlockComment = false;
|
||||
|
||||
|
||||
using (var reader = new StringReader(textAsset.text))
|
||||
{
|
||||
string rawLine;
|
||||
@@ -1295,7 +1293,6 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1323,28 +1320,27 @@ namespace BrewMonster.Scripts
|
||||
// Unknown
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Set properties to local
|
||||
/// </summary>
|
||||
public void SetLocalProps()
|
||||
public override void SetLocalProps()
|
||||
{
|
||||
if (Props.Count == 0)
|
||||
return;
|
||||
|
||||
foreach (Property prop in Props)
|
||||
{
|
||||
prop.Local = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get deadly strike rate provided by this equipment
|
||||
/// </summary>
|
||||
public int GetDeadlyStrikeRate(bool suiteGen)
|
||||
{
|
||||
int val = 0;
|
||||
|
||||
|
||||
if (suiteGen)
|
||||
{
|
||||
// Suite generation logic would go here
|
||||
@@ -1359,10 +1355,10 @@ namespace BrewMonster.Scripts
|
||||
val += prop.Params[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Decide equipment name color
|
||||
/// </summary>
|
||||
@@ -1371,9 +1367,9 @@ namespace BrewMonster.Scripts
|
||||
int index = GetColorStrID(TemplateId);
|
||||
if (index >= 0)
|
||||
return index;
|
||||
|
||||
|
||||
int col = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
|
||||
|
||||
|
||||
switch (FixProps)
|
||||
{
|
||||
case 1: col = (int)DescriptipionMsg.ITEMDESC_COL_GREEN; break;
|
||||
@@ -1384,10 +1380,10 @@ namespace BrewMonster.Scripts
|
||||
col = (int)DescriptipionMsg.ITEMDESC_COL_LIGHTBLUE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return col;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get color string ID for template
|
||||
/// </summary>
|
||||
@@ -1402,9 +1398,9 @@ namespace BrewMonster.Scripts
|
||||
else
|
||||
return (int)DescriptipionMsg.ITEMDESC_COL2_START + iIndex - 7 + 1;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Description Methods (high level entry points)
|
||||
|
||||
/// <summary>
|
||||
@@ -1505,12 +1501,12 @@ namespace BrewMonster.Scripts
|
||||
public string GetBoothBuyDesc()
|
||||
{
|
||||
m_strDesc = "";
|
||||
|
||||
|
||||
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
|
||||
|
||||
|
||||
// Item name
|
||||
AddDescText(white, true, GetItemDescString(DescriptipionMsg.ITEMDESC_NAME), GetName());
|
||||
|
||||
|
||||
// Base stats from element data
|
||||
string baseStats = GetBaseStatsDesc();
|
||||
if (!string.IsNullOrEmpty(baseStats))
|
||||
@@ -1531,7 +1527,7 @@ namespace BrewMonster.Scripts
|
||||
|
||||
// Price
|
||||
AddPriceDesc(white, false);
|
||||
|
||||
|
||||
return m_strDesc;
|
||||
}
|
||||
|
||||
@@ -1893,7 +1889,6 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
string tmpDesc = m_strDesc;
|
||||
m_strDesc = "";
|
||||
|
||||
AddOneAddOnPropDesc(prop.Type, prop.Params, null, null, prop.Local);
|
||||
|
||||
string result = m_strDesc;
|
||||
@@ -2446,7 +2441,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), p0);
|
||||
AddDescText(color, true, "~{0}", p1);
|
||||
AddDescText(color, true, "~~{0}", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2471,7 +2466,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), f0);
|
||||
AddDescText(color, true, "~{0:F2}", f1);
|
||||
AddDescText(color, true, "~~{0:F2}", f1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2496,7 +2491,7 @@ namespace BrewMonster.Scripts
|
||||
if (v0 != v1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), v0);
|
||||
AddDescText(color, true, "~{0}%%", v1);
|
||||
AddDescText(color, true, "~~{0}%%", v1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2521,7 +2516,7 @@ namespace BrewMonster.Scripts
|
||||
if (v0 != v1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), v0);
|
||||
AddDescText(color, true, "~{0}%%", v1);
|
||||
AddDescText(color, true, "~~{0}%%", v1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2546,7 +2541,7 @@ namespace BrewMonster.Scripts
|
||||
if (v0 != v1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), v0);
|
||||
AddDescText(color, true, "~{0}%%", v1);
|
||||
AddDescText(color, true, "~~{0}%%", v1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2571,7 +2566,7 @@ namespace BrewMonster.Scripts
|
||||
if (h0 != h1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString), h0);
|
||||
AddDescText(color, true, "~{0}", h1);
|
||||
AddDescText(color, true, "~~{0}", h1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2594,7 +2589,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(idString));
|
||||
AddDescText(color, true, " %+d~%d", p0, p1);
|
||||
AddDescText(color, true, " %+d~~%d", p0, p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2642,7 +2637,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_MAXPHYDAMAGE), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2684,7 +2679,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_MAXMAGICDAMAGE), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2785,15 +2780,15 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_ADDATKDIST), IntToFloat(p0));
|
||||
}
|
||||
break;
|
||||
|
||||
case 11: // ����ʱ��
|
||||
|
||||
case 11: // ����ʱ��
|
||||
if (local)
|
||||
{
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -p0);
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -VisualizeFloatPercent(p0));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -VisualizeFloatPercent(p0));
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -p0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2836,7 +2831,7 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_GOLDDEFENCE));
|
||||
if (p0 != p1)
|
||||
AddDescText(color, true, " %d~%d", p0, p1);
|
||||
AddDescText(color, true, " %d~~%d", p0, p1);
|
||||
else
|
||||
AddDescText(color, true, " %d", p0);
|
||||
}
|
||||
@@ -2855,7 +2850,7 @@ namespace BrewMonster.Scripts
|
||||
if ((p0) != (p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_GOLDDEFEXTRA), (p0));
|
||||
AddDescText(color, true, "~-%.2f%%", p1);
|
||||
AddDescText(color, true, "~~-%.2f%%", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2874,7 +2869,7 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_WOODDEFENCE));
|
||||
|
||||
if (p0 != p1)
|
||||
AddDescText(color, true, " %d~%d", p0, p1);
|
||||
AddDescText(color, true, " %d~~%d", p0, p1);
|
||||
else
|
||||
AddDescText(color, true, " %d", p0);
|
||||
}
|
||||
@@ -2894,7 +2889,7 @@ namespace BrewMonster.Scripts
|
||||
if ((p0) != (p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_WOODDEFEXTRA), (p0));
|
||||
AddDescText(color, true, "~-%.2f%%", p1);
|
||||
AddDescText(color, true, "~~-%.2f%%", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2913,7 +2908,7 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_WATERDEFENCE));
|
||||
|
||||
if (p0 != p1)
|
||||
AddDescText(color, true, " %d~%d", p0, p1);
|
||||
AddDescText(color, true, " %d~~%d", p0, p1);
|
||||
else
|
||||
AddDescText(color, true, " %d", p0);
|
||||
}
|
||||
@@ -2933,7 +2928,7 @@ namespace BrewMonster.Scripts
|
||||
if ((p0) != (p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_WATERDEFEXTRA), (p0));
|
||||
AddDescText(color, true, "~-%.2f%%", p1);
|
||||
AddDescText(color, true, "~~-%.2f%%", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2952,7 +2947,7 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_FIREDEFENCE));
|
||||
|
||||
if (p0 != p1)
|
||||
AddDescText(color, true, " %d~%d", p0, p1);
|
||||
AddDescText(color, true, " %d~~%d", p0, p1);
|
||||
else
|
||||
AddDescText(color, true, " %d", p0);
|
||||
}
|
||||
@@ -2960,19 +2955,18 @@ namespace BrewMonster.Scripts
|
||||
{
|
||||
if (aPEEVals != null)
|
||||
aPEEVals[PEEI_FIREDEF] += p0;
|
||||
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_FIREDEFENCE));
|
||||
AddDescText(color, true, " %+d", p0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 22: // ���(%)
|
||||
if (local)
|
||||
{
|
||||
if ((p0) != (p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_FIREDEFEXTRA), (p0));
|
||||
AddDescText(color, true, "~-%.2f%%", p1);
|
||||
AddDescText(color, true, "~~-%.2f%%", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2991,7 +2985,7 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_EARTHDEFENCE));
|
||||
|
||||
if (p0 != p1)
|
||||
AddDescText(color, true, " %d~%d", p0, p1);
|
||||
AddDescText(color, true, " %d~~%d", p0, p1);
|
||||
else
|
||||
AddDescText(color, true, " %d", p0);
|
||||
}
|
||||
@@ -3011,7 +3005,7 @@ namespace BrewMonster.Scripts
|
||||
if ((p0) != (p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_EARTHDEFEXTRA), (p0));
|
||||
AddDescText(color, true, "~-%.2f%%", p1);
|
||||
AddDescText(color, true, "~~-%.2f%%", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3128,7 +3122,7 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_WOODDEFENCE));
|
||||
AddDescText(color, true, " %+d", -p1);
|
||||
break;
|
||||
|
||||
|
||||
case 35: // HP
|
||||
if (!local)
|
||||
{
|
||||
@@ -3187,7 +3181,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_STRENGTH), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3206,7 +3200,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_AGILITY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3225,7 +3219,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_ENERGY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3244,7 +3238,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_VITALITY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3274,7 +3268,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_ATKRATING), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3297,7 +3291,6 @@ namespace BrewMonster.Scripts
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_ATKRATINGEXTRA), p0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 48: // �ƶ��ٶ�
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_RUNSPEED), IntToFloat(p0));
|
||||
break;
|
||||
@@ -3369,7 +3362,7 @@ namespace BrewMonster.Scripts
|
||||
if (VisualizeFloatPercent(p0) != VisualizeFloatPercent(p1))
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_REQEXTRA), -VisualizeFloatPercent(p0));
|
||||
AddDescText(color, true, "~%d", VisualizeFloatPercent(p1));
|
||||
AddDescText(color, true, "~~%d", VisualizeFloatPercent(p1));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3459,7 +3452,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_ATK_DEGREE), p0);
|
||||
AddDescText(color, true, "~{0}", p1);
|
||||
AddDescText(color, true, "~~{0}", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3740,7 +3733,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_VITALITY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3759,7 +3752,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_STRENGTH), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3778,7 +3771,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_AGILITY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3797,7 +3790,7 @@ namespace BrewMonster.Scripts
|
||||
if (p0 != p1)
|
||||
{
|
||||
AddDescText(color, false, GetItemDescString(DescriptipionMsg.ITEMDESC_ENERGY), p0);
|
||||
AddDescText(color, true, "~%d", p1);
|
||||
AddDescText(color, true, "~~%d", p1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Network;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using UnityEngine;
|
||||
using BrewMonster.Network;
|
||||
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
@@ -809,7 +809,7 @@ namespace BrewMonster.Scripts
|
||||
/// </summary>
|
||||
public static EC_IvtrItem CreateItem(int tid, int expire_date, int iCount, int idSpace = 0)
|
||||
{
|
||||
var pItem = new EC_IvtrItem(tid, expire_date);
|
||||
EC_IvtrItem pItem;
|
||||
DATA_TYPE DataType = DATA_TYPE.DT_INVALID;
|
||||
object data = ElementDataManProvider.GetElementDataMan().get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
||||
//Debug.Log("Create item data: DataType: " + DataType);
|
||||
@@ -1509,8 +1509,9 @@ namespace BrewMonster.Scripts
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected virtual void SetLocalProps()
|
||||
public virtual void SetLocalProps()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual void AddDescText(int iCol, bool bRet, string szText, params object[] args)
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using ModelRenderer.Scripts.Common;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
|
||||
using UnityEngine;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts;
|
||||
using CSNetwork.GPDataType;
|
||||
using System.Runtime.InteropServices;
|
||||
namespace BrewMonster.Scripts
|
||||
{
|
||||
public class EC_IvtrStone : EC_IvtrItem
|
||||
{
|
||||
// Data in database
|
||||
private STONE_ESSENCE m_pDBEssence;
|
||||
|
||||
protected STONE_SUB_TYPE m_pDBSubType;
|
||||
protected STONE_ESSENCE m_pDBEssence;
|
||||
/// <summary>
|
||||
/// Not create logic yet (add summary later)
|
||||
/// </summary>
|
||||
@@ -36,9 +46,46 @@ namespace BrewMonster.Scripts
|
||||
|
||||
public EC_IvtrStone(EC_IvtrStone other) : base(other)
|
||||
{
|
||||
m_pDBEssence = other.m_pDBEssence;
|
||||
m_pDBSubType= other.m_pDBSubType;
|
||||
}
|
||||
|
||||
public STONE_ESSENCE GetDBEssence() { return m_pDBEssence; }
|
||||
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
|
||||
{
|
||||
base.SetItemInfo(pInfoData, iDataLen);
|
||||
return true;
|
||||
}
|
||||
public override string GetIconFile()
|
||||
{
|
||||
return m_pDBEssence.FileIcon;
|
||||
}
|
||||
public override string GetName()
|
||||
{
|
||||
return m_pDBEssence.Name;
|
||||
}
|
||||
protected override string GetNormalDesc(bool bRepair)
|
||||
{
|
||||
m_strDesc = "";
|
||||
CECStringTab pDescTab = EC_Game.GetItemDesc();
|
||||
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
|
||||
int namecol = DecideNameCol();
|
||||
if (m_iCount > 1)
|
||||
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
|
||||
else
|
||||
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
|
||||
AddIDDescText();
|
||||
AddExpireTimeDesc();
|
||||
AddPriceDesc(white, bRepair);
|
||||
AddExtDescText();
|
||||
return m_strDesc;
|
||||
|
||||
}
|
||||
public override string GetDropModel()
|
||||
{
|
||||
return m_pDBEssence.FileMatter;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ namespace BrewMonster
|
||||
&& GetModel().PlayActionByName(szActName, 1.0f, true, 200, true, (uint)PLAYER_ACTION_TYPE.ACT_CASTSKILL, bNoFX, attackEvent, dwFlagMode);
|
||||
if (!check)
|
||||
{
|
||||
BMLogger.LogError($"Fall back to base implementation: {szActName} failed");
|
||||
//BMLogger.LogError($"Fall back to base implementation: {szActName} failed");
|
||||
//fallback to base implementation(which is non policy based)
|
||||
base.PlaySkillAttackActionWithName(idSkill, szActName, bNoFX, attackEvent, dwFlagMode);
|
||||
}
|
||||
@@ -413,7 +413,7 @@ namespace BrewMonster
|
||||
&& GetModel().QueueAction(szActName, nTransTime, (int)PLAYER_ACTION_TYPE.ACT_CASTSKILL, false, false, bNoFX, bResetSpeed, bResetActFlag, attackEvent, dwNewFlagMode);
|
||||
if (!check)
|
||||
{
|
||||
BMLogger.LogError($"Fall back to base implementation: {szActName} failed");
|
||||
//BMLogger.LogError($"Fall back to base implementation: {szActName} failed");
|
||||
//fallback to base implementation(which is non policy based)
|
||||
base.QueueSkillAttackActionWithName(idSkill, szActName, nTransTime, bNoFX, bResetSpeed, bResetActFlag, attackEvent, dwNewFlagMode);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using BrewMonster.Common;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts.Managers;
|
||||
using BrewMonster.Scripts.Task;
|
||||
@@ -302,7 +303,103 @@ namespace BrewMonster.Scripts.UI
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Debug: equipment slot template ids only; rebuild with <see cref="EC_IvtrItem.CreateItem"/> +
|
||||
/// <see cref="EC_IvtrItem.GetDetailDataFromLocal"/> for local prop/description testing.
|
||||
/// </summary>
|
||||
public void TestItemInInventory()
|
||||
{
|
||||
m_bThroughNPC = false;
|
||||
m_bSpendContribution = false;
|
||||
if (m_pBtn_Confirm != null)
|
||||
m_pBtn_Confirm.gameObject.SetActive(false);
|
||||
|
||||
for (int r = 1; r <= _rowCount; r++)
|
||||
GetToggleBtnAt(r)?.gameObject.SetActive(false);
|
||||
|
||||
var host = GetHostPlayer();
|
||||
var inv = host?.GetInventory(InventoryConst.IVTRTYPE_EQUIPPACK);
|
||||
if (inv == null)
|
||||
{
|
||||
ClearAwardGridForLocalEquipmentTest(0);
|
||||
return;
|
||||
}
|
||||
|
||||
int capacity = _rowCount * _columnCount;
|
||||
int filledCount = 0;
|
||||
for (int slot = 0; slot < inv.GetSize(); slot++)
|
||||
{
|
||||
var eq = inv.GetItem(slot, false);
|
||||
if (eq == null)
|
||||
continue;
|
||||
int tid = eq.GetTemplateID();
|
||||
if (tid <= 0)
|
||||
continue;
|
||||
|
||||
if (filledCount >= capacity)
|
||||
break;
|
||||
|
||||
int row = filledCount / _columnCount + 1;
|
||||
int col = filledCount % _columnCount + 1;
|
||||
var pImage = GetAwardItemAt(row, col);
|
||||
if (pImage == null)
|
||||
break;
|
||||
|
||||
var pItem = EC_IvtrItem.CreateItem(tid, 0, 1);
|
||||
if (pItem == null)
|
||||
continue;
|
||||
|
||||
pItem.GetDetailDataFromLocal();
|
||||
string strDesc = pItem.GetDesc();
|
||||
pImage.SetHint(strDesc);
|
||||
pImage.SetOnClick(OnAwardItemClicked);
|
||||
var sprite = EC_IvtrItemUtils.Instance.ResolveItemIconSprite(pItem.m_tid);
|
||||
pImage.SetImage(sprite);
|
||||
|
||||
var pEquip = (EC_IvtrEquip)EC_IvtrItem.CreateItem(pItem.m_tid, pItem.m_expire_date, pItem.m_iCount);
|
||||
pImage.SetColor(
|
||||
(pItem.IsEquipment() && pEquip.IsDestroying())
|
||||
? new Color32(128, 128, 128, 255)
|
||||
: new Color32(255, 255, 255, 255));
|
||||
|
||||
pImage.SetText(_AL(""));
|
||||
pImage.Show(true);
|
||||
filledCount++;
|
||||
}
|
||||
|
||||
for (int idx = filledCount; idx < capacity; idx++)
|
||||
{
|
||||
int row = idx / _columnCount + 1;
|
||||
int col = idx % _columnCount + 1;
|
||||
var extra = GetAwardItemAt(row, col);
|
||||
if (extra == null)
|
||||
continue;
|
||||
extra.ClearCover();
|
||||
extra.SetHint(_AL(""));
|
||||
extra.SetText(_AL(""));
|
||||
}
|
||||
|
||||
int lastFilledRow = filledCount == 0 ? 0 : (filledCount - 1) / _columnCount + 1;
|
||||
ClearAwardGridForLocalEquipmentTest(lastFilledRow);
|
||||
}
|
||||
|
||||
void ClearAwardGridForLocalEquipmentTest(int lastFilledRow)
|
||||
{
|
||||
for (int i = lastFilledRow + 1; i <= _rowCount; i++)
|
||||
{
|
||||
GetToggleBtnAt(i)?.gameObject.SetActive(false);
|
||||
for (int j = 1; j <= _columnCount; j++)
|
||||
{
|
||||
var pImage = GetAwardItemAt(i, j);
|
||||
if (pImage == null)
|
||||
break;
|
||||
pImage.ClearCover();
|
||||
pImage.SetHint(_AL(""));
|
||||
pImage.SetText(_AL(""));
|
||||
pImage.Show(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
void sprintf(out string szName, string format, int i)
|
||||
{
|
||||
// Convert C-style format specifiers to C# format
|
||||
|
||||
@@ -775,6 +775,24 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
_dlgPlayerOptions.transform.position = position;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens <c>Win_Award</c> (<see cref="CDlgAward"/>) and fills it from equipped template ids using local item data
|
||||
/// (<see cref="CDlgAward.TestItemInInventory"/>). For debugging local prop/description behavior.
|
||||
/// </summary>
|
||||
/// <returns>The dialog instance, or null if the prefab is not registered.</returns>
|
||||
public void ShowDlgAwardEquippedItemsLocalTest()
|
||||
{
|
||||
const string dlgAwardName = "Win_Award";
|
||||
CDlgAward award = null;
|
||||
if (GetInGameUIMan().GetDialog(dlgAwardName) is CDlgAward dlgAward)
|
||||
{
|
||||
award = dlgAward;
|
||||
}
|
||||
|
||||
var shown = ShowUI(dlgAwardName) as CDlgAward;
|
||||
(shown ?? award).TestItemInInventory();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the current target NPC ID (same as stored from NPCINFO event)
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user