Allow looting some quest objects that have herbalism in code

This commit is contained in:
郑佩茹
2022-09-22 17:41:55 -06:00
parent cbf17c3eb9
commit 0f5f588879

View File

@@ -79,6 +79,7 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID)
GameObject* go = botAI->GetGameObject(lootGUID);
if (go && go->isSpawned() && go->GetGoState() == GO_STATE_READY)
{
uint32 goId = go->GetEntry();
uint32 lockId = go->GetGOInfo()->GetLockId();
LockEntry const* lockInfo = sLockStore.LookupEntry(lockId);
if (!lockInfo)
@@ -96,10 +97,14 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID)
}
break;
case LOCK_KEY_SKILL:
if (SkillByLockType(LockType(lockInfo->Index[i])) > 0)
if (goId == 13891 || goId == 19535) // Serpentbloom
{
this->guid = guid;
}
else if (SkillByLockType(LockType(lockInfo->Index[i])) > 0)
{
skillId = SkillByLockType(LockType(lockInfo->Index[i]));
reqSkillValue = std::max((uint32)1, lockInfo->Skill[i]);
reqSkillValue = std::max((uint32) 1, lockInfo->Skill[i]);
guid = lootGUID;
}
break;