Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-01-08 23:30:50 +08:00
11 changed files with 2506 additions and 42 deletions

View File

@@ -9366,12 +9366,10 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b
}
}
void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false*/)
void Player::Whisper(uint32 textId, Player* target, bool isBossWhisper)
{
if (!target)
{
return;
}
BroadcastText const* bct = sObjectMgr->GetBroadcastText(textId);
if (!bct)
@@ -9382,7 +9380,10 @@ void Player::Whisper(uint32 textId, Player* target, bool /*isBossWhisper = false
LocaleConstant locale = target->GetSession()->GetSessionDbLocaleIndex();
WorldPacket data;
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
if (isBossWhisper)
ChatHandler::BuildChatPacket(data, CHAT_MSG_RAID_BOSS_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
else
ChatHandler::BuildChatPacket(data, CHAT_MSG_WHISPER, LANG_UNIVERSAL, this, target, bct->GetText(locale, getGender()), 0, "", locale);
target->SendDirectMessage(&data);
}

View File

@@ -1159,7 +1159,9 @@ enum AcoreStrings
LANG_CMD_CAST_ERROR_CODE = 5084,
// Room for more strings 5084-9999
LANG_CMD_GO_RESPAWN = 5085,
// Room for more strings 5086-9999
// Level requirement notifications
LANG_SAY_REQ = 6604,

View File

@@ -809,23 +809,6 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
break;
}
// Vanish (not exist)
case 18461:
{
unitTarget->RemoveMovementImpairingAuras(true);
unitTarget->RemoveAurasByType(SPELL_AURA_MOD_STALKED);
// See if we already are stealthed. If so, we're done.
if (unitTarget->HasAura(1784))
return;
// Reset cooldown on stealth if needed
if (unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->ToPlayer()->HasSpellCooldown(1784))
unitTarget->ToPlayer()->RemoveSpellCooldown(1784);
unitTarget->CastSpell(unitTarget, 1784, true);
return;
}
// Demonic Empowerment -- succubus
case 54437:
{
@@ -4079,18 +4062,6 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
// Xinef: Set last sanctuary time
unitTarget->m_lastSanctuaryTime = GameTime::GetGameTimeMS().count();
// Vanish allows to remove all threat and cast regular stealth so other spells can be used
if (m_caster->GetTypeId() == TYPEID_PLAYER
&& m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE
&& (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VANISH))
{
m_caster->ToPlayer()->RemoveAurasByType(SPELL_AURA_MOD_ROOT);
//Clean Escape
if (m_caster->HasAura(23582))
m_caster->CastSpell(m_caster, 23583, true);
}
}
void Spell::EffectAddComboPoints(SpellEffIndex /*effIndex*/)