Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-07-03 16:03:45 +08:00
81 changed files with 889 additions and 415 deletions

View File

@@ -888,7 +888,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
if (at)
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
else
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->m_homebindO);
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation());
}
pCurrChar->SendInitialPacketsAfterAddToMap();
@@ -2322,7 +2322,6 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
stmt->SetData(3, loc.GetPositionX());
stmt->SetData(4, loc.GetPositionY());
stmt->SetData(5, loc.GetPositionZ());
stmt->SetData(6, loc.GetOrientation());
trans->Append(stmt);
Player::SavePositionInDB(loc, zoneId, factionChangeInfo->Guid, trans);

View File

@@ -1720,7 +1720,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recv_data*/)
_player->BuildPlayerRepop();
_player->ResurrectPlayer(1.0f);
_player->SpawnCorpseBones();
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->m_homebindO);
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
}
void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)

View File

@@ -92,7 +92,7 @@ void WorldSession::HandleMoveWorldportAck()
if (!newMap || newMap->CannotEnter(GetPlayer(), false))
{
LOG_ERROR("network.opcode", "Map {} could not be created for player {}, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUID().ToString());
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO);
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
return;
}
@@ -111,7 +111,7 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->GetName(), GetPlayer()->GetGUID().ToString(), loc.GetMapId());
GetPlayer()->ResetMap();
GetPlayer()->SetMap(oldMap);
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->m_homebindO);
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
return;
}

View File

@@ -856,18 +856,6 @@ void WorldSession::HandlePetRename(WorldPacket& recvData)
return;
}
if (sObjectMgr->IsReservedName(name))
{
SendPetNameInvalid(PET_NAME_RESERVED, name, nullptr);
return;
}
if (sObjectMgr->IsProfanityName(name))
{
SendPetNameInvalid(PET_NAME_PROFANE, name, nullptr);
return;
}
pet->SetName(name);
Unit* owner = pet->GetOwner();

View File

@@ -136,7 +136,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
return;
}
if (sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
if (!ObjectMgr::IsValidCharterName(name))
{
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, name);
return;
@@ -149,7 +149,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
if (sObjectMgr->IsReservedName(name) || sObjectMgr->IsProfanityName(name) || !ObjectMgr::IsValidCharterName(name))
if (!ObjectMgr::IsValidCharterName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
@@ -350,7 +350,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_EXISTS_S, newName);
return;
}
if (sObjectMgr->IsReservedName(newName) || sObjectMgr->IsProfanityName(newName) || !ObjectMgr::IsValidCharterName(newName))
if (!ObjectMgr::IsValidCharterName(newName))
{
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, newName);
return;
@@ -363,7 +363,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newName, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
if (sObjectMgr->IsReservedName(newName) || sObjectMgr->IsProfanityName(newName) || !ObjectMgr::IsValidCharterName(newName))
if (!ObjectMgr::IsValidCharterName(newName))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newName, "", ERR_ARENA_TEAM_NAME_INVALID);
return;