Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-02-04 23:40:06 +08:00
81 changed files with 3144 additions and 611 deletions

View File

@@ -1340,7 +1340,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
return false;
}
if (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && DisableMgr::IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
if (AccountMgr::IsPlayerAccount(GetSession()->GetSecurity()) && sDisableMgr->IsDisabledFor(DISABLE_TYPE_MAP, mapid, this))
{
LOG_ERROR("entities.player", "Player ({}, name: {}) tried to enter a forbidden map {}", GetGUID().ToString(), GetName(), mapid);
SendTransferAborted(mapid, TRANSFER_ABORT_MAP_NOT_ALLOWED);
@@ -4493,6 +4493,9 @@ void Player::BuildPlayerRepop()
void Player::ResurrectPlayer(float restore_percent, bool applySickness)
{
if (!sScriptMgr->CanPlayerResurrect(this))
return;
WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4 * 4); // remove spirit healer position
data << uint32(-1);
data << float(0);
@@ -5993,7 +5996,7 @@ void Player::RewardReputation(Unit* victim)
if (!victim || victim->IsPlayer())
return;
if (victim->ToCreature()->IsReputationGainDisabled())
if (victim->ToCreature()->IsReputationRewardDisabled())
return;
ReputationOnKillEntry const* Rep = sObjectMgr->GetReputationOnKilEntry(victim->ToCreature()->GetCreatureTemplate()->Entry);
@@ -8858,6 +8861,8 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
}
}
sWorldState->FillInitialWorldStates(data, zoneid, areaid);
uint16 length = (data.wpos() - countPos) / 8;
data.put<uint16>(countPos, length);