Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-03-25 13:06:10 -06:00
committed by GitHub
14 changed files with 87 additions and 13 deletions

View File

@@ -824,7 +824,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
{
if (!IsAlive())
return DISABLED_MIRROR_TIMER;
return 2002;
return 2020;
}
default:
return 0;
@@ -920,7 +920,7 @@ void Player::HandleDrowning(uint32 time_diff)
m_MirrorTimer[FIRE_TIMER] -= time_diff;
if (m_MirrorTimer[FIRE_TIMER] < 0)
{
m_MirrorTimer[FIRE_TIMER] += 2002;
m_MirrorTimer[FIRE_TIMER] += 2020;
// Calculate and deal damage
/// @todo: Check this formula
uint32 damage = urand(600, 700);

View File

@@ -367,12 +367,6 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
case CHAT_MSG_WHISPER:
{
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
{
SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
return;
}
if (!normalizePlayerName(to))
{
SendPlayerNotFoundNotice(to);
@@ -382,6 +376,13 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
Player* receiver = ObjectAccessor::FindPlayerByName(to, false);
bool senderIsPlayer = AccountMgr::IsPlayerAccount(GetSecurity());
bool receiverIsPlayer = AccountMgr::IsPlayerAccount(receiver ? receiver->GetSession()->GetSecurity() : SEC_PLAYER);
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && receiver != sender)
{
SendNotification(GetAcoreString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
return;
}
if (!receiver || (senderIsPlayer && !receiverIsPlayer && !receiver->isAcceptWhispers() && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
{
SendPlayerNotFoundNotice(to);

View File

@@ -415,6 +415,25 @@ void WorldSession::HandleMailReturnToSender(WorldPacket& recvData)
player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
return;
}
if (m->HasItems())
{
for (MailItemInfoVec::iterator itr = m->items.begin(); itr != m->items.end(); ++itr)
{
Item* item = player->GetMItem(itr->item_guid);
if (item && !sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, item))
{
player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
return;
}
}
}
else if (!sScriptMgr->CanSendMail(player, ObjectGuid(HighGuid::Player, m->sender), mailbox, m->subject, m->body, m->money, m->COD, nullptr))
{
player->SendMailResult(mailId, MAIL_RETURNED_TO_SENDER, MAIL_ERR_INTERNAL_ERROR);
return;
}
//we can return mail now
//so firstly delete the old one
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();

View File

@@ -4495,6 +4495,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->CastTimeEntry = sSpellCastTimesStore.LookupEntry(1); // 0s
});
// Seed of Corruption
ApplySpellFix({ 27285, 47833, 47834 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx |= SPELL_ATTR1_NO_REFLECTION;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];

View File

@@ -844,6 +844,11 @@ public:
void JustSummoned(Creature* summon) override
{
if (summon->GetEntry() == NPC_HIGHLORD_TIRION_FORDRING_LK)
{
return;
}
switch (summon->GetEntry())
{
case NPC_SHAMBLING_HORROR:
@@ -3126,11 +3131,6 @@ public:
if (!summoner)
return;
if (summoner->GetTypeId() != TYPEID_UNIT)
{
return;
}
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING)))
{
me->SetWalk(false);