本文整理汇总了C#中GameData.defaultfill方法的典型用法代码示例。如果您正苦于以下问题:C# GameData.defaultfill方法的具体用法?C# GameData.defaultfill怎么用?C# GameData.defaultfill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameData
的用法示例。
在下文中一共展示了GameData.defaultfill方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadfilesBackground
private void LoadfilesBackground(System.Object sender, DoWorkEventArgs e)
{
string aerror = string.Empty;
try {
if (sender != null) {
BackgroundWorker worker = (BackgroundWorker)sender;
worker.DoWork -= LoadfilesBackground;
}
if (File.Exists(mPluginConfigfilename)) {
this.mPluginConfig = (PluginSettings)Util.DeSerializeObject(mPluginConfigfilename, typeof(PluginSettings));
}
//create default file
if (mPluginConfig == null) {
mPluginConfig = new PluginSettings();
mPluginConfig.Shortcuts = new SDictionary<string, string>();
mPluginConfig.Shortcuts.Add("hr", "House Recall");
mPluginConfig.Shortcuts.Add("mr", "House Mansion_Recall");
mPluginConfig.Shortcuts.Add("ah", "Allegiance Hometown");
mPluginConfig.Shortcuts.Add("ls", "Lifestone");
mPluginConfig.Shortcuts.Add("mp", "Marketplace");
mPluginConfig.Alerts = getbaseAlerts();
mPluginConfig.AlertKeyMob = "Monster";
mPluginConfig.AlertKeyPortal = "Portal";
mPluginConfig.AlertKeySalvage = "Salvage";
mPluginConfig.AlertKeyScroll = "Salvage";
mPluginConfig.AlertKeyThropy = "Trophy";
mPluginConfig.Alertwawfinished = "finished.wav";
}
//HACK: Still hating the sounds
// mplayer = new mediaplayer();
// mplayer.Volume = mPluginConfig.wavVolume;
loadcolortable();
//Check for Gamedata.xml
if (!File.Exists(Util.docPath + "\\GameData.xml")) {
//Create it if !exists
iGameData.defaultfill();
Util.SerializeObject(Util.docPath + "\\GameData.xml", iGameData);
}
//Now that it exists, check version and update if needed
if (File.Exists(Util.docPath + "\\GameData.xml")) {
iGameData = (AlincoVVS.PluginCore.GameData)Util.DeSerializeObject(Util.docPath + "\\GameData.xml", typeof(GameData));
//Look to code this for a single line revision of Gamedata version, currently must update in 2 locations
if (iGameData.version < 10) {
iGameData.defaultfill();
Util.SerializeObject(Util.docPath + "\\GameData.xml", iGameData);
}
}
mWorldConfigfilename = Util.docPath + "\\" + Util.normalizePath(Core.CharacterFilter.Server);
if (!Directory.Exists(mWorldConfigfilename)) {
Directory.CreateDirectory(mWorldConfigfilename);
}
mExportInventoryname = Util.docPath + "\\Inventory";
if (!Directory.Exists(mExportInventoryname)) {
Directory.CreateDirectory(mExportInventoryname);
writebasexslt(mExportInventoryname + "\\Inventory.xslt");
}
mExportInventoryname += "\\" + Core.CharacterFilter.Server + ".xml";
mWorldInventoryname = Util.docPath + "\\" + Util.normalizePath(Core.CharacterFilter.Server) + "\\Inventory.xml";
if (File.Exists(mWorldInventoryname)) {
object tobj = Util.DeSerializeObject(mWorldInventoryname, typeof(SDictionary<int, InventoryItem>));
if (tobj != null) {
mGlobalInventory = (global::AlincoVVS.PluginCore.SDictionary<int, global::AlincoVVS.PluginCore.InventoryItem>)tobj;
mStorageInfo = (global::AlincoVVS.PluginCore.SDictionary<int, string>)Util.DeSerializeObject(mWorldInventoryname + "storage", typeof(SDictionary<int, string>));
} else {
mGlobalInventory = new SDictionary<int, InventoryItem>();
}
} else {
writebasexslt(Util.docPath + "\\" + Util.normalizePath(Core.CharacterFilter.Server) + "\\Inventory.xslt");
}
mCharConfigfilename = mWorldConfigfilename;
mWorldConfigfilename += "\\Settings.xml";
if (File.Exists(mWorldConfigfilename)) {
mWorldConfig = (WorldSettings)Util.DeSerializeObject(mWorldConfigfilename, typeof(WorldSettings));
}
mCharConfigfilename += "\\" + Util.normalizePath(Core.CharacterFilter.Name) + ".xml";
if (File.Exists(mCharConfigfilename)) {
mCharconfig = (CharSettings)Util.DeSerializeObject(mCharConfigfilename, typeof(CharSettings));
}
if (mWorldConfig == null) {
mWorldConfig = new WorldSettings();
}
if (mCharconfig == null) {
mCharconfig = new CharSettings();
}
mProtectedCorpses.Add("Corpse of " + Core.CharacterFilter.Name);
mFilesLoaded = true;
} catch (Exception ex) {
//.........这里部分代码省略.........