Big update.

This commit is contained in:
UltraNix
2022-03-12 22:27:09 +01:00
parent b3d00ccb26
commit b952636f0d
843 changed files with 1534330 additions and 99 deletions

View File

@@ -0,0 +1,56 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
*/
#ifndef _PLAYERBOT_LOOTACTION_H
#define _PLAYERBOT_LOOTACTION_H
#include "InventoryAction.h"
#include "MovementActions.h"
class GameObject;
class LootObject;
class PlayerbotAI;
class SpellInfo;
class LootAction : public MovementAction
{
public:
LootAction(PlayerbotAI* botAI) : MovementAction(botAI, "loot") { }
bool Execute(Event event) override;
};
class OpenLootAction : public MovementAction
{
public:
OpenLootAction(PlayerbotAI* botAI) : MovementAction(botAI, "open loot") { }
bool Execute(Event event) override;
private:
bool DoLoot(LootObject& lootObject);
uint32 GetOpeningSpell(LootObject& lootObject);
uint32 GetOpeningSpell(LootObject& lootObject, GameObject* go);
bool CanOpenLock(LootObject& lootObject, SpellInfo const* spellInfo, GameObject* go);
bool CanOpenLock(uint32 skillId, uint32 reqSkillValue);
};
class StoreLootAction : public InventoryAction
{
public:
StoreLootAction(PlayerbotAI* botAI) : InventoryAction(botAI, "store loot") { }
bool Execute(Event event) override;
static bool IsLootAllowed(uint32 itemid, PlayerbotAI* botAI);
};
class ReleaseLootAction : public InventoryAction
{
public:
ReleaseLootAction(PlayerbotAI* botAI) : InventoryAction(botAI, "release loot") { }
bool Execute(Event event) override;
};
#endif