mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 19:57:46 +00:00
Quests and Leves now load from the db.
This commit is contained in:
parent
5b5b99bb4b
commit
d9e274eb09
3 changed files with 41 additions and 24 deletions
|
@ -355,7 +355,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
FROM characters_hotbar WHERE characterId = @charId AND classId = @classId";
|
FROM characters_hotbar WHERE characterId = @charId AND classId = @classId";
|
||||||
|
|
||||||
cmd = new MySqlCommand(query, conn);
|
cmd = new MySqlCommand(query, conn);
|
||||||
cmd.Parameters.AddWithValue("@charId", player);
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]);
|
cmd.Parameters.AddWithValue("@classId", player.charaWork.parameterSave.state_mainSkill[0]);
|
||||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
|
@ -375,33 +375,53 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
FROM characters_quest_scenario WHERE characterId = @charId";
|
FROM characters_quest_scenario WHERE characterId = @charId";
|
||||||
|
|
||||||
cmd = new MySqlCommand(query, conn);
|
cmd = new MySqlCommand(query, conn);
|
||||||
cmd.Parameters.AddWithValue("@charId", player);
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
int index = reader.GetUInt16(0);
|
int index = reader.GetUInt16(0);
|
||||||
player.playerWork.questScenario[index] = reader.GetUInt32(1);
|
player.playerWork.questScenario[index] = 0xA0F00000 | reader.GetUInt32(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Load Guildleve Quests
|
//Load Local Guildleves
|
||||||
query = @"
|
query = @"
|
||||||
SELECT
|
SELECT
|
||||||
slot,
|
slot,
|
||||||
questId,
|
questId,
|
||||||
abandoned,
|
abandoned,
|
||||||
completed
|
completed
|
||||||
FROM characters_quest_scenario WHERE characterId = @charId";
|
FROM characters_quest_guildleve_local WHERE characterId = @charId";
|
||||||
|
|
||||||
cmd = new MySqlCommand(query, conn);
|
cmd = new MySqlCommand(query, conn);
|
||||||
cmd.Parameters.AddWithValue("@charId", player);
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
int index = reader.GetUInt16(0);
|
int index = reader.GetUInt16(0);
|
||||||
player.playerWork.questGuildLeve[index] = reader.GetUInt32(1);
|
player.playerWork.questGuildleve[index] = 0xA0F00000 | reader.GetUInt32(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Regional Guildleve Quests
|
||||||
|
query = @"
|
||||||
|
SELECT
|
||||||
|
slot,
|
||||||
|
guildleveId,
|
||||||
|
abandoned,
|
||||||
|
completed
|
||||||
|
FROM characters_quest_guildleve_regional WHERE characterId = @charId";
|
||||||
|
|
||||||
|
cmd = new MySqlCommand(query, conn);
|
||||||
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
int index = reader.GetUInt16(0);
|
||||||
|
player.work.guildleveId[index] = reader.GetUInt16(1);
|
||||||
player.work.guildleveDone[index] = reader.GetBoolean(2);
|
player.work.guildleveDone[index] = reader.GetBoolean(2);
|
||||||
player.work.guildleveChecked[index] = reader.GetBoolean(3);
|
player.work.guildleveChecked[index] = reader.GetBoolean(3);
|
||||||
}
|
}
|
||||||
|
@ -416,7 +436,7 @@ namespace FFXIVClassic_Lobby_Server
|
||||||
FROM characters_npclinkshell WHERE characterId = @charId";
|
FROM characters_npclinkshell WHERE characterId = @charId";
|
||||||
|
|
||||||
cmd = new MySqlCommand(query, conn);
|
cmd = new MySqlCommand(query, conn);
|
||||||
cmd.Parameters.AddWithValue("@charId", player);
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
{
|
{
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
|
|
|
@ -84,12 +84,9 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
charaWork.command[14] = 0xA0F00000 | 29497;
|
charaWork.command[14] = 0xA0F00000 | 29497;
|
||||||
charaWork.command[15] = 0xA0F00000 | 22015;
|
charaWork.command[15] = 0xA0F00000 | 22015;
|
||||||
|
|
||||||
charaWork.command[32] = 0xA0F00000 | 27150;
|
|
||||||
|
|
||||||
for (int i = 0; i < 16; i++)
|
for (int i = 0; i < 16; i++)
|
||||||
charaWork.commandCategory[i] = 1;
|
charaWork.commandCategory[i] = 1;
|
||||||
|
|
||||||
charaWork.commandCategory[32] = 1;
|
|
||||||
charaWork.commandBorder = 32;
|
charaWork.commandBorder = 32;
|
||||||
|
|
||||||
Database.loadPlayerCharacter(this);
|
Database.loadPlayerCharacter(this);
|
||||||
|
@ -228,19 +225,10 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
}
|
}
|
||||||
|
|
||||||
//Guildleve - Local
|
//Guildleve - Local
|
||||||
for (int i = 0; i < playerWork.questGuildLeve.Length; i++)
|
for (int i = 0; i < playerWork.questGuildleve.Length; i++)
|
||||||
{
|
{
|
||||||
if (playerWork.questGuildLeve[i] != 0)
|
if (playerWork.questGuildleve[i] != 0)
|
||||||
propPacketUtil.addProperty(String.Format("playerWork.questGuildLeve[{0}]", i));
|
propPacketUtil.addProperty(String.Format("playerWork.questGuildleve[{0}]", i));
|
||||||
}
|
|
||||||
|
|
||||||
//NPC Linkshell
|
|
||||||
for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++)
|
|
||||||
{
|
|
||||||
if (playerWork.npcLinkshellChatCalling[i] != false)
|
|
||||||
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i));
|
|
||||||
if (playerWork.npcLinkshellChatExtra[i] != false)
|
|
||||||
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Guildleve - Regional
|
//Guildleve - Regional
|
||||||
|
@ -254,6 +242,15 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
propPacketUtil.addProperty(String.Format("work.guildleveChecked[{0}]", i));
|
propPacketUtil.addProperty(String.Format("work.guildleveChecked[{0}]", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//NPC Linkshell
|
||||||
|
for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++)
|
||||||
|
{
|
||||||
|
if (playerWork.npcLinkshellChatCalling[i] != false)
|
||||||
|
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i));
|
||||||
|
if (playerWork.npcLinkshellChatExtra[i] != false)
|
||||||
|
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i));
|
||||||
|
}
|
||||||
|
|
||||||
//Profile
|
//Profile
|
||||||
propPacketUtil.addProperty("playerWork.tribe");
|
propPacketUtil.addProperty("playerWork.tribe");
|
||||||
propPacketUtil.addProperty("playerWork.guardian");
|
propPacketUtil.addProperty("playerWork.guardian");
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||||
public int restBonusExpRate;
|
public int restBonusExpRate;
|
||||||
|
|
||||||
public uint[] questScenario = new uint[16];
|
public uint[] questScenario = new uint[16];
|
||||||
public uint[] questGuildLeve = new uint[8];
|
public uint[] questGuildleve = new uint[8];
|
||||||
|
|
||||||
public int questScenarioComplete;
|
public int questScenarioComplete;
|
||||||
public int questGuildleveComplete;
|
public int questGuildleveComplete;
|
||||||
|
|
Loading…
Add table
Reference in a new issue