sync with azerothcore

This commit is contained in:
Yunfan Li
2023-12-12 21:02:23 +08:00
parent 748801b10b
commit 5e14f2f26d
8 changed files with 20 additions and 18 deletions

View File

@@ -5,6 +5,7 @@
#include "LootObjectStack.h"
#include "LootMgr.h"
#include "Playerbots.h"
#include "Unit.h"
#define MAX_LOOT_OBJECT_COUNT 10
@@ -59,7 +60,7 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID)
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
Creature* creature = botAI->GetCreature(lootGUID);
if (creature && creature->getDeathState() == CORPSE)
if (creature && creature->getDeathState() == DeathState::Corpse)
{
if (creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
guid = lootGUID;
@@ -176,7 +177,7 @@ WorldObject* LootObject::GetWorldObject(Player* bot)
PlayerbotAI* botAI = GET_PLAYERBOT_AI(bot);
Creature* creature = botAI->GetCreature(guid);
if (creature && creature->getDeathState() == CORPSE)
if (creature && creature->getDeathState() == DeathState::Corpse)
return creature;
GameObject* go = botAI->GetGameObject(guid);
@@ -208,7 +209,7 @@ bool LootObject::IsLootPossible(Player* bot)
return false;
Creature* creature = botAI->GetCreature(guid);
if (creature && creature->getDeathState() == CORPSE)
if (creature && creature->getDeathState() == DeathState::Corpse)
{
if (!bot->isAllowedToLoot(creature) && skillId != SKILL_SKINNING)
return false;