Пример #1
0
        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.");
        }
Пример #2
0
 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.");
 }
Пример #3
0
        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));
        }
Пример #4
0
        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);
        }
Пример #6
0
        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 ) );
        }