public static void ReadAccountNode(XmlElement parent) { Console.Write(" Account: {0}... ", parent.GetAttribute("Username")); try { SR_RuneAccount acc = new SR_RuneAccount(parent.GetAttribute("Username")); if (parent.HasChildNodes) { XmlElement child = parent.FirstChild as XmlElement; acc.AddRune(ReadRuneNode(child)); while (child.NextSibling != null) { child = child.NextSibling as XmlElement; acc.AddRune(ReadRuneNode(child)); } /*foreach( XmlElement child in parent.GetElementsByTagName("Runebook") ) if( child != null ) acc.AddRune(ReadRunebookNode(child)); foreach( XmlElement child in parent.GetElementsByTagName("Rune") ) if( child != null ) acc.AddRune(ReadRuneNode(child));*/ } } catch { Console.WriteLine("failed."); } Console.WriteLine("done."); }
public static void ReadAccountNode(XmlElement parent) { Console.Write(" Account: {0}... ", parent.GetAttribute("Username")); try { SR_RuneAccount acc = new SR_RuneAccount(parent.GetAttribute("Username")); if (parent.HasChildNodes) { XmlElement child = parent.FirstChild as XmlElement; acc.AddRune(ReadRuneNode(child)); while (child.NextSibling != null) { child = child.NextSibling as XmlElement; acc.AddRune(ReadRuneNode(child)); } /*foreach( XmlElement child in parent.GetElementsByTagName("Runebook") ) * if( child != null ) * acc.AddRune(ReadRunebookNode(child)); * foreach( XmlElement child in parent.GetElementsByTagName("Rune") ) * if( child != null ) * acc.AddRune(ReadRuneNode(child));*/ } } catch { Console.WriteLine("failed."); } Console.WriteLine("done."); }
public static void NewRuneAcc(SR_RuneAccount acc) { acc.Clear(); acc.AddRune(AddTree(GoGump.Felucca, Map.Felucca)); acc.AddRune(AddTree(GoGump.Trammel, Map.Trammel)); acc.AddRune(AddTree(GoGump.Ilshenar, Map.Ilshenar)); }
public static void AddInfo(SR_RuneAccount runeAccount) { for (int i = 0; i < Info.Count; i++) if (Info[i].Username == runeAccount.Username) Info.RemoveAt(i); Info.Add(runeAccount); }
public static void WriteAccountNode(SR_RuneAccount a, XmlTextWriter xml) { xml.WriteStartElement("RuneAccount"); xml.WriteAttributeString("Username", a.Username); for (int i = 0; i < a.Count; i++) WriteRuneNode(a.Runes[i], xml); xml.WriteEndElement(); }
public static void NewRuneAcc(SR_RuneAccount acc) { acc.Clear(); acc.AddRune(AddTree(GoGump.Felucca, Map.Felucca)); acc.AddRune(AddTree(GoGump.Trammel, Map.Trammel)); acc.AddRune(AddTree(GoGump.Ilshenar, Map.Ilshenar)); acc.AddRune(AddTree(GoGump.Malas, Map.Malas)); acc.AddRune(AddTree(GoGump.Tokuno, Map.Tokuno)); //acc.AddRune( AddTree( GoGump.TerMur, Map.TerMur ) ); }
public static void WriteAccountNode(SR_RuneAccount a, XmlTextWriter xml) { xml.WriteStartElement("RuneAccount"); xml.WriteAttributeString("Username", a.Username); for (int i = 0; i < a.Count; i++) { WriteRuneNode(a.Runes[i], xml); } xml.WriteEndElement(); }
public static void AddInfo(SR_RuneAccount runeAccount) { for (int i = 0; i < Info.Count; i++) { if (Info[i].Username == runeAccount.Username) { Info.RemoveAt(i); } } Info.Add(runeAccount); }
public SR_Gump( SR_RuneAccount runeAcc ) : base(0, 27) { RuneAcc = runeAcc; int count = 0; if( RuneAcc.ChildRune == null ) count = RuneAcc.Count; else count = RuneAcc.ChildRune.Count; int RunebooksH = 0, RunebooksW = 0; int tier = -1; if( RuneAcc.ChildRune != null ) tier = RuneAcc.ChildRune.Tier; if( tier > -1 ) { if( tier == 0 ) { RunebooksH = 42; RunebooksW = 278; } else { RunebooksH = 37 + 42; RunebooksW = 278 + (tier*5); } } int RunesH = 10*2; if( count > 10 ) count = 10; if( count > 0 ) RunesH += (count*22); if( count > 1 ) RunesH += ((count-1)*5); DisplayHeader(); if( tier > -1 ) DisplayRunebooks( 42, RunebooksH, RunebooksW, tier ); DisplayAddNew( 42 + RunebooksH + RunesH ); DisplayRunes( 42 + RunebooksH, RunesH ); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("Joeku's Staff Runebook: Loading..."); Console.WriteLine(" Migrating data from version 1.00... "); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { SR_RuneAccount.Deserialize(reader, version); } Console.WriteLine(); this.Delete(); }
public static SR_RuneAccount FetchInfo( string username ) { SR_RuneAccount runeAcc = null; for( int i = 0; i < SR_Main.Count; i++ ) if( SR_Main.Info[i].Username == username ) { runeAcc = SR_Main.Info[i]; break; } if( runeAcc == null ) { runeAcc = new SR_RuneAccount( username ); NewRuneAcc( runeAcc ); } return runeAcc; }
public static SR_RuneAccount FetchInfo(string username) { SR_RuneAccount runeAcc = null; for (int i = 0; i < SR_Main.Count; i++) { if (SR_Main.Info[i].Username == username) { runeAcc = SR_Main.Info[i]; break; } } if (runeAcc == null) { runeAcc = new SR_RuneAccount(username); NewRuneAcc(runeAcc); } return(runeAcc); }
public static void Send(Mobile mob, SR_RuneAccount runeAcc) { mob.CloseGump(typeof(SR_Gump)); mob.SendGump(new SR_Gump(runeAcc)); }
public SR_Gump(SR_RuneAccount runeAcc) : base(0, 27) { this.RuneAcc = runeAcc; int count = 0; if (this.RuneAcc.ChildRune == null) { count = this.RuneAcc.Count; } else { count = this.RuneAcc.ChildRune.Count; } int RunebooksH = 0, RunebooksW = 0; int tier = -1; if (this.RuneAcc.ChildRune != null) { tier = this.RuneAcc.ChildRune.Tier; } if (tier > -1) { if (tier == 0) { RunebooksH = 42; RunebooksW = 278; } else { RunebooksH = 37 + 42; RunebooksW = 278 + (tier * 5); } } int RunesH = 10 * 2; if (count > 10) { count = 10; } if (count > 0) { RunesH += (count * 22); } if (count > 1) { RunesH += ((count - 1) * 5); } this.DisplayHeader(); if (tier > -1) { this.DisplayRunebooks(42, RunebooksH, RunebooksW, tier); } this.DisplayAddNew(42 + RunebooksH + RunesH); this.DisplayRunes(42 + RunebooksH, RunesH); }
public SR_NewRuneTarget(SR_RuneAccount runeAcc) : base(12, true, TargetFlags.None) { RuneAcc = runeAcc; }
public SR_NewRuneTarget(SR_RuneAccount runeAcc) : base(12, true, TargetFlags.None) { this.RuneAcc = runeAcc; }
public SR_NewRunePrompt(SR_RuneAccount runeAcc) { this.RuneAcc = runeAcc; this.IsRunebook = true; }
public static void Send( Mobile mob, SR_RuneAccount runeAcc ) { mob.CloseGump( typeof( SR_Gump ) ); mob.SendGump( new SR_Gump( runeAcc ) ); }
public SR_NewRunePrompt( SR_RuneAccount runeAcc ) { RuneAcc = runeAcc; IsRunebook = true; }
public static void NewRuneAcc( SR_RuneAccount acc ) { acc.Clear(); acc.AddRune( AddTree( GoGump.Felucca, Map.Felucca ) ); acc.AddRune( AddTree( GoGump.Trammel, Map.Trammel ) ); acc.AddRune( AddTree( GoGump.Ilshenar, Map.Ilshenar ) ); acc.AddRune( AddTree( GoGump.Malas, Map.Malas ) ); acc.AddRune( AddTree( GoGump.Tokuno, Map.Tokuno ) ); acc.AddRune( AddTree( GoGump.TerMur, Map.TerMur ) ); }
public SR_NewRunePrompt( SR_RuneAccount runeAcc, Point3D targetLoc, Map targetMap ) { RuneAcc = runeAcc; TargetLoc = targetLoc; TargetMap = targetMap; }
public SR_NewRunePrompt(SR_RuneAccount runeAcc, Point3D targetLoc, Map targetMap) { this.RuneAcc = runeAcc; this.TargetLoc = targetLoc; this.TargetMap = targetMap; }
public SR_Gump(Mobile m, SR_RuneAccount runeAcc) : base(0, 27) { RuneAcc = runeAcc; int count = 0; if (RuneAcc.ChildRune == null) { count = RuneAcc.Count; } else { count = RuneAcc.ChildRune.Count; } int RunebooksH = 0, RunebooksW = 0; int tier = -1; if (RuneAcc.ChildRune != null) { tier = RuneAcc.ChildRune.Tier; } if (tier > -1) { if (tier == 0) { RunebooksH = 42; RunebooksW = 278; } else { RunebooksH = 37 + 42; RunebooksW = 278 + (tier * 5); } } int RunesH = 10 * 2; if (count > 10) { count = 10; } if (count > 0) { RunesH += (count * 22); } if (count > 1) { RunesH += ((count - 1) * 5); } DisplayHeader(); int labelHue = m != null && m.NetState != null && m.NetState.IsEnhancedClient ? 2101 : 2100; if (tier > -1) { DisplayRunebooks(42, RunebooksH, RunebooksW, tier, labelHue); } DisplayAddNew(42 + RunebooksH + RunesH, labelHue); DisplayRunes(42 + RunebooksH, RunesH, labelHue); }
public SR_NewRunePrompt(SR_RuneAccount runeAcc) { RuneAcc = runeAcc; IsRunebook = true; }