mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-30 14:26:10 +02:00
Linkshell inviting completed.
This commit is contained in:
parent
8a0ebe7ec4
commit
108d8be013
22 changed files with 377 additions and 43 deletions
|
@ -381,7 +381,41 @@ namespace FFXIVClassic_World_Server
|
|||
|
||||
public static bool LinkshellAddPlayer(ulong lsId, uint charaId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
query = @"
|
||||
INSERT INTO characters_linkshells
|
||||
(characterId, linkshellId)
|
||||
VALUES
|
||||
(@charaId, @lsId)
|
||||
";
|
||||
|
||||
cmd = new MySqlCommand(query, conn);
|
||||
cmd.Parameters.AddWithValue("@charaId", charaId);
|
||||
cmd.Parameters.AddWithValue("@lsId", lsId);
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
Program.Log.Error(e.ToString());
|
||||
conn.Dispose();
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool LinkshellRemovePlayer(ulong lsId, uint charaId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue