mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
sync with azerothcore
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user