Exemplo n.º 1
0
 void deleteArea(String name)
 {
     if (MUDEdit.executeSQL("DELETE FROM area WHERE name='" + name + "'"))
     {
         MUDEdit.curArea = null;
         World.area.Remove(name);
         MUDEdit.fetchArea(lstArea);
     }
 }
Exemplo n.º 2
0
 void deleteMonster(String name)
 {
     if (MUDEdit.executeSQL("DELETE FROM monster WHERE name='" + name + "'"))
     {
         MUDEdit.curMonster = null;
         World.monster.Remove(name);
         MUDEdit.fetchMonster(lstMonster);
     }
 }
Exemplo n.º 3
0
 bool addArea(String name)
 {
     if (!World.area.ContainsKey(name))
     {
         Area a = new Area(name);
         World.area[name] = a;
         if (MUDEdit.executeSQL("INSERT INTO area(name, json) VALUES('" + name + "','" + a.GetJSON() + "')"))
         {
             MUDEdit.fetchArea(lstArea);
             MUDEdit.curArea  = World.area[name];
             MUDEdit.formArea = new FormArea();
             MUDEdit.formArea.Show();
             this.Hide();
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 4
0
 bool addMonster(String name)
 {
     if (!World.monster.ContainsKey(name))
     {
         Monster m = new Monster(name);
         World.monster[name] = m;
         if (MUDEdit.executeSQL("INSERT INTO monster(name) VALUES('" + name + "')"))
         {
             MUDEdit.fetchMonster(lstMonster);
             MUDEdit.curMonster  = World.monster[name];
             MUDEdit.formMonster = new FormMonster();
             MUDEdit.formMonster.Show();
             this.Hide();
             return(true);
         }
     }
     return(false);
 }