using System; using System.Collections.Generic; using System.Text; using libsecondlife; using System.Xml; namespace OpenSim.world { public class AvatarAnimations { public Dictionary AnimsLLUUID = new Dictionary(); public Dictionary AnimsNames = new Dictionary(); public AvatarAnimations() { } public void LoadAnims() { OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); XmlDocument doc = new XmlDocument(); doc.Load(reader); foreach (XmlNode nod in doc.DocumentElement.ChildNodes) { if ( nod.Attributes["name"] != null) { AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText); } } reader.Close(); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); foreach (KeyValuePair kp in OpenSim.world.Avatar.Animations.AnimsLLUUID) { AnimsNames.Add(kp.Value, kp.Key); } } } }