public static void WriteInstanceStubs() { var dir = ToolConfig.DefaultAddonSourceDir + "Instances/"; RealmDBMgr.Initialize(); ContentMgr.Initialize(); World.InitializeWorld(); InstanceMgr.Initialize(); foreach (var instance in InstanceMgr.InstanceInfos) { var className = instance.Id.ToString(); var baseClass = typeof(BaseInstance).Name; var file = dir + className + ".cs"; if (!File.Exists(file)) { using (var writer = new CodeFileWriter(file, "WCell.Addons.Default.Instances", className, "class", ": " + baseClass, "WCell.RealmServer.Instances")) { } } } }