예제 #1
0
 protected override void OnInitEffect(params object[] objs)
 {
     BuffID = (BUFF_TYPE)Enum.Parse(typeof(BUFF_TYPE), objs[0].ToString());
     // !!!
     // 求问:为什么下面不能写作 =int(objs[1])
     BuffTimes = Convert.ToInt32(objs[1]);
 }
    public void Set_BuyBuff(BUFF_TYPE buffType)
    {
        buyBuffType = buffType;

        string buffMainTxt = string.Empty;
        string buffSubTxt  = string.Empty;

        price = TableDataManager.instance.Infos_ConstValues[(int)ConstValue_TYPE.Const_ClanBuffPrice].ConsVal;

        int addDurationTime = (int)TableDataManager.instance.Infos_ConstValues[(int)ConstValue_TYPE.Const_ClanBuffDurationTime].ConsVal / 60;

        switch (buyBuffType)
        {
        case BUFF_TYPE.CLANEXP:
            string persantExp = string.Format("{0}%", TableDataManager.instance.Infos_ConstValues[(int)ConstValue_TYPE.Const_ClanExpBuffRateValue].ConsVal);

            buffMainTxt = string.Format("경험치{0} 의 유지시간을 {1}시간 추가시키겠습니까?", persantExp, addDurationTime);
            buffSubTxt  = "<color=#ff0000>*적용중에는 전투시 획득하는 경험치양이 증가합니다\n*클래멤버 모두에게 적용됩니다.</color>";
            break;

        case BUFF_TYPE.CLANGOLD:
            string persantGold = string.Format("{0}%", TableDataManager.instance.Infos_ConstValues[(int)ConstValue_TYPE.Const_ClanGoldBuffRateValue].ConsVal);
            buffMainTxt = string.Format("골드{0} 의 유지시간을 {1}시간 추가시키겠습니까?", persantGold, addDurationTime);
            buffSubTxt  = "<color=#ff0000>*적용중에는 전투시 획득하는 골드양이 증가합니다\n*클래멤버 모두에게 적용됩니다.</color>";
            break;
        }

        Text_buyBuffInfo.text = string.Format("{0}\n\n{1}", buffMainTxt, buffSubTxt);
        Text_Price.text       = price.ToString();
        Text_AddTime.text     = string.Format("+{0}시간", addDurationTime);
    }
예제 #3
0
 public TmKeyRec(int _buffSize, BUFF_TYPE _buffType)
 {
     mBuffSize = _buffSize;
     mInfo     = new KeyInfo();
     mRecInfo  = new KeyInfo[mBuffSize];
     mBuffPtr  = -1;
     mRecSize  = mRecCtr = mPlayCtr = 0;
     mState    = STATE.STOP;
     mBuffType = _buffType;
     mPad      = new PAD();
     mDebug    = new KeyInfoDebug();
 }
예제 #4
0
        public void RemoveBuff(uint id)
        {
            bool flag = !this.BuffCd.ContainsKey(id);

            if (!flag)
            {
                BUFF_TYPE buff_type = this.BuffCd[id].buff_type;
                BUFF_TYPE bUFF_TYPE = buff_type;
                if (bUFF_TYPE != BUFF_TYPE.CANT_MOVE)
                {
                    if (bUFF_TYPE != BUFF_TYPE.CANT_SKILL)
                    {
                        if (bUFF_TYPE == BUFF_TYPE.CANT_MOVE_SKILL)
                        {
                            SelfRole._inst.can_buff_move    = true;
                            SelfRole._inst.can_buff_skill   = true;
                            SelfRole._inst.can_buff_ani     = true;
                            SelfRole._inst.m_curAni.enabled = true;
                        }
                    }
                    else
                    {
                        SelfRole._inst.can_buff_skill = true;
                    }
                }
                else
                {
                    SelfRole._inst.can_buff_move = true;
                }
                bool flag2 = SelfRole._inst is P3Mage;
                if (flag2)
                {
                    XMLMgr expr_A4 = XMLMgr.instance;
                    SXML   sXML    = (expr_A4 != null) ? expr_A4.GetSXML("skill.state", "id==" + id) : null;
                    bool   flag3   = sXML.getInt("skill_id") == 3008;
                    if (flag3)
                    {
                        SelfRole._inst.PlaySkill(30081);
                    }
                }
                bool flag4 = buff_type != BUFF_TYPE.NULL && this.Buff_type_list.Contains(buff_type);
                if (flag4)
                {
                    this.Buff_type_list.Remove(this.BuffCd[id].buff_type);
                }
                this.BuffCd.Remove(id);
                a3_buff expr_138 = a3_buff.instance;
                if (expr_138 != null)
                {
                    expr_138.resh_buff();
                }
            }
        }
