fix(Core/Creature): Implement CREATURE_FLAG_EXTRA_NO_SELL_VENDOR (#4233)

This commit is contained in:
Kitzunu
2021-01-26 14:12:21 +01:00
committed by GitHub
parent 4a433afaba
commit 17d2560ffa
4 changed files with 20 additions and 8 deletions

View File

@@ -647,6 +647,12 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData)
return;
}
if ((creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_SELL_VENDOR) != 0)
{
_player->SendSellError(SELL_ERR_CANT_SELL_TO_THIS_MERCHANT, creature, itemguid, 0);
return;
}
// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);