From 58d40012282651b6bb284e4470e9489980deeb7d Mon Sep 17 00:00:00 2001 From: travisdmathis Date: Sun, 14 Oct 2018 21:01:00 -0400 Subject: [PATCH] updates quests.killed to quests.field0 --- Database_MySql.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Database_MySql.cs b/Database_MySql.cs index 1418831..51c1eb8 100644 --- a/Database_MySql.cs +++ b/Database_MySql.cs @@ -219,7 +219,7 @@ ON DELETE CASCADE ON UPDATE CASCADE CREATE TABLE IF NOT EXISTS character_quests( `character` VARCHAR(16) NOT NULL, name VARCHAR(50) NOT NULL, - killed INT NOT NULL, + field0 INT NOT NULL, completed BOOLEAN NOT NULL, PRIMARY KEY(`character`, name), @@ -547,7 +547,7 @@ private static void LoadQuests(Player player) { // load quests - using (var reader = GetReader("SELECT name, killed, completed FROM character_quests WHERE `character`=@character", + using (var reader = GetReader("SELECT name, field0, completed FROM character_quests WHERE `character`=@character", new SqlParameter("@character", player.name))) { @@ -558,7 +558,7 @@ private static void LoadQuests(Player player) if (ScriptableQuest.dict.TryGetValue(questName.GetStableHashCode(), out questData)) { Quest quest = new Quest(questData); - quest.killed = (int)reader["killed"]; + quest.field0 = (int)reader["field0"]; quest.completed = (bool)reader["completed"]; player.quests.Add(quest); } @@ -767,10 +767,10 @@ private static void SaveQuests(Player player, MySqlCommand command) ExecuteNonQueryMySql(command, "DELETE FROM character_quests WHERE `character`=@character", new SqlParameter("@character", player.name)); foreach (var quest in player.quests) { - ExecuteNonQueryMySql(command, "INSERT INTO character_quests VALUES (@character, @name, @killed, @completed)", + ExecuteNonQueryMySql(command, "INSERT INTO character_quests VALUES (@character, @name, @field0, @completed)", new SqlParameter("@character", player.name), new SqlParameter("@name", quest.name), - new SqlParameter("@killed", quest.killed), + new SqlParameter("@field0", quest.field0), new SqlParameter("@completed", quest.completed)); } }