mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Got most of the properties getting set. Commands and General Parameters broken.
This commit is contained in:
parent
d42dac543f
commit
5b5b99bb4b
@ -158,6 +158,51 @@ namespace FFXIVClassic_Lobby_Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.charaWork.parameterSave.state_mainSkillLevel = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
//Get level of our classjob
|
||||||
|
//Load appearance
|
||||||
|
query = @"
|
||||||
|
SELECT
|
||||||
|
baseId
|
||||||
|
FROM characters_appearance WHERE characterId = @charId";
|
||||||
|
|
||||||
|
cmd = new MySqlCommand(query, conn);
|
||||||
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
if (reader.Read())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Get level of our classjob
|
||||||
|
//Load appearance
|
||||||
|
query = @"
|
||||||
|
SELECT
|
||||||
|
hp,
|
||||||
|
hpMax,
|
||||||
|
mp,
|
||||||
|
mpMax
|
||||||
|
FROM characters_parametersave WHERE characterId = @charId";
|
||||||
|
|
||||||
|
cmd = new MySqlCommand(query, conn);
|
||||||
|
cmd.Parameters.AddWithValue("@charId", player.actorId);
|
||||||
|
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
if (reader.Read())
|
||||||
|
{
|
||||||
|
player.charaWork.parameterSave.hp[0] = reader.GetInt16(0);
|
||||||
|
player.charaWork.parameterSave.hpMax[0] = reader.GetInt16(1);
|
||||||
|
player.charaWork.parameterSave.mp = reader.GetInt16(2);
|
||||||
|
player.charaWork.parameterSave.mpMax = reader.GetInt16(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Load appearance
|
//Load appearance
|
||||||
query = @"
|
query = @"
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -214,7 +214,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||||||
client.queuePacket(SetMusicPacket.buildPacket(player.actorID, 0x3D, 0x01), true, false);
|
client.queuePacket(SetMusicPacket.buildPacket(player.actorID, 0x3D, 0x01), true, false);
|
||||||
client.queuePacket(SetWeatherPacket.buildPacket(player.actorID, SetWeatherPacket.WEATHER_CLEAR), true, false);
|
client.queuePacket(SetWeatherPacket.buildPacket(player.actorID, SetWeatherPacket.WEATHER_CLEAR), true, false);
|
||||||
|
|
||||||
BasePacket actorPacket = player.getActor().getInitPackets(player.actorID);
|
BasePacket actorPacket = player.getActor().getSpawnPackets(player.actorID);
|
||||||
client.queuePacket(actorPacket);
|
client.queuePacket(actorPacket);
|
||||||
|
|
||||||
//Retainers
|
//Retainers
|
||||||
@ -344,7 +344,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||||||
//return;
|
//return;
|
||||||
inn.addActorToZone(player.getActor());
|
inn.addActorToZone(player.getActor());
|
||||||
|
|
||||||
client.queuePacket(reply7);
|
//client.queuePacket(reply7);
|
||||||
client.queuePacket(reply8);
|
client.queuePacket(reply8);
|
||||||
client.queuePacket(reply9);
|
client.queuePacket(reply9);
|
||||||
client.queuePacket(reply10);
|
client.queuePacket(reply10);
|
||||||
|
@ -52,6 +52,9 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||||||
|
|
||||||
public Character(uint actorID) : base(actorID)
|
public Character(uint actorID) : base(actorID)
|
||||||
{
|
{
|
||||||
|
//Init timer array to "notimer"
|
||||||
|
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||||
|
charaWork.statusShownTime[i] = 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SubPacket createAppearancePacket(uint playerActorId)
|
public SubPacket createAppearancePacket(uint playerActorId)
|
||||||
|
@ -8,17 +8,17 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||||||
{
|
{
|
||||||
class ParameterSave
|
class ParameterSave
|
||||||
{
|
{
|
||||||
public int[] hp = new int[1];
|
public short[] hp = new short[1];
|
||||||
public int[] hpMax = new int[1];
|
public short[] hpMax = new short[1];
|
||||||
public int mp;
|
public short mp;
|
||||||
public int mpMax;
|
public short mpMax;
|
||||||
|
|
||||||
public int[] state_mainSkill = new int[4];
|
public byte[] state_mainSkill = new byte[4];
|
||||||
public int state_mainSkillLevel;
|
public ushort state_mainSkillLevel;
|
||||||
|
|
||||||
public int[] state_boostPointForSkill;
|
public int[] state_boostPointForSkill;
|
||||||
|
|
||||||
public uint[] commandSlot_compatibility = new uint[40];
|
public bool[] commandSlot_compatibility = new bool[40];
|
||||||
public uint[] commandSlot_recastTime = new uint[40];
|
public uint[] commandSlot_recastTime = new uint[40];
|
||||||
|
|
||||||
public int[] giftCommandSlot_commandId;
|
public int[] giftCommandSlot_commandId;
|
||||||
|
@ -8,7 +8,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||||||
{
|
{
|
||||||
class ParameterTemp
|
class ParameterTemp
|
||||||
{
|
{
|
||||||
public int tp = 0;
|
public short tp = 0;
|
||||||
|
|
||||||
public int targetInformation = 0;
|
public int targetInformation = 0;
|
||||||
|
|
||||||
|
@ -84,9 +84,12 @@ 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);
|
||||||
@ -155,35 +158,39 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||||||
propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]");
|
propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]");
|
||||||
propPacketUtil.addProperty("charaWork.parameterSave.mp");
|
propPacketUtil.addProperty("charaWork.parameterSave.mp");
|
||||||
propPacketUtil.addProperty("charaWork.parameterSave.mpMax");
|
propPacketUtil.addProperty("charaWork.parameterSave.mpMax");
|
||||||
propPacketUtil.addProperty("charaWork.parameterSave.mpMax");
|
|
||||||
propPacketUtil.addProperty("charaWork.parameterTemp.tp");
|
propPacketUtil.addProperty("charaWork.parameterTemp.tp");
|
||||||
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]");
|
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]");
|
||||||
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel");
|
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel");
|
||||||
|
|
||||||
|
|
||||||
//Status Times
|
//Status Times
|
||||||
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||||
{
|
{
|
||||||
if (charaWork.statusShownTime[i] != 0)
|
if (charaWork.statusShownTime[i] != 0xFFFFFFFF)
|
||||||
propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
//General Parameters
|
//General Parameters
|
||||||
for (int i = 0; i < 36; i++)
|
for (int i = 0; i < charaWork.battleTemp.generalParameter.Length; i++)
|
||||||
{
|
{
|
||||||
propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
if (charaWork.battleTemp.generalParameter[i] != 0)
|
||||||
|
propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[0]");
|
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[0]");
|
||||||
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[1]");
|
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[1]");
|
||||||
|
|
||||||
//Battle Save Skillpoint
|
//Battle Save Skillpoint
|
||||||
|
|
||||||
//Commands
|
//Commands
|
||||||
|
|
||||||
for (int i = 0; i < charaWork.command.Length; i++)
|
for (int i = 0; i < charaWork.command.Length; i++)
|
||||||
{
|
{
|
||||||
if (charaWork.command[i] != 0)
|
if (charaWork.command[i] != 0)
|
||||||
propPacketUtil.addProperty(String.Format("charaWork.command[{0}]", i));
|
propPacketUtil.addProperty(String.Format("charaWork.command[{0}]", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < charaWork.commandCategory.Length; i++)
|
for (int i = 0; i < charaWork.commandCategory.Length; i++)
|
||||||
{
|
{
|
||||||
if (charaWork.commandCategory[i] != 0)
|
if (charaWork.commandCategory[i] != 0)
|
||||||
@ -194,9 +201,10 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||||||
|
|
||||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++)
|
for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++)
|
||||||
{
|
{
|
||||||
if (charaWork.parameterSave.commandSlot_compatibility[i] != 0)
|
if (charaWork.parameterSave.commandSlot_compatibility[i])
|
||||||
propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i));
|
propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++)
|
for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++)
|
||||||
{
|
{
|
||||||
if (charaWork.parameterSave.commandSlot_recastTime[i] != 0)
|
if (charaWork.parameterSave.commandSlot_recastTime[i] != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user