Merge pull request 'feature/skill-data' (#104) from feature/skill-data into develop
Reviewed-on: https://git.brew.monster/Unity/perfect-world-unity/pulls/104
This commit is contained in:
@@ -87,7 +87,7 @@ GameObject:
|
||||
- component: {fileID: 2690941580050673919}
|
||||
- component: {fileID: 4280331804577109228}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_Name: ImageLock
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -170,7 +170,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5717981154351234976
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -221,6 +221,9 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ClockIcon: {fileID: 4280331804577109228}
|
||||
m_iMin: 0
|
||||
m_iMax: 0
|
||||
m_iPos: 0
|
||||
--- !u!222 &1012268097730980895
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -153,6 +153,8 @@ namespace BrewMonster.Managers
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ namespace BrewMonster
|
||||
|
||||
if (m_bCooling)
|
||||
{
|
||||
BMLogger.LogError($"CECSkill Tick m_bCooling: = {m_bCooling}, m_iCoolCnt={m_iCoolCnt}");
|
||||
// In cooling state
|
||||
m_iCoolCnt -= tickTime;
|
||||
if (m_iCoolCnt <= 0)
|
||||
@@ -321,7 +322,6 @@ namespace BrewMonster
|
||||
|
||||
public float GetCastRange(float fAtkDist, float fPrayDistancePlus)
|
||||
{
|
||||
BMLogger.LogError($"HoangDev: GetCastRange {m_pSkillCore}");
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetPrayRange(fAtkDist, fPrayDistancePlus) : 0f;
|
||||
}
|
||||
public string GetEffect()
|
||||
|
||||
@@ -138,8 +138,7 @@ namespace BrewMonster
|
||||
s_allTaoistRanks[i] = new CECTaoistRank();
|
||||
}
|
||||
s_allTaoistRanks[i].m_id = TaoistRankIDs[i];
|
||||
/* s_allTaoistRanks[i].m_name =
|
||||
g_pGame->GetGameRun()->GetUIManager()->GetInGameUIMan()->GetStringFromTable(1001 + s_allTaoistRanks[i].m_id);*/
|
||||
s_allTaoistRanks[i].m_name = CECUIManager.Instance.GetInGameUIMan().GetStringFromTable(1001 + s_allTaoistRanks[i].m_id);
|
||||
if (i != (int)ToaistRank.BaseRankCount - 1 &&
|
||||
i != (int)ToaistRank.BaseRankCount + (int)ToaistRank.GodRankCount - 1 &&
|
||||
i != (int)ToaistRank.TotalRankCount - 1)
|
||||
|
||||
@@ -1728,6 +1728,11 @@ namespace CSNetwork.GPDataType
|
||||
public int cooldown;
|
||||
public int max_cooltime;
|
||||
}
|
||||
public struct cmd_set_cooldown
|
||||
{
|
||||
public int cooldown_index;
|
||||
public int cooldown_time;
|
||||
};
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)] // sizeof = 36 với padding 1 byte sau dir
|
||||
|
||||
public struct cmd_npc_info_00
|
||||
|
||||
@@ -367,6 +367,7 @@ namespace CSNetwork
|
||||
// pAutoTeam.OnPrtcAutoTeamSetGoalRe((AutoTeamSetGoal_Re)protocol);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_logger.Log(LogType.Warning, $"Received unhandled protocol type: {protocol.GetPType()}");
|
||||
break;
|
||||
@@ -783,6 +784,9 @@ namespace CSNetwork
|
||||
case CommandID.MINE_GATHERED:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERGATHER, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
case CommandID.COOLTIME_DATA:
|
||||
EC_ManMessage.PostMessage(EC_MsgDef.MSG_HST_COOLTIMEDATA, MANAGER_INDEX.MAN_PLAYER, 0, pDataBuf, pCmdHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,11 +100,9 @@ namespace BrewMonster.Scripts.Skills
|
||||
player.SetPrayrangeplus(prayplus);
|
||||
if (stub.type == (int)skill_type.TYPE_ATTACK || stub.type == (int)skill_type.TYPE_CURSE)
|
||||
{
|
||||
BMLogger.LogError($"HoangDev: GetPrayRange AutoAttack {stub.auto_attack}");
|
||||
if (stub.auto_attack)
|
||||
{
|
||||
float r = 0.3f * stub.GetPraydistance(this);
|
||||
BMLogger.LogError($"HoangDev: r={r} ");
|
||||
|
||||
if (r >= 1.0)
|
||||
return stub.GetPraydistance(this) - 1.0f;
|
||||
|
||||
@@ -182,6 +182,8 @@ namespace BrewMonster
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ namespace BrewMonster
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ namespace BrewMonster
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace BrewMonster.UI
|
||||
// ��ʼ�����������ڶԻ���һ���Է�����ڴ� / Initialize rank sub-dialogs once to avoid realloc
|
||||
private void CreateOneRankDlg(CECTaoistRank taoistRank)
|
||||
{
|
||||
AUISubDialog pSubRank = Instantiate(m_pSubRank, m_contentRoot,transform);
|
||||
AUISubDialog pSubRank = Instantiate(m_pSubRank, m_contentRoot, transform);
|
||||
pSubRank.SetName($"{m_pSubRank.GetName()}{taoistRank.GetID()}");
|
||||
pSubRank.Show(false);
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace BrewMonster.UI
|
||||
taoistRank != CECTaoistRank.GetGodRankEnd();
|
||||
taoistRank = taoistRank.GetNext())
|
||||
{
|
||||
BMLogger.LogError("CDlgSkillSubList::ResetDialog: Adding GetGodRankBegin rank "+ taoistRank.GetID());
|
||||
BMLogger.LogError("CDlgSkillSubList::ResetDialog: Adding GetGodRankBegin rank " + taoistRank.GetID());
|
||||
|
||||
AddDlgsOfOneRank(taoistRank);
|
||||
}
|
||||
@@ -234,11 +234,7 @@ namespace BrewMonster.UI
|
||||
//pSub.SetPos(0f, m_curBottom);
|
||||
//m_curBottom += m_rankHeight * m_windowScale;
|
||||
|
||||
TextMeshProUGUI label = pSub.GetComponentInChildren<TextMeshProUGUI>(true);
|
||||
if (label != null)
|
||||
{
|
||||
label.text = CECTaoistRank.GetTaoistRank(rankID).GetName();
|
||||
}
|
||||
pSub.SetLabel(CECTaoistRank.GetTaoistRank(rankID).GetName());
|
||||
}
|
||||
|
||||
// ����һ�����ܶԻ����øú����������UpdateOneSubDlg / Add a skill sub dialog then update it
|
||||
|
||||
@@ -10,7 +10,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public class CdlgQuickBar : MonoBehaviour
|
||||
public class CDlgQuickBar : MonoBehaviour
|
||||
{
|
||||
//[SerializeField] List<Image> m_aSkillImage = new List<Image>();
|
||||
//[SerializeField] List<Button> m_aSkillButton = new List<Button>();
|
||||
@@ -34,6 +34,7 @@ namespace BrewMonster
|
||||
int nCurPanel8 = GetCurPanel2();
|
||||
|
||||
CECHostPlayer pHost = EC_Game.GetGameRun().GetHostPlayer();
|
||||
if (pHost == null) return false;
|
||||
var a_pSCS = new List<CECShortcutSet>();
|
||||
var a_pszPanel = new List<string>();
|
||||
GetQuickBarNameAndSC(pHost, a_pszPanel, a_pSCS, nCurPanel9, nCurPanel8);
|
||||
@@ -89,21 +90,24 @@ namespace BrewMonster
|
||||
//pCell.SetColor(A3DCOLORRGB(255, 255, 255));
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//pCell.SetColor(A3DCOLORRGB(128, 128, 128));
|
||||
}
|
||||
}
|
||||
}
|
||||
/* else
|
||||
pClock.SetColor(A3DCOLORRGBA(0, 0, 0, 128));*/
|
||||
/* else
|
||||
pClock.SetColor(A3DCOLORRGBA(0, 0, 0, 128));*/
|
||||
if (pSkill != null && (pSkill.GetCoolingTime() > 0 ||
|
||||
pHost.GetPrepSkill() == pSkill))
|
||||
{
|
||||
pClock.SetProgressRange(0, pSkill.GetCoolingTime());
|
||||
if (pHost.GetPrepSkill() == pSkill)
|
||||
pClock.SetProgressPos(0);
|
||||
{
|
||||
pClock.SetProgressPos(0); }
|
||||
else
|
||||
{
|
||||
pClock.SetProgressPos(pSkill.GetCoolingTime() - pSkill.GetCoolingCnt());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,11 @@ namespace BrewMonster
|
||||
[SerializeField] private int m_iPos;
|
||||
|
||||
public Image GetClockIcon() => m_ClockIcon;
|
||||
public void SetProgressPos(float progress)
|
||||
public void SetProgressPos(int progress)
|
||||
{
|
||||
progress = Math.Clamp(progress, m_iMin, m_iMax);
|
||||
m_iPos = Math.Clamp(progress, m_iMin, m_iMax);
|
||||
|
||||
m_ClockIcon.fillAmount = progress;
|
||||
UpdateClockIcon();
|
||||
BMLogger.LogError("AUIClockIcon SetProgressPos ");
|
||||
}
|
||||
public void SetProgressRange(int min, int max)
|
||||
{
|
||||
@@ -31,16 +29,9 @@ namespace BrewMonster
|
||||
m_iMax = max;
|
||||
m_iPos = Math.Clamp(m_iPos, m_iMin, m_iMax);
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (m_iPos != m_iMin)
|
||||
{
|
||||
UpdateClockIcon();
|
||||
}
|
||||
}
|
||||
private void UpdateClockIcon()
|
||||
{
|
||||
float progress = (float)(m_iPos - m_iMin) / (m_iMax - m_iMin);
|
||||
float progress = (float)(m_iMax - m_iPos) / (m_iMax - m_iMin);
|
||||
m_ClockIcon.fillAmount = progress;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace BrewMonster
|
||||
[SerializeField] private AUIDialog m_subDialog;
|
||||
[SerializeField] private RectTransform m_rectTransform;
|
||||
[SerializeField] private TextMeshProUGUI levelName;
|
||||
[SerializeField] private TextMeshProUGUI label;
|
||||
|
||||
private int m_data;
|
||||
|
||||
private void Reset()
|
||||
@@ -43,7 +45,13 @@ namespace BrewMonster
|
||||
{
|
||||
name = newName;
|
||||
}
|
||||
|
||||
public void SetLabel(string strLabel)
|
||||
{
|
||||
if (label != null)
|
||||
{
|
||||
label.text = strLabel;
|
||||
}
|
||||
}
|
||||
public Vector2Int GetSize()
|
||||
{
|
||||
if (m_rectTransform == null)
|
||||
|
||||
@@ -202,7 +202,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11414302, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_Value
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 11490438, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_IgnoreReversedGraphics
|
||||
@@ -210,7 +210,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22400762, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -0.000061035156
|
||||
value: 0.000061035156
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 22426080, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
|
||||
@@ -2079,9 +2079,9 @@ RectTransform:
|
||||
- {fileID: 4504331075840543341}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 108.9562, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8804506040386004496
|
||||
@@ -5904,9 +5904,9 @@ RectTransform:
|
||||
- {fileID: 2027606699309904338}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468.781, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6741821173640675138
|
||||
@@ -18839,9 +18839,9 @@ RectTransform:
|
||||
- {fileID: 911293677621153352}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 288.8686, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5623009994815814977
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dfacfe7598c13b74bf00df392384c4c626d00ac99325d3db2353f0e31cc8a414
|
||||
size 200761977
|
||||
oid sha256:4e48c9be3ea9d07ee5f5073f5d0759c66181647b3d57a2d2358cd50ae5502408
|
||||
size 200782987
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.Players;
|
||||
using BrewMonster;
|
||||
using BrewMonster.Assets.PerfectWorld.Scripts.Players;
|
||||
using BrewMonster.Managers;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.PerfectWorld.Scripts.Vfx;
|
||||
@@ -102,7 +103,7 @@ namespace BrewMonster
|
||||
public ON_AIR_CDR_INFO m_AirCDRInfo;
|
||||
public ushort m_wMoveStamp = 0;
|
||||
private CECCounter m_GatherCnt; // Gather counter
|
||||
Dictionary<int, COOLTIME> m_skillCoolTime = new();
|
||||
Dictionary<int, COOLTIME> m_skillCoolTime = new Dictionary<int, COOLTIME>();
|
||||
COOLTIME[] m_aCoolTimes = new COOLTIME[(int)CoolTimeIndex.GP_CT_MAX]; // Cool times
|
||||
|
||||
// Host config data version
|
||||
@@ -117,7 +118,7 @@ namespace BrewMonster
|
||||
// ID of summon player skill
|
||||
const int ID_SUMMONPLAYER_SKILL = 1824;
|
||||
|
||||
private CECAutoTeam m_pAutoTeam; // Player auto team / automatic team grouping
|
||||
private CECAutoTeam m_pAutoTeam;
|
||||
|
||||
// ====== Ground cast config ======
|
||||
[Header("Ground Cast")]
|
||||
@@ -498,7 +499,7 @@ namespace BrewMonster
|
||||
case int value when value == EC_MsgDef.MSG_HST_TARGETISFAR: OnMsgHstTargetIsFar(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERGATHER: OnMsgPlayerGather(Msg); break;
|
||||
case int value when value == EC_MsgDef.MSG_HST_COOLTIMEDATA: OnMsgHstCoolTimeData(Msg); break;
|
||||
|
||||
case int value when value == EC_MsgDef.MSG_HST_SETCOOLTIME: OnMsgHstSetCoolTime(Msg); break;
|
||||
}
|
||||
|
||||
|
||||
@@ -522,8 +523,103 @@ namespace BrewMonster
|
||||
}*/
|
||||
}
|
||||
|
||||
private void OnMsgHstSetCoolTime(ECMSG Msg)
|
||||
{
|
||||
BMLogger.LogError("HoangDev : OnMsgHstSetCoolTime ");
|
||||
|
||||
cmd_set_cooldown pCmd = GPDataTypeHelper.FromBytes<cmd_set_cooldown>((byte[])Msg.dwParam1);
|
||||
|
||||
if (pCmd.cooldown_index < 0)
|
||||
{
|
||||
BMLogger.LogError("pCmd.cooldown_index >= 0 :" + (pCmd.cooldown_index >= 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if (pCmd.cooldown_index < (int)CoolTimeIndex.GP_CT_MAX)
|
||||
{
|
||||
COOLTIME ct = m_aCoolTimes[pCmd.cooldown_index];
|
||||
ct.iCurTime = pCmd.cooldown_time;
|
||||
ct.iMaxTime = pCmd.cooldown_time;
|
||||
Math.Min(ct.iCurTime, ct.iMaxTime);
|
||||
|
||||
if (pCmd.cooldown_index == (int)CoolTimeIndex.GP_CT_CAST_ELF_SKILL)
|
||||
{
|
||||
int i;
|
||||
// other goblin skills should be set public cool down, 1 second
|
||||
/* for (i = 0; i < m_aGoblinSkills.GetSize(); i++)
|
||||
{
|
||||
if (m_aGoblinSkills[i] && m_aGoblinSkills[i]->GetCoolingCnt() == 0)
|
||||
m_aGoblinSkills[i]->StartCooling(GetCoolTime(GP_CT_CAST_ELF_SKILL), GetCoolTime(GP_CT_CAST_ELF_SKILL));
|
||||
}*/
|
||||
|
||||
/* for (i = 0; i < m_aPsSkills.Count; i++)
|
||||
{
|
||||
CECSkill pSkill = GetPassiveSkillByIndex(i);
|
||||
if (pSkill && (pSkill->GetCommonCoolDown() & (1 << (pCmd->cooldown_index - GP_CT_SKILLCOMMONCOOLDOWN0))))
|
||||
pSkill->StartCooling(GetCoolTime(pCmd->cooldown_index), GetCoolTime(pCmd->cooldown_index));
|
||||
}*/
|
||||
}
|
||||
|
||||
if (pCmd.cooldown_index >= (int)CoolTimeIndex.GP_CT_SKILLCOMMONCOOLDOWN0 && pCmd.cooldown_index <= (int)CoolTimeIndex.GP_CT_SKILLCOMMONCOOLDOWN4)
|
||||
{
|
||||
// other player skills should be set public cool down too.
|
||||
uint mask = (uint)( 1 << (pCmd.cooldown_index - (int)CoolTimeIndex.GP_CT_SKILLCOMMONCOOLDOWN0));
|
||||
for (int i = 0; i < GetPositiveSkillNum(); i++)
|
||||
{
|
||||
CECSkill pSkill = GetPositiveSkillByIndex(i);
|
||||
int fakeRef = 0;
|
||||
if (pSkill != null && (pSkill.GetCommonCoolDown() & mask) != 0)
|
||||
pSkill.StartCooling(GetCoolTime(pCmd.cooldown_index,ref fakeRef), GetCoolTime(pCmd.cooldown_index, ref fakeRef));
|
||||
}
|
||||
/*const std::map<unsigned int, CECSkill*>&inherentSkillMap = CECComboSkillState::Instance().GetInherentSkillMap();
|
||||
std::map < unsigned int, CECSkill*>::const_iterator it;
|
||||
for (it = inherentSkillMap.begin(); it != inherentSkillMap.end(); ++it)
|
||||
{
|
||||
it->second->StartCooling(GetCoolTime(pCmd->cooldown_index), GetCoolTime(pCmd->cooldown_index));
|
||||
}*/
|
||||
}
|
||||
}
|
||||
else if (pCmd.cooldown_index > (int)CoolTimeIndex.GP_CT_SKILL_START)
|
||||
{
|
||||
int idSkill = pCmd.cooldown_index - (int)CoolTimeIndex.GP_CT_SKILL_START;
|
||||
|
||||
COOLTIME ct;
|
||||
if (!m_skillCoolTime.TryGetValue(idSkill, out ct))
|
||||
{
|
||||
// Key doesn't exist, create new entry
|
||||
ct = new COOLTIME();
|
||||
m_skillCoolTime[idSkill] = ct;
|
||||
}
|
||||
ct.iCurTime = pCmd.cooldown_time;
|
||||
ct.iMaxTime = pCmd.cooldown_time;
|
||||
Math.Clamp(ct.iCurTime, 0, ct.iMaxTime);
|
||||
|
||||
CECSkill pSkill = GetNormalSkill(idSkill);
|
||||
if (pSkill != null)
|
||||
{
|
||||
pSkill.StartCooling(pCmd.cooldown_time, pCmd.cooldown_time);
|
||||
}
|
||||
/* else if (pSkill = CECComboSkillState::Instance().GetInherentSkillByID(idSkill))
|
||||
{
|
||||
pSkill->StartCooling(pCmd->cooldown_time, pCmd->cooldown_time);
|
||||
}*/
|
||||
else if (GetEquipSkillByID(idSkill) == null)
|
||||
{
|
||||
BMLogger.LogError ("HoangDev: pSkill " + pSkill);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// This is a annoying assert and mean nothing, so we ignore it.
|
||||
// ASSERT(0);
|
||||
}
|
||||
|
||||
UpdateEquipSkillCoolDown(pCmd.cooldown_index);
|
||||
}
|
||||
|
||||
private void OnMsgHstCoolTimeData(ECMSG Msg)
|
||||
{
|
||||
BMLogger.LogError("HoangDev : OnMsgHstCoolTimeData ");
|
||||
cmd_cooltime_data pCmd = default;
|
||||
var data = (byte[])Msg.dwParam1;
|
||||
pCmd.count = GPDataTypeHelper.FromBytes<ushort>(data, 0);
|
||||
@@ -653,7 +749,6 @@ namespace BrewMonster
|
||||
// 对目标对象施法
|
||||
cmd_object_cast_skill pCmd =
|
||||
GPDataTypeHelper.FromBytes<cmd_object_cast_skill>((byte[])Msg.dwParam1);
|
||||
BMLogger.LogError("pCmd.caster == m_PlayerInfo.cid =" + (pCmd.caster == m_PlayerInfo.cid));
|
||||
|
||||
if (m_pCurSkill != null)
|
||||
{
|
||||
@@ -718,7 +813,6 @@ namespace BrewMonster
|
||||
|
||||
if (m_pCurSkill != null && m_pCurSkill.IsDurative())
|
||||
m_bSpellDSkill = true;
|
||||
Debug.Log($"SKILL_PERFORM)");
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2822,7 +2916,6 @@ namespace BrewMonster
|
||||
float fMaxCut = 1.0f)
|
||||
{
|
||||
float fDist = A3d_Magnitude(vTargetPos - vHostPos);
|
||||
BMLogger.LogError($"CanTouchTarget iReason={iReason} , m_pPrepSkill={m_pPrepSkill}");
|
||||
switch (iReason)
|
||||
{
|
||||
case 1: // melee
|
||||
@@ -2853,7 +2946,6 @@ namespace BrewMonster
|
||||
|
||||
//TODO : Check this function GetCastRange
|
||||
float fRange = m_pPrepSkill.GetCastRange(m_ExtProps.ak.AttackRange, GetPrayDistancePlus());
|
||||
BMLogger.LogError($"HoangDev: CanTouchTarget fDist= {fDist}, fRange={fRange}, fDist - fTargetRad={fDist - fTargetRad}, m_ExtProps.ak.AttackRange ={m_ExtProps.ak.AttackRange}, GetPrayDistancePlus()={GetPrayDistancePlus()}");
|
||||
|
||||
if (fRange > 0.0f)
|
||||
{
|
||||
@@ -5243,7 +5335,7 @@ namespace BrewMonster
|
||||
// Is gathering resources
|
||||
public bool IsGathering()
|
||||
{
|
||||
if(m_pWorkMan == null) return false;
|
||||
if (m_pWorkMan == null) return false;
|
||||
CECHPWork pWork = m_pWorkMan.GetRunningWork(Host_work_ID.WORK_PICKUP);
|
||||
if (pWork != null)
|
||||
return ((EC_HPWorkPick)pWork).IsGather();
|
||||
|
||||
@@ -21,19 +21,20 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
[SerializeField] private DialogScriptTableObject dialogResouce;
|
||||
[SerializeField] private Canvas canvasDlg;
|
||||
|
||||
[SerializeField] private CdlgQuickBar cDlgQuickBar;
|
||||
[SerializeField] private Button skillButton;
|
||||
[SerializeField] private Button btnSecondClick; // Button for second-click action (attack/move to NPC)
|
||||
[SerializeField] private CDlgQuickBar cDlgQuickBar;
|
||||
[SerializeField] private Button btnSecondClick;
|
||||
[SerializeField] CDlgQuickBar m_pDlgQuickBar1;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
EventBus.Subscribe<CECHostPlayer.NPCINFO>(ShowUINPC);
|
||||
EventBus.Subscribe<NPCDiedEvent>(TryHideUINPC);
|
||||
|
||||
|
||||
gameUI = new CECGameUIMan();
|
||||
gameUI.SetDependency(dialogResouce, canvasDlg);
|
||||
gameUI.Init();
|
||||
|
||||
|
||||
// Wire up second-click button / 连接第二次点击按钮
|
||||
if (btnSecondClick != null)
|
||||
{
|
||||
@@ -42,6 +43,11 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
|
||||
ShowUI("Win_Hpmpxp");
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (m_pDlgQuickBar1 != null)
|
||||
{ m_pDlgQuickBar1.UpdateShortcuts(); }
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
@@ -57,11 +63,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
npsUI.SetHealthImage((float)obj.CurrentHealth / (float)obj.MaxHealth);
|
||||
currentTargetNPCID = obj.IDNPC;
|
||||
}
|
||||
public void SetSkillButton()
|
||||
{
|
||||
|
||||
}
|
||||
public CdlgQuickBar GetCDlgQuickBar()
|
||||
public CDlgQuickBar GetCDlgQuickBar()
|
||||
{
|
||||
return cDlgQuickBar;
|
||||
}
|
||||
@@ -88,7 +90,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
return;
|
||||
|
||||
var type = FindTypeByName(componentName);
|
||||
|
||||
|
||||
if (TryShowCachedUI(type)) return;
|
||||
if (FindUIByName(componentName, type)) return;
|
||||
if (FindUIByType(type)) return;
|
||||
@@ -119,7 +121,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
{
|
||||
var type = assembly.GetType(componentName);
|
||||
if (type != null) return type;
|
||||
|
||||
|
||||
foreach (var prefix in namespacePrefixes)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prefix)) continue;
|
||||
@@ -157,7 +159,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ActivateAndCacheUI(child.gameObject, type);
|
||||
return true;
|
||||
}
|
||||
@@ -167,7 +169,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
private bool FindUIByType(System.Type type)
|
||||
{
|
||||
if (type == null) return false;
|
||||
|
||||
|
||||
var foundComponent = canvasDlg.GetComponentInChildren(type, true);
|
||||
if (foundComponent != null)
|
||||
{
|
||||
@@ -234,7 +236,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
{
|
||||
return currentTargetNPCID;
|
||||
}
|
||||
|
||||
|
||||
//todo: change this code to other place
|
||||
private int slot = 0;
|
||||
public void OnClickedWaveHand()
|
||||
|
||||
+9
-221
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user