File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Collections ;
2
3
using System . Collections . Generic ;
3
4
using System . Windows . Forms ;
4
5
using MySql . Data . MySqlClient ;
@@ -38,6 +39,27 @@ private static string GetSpellName(uint id)
38
39
return string . Empty ;
39
40
}
40
41
42
+ public static ArrayList GetScriptNames ( uint id )
43
+ {
44
+ ArrayList scripts = new ArrayList ( ) ;
45
+ string query = $ "SELECT * FROM `spell_script_names` where `spell_id` = { id } ;";
46
+ using ( _conn = new MySql . Data . MySqlClient . MySqlConnection ( ConnectionString ) )
47
+ {
48
+ _command = new MySqlCommand ( query , _conn ) ;
49
+ _conn . Open ( ) ;
50
+
51
+ using ( var reader = _command . ExecuteReader ( ) )
52
+ {
53
+ while ( reader . Read ( ) )
54
+ {
55
+ var scriptName = reader . GetString ( 1 ) ;
56
+ scripts . Add ( scriptName ) ;
57
+ }
58
+ }
59
+ }
60
+ return scripts ;
61
+ }
62
+
41
63
public static void SelectProc ( string query )
42
64
{
43
65
using ( _conn = new MySql . Data . MySqlClient . MySqlConnection ( ConnectionString ) )
You can’t perform that action at this time.
0 commit comments