Server.MultiData.GetComponents C# (CSharp) Méthode

GetComponents() public static méthode

public static GetComponents ( int multiID ) : MultiComponentList
multiID int
Résultat MultiComponentList
		public static MultiComponentList GetComponents( int multiID )
		{
			MultiComponentList mcl;

			if ( multiID >= 0 && multiID < m_Components.Length )
			{
				mcl = m_Components[multiID];

				if ( mcl == null )
					m_Components[multiID] = mcl = Load( multiID );
			}
			else
			{
				mcl = MultiComponentList.Empty;
			}

			return mcl;
		}

Usage Example

Exemple #1
0
        public static MultiComponentList GetComponents(int multiID)
        {
            multiID &= 0x3FFF;

            MultiComponentList mcl;

            if (ComponentsCache.TryGetValue(multiID, out mcl) && mcl != null)
            {
                return(mcl);
            }

            ComponentsCache[multiID] = mcl = MultiData.GetComponents(multiID);

            // Minax Fortress
            if (multiID == 0x1388)
            {
                // That tree...
                mcl.Remove(3405, 17, -13, 15);
                mcl.Remove(3406, 18, -14, 15);
                mcl.Remove(3393, 18, -14, 17);
            }

            if (mcl.List.Length == 0)
            {
                mcl.Resize(1, 1);
                mcl.Add(0, 0, 0, 0);
            }

            return(mcl);
        }
All Usage Examples Of Server.MultiData::GetComponents