mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
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:
@@ -7496,6 +7496,19 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
|||||||
PermissionTypes permission = ALL_PERMISSION;
|
PermissionTypes permission = ALL_PERMISSION;
|
||||||
|
|
||||||
LOG_DEBUG("loot", "Player::SendLoot");
|
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())
|
if (guid.IsGameObject())
|
||||||
{
|
{
|
||||||
LOG_DEBUG("loot", "guid.IsGameObject");
|
LOG_DEBUG("loot", "guid.IsGameObject");
|
||||||
|
|||||||
Reference in New Issue
Block a user