[arthea] r466 committed - more work on the editor

1 view
Skip to first unread message

art...@googlecode.com

unread,
Apr 20, 2011, 3:26:22 AM4/20/11
to arthea-...@googlegroups.com
Revision: 466
Author: c0der78
Date: Wed Apr 20 00:25:42 2011
Log: more work on the editor
http://code.google.com/p/arthea/source/detail?r=466

Added:
/trunk/ArtheaEditor/EditField.cs
/trunk/ArtheaEditor/IEditor.cs
/trunk/ArtheaEditor/InstanceEditor.Designer.cs
/trunk/ArtheaEditor/InstanceEditor.cs
/trunk/ArtheaEditor/InstanceEditor.resx
/trunk/ArtheaEditor/NpcEditor.cs
/trunk/ArtheaEngine.Tests/ArgumentTest.cs
/trunk/ArtheaEngine.Tests/Program.cs
Deleted:
/trunk/ArtheaEditor/AreaEditor.Designer.cs
/trunk/ArtheaEditor/AreaEditor.resx
Modified:
/trunk/ArtheaEditor/AreaEditor.cs
/trunk/ArtheaEditor/ArtheaEditor.csproj
/trunk/ArtheaEditor/CollectionEditor.cs
/trunk/ArtheaEditor/EditorForm.Designer.cs
/trunk/ArtheaEditor/EditorForm.cs
/trunk/ArtheaEditor/Program.cs
/trunk/ArtheaEngine/ArtheaEngine.csproj
/trunk/ArtheaEngine/IEntity.cs
/trunk/ArtheaEngine/Model/Ability.cs
/trunk/ArtheaEngine/Model/Area.cs
/trunk/ArtheaEngine/Model/Character.cs
/trunk/ArtheaEngine/Model/Object.cs
/trunk/ArtheaEngine/Model/Room.cs
/trunk/ArtheaEngine/Money.cs
/trunk/ArtheaEngine.Tests/ArtheaEngine.Tests.csproj
/trunk/ArtheaEngine.Tests/MoneyTest.cs
/trunk/ArtheaEngine.Tests/TestWriter.cs
/trunk/ArtheaServer/Creation/ResetEditor.cs
/trunk/arthea.sql
/trunk/sqldump.bat

