public uint Execute(PacketDistributed ipacket)
        {
            CG_MASTER_ACTIVE_SKILL packet = (CG_MASTER_ACTIVE_SKILL )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Exemple #2
0
        //请求激活技能
        public void ReqActiveMasterSkill(string skillname, int skillid)
        {
            //技能ID
            if (skillid < 0)
            {
                return;
            }

            //技能名称字数
            if (skillname.Length <= 0 || skillname.Length > GlobeVar.MAX_MASTER_SKILL_NAME)
            {
                return;
            }

            //掌门才能激活
            if (GameManager.gameManager.PlayerDataPool.IsMasterChief() == false)
            {
                return;
            }

            //激活师门技能需要师门薪火达到要求
            int SkillNum              = GameManager.gameManager.PlayerDataPool.GetMasterSkillActiveNum();
            int MasterTorch           = GameManager.gameManager.PlayerDataPool.MasterInfo.MasterTorch;
            Tab_MasterSkillLimit line = TableManager.GetMasterSkillLimitByID(SkillNum + 1, 0);

            if (line != null)
            {
                if (MasterTorch < line.MinMasterTorch)
                {
                    string str = StrDictionary.GetClientDictionaryString("#{3275}", line.MinMasterTorch, line.ActiveConsumeNum);
                    Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, str);

                    return;
                }
                if (MasterTorch < line.ActiveConsumeNum)
                {
                    string str = StrDictionary.GetClientDictionaryString("#{3275}", line.MinMasterTorch, line.ActiveConsumeNum);
                    Singleton <ObjManager> .GetInstance().MainPlayer.SendNoticMsg(false, str);

                    return;
                }
            }

            CG_MASTER_ACTIVE_SKILL msg = (CG_MASTER_ACTIVE_SKILL)PacketDistributed.CreatePacket(MessageID.PACKET_CG_MASTER_ACTIVE_SKILL);

            msg.SkillId   = skillid;
            msg.SkillName = skillname;
            msg.SendPacket();
        }