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 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 override void OnResponse(Mobile mob, string text) { text = text.Trim(); if (text.Length > 40) { text = text.Substring(0, 40); } if (text.Length > 0) { SR_Rune rune = null; if (IsRunebook) { rune = new SR_Rune(text, true); } else { rune = new SR_Rune(text, TargetMap, TargetLoc); } if (RuneAcc.ChildRune == null) { RuneAcc.AddRune(rune); } else { RuneAcc.ChildRune.AddRune(rune); } } SR_Gump.Send(mob, RuneAcc); }
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 ) ); }