mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user