Not working, adding debug console flagging to troubleshoot
This commit is contained in:
parent
c12e7aded0
commit
b26156d05e
@ -24,13 +24,20 @@ public:
|
|||||||
Player* player = isPet ? attacker->GetOwner()->ToPlayer() : attacker->ToPlayer();
|
Player* player = isPet ? attacker->GetOwner()->ToPlayer() : attacker->ToPlayer();
|
||||||
|
|
||||||
|
|
||||||
uint32 requiredItem = sConfigMgr->GetOption<uint32>("Leech.RequiredItemId", 0u);
|
int32 requiredItemSigned = sConfigMgr->GetOption<int32>("Leech.RequiredItemId", 0);
|
||||||
if (requiredItem != 0)
|
if (requiredItemSigned > 0)
|
||||||
{
|
{
|
||||||
if (!player || !player->HasItemCount(requiredItem, 1, false))
|
uint32 requiredItem = uint32(requiredItemSigned);
|
||||||
|
if (!player || !player->HasItemCount(requiredItem, 1, false , false , true ))
|
||||||
{
|
{
|
||||||
|
if (sConfigMgr->GetOption<bool>("Leech.Debug", false))
|
||||||
|
LOG_DEBUG("module", "mod-leech: blocked (missing item {})", requiredItem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (sConfigMgr->GetOption<bool>("Leech.Debug", false))
|
||||||
|
{
|
||||||
|
LOG_DEBUG("module", "mod-leech: allowed (has item {})", requiredItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sConfigMgr->GetOption<bool>("Leech.DungeonsOnly", true) && !(player->GetMap()->IsDungeon()))
|
if (sConfigMgr->GetOption<bool>("Leech.DungeonsOnly", true) && !(player->GetMap()->IsDungeon()))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user