Esempio n. 1
0
void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
{
    CHECK_PACKET_SIZE(recvPacket,4);

    uint32 spellId;
    recvPacket >> spellId;

    SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
    if (!spellInfo)
        return;

    // not allow remove non positive spells and spells with attr SPELL_ATTR_CANT_CANCEL
    if(!IsPositiveSpell(spellId) || (spellInfo->Attributes & SPELL_ATTR_CANT_CANCEL))
        return;

    _player->RemoveAurasDueToSpellByCancel(spellId);

    if (spellId == 2584)                                    // Waiting to resurrect spell cancel, we must remove player from resurrect queue
    {
        BattleGround *bg = _player->GetBattleGround();
        if(!bg)
            return;
        bg->RemovePlayerFromResurrectQueue(_player->GetGUID());
    }
}
Esempio n. 2
0
void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
{
    CHECK_PACKET_SIZE(recvPacket,4);

    uint32 spellId;
    recvPacket >> spellId;

    // not allow remove non positive spells
    if(!IsPositiveSpell(spellId))
        return;

    _player->RemoveAurasDueToSpell(spellId);

    if (spellId == 2584)    // Waiting to resurrect spell cancel, we must remove player from resurrect queue
    {
        BattleGround *bg = _player->GetBattleGround();
        if(!bg)
            return;
        bg->RemovePlayerFromResurrectQueue(_player->GetGUID());
    }
}