Core/Creatures: implement CREATURE_FLAG_EXTRA_NO_SELL_VENDOR

Port From (https://github.com/TrinityCore/TrinityCore/commit/f8dda8a4fc696d07bb6007e49140cec1b7f60dd5)
This commit is contained in:
hondacrx
2021-09-21 20:04:54 -04:00
parent d771b5c9f6
commit 2b08c49bbf
3 changed files with 14 additions and 7 deletions
+6
View File
@@ -390,6 +390,12 @@ namespace Game
return;
}
if (creature.GetCreatureTemplate().FlagsExtra.HasFlag(CreatureFlagsExtra.NoSellVendor))
{
_player.SendSellError(SellResult.CantSellToThisMerchant, creature, packet.ItemGUID);
return;
}
// remove fake death
if (pl.HasUnitState(UnitState.Died))
pl.RemoveAurasByType(AuraType.FeignDeath);