Core/Creatures: implement CREATURE_FLAG_EXTRA_NO_SELL_VENDOR (#21642)

* Add CREATURE_FLAG_EXTRA_NO_SELL_VENDOR and use it for a single no-sell vendor in game (there are more of them in later expansions)

(cherry picked from commit 7c5b69d18b)
This commit is contained in:
Mikhail Redko
2018-03-21 11:05:17 +02:00
committed by Shauren
parent 33bf5d3854
commit f8dda8a4fc
5 changed files with 26 additions and 16 deletions

View File

@@ -398,6 +398,12 @@ void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet)
return;
}
if ((creature->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_SELL_VENDOR) != 0)
{
_player->SendSellError(SELL_ERR_CANT_SELL_TO_THIS_MERCHANT, creature, packet.ItemGUID);
return;
}
// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);