From 5acc769505dee752a348b51b13659aa9ec28fe15 Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 20 Feb 2016 11:20:59 -0500 Subject: [PATCH] The correct appearance is now set depending on what class you choose in chara creator. The actual items will be added in by the map server. The appearance is handled by the lobby in the case the user successfully makes a character, but never logs into the server (due to a disconnect or something). --- FFXIVClassic_Lobby_Server/Database.cs | 13 +++--- FFXIVClassic_Lobby_Server/PacketProcessor.cs | 18 ++++---- .../dataobjects/CharaInfo.cs | 9 ++++ .../utils/CharacterCreatorUtils.cs | 43 +++++++++++-------- 4 files changed, 50 insertions(+), 33 deletions(-) diff --git a/FFXIVClassic_Lobby_Server/Database.cs b/FFXIVClassic_Lobby_Server/Database.cs index 7d022b04..83673328 100644 --- a/FFXIVClassic_Lobby_Server/Database.cs +++ b/FFXIVClassic_Lobby_Server/Database.cs @@ -165,12 +165,13 @@ namespace FFXIVClassic_Lobby_Server cmd.Parameters.AddWithValue("@characteristics", charaInfo.appearance.characteristics); cmd.Parameters.AddWithValue("@characteristicsColor", charaInfo.appearance.characteristicsColor); - cmd.Parameters.AddWithValue("@mainhand", 0); - cmd.Parameters.AddWithValue("@head", 1024); - cmd.Parameters.AddWithValue("@body", 1024); - cmd.Parameters.AddWithValue("@hands", 1024); - cmd.Parameters.AddWithValue("@legs", 1024); - cmd.Parameters.AddWithValue("@feet", 1024); + cmd.Parameters.AddWithValue("@mainhand", charaInfo.weapon1); + cmd.Parameters.AddWithValue("@offhand", charaInfo.weapon2); + cmd.Parameters.AddWithValue("@head", charaInfo.head); + cmd.Parameters.AddWithValue("@body", charaInfo.body); + cmd.Parameters.AddWithValue("@legs", charaInfo.legs); + cmd.Parameters.AddWithValue("@hands", charaInfo.hands); + cmd.Parameters.AddWithValue("@feet", charaInfo.feet); cmd.ExecuteNonQuery(); diff --git a/FFXIVClassic_Lobby_Server/PacketProcessor.cs b/FFXIVClassic_Lobby_Server/PacketProcessor.cs index c812fa49..5cccc0ae 100644 --- a/FFXIVClassic_Lobby_Server/PacketProcessor.cs +++ b/FFXIVClassic_Lobby_Server/PacketProcessor.cs @@ -228,19 +228,17 @@ namespace FFXIVClassic_Lobby_Server case 0x02://Make CharaInfo info = CharaInfo.getFromNewCharRequest(charaReq.characterInfoEncoded); - //Set Initial Appearance - /* + //Set Initial Appearance (items will be loaded in by map server) uint[] classAppearance = CharacterCreatorUtils.getEquipmentForClass(info.currentClass); info.weapon1 = classAppearance[0]; info.weapon2 = classAppearance[1]; - info.head = classAppearance[2]; - info.body = classAppearance[3]; - info.hands = classAppearance[4]; - info.legs = classAppearance[5]; - info.feet = classAppearance[6]; - info.belt = classAppearance[7]; - - */ + info.head = classAppearance[7]; + info.body = classAppearance[8]; + info.legs = classAppearance[9]; + info.hands = classAppearance[10]; + info.feet = classAppearance[11]; + info.belt = classAppearance[12]; + //Set Initial Position switch (info.initialTown) { diff --git a/FFXIVClassic_Lobby_Server/dataobjects/CharaInfo.cs b/FFXIVClassic_Lobby_Server/dataobjects/CharaInfo.cs index 2baf8a13..3cf3be03 100644 --- a/FFXIVClassic_Lobby_Server/dataobjects/CharaInfo.cs +++ b/FFXIVClassic_Lobby_Server/dataobjects/CharaInfo.cs @@ -51,6 +51,15 @@ namespace FFXIVClassic_Lobby_Server.dataobjects public uint currentLevel = 1; + public uint weapon1; + public uint weapon2; + public uint head; + public uint body; + public uint hands; + public uint legs; + public uint feet; + public uint belt; + public static CharaInfo getFromNewCharRequest(String encoded) { byte[] data = Convert.FromBase64String(encoded.Replace('-', '+').Replace('_', '/')); diff --git a/FFXIVClassic_Lobby_Server/utils/CharacterCreatorUtils.cs b/FFXIVClassic_Lobby_Server/utils/CharacterCreatorUtils.cs index de261fd2..1e6c23e6 100644 --- a/FFXIVClassic_Lobby_Server/utils/CharacterCreatorUtils.cs +++ b/FFXIVClassic_Lobby_Server/utils/CharacterCreatorUtils.cs @@ -10,26 +10,27 @@ namespace FFXIVClassic_Lobby_Server.utils { private static readonly Dictionary equipmentAppearance = new Dictionary { - { 2, new uint[]{1} }, //PUG - { 3, new uint[]{1} }, //GLA - { 4, new uint[]{1} }, //MRD - { 7, new uint[]{1} }, //ARC + { 2, new uint[]{60818432,0,0,0,0,0,0,0,10656,10560,1024,25824,6144,0,0,0,0,0,0,0,0,0} }, //PUG + { 3, new uint[]{79692890,0,0,0,0,0,0,0,31776,4448,1024,25824,6144,0,0,0,0,0,0,0,0,0} }, //GLA + { 4, new uint[]{147850310,0,0,0,0,0,0,23713,1184,10016,5472,1152,6144,0,0,0,0,0,0,0,0,0} }, //MRD + { 7, new uint[]{210764860,236979210,0,0,0,231736320,0,0,9888,9984,1024,25824,6144,0,0,0,0,0,0,0,0,0} }, //ARC + { 8, new uint[]{210764860,0,0,0,0,0,0,0,13920,7200,1024,10656,6144,0,0,0,0,0,0,0,0,0} }, //LNC - { 22, new uint[]{1} }, //THM - { 23, new uint[]{1} }, //CNJ + { 22, new uint[]{294650980,0,0,0,0,0,0,0,7744,5472,1024,5504,4096,0,0,0,0,0,0,0,0,0} }, //THM + { 23, new uint[]{347079700,0,0,0,0,0,0,0,4448,2240,1024,4416,4096,0,0,0,0,0,0,0,0,0} }, //CNJ - { 29, new uint[]{1} }, //CRP - { 30, new uint[]{1} }, //BSM - { 31, new uint[]{1} }, //ARM - { 32, new uint[]{1} }, //GSM - { 33, new uint[]{1} }, //LTW - { 34, new uint[]{1} }, //WVR - { 35, new uint[]{1} }, //ALC - { 36, new uint[]{1} }, //CUL + { 29, new uint[]{705692672,0,0,0,0,0,0,0,1184,10016,10656,9632,2048,0,0,0,0,0,0,0,0,0} }, //CRP + { 30, new uint[]{721421372,0,0,0,0,0,0,0,1184,2241,2336,2304,2048,0,0,0,0,0,0,0,0,0} }, //BSM + { 31, new uint[]{737149962,0,0,0,0,0,0,0,32992,2240,1024,2272,2048,0,0,0,0,0,0,0,0,0} }, //ARM + { 32, new uint[]{752878592,0,0,0,0,0,0,0,2368,3424,1024,10656,2048,0,0,0,0,0,0,0,0,0} }, //GSM + { 33, new uint[]{768607252,0,0,0,0,0,0,4448,4449,1792,1024,21888,2048,0,0,0,0,0,0,0,0,0} }, //LTW + { 34, new uint[]{784335922,0,0,0,0,0,0,0,5505,5473,1024,5505,2048,0,0,0,0,0,0,0,0,0} }, //WVR + { 35, new uint[]{800064522,0,0,0,0,0,0,20509,5504,2241,1024,1152,2048,0,0,0,0,0,0,0,0,0} }, //ALC + { 36, new uint[]{815793192,0,0,0,0,0,0,5632,34848,1792,1024,25825,2048,0,0,0,0,0,0,0,0,0} }, //CUL - { 39, new uint[]{1} }, //MIN - { 40, new uint[]{1} }, //BOT - { 41, new uint[]{1} }, //FSH + { 39, new uint[]{862979092,0,0,0,0,0,0,0,1184,2242,6464,6528,14336,0,0,0,0,0,0,0,0,0} }, //MIN + { 40, new uint[]{878707732,0,0,0,0,0,0,6304,6624,6560,1024,1152,14336,0,0,0,0,0,0,0,0,0} }, //BOT + { 41, new uint[]{894436372,0,0,0,0,0,0,6400,1184,9984,1024,6529,14336,0,0,0,0,0,0,0,0,0} }, //FSH }; public static uint[] getEquipmentForClass(uint charClass) @@ -42,3 +43,11 @@ namespace FFXIVClassic_Lobby_Server.utils } } + + + + + + + +