Inheritance: Universe.Framework.Modules.IDataTransferable
        public EventData CreateEvent(UUID creator, UUID regionID, UUID parcelID, DateTime date, uint cover,
                                     EventFlags maturity, uint flags, uint duration, Vector3 localPos, string name,
                                     string description, string category)
        {
            object remoteValue = DoRemote(creator, regionID, parcelID, date, cover, maturity, flags, duration, localPos,
                                          name, description, category);
            if (remoteValue != null || m_doRemoteOnly)
                return (EventData) remoteValue;

            IRegionData regiondata = Framework.Utilities.DataManager.RequestPlugin<IRegionData>();
            if (regiondata == null)
            {
                return null;
            }

            GridRegion region = regiondata.Get(regionID, null);
            if (region == null)
            {
                return null;
            }

            EventData eventData = new EventData ();
            eventData.eventID = GetMaxEventID () + 1;
            eventData.creator = creator.ToString();
            eventData.simName = region.RegionName;
            eventData.date = date.ToString(new DateTimeFormatInfo());
            eventData.dateUTC = (uint) Util.ToUnixTime(date);
            eventData.amount = cover;
            eventData.cover = cover;
            eventData.maturity = (int) maturity;
            eventData.eventFlags = flags | (uint) maturity;
            eventData.duration = duration;
            eventData.globalPos = new Vector3(
                region.RegionLocX + localPos.X,
                region.RegionLocY + localPos.Y,
                region.RegionLocZ + localPos.Z);
            eventData.regionPos = localPos;
            eventData.name = name;
            eventData.description = description;
            eventData.category = category;

            Dictionary<string, object> row = new Dictionary<string, object>(15);
            row["EID"] = eventData.eventID;
            row["creator"] = creator.ToString();
            row["region"] = regionID.ToString();
            row["parcel"] = parcelID.ToString();
            row["date"] = date.ToString("s");
            row["cover"] = eventData.cover;
            row["maturity"] = (uint) maturity;
            row["flags"] = flags;
            row["duration"] = duration;
            row["localPosX"] = localPos.X;
            row["localPosY"] = localPos.Y;
            row["localPosZ"] = localPos.Z;
            row["name"] = name;
            row["description"] = description;
            row["category"] = category;

            GD.Insert(m_eventInfoTable, row);

            return eventData;
        }
        static List<EventData> Query2EventData(List<string> RetVal)
        {
            List<EventData> Events = new List<EventData>();
            IRegionData regiondata = Framework.Utilities.DataManager.RequestPlugin<IRegionData>();
            if (RetVal.Count%16 != 0 || regiondata == null)
            {
                return Events;
            }

            for (int i = 0; i < RetVal.Count; i += 16)
            {
                EventData data = new EventData();

                GridRegion region = regiondata.Get(UUID.Parse(RetVal[2]), null);
                if (region == null)
                {
                    continue;
                }
                data.simName = region.RegionName;

                data.eventID = Convert.ToUInt32(RetVal[i]);
                data.creator = RetVal[i + 1];

                //Parse the time out for the viewer
                DateTime date = DateTime.Parse(RetVal[i + 4]);
                data.date = date.ToString(new DateTimeFormatInfo());
                data.dateUTC = (uint) Util.ToUnixTime(date);

                data.cover = data.amount = Convert.ToUInt32(RetVal[i + 5]);
                data.maturity = Convert.ToInt32(RetVal[i + 6]);
                data.eventFlags = Convert.ToUInt32(RetVal[i + 7]);
                data.duration = Convert.ToUInt32(RetVal[i + 8]);

                // be aware of culture differences here...
                var posX = (float)Convert.ToDecimal (RetVal[i + 9], Culture.NumberFormatInfo);
                var posY = (float)Convert.ToDecimal (RetVal[1 + 10], Culture.NumberFormatInfo);
                var posZ = (float)Convert.ToDecimal (RetVal[i + 11], Culture.NumberFormatInfo);
                data.regionPos = new Vector3 (posX, posY, posZ);

            //                data.regionPos = new Vector3(
            //                    float.Parse(RetVal[i + 9]),
            //                    float.Parse(RetVal[i + 10]),
            //                    float.Parse(RetVal[i + 11])
            //                    );

                data.globalPos = new Vector3(
                    region.RegionLocX + data.regionPos.X,
                    region.RegionLocY + data.regionPos.Y,
                    region.RegionLocZ + data.regionPos.Z
                    );

                data.name = RetVal[i + 12];
                data.description = RetVal[i + 13];
                data.category = RetVal[i + 14];

                Events.Add(data);
            }

            return Events;
        }