Core/PacketIO: Updated packet structures to 8.0.1

This commit is contained in:
Shauren
2018-10-04 18:50:21 +02:00
parent 7512ffb058
commit 0a779bd791
127 changed files with 1809 additions and 1045 deletions

View File

@@ -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());
}