Added option item requirement
This commit is contained in:
@@ -23,7 +23,16 @@ public:
|
||||
}
|
||||
Player* player = isPet ? attacker->GetOwner()->ToPlayer() : attacker->ToPlayer();
|
||||
|
||||
if (sConfigMgr->GetOption<bool>("Leech.DungeonsOnly", true) && !(player->GetMap()->IsDungeon()))
|
||||
|
||||
uint32 requiredItem = sConfigMgr->GetOption<uint32>("Leech.RequiredItemId", 0u);
|
||||
if (requiredItem != 0)
|
||||
{
|
||||
if (!player || !player->HasItemCount(requiredItem, 1, false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (sConfigMgr->GetOption<bool>("Leech.DungeonsOnly", true) && !(player->GetMap()->IsDungeon()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user