Пример #1
0
        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;
            }

            _player.CastSpell(_player, selfRes.SpellId, new CastSpellExtraArgs(_player.GetMap().GetDifficultyID()));
            _player.RemoveSelfResSpell(selfRes.SpellId);
        }
Пример #2
0
        void HandleSelfRes(SelfRes packet)
        {
            if (_player.HasAuraType(AuraType.PreventResurrection))
            {
                return; // silent return, client should display error by itself and not send this opcode
            }
            if (_player.GetUInt32Value(PlayerFields.SelfResSpell) != 0)
            {
                SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(_player.GetUInt32Value(PlayerFields.SelfResSpell));
                if (spellInfo != null)
                {
                    _player.CastSpell(_player, spellInfo, false, null);
                }

                _player.SetUInt32Value(PlayerFields.SelfResSpell, 0);
            }
        }
Пример #3
0
        void HandleSelfRes(SelfRes selfRes)
        {
            if (_player.HasAuraType(AuraType.PreventResurrection))
            {
                return; // silent return, client should display error by itself and not send this opcode
            }
            var selfResSpells = _player.GetDynamicValues(PlayerDynamicFields.SelfResSpells);

            if (!selfResSpells.Contains(selfRes.SpellId))
            {
                return;
            }

            SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(selfRes.SpellId);

            if (spellInfo != null)
            {
                _player.CastSpell(_player, spellInfo, false, null);
            }

            _player.RemoveDynamicValue(PlayerDynamicFields.SelfResSpells, selfRes.SpellId);
        }
Пример #4
0
        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);

            if (spellInfo != null)
            {
                _player.CastSpell(_player, spellInfo, false, null);
            }

            _player.RemoveSelfResSpell(selfRes.SpellId);
        }