mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
More works, update auth and char enum 5.4.8
This commit is contained in:
parent
a149adb835
commit
c8d020c7ea
8 changed files with 1055 additions and 1011 deletions
|
|
@ -1619,7 +1619,6 @@ bool Player::BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* bu
|
|||
uint8 gender = fields[4].GetUInt8();
|
||||
uint32 playerBytes = fields[5].GetUInt32();
|
||||
uint32 playerBytes2 = fields[6].GetUInt32();
|
||||
*buffer << uint8(playerBytes2 & 0xFF); // facial hair
|
||||
uint8 level = fields[7].GetUInt8();
|
||||
uint32 playerFlags = fields[14].GetUInt32();
|
||||
uint32 atLoginFlags = fields[15].GetUInt32();
|
||||
|
|
@ -1629,20 +1628,6 @@ bool Player::BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* bu
|
|||
uint32 petFamily = 0;
|
||||
uint32 char_flags = 0;
|
||||
|
||||
data->WriteGuidMask<1>(guid);
|
||||
data->WriteGuidMask<5, 6, 7>(guildGuid);
|
||||
data->WriteGuidMask<5>(guid);
|
||||
data->WriteGuidMask<3>(guildGuid);
|
||||
data->WriteGuidMask<2>(guid);
|
||||
data->WriteGuidMask<4>(guildGuid);
|
||||
data->WriteGuidMask<7>(guid);
|
||||
data->WriteBits(name.length(), 6);
|
||||
data->WriteBit(atLoginFlags & AT_LOGIN_FIRST);
|
||||
data->WriteGuidMask<1>(guildGuid);
|
||||
data->WriteGuidMask<4>(guid);
|
||||
data->WriteGuidMask<2, 0>(guildGuid);
|
||||
data->WriteGuidMask<6, 3, 0>(guid);
|
||||
|
||||
// show pet at selection character in character list only for non-ghost character
|
||||
if (result && !(playerFlags & PLAYER_FLAGS_GHOST) && (pClass == CLASS_WARLOCK || pClass == CLASS_HUNTER || pClass == CLASS_DEATH_KNIGHT))
|
||||
{
|
||||
|
|
@ -1672,6 +1657,49 @@ bool Player::BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* bu
|
|||
else
|
||||
char_flags |= CHARACTER_FLAG_DECLINED;
|
||||
|
||||
data->WriteBit(guildGuid[4]);
|
||||
data->WriteBit(guid[0]);
|
||||
data->WriteBit(guildGuid[3]);
|
||||
data->WriteBit(guid[3]);
|
||||
data->WriteBit(guid[7]);
|
||||
data->WriteBit(0); // Can boost ?
|
||||
data->WriteBit(atLoginFlags & AT_LOGIN_FIRST);
|
||||
data->WriteBit(guid[6]);
|
||||
data->WriteBit(guildGuid[6]);
|
||||
data->WriteBits(uint32(name.length()), 6);
|
||||
data->WriteBit(guid[1]);
|
||||
data->WriteBit(guildGuid[1]);
|
||||
data->WriteBit(guildGuid[0]);
|
||||
data->WriteBit(guid[4]);
|
||||
data->WriteBit(guildGuid[7]);
|
||||
data->WriteBit(guid[2]);
|
||||
data->WriteBit(guid[5]);
|
||||
data->WriteBit(guildGuid[2]);
|
||||
data->WriteBit(guildGuid[5]);
|
||||
|
||||
// Character data
|
||||
*buffer << uint32(0); // UNK02 - might be swapped with UNK03
|
||||
|
||||
buffer->WriteByteSeq(guid[1]);
|
||||
|
||||
*buffer << uint8(fields[20].GetUInt8()); // char order id
|
||||
*buffer << uint8((playerBytes >> 16) & 0xFF); // Hair style
|
||||
|
||||
buffer->WriteByteSeq(guildGuid[2]);
|
||||
buffer->WriteByteSeq(guildGuid[0]);
|
||||
buffer->WriteByteSeq(guildGuid[6]);
|
||||
|
||||
buffer->append(name.c_str(), name.length()); // Name
|
||||
|
||||
buffer->WriteByteSeq(guildGuid[3]);
|
||||
|
||||
*buffer << fields[10].GetFloat(); // x
|
||||
*buffer << uint32(0); // UNK00 new field - Boost fieldand the pet fields
|
||||
*buffer << uint8((playerBytes >> 8) & 0xFF); // face
|
||||
*buffer << uint8(pClass); // class
|
||||
|
||||
buffer->WriteByteSeq(guildGuid[5]);
|
||||
|
||||
Tokens tdata = StrSplit(fields[19].GetCppString(), " ");
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
|
|
@ -1700,73 +1728,60 @@ bool Player::BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* bu
|
|||
break;
|
||||
}
|
||||
|
||||
*buffer << uint32(enchant ? enchant->aura_id : 0);
|
||||
*buffer << uint8(proto->InventoryType);
|
||||
*buffer << uint32(proto->DisplayInfoID);
|
||||
*buffer << uint32(enchant ? enchant->aura_id : 0);
|
||||
}
|
||||
|
||||
for (int32 i = 0; i < 23; i++)
|
||||
for (int32 i = 0; i < 4; i++)
|
||||
{
|
||||
*buffer << uint32(0);
|
||||
*buffer << uint32(0);
|
||||
*buffer << uint8(0);
|
||||
*buffer << uint32(0);
|
||||
*buffer << uint32(0);
|
||||
}
|
||||
|
||||
buffer->WriteGuidBytes<4>(guid);
|
||||
|
||||
*buffer << uint8(pRace); // Race
|
||||
|
||||
buffer->WriteGuidBytes<6>(guid);
|
||||
buffer->WriteGuidBytes<1>(guildGuid);
|
||||
|
||||
*buffer << uint8(fields[20].GetUInt8()); // char order id
|
||||
*buffer << uint8((playerBytes >> 16) & 0xFF); // Hair style
|
||||
|
||||
buffer->WriteGuidBytes<6>(guildGuid);
|
||||
buffer->WriteGuidBytes<3>(guid);
|
||||
|
||||
*buffer << fields[10].GetFloat(); // x
|
||||
*buffer << uint32(char_flags); // character flags
|
||||
|
||||
buffer->WriteGuidBytes< 0>(guildGuid);
|
||||
|
||||
*buffer << uint32(petLevel); // pet level
|
||||
*buffer << uint32(fields[9].GetUInt32()); // map
|
||||
|
||||
buffer->WriteGuidBytes<7>(guildGuid);
|
||||
// character customize flags
|
||||
*buffer << uint32(atLoginFlags & AT_LOGIN_CUSTOMIZE ? CHAR_CUSTOMIZE_FLAG_CUSTOMIZE : CHAR_CUSTOMIZE_FLAG_NONE);
|
||||
|
||||
buffer->WriteGuidBytes<4>(guildGuid);
|
||||
buffer->WriteGuidBytes<2, 5>(guid);
|
||||
buffer->WriteByteSeq(guid[3]);
|
||||
buffer->WriteByteSeq(guid[5]);
|
||||
|
||||
*buffer << fields[11].GetFloat(); // y
|
||||
*buffer << uint32(petFamily); // Pet DisplayID
|
||||
buffer->append(name.c_str(), name.length());
|
||||
*buffer << uint32(petDisplayId); // Pet DisplayID
|
||||
*buffer << uint32(petFamily); // Pet family
|
||||
|
||||
buffer->WriteGuidBytes<3>(guildGuid);
|
||||
buffer->WriteGuidBytes<7>(guid);
|
||||
buffer->WriteByteSeq(guildGuid[4]);
|
||||
|
||||
*buffer << uint32(fields[9].GetUInt32()); // map
|
||||
*buffer << uint8(pRace); // Race
|
||||
*buffer << uint8(playerBytes & 0xFF); // skin
|
||||
|
||||
buffer->WriteByteSeq(guildGuid[1]);
|
||||
|
||||
*buffer << uint8(level); // Level
|
||||
|
||||
buffer->WriteGuidBytes<1>(guid);
|
||||
buffer->WriteGuidBytes<2>(guildGuid);
|
||||
|
||||
*buffer << fields[12].GetFloat(); // z
|
||||
*buffer << uint32(zone); // Zone id
|
||||
*buffer << uint8(playerBytes2 & 0xFF); // facial hair
|
||||
*buffer << uint8(pClass); // class
|
||||
|
||||
buffer->WriteGuidBytes<5>(guildGuid);
|
||||
|
||||
*buffer << uint8(playerBytes & 0xFF); // skin
|
||||
*buffer << uint8(gender); // Gender
|
||||
*buffer << uint8((playerBytes >> 8) & 0xFF); // face
|
||||
|
||||
buffer->WriteGuidBytes<0>(guid);
|
||||
buffer->WriteByteSeq(guid[0]);
|
||||
buffer->WriteByteSeq(guid[2]);
|
||||
|
||||
*buffer << uint8((playerBytes >> 24) & 0xFF); // Hair color
|
||||
*buffer << uint8(gender); // Gender
|
||||
*buffer << uint8(playerBytes2 & 0xFF); // facial hair
|
||||
|
||||
*buffer << uint32(petLevel); // pet level
|
||||
|
||||
buffer->WriteByteSeq(guid[4]);
|
||||
buffer->WriteByteSeq(guid[7]);
|
||||
|
||||
*buffer << fields[11].GetFloat(); // y
|
||||
*buffer << uint32(petDisplayId); // Pet DisplayID
|
||||
|
||||
*buffer << uint32(0); // UNK03 - might be swaped with UNK02 and the pet fields
|
||||
|
||||
buffer->WriteByteSeq(guid[6]);
|
||||
|
||||
*buffer << uint32(char_flags); // character flags
|
||||
*buffer << uint32(zone); // Zone id
|
||||
|
||||
buffer->WriteByteSeq(guildGuid[7]);
|
||||
|
||||
*buffer << fields[12].GetFloat(); // z
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -21684,7 +21699,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
|
||||
//SetMover(this);
|
||||
|
||||
/// Pass 'this' as argument because we're not stored in ObjectAccessor yet
|
||||
/// Pass 'this' as argument because we're not stored in ObjectAccessor yet
|
||||
GetSocial()->SendSocialList();
|
||||
|
||||
// guild bank list wtf?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue