Ejemplo n.º 1
0
        public bool isEquip(FlyWingProperty property)
        {
            if (m_propertyId == property.m_propertyId)
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        // 重新计算附加属性
        private void _reCalAbsortProperty()
        {
            if (m_FlyWingId == -1)
            {
                return;
            }

            Tab_FlyWing flyWingTable = TableManager.GetFlyWingByID(m_FlyWingId, 0);

            if (flyWingTable == null)
            {
                return;
            }

            m_FlyWingPropertyList.Clear();
            int nMaxRecordCount = TableManager.GetFlyWing().Count();

            for (int i = 0; i < nMaxRecordCount; ++i)
            {
                Tab_FlyWing temFlyWingTab = TableManager.GetFlyWingByID(i, 0);
                if (temFlyWingTab == null)
                {
                    LogModule.DebugLog("Tab_FlyWing Not Find" + i);
                    continue;
                }

                if ((flyWingTable.ID == temFlyWingTab.ID && flyWingTable.LEVEL >= temFlyWingTab.LEVEL) ||
                    (flyWingTable.ID == temFlyWingTab.ID && flyWingTable.LEVEL == temFlyWingTab.LEVEL && flyWingTable.ABSORBNUM >= temFlyWingTab.ABSORBNUM)
                    )
                {
                    if (temFlyWingTab.ABSORBID == -1 || temFlyWingTab.ABSORBVLUE == -1)
                    {
                        continue;
                    }

                    if (m_FlyWingPropertyList.Count <= 0)
                    {
                        FlyWingProperty temFlyWingProperty = new FlyWingProperty(temFlyWingTab.ABSORBID, temFlyWingTab.ABSORBVLUE);
                        m_FlyWingPropertyList.Add(temFlyWingProperty);
                    }

                    else
                    {
                        bool isFind = false;
                        for (int j = 0; j < m_FlyWingPropertyList.Count; ++j)
                        {
                            if (m_FlyWingPropertyList[j].m_propertyId == temFlyWingTab.ABSORBID)
                            {
                                isFind = true;
                                FlyWingProperty tem = m_FlyWingPropertyList[j];
                                tem.m_propertyVlue += temFlyWingTab.ABSORBVLUE;
                                break;
                            }
                        }
                        if (!isFind)
                        {
                            FlyWingProperty temFlyWingProperty = new FlyWingProperty(temFlyWingTab.ABSORBID, temFlyWingTab.ABSORBVLUE);
                            m_FlyWingPropertyList.Add(temFlyWingProperty);
                        }
                    }
                }
            }
        }