public static void SendCharacterNamesResponse(IRealmClient client) { SendCharacterInfoLSResponse(client); using (var packet = new RealmPacketOut(RealmServerOpCode.CharacterNames))//1006 { byte hair1 = 0; byte hair2 = 0; byte hair3 = 0; byte color1 = 0; byte color2 = 0; byte color3 = 0; byte zodiac1 = 0; byte zodiac2 = 0; byte zodiac3 = 0; byte face1 = 0; byte face2 = 0; byte face3 = 0; packet.WriteInt32(0);//unknown foreach (var character in client.AuthAccount.Characters) { if (character.CharNum == 10) { hair1 = character.HairStyle; color1 = character.HairColor; face1 = character.Face; zodiac1 = character.Zodiac; } if (character.CharNum == 11) { hair2 = character.HairStyle; color2 = character.HairColor; face2 = character.Face; zodiac2 = character.Zodiac; } if (character.CharNum == 12) { hair3 = character.HairStyle; color3 = character.HairColor; face3 = character.Face; zodiac3 = character.Zodiac; } packet.WriteByte(character.CharNum); //default value : 0 packet.WriteAsdaString(character.Name, 21); //default value : "",21 packet.WriteByte((byte)character.Gender); //default value : 1 packet.WriteByte(character.ProfessionLevel); //value name : _ packet.WriteByte((byte)character.Class); //value name : _ packet.WriteByte(character.Level); //default value : 0 packet.WriteInt64(0); //value name : _ packet.WriteInt32(character.Health); //default value : 0 packet.WriteInt16(character.Power); //default value : 0 packet.WriteInt32(character.Health); //default value : 265 packet.WriteInt16(character.Power); //default value : 100 packet.WriteInt16(character.BaseStrength); //default value : 1 packet.WriteInt16(character.BaseAgility); //default value : 2 packet.WriteInt16(character.BaseStamina); //default value : 3 packet.WriteInt16(character.BaseSpirit); //default value : 4 packet.WriteInt16(character.BaseIntellect); //default value : 5 packet.WriteInt16(10); //default value : 6 packet.WriteByte(0); //value name : _ } for (int i = 0; i < 3 - client.AuthAccount.Characters.Count; i++) { packet.WriteByte(0); //default value : 0 packet.WriteAsdaString("", 21); //default value : "",21 packet.WriteByte(0); //default value : 1 packet.WriteByte(0); //value name : _ packet.WriteByte(0); //value name : _ packet.WriteByte(0); //default value : 0 packet.WriteInt64(0); //value name : _ packet.WriteInt32(0); //default value : 0 packet.WriteInt16(0); //default value : 0 packet.WriteInt32(0); //default value : 265 packet.WriteInt16(0); //default value : 100 packet.WriteInt16(0); //default value : 1 packet.WriteInt16(0); //default value : 2 packet.WriteInt16(0); //default value : 3 packet.WriteInt16(0); //default value : 4 packet.WriteInt16(0); //default value : 5 packet.WriteInt16(0); //default value : 6 packet.WriteByte(0); //value name : _ } packet.WriteByte(hair1); //default value : 1 packet.WriteByte(color1); //default value : 1 packet.WriteByte(face1); //default value : 1 packet.WriteByte(hair2); //default value : 1 packet.WriteByte(color2); //default value : 1 packet.WriteByte(face2); //default value : 1 packet.WriteByte(hair3); //default value : 1 packet.WriteByte(color3); //default value : 1 packet.WriteByte(face3); //default value : 1 packet.WriteByte(zodiac1); //default value : 1 packet.WriteByte(zodiac2); //default value : 1 packet.WriteByte(zodiac3); //default value : 1 for (int i = 0; i < 16; i++) { packet.WriteByte(1); } packet.WriteInt32(63); client.Send(packet, addEnd: false); } SendShowCharactersViewResponse(client); }
public static void SendCharacterNamesResponse(IRealmClient client) { AuthenticationHandler.SendCharacterInfoLSResponse(client); using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.CharacterNames)) { byte val1 = 0; byte val2 = 0; byte val3 = 0; byte val4 = 0; byte val5 = 0; byte val6 = 0; byte val7 = 0; byte val8 = 0; byte val9 = 0; byte val10 = 0; byte val11 = 0; byte val12 = 0; packet.WriteInt32(0); foreach (CharacterRecord character in client.AuthAccount.Characters) { if (character.CharNum == (byte)10) { val1 = character.HairStyle; val4 = character.HairColor; val10 = character.Face; val7 = character.Zodiac; } if (character.CharNum == (byte)11) { val2 = character.HairStyle; val5 = character.HairColor; val11 = character.Face; val8 = character.Zodiac; } if (character.CharNum == (byte)12) { val3 = character.HairStyle; val6 = character.HairColor; val12 = character.Face; val9 = character.Zodiac; } packet.WriteByte(character.CharNum); packet.WriteAsdaString(character.Name, 21, Locale.Start); packet.WriteByte((byte)character.Gender); packet.WriteByte(character.ProfessionLevel); packet.WriteByte((byte)character.Class); packet.WriteByte(character.Level); packet.WriteInt64(0L); packet.WriteInt32(character.Health); packet.WriteInt16(character.Power); packet.WriteInt32(character.Health); packet.WriteInt16(character.Power); packet.WriteInt16(character.BaseStrength); packet.WriteInt16(character.BaseAgility); packet.WriteInt16(character.BaseStamina); packet.WriteInt16(character.BaseSpirit); packet.WriteInt16(character.BaseIntellect); packet.WriteInt16(10); packet.WriteByte(0); } for (int index = 0; index < 3 - client.AuthAccount.Characters.Count; ++index) { packet.WriteByte(0); packet.WriteAsdaString("", 21, Locale.Start); packet.WriteByte(0); packet.WriteByte(0); packet.WriteByte(0); packet.WriteByte(0); packet.WriteInt64(0L); packet.WriteInt32(0); packet.WriteInt16(0); packet.WriteInt32(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteInt16(0); packet.WriteByte(0); } packet.WriteByte(val1); packet.WriteByte(val4); packet.WriteByte(val10); packet.WriteByte(val2); packet.WriteByte(val5); packet.WriteByte(val11); packet.WriteByte(val3); packet.WriteByte(val6); packet.WriteByte(val12); packet.WriteByte(val7); packet.WriteByte(val8); packet.WriteByte(val9); for (int index = 0; index < 16; ++index) { packet.WriteByte(1); } packet.WriteInt32(63); client.Send(packet, false); } AuthenticationHandler.SendShowCharactersViewResponse(client); }