protected ItemInstance(String instanceName) { instanceName = instanceName.Trim().ToUpper(); if (instanceName == null) { throw new ArgumentNullException("instanceName can not be null"); } if (instanceName.Length == 0) { throw new ArgumentException("Instancename can not has a length of 0"); } if (ItemInstances.ContainsKey(instanceName)) { throw new ArgumentException("InstanceName is already in use! " + instanceName); } itemInstances = new GUC.WorldObjects.ItemInstance(); itemInstances.ScriptingProto = this; mItemInstance = instanceName; ItemInstances.Add(instanceName, this); }
internal ItemInstance(WorldObjects.ItemInstance ii) { itemInstances = ii; }