fix equipment percent proplem
This commit is contained in:
@@ -526,6 +526,11 @@ namespace BrewMonster.Scripts.Managers
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1299,12 +1299,12 @@ namespace BrewMonster.Scripts
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[EC_IvtrEquip] Failed to load item_ext_prop.txt from Addressables (address: {address})");
|
||||
BMLogger.LogWarning($"[EC_IvtrEquip] Failed to load item_ext_prop.txt from Addressables (address: {address})");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogError($"[EC_IvtrEquip] Exception loading item_ext_prop.txt from Addressables: {ex.Message}");
|
||||
BMLogger.LogError($"[EC_IvtrEquip] Exception loading item_ext_prop.txt from Addressables: {ex.Message}");
|
||||
// ignore parse errors; fallback below will handle unknown properties
|
||||
}
|
||||
|
||||
@@ -1495,7 +1495,6 @@ namespace BrewMonster.Scripts
|
||||
// Destroying description is added by caller when needed; keep it optional here.
|
||||
m_strDesc += "\\r";
|
||||
AddExtDescText();
|
||||
Debug.Log("m_strDesc add ext desc text: " + m_strDesc);
|
||||
// 11) Price (sell price scaled)
|
||||
return m_strDesc;
|
||||
}
|
||||
@@ -2790,11 +2789,11 @@ namespace BrewMonster.Scripts
|
||||
case 11: // ����ʱ��
|
||||
if (local)
|
||||
{
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -VisualizeFloatPercent(p0));
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -p0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -p0);
|
||||
AddDescText(color, true, GetItemDescString(DescriptipionMsg.ITEMDESC_CASTTIME), -VisualizeFloatPercent(p0));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -687,6 +687,7 @@ public class CECModel
|
||||
if(sfx.m_strFilePaths != null && sfx.m_strFilePaths.Count > 0)
|
||||
{
|
||||
string soundpath = AFile.NormalizePath(sfx.m_strFilePaths[0]);
|
||||
soundpath += ".wav";
|
||||
soundpath = soundpath.ToLower();
|
||||
SFXManager.Instance.PlaySkillSfxAtPointAsync(soundpath, Vector3.zero).Forget();
|
||||
|
||||
|
||||
@@ -3791,8 +3791,8 @@ namespace BrewMonster
|
||||
string szText = idTarget.ToString();
|
||||
List<OBJECT_COORD> originalCoords = new List<OBJECT_COORD>();
|
||||
int iCount = EC_Game.GetObjectCoord(szText, out originalCoords);
|
||||
|
||||
if (iCount == 0)
|
||||
|
||||
if (originalCoords == null || iCount == 0)
|
||||
{
|
||||
return vDestPos;
|
||||
}
|
||||
@@ -3800,9 +3800,20 @@ namespace BrewMonster
|
||||
float fMinDist = 99999999.0f;
|
||||
|
||||
// Get Current map name, such as 'a32' etc.
|
||||
int idInstance = CECGameRun.Instance.GetWorld().GetInstanceID();
|
||||
CECInstance pInstance = CECGameRun.Instance.GetInstance(idInstance);
|
||||
string strCurMap = pInstance.GetPath();
|
||||
CECGameRun gameRun = CECGameRun.Instance;
|
||||
if (gameRun == null)
|
||||
return vDestPos;
|
||||
|
||||
CECWorld world = gameRun.GetWorld();
|
||||
if (world == null)
|
||||
return vDestPos;
|
||||
|
||||
int idInstance = world.GetInstanceID();
|
||||
CECInstance pInstance = gameRun.GetInstance(idInstance);
|
||||
if (pInstance == null)
|
||||
return vDestPos;
|
||||
|
||||
string strCurMap = pInstance.GetPath() ?? string.Empty;
|
||||
// �ȼ��ͬһ��ͼ���Ƿ���Ҫ���ҵ���Ʒ
|
||||
bool bHasObjectInCurrentInstance = originalCoords.Any(coord => coord.strMap == strCurMap);
|
||||
|
||||
@@ -3826,7 +3837,9 @@ namespace BrewMonster
|
||||
// ��ǰ��ͼ��û��Ŀ��Ļ�����Ŀ�����ڵ�ͼ�ڵ�ǰ��ͼ�����
|
||||
else if (!bHasObjectInCurrentInstance)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(objCoord.strMap))
|
||||
continue;
|
||||
|
||||
// find the entrance of instance
|
||||
List<OBJECT_COORD> instCoord = new List<OBJECT_COORD>();
|
||||
int iCount2 = EC_Game.GetObjectCoord(objCoord.strMap, out instCoord);
|
||||
|
||||
Reference in New Issue
Block a user