Esempio n. 1
0
    public void SetCurStateSkillList()
    {
        SortedDictionary <int, uint> tempDic = null;

        if (CurState == SkillSettingState.StateOne)
        {
            tempDic = stateOneDic;
        }
        else if (CurState == SkillSettingState.StateTwo)
        {
            tempDic = stateTwoDic;
        }
        List <uint> skillIDList = new List <uint>();

        var iter = tempDic.GetEnumerator();

        while (iter.MoveNext())
        {
            var dic = iter.Current;
            if (dic.Value != 0)
            {
                if (m_autoFightSkillStatus.ContainsKey(dic.Value))
                {
                    if (m_autoFightSkillStatus[dic.Value] == 1)
                    {
                        skillIDList.Add(dic.Value);
                    }
                }
            }
        }
        //  skillIDList.Reverse();
        uint commonSkillID = GetCommonSkillIDByJob();

        skillIDList.Insert(0, commonSkillID);
        ISkillPart skillPart = Protocol.SkillHelper.GetMainPlayerSkillPart();

        if (skillPart != null)
        {
            skillPart.SetCurStateList(skillIDList);
        }

        Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.SKILLSYSTEM_SKILLLISTCHANE, (int)CurState);
    }