feat: Add CanPlaceAuctionBid hook (#15154)

* feat: Add CanPlaceAuctionBid hook

* Codestyle fix
This commit is contained in:
ZhengPeiRu21
2023-04-17 18:06:04 -06:00
committed by GitHub
parent 9af9208d16
commit 5af67b384b
3 changed files with 25 additions and 0 deletions

View File

@@ -606,6 +606,21 @@ void ScriptMgr::OnQuestRewardItem(Player* player, Item* item, uint32 count)
});
}
bool ScriptMgr::CanPlaceAuctionBid(Player* player, AuctionEntry* auction)
{
auto ret = IsValidBoolScript<PlayerScript>([&](PlayerScript *script)
{
return !script->CanPlaceAuctionBid(player, auction);
});
if (ret && *ret)
{
return false;
}
return true;
}
void ScriptMgr::OnGroupRollRewardItem(Player* player, Item* item, uint32 count, RollVote voteType, Roll* roll)
{
ExecuteScript<PlayerScript>([&](PlayerScript* script)