예제 #5
0
 public TmKeyRec(int _buffSize, BUFF_TYPE _buffType)
 {
     mBuffSize = _buffSize;
     mInfo = new KeyInfo();
     mRecInfo = new KeyInfo[mBuffSize];
     mBuffPtr = -1;
     mRecSize = mRecCtr = mPlayCtr = 0;
     mState = STATE.STOP;
     mBuffType = _buffType;
     mPad = new PAD();
     mDebug = new KeyInfoDebug();
 }
예제 #6
0
        public void RemoveBuff(uint id)
        {
            if (!BuffCd.ContainsKey(id))
            {
                return;
            }

            BUFF_TYPE type = BuffCd[id].buff_type;

            switch (type)
            {
            case BUFF_TYPE.CANT_MOVE:
                SelfRole._inst.can_buff_move = true;
                break;

            case BUFF_TYPE.CANT_SKILL:
                SelfRole._inst.can_buff_skill = true;
                break;

            case BUFF_TYPE.CANT_MOVE_SKILL:
                SelfRole._inst.can_buff_move    = true;
                SelfRole._inst.can_buff_skill   = true;
                SelfRole._inst.can_buff_ani     = true;
                SelfRole._inst.m_curAni.enabled = true;
                break;
            }

            if (SelfRole._inst is P3Mage)
            {
                //法师盾的buffid
                SXML xml = XMLMgr.instance?.GetSXML("skill.state", "id==" + id);
                if (xml.getInt("skill_id") == 3008)
                {
                    SelfRole._inst.PlaySkill(30081);
                }
            }


            if (type != BUFF_TYPE.NULL && Buff_type_list.Contains(type))
            {
                Buff_type_list.Remove(BuffCd[id].buff_type);
            }


            BuffCd.Remove(id);

            a3_buff.instance?.resh_buff();
        }
예제 #7
0
    public TmKeyRec(TmKeyRec _origin)
    {
        mBuffSize = _origin.mBuffSize;
        mInfo     = new KeyInfo(_origin.keyInfo);
//		mRecInfo = (KeyInfo[])_origin.mRecInfo.Clone();
        mRecInfo = new KeyInfo[_origin.mBuffSize];
        Array.Copy(_origin.mRecInfo, 0, mRecInfo, 0, _origin.mRecSize);
        mBuffPtr  = _origin.mBuffPtr;
        mRecSize  = _origin.mRecSize;
        mRecCtr   = _origin.mRecCtr;
        mPlayCtr  = _origin.mPlayCtr;
        mState    = _origin.mState;
        mBuffType = _origin.mBuffType;
        mPad      = new PAD(_origin.mPad);
        mDebug    = new KeyInfoDebug();
    }
예제 #8
0
 public TmKeyRec(TmKeyRec _origin)
 {
     mBuffSize = _origin.mBuffSize;
     mInfo = new KeyInfo(_origin.keyInfo);
     //		mRecInfo = (KeyInfo[])_origin.mRecInfo.Clone();
     mRecInfo = new KeyInfo[_origin.mBuffSize];
     Array.Copy(_origin.mRecInfo,0,mRecInfo,0,_origin.mRecSize);
     mBuffPtr = _origin.mBuffPtr;
     mRecSize = _origin.mRecSize;
     mRecCtr = _origin.mRecCtr;
     mPlayCtr = _origin.mPlayCtr;
     mState = _origin.mState;
     mBuffType = _origin.mBuffType;
     mPad = new PAD(_origin.mPad);
     mDebug = new KeyInfoDebug();
 }
예제 #9
0
 protected override void OnInitEffect(params object[] objs)
 {
     BuffID = (BUFF_TYPE)Enum.Parse(typeof(BUFF_TYPE), objs[0].ToString());
 }
예제 #10
0
 // ---------------------------------------------------------
 // buff剩余次数
 public int GetBuffTimes(BUFF_TYPE buff_id)
 {
     // !!! 暂未实现
     return(0);
 }
예제 #11
0
 protected virtual void OnGainBuff(BUFF_TYPE buff_id, int buff_times)
 {
 }
예제 #12
0
 // ---------------------------------------------------------
 public void GainBuff(BUFF_TYPE buff_id, int buff_times)
 {
     // !!! 暂未实现
     OnGainBuff(buff_id, buff_times);
 }