Exemple #1
0
    private static void msg_SCID_USER_SKILLS_NTF(int iMsgID, ref CMessage msg)
    {
        sdGameSkillMgr.Instance.Clear();
        CliProto.SC_USER_SKILLS_NTF refMSG = (CliProto.SC_USER_SKILLS_NTF)msg;
        sdGameSkillMgr.Instance.SetSkillPoint((int)refMSG.m_SkillPoint);
        sdGameSkillMgr.Instance.learnedPoint = (int)refMSG.m_TotalSkillTreePoint;
        int num = refMSG.m_Count;

        for (int i = 0; i < num; i++)
        {
            sdGameSkillMgr.Instance.CreateSkill((int)refMSG.m_SkillsInfo[i].m_SkillID, (int)refMSG.m_SkillsInfo[i].m_CooldownTime);
        }
        sdGlobalDatabase.Instance.globalData["MainCharSkillInfo"] = sdGameSkillMgr.Instance.GetSkillList();
        if (sdGameLevel.instance != null)
        {
            GameObject wnd = sdGameLevel.instance.NGUIRoot;
            if (wnd)
            {
                sdSkillWnd skill = wnd.GetComponentInChildren <sdSkillWnd>();
                if (skill != null)
                {
                    skill.Refresh();
                }
            }
            if (sdGameLevel.instance.mainChar != null)
            {
                sdGameLevel.instance.mainChar.SetSkillInfo(sdGlobalDatabase.Instance.globalData["MainCharSkillInfo"] as Hashtable);
            }
        }
    }
Exemple #2
0
    // 创建角色技能属性表aa
    protected Hashtable CreateSkillPropertyTable(CliProto.SC_USER_SKILLS_NTF kSkillInfoNtf)
    {
        Hashtable kTable = new Hashtable();

        for (int i = 0; i < kSkillInfoNtf.m_Count; ++i)
        {
            CliProto.SSkillInfo kSkillInfo = kSkillInfoNtf.m_SkillsInfo[i];
            kTable[(int)kSkillInfo.m_SkillID] = sdGameSkillMgr.CreateSkill((int)kSkillInfo.m_SkillID);
        }

        return(kTable);
    }