public void DefaultPolicyViolationHandlerIs <TPolicyViolationHandler>(Func <TPolicyViolationHandler> policyViolationHandler) where TPolicyViolationHandler : class, IPolicyViolationHandler { RemoveDefaultPolicyViolationHandlerConventions(); Advanced.Conventions(conventions => conventions.Add(new DefaultPolicyViolationHandlerIsInstanceConvention <TPolicyViolationHandler>(policyViolationHandler)) ); }
public void CheckAdvancedResearch() { if ( (!Game.GodMode) && (wasGodMode) ) { // Reset everything SetInitialState(); wasGodMode = false; } // Prepare for some work PrepareCaches(); // Scan advanced research for newly completed projects foreach (var Advanced in Data.AdvancedResearchDefs) { if (Advanced.ResearchState != ResearchEnableMode.Complete) { var enableMode = Advanced.EnableMode; if (enableMode != Advanced.ResearchState) { // Enable this project Advanced.Enable(enableMode); } } } // Process caches ProcessCaches(); }
public override int GetHashCode() { unchecked { var hashCode = Name != null?Name.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (GroupName != null ? GroupName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Pattern != null ? Pattern.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Required.GetHashCode(); hashCode = (hashCode * 397) ^ ReadOnly.GetHashCode(); hashCode = (hashCode * 397) ^ Multiple.GetHashCode(); hashCode = (hashCode * 397) ^ MultipleLimit; hashCode = (hashCode * 397) ^ (Unit != null ? Unit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (UnitLabel != null ? UnitLabel.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Context != null ? Context.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Options != null ? Options.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (FilterCriteria != null ? FilterCriteria.GetHashCode() : 0); hashCode = (hashCode * 397) ^ LimitToOptions.GetHashCode(); hashCode = (hashCode * 397) ^ Advanced.GetHashCode(); hashCode = (hashCode * 397) ^ StepSize; hashCode = (hashCode * 397) ^ Verifyable.GetHashCode(); hashCode = (hashCode * 397) ^ (Default != null ? Default.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Minimum; hashCode = (hashCode * 397) ^ Maximum; return(hashCode); } }
public void DefaultPolicyViolationHandlerIs <TPolicyViolationHandler>() where TPolicyViolationHandler : class, IPolicyViolationHandler { RemoveDefaultPolicyViolationHandlerConventions(); Advanced.Conventions(conventions => conventions.Add(new DefaultPolicyViolationHandlerIsOfTypeConvention <TPolicyViolationHandler>()) ); }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="advanced"></param> /// <returns></returns> private static Dictionary <string, EmailRecord> getNameValueByElementType( HtmlAgilityPack.HtmlDocument source, Advanced advanced ) { Dictionary <string, EmailRecord> output = new Dictionary <string, EmailRecord>(); var document = source.DocumentNode; IEnumerable <HtmlAgilityPack.HtmlNode> emailNodes = document.QuerySelectorAll(advanced.elementOne); IEnumerable <HtmlAgilityPack.HtmlNode> spanNodes = document.QuerySelectorAll(advanced.elementTwo); foreach (HtmlAgilityPack.HtmlNode node in emailNodes) { // if node is found or not bool IsRequiredNode = false; // check if node is in header settings advanced.emailHeaderIdentities.TryGetValue(node.Id, out IsRequiredNode); if (IsRequiredNode) { if (node.Attributes["fieldname"].Value == advanced.fieldNameOne) { if (node.InnerText.Contains("@")) { EmailRecord record = new EmailRecord() { emailAddress = node.InnerText, nodeIdentity = node.Id, status = "UNDEFINED" }; output.Add(node.InnerText, record); } } } } Dictionary <string, EmailRecord> newOutput = new Dictionary <string, EmailRecord>(); foreach (HtmlAgilityPack.HtmlNode node in spanNodes) { foreach (var key in output.Keys) { EmailRecord tempRecord = output[key]; if (node.Id == tempRecord.nodeIdentity + "_status") { tempRecord.status = node.InnerText; newOutput[key] = tempRecord; } } } return(newOutput); }
public override void OnPluginKilled() { Server.PluginHost.Loaded -= OnHostLoadedPlugin; // Send packets to inform cb0t we've stopped supporting the advanced features var voice_support = new Advanced(new ServerVoiceSupport() { Enabled = false, HighQuality = false }); foreach (var user in Server.Users) { if (user.LoggedIn) { if (Server.Config.AllowVoice) { user.SendPacket(voice_support); } bool pubvoice = (user.Features & ClientFlags.VOICE) == ClientFlags.VOICE; bool privoice = (user.Features & ClientFlags.PRIVATE_VOICE) == ClientFlags.PRIVATE_VOICE; if (pubvoice || privoice) { Server.SendPacket(new Advanced(new ServerVoiceSupportUser() { Username = user.Name, Public = false, Private = false, })); } if ((bool)user.Extended["SupportEmote"]) { Server.SendPacket(new Advanced(new ServerEmoteSupport(0))); foreach (var emote in (List <ClientEmoteItem>)user.Extended["CustomEmote"]) { Server.SendPacket(new Advanced(new ServerEmoteDelete() { Username = user.Name, Shortcut = emote.Shortcut, })); } } } //setting to null will revert back to 'ServerFormatter' user.Socket.Formatter = null; user.Extended.Remove("CustomFont"); user.Extended.Remove("SupportEmote"); user.Extended.Remove("VoiceIgnore"); user.Extended.Remove("CustomEmote"); } Server.SendAnnounce("cb0tProtocol plugin has been unloaded!!"); }
/// <summary> /// Reloads the provided instance of <typeparamref name="T"/> from the database /// </summary> /// <typeparam name="T">The Entity Type being reloaded</typeparam> /// <param name="item">The <typeparamref name="T"/> you want to reload</param> /// <returns>The <typeparamref name="T"/> you reloaded</returns> public T Reload <T>(T item) where T : class { _log.DebugFormat("Reloading Object {0}", item); var id = Advanced.GetDocumentId(item); item = Load <T>(id); _log.TraceFormat("Reloaded Object {0}", item); return(item); }
private void advancedToolStripMenuItem1_Click(object sender, EventArgs e) { if (advanced == null || advanced.IsDisposed) { advanced = new Advanced(); } advanced.Show(); advanced.Focus(); }
private void RemoveDefaultPolicyViolationHandlerConventions() { Advanced.Conventions(conventions => { conventions.RemoveAll(c => c is FindDefaultPolicyViolationHandlerByNameConvention); conventions.RemoveAll(c => c.IsMatchForGenericType(typeof(DefaultPolicyViolationHandlerIsOfTypeConvention <>))); conventions.RemoveAll(c => c.IsMatchForGenericType(typeof(DefaultPolicyViolationHandlerIsInstanceConvention <>))); }); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Parameters != null) { hashCode = hashCode * 59 + Parameters.GetHashCode(); } if (ParameterGroups != null) { hashCode = hashCode * 59 + ParameterGroups.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (Label != null) { hashCode = hashCode * 59 + Label.GetHashCode(); } if (Category != null) { hashCode = hashCode * 59 + Category.GetHashCode(); } if (ItemType != null) { hashCode = hashCode * 59 + ItemType.GetHashCode(); } if (Kind != null) { hashCode = hashCode * 59 + Kind.GetHashCode(); } if (StateDescription != null) { hashCode = hashCode * 59 + StateDescription.GetHashCode(); } if (Tags != null) { hashCode = hashCode * 59 + Tags.GetHashCode(); } if (UID != null) { hashCode = hashCode * 59 + UID.GetHashCode(); } if (Advanced != null) { hashCode = hashCode * 59 + Advanced.GetHashCode(); } if (CommandDescription != null) { hashCode = hashCode * 59 + CommandDescription.GetHashCode(); } return(hashCode); } }
public IDocumentQuery <T> LuceneQuery <T>() { string indexName = "dynamic"; if (typeof(T).IsEntityType()) { indexName += "/" + Conventions.GetTypeTagName(typeof(T)); } return(Advanced.LuceneQuery <T>(indexName)); }
internal void When(Advanced @event) { From.Army += ArmyBuffer - @event.To; To.Army += @event.To; ArmyBuffer = Army.None; From = null; To = null; Phase = GamePhase.Attack; }
public static T Run <T>(LuaFuncRef FuncRef, params object[] Args) { int Top = GetTop(); Run(FuncRef, 1, Args); T Ret = (T)Advanced.Get(L, 1, typeof(T)); SetTop(Top); return(Ret); }
/// <summary> /// Returns true if ChannelDefinitionDTO instances are equal /// </summary> /// <param name="input">Instance of ChannelDefinitionDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(ChannelDefinitionDTO input) { if (input == null) { return(false); } return (( Description == input.Description || (Description != null && Description.Equals(input.Description)) ) && ( Id == input.Id || (Id != null && Id.Equals(input.Id)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Tags == input.Tags || Tags != null && Tags.SequenceEqual(input.Tags) ) && ( Properties == input.Properties || Properties != null && Properties.SequenceEqual(input.Properties) ) && ( Category == input.Category || (Category != null && Category.Equals(input.Category)) ) && ( StateDescription == input.StateDescription || (StateDescription != null && StateDescription.Equals(input.StateDescription)) ) && ( Advanced == input.Advanced || (Advanced != null && Advanced.Equals(input.Advanced)) ) && ( TypeUID == input.TypeUID || (TypeUID != null && TypeUID.Equals(input.TypeUID)) )); }
public static T Get <T>(LuaReference Table, string Name) { int Top = GetTop(); Table.GetRef(); LL.lua_getfield(L, -1, Name); T Val = (T)Advanced.Get(L, 1, typeof(T)); SetTop(Top); return(Val); }
public async Task <IActionResult> Create([Bind("AdvancedId,LessonName")] Advanced advanced) { if (ModelState.IsValid) { _context.Add(advanced); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(advanced)); }
public IPlayer CreatePlayer(string type, string username) { IPlayer player = new Beginner(new CardRepository(), username); if (type == "Advanced") { player = new Advanced(new CardRepository(), username); } return(player); }
/// <summary> /// Generates elements picked from the source enumerable. /// </summary> /// <param name="source">The source elements to pick from.</param> /// <returns>A new generator.</returns> public static IGen <T> Element <T>(IEnumerable <T> source) { var sourceList = source.ToList(); if (sourceList.Count == 0) { return(Advanced.Error <T>(nameof(Element), "'source' must not be empty")); } return(Int32().Between(0, sourceList.Count - 1).Select(i => sourceList[i])); }
public async Task <IActionResult> Template([Bind("Id,Name,Type,Marks,Question,UserEmail,ModifiedDate")] Advanced advanced) { if (ModelState.IsValid) { advanced.Id = Guid.NewGuid(); _context.Add(advanced); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(advanced)); }
public void OnPluginKilled() { this.server.PluginHost.Loaded -= Host_LoadedPlugin; // Send packets to inform cb0t we've stopped supporting the advanced features var voice_support = new Advanced(new ServerVoiceSupport() { Enabled = false, HighQuality = false }); foreach (var user in server.Users) { if (user.LoggedIn) { user.SendPacket(voice_support); bool pubvoice = (user.Features & ClientFeatures.VOICE) == ClientFeatures.VOICE; bool privoice = (user.Features & ClientFeatures.PRIVATE_VOICE) == ClientFeatures.PRIVATE_VOICE; if (pubvoice || privoice) { server.SendPacket(new Advanced(new ServerVoiceSupportUser() { Username = user.Name, Public = false, Private = false, })); } if ((bool)user.Extended["SupportEmote"]) { server.SendPacket(new Advanced(new ServerEmoteSupport(0))); foreach (var emote in (List <ClientEmoteItem>)user.Extended["CustomEmote"]) { server.SendPacket(new Advanced(new ServerEmoteDelete() { Username = user.Name, Shortcut = emote.Shortcut, })); } } } user.Extended.Remove("CustomFont"); user.Extended.Remove("SupportEmote"); user.Extended.Remove("VoiceIgnore"); user.Extended.Remove("CustomEmote"); } this.server.SendAnnounce("cb0tProtocol plugin has been unloaded!!"); }
// ************************************************************************************************************************* // Instructions: This sample can be run using either the Azurite emulator that installs as part of this SDK - or by // updating the App.Config file with your AccountName and Key. // // To run the sample using the Azurite (default option): // 1. run command: azurite --oauth basic --cert certname.pem --key certname-key.pem to start Azurite // 2. Set breakpoints and run the project using F10. // // To run the sample using the Storage Service: // 1. Open the app.config file and comment out the connection string and account for the Azurite emulator and // uncomment the connection string and account for the storage service (AccountName=[]...) // 2. Create a Storage Account through the Azure Portal and provide your [AccountName] and [AccountKey] in // the App.Config file. See http://go.microsoft.com/fwlink/?LinkId=325277 for more information. // 3. Set breakpoints and run the project using F10. // // If possible, run the samples with a storage account that is not used for production data. You can create a new storage // account from the Azure portal if desired. // // ************************************************************************************************************************* static void Main(string[] args) { Console.WriteLine("Azure Blob Storage - Getting Started Samples\n"); GettingStarted.CallBlobGettingStartedSamples(); Console.WriteLine("Azure Blob Storage - Advanced Samples\n "); Advanced.CallBlobAdvancedSamples().Wait(); Console.WriteLine(); Console.WriteLine("Press any key to exit."); Console.ReadLine(); }
// ************************************************************************************************************************* // Instructions: This sample can be run using either the Azure Storage Emulator that installs as part of this SDK - or by // updating the App.Config file with your AccountName and Key. // // To run the sample using the Storage Emulator (default option): // 1. Start the Azure Storage Emulator (once only) by pressing the Start button or the Windows key and searching for it // by typing "Azure Storage Emulator". Select it from the list of applications to start it. // 2. Set breakpoints and run the project using F10. // // To run the sample using the Storage Service: // 1. Open the app.config file and comment out the connection string for the emulator (UseDevelopmentStorage=True) and // uncomment the connection string for the storage service (AccountName=[]...) // 2. Create a Storage Account through the Azure Portal and provide your [AccountName] and [AccountKey] in // the App.Config file. See http://go.microsoft.com/fwlink/?LinkId=325277 for more information. // 3. Set breakpoints and run the project using F10. // // If possible, run the samples with a storage account that is not used for production data. You can create a new storage // account from the Azure portal if desired. // // ************************************************************************************************************************* static void Main(string[] args) { Console.WriteLine("Azure Blob Storage - Getting Started Samples\n"); GettingStarted.CallBlobGettingStartedSamples(); // Uncomment the following lines to run the advanced samples. // Console.WriteLine("Azure Blob Storage - Advanced Samples\n "); Advanced.CallBlobAdvancedSamples().Wait(); Console.WriteLine(); Console.WriteLine("Press any key to exit."); Console.ReadLine(); }
public override int GetHashCode() { unchecked { var hashCode = Name != null?Name.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (Context != null ? Context.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Advanced.GetHashCode(); hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0); return(hashCode); } }
public IPlayer CreatePlayer(string type, string username) { IPlayer player = null; if (type == "Beginner") { player = new Beginner(username); } if (type == "Advanced") { player = new Advanced(username); } return(player); }
public string AddPlayer(string type, string username) { if (type == "Beginner") { IPlayer player = new Beginner(cardRepository, username); playerRepository.Add(player); } else if (type == "Advanced") { IPlayer player = new Advanced(cardRepository, username); playerRepository.Add(player); } return(string.Format(ConstantMessages.SuccessfullyAddedPlayer, type, username)); }
static void Run(LuaFuncRef FuncRef, int ReturnValues, object[] Args) { FuncRef.GetRef(); for (int i = 0; i < Args.Length; i++) { Advanced.Push(L, Args[i]); } if (LL.lua_pcall(L, Args.Length, ReturnValues, 0) != 0) { throw new Exception(LL.lua_tostring(L, -1)); } }
public bool Save() { ImageFormat imgF = Source == Sources.Game ? ImageFormat.Jpeg : ImageFormat.Png; Blocks.UpdateBlocksGroups(); try { Dictionary <string, string> dict = new Dictionary <string, string> { { "Title", Title } }; if (Source == Sources.Workshop) { dict.Add("Creator", Author.ToString()); dict.Add("WorkhopID", WorkshopID.ToString()); } dict.Add("IsAdvanced", Advanced.ToString()); dict.Add("Solved", Solved.ToString()); dict.Add("AllowedBlockTypes", String.Join(",", AllowedBlocks.Select <int, string>(i => i.ToString()))); dict.Add("AdvEnvironment", ((int)Environment).ToString()); dict.Add("AdvInputRate", InputDelay.ToString()); dict.Add("AdvForceConstantInputRatio", ConstantInputRatio.ToString()); dict.Add("AdvCreateInputTops", InputTops.ToString()); dict.Add("AdvNoTopsForOneBlockInputs", NoOneBlockTops.ToString()); dict.Add("Inputs", Blocks.ToBase64(Block.Roles.In)); dict.Add("Outputs", Blocks.ToBase64(Block.Roles.Out)); dict.Add("WorldBlocks", Blocks.ToBase64(Block.Roles.World)); if (keyVals.ContainsKey("PreviewImage")) { dict.Add("PreviewImage", BitmapToBase64(Preview, imgF)); } if (keyVals.ContainsKey("AdvPreviewImage")) { dict.Add("AdvPreviewImage", BitmapToBase64(Screenshot, imgF)); } using (StreamWriter sr = new StreamWriter(Path, false)) { foreach (KeyValuePair <string, string> keyval in dict) { sr.WriteLine(keyval.Key + " = " + keyval.Value); } } } catch { return(false); } Saved = true; return(true); }
/// <summary> /// Creates a copy of the <see cref="NapConfig"/> configuration. /// </summary> /// <returns>A copy of the current instance.</returns> public INapConfig Clone() { var clone = new ChildNapConfig { Serializers = new SerializersConfig(Serializers), BaseUrl = BaseUrl, FillMetadata = FillMetadata, Serialization = Serialization, Advanced = Advanced.Clone(), Headers = new Headers(Headers), QueryParameters = new QueryParameters(QueryParameters) }; return(clone); }
public string AddPlayer(string type, string username) { IPlayer player = null; if (type == "Beginner") { player = new Beginner(new CardRepository(), username); } else if (type == "Advanced") { player = new Advanced(new CardRepository(), username); } this.playerRepository.Add(player); return(String.Format(ConstantMessages.SuccessfullyAddedPlayer, type, username)); }
public IPlayer CreatePlayer(string type, string username) { Player player = null; if (type == "Beginner") { player = new Beginner(username, new CardRepository()); } else if (type == "Advanced") { player = new Advanced(username, new CardRepository()); } return(player); }
public Trello(string key) { _restClient = new TrelloRestClient(key); Members = new Members(_restClient); Boards = new Boards(_restClient); Lists = new Lists(_restClient); Cards = new Cards(_restClient); Checklists = new Checklists(_restClient); Organizations = new Organizations(_restClient); Notifications = new Notifications(_restClient); Tokens = new Tokens(_restClient); Async = new AsyncTrello(_restClient); Actions = new Actions(_restClient); Advanced = new Advanced(_restClient); Webhooks = new Webhooks(_restClient); }
public void method_5() { foreach (Control control in this.panel1.Controls) { control.Dispose(); } this.panel1.Controls.Clear(); Advanced advanced = new Advanced { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Visible = true }; this.panel1.Controls.Add(advanced); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 161: this.NumberOfItemsCookedRecently = reader.ReadInt(); this.CookingXpLastAwardedOn = reader.ReadDateTime(); goto case 160; case 160: this.lastSecondWind = reader.ReadDateTime(); goto case 159; case 159: { this.lastCharge = reader.ReadDateTime(); this.chargeCooldown = reader.ReadInt(); goto case 158; } case 158: SmithTesting = reader.ReadBool(); goto case 157; case 157: m_ConsecratedItems = reader.ReadInt(); goto case 156; case 156: m_CanBeFaithful = reader.ReadBool();goto case 155; case 155: m_HCWound = reader.ReadDateTime(); goto case 154; case 154: m_Maimings = reader.ReadInt(); goto case 153; case 153: { m_CustomAvatarID1 = reader.ReadInt(); m_CustomAvatarID2 = reader.ReadInt(); m_CustomAvatarID3 = reader.ReadInt(); m_IsHardcore = reader.ReadBool(); goto case 152; } case 152: GroupInfo.Deserialize(reader, Group); goto case 151; case 151: m_IsApprentice = reader.ReadBool(); goto case 150; case 150: m_AvatarID = reader.ReadInt(); goto case 149; case 149: case 148: case 147: case 146: case 145: case 144: { Disguise.Deserialize( reader ); MyDisguises.Deserialize( reader ); goto case 143; } case 143: m_GemHarvesting = reader.ReadBool(); goto case 142; case 142: { m_CanBeThief = reader.ReadBool(); m_LastCottonFlaxHarvest = reader.ReadDateTime(); goto case 141; } case 141: case 140: m_CraftingSpecialization = reader.ReadString(); goto case 139; case 139: m_Forging = reader.ReadBool(); goto case 138; case 138: m_ImperialGuard = reader.ReadBool(); goto case 137; case 137: m_ExtraCPRewards = reader.ReadInt(); goto case 136; case 136: m_EmptyBankBoxOn = reader.ReadDateTime(); goto case 135; case 135: m_OldMapChar = reader.ReadBool(); goto case 134; case 134: { int guilds = reader.ReadInt(); for( int i = 0; i < guilds; i++ ) { CustomGuildInfo guild = new CustomGuildInfo( reader ); if( guild != null && guild.GuildStone != null ) CustomGuilds.Add( guild.GuildStone, guild ); } goto case 133; } case 133: m_ChosenDeity = (ChosenDeity)reader.ReadInt(); goto case 132; case 132: m_WikiConfig = reader.ReadString(); goto case 131; case 131: case 130: case 129: { m_ReforgeLocation = reader.ReadPoint3D(); m_ReforgeMap = reader.ReadMap(); m_Reforging = reader.ReadBool(); m_ReforgesLeft = reader.ReadInt(); goto case 128; } case 128: case 127: { m_Technique = reader.ReadString(); m_TechniqueLevel = reader.ReadInt(); m_MediumPieces = reader.ReadInt(); m_HeavyPieces = reader.ReadInt(); goto case 126; } case 126: m_VampSight = reader.ReadBool(); goto case 125; case 125: m_FreeForRP = reader.ReadBool(); goto case 124; case 124: m_VampSafety = reader.ReadBool(); goto case 123; case 123: { m_LastTimeGhouled = reader.ReadDateTime(); m_YearOfDeath = reader.ReadInt(); m_MonthOfDeath = reader.ReadInt(); m_DayOfDeath = reader.ReadInt(); m_IsVampire = reader.ReadBool(); m_MaxBPs = reader.ReadInt(); m_BPs = reader.ReadInt(); m_AutoVampHeal = reader.ReadBool(); goto case 122; } case 122: case 121: m_LogMsgs = reader.ReadBool(); goto case 120; case 120: m_PureDodge = reader.ReadBool(); goto case 119; case 119: m_Tents = reader.ReadStrongItemList(); goto case 118; case 118: m_CraftContainer = (Container)reader.ReadItem(); goto case 117; case 117: case 116: m_SpellBook = (CustomSpellBook)reader.ReadItem(); goto case 115; case 115: case 114: { CustomGuildInfo test = null; if( version < 134 ) test = new CustomGuildInfo( reader ); goto case 113; } case 113: case 112: case 111: case 110: case 109: { m_CurrentCommand = (SongList)reader.ReadInt(); goto case 108; } case 108: { m_SpeedHack = reader.ReadBool(); goto case 107; } case 107: { m_LogoutTime = reader.ReadDateTime(); goto case 106; } case 106: { m_FakeAge = reader.ReadString(); m_FakeLooks = reader.ReadString(); goto case 105; } case 105: { this.NameMod = reader.ReadString(); m_AutoPicking = reader.ReadBool(); goto case 104; } case 104: goto case 103; case 103: { m_SmoothPicking = reader.ReadBool(); goto case 102; } case 102: { m_HasStash = reader.ReadBool(); goto case 101; } case 101: { m_FakeHair = reader.ReadInt(); m_FakeHairHue = reader.ReadInt(); m_FakeFacialHair = reader.ReadInt(); m_FakeFacialHairHue = reader.ReadInt(); m_FakeHue = reader.ReadInt(); m_FakeRPTitle = reader.ReadString(); m_FakeTitlePrefix = reader.ReadString(); goto case 100; } case 100: goto case 99; case 99: goto case 98; case 98: goto case 97; case 97: goto case 96; case 96: { m_FixedRun = reader.ReadBool(); goto case 95; } case 95: { m_LightPieces = reader.ReadInt(); goto case 94; } case 94: { m_ArmourPieces = reader.ReadInt(); goto case 93; } case 93: { m_LightPenalty = reader.ReadInt(); m_MediumPenalty = reader.ReadInt(); m_HeavyPenalty = reader.ReadInt(); goto case 92; } case 92: goto case 91; case 91: { m_FixedRage = reader.ReadBool(); goto case 90; } case 90: goto case 89; case 89: goto case 88; case 88: goto case 87; case 87: goto case 86; case 86: { m_FixedReflexes = reader.ReadBool(); goto case 85; } case 85: { m_FixedStyles = reader.ReadBool(); goto case 84; } case 84: { m_NextMending = reader.ReadDateTime(); goto case 83; } case 83: { m_FixedStatPoints = reader.ReadBool(); goto case 82; } case 82: { m_XPFromCrafting = reader.ReadBool(); m_XPFromKilling = reader.ReadBool(); goto case 81; } case 81: { m_HarvestedCrops = reader.ReadInt(); m_NextHarvestAllowed = reader.ReadDateTime(); goto case 80; } case 80: { m_Spar = reader.ReadBool(); goto case 79; } case 79: { m_HideStatus = reader.ReadBool(); goto case 78; } case 78: { m_DayOfBirth = reader.ReadString(); m_MonthOfBirth = reader.ReadString(); m_YearOfBirth = reader.ReadString(); goto case 77; } case 77: { m_AlyrianGuard = reader.ReadBool(); m_AzhuranGuard = reader.ReadBool(); m_KhemetarGuard = reader.ReadBool(); m_MhordulGuard = reader.ReadBool(); m_TyreanGuard = reader.ReadBool(); m_VhalurianGuard = reader.ReadBool(); goto case 76; } case 76: { m_HearAll = reader.ReadInt(); goto case 75; } case 75: { m_Friendship = new Friendship( reader ); goto case 74; } case 74: { m_CPCapOffset = reader.ReadInt(); m_CPSpent = reader.ReadInt(); goto case 73; } case 73: { m_Description2 = reader.ReadString(); m_Description3 = reader.ReadString(); goto case 72; } case 72: { m_NextBirthday = reader.ReadDateTime(); m_MaxAge = reader.ReadInt(); goto case 71; } case 71: { m_Age = reader.ReadInt(); goto case 70; } case 70: { m_LoggedOutPets = reader.ReadStrongMobileList(); goto case 69; } case 69: { m_RecreateXP = reader.ReadInt(); m_RecreateCP = reader.ReadInt(); goto case 68; } case 68: { m_LastOffenseToNature = reader.ReadDateTime(); goto case 66; } case 66: { Mobile mob = null; if( version < 92 ) mob = reader.ReadMobile(); goto case 65; } case 65: { m_LastDonationLife = reader.ReadDateTime(); goto case 64; } case 64: { m_Lives = reader.ReadInt(); goto case 63; } case 63: { m_AllyList = reader.ReadStrongMobileList(); goto case 62; } case 62: { m_Height = reader.ReadInt(); m_Weight = reader.ReadInt(); goto case 61; } case 61: { m_NextAllowance = reader.ReadDateTime(); goto case 60; } case 60: { m_Backgrounds = new Backgrounds( reader ); goto case 59; } case 59: { m_Description = reader.ReadString(); goto case 58; } case 58: { m_Masterwork = new Masterwork( reader ); goto case 57; } case 57: { m_RacialResources = new RacialResources( reader ); goto case 56; } case 56: { m_KnownLanguages = new KnownLanguages( reader ); goto case 55; } case 55: { m_SpokenLanguage = (KnownLanguage)reader.ReadInt(); goto case 54; } case 54: { m_RPTitle = reader.ReadString(); m_TitlePrefix = reader.ReadString(); goto case 53; } case 53: { m_FocusedShot = reader.ReadInt(); m_SwiftShot = reader.ReadInt(); goto case 52; } case 52: { m_WeaponSpecialization = reader.ReadString(); m_SecondSpecialization = reader.ReadString(); goto case 51; } case 51: { m_CombatStyles = new CombatStyles( reader ); m_SearingBreath = reader.ReadInt(); m_SwipingClaws = reader.ReadInt(); m_TempestuousSea = reader.ReadInt(); m_SilentHowl = reader.ReadInt(); m_ThunderingHooves = reader.ReadInt(); m_VenomousWay = reader.ReadInt(); goto case 50; } case 50: { m_RageHits = reader.ReadInt(); m_RageFeatLevel = reader.ReadInt(); goto case 49; } case 49: { int test = reader.ReadInt(); goto case 48; } case 48: { m_LastChargeStep = reader.ReadDateTime(); goto case 47; } case 47: { m_FormerDirection = (Direction)reader.ReadInt(); m_ChargeSteps = reader.ReadInt(); goto case 46; } case 46: { m_Trample = reader.ReadBool(); goto case 45; } case 45: { m_FlurryOfBlows = reader.ReadInt(); goto case 44; } case 44: { m_FocusedAttack = reader.ReadInt(); m_FightingStance = (FeatList)reader.ReadInt(); goto case 43; } case 43: { m_Intimidated = reader.ReadInt(); goto case 42; } case 42: { m_HasHuntingHoundBonus = reader.ReadBool(); goto case 41; } case 41: { m_HuntingHound = reader.ReadMobile(); m_FreeToUse = reader.ReadBool(); goto case 40; } case 40: { m_Informants = new Informants( reader ); goto case 39; } case 39: { m_EscortPrisoner = reader.ReadMobile(); goto case 38; } case 38: { m_CanBeReplaced = reader.ReadBool(); goto case 37; } case 37: { m_BackToBack = reader.ReadBool(); goto case 36; } case 36: { m_Crippled = reader.ReadBool(); goto case 35; } case 35: { m_CleaveAttack = reader.ReadBool(); goto case 34; } case 34: goto case 33; case 33: { goto case 32; } case 32: { m_SpecialAttack = (FeatList)reader.ReadInt(); m_OffensiveFeat = (FeatList)reader.ReadInt(); goto case 31; } case 31: { m_Feats = new Feats( reader ); goto case 30; } case 30: { m_Subclass = (Subclass)reader.ReadInt(); m_Advanced = (Advanced)reader.ReadInt(); goto case 29; } case 29: { m_CanBeMage = reader.ReadBool(); goto case 28; } case 28: { m_Level = reader.ReadInt(); m_XP = reader.ReadInt(); m_NextLevel = reader.ReadInt(); m_CP = reader.ReadInt(); goto case 27; } case 27: { m_StatPoints = reader.ReadInt(); m_SkillPoints = reader.ReadInt(); m_FeatSlots = reader.ReadInt(); goto case 26; } case 26: { m_Class = (Class)reader.ReadInt(); m_Nation = (Nation)reader.ReadInt(); goto case 25; } case 25: { int recipeCount = reader.ReadInt(); if( recipeCount > 0 ) { m_AcquiredRecipes = new Dictionary<int, bool>(); for( int i = 0; i < recipeCount; i++ ) { int r = reader.ReadInt(); if( reader.ReadBool() ) //Don't add in recipies which we haven't gotten or have been removed m_AcquiredRecipes.Add( r, true ); } } goto case 24; } case 24: { m_LastHonorLoss = reader.ReadDeltaTime(); goto case 23; } case 23: { m_ChampionTitles = new ChampionTitleInfo( reader ); goto case 22; } case 22: { m_LastValorLoss = reader.ReadDateTime(); goto case 21; } case 21: { m_ToTItemsTurnedIn = reader.ReadEncodedInt(); m_ToTTotalMonsterFame = reader.ReadInt(); goto case 20; } case 20: { m_AllianceMessageHue = reader.ReadEncodedInt(); m_GuildMessageHue = reader.ReadEncodedInt(); goto case 19; } case 19: { int rank = reader.ReadEncodedInt(); int maxRank = Guilds.RankDefinition.Ranks.Length -1; if( rank > maxRank ) rank = maxRank; m_GuildRank = Guilds.RankDefinition.Ranks[rank]; m_LastOnline = reader.ReadDateTime(); goto case 18; } case 18: { m_SolenFriendship = (SolenFriendship) reader.ReadEncodedInt(); goto case 17; } case 17: // changed how DoneQuests is serialized case 16: { m_Quest = QuestSerializer.DeserializeQuest( reader ); if ( m_Quest != null ) m_Quest.From = this; int count = reader.ReadEncodedInt(); if ( count > 0 ) { m_DoneQuests = new List<QuestRestartInfo>(); for ( int i = 0; i < count; ++i ) { Type questType = QuestSerializer.ReadType( QuestSystem.QuestTypes, reader ); DateTime restartTime; if ( version < 17 ) restartTime = DateTime.MaxValue; else restartTime = reader.ReadDateTime(); m_DoneQuests.Add( new QuestRestartInfo( questType, restartTime ) ); } } m_Profession = reader.ReadEncodedInt(); goto case 15; } case 15: { m_LastCompassionLoss = reader.ReadDeltaTime(); goto case 14; } case 14: { m_CompassionGains = reader.ReadEncodedInt(); if ( m_CompassionGains > 0 ) m_NextCompassionDay = reader.ReadDeltaTime(); goto case 13; } case 13: // just removed m_PayedInsurance list case 12: { m_BOBFilter = new Engines.BulkOrders.BOBFilter( reader ); goto case 11; } case 11: { if ( version < 13 ) { List<Item> payed = reader.ReadStrongItemList(); for ( int i = 0; i < payed.Count; ++i ) payed[i].PayedInsurance = true; } goto case 10; } case 10: { if ( reader.ReadBool() ) { m_HairModID = reader.ReadInt(); m_HairModHue = reader.ReadInt(); m_BeardModID = reader.ReadInt(); m_BeardModHue = reader.ReadInt(); // We cannot call SetHairMods( -1, -1 ) here because the items have not yet loaded Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RevertHair ) ); } goto case 9; } case 9: { SavagePaintExpiration = reader.ReadTimeSpan(); if ( SavagePaintExpiration > TimeSpan.Zero ) { BodyMod = ( Female ? 184 : 183 ); HueMod = 0; } goto case 8; } case 8: { m_NpcGuild = (NpcGuild)reader.ReadInt(); m_NpcGuildJoinTime = reader.ReadDateTime(); m_NpcGuildGameTime = reader.ReadTimeSpan(); goto case 7; } case 7: { m_PermaFlags = reader.ReadStrongMobileList(); goto case 6; } case 6: { NextTailorBulkOrder = reader.ReadTimeSpan(); goto case 5; } case 5: { NextSmithBulkOrder = reader.ReadTimeSpan(); goto case 4; } case 4: { m_LastJusticeLoss = reader.ReadDeltaTime(); m_JusticeProtectors = reader.ReadStrongMobileList(); goto case 3; } case 3: { m_LastSacrificeGain = reader.ReadDeltaTime(); m_LastSacrificeLoss = reader.ReadDeltaTime(); m_AvailableResurrects = reader.ReadInt(); goto case 2; } case 2: { m_Flags = (PlayerFlag)reader.ReadInt(); goto case 1; } case 1: { m_LongTermElapse = reader.ReadTimeSpan(); m_ShortTermElapse = reader.ReadTimeSpan(); m_GameTime = reader.ReadTimeSpan(); if (version < 147) m_Crimes = reader.ReadInt(); //CrimesList if (version < 148) { m_CrimesList = new Dictionary<Mobiles.Nation, int>(); m_CrimesList.Add(Nation.Alyrian, 0); m_CrimesList.Add(Nation.Azhuran, 0); m_CrimesList.Add(Nation.Khemetar, 0); m_CrimesList.Add(Nation.Mhordul, 0); m_CrimesList.Add(Nation.Tyrean, 0); m_CrimesList.Add(Nation.Vhalurian, 0); m_CrimesList.Add(Nation.Imperial, 0); m_CrimesList.Add(Nation.Sovereign, 0); m_CrimesList.Add(Nation.Society, 0); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { Nation n = (Nation)reader.ReadInt(); int c = reader.ReadInt(); //m_CrimesList.Add(n, c); } } else { m_CrimesList = new Dictionary<Mobiles.Nation, int>(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { Nation n = (Nation)reader.ReadInt(); int c = reader.ReadInt(); m_CrimesList.Add(n, c); } } m_NextCriminalAct = reader.ReadDateTime(); m_CriminalActivity = reader.ReadBool(); m_Disguised = reader.ReadBool(); m_LastDisguiseTime = reader.ReadDateTime(); if (version < 149) { m_LastDeath = DateTime.Now - TimeSpan.FromDays(1); } else m_LastDeath = reader.ReadDateTime(); goto case 0; } case 0: { break; } } if (m_AvatarID == 0) m_AvatarID = 1076; //m_CrimesList.Add(Nation.Insularii, 0); if (m_CustomAvatarID1 == 0) m_CustomAvatarID1 = 1076; if (m_CustomAvatarID2 == 0) m_CustomAvatarID2 = 1076; if (m_CustomAvatarID3 == 0) m_CustomAvatarID3 = 1076; // Professions weren't verified on 1.0 RC0 if ( !CharacterCreation.VerifyProfession( m_Profession ) ) m_Profession = 0; if ( m_PermaFlags == null ) m_PermaFlags = new List<Mobile>(); if ( m_JusticeProtectors == null ) m_JusticeProtectors = new List<Mobile>(); if ( m_BOBFilter == null ) m_BOBFilter = new Engines.BulkOrders.BOBFilter(); if( m_GuildRank == null ) m_GuildRank = Guilds.RankDefinition.Member; //Default to member if going from older verstion to new version (only time it should be null) if( m_LastOnline == DateTime.MinValue && Account != null ) m_LastOnline = ((Account)Account).LastLogin; if( m_ChampionTitles == null ) m_ChampionTitles = new ChampionTitleInfo(); List<Mobile> list = this.Stabled; for ( int i = 0; i < list.Count; ++i ) { BaseCreature bc = list[i] as BaseCreature; if ( bc != null ) bc.IsStabled = true; } CheckAtrophies( this ); /*if( Hidden ) //Hiding is the only buff where it has an effect that's serialized. AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );*/ if( this.Lives >= 0 && !this.Alive && this.Corpse != null ) this.SendGump( new DeathGump( this, 15, this.Corpse ) ); if( this.Backpack is ArmourBackpack ) { ArmourBackpack pack = this.Backpack as ArmourBackpack; pack.Attributes.NightSight = 0; } if( version < 135 && AccessLevel < AccessLevel.GameMaster ) OldMapChar = true; if( version < 141 ) { FixSkillCost( FeatInfo.FeatCost.High, FeatInfo.FeatCost.Medium, Feats.GetFeatLevel(FeatList.Magery) ); FixSkillCost( FeatInfo.FeatCost.High, FeatInfo.FeatCost.Low, Feats.GetFeatLevel(FeatList.Concentration) ); } if( version < 145 ) { m_TitlePrefix = null; m_RPTitle = "the Alyrian"; if( m_Nation == Nation.Alyrian ) m_RPTitle = "the Alyrian"; else if( m_Nation == Nation.Azhuran ) m_RPTitle = "the Azhuran"; else if( m_Nation == Nation.Khemetar ) m_RPTitle = "the Khemetar"; else if( m_Nation == Nation.Mhordul ) m_RPTitle = "the Mhordul"; else if( m_Nation == Nation.Tyrean ) m_RPTitle = "the Tyrean"; else if( m_Nation == Nation.Vhalurian ) m_RPTitle = "the Vhalurian"; } m_Intimidated = 0; #region Removing Healing and HairStyling as feats and returning to players their CP if (Feats.GetFeatLevel(FeatList.Healing) == 3) { Feats.FeatDictionary[FeatList.Healing].AttemptRemoval(this, 3, true); } if (Feats.GetFeatLevel(FeatList.Healing) == 2) { Feats.FeatDictionary[FeatList.Healing].AttemptRemoval(this, 2, true); } if (Feats.GetFeatLevel(FeatList.Healing) == 1) { Feats.FeatDictionary[FeatList.Healing].AttemptRemoval(this, 1, true); } if (Feats.GetFeatLevel(FeatList.HairStyling) == 3) { Feats.FeatDictionary[FeatList.HairStyling].AttemptRemoval(this, 3, true); } if (Feats.GetFeatLevel(FeatList.HairStyling) == 2) { Feats.FeatDictionary[FeatList.HairStyling].AttemptRemoval(this, 2, true); } if (Feats.GetFeatLevel(FeatList.HairStyling) == 1) { Feats.FeatDictionary[FeatList.HairStyling].AttemptRemoval(this, 1, true); } #endregion m_Deserialized = true; }