mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/PacketIO: Updated packet structures to 8.0.1
This commit is contained in:
@@ -349,6 +349,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
charEnum.IsTestDemonHunterCreationAllowed = canAlwaysCreateDemonHunter;
|
||||
charEnum.IsDemonHunterCreationAllowed = GetAccountExpansion() >= EXPANSION_LEGION || canAlwaysCreateDemonHunter;
|
||||
charEnum.IsAlliedRacesCreationAllowed = GetAccountExpansion() >= EXPANSION_BATTLE_FOR_AZEROTH;
|
||||
|
||||
@@ -733,7 +734,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPackets::Character::CreateCharact
|
||||
|
||||
LoginDatabase.CommitTransaction(trans);
|
||||
|
||||
SendCharCreate(CHAR_CREATE_SUCCESS);
|
||||
SendCharCreate(CHAR_CREATE_SUCCESS, newChar.GetGUID());
|
||||
|
||||
TC_LOG_INFO("entities.player.character", "Account: %u (IP: %s) Create Character: %s %s", GetAccountId(), GetRemoteAddress().c_str(), createInfo->Name.c_str(), newChar.GetGUID().ToString().c_str());
|
||||
sScriptMgr->OnPlayerCreate(&newChar);
|
||||
@@ -2476,10 +2477,11 @@ void WorldSession::HandleCharUndeleteOpcode(WorldPackets::Character::UndeleteCha
|
||||
}));
|
||||
}
|
||||
|
||||
void WorldSession::SendCharCreate(ResponseCodes result)
|
||||
void WorldSession::SendCharCreate(ResponseCodes result, ObjectGuid const& guid /*= ObjectGuid::Empty*/)
|
||||
{
|
||||
WorldPackets::Character::CreateChar response;
|
||||
response.Code = result;
|
||||
response.Guid = guid;
|
||||
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user