mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-23 05:07:47 +00:00
Changing how appearance works, pulled from a DB now.
This commit is contained in:
parent
ad0cfca160
commit
af4a0d5546
6 changed files with 207 additions and 104 deletions
|
@ -103,6 +103,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
public static void makeCharacter(uint accountId, uint cid, CharaInfo charaInfo)
|
||||
{
|
||||
//Update character entry
|
||||
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
|
||||
|
@ -131,6 +132,65 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
Log.database(String.Format("CID={0} state updated to active(2).", cid));
|
||||
}
|
||||
|
||||
//Create appearance entry
|
||||
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();
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
cmd.Connection = conn;
|
||||
cmd.CommandText = "INSERT INTO appearance(characterId, baseId, tribe, size, voice, skinColor, hairStyle, hairColor, hairHighlightColor, eyeColor, faceType, faceEyebrows, faceEyeShape, faceIrisSize, faceNose, faceMouth, faceFeatures, ears, characteristics, characteristicsColor, mainhand, offhand, head, body, hands, legs, feet, waist, leftFinger, rightFinger, leftEar, rightEar) VALUES(@characterId, @baseId, @tribe, @size, @voice, @skinColor, @hairStyle, @hairColor, @hairHighlightColor, @eyeColor, @faceType, @faceEyebrows, @faceEyeShape, @faceIrisSize, @faceNose, @faceMouth, @faceFeatures, @ears, @characteristics, @characteristicsColor, @mainhand, @offhand, @head, @body, @hands, @legs, @feet, @waist, @leftFinger, @rightFinger, @leftEar, @rightEar)";
|
||||
cmd.Prepare();
|
||||
|
||||
cmd.Parameters.AddWithValue("@characterId", cid);
|
||||
cmd.Parameters.AddWithValue("@baseId", 0xFFFFFFFF);
|
||||
cmd.Parameters.AddWithValue("@tribe", charaInfo.appearance.tribe);
|
||||
cmd.Parameters.AddWithValue("@size", charaInfo.appearance.size);
|
||||
cmd.Parameters.AddWithValue("@voice", charaInfo.appearance.voice);
|
||||
cmd.Parameters.AddWithValue("@skinColor", charaInfo.appearance.skinColor);
|
||||
cmd.Parameters.AddWithValue("@hairStyle", charaInfo.appearance.hairStyle);
|
||||
cmd.Parameters.AddWithValue("@hairColor", charaInfo.appearance.hairColor);
|
||||
cmd.Parameters.AddWithValue("@hairHighlightColor", charaInfo.appearance.hairHighlightColor);
|
||||
cmd.Parameters.AddWithValue("@eyeColor", charaInfo.appearance.eyeColor);
|
||||
cmd.Parameters.AddWithValue("@faceType", charaInfo.appearance.faceType);
|
||||
cmd.Parameters.AddWithValue("@faceEyebrows", charaInfo.appearance.faceEyebrows);
|
||||
cmd.Parameters.AddWithValue("@faceEyeShape", charaInfo.appearance.faceEyeShape);
|
||||
cmd.Parameters.AddWithValue("@faceIrisSize", charaInfo.appearance.faceIrisSize);
|
||||
cmd.Parameters.AddWithValue("@faceNose", charaInfo.appearance.faceNose);
|
||||
cmd.Parameters.AddWithValue("@faceMouth", charaInfo.appearance.faceMouth);
|
||||
cmd.Parameters.AddWithValue("@faceFeatures", charaInfo.appearance.faceFeatures);
|
||||
cmd.Parameters.AddWithValue("@characteristics", charaInfo.appearance.characteristics);
|
||||
cmd.Parameters.AddWithValue("@characteristicsColor", charaInfo.appearance.characteristicsColor);
|
||||
|
||||
cmd.Parameters.AddWithValue("@mainhand", charaInfo.appearance.mainHand);
|
||||
cmd.Parameters.AddWithValue("@offhand", charaInfo.appearance.offHand);
|
||||
cmd.Parameters.AddWithValue("@head", charaInfo.appearance.head);
|
||||
cmd.Parameters.AddWithValue("@body", charaInfo.appearance.body);
|
||||
cmd.Parameters.AddWithValue("@hands", charaInfo.appearance.hands);
|
||||
cmd.Parameters.AddWithValue("@legs", charaInfo.appearance.legs);
|
||||
cmd.Parameters.AddWithValue("@feet", charaInfo.appearance.feet);
|
||||
cmd.Parameters.AddWithValue("@waist", charaInfo.appearance.waist);
|
||||
cmd.Parameters.AddWithValue("@leftFinger", charaInfo.appearance.leftFinger);
|
||||
cmd.Parameters.AddWithValue("@rightFinger", charaInfo.appearance.rightFinger);
|
||||
cmd.Parameters.AddWithValue("@leftEar", charaInfo.appearance.leftEar);
|
||||
cmd.Parameters.AddWithValue("@rightEar", charaInfo.appearance.rightEar);
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Dispose();
|
||||
}
|
||||
|
||||
Log.database(String.Format("CID={0} state updated to active(2).", cid));
|
||||
}
|
||||
}
|
||||
|
||||
public static bool renameCharacter(uint userId, uint characterId, uint serverId, String newName)
|
||||
|
@ -292,6 +352,28 @@ namespace FFXIVClassic_Lobby_Server
|
|||
}
|
||||
}
|
||||
|
||||
public static Appearance getAppearance(uint charaId)
|
||||
{
|
||||
using (var 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)))
|
||||
{
|
||||
Appearance appearance = null;
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
appearance = conn.Query<Appearance>("SELECT * FROM characters_appearance WHERE id=@CharaId", new { CharaId = charaId }).SingleOrDefault();
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Dispose();
|
||||
}
|
||||
|
||||
return appearance;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<String> getReservedNames(uint userId)
|
||||
{
|
||||
using (var 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)))
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<Compile Include="common\Log.cs" />
|
||||
<Compile Include="common\STA_INIFile.cs" />
|
||||
<Compile Include="dataobjects\Account.cs" />
|
||||
<Compile Include="dataobjects\Appearance.cs" />
|
||||
<Compile Include="dataobjects\CharaInfo.cs" />
|
||||
<Compile Include="dataobjects\Retainer.cs" />
|
||||
<Compile Include="dataobjects\Character.cs" />
|
||||
|
|
50
FFXIVClassic_Lobby_Server/dataobjects/Appearance.cs
Normal file
50
FFXIVClassic_Lobby_Server/dataobjects/Appearance.cs
Normal file
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server.dataobjects
|
||||
{
|
||||
class Appearance
|
||||
{
|
||||
////////////
|
||||
//Chara Info
|
||||
public byte tribe = 0;
|
||||
public byte size = 0;
|
||||
public byte voice = 0;
|
||||
public ushort skinColor = 0;
|
||||
|
||||
public ushort hairStyle = 0;
|
||||
public ushort hairColor = 0;
|
||||
public ushort hairHighlightColor = 0;
|
||||
public ushort eyeColor = 0;
|
||||
public byte characteristicsColor = 0;
|
||||
|
||||
public byte faceType = 0;
|
||||
public byte faceEyebrows = 0;
|
||||
public byte faceEyeShape = 0;
|
||||
public byte faceIrisSize = 0;
|
||||
public byte faceNose = 0;
|
||||
public byte faceMouth = 0;
|
||||
public byte faceFeatures = 0;
|
||||
public byte characteristics = 0;
|
||||
public byte ears = 0;
|
||||
|
||||
public uint mainHand = 0;
|
||||
public uint offHand = 0;
|
||||
|
||||
public uint head = 0;
|
||||
public uint body = 0;
|
||||
public uint legs = 0;
|
||||
public uint hands = 0;
|
||||
public uint feet = 0;
|
||||
public uint waist = 0;
|
||||
public uint rightEar = 0;
|
||||
public uint leftEar = 0;
|
||||
public uint rightFinger = 0;
|
||||
public uint leftFinger = 0;
|
||||
//Chara Info
|
||||
////////////
|
||||
}
|
||||
}
|
|
@ -10,16 +10,7 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
{
|
||||
class CharaInfo
|
||||
{
|
||||
public uint tribe = 0;
|
||||
public uint size = 0;
|
||||
public uint voice = 0;
|
||||
public ushort skinColor = 0;
|
||||
|
||||
public ushort hairStyle = 0;
|
||||
public ushort hairColor = 0;
|
||||
public ushort hairHighlightColor = 0;
|
||||
public ushort eyeColor = 0;
|
||||
public ushort characteristicsColor = 0;
|
||||
public Appearance appearance;
|
||||
|
||||
public struct FaceInfo
|
||||
{
|
||||
|
@ -47,16 +38,6 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
public uint unknown;
|
||||
}
|
||||
|
||||
public uint faceType = 0;
|
||||
public uint faceEyebrows = 0;
|
||||
public uint faceEyeShape = 0;
|
||||
public uint faceIrisSize = 0;
|
||||
public uint faceNose = 0;
|
||||
public uint faceMouth = 0;
|
||||
public uint faceFeatures = 0;
|
||||
public uint characteristics = 0;
|
||||
public uint ears = 0;
|
||||
|
||||
public uint guardian = 0;
|
||||
public uint birthMonth = 0;
|
||||
public uint birthDay = 0;
|
||||
|
@ -64,26 +45,14 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
public uint currentJob = 0;
|
||||
public uint allegiance = 0;
|
||||
|
||||
public uint mainHand = 0;
|
||||
public uint offHand = 0;
|
||||
|
||||
public uint headGear = 0;
|
||||
public uint bodyGear = 0;
|
||||
public uint legsGear = 0;
|
||||
public uint handsGear = 0;
|
||||
public uint feetGear = 0;
|
||||
public uint waistGear = 0;
|
||||
public uint rightEarGear = 0;
|
||||
public uint leftEarGear = 0;
|
||||
public uint rightFingerGear = 0;
|
||||
public uint leftFingerGear = 0;
|
||||
|
||||
public uint currentLevel = 1;
|
||||
|
||||
public static CharaInfo getFromNewCharRequest(String encoded)
|
||||
{
|
||||
byte[] data = Convert.FromBase64String(encoded.Replace('-', '+').Replace('_', '/'));
|
||||
|
||||
CharaInfo info = new CharaInfo();
|
||||
Appearance appearance = new Appearance();
|
||||
|
||||
using (MemoryStream stream = new MemoryStream(data))
|
||||
{
|
||||
|
@ -91,31 +60,31 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
{
|
||||
uint version = reader.ReadUInt32();
|
||||
uint unknown1 = reader.ReadUInt32();
|
||||
info.tribe = reader.ReadByte();
|
||||
info.size = reader.ReadByte();
|
||||
info.hairStyle = reader.ReadUInt16();
|
||||
info.hairHighlightColor = reader.ReadUInt16();
|
||||
info.faceType = reader.ReadByte();
|
||||
info.characteristics = reader.ReadByte();
|
||||
info.characteristicsColor = reader.ReadByte();
|
||||
appearance.tribe = reader.ReadByte();
|
||||
appearance.size = reader.ReadByte();
|
||||
appearance.hairStyle = reader.ReadUInt16();
|
||||
appearance.hairHighlightColor = reader.ReadUInt16();
|
||||
appearance.faceType = reader.ReadByte();
|
||||
appearance.characteristics = reader.ReadByte();
|
||||
appearance.characteristicsColor = reader.ReadByte();
|
||||
|
||||
reader.ReadUInt32();
|
||||
|
||||
info.faceEyebrows = reader.ReadByte();
|
||||
info.faceIrisSize = reader.ReadByte();
|
||||
info.faceEyeShape = reader.ReadByte();
|
||||
info.faceNose = reader.ReadByte();
|
||||
info.faceFeatures = reader.ReadByte();
|
||||
info.faceMouth = reader.ReadByte();
|
||||
info.ears = reader.ReadByte();
|
||||
info.hairColor = reader.ReadUInt16();
|
||||
appearance.faceEyebrows = reader.ReadByte();
|
||||
appearance.faceIrisSize = reader.ReadByte();
|
||||
appearance.faceEyeShape = reader.ReadByte();
|
||||
appearance.faceNose = reader.ReadByte();
|
||||
appearance.faceFeatures = reader.ReadByte();
|
||||
appearance.faceMouth = reader.ReadByte();
|
||||
appearance.ears = reader.ReadByte();
|
||||
appearance.hairColor = reader.ReadUInt16();
|
||||
|
||||
reader.ReadUInt32();
|
||||
|
||||
info.skinColor = reader.ReadUInt16();
|
||||
info.eyeColor = reader.ReadUInt16();
|
||||
appearance.skinColor = reader.ReadUInt16();
|
||||
appearance.eyeColor = reader.ReadUInt16();
|
||||
|
||||
info.voice = reader.ReadByte();
|
||||
appearance.voice = reader.ReadByte();
|
||||
info.guardian = reader.ReadByte();
|
||||
info.birthMonth = reader.ReadByte();
|
||||
info.birthDay = reader.ReadByte();
|
||||
|
@ -132,39 +101,31 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
info.appearance = appearance;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
public String buildForCharaList(Character chara)
|
||||
public String buildForCharaList(Character chara, Appearance appearance)
|
||||
{
|
||||
byte[] data;
|
||||
|
||||
mainHand = 79707136;
|
||||
offHand = 32509954;
|
||||
headGear = 43008;
|
||||
bodyGear = 43008;
|
||||
legsGear = 43008;
|
||||
handsGear = 43008;
|
||||
feetGear = 43008;
|
||||
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
{
|
||||
using (BinaryWriter writer = new BinaryWriter(stream))
|
||||
{
|
||||
//Build faceinfo for later
|
||||
FaceInfo faceInfo = new FaceInfo();
|
||||
faceInfo.characteristics = characteristics;
|
||||
faceInfo.characteristicsColor = characteristicsColor;
|
||||
faceInfo.type = faceType;
|
||||
faceInfo.ears = ears;
|
||||
faceInfo.features = faceFeatures;
|
||||
faceInfo.eyebrows = faceEyebrows;
|
||||
faceInfo.eyeShape = faceEyeShape;
|
||||
faceInfo.irisSize = faceIrisSize;
|
||||
faceInfo.mouth = faceMouth;
|
||||
faceInfo.nose = faceNose;
|
||||
faceInfo.characteristics = appearance.characteristics;
|
||||
faceInfo.characteristicsColor = appearance.characteristicsColor;
|
||||
faceInfo.type = appearance.faceType;
|
||||
faceInfo.ears = appearance.ears;
|
||||
faceInfo.features = appearance.faceFeatures;
|
||||
faceInfo.eyebrows = appearance.faceEyebrows;
|
||||
faceInfo.eyeShape = appearance.faceEyeShape;
|
||||
faceInfo.irisSize = appearance.faceIrisSize;
|
||||
faceInfo.mouth = appearance.faceMouth;
|
||||
faceInfo.nose = appearance.faceNose;
|
||||
|
||||
|
||||
string location1 = "prv0Inn01\0";
|
||||
|
@ -176,19 +137,19 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
writer.Write(System.Text.Encoding.UTF8.GetBytes(chara.name + '\0'));
|
||||
writer.Write((UInt32)0x1c);
|
||||
writer.Write((UInt32)0x04);
|
||||
writer.Write((UInt32)getTribeModel());
|
||||
writer.Write((UInt32)size);
|
||||
uint colorVal = skinColor | (uint)(hairColor << 10) | (uint)(eyeColor << 20);
|
||||
writer.Write((UInt32)getTribeModel(appearance.tribe));
|
||||
writer.Write((UInt32)appearance.size);
|
||||
uint colorVal = appearance.skinColor | (uint)(appearance.hairColor << 10) | (uint)(appearance.eyeColor << 20);
|
||||
writer.Write((UInt32)colorVal);
|
||||
|
||||
var bitfield = PrimitiveConversion.ToUInt32(faceInfo);
|
||||
|
||||
writer.Write((UInt32)bitfield); //FACE, Figure this out!
|
||||
uint hairVal = hairHighlightColor | (uint)(hairStyle << 10) | (uint)(characteristicsColor << 20);
|
||||
uint hairVal = appearance.hairHighlightColor | (uint)(appearance.hairStyle << 10) | (uint)(appearance.characteristicsColor << 20);
|
||||
writer.Write((UInt32)hairVal);
|
||||
writer.Write((UInt32)voice);
|
||||
writer.Write((UInt32)mainHand);
|
||||
writer.Write((UInt32)offHand);
|
||||
writer.Write((UInt32)appearance.voice);
|
||||
writer.Write((UInt32)appearance.mainHand);
|
||||
writer.Write((UInt32)appearance.offHand);
|
||||
|
||||
writer.Write((UInt32)0);
|
||||
writer.Write((UInt32)0);
|
||||
|
@ -196,23 +157,23 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
writer.Write((UInt32)0);
|
||||
writer.Write((UInt32)0);
|
||||
|
||||
writer.Write((UInt32)headGear);
|
||||
writer.Write((UInt32)bodyGear);
|
||||
writer.Write((UInt32)legsGear);
|
||||
writer.Write((UInt32)handsGear);
|
||||
writer.Write((UInt32)feetGear);
|
||||
writer.Write((UInt32)waistGear);
|
||||
writer.Write((UInt32)appearance.head);
|
||||
writer.Write((UInt32)appearance.body);
|
||||
writer.Write((UInt32)appearance.legs);
|
||||
writer.Write((UInt32)appearance.hands);
|
||||
writer.Write((UInt32)appearance.feet);
|
||||
writer.Write((UInt32)appearance.waist);
|
||||
|
||||
writer.Write((UInt32)0);
|
||||
|
||||
writer.Write((UInt32)rightEarGear);
|
||||
writer.Write((UInt32)leftEarGear);
|
||||
writer.Write((UInt32)appearance.rightEar);
|
||||
writer.Write((UInt32)appearance.leftEar);
|
||||
|
||||
writer.Write((UInt32)0);
|
||||
writer.Write((UInt32)0);
|
||||
|
||||
writer.Write((UInt32)rightFingerGear);
|
||||
writer.Write((UInt32)leftFingerGear);
|
||||
writer.Write((UInt32)appearance.rightFinger);
|
||||
writer.Write((UInt32)appearance.leftFinger);
|
||||
|
||||
for (int i = 0; i < 0x8; i++)
|
||||
writer.Write((byte)0);
|
||||
|
@ -220,11 +181,11 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
writer.Write((UInt32)1);
|
||||
writer.Write((UInt32)1);
|
||||
|
||||
writer.Write((byte)currentClass);
|
||||
writer.Write((UInt16)currentLevel);
|
||||
writer.Write((byte)currentJob);
|
||||
writer.Write((byte)chara.currentClass);
|
||||
writer.Write((UInt16)chara.currentLevel);
|
||||
writer.Write((byte)chara.currentJob);
|
||||
writer.Write((UInt16)1);
|
||||
writer.Write((byte)tribe);
|
||||
writer.Write((byte)appearance.tribe);
|
||||
|
||||
writer.Write((UInt32)0xe22222aa);
|
||||
|
||||
|
@ -233,9 +194,9 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
writer.Write((UInt32)System.Text.Encoding.UTF8.GetBytes(location2).Length);
|
||||
writer.Write(System.Text.Encoding.UTF8.GetBytes(location2));
|
||||
|
||||
writer.Write((byte)guardian);
|
||||
writer.Write((byte)birthMonth);
|
||||
writer.Write((byte)birthDay);
|
||||
writer.Write((byte)chara.guardian);
|
||||
writer.Write((byte)chara.birthMonth);
|
||||
writer.Write((byte)chara.birthDay);
|
||||
|
||||
writer.Write((UInt16)0x17);
|
||||
writer.Write((UInt32)4);
|
||||
|
@ -243,8 +204,8 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
|
||||
writer.BaseStream.Seek(0x10, SeekOrigin.Current);
|
||||
|
||||
writer.Write((UInt32)allegiance);
|
||||
writer.Write((UInt32)allegiance);
|
||||
writer.Write((UInt32)chara.allegiance);
|
||||
writer.Write((UInt32)chara.allegiance);
|
||||
}
|
||||
|
||||
data = stream.GetBuffer();
|
||||
|
@ -255,14 +216,14 @@ namespace FFXIVClassic_Lobby_Server.dataobjects
|
|||
|
||||
public static String debug()
|
||||
{
|
||||
byte[] bytes = File.ReadAllBytes("./packets/charaInfo.bin");
|
||||
byte[] bytes = File.ReadAllBytes("./packets/charaappearance.bin");
|
||||
|
||||
Console.WriteLine(Utils.ByteArrayToHex(bytes));
|
||||
|
||||
return Convert.ToBase64String(bytes).Replace('+', '-').Replace('/', '_');
|
||||
}
|
||||
|
||||
public UInt32 getTribeModel()
|
||||
public UInt32 getTribeModel(byte tribe)
|
||||
{
|
||||
switch (tribe)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,14 @@ namespace FFXIVClassic_Lobby_Server
|
|||
public bool doRename;
|
||||
public uint currentZoneId;
|
||||
|
||||
public uint guardian = 0;
|
||||
public uint birthMonth = 0;
|
||||
public uint birthDay = 0;
|
||||
public uint currentClass = 0;
|
||||
public uint currentJob = 0;
|
||||
public uint allegiance = 0;
|
||||
|
||||
public uint currentLevel = 1;
|
||||
|
||||
public static CharaInfo EncodedToCharacter(String charaInfo)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,8 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
|
||||
foreach (Character chara in characterList)
|
||||
{
|
||||
Appearance appearance = Database.getAppearance(chara.id);
|
||||
|
||||
if (totalCount == 0 || characterCount % MAXPERPACKET == 0)
|
||||
{
|
||||
memStream = new MemoryStream(0x3B0);
|
||||
|
@ -76,7 +78,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
binWriter.Write(Encoding.ASCII.GetBytes(worldname.PadRight(0xE, '\0'))); //World Name
|
||||
|
||||
CharaInfo info = JsonConvert.DeserializeObject<CharaInfo>(chara.charaInfo);
|
||||
binWriter.Write(info.buildForCharaList(chara)); //Appearance Data
|
||||
binWriter.Write(info.buildForCharaList(chara, appearance)); //Appearance Data
|
||||
//binWriter.Write(CharaInfo.debug()); //Appearance Data
|
||||
|
||||
characterCount++;
|
||||
|
|
Loading…
Add table
Reference in a new issue