Exemple #1
0
        private void AddEquipPassiveCdInfo(uint passiveSkillId, int cd)
        {
            for (int i = 0; i < this.m_equipPassiveCdList.Count; i++)
            {
                if (this.m_equipPassiveCdList[i].m_passiveSkillId == passiveSkillId)
                {
                    this.m_equipPassiveCdList[i].m_passiveCd = cd;
                    return;
                }
            }
            CEquipPassiveCdInfo item = new CEquipPassiveCdInfo(passiveSkillId, cd);

            this.m_equipPassiveCdList.Add(item);
        }
Exemple #2
0
        public override void UpdateLogic(int nDelta)
        {
            int index = 0;

            while (index < this.m_equipPassiveCdList.Count)
            {
                CEquipPassiveCdInfo local1 = this.m_equipPassiveCdList[index];
                local1.m_passiveCd -= nDelta;
                if (this.m_equipPassiveCdList[index].m_passiveCd <= 0)
                {
                    this.m_equipPassiveCdList.RemoveAt(index);
                }
                else
                {
                    index++;
                }
            }
            this.m_frame++;
            if ((((this.m_frame + ((int)base.actor.ObjID)) % 30) == 0) && this.IsPermitedToBuyEquip(Singleton <CBattleSystem> .GetInstance().m_battleEquipSystem.IsInEquipLimitedLevel()))
            {
                this.TryBuyEquipmentIfComputer();
            }
        }