=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/EditField.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,140 @@
+namespace ArtheaEditor
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Drawing;
+ using System.Linq;
+ using System.Text;
+ using System.Windows.Forms;
+
+ public interface IEditField : IEditor
+ {
+ #region Methods
+
+ object Retrieve();
+
+ #endregion Methods
+ }
+
+ public class CollectionField : Button, IEditField
+ {
+ #region Fields
+
+ object _data;
+ Control _editor;
+
+ #endregion Fields
+
+ #region Constructors
+
+ public CollectionField(IEditor editor)
+ {
+ _editor = editor as Control;
+
+ Click += StartEditor;
+ }
+
+ #endregion Constructors
+
+ #region Methods
+
+ public object Retrieve()
+ {
+ return _data;
+ }
+
+ public void Update(object value)
+ {
+ _data = value;
+
+ if (value == null || !(value is ICollection))
+ {
+ Text = "0 items";
+ return;
+ }
+
+ Text = (value as ICollection).Count + " items";
+ }
+
+ private void StartEditor(object o, EventArgs e)
+ {
+ Program.MainEditor.Save();
+
+ var back = new Button();
+ back.Text = "Back";
+ back.Dock = DockStyle.Bottom;
+ back.Click += (o2, e2) => { Program.MainEditor.Restore();
_editor.Controls.Remove(back); };
+ _editor.Controls.Add(back);
+
+ Program.MainEditor.SetEditor(_editor);
+ Program.MainEditor.SetCollection(_data as ICollection);
+ }
+
+ #endregion Methods
+ }
+
+ public class SelectorField : Button, IEditField
+ {
+ #region Fields
+
+ private object _data;
+
+ #endregion Fields
+
+ #region Constructors
+
+ public SelectorField()
+ {
+ Click += SelectItem;
+ }
+
+ #endregion Constructors
+
+ #region Methods
+
+ public object Retrieve()
+ {
+ return _data;
+ }
+
+ public void Update(object value)
+ {
+ _data = value;
+ Text = value == null ? "None" : value.ToString();
+ }
+
+ private void SelectItem(object o, EventArgs e)
+ {
+ MessageBox.Show("Not supported yet.", "Unsupported",
MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+ }
+
+ #endregion Methods
+ }
+
+ public class TextField : TextBox, IEditField
+ {
+ #region Constructors
+
+ public TextField()
+ {
+ Dock = DockStyle.Fill;
+ }
+
+ #endregion Constructors
+
+ #region Methods
+
+ public object Retrieve()
+ {
+ return Text;
+ }
+
+ public void Update(object value)
+ {
+ Text = value == null ? string.Empty : value.ToString();
+ }
+
+ #endregion Methods
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/IEditor.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,16 @@
+namespace ArtheaEditor
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ public interface IEditor
+ {
+ #region Methods
+
+ void Update(object value);
+
+ #endregion Methods
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/InstanceEditor.Designer.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,64 @@
+namespace ArtheaEditor
+{
+ partial class InstanceEditor
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.tableLayoutPanel1 = new
System.Windows.Forms.TableLayoutPanel();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new
System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.ColumnStyles.Add(new
System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
100F));
+ this.tableLayoutPanel1.Dock =
System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(0,
0);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 1;
+ this.tableLayoutPanel1.RowStyles.Add(new
System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(150,
150);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // InstanceEditor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScroll = true;
+ this.AutoSize = true;
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Name = "InstanceEditor";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/InstanceEditor.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,67 @@
+namespace ArtheaEditor
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel;
+ using System.Data;
+ using System.Drawing;
+ using System.Linq;
+ using System.Reflection;
+ using System.Text;
+ using System.Windows.Forms;
+
+ public abstract partial class InstanceEditor : UserControl, IEditor
+ {
+ #region Fields
+
+ private object _editing;
+ private Dictionary<PropertyInfo, IEditField> _fields = new
Dictionary<PropertyInfo, IEditField>();
+
+ #endregion Fields
+
+ #region Constructors
+
+ public InstanceEditor()
+ {
+ InitializeComponent();
+
+ Dock = DockStyle.Fill;
+ }
+
+ #endregion Constructors
+
+ #region Methods
+
+ public void AddRow(PropertyInfo pi, IEditField field)
+ {
+ var label = new Label { Text = pi.Name + ":" };
+
+ tableLayoutPanel1.Controls.Add(label, 0, _fields.Count);
+
+ tableLayoutPanel1.ColumnStyles.Add(new
ColumnStyle(SizeType.AutoSize));
+
+ tableLayoutPanel1.Controls.Add(field as Control, 1,
_fields.Count);
+
+ tableLayoutPanel1.ColumnStyles.Add(new
ColumnStyle(SizeType.Percent, 100));
+
+ _fields.Add(pi, field);
+ }
+
+ public void Update(object value)
+ {
+ _editing = value;
+
+ UpdateFields();
+ }
+
+ protected void UpdateFields()
+ {
+ foreach (var entry in _fields)
+ {
+ entry.Value.Update(entry.Key.GetValue(_editing, null));
+ }
+ }
+
+ #endregion Methods
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/InstanceEditor.resx Wed Apr 20 00:25:42 2011
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader,
System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter,
System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this
is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color,
System.Drawing">Blue</data>
+ <data name="Bitmap1"
mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework
object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form
of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ :
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0"
/>
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string"
/>
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string"
minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"
msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string"
msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string"
msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"
/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
=======================================
--- /dev/null
+++ /trunk/ArtheaEditor/NpcEditor.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,30 @@
+namespace ArtheaEditor
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel;
+ using System.Data;
+ using System.Drawing;
+ using System.Linq;
+ using System.Text;
+ using System.Windows.Forms;
+
+ using ArtheaEngine;
+ using ArtheaEngine.Model;
+
+ public partial class NpcEditor : InstanceEditor
+ {
+ #region Methods
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ AddRow(PropertyHelper<NonPlayer>.GetProperty(x => x.Id), new
TextField { ReadOnly = true });
+ AddRow(PropertyHelper<NonPlayer>.GetProperty(x => x.Name), new
TextField());
+ AddRow(PropertyHelper<NonPlayer>.GetProperty(x =>
x.Description), new TextField { Multiline = true });
+ }
+
+ #endregion Methods
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEngine.Tests/ArgumentTest.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,14 @@
+namespace ArtheaEngine.Tests
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class ArgumentTest
+ {
+ }
+}
=======================================
--- /dev/null
+++ /trunk/ArtheaEngine.Tests/Program.cs Wed Apr 20 00:25:42 2011
@@ -0,0 +1,20 @@
+namespace ArtheaEngine.Tests
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+
+ class Program
+ {
+ #region Methods
+
+ [STAThread]
+ static void Main(string[] args)
+ {
+ NUnit.ConsoleRunner.Runner.Main(args);
+ }
+
+ #endregion Methods
+ }
+}
=======================================
--- /trunk/ArtheaEditor/AreaEditor.Designer.cs Tue Apr 19 15:23:35 2011
+++ /dev/null
@@ -1,62 +0,0 @@
-namespace ArtheaEditor
-{
- partial class AreaEditor
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.tableLayoutPanel1 = new
System.Windows.Forms.TableLayoutPanel();
- this.SuspendLayout();
- //
- // tableLayoutPanel1
- //
- this.tableLayoutPanel1.ColumnCount = 2;
- this.tableLayoutPanel1.ColumnStyles.Add(new
System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
50F));
- this.tableLayoutPanel1.ColumnStyles.Add(new
System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
50F));
- this.tableLayoutPanel1.Dock =
System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel1.Location = new System.Drawing.Point(0,
0);
- this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.RowCount = 2;
- this.tableLayoutPanel1.RowStyles.Add(new
System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel1.RowStyles.Add(new
System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(150,
150);
- this.tableLayoutPanel1.TabIndex = 0;
- //
- // AreaEditor
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.tableLayoutPanel1);
- this.Name = "AreaEditor";
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
- }
-}
=======================================
--- /trunk/ArtheaEditor/AreaEditor.resx Tue Apr 19 15:23:35 2011
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader,
System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter,
System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this
is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color,
System.Drawing">Blue</data>
- <data name="Bitmap1"
mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework
object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing"
mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form
of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- :
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns=""
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0"
/>
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string"
/>
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string"
minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"
msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string"
msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string"
msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0"
msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"
/>
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
=======================================
--- /trunk/ArtheaEditor/AreaEditor.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEditor/AreaEditor.cs Wed Apr 20 00:25:42 2011
@@ -4,6 +4,7 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
+ using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Drawing;
using System.Linq;
@@ -11,46 +12,23 @@
using System.Text;
using System.Windows.Forms;

+ using ArtheaEngine;
using ArtheaEngine.Model;

- public partial class AreaEditor : UserControl
- {
- #region Fields
-
- private Dictionary<PropertyInfo, Control> _fields = new
Dictionary<PropertyInfo, Control>();
-
- #endregion Fields
-
- #region Constructors
-
- public AreaEditor()
- {
- InitializeComponent();
- }
-
- #endregion Constructors
-
+ public partial class AreaEditor : InstanceEditor
+ {
#region Methods

protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

- foreach (var pi in typeof(Area).GetProperties())
- {
- if (!pi.CanRead)
- continue;
-
- var label = new Label { Text = pi.Name };
-
- tableLayoutPanel1.Controls.Add(label);
-
- var valctl = new TextBox();
-
- _fields.Add(pi, valctl);
-
- tableLayoutPanel1.Controls.Add(valctl);
- }
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.Id), new
TextField { ReadOnly = true });
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.Name), new
TextField());
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.Description),
new TextField { Multiline = true });
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.Credits), new
TextField());
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.World), new
SelectorField());
+ AddRow(PropertyHelper<Area>.GetProperty(x => x.NonPlayers),
new CollectionField(new NpcEditor()));
}

#endregion Methods
=======================================
--- /trunk/ArtheaEditor/ArtheaEditor.csproj Tue Apr 19 15:23:35 2011
+++ /trunk/ArtheaEditor/ArtheaEditor.csproj Wed Apr 20 00:25:42 2011
@@ -44,6 +44,7 @@
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL" />
<Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@@ -56,14 +57,14 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
+ <Reference Include="Transitions">
+ <HintPath>..\External\Transitions.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AreaEditor.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="AreaEditor.Designer.cs">
- <DependentUpon>AreaEditor.cs</DependentUpon>
- </Compile>
<Compile Include="ArtheaSplashScreen.cs">
<SubType>Form</SubType>
</Compile>
@@ -82,6 +83,10 @@
<Compile Include="EditorForm.Designer.cs">
<DependentUpon>EditorForm.cs</DependentUpon>
</Compile>
+ <Compile Include="EditField.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="IEditor.cs" />
<Compile Include="ImportDialog.cs">
<SubType>Form</SubType>
</Compile>
@@ -103,11 +108,17 @@
<Compile Include="Import\Rom\ShopSection.cs" />
<Compile Include="Import\Rom\SocialSection.cs" />
<Compile Include="Import\Rom\SpecialSection.cs" />
+ <Compile Include="InstanceEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="InstanceEditor.Designer.cs">
+ <DependentUpon>InstanceEditor.cs</DependentUpon>
+ </Compile>
+ <Compile Include="NpcEditor.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="AreaEditor.resx">
- <DependentUpon>AreaEditor.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="ArtheaSplashScreen.resx">
<DependentUpon>ArtheaSplashScreen.cs</DependentUpon>
</EmbeddedResource>
@@ -123,6 +134,9 @@
<DependentUpon>ImportDialog.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="InstanceEditor.resx">
+ <DependentUpon>InstanceEditor.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -160,7 +174,7 @@
-->
<ProjectExtensions>
<VisualStudio>
- <UserProperties
BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.TimeStamp.None"
BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs"
BuildVersion_UpdateFileVersion="True"
BuildVersion_UpdateAssemblyVersion="True" />
+ <UserProperties BuildVersion_UpdateAssemblyVersion="True"
BuildVersion_UpdateFileVersion="True"
BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs"
BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.TimeStamp.None" />
</VisualStudio>
</ProjectExtensions>
</Project>
=======================================
--- /trunk/ArtheaEditor/CollectionEditor.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEditor/CollectionEditor.cs Wed Apr 20 00:25:42 2011
@@ -1,11 +1,19 @@
namespace ArtheaEditor
{
using System;
+ using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;

public partial class CollectionEditor : UserControl
{
+ #region Fields
+
+ IEditor _editor;
+ private Stack<CollectionData> _history = new
Stack<CollectionData>();
+
+ #endregion Fields
+
#region Constructors

public CollectionEditor()
@@ -27,22 +35,63 @@

#region Methods

- public void SetCollection<T>(IList<T> items)
- where T : class
- {
+ public void Restore()
+ {
+ var data = _history.Pop();
+
+ SetEditor(data.Editor as Control);
+ SetCollection(data.Data);
+ }
+
+ public void Save()
+ {
+ _history.Push(new CollectionData(lstCollection.DataSource,
_editor));
+ }
+
+ public void SetCollection(ICollection items)
+ {
+ lstCollection.DataSource = null;
lstCollection.DataSource = items;
}

public void SetEditor(Control ctl)
{
+ _editor = ctl as IEditor;
splitContainer1.Panel2.Controls.Clear();
splitContainer1.Panel2.Controls.Add(ctl);
}

private void lstCollection_SelectedIndexChanged(object sender,
EventArgs e)
{
+ if (_editor == null || lstCollection.SelectedItem == null)
return;
+
+ _editor.Update(lstCollection.SelectedItem);
}

#endregion Methods
+
+ #region Nested Types
+
+ private struct CollectionData
+ {
+ #region Fields
+
+ public ICollection Data;
+ public IEditor Editor;
+
+ #endregion Fields
+
+ #region Constructors
+
+ public CollectionData(object data, IEditor editor)
+ {
+ Data = data as ICollection;
+ Editor = editor;
+ }
+
+ #endregion Constructors
+ }
+
+ #endregion Nested Types
}
}
=======================================
--- /trunk/ArtheaEditor/EditorForm.Designer.cs Tue Apr 19 15:23:35 2011
+++ /trunk/ArtheaEditor/EditorForm.Designer.cs Wed Apr 20 00:25:42 2011
@@ -32,19 +32,20 @@
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.importToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.saveToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.exitToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.editorToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.helpToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.aboutToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
- this.openFileDialog1 = new
System.Windows.Forms.OpenFileDialog();
this.riversOfMudToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.smaugToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.circleToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.rOTToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.saveToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.exitToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.editorToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.areasToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.helpsToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
this.socialsToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.helpToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.aboutToolStripMenuItem = new
System.Windows.Forms.ToolStripMenuItem();
+ this.openFileDialog1 = new
System.Windows.Forms.OpenFileDialog();
+ this.mainEditor = new ArtheaEditor.CollectionEditor();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
@@ -78,20 +79,48 @@
this.circleToolStripMenuItem,
this.rOTToolStripMenuItem});
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
- this.importToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
+ this.importToolStripMenuItem.Size = new
System.Drawing.Size(110, 22);
this.importToolStripMenuItem.Text = "&Import";
//
+ // riversOfMudToolStripMenuItem
+ //
+ this.riversOfMudToolStripMenuItem.Name
= "riversOfMudToolStripMenuItem";
+ this.riversOfMudToolStripMenuItem.Size = new
System.Drawing.Size(111, 22);
+ this.riversOfMudToolStripMenuItem.Text = "RO&M";
+ this.riversOfMudToolStripMenuItem.Click += new
System.EventHandler(this.riversOfMudToolStripMenuItem_Click);
+ //
+ // smaugToolStripMenuItem
+ //
+ this.smaugToolStripMenuItem.Name = "smaugToolStripMenuItem";
+ this.smaugToolStripMenuItem.Size = new
System.Drawing.Size(111, 22);
+ this.smaugToolStripMenuItem.Text = "Smau&g";
+ this.smaugToolStripMenuItem.Click += new
System.EventHandler(this.smaugToolStripMenuItem_Click);
+ //
+ // circleToolStripMenuItem
+ //
+ this.circleToolStripMenuItem.Name = "circleToolStripMenuItem";
+ this.circleToolStripMenuItem.Size = new
System.Drawing.Size(111, 22);
+ this.circleToolStripMenuItem.Text = "&Circle";
+ this.circleToolStripMenuItem.Click += new
System.EventHandler(this.circleToolStripMenuItem_Click);
+ //
+ // rOTToolStripMenuItem
+ //
+ this.rOTToolStripMenuItem.Name = "rOTToolStripMenuItem";
+ this.rOTToolStripMenuItem.Size = new System.Drawing.Size(111,
22);
+ this.rOTToolStripMenuItem.Text = "RO&T";
+ this.rOTToolStripMenuItem.Click += new
System.EventHandler(this.rOTToolStripMenuItem_Click);
+ //
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(152,
22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(110,
22);
this.saveToolStripMenuItem.Text = "&Save";
this.saveToolStripMenuItem.Click += new
System.EventHandler(this.saveToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
- this.exitToolStripMenuItem.Size = new System.Drawing.Size(152,
22);
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(110,
22);
this.exitToolStripMenuItem.Text = "E&xit";
//
// editorToolStripMenuItem
@@ -104,6 +133,25 @@
this.editorToolStripMenuItem.Size = new
System.Drawing.Size(50, 20);
this.editorToolStripMenuItem.Text = "&Editor";
//
+ // areasToolStripMenuItem
+ //
+ this.areasToolStripMenuItem.Name = "areasToolStripMenuItem";
+ this.areasToolStripMenuItem.Size = new
System.Drawing.Size(110, 22);
+ this.areasToolStripMenuItem.Text = "&Areas";
+ this.areasToolStripMenuItem.Click += new
System.EventHandler(this.areasToolStripMenuItem_Click);
+ //
+ // helpsToolStripMenuItem
+ //
+ this.helpsToolStripMenuItem.Name = "helpsToolStripMenuItem";
+ this.helpsToolStripMenuItem.Size = new
System.Drawing.Size(110, 22);
+ this.helpsToolStripMenuItem.Text = "&Helps";
+ //
+ // socialsToolStripMenuItem
+ //
+ this.socialsToolStripMenuItem.Name
= "socialsToolStripMenuItem";
+ this.socialsToolStripMenuItem.Size = new
System.Drawing.Size(110, 22);
+ this.socialsToolStripMenuItem.Text = "&Socials";
+ //
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.DropDownItems.AddRange(new
System.Windows.Forms.ToolStripItem[] {
@@ -122,58 +170,20 @@
//
this.openFileDialog1.FileName = "openFileDialog1";
//
- // riversOfMudToolStripMenuItem
+ // mainEditor
//
- this.riversOfMudToolStripMenuItem.Name
= "riversOfMudToolStripMenuItem";
- this.riversOfMudToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.riversOfMudToolStripMenuItem.Text = "RO&M";
- this.riversOfMudToolStripMenuItem.Click += new
System.EventHandler(this.riversOfMudToolStripMenuItem_Click);
- //
- // smaugToolStripMenuItem
- //
- this.smaugToolStripMenuItem.Name = "smaugToolStripMenuItem";
- this.smaugToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.smaugToolStripMenuItem.Text = "Smau&g";
- this.smaugToolStripMenuItem.Click += new
System.EventHandler(this.smaugToolStripMenuItem_Click);
- //
- // circleToolStripMenuItem
- //
- this.circleToolStripMenuItem.Name = "circleToolStripMenuItem";
- this.circleToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.circleToolStripMenuItem.Text = "&Circle";
- this.circleToolStripMenuItem.Click += new
System.EventHandler(this.circleToolStripMenuItem_Click);
- //
- // rOTToolStripMenuItem
- //
- this.rOTToolStripMenuItem.Name = "rOTToolStripMenuItem";
- this.rOTToolStripMenuItem.Size = new System.Drawing.Size(152,
22);
- this.rOTToolStripMenuItem.Text = "RO&T";
- this.rOTToolStripMenuItem.Click += new
System.EventHandler(this.rOTToolStripMenuItem_Click);
- //
- // areasToolStripMenuItem
- //
- this.areasToolStripMenuItem.Name = "areasToolStripMenuItem";
- this.areasToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.areasToolStripMenuItem.Text = "&Areas";
- this.areasToolStripMenuItem.Click += new
System.EventHandler(this.areasToolStripMenuItem_Click);
- //
- // helpsToolStripMenuItem
- //
- this.helpsToolStripMenuItem.Name = "helpsToolStripMenuItem";
- this.helpsToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.helpsToolStripMenuItem.Text = "&Helps";
- //
- // socialsToolStripMenuItem
- //
- this.socialsToolStripMenuItem.Name
= "socialsToolStripMenuItem";
- this.socialsToolStripMenuItem.Size = new
System.Drawing.Size(152, 22);
- this.socialsToolStripMenuItem.Text = "&Socials";
+ this.mainEditor.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.mainEditor.Location = new System.Drawing.Point(0, 24);
+ this.mainEditor.Name = "mainEditor";
+ this.mainEditor.Size = new System.Drawing.Size(737, 413);
+ this.mainEditor.TabIndex = 1;
//
// EditorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(737, 437);
+ this.Controls.Add(this.mainEditor);
this.Controls.Add(this.menuStrip1);
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
@@ -204,6 +214,7 @@
private System.Windows.Forms.ToolStripMenuItem
areasToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
helpsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem
socialsToolStripMenuItem;
+ private CollectionEditor mainEditor;
}
}

=======================================
--- /trunk/ArtheaEditor/EditorForm.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEditor/EditorForm.cs Wed Apr 20 00:25:42 2011
@@ -18,54 +18,19 @@
public EditorForm()
{
InitializeComponent();
+
+ Program.MainEditor = mainEditor;
}

#endregion Constructors

#region Methods
-
- private static Panel CreateFieldEditor<T>(object obj)
- {
- var layout = new TableLayoutPanel();
-
- foreach (var pi in typeof (T).GetProperties())
- {
- if (!pi.CanRead)
- continue;
-
- var label = new Label {Text = pi.Name};
-
- layout.Controls.Add(label);
-
- if (pi.PropertyType.IsInstanceOfType(typeof
(IEnumerable<T>)))
- {
- //var ctl = new NestedCollectionEditor();
-
- var ctl = new Label
- {Text = string.Format("{0} items",
((IQueryable<T>) pi.GetValue(obj, null)).Count())};
-
- layout.Controls.Add(ctl);
- continue;
- }
-
- var val = pi.GetValue(obj, null);
- var valctl = new TextBox {Text = val.ToString()};
-
- layout.Controls.Add(valctl);
- }
- return layout;
- }

private void areasToolStripMenuItem_Click(object sender, EventArgs
e)
{
- var ed = new CollectionEditor();
-
- ed.SetCollection(Area.List.ToList());
-
- ed.SetEditor(new AreaEditor());
-
- Controls.Clear();
- Controls.Add(ed);
+ mainEditor.SetEditor(new AreaEditor());
+
+ mainEditor.SetCollection(Area.List.ToList());
}

private void circleToolStripMenuItem_Click(object sender,
EventArgs e)
=======================================
--- /trunk/ArtheaEditor/Program.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEditor/Program.cs Wed Apr 20 00:25:42 2011
@@ -9,14 +9,20 @@

internal static class Program
{
+ #region Fields
+
+ public static CollectionEditor MainEditor;
+
+ #endregion Fields
+
#region Methods

[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- new MyApp().Run(args);
+ Application.SetCompatibleTextRenderingDefault(false);
+ new MyApp().Run(args);
}

#endregion Methods
=======================================
--- /trunk/ArtheaEngine/ArtheaEngine.csproj Mon Apr 18 15:16:31 2011
+++ /trunk/ArtheaEngine/ArtheaEngine.csproj Wed Apr 20 00:25:42 2011
@@ -63,6 +63,7 @@
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL" />
<Reference Include="System" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
=======================================
--- /trunk/ArtheaEngine/IEntity.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/IEntity.cs Wed Apr 20 00:25:42 2011
@@ -1,6 +1,7 @@
namespace ArtheaEngine
{
using System;
+ using System.ComponentModel.DataAnnotations;

public interface IEntity<T>
{
=======================================
--- /trunk/ArtheaEngine/Model/Ability.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Model/Ability.cs Wed Apr 20 00:25:42 2011
@@ -11,8 +11,6 @@

using NLog;

- using Object = ArtheaEngine.Model.Object;
-
public abstract class Ability : ICloneable, IEntity<int>, ISaveable,
ILoadable
{
#region Fields
=======================================
--- /trunk/ArtheaEngine/Model/Area.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Model/Area.cs Wed Apr 20 00:25:42 2011
@@ -4,15 +4,14 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
+ using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.Linq.Mapping;
using System.Linq;

using NLog;

- using Object = ArtheaEngine.Model.Object;
-
- public class Area : IEntity<int>, ISaveable, ILoadable
+ public class Area : IEntity<int>, ISaveable, ILoadable, IFormattable
{
#region Fields

@@ -56,6 +55,7 @@
get; set;
}

+ [Key]
public int Id
{
get; set;
@@ -234,6 +234,20 @@
room.Tick();
}
}
+
+ public string ToString(string format, IFormatProvider
formatProvider)
+ {
+ if (string.IsNullOrEmpty(format) || format == "N")
+ {
+ return Name.ToString(formatProvider);
+ }
+
+ switch (format)
+ {
+ default:
+ throw new FormatException("unknown format identifier
for area");
+ }
+ }

#endregion Methods
}
=======================================
--- /trunk/ArtheaEngine/Model/Character.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Model/Character.cs Wed Apr 20 00:25:42 2011
@@ -12,8 +12,6 @@

using NLog;

- using Object = ArtheaEngine.Model.Object;
-
#region Enumerations

[Flags]
@@ -391,7 +389,7 @@

public virtual string ToString(string format, IFormatProvider
formatProvider)
{
- if (string.IsNullOrEmpty(format) || format == "G")
+ if (string.IsNullOrEmpty(format) || format == "N")
{
if (formatProvider is ActionFormatter)
{
=======================================
--- /trunk/ArtheaEngine/Model/Object.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Model/Object.cs Wed Apr 20 00:25:42 2011
@@ -144,7 +144,8 @@
[Flags]
public enum WearFlag
{
- None
+ None,
+ Take
}

public enum WearLocation
@@ -370,7 +371,12 @@
area.Objects.Add(this);
Type = reader.GetEnum<ObjectType>(i++);

- var ms = new MemoryStream(reader.GetValue(i++) as byte[]);
+ byte[] data = reader.GetValue(i++) as byte[];
+
+ if (data == null)
+ return i;
+
+ var ms = new MemoryStream(data);
var bf = new BinaryFormatter();

Values = bf.Deserialize(ms) as IList<object>;
=======================================
--- /trunk/ArtheaEngine/Model/Room.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Model/Room.cs Wed Apr 20 00:25:42 2011
@@ -9,8 +9,6 @@

using NLog;

- using Object = ArtheaEngine.Model.Object;
-
#region Enumerations

[Flags]
@@ -183,18 +181,12 @@

public void LoadReset(IDbConnection conn)
{
- var cmd = conn.CreateCommand("select_room_reset");
-
- cmd.AddParameter("@id", DbType.Int32, Id);
-
- using (var reader = cmd.ExecuteReader())
- {
-
- if (!reader.Read()) return;
-
- Reset = new Reset(this);
- Reset.MapRow(reader);
- }
+ var reset = new Reset(this);
+
+ if (!reset.Load(conn))
+ return;
+
+ Reset = reset;
}

public int MapRow(IDataRecord reader)
=======================================
--- /trunk/ArtheaEngine/Money.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine/Money.cs Wed Apr 20 00:25:42 2011
@@ -120,10 +120,9 @@
public Money Copper()
{
decimal dTmp;
- bool neg = Value < 0;

// subtract the gold
- if (!neg)
+ if (Value >= 0)
{
dTmp = Value - Math.Truncate(Value);
} else {
@@ -136,10 +135,7 @@
dTmp -= Math.Truncate(dTmp);

// get the copper
- dTmp *= 100;
-
- if (neg)
- dTmp = -dTmp;
+ dTmp *= 10;

return dTmp;
}
@@ -180,10 +176,9 @@
public Money Silver()
{
decimal dTmp;
- bool neg = Value < 0;

// subtract the gold
- if (!neg)
+ if (Value >= 0)
{
dTmp = Value - Math.Truncate(Value);
}
@@ -194,12 +189,6 @@

// get the silver
dTmp *= 100;
-
- if (neg)
- {
- Console.WriteLine("Copper was negative");
- dTmp = -dTmp;
- }

return dTmp;
}
@@ -216,16 +205,16 @@

public string ToString(string format, IFormatProvider
formatProvider)
{
- if (format == null) format = "D";
+ if (format == null) format = "G";

switch (format.ToUpper())
{
case "G":
- return Gold().Value.ToString("C");
+ return Value.ToString("C");
case "S":
- return Silver().Value.ToString("C");
+ return ValueAs(Currency.Silver).Value.ToString("C1");
case "C":
- return Copper().Value.ToString("C");
+ return ValueAs(Currency.Copper).Value.ToString("C0");
default:
return Value.ToString(format);
}
@@ -242,11 +231,11 @@
{
default:
case Currency.Gold:
- return Gold();
+ return Value;
case Currency.Silver:
- return Silver() + Gold() * 100;
+ return Value * 10;
case Currency.Copper:
- return Copper() + Silver() * 10 + Gold() * 100;
+ return Value * 100;
}
}

=======================================
--- /trunk/ArtheaEngine.Tests/ArtheaEngine.Tests.csproj Mon Apr 18 17:51:17
2011
+++ /trunk/ArtheaEngine.Tests/ArtheaEngine.Tests.csproj Wed Apr 20 00:25:42
2011
@@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B470B426-F8F2-4AF0-8677-C9C93A27A2AA}</ProjectGuid>
- <OutputType>Library</OutputType>
+ <OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ArtheaEngine.Tests</RootNamespace>
<AssemblyName>ArtheaEngine.Tests</AssemblyName>
@@ -30,8 +30,16 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup>
+ <StartupObject>ArtheaEngine.Tests.Program</StartupObject>
+ </PropertyGroup>
<ItemGroup>
- <Reference Include="nunit.framework, Version=2.5.10.11092,
Culture=neutral, PublicKeyToken=96d09a1eb7f44a77,
processorArchitecture=MSIL" />
+ <Reference Include="nunit-console-runner">
+ <HintPath>..\..\..\..\..\Program Files\NUnit
2.5.10\bin\net-2.0\lib\nunit-console-runner.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.10.11092,
Culture=neutral, PublicKeyToken=96d09a1eb7f44a77,
processorArchitecture=MSIL">
+ <HintPath>..\..\..\..\..\Program Files\NUnit
2.5.10\bin\net-2.0\framework\nunit.framework.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -41,11 +49,13 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="ArgumentTest.cs" />
<Compile Include="ArtheaHelperTest.cs" />
<Compile Include="ColorTest.cs" />
<Compile Include="ColumnsTest.cs" />
<Compile Include="ExtensionsTest.cs" />
<Compile Include="MoneyTest.cs" />
+ <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestWriter.cs" />
</ItemGroup>
=======================================
--- /trunk/ArtheaEngine.Tests/MoneyTest.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine.Tests/MoneyTest.cs Wed Apr 20 00:25:42 2011
@@ -35,11 +35,11 @@
{
var m = new Money(-3.54m);

- Assert.AreEqual(m.Copper(), -40);
+ Assert.AreEqual(m.Copper(), -4);

m = -m;

- Assert.AreEqual(m.Copper(), 40);
+ Assert.AreEqual(m.Copper(), 4);

m -= 0.04m;

@@ -84,6 +84,10 @@
var m = new Money(3.54m);

Assert.AreEqual(m.Gold(), 3);
+
+ m = -m;
+
+ Assert.AreEqual(m.Gold(), -3);
}

[Test]
@@ -135,6 +139,32 @@

Assert.IsFalse(m == 2.5m);
}
+
+ [Test]
+ public void ToStringTest()
+ {
+ var m = new Money(3.54m);
+
+ Assert.AreEqual(m.ToString(), "$3.54");
+
+ Assert.AreEqual(m.ToString("C"), "$354");
+
+ Assert.AreEqual(m.ToString("S"), "$35.4");
+
+ Assert.AreEqual(m.ToString("G"), "$3.54");
+ }
+
+ [Test]
+ public void ValueAsTest()
+ {
+ var m = new Money(3.54m);
+
+ Assert.AreEqual(m.ValueAs(Currency.Gold), 3.54m);
+
+ Assert.AreEqual(m.ValueAs(Currency.Silver), 35.4m);
+
+ Assert.AreEqual(m.ValueAs(Currency.Copper), 354m);
+ }

#endregion Methods
}
=======================================
--- /trunk/ArtheaEngine.Tests/TestWriter.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaEngine.Tests/TestWriter.cs Wed Apr 20 00:25:42 2011
@@ -5,7 +5,7 @@
using System.Linq;
using System.Text;

- public class TestWriter : IWritable, IEquatable<StringBuilder>
+ public class TestWriter : IWritable
{
#region Fields

@@ -19,11 +19,6 @@
{
_buf.Clear();
}
-
- public bool Equals(StringBuilder other)
- {
- return _buf.Equals(other);
- }

public void Page(string buf)
{
@@ -52,19 +47,17 @@

public void WriteLine()
{
- _buf.Append(Environment.NewLine);
+ _buf.AppendLine();
}

public void WriteLine(object value)
{
- Write(value);
- WriteLine();
+ _buf.AppendLine(value.ToString());
}

public void WriteLine(string format, params object[] args)
{
- Write(format, args);
- WriteLine();
+ _buf.AppendFormat(format, args).AppendLine();
}

#endregion Methods
=======================================
--- /trunk/ArtheaServer/Creation/ResetEditor.cs Tue Apr 19 15:57:05 2011
+++ /trunk/ArtheaServer/Creation/ResetEditor.cs Wed Apr 20 00:25:42 2011
@@ -5,7 +5,6 @@
using System.Linq;
using System.Text;

- using ArtheaEngine;
using ArtheaEngine.Model;

public class ResetEditor : Editor
@@ -18,15 +17,10 @@

#region Constructors

- public ResetEditor(TelnetConnection conn, Reset data)
+ public ResetEditor(TelnetConnection conn, Reset reset)
: base(conn)
{
- _data = data;
- OnBack += new ActionHandler(() =>
- {
- if (_data.Room.Reset != _data)
- _data.Room.Reset = _data;
- });
+ _data = reset;
}

#endregion Constructors
@@ -35,49 +29,21 @@

public override string Title
{
- get { return string.Format("Reset Editor - {0}", _data.Id); }
+ get { throw new NotImplementedException(); }
}

#endregion Properties

#region Methods
-
- public override bool Execute(Argument argument)
- {
- var arg = argument.Next();
-
- if (base.Execute(arg))
- return true;
-
- if (arg.Is("C") || arg.Is("code"))
- {
- var ed = new TextEditor(_connection, _data,
PropertyHelper<Reset>.GetProperty(x => x.Code));
- Forward(ed);
- return true;
- }
- return false;
- }

public override void Save()
{
- if (_data.Save())
- _connection.WriteLine("Reset saved.");
- else
- _connection.WriteLine("Reset not saved. See logs for
details.");
+ throw new NotImplementedException();
}

public override void Show()
{
- Reset();
-
- var cols = new ColumnList(2);
-
- cols.Add(" ~CId: ~W{0}", _data.Id);
- cols.Add(" ~CRoom: ~W{0} ({1})", _data.Room.Id,
_data.Room.Name);
-
- cols.Add(2, TextEditor.Preview("~YC) ~CCode", _data.Code,
_connection.ScreenWidth));
-
- cols.Show(_connection);
+ throw new NotImplementedException();
}

#endregion Methods
=======================================
--- /trunk/arthea.sql Tue Apr 19 15:57:05 2011
+++ /trunk/arthea.sql Wed Apr 20 00:25:42 2011
@@ -1,8 +1,8 @@
--- MySQL dump 10.13 Distrib 5.5.11, for Win64 (x86)
+-- MySQL dump 10.13 Distrib 5.5.10, for Win32 (x86)
--
-- Host: localhost Database: arthea
-- ------------------------------------------------------
--- Server version 5.5.11
+-- Server version 5.5.10

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -81,7 +81,7 @@
`credits` varchar(75) DEFAULT NULL,
`world_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`area_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
@@ -134,7 +134,7 @@
`position` varchar(45) DEFAULT NULL,
`sex` varchar(45) DEFAULT NULL,
PRIMARY KEY (`char_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
@@ -276,7 +276,7 @@
`inside_id` bigint(20) DEFAULT NULL,
`values` blob,
PRIMARY KEY (`object_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
@@ -324,7 +324,7 @@
`code` mediumtext,
`room_id` bigint(20) NOT NULL,
PRIMARY KEY (`reset_id`,`room_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
@@ -342,7 +342,7 @@
`terrain` varchar(45) DEFAULT NULL,
`flags` tinytext,
PRIMARY KEY (`room_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
@@ -399,8 +399,2146 @@
`name` varchar(45) DEFAULT NULL,
`port` smallint(6) DEFAULT '4000',
PRIMARY KEY (`world_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping routines for database 'arthea'
+--
+/*!50003 DROP PROCEDURE IF EXISTS `count_players` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `count_players`()
+BEGIN
+ SELECT COUNT(*) FROM `arthea`.`player`;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_ability` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_ability`(`@id` int)
+BEGIN
+ DELETE FROM `arthea`.`ability` WHERE `ability_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_account` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_account`(`@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`account` WHERE `account_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_affect` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_affect`(`@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`affect` WHERE `affect_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_area` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_area`(id bigint)
+BEGIN
+ DELETE FROM `arthea`.`area` WHERE `area_id` = `id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_board` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_board`(`@id` int)
+BEGIN
+ DELETE FROM `arthea`.`board` WHERE `board_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_char` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_char`(`@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`character`
+ WHERE `char_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_char_obj` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_char_obj`(
+ `@id` bigint,
+ `@char_id` bigint,
+ `@obj_id` bigint
+)
+BEGIN
+ DELETE FROM `arthea`.`char_object` WHERE `char_obj_id` = `@id`
+ AND `char_id` = `@char_id` AND `object_id` = `@obj_id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_class` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_class`(
+ `@id` int
+)
+BEGIN
+ DELETE FROM `arthea`.`class`
+ WHERE `class_id` = `@id`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_exit` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_exit`(
+ `@id` bigint,
+ `@room` bigint,
+ `@dir` varchar(45)
+)
+BEGIN
+ DELETE FROM `arthea`.`exit`
+ WHERE `exit_id` = `@id`
+ AND `room_id` = `@room`
+ AND `direction` = `@dir`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_help` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_help`(`@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`help` WHERE `help_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_help_keyword` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_help_keyword`(
+ `@id` bigint, `@keyword` varchar(145))
+BEGIN
+ DELETE FROM `arthea`.`help_keyword` WHERE `help_id` = `@id`
+ AND `keyword` = `@keyword` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_nonplayer` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_nonplayer`(
+ `@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`nonplayer` WHERE `char_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_note` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_note`(
+ `@id` bigint, `@board` bigint
+)
+BEGIN
+ DELETE FROM `arthea`.`note`
+ WHERE `note_id` = `@id`
+ AND `board_id` = `@board`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_object` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_object`(`@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`object` WHERE `object_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_player` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_player`(
+ `@id` bigint
+)
+BEGIN
+ DELETE FROM `arthea`.`player`
+ WHERE `char_id` = `@id`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_race` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_race`(`@id` int)
+BEGIN
+ DELETE FROM `arthea`.`race` WHERE `race_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_related_help` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_related_help`(
+ `@id` bigint, `@related` bigint)
+BEGIN
+ DELETE FROM `arthea`.`help_related` WHERE `help_id` = `@id`
+ AND `related_id` = `@related` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_reset` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_reset`(
+ `@id` bigint,
+ `@room` bigint
+)
+BEGIN
+ DELETE FROM `arthea`.`reset`
+ WHERE `reset_id` = `@id`
+ AND `room_id` = `@room`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_room` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_room`(
+ `@id` bigint)
+BEGIN
+ DELETE FROM `arthea`.`room` WHERE `room_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_shop` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_shop`(
+ `@id` bigint,
+ `@owner` bigint
+)
+BEGIN
+ DELETE FROM `arthea`.`shop`
+ WHERE `shop_id` = `@id`
+ AND `owner_id` = `@owner`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_social` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_social`(`@id` int)
+BEGIN
+ DELETE FROM `arthea`.`social` WHERE `social_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `delete_world` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `delete_world`(`@id` int)
+BEGIN
+ DELETE FROM `arthea`.`world` WHERE `world_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_ability` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_ability`(`@id` int)
+BEGIN
+ SELECT * FROM `arthea`.`ability` WHERE `ability_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_account` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_account`(
+ `@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`account` WHERE `account_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_affect` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_affect`(`@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`affect` WHERE `affect_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_area` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_area`(`@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`area` WHERE `area_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_board` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_board`(`@id` int)
+BEGIN
+ SELECT * FROM `arthea`.`board` WHERE `board_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_class` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_class`(
+ `@id` int
+)
+BEGIN
+ SELECT * FROM `arthea`.`class`
+ WHERE `class_id` = `@id`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_exit` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_exit`(
+ `@id` bigint,
+ `@room` bigint,
+ `@dir` varchar(45)
+)
+BEGIN
+ SELECT * FROM `arthea`.`exit`
+ WHERE `exit_id` = `@id`
+ AND `room_id` = `@room`
+ AND `direction` = `@dir`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_help` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_help`(`@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`help` WHERE `help_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_nonplayer` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_nonplayer`(
+ `@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`nonplayer`
+ NATURAL JOIN `arthea`.`character`
+ WHERE `char_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_note` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_note`(
+ `@id` bigint,
+ `@board` bigint
+)
+BEGIN
+ SELECT * FROM `arthea`.`note`
+ WHERE `note_id` = `@id`
+ AND `board_id` = `@board`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_object` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_object`(`@id` bigint)
+BEGIN
+ SELECT * from `arthea`.`object` WHERE `object_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_player` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_player`(
+ `@id` bigint
+)
+BEGIN
+ SELECT * FROM `arthea`.`character`
+ NATURAL JOIN `arthea`.`player`
+ WHERE `char_id` = `@id`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_race` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_race`(`@id` int)
+BEGIN
+ SELECT * FROM `arthea`.`race` WHERE `race_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_reset` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_reset`(
+ `@id` bigint,
+ `@room` bigint
+)
+BEGIN
+ SELECT * FROM `arthea`.`reset`
+ WHERE `reset_id` = `@id`
+ AND `room_id` = `@room` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_room` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_room`(`@id` bigint)
+BEGIN
+ SELECT * FROM `arthea`.`room` WHERE `room_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_shop` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_shop`(
+ `@id` bigint,
+ `@owner` bigint
+)
+BEGIN
+ SELECT * FROM `arthea`.`shop`
+ WHERE `shop_id` = `@id`
+ AND `owner_id` = `@owner`
+ LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_social` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_social`(`@id` int)
+BEGIN
+ SELECT * FROM `arthea`.`social` WHERE `social_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `read_world` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `read_world`(`@id` int)
+BEGIN
+ SELECT * FROM `arthea`.`world` WHERE `world_id` = `@id` LIMIT 1;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `save_ability` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `save_ability`(
+ `@id` int,
+ `@name` varchar(45),
+ `@level` smallint,
+ `@descr` varchar(145),
+ `@cost` decimal
+)
+BEGIN
+ INSERT INTO `arthea`.`ability` (
+ `ability_id`,
+ `name`,
+ `level`,
+ `description`,
+ `cost`
+ ) VALUES (
+ `@id`,
+ `@name`,
+ `@level`,
+ `@descr`,
+ `@cost`
+ )
+ ON DUPLICATE KEY
+ UPDATE
+ `name` = `@name`,
+ `level` = `@level`,
+ `description` = `@descr`,
+ `cost` = `@cost`;
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `save_account` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode
= 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`arthea`@`localhost`*/ /*!50003
PROCEDURE `save_account`(
+ `@id` bigint,
+ `@login` varchar(45),
+ `@passwd` tinyblob,
+ `@email` varchar(145),
+ `@flags` tinytext
+)
+BEGIN
+ INSERT INTO `arthea`.`account` (
+ `account_id`,
+ `login`,
+ `password`,
+ `email`,
+ `flags`
+ ) VALUES (
+ `@id`,
+ `@login`,
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/sqldump.bat Mon Apr 18 15:16:31 2011
+++ /trunk/sqldump.bat Wed Apr 20 00:25:42 2011
@@ -1,3 +1,3 @@
-mysqldump --u arthea --password=arthea arthea --no-data=true > arthea.sql
+mysqldump --u arthea --password=arthea arthea --no-data=true --routines >
arthea.sql
@echo.
@echo Arthea database successfully saved to arthea.sql
Reply all
Reply to author
Forward
0 new messages