コード例 #1
0
        public bool HasHousingSpaceForSpeedUp()
        {
            int totalRoom = 0;

            if (m_vUnits.Count >= 1)
            {
                foreach (var ds in m_vUnits)
                {
                    CombatItemData cd = (CombatItemData)ds.Data;
                    totalRoom += cd.GetHousingSpace() * ds.Value;
                }
            }
            ComponentManager cm = GetParent().GetLevel().GetComponentManager();
            int usedHousing     = cm.GetTotalUsedHousing(m_vIsSpellForge);
            int maxHousing      = cm.GetTotalMaxHousing(m_vIsSpellForge);

            return(totalRoom <= maxHousing - usedHousing);
        }
コード例 #2
0
        public bool HasHousingSpaceForSpeedUp()
        {
            var totalRoom = 0;

            if (m_vUnits.Count >= 1)
            {
                foreach (DataSlot ds in m_vUnits)
                {
                    CombatItemData cd = (CombatItemData)ds.Data;
                    totalRoom += cd.GetHousingSpace() * ds.Value;
                }
            }
            ComponentManager cm  = GetParent().GetLevel().GetComponentManager();
            int num2             = this.m_vIsSpellForge ? 1 : 0;
            int totalUsedHousing = cm.GetTotalUsedHousing(num2 != 0);
            int num3             = this.m_vIsSpellForge ? 1 : 0;
            int totalMaxHousing  = cm.GetTotalMaxHousing(num3 != 0);

            return(totalRoom <= totalMaxHousing - totalUsedHousing);
        }