private static void AddTestComponent(CEOIdentifyAddon ai, AddonTileInfo info, int index) { if (ai == null || info == null) { return; } var ac = new AddonComponent(info.ItemID) { Name = String.Format("#{0} {1}", index, info.Offset) }; if (info.Hue > 0) { ac.Hue = info.Hue; } if (info.Amount > 1) { ac.Stackable = true; ac.Amount = info.Amount; } if (info.Light > -1) { ac.Light = (LightType)info.Light; } ai.AddComponent(ac, info.X, info.Y, info.Z); }
private static void AddIdentifyAddOnComponent(CEOIdentifyAddon ai, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount) { if (ai == null) return; AddonComponent ac; ac = new AddonComponent(item); if (name != null && name.Length > 0) ac.Name = name; if (hue != 0) ac.Hue = hue; if (amount > 1) // Note: a warning will show on the console regarding a non-stackable item.... { ac.Stackable = true; ac.Amount = amount; } if (lightsource != -1) ac.Light = (LightType)lightsource; ai.AddComponent(ac, xoffset, yoffset, zoffset); }
private static void AddIdentifyAddOnComponent(CEOIdentifyAddon ai, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name) { if (ai == null) return; AddonComponent ac; ac = new AddonComponent(item); if (name != null) ac.Name = name; if (hue != 0) ac.Hue = hue; if (lightsource != -1) ac.Light = (LightType)lightsource; ai.AddComponent(ac, xoffset, yoffset, zoffset); }