fix(Core/Loot) remove stealth/feign death on loot (#8982)

* remove a few auras on loot

* remove mount, doesn't work

* removed unnecessary check. Changed to vector

* exception for pickpocketing

* Update src/server/game/Entities/Player/Player.cpp

* Update src/server/game/Entities/Player/Player.cpp

* Update src/server/game/Entities/Player/Player.cpp

* Update src/server/game/Entities/Player/Player.cpp

* Update src/server/game/Entities/Player/Player.cpp

* not as elegant yadi yada but it seems to work

* extra comment

* stealth doesn't remove on containers and enchant anymore, but should it?

* moved a few lines to the right place

* remove disenchant and prospect from not breaking stealth

* typo

* comments

Co-authored-by: Kargatum <dowlandtop@yandex.com>
This commit is contained in:
patou01
2021-11-25 20:38:54 +01:00
committed by GitHub
parent bf05bd3c88
commit 44de147a9b

View File

@@ -7496,6 +7496,19 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
PermissionTypes permission = ALL_PERMISSION;
LOG_DEBUG("loot", "Player::SendLoot");
// remove FD and invisibility at all loots
constexpr std::array<AuraType, 2> toRemove = {SPELL_AURA_MOD_INVISIBILITY, SPELL_AURA_FEIGN_DEATH};
for (const auto& aura : toRemove)
{
RemoveAurasByType(aura);
}
// remove stealth only if looting a corpse
if (loot_type == LOOT_CORPSE && !guid.IsItem())
{
RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
}
if (guid.IsGameObject())
{
LOG_DEBUG("loot", "guid.IsGameObject");