ui upgrade processing
This commit is contained in:
@@ -159,6 +159,8 @@ namespace BrewMonster.Managers
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -394,11 +394,6 @@ namespace BrewMonster
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetRequiredLevel() : 0;
|
||||
}
|
||||
|
||||
public int GetRequiredSp()
|
||||
{
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetRequiredSp() : 0;
|
||||
}
|
||||
|
||||
public int GetRequiredBook()
|
||||
{
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetRequiredBook() : 0;
|
||||
@@ -409,11 +404,6 @@ namespace BrewMonster
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetRequiredSkill() : new SkillArrayWrapper(new List<SkillArrayWrapper.IDLevelPair>());
|
||||
}*/
|
||||
|
||||
public int GetRequiredMoney()
|
||||
{
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetRequiredMoney() : 0;
|
||||
}
|
||||
|
||||
/* public int GetRequiredItem()
|
||||
{
|
||||
return m_pSkillCore != null ? m_pSkillCore.GetItemCost() : 0;
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
|
||||
set => instance = value;
|
||||
}
|
||||
ElementSkill s = null;
|
||||
Dictionary<int, ElementSkill> m_allProfSkills = new Dictionary<int, ElementSkill>();
|
||||
Dictionary<int, List<int>> m_allRankProfSkills = new Dictionary<int, List<int>>();
|
||||
private HashSet<int> m_allProfNPCs = new HashSet<int>();
|
||||
@@ -42,7 +43,32 @@ namespace BrewMonster.Scripts.Skills
|
||||
{
|
||||
return m_allRankProfSkills;
|
||||
}
|
||||
|
||||
public enumSkillLearnedState GetSkillLearnedState(int skillID)
|
||||
{
|
||||
CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID);
|
||||
if (pSkill != null)
|
||||
{
|
||||
if (pSkill.GetSkillLevel() < pSkill.GetMaxLevel())
|
||||
{
|
||||
return enumSkillLearnedState.SKILL_LEARNED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return enumSkillLearnedState.SKILL_FULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElementSkill.IsOverridden((uint)skillID))
|
||||
{
|
||||
return enumSkillLearnedState.SKILL_OVERRIDDEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
return enumSkillLearnedState.SKILL_NOT_LEARNED;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Initialize()
|
||||
{
|
||||
// Çå¿ÕËùÓм¼ÄÜ£¬·ÀÖ¹ÒòΪ¶à¸ö½ÇÉ«µÇ¼µ¼ÖÂÖØ¸´¼ÓÔØ¼¼ÄÜ
|
||||
@@ -151,6 +177,66 @@ namespace BrewMonster.Scripts.Skills
|
||||
m_curServiceSkills.Add(skillId);
|
||||
}
|
||||
}
|
||||
public enumSkillFitLevelState GetSkillFitLevel(int skillID)
|
||||
{
|
||||
if (!m_allProfSkills.ContainsKey(skillID))
|
||||
{
|
||||
BMLogger.LogError("skillID not exist in m_allProfSkills");
|
||||
return default;
|
||||
}
|
||||
int maxLevel = CECGameRun.Instance.GetHostPlayer().GetMaxLevelSofar();
|
||||
int rank = CECGameRun.Instance.GetHostPlayer().GetBasicProps().iLevel2;
|
||||
int realmLevel = CECGameRun.Instance.GetHostPlayer().GetRealmLevel();
|
||||
|
||||
return GetSkillFitLevel(skillID, maxLevel, rank, realmLevel);
|
||||
}
|
||||
enumSkillFitLevelState GetSkillFitLevel(int skillID, int maxLevel, int rank, int realmLevel)
|
||||
{
|
||||
if (!m_allProfSkills.ContainsKey(skillID))
|
||||
{
|
||||
BMLogger.LogError("skillID not exist in m_allProfSkills");
|
||||
return default;
|
||||
}
|
||||
|
||||
int skillLevel = 1; //½«ÒªÑ§Ï°µÄ¼¼Äܼ¶±ð
|
||||
CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID);
|
||||
if (pSkill != null)
|
||||
{
|
||||
skillLevel = pSkill.GetSkillLevel() + 1;
|
||||
if (skillLevel > pSkill.GetMaxLevel())
|
||||
{
|
||||
return enumSkillFitLevelState.SKILL_NOT_FIT_LEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
s = ElementSkill.Create((uint)skillID, skillLevel);
|
||||
|
||||
if (s.GetRequiredLevel() > maxLevel)
|
||||
{
|
||||
return enumSkillFitLevelState.SKILL_NOT_FIT_LEVEL;
|
||||
}
|
||||
// ÐÞÕæµÈ¼¶²»¹»
|
||||
CECTaoistRank curTaoistRank = CECTaoistRank.GetTaoistRank(rank);
|
||||
CECTaoistRank reqTaoistRank = CECTaoistRank.GetTaoistRank(s.GetRank());
|
||||
if ((curTaoistRank.IsEvilRank() && reqTaoistRank.IsGodRank()) ||
|
||||
(curTaoistRank.IsGodRank() && reqTaoistRank.IsEvilRank()) ||
|
||||
(curTaoistRank.GetID() < reqTaoistRank.GetID()))
|
||||
{
|
||||
return enumSkillFitLevelState.SKILL_NOT_FIT_LEVEL;
|
||||
}
|
||||
// ¾³½ç²»¹»
|
||||
if (s.GetRequiredRealmLevel() > realmLevel)
|
||||
{
|
||||
return enumSkillFitLevelState.SKILL_NOT_FIT_LEVEL;
|
||||
}
|
||||
|
||||
return enumSkillFitLevelState.SKILL_FIT_LEVEL;
|
||||
}
|
||||
public int GetRequiredBook(int skillID, int level)
|
||||
{
|
||||
int itemId = ElementSkill.GetRequiredBook((uint)skillID, level);
|
||||
return itemId;
|
||||
}
|
||||
public void RecvNPCServiceList(Octets Data)
|
||||
{
|
||||
m_npcListData = Data;
|
||||
@@ -170,6 +256,24 @@ namespace BrewMonster.Scripts.Skills
|
||||
InitializeRootOfSkillTree(rootSkillID);
|
||||
}
|
||||
}
|
||||
public int GetSkillCurrentLevel(int skillID)
|
||||
{
|
||||
if (!m_allProfSkills.ContainsKey(skillID))
|
||||
{
|
||||
BMLogger.LogError("skillID not exist in m_allProfSkills");
|
||||
return 0;
|
||||
}
|
||||
|
||||
CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID);
|
||||
if (pSkill != null)
|
||||
{
|
||||
return pSkill.GetSkillLevel();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
private void InitializeRootOfSkillTree(int rootSkillID)
|
||||
{
|
||||
var skillRootMap = GetSkillRootMap(rootSkillID);
|
||||
@@ -229,7 +333,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
{
|
||||
if (!m_allProfSkills.TryGetValue(skillID, out var skill))
|
||||
{
|
||||
throw new Exception($"Skill {skillID} not found in m_allProfSkills");
|
||||
BMLogger.LogError($"Skill {skillID} not found in m_allProfSkills");
|
||||
}
|
||||
|
||||
var juniors = skill.GetJunior();
|
||||
@@ -400,6 +504,61 @@ namespace BrewMonster.Scripts.Skills
|
||||
CECSkill skill = new CECSkill(skillID, 1);
|
||||
return (skill.GetNameDisplay());
|
||||
}
|
||||
public bool CheckPreItem(int itemID)
|
||||
{
|
||||
return CECGameRun.Instance.GetHostPlayer().GetPack().FindItem(itemID) != -1;
|
||||
}
|
||||
public bool IsSkillServedByNPC(int skillID)
|
||||
{
|
||||
return m_curServiceSkills.Contains(skillID);
|
||||
}
|
||||
public int GetSkillSp(int skillID, int level)
|
||||
{
|
||||
if (!m_allProfSkills.ContainsKey(skillID))
|
||||
{
|
||||
BMLogger.LogError("skillID not exist in m_allProfSkills");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ElementSkill.GetRequiredSp((uint)skillID, level);
|
||||
}
|
||||
public int GetSkillMoney(int skillID, int level)
|
||||
{
|
||||
if (!m_allProfSkills.ContainsKey(skillID))
|
||||
{
|
||||
BMLogger.LogError("skillID not exist in m_allProfSkills");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ElementSkill.GetRequiredMoney((uint)skillID, level);
|
||||
}
|
||||
public Dictionary<uint, int> GetRequiredSkill(int skillID, int level)
|
||||
{
|
||||
Dictionary<uint, int> requiredSkill = new();
|
||||
|
||||
ElementSkill s = ElementSkill.Create((uint)skillID, level);
|
||||
// giả định GetRequiredSkill() trả về List<KeyValuePair<uint,int>> hoặc IReadOnlyList<...>
|
||||
Dictionary<uint, int> skills = s.GetRequiredSkill();
|
||||
|
||||
foreach(var skill in skills)
|
||||
{
|
||||
if (skill.Key != 0)
|
||||
{
|
||||
requiredSkill.Add(skill.Key, skill.Value);
|
||||
}
|
||||
}
|
||||
|
||||
return requiredSkill;
|
||||
}
|
||||
public bool CheckPreSkillLevel(int skillID, int level)
|
||||
{
|
||||
if (GetSkillLearnedState(skillID) == enumSkillLearnedState.SKILL_OVERRIDDEN)
|
||||
{
|
||||
// Èç¹û¸ÃǰÌá¼¼Äܱ»¸²¸Ç£¬ÔòǰÌá¼¼ÄÜÒ»¶¨Âú×ã
|
||||
return true;
|
||||
}
|
||||
return GetSkillCurrentLevel(skillID) >= level;
|
||||
}
|
||||
}
|
||||
|
||||
public enum enumSkillFitLevelState
|
||||
|
||||
@@ -133,6 +133,7 @@ namespace BrewMonster.Scripts.Skills
|
||||
public const byte FORM_BEASTIE = 2; //������
|
||||
|
||||
static SkillStub s;
|
||||
static Skill skill;
|
||||
|
||||
public static uint NextSkill(uint id = 0)
|
||||
{
|
||||
@@ -218,11 +219,27 @@ namespace BrewMonster.Scripts.Skills
|
||||
// ѧϰn������Ҫ�����Ҽ���
|
||||
public virtual int GetRequiredLevel() { return 0; }
|
||||
// ѧϰn��������Ҫ�ļ��ܵ�
|
||||
public virtual int GetRequiredSp() { return 0; }
|
||||
public static int GetRequiredSp(uint id, int level)
|
||||
{
|
||||
skill = Skill.Create(id, level);
|
||||
if (skill == null)
|
||||
return 0;
|
||||
|
||||
int ret = skill.GetRequiredSp();
|
||||
return ret;
|
||||
}
|
||||
// ѧϰn����Ҫ�ļ�����
|
||||
public virtual int GetRequiredBook() { return 0; }
|
||||
// ѧϰ��Ҫ��Ǯ
|
||||
public virtual int GetRequiredMoney() { return 0; }
|
||||
public static int GetRequiredBook(uint id, int level)
|
||||
{
|
||||
skill = Skill.Create(id, level);
|
||||
if (skill == null)
|
||||
return 0;
|
||||
|
||||
int ret = skill.GetRequiredBook();
|
||||
return ret;
|
||||
}
|
||||
// ѧϰ����ȼ�?
|
||||
public virtual int GetRequiredRealmLevel() { return 0; }
|
||||
// ǰ�Ἴ��
|
||||
@@ -313,5 +330,14 @@ namespace BrewMonster.Scripts.Skills
|
||||
}
|
||||
public virtual byte GetAllowForms() { return 0; }
|
||||
public virtual bool Interrupt() { return true; }
|
||||
public static int GetRequiredMoney(uint id, int level)
|
||||
{
|
||||
skill = Skill.Create(id, level);
|
||||
if (skill == null)
|
||||
return 0;
|
||||
|
||||
int ret = skill.GetRequiredMoney();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,6 +121,9 @@ namespace BrewMonster.Scripts.Skills
|
||||
return stub.GetPraydistance(this);
|
||||
}
|
||||
public override int GetCoolingTime() { return stub.GetCoolingtime(this); }
|
||||
public int GetRequiredSp() { return stub.GetRequiredSp(this); }
|
||||
public int GetRequiredMoney() { return stub.GetRequiredMoney(this); }
|
||||
public override Dictionary<uint, int> GetRequiredSkill() { return stub.pre_skills; }
|
||||
|
||||
}
|
||||
|
||||
@@ -196,16 +199,16 @@ namespace BrewMonster.Scripts.Skills
|
||||
|
||||
public static Dictionary<uint, List<uint>> inheritSkillMap = new Dictionary<uint, List<uint>>();
|
||||
|
||||
/*#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void OnPlay()
|
||||
{
|
||||
BMLogger.LogError("SkillStub OnPlay Reset");
|
||||
map = new Dictionary<uint, SkillStub>();
|
||||
comboSkillMap = new Dictionary<uint, List<uint>>();
|
||||
inheritSkillMap = new Dictionary<uint, List<uint>>();
|
||||
}
|
||||
#endif*/
|
||||
/*#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
private static void OnPlay()
|
||||
{
|
||||
BMLogger.LogError("SkillStub OnPlay Reset");
|
||||
map = new Dictionary<uint, SkillStub>();
|
||||
comboSkillMap = new Dictionary<uint, List<uint>>();
|
||||
inheritSkillMap = new Dictionary<uint, List<uint>>();
|
||||
}
|
||||
#endif*/
|
||||
public SkillStub(uint i)
|
||||
{
|
||||
id = i;
|
||||
|
||||
@@ -166,3 +166,5 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -167,3 +167,5 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -98,3 +98,5 @@ namespace BrewMonster
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -163,7 +163,6 @@ namespace BrewMonster.UI
|
||||
taoistRank != CECTaoistRank.GetBaseRankEnd();
|
||||
taoistRank = taoistRank.GetNext())
|
||||
{
|
||||
BMLogger.LogError("CDlgSkillSubList::ResetDialog: Adding GetBaseRankBegin rank " + taoistRank.GetID());
|
||||
AddDlgsOfOneRank(taoistRank);
|
||||
}
|
||||
|
||||
@@ -171,8 +170,6 @@ namespace BrewMonster.UI
|
||||
taoistRank != CECTaoistRank.GetGodRankEnd();
|
||||
taoistRank = taoistRank.GetNext())
|
||||
{
|
||||
BMLogger.LogError("CDlgSkillSubList::ResetDialog: Adding GetGodRankBegin rank " + taoistRank.GetID());
|
||||
|
||||
AddDlgsOfOneRank(taoistRank);
|
||||
}
|
||||
|
||||
@@ -180,8 +177,6 @@ namespace BrewMonster.UI
|
||||
taoistRank != CECTaoistRank.GetEvilRankEnd();
|
||||
taoistRank = taoistRank.GetNext())
|
||||
{
|
||||
BMLogger.LogError("CDlgSkillSubList::ResetDialog: Adding GetEvilRankBegin rank " + taoistRank.GetID());
|
||||
|
||||
AddDlgsOfOneRank(taoistRank);
|
||||
}
|
||||
|
||||
@@ -271,24 +266,24 @@ namespace BrewMonster.UI
|
||||
|
||||
if (allRankProfSkills == null)
|
||||
{
|
||||
BMLogger.LogError("HoangDev: AddDlgsOfOneRank allRankProfSkills is null");
|
||||
//BMLogger.LogError("HoangDev: AddDlgsOfOneRank allRankProfSkills is null");
|
||||
return;
|
||||
}
|
||||
if (IsEvil() && taoistRank.IsGodRank())
|
||||
{
|
||||
BMLogger.LogError("HoangDev: AddDlgsOfOneRank IsEvil() && taoistRank.IsGodRank()");
|
||||
//BMLogger.LogError("HoangDev: AddDlgsOfOneRank IsEvil() && taoistRank.IsGodRank()");
|
||||
return;
|
||||
}
|
||||
else if (!IsEvil() && taoistRank.IsEvilRank())
|
||||
{
|
||||
BMLogger.LogError("HoangDev: AddDlgsOfOneRank !IsEvil() && taoistRank.IsEvilRank()");
|
||||
//BMLogger.LogError("HoangDev: AddDlgsOfOneRank !IsEvil() && taoistRank.IsEvilRank()");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!allRankProfSkills.TryGetValue(rankID, out var rankItr) || rankItr == null || rankItr.Count == 0)
|
||||
{
|
||||
BMLogger.LogError("HoangDev: AddDlgsOfOneRank !allRankProfSkills.TryGetValue(rankID, out var rankItr) || rankItr == null || rankItr.Count == 0");
|
||||
//BMLogger.LogError($"HoangDev: AddDlgsOfOneRank !allRankProfSkills.TryGetValue({rankID}, out var rankItr) || rankItr == null || rankItr.Count == 0");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,22 @@ namespace BrewMonster
|
||||
[SerializeField] private TextMeshProUGUI m_skillNameLbl;
|
||||
[SerializeField] private Image skillIcon;
|
||||
[SerializeField] private GameObject m_highlight;
|
||||
[SerializeField] private Button m_upgradeBtn;
|
||||
|
||||
private int m_skillID;
|
||||
private int m_curLevel;
|
||||
|
||||
private const string l_colorWhite = "<color=#ffffff>";
|
||||
private const string l_colorRed = "<color=#ff0000>";
|
||||
private const string l_colorClose = "</color>";
|
||||
|
||||
public void UpdateSkill(int skillID)
|
||||
{
|
||||
CECHostSkillModel model = CECHostSkillModel.Instance;
|
||||
m_skillID = skillID;
|
||||
m_curLevel = model.GetSkillCurrentLevel(m_skillID);
|
||||
enumSkillLearnedState learnedState = model.GetSkillLearnedState(m_skillID);
|
||||
|
||||
var spriteName = model.GetSkillIcon(skillID);
|
||||
var sprites = Resources.LoadAll<Sprite>("iconlist_skill_multisprite");
|
||||
if (sprites == null || sprites.Length == 0)
|
||||
@@ -33,8 +43,20 @@ namespace BrewMonster
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (enumSkillLearnedState.SKILL_NOT_LEARNED == learnedState)
|
||||
{
|
||||
skillIcon.color = Color.gray;
|
||||
/* skillDsc = model.GetSkillDescription(m_skillID, 1);
|
||||
reqLevel = GNET::ElementSkill::GetRequiredLevel(m_skillID, 1);
|
||||
reqRealmLevel = GNET::ElementSkill::GetRequiredRealmLevel(m_skillID, 1);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/* skillDsc = model.GetSkillDescription(m_skillID, m_curLevel);
|
||||
reqLevel = GNET::ElementSkill::GetRequiredLevel(m_skillID, m_curLevel);
|
||||
reqRealmLevel = GNET::ElementSkill::GetRequiredRealmLevel(m_skillID, m_curLevel);*/
|
||||
}
|
||||
|
||||
m_skillID = skillID;
|
||||
string skillName = model.GetSkillName(m_skillID);
|
||||
/* if (model.IsPassiveSkill(m_skillID))
|
||||
{
|
||||
@@ -45,6 +67,96 @@ namespace BrewMonster
|
||||
BMLogger.LogError("HoangDev: CDlgSkillSubListItem m_skillNameLbl is null for skillID " + skillID);
|
||||
}
|
||||
m_skillNameLbl.text = skillName;
|
||||
|
||||
UpdateUpgradeBtn();
|
||||
}
|
||||
|
||||
private void UpdateUpgradeBtn()
|
||||
{
|
||||
CECHostSkillModel model = CECHostSkillModel.Instance;
|
||||
enumSkillFitLevelState fitLevel = model.GetSkillFitLevel(m_skillID);
|
||||
enumSkillLearnedState learnedState = model.GetSkillLearnedState(m_skillID);
|
||||
|
||||
int requiredItem = model.GetRequiredBook(m_skillID, m_curLevel + 1);
|
||||
if (enumSkillLearnedState.SKILL_FULL != learnedState &&
|
||||
enumSkillFitLevelState.SKILL_FIT_LEVEL == fitLevel &&
|
||||
(requiredItem == 0 || model.CheckPreItem(requiredItem)))
|
||||
{
|
||||
m_upgradeBtn.gameObject.SetActive(true);
|
||||
string str;
|
||||
if (model.IsSkillServedByNPC(m_skillID))
|
||||
{
|
||||
int needSp = model.GetSkillSp(m_skillID, m_curLevel + 1);
|
||||
int needMoney = model.GetSkillMoney(m_skillID, m_curLevel + 1);
|
||||
|
||||
int curSp = GetHostPlayer().GetBasicProps().iSP;
|
||||
int curMoney = GetHostPlayer().GetMoneyAmount();
|
||||
|
||||
bool spOK = curSp >= needSp;
|
||||
bool moneyOK = curMoney >= needMoney;
|
||||
bool preSkillOK = true;
|
||||
|
||||
var requiredSkill = model.GetRequiredSkill(m_skillID, m_curLevel + 1);
|
||||
foreach (var skill in requiredSkill)
|
||||
{
|
||||
if (!model.CheckPreSkillLevel((int)skill.Key, skill.Value))
|
||||
{
|
||||
preSkillOK = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (spOK && moneyOK && preSkillOK)
|
||||
{
|
||||
m_upgradeBtn.interactable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_upgradeBtn.interactable = (false);
|
||||
}
|
||||
|
||||
/*string strSp;
|
||||
string strMoney;
|
||||
string strPreSkill = "";
|
||||
strSp = string.Format(GetStringFromTable(11402), needSp);
|
||||
strMoney = string.Format(GetStringFromTable(11403), needMoney);
|
||||
|
||||
if (spOK)
|
||||
{
|
||||
strSp = l_colorWhite + strSp + l_colorClose;
|
||||
}
|
||||
else
|
||||
{
|
||||
strSp = l_colorRed + strSp + l_colorClose;
|
||||
}
|
||||
if (moneyOK)
|
||||
{
|
||||
strMoney = l_colorWhite + strMoney + l_colorClose;
|
||||
}
|
||||
else
|
||||
{
|
||||
strMoney = l_colorRed + strMoney + l_colorClose;
|
||||
}
|
||||
if (!preSkillOK)
|
||||
{
|
||||
strPreSkill = GetStringFromTable(11404);
|
||||
}*/
|
||||
|
||||
// Set tooltip/hint for the button
|
||||
// m_upgradeBtn.SetHint(strSp + strMoney + strPreSkill);
|
||||
// Note: Unity doesn't have SetHint, you may need to implement tooltip system
|
||||
}
|
||||
else
|
||||
{
|
||||
str = string.Format(GetStringFromTable(11321));
|
||||
// m_upgradeBtn.SetHint(str);
|
||||
m_upgradeBtn.interactable = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_upgradeBtn.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetHighlight(bool bHighlight)
|
||||
@@ -71,5 +183,19 @@ namespace BrewMonster
|
||||
{
|
||||
return m_skillID;
|
||||
}
|
||||
|
||||
private CECHostPlayer GetHostPlayer()
|
||||
{
|
||||
// TODO: Implement this method to return the current host player
|
||||
// This should return the local player instance
|
||||
return CECGameRun.Instance.GetHostPlayer();
|
||||
}
|
||||
|
||||
private string GetStringFromTable(int id)
|
||||
{
|
||||
// TODO: Implement this method to get localized strings
|
||||
// This should look up the string ID in your localization system
|
||||
return $"String_{id}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2079,9 +2079,9 @@ RectTransform:
|
||||
- {fileID: 4504331075840543341}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 108.9562, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
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: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468.781, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6741821173640675138
|
||||
@@ -7867,9 +7867,9 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3016923604946316301}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 83.16, y: -48.51895}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 166.32, y: 97.0379}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &821733676846102905
|
||||
@@ -7943,9 +7943,9 @@ RectTransform:
|
||||
- {fileID: 4351609655079222131}
|
||||
m_Father: {fileID: 2825516843822704547}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 167.0151, y: -22.62375}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 334.0302, y: 45.2475}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5645061043433811765
|
||||
@@ -10283,9 +10283,9 @@ RectTransform:
|
||||
- {fileID: 3703262150164293383}
|
||||
m_Father: {fileID: 3016923604946316301}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 83.16, y: -292.4765}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 166.32, y: 130.2924}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5150156580756960231
|
||||
@@ -11532,9 +11532,9 @@ RectTransform:
|
||||
- {fileID: 131742873718785436}
|
||||
m_Father: {fileID: 3016923604946316301}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 83.16, y: -162.18411}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 166.32, y: 130.2924}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5468634806808161123
|
||||
@@ -11633,7 +11633,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 358.8119, y: -105.62375}
|
||||
m_SizeDelta: {x: 685.6238, y: 155.2475}
|
||||
m_SizeDelta: {x: 685.6238, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4552529476466259825
|
||||
CanvasRenderer:
|
||||
@@ -11725,10 +11725,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7f3b136cb144656428e4764d58c18c52, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_subDialog: {fileID: 0}
|
||||
m_subDialog: {fileID: 7688900625148083785}
|
||||
m_rectTransform: {fileID: 2825516843822704547}
|
||||
levelName: {fileID: 0}
|
||||
label: {fileID: 0}
|
||||
label: {fileID: 708823501721075410}
|
||||
--- !u!1 &5403634742995450233
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -15374,6 +15373,126 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &7025810558559276645
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7084227105954184495}
|
||||
- component: {fileID: 4213342741137376170}
|
||||
- component: {fileID: 4115546771738916658}
|
||||
- component: {fileID: 2802100335901209485}
|
||||
m_Layer: 5
|
||||
m_Name: ButtonUpgrade
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &7084227105954184495
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7025810558559276645}
|
||||
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: 5330897987501731450}
|
||||
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: 293, y: -5}
|
||||
m_SizeDelta: {x: 61.9908, y: 41.9938}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4213342741137376170
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7025810558559276645}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4115546771738916658
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7025810558559276645}
|
||||
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: 9de07872267c5419b9fa9c849eb45858, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &2802100335901209485
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7025810558559276645}
|
||||
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: 4115546771738916658}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &7127928585978759580
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -17691,7 +17810,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -361.27, y: 365.44547}
|
||||
m_SizeDelta: {x: 722.5344, y: 28}
|
||||
m_SizeDelta: {x: 722.5344, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &7853130943468561016
|
||||
CanvasRenderer:
|
||||
@@ -17783,9 +17902,10 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7304a7aa2183ad34babf66894ed22f7e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_pSubRank: {fileID: 0}
|
||||
m_pSubSkill: {fileID: 0}
|
||||
m_contentRoot: {fileID: 0}
|
||||
m_pSubRank: {fileID: 1851903413579782982}
|
||||
m_pSubSkill: {fileID: 7688900625148083785}
|
||||
m_contentRoot: {fileID: 8302858527499935758}
|
||||
m_contentRootSkill: {fileID: 0}
|
||||
m_scrollRect: {fileID: 0}
|
||||
m_windowScale: 1
|
||||
m_isEvil: 0
|
||||
@@ -17803,7 +17923,6 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_subDialog: {fileID: 0}
|
||||
m_rectTransform: {fileID: 8302858527499935758}
|
||||
levelName: {fileID: 0}
|
||||
label: {fileID: 0}
|
||||
--- !u!1 &7758409605357852732
|
||||
GameObject:
|
||||
@@ -17962,11 +18081,12 @@ RectTransform:
|
||||
- {fileID: 2021305536316673845}
|
||||
- {fileID: 8723418028367828956}
|
||||
- {fileID: 187116969457634403}
|
||||
- {fileID: 7084227105954184495}
|
||||
m_Father: {fileID: 2825516843822704547}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 342.81, y: -105.2475}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 685.62, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &114056069577405476
|
||||
@@ -17990,7 +18110,9 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_skillNameLbl: {fileID: 7381636566794381957}
|
||||
skillIcon: {fileID: 3801278460223427377}
|
||||
m_highlight: {fileID: 0}
|
||||
m_upgradeBtn: {fileID: 2802100335901209485}
|
||||
--- !u!114 &536870940929799852
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -19005,9 +19127,9 @@ RectTransform:
|
||||
- {fileID: 911293677621153352}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 288.8686, y: -31.05}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
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:f1c7c2f54da2207fe41ea64bd4b5814e99693a795628f4794b6c01afcc0581f3
|
||||
size 200777986
|
||||
oid sha256:de7c8f573d6ad6e246dfeceb6e737fc633f584a9bb0a06b95c7bbf2dcef42925
|
||||
size 200767622
|
||||
|
||||
@@ -89,6 +89,8 @@ namespace BrewMonster
|
||||
private CECSkill m_pTargetItemSkill; // Target item skill
|
||||
public CECComboSkill m_pComboSkill; // Combo skill
|
||||
public A3DVECTOR3 m_vAccel; // Accelerate\
|
||||
public byte m_RealmLevel;
|
||||
REINCARNATION_TOME m_ReincarnationTome; // תÉú
|
||||
|
||||
private CECCounter m_IncantCnt;
|
||||
private bool m_bMelee;
|
||||
@@ -118,7 +120,7 @@ namespace BrewMonster
|
||||
// ID of summon player skill
|
||||
const int ID_SUMMONPLAYER_SKILL = 1824;
|
||||
|
||||
private CECAutoTeam m_pAutoTeam;
|
||||
private CECAutoTeam m_pAutoTeam;
|
||||
|
||||
// ====== Ground cast config ======
|
||||
[Header("Ground Cast")]
|
||||
@@ -546,30 +548,30 @@ namespace BrewMonster
|
||||
{
|
||||
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_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));
|
||||
}*/
|
||||
/* 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));
|
||||
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));
|
||||
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;
|
||||
@@ -599,13 +601,13 @@ namespace BrewMonster
|
||||
{
|
||||
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 (pSkill = CECComboSkillState::Instance().GetInherentSkillByID(idSkill))
|
||||
{
|
||||
pSkill->StartCooling(pCmd->cooldown_time, pCmd->cooldown_time);
|
||||
}*/
|
||||
else if (GetEquipSkillByID(idSkill) == null)
|
||||
{
|
||||
BMLogger.LogError ("HoangDev: pSkill " + pSkill);
|
||||
BMLogger.LogError("HoangDev: pSkill " + pSkill);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2370,7 +2372,7 @@ namespace BrewMonster
|
||||
m_bEnterGame = false;
|
||||
}
|
||||
|
||||
CECSkill GetNormalSkill(int id, bool bSenior = false /* false */)
|
||||
public CECSkill GetNormalSkill(int id, bool bSenior = false /* false */)
|
||||
{
|
||||
CECSkill pSkill = null;
|
||||
if (ElementSkill.GetType((uint)id) == (byte)CECSkill.SkillType.TYPE_PASSIVE ||
|
||||
@@ -2526,13 +2528,13 @@ namespace BrewMonster
|
||||
}*/
|
||||
m_dwMoveRelDir = 0;
|
||||
if (!CanDo(ActionCanDo.CANDO_MOVETO)) return;
|
||||
if(joystick.Vertical > 0)
|
||||
if (joystick.Vertical > 0)
|
||||
{
|
||||
if(joystick.Horizontal > 0)
|
||||
if (joystick.Horizontal > 0)
|
||||
{
|
||||
m_dwMoveRelDir |= (uint)(MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_RIGHT);
|
||||
}
|
||||
else if(joystick.Horizontal < 0)
|
||||
else if (joystick.Horizontal < 0)
|
||||
{
|
||||
m_dwMoveRelDir |= (uint)(MOVE_DIR.MD_FORWARD | MOVE_DIR.MD_LEFT);
|
||||
}
|
||||
@@ -4043,6 +4045,7 @@ namespace BrewMonster
|
||||
|
||||
return null;
|
||||
}
|
||||
public int GetMaxLevelSofar() { return Math.Max(m_ReincarnationTome.max_level, m_BasicProps.iLevel); }
|
||||
|
||||
// C# conversion of CECHostPlayer::GetEquipSkillByID
|
||||
// Assumes: GetEquipSkillNum() returns the count of equipment skills
|
||||
@@ -5077,6 +5080,7 @@ namespace BrewMonster
|
||||
// }
|
||||
// UpdateMonsterSpiritGfx(dwDeltaTime);
|
||||
}
|
||||
public byte GetRealmLevel(){ return m_RealmLevel; }
|
||||
|
||||
// Level up
|
||||
public void LevelUp()
|
||||
@@ -5372,7 +5376,7 @@ namespace BrewMonster
|
||||
VertRayTrace(EC_Utility.ToVector3(vTestPos), ref vGndPos, ref m_GndInfo.vGndNormal, 1000f);
|
||||
m_GndInfo.fGndHei = vGndPos.y;
|
||||
|
||||
if(Physics.RaycastNonAlloc(EC_Utility.ToVector3(vTestPos), Vector3.down, hits, 1000f, 1<<8) > 0)
|
||||
if (Physics.RaycastNonAlloc(EC_Utility.ToVector3(vTestPos), Vector3.down, hits, 1000f, 1 << 8) > 0)
|
||||
{
|
||||
m_GndInfo.fWaterHei = hits[0].point.y;
|
||||
}
|
||||
@@ -5783,7 +5787,27 @@ namespace BrewMonster
|
||||
NameHostPlayer = name;
|
||||
}
|
||||
}
|
||||
|
||||
public struct REINCARNATION_TOME
|
||||
{
|
||||
public int tome_exp;
|
||||
public char tome_active; // 1¼¤»î0δ¼¤»î
|
||||
public int max_level; // ÀúÊ·×î¸ßµÈ¼¶
|
||||
cmd_reincarnation_tome_info._entry[] reincarnations;
|
||||
static int max_exp;
|
||||
};
|
||||
public struct cmd_reincarnation_tome_info
|
||||
{
|
||||
public int tome_exp;
|
||||
public char tome_active; // 1¼¤»î0δ¼¤»î
|
||||
public int count;
|
||||
public struct _entry
|
||||
{
|
||||
int level;
|
||||
int timestamp;
|
||||
int exp;
|
||||
}
|
||||
public _entry[] records;
|
||||
};
|
||||
// Behavior id used by CanDo()
|
||||
public static class ActionCanDo
|
||||
|
||||
@@ -5942,7 +5966,7 @@ namespace BrewMonster
|
||||
{
|
||||
// Get real time tick of this frame
|
||||
var iRealTime = EC_Game.GetRealTickTime();
|
||||
|
||||
|
||||
// Update flysword time
|
||||
/*if (IsFlying() && GetRushFlyFlag())
|
||||
{
|
||||
|
||||
+9
-881
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user