Core/Spells: Implement SPELL_ATTR7_BYPASS_NO_RESURRECT_AURA
Port From (https://github.com/TrinityCore/TrinityCore/commit/2ae67de4c0f327edc60d5da9cc815016d48b7228)
This commit is contained in:
@@ -512,13 +512,17 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SelfRes)]
|
||||
void HandleSelfRes(SelfRes selfRes)
|
||||
{
|
||||
if (_player.HasAuraType(AuraType.PreventResurrection))
|
||||
return; // silent return, client should display error by itself and not send this opcode
|
||||
|
||||
List<uint> selfResSpells = _player.m_activePlayerData.SelfResSpells;
|
||||
if (!selfResSpells.Contains(selfRes.SpellId))
|
||||
return;
|
||||
|
||||
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(selfRes.SpellId, _player.GetMap().GetDifficultyID());
|
||||
if (spellInfo == null)
|
||||
return;
|
||||
|
||||
if (_player.HasAuraType(AuraType.PreventResurrection) && !spellInfo.HasAttribute(SpellAttr7.BypassNoResurrectAura))
|
||||
return; // silent return, client should display error by itself and not send this opcode
|
||||
|
||||
_player.CastSpell(_player, selfRes.SpellId, new CastSpellExtraArgs(_player.GetMap().GetDifficultyID()));
|
||||
_player.RemoveSelfResSpell(selfRes.SpellId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user