mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-19 03:35:43 +00:00
Run clang-format
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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_ITEMUSAGEVALUE_H
|
||||
@@ -16,46 +17,48 @@ struct ItemTemplate;
|
||||
|
||||
enum ItemUsage : uint32
|
||||
{
|
||||
ITEM_USAGE_NONE = 0,
|
||||
ITEM_USAGE_EQUIP = 1,
|
||||
ITEM_USAGE_REPLACE = 2,
|
||||
ITEM_USAGE_BAD_EQUIP = 3,
|
||||
ITEM_USAGE_NONE = 0,
|
||||
ITEM_USAGE_EQUIP = 1,
|
||||
ITEM_USAGE_REPLACE = 2,
|
||||
ITEM_USAGE_BAD_EQUIP = 3,
|
||||
ITEM_USAGE_BROKEN_EQUIP = 4,
|
||||
ITEM_USAGE_QUEST = 5,
|
||||
ITEM_USAGE_SKILL = 6,
|
||||
ITEM_USAGE_USE = 7,
|
||||
ITEM_USAGE_GUILD_TASK = 8,
|
||||
ITEM_USAGE_DISENCHANT = 9,
|
||||
ITEM_USAGE_AH = 10,
|
||||
ITEM_USAGE_KEEP = 11,
|
||||
ITEM_USAGE_VENDOR = 12,
|
||||
ITEM_USAGE_AMMO = 13
|
||||
ITEM_USAGE_QUEST = 5,
|
||||
ITEM_USAGE_SKILL = 6,
|
||||
ITEM_USAGE_USE = 7,
|
||||
ITEM_USAGE_GUILD_TASK = 8,
|
||||
ITEM_USAGE_DISENCHANT = 9,
|
||||
ITEM_USAGE_AH = 10,
|
||||
ITEM_USAGE_KEEP = 11,
|
||||
ITEM_USAGE_VENDOR = 12,
|
||||
ITEM_USAGE_AMMO = 13
|
||||
};
|
||||
|
||||
class ItemUsageValue : public CalculatedValue<ItemUsage>, public Qualified
|
||||
{
|
||||
public:
|
||||
ItemUsageValue(PlayerbotAI* botAI, std::string const name = "item usage") : CalculatedValue<ItemUsage>(botAI, name) { }
|
||||
public:
|
||||
ItemUsageValue(PlayerbotAI* botAI, std::string const name = "item usage") : CalculatedValue<ItemUsage>(botAI, name)
|
||||
{
|
||||
}
|
||||
|
||||
ItemUsage Calculate() override;
|
||||
ItemUsage Calculate() override;
|
||||
|
||||
private:
|
||||
ItemUsage QueryItemUsageForEquip(ItemTemplate const* proto);
|
||||
uint32 GetSmallestBagSize();
|
||||
bool IsItemUsefulForQuest(Player* player, ItemTemplate const* proto);
|
||||
bool IsItemNeededForSkill(ItemTemplate const* proto);
|
||||
bool IsItemUsefulForSkill(ItemTemplate const* proto);
|
||||
bool IsItemNeededForUsefullSpell(ItemTemplate const* proto, bool checkAllReagents = false);
|
||||
bool HasItemsNeededForSpell(uint32 spellId, ItemTemplate const* proto);
|
||||
Item* CurrentItem(ItemTemplate const* proto);
|
||||
float CurrentStacks(ItemTemplate const* proto);
|
||||
float BetterStacks(ItemTemplate const* proto, std::string const usageType = "");
|
||||
private:
|
||||
ItemUsage QueryItemUsageForEquip(ItemTemplate const* proto);
|
||||
uint32 GetSmallestBagSize();
|
||||
bool IsItemUsefulForQuest(Player* player, ItemTemplate const* proto);
|
||||
bool IsItemNeededForSkill(ItemTemplate const* proto);
|
||||
bool IsItemUsefulForSkill(ItemTemplate const* proto);
|
||||
bool IsItemNeededForUsefullSpell(ItemTemplate const* proto, bool checkAllReagents = false);
|
||||
bool HasItemsNeededForSpell(uint32 spellId, ItemTemplate const* proto);
|
||||
Item* CurrentItem(ItemTemplate const* proto);
|
||||
float CurrentStacks(ItemTemplate const* proto);
|
||||
float BetterStacks(ItemTemplate const* proto, std::string const usageType = "");
|
||||
|
||||
public:
|
||||
static std::vector<uint32> SpellsUsingItem(uint32 itemId, Player* bot);
|
||||
static bool SpellGivesSkillUp(uint32 spellId, Player* bot);
|
||||
public:
|
||||
static std::vector<uint32> SpellsUsingItem(uint32 itemId, Player* bot);
|
||||
static bool SpellGivesSkillUp(uint32 spellId, Player* bot);
|
||||
|
||||
static std::string const GetConsumableType(ItemTemplate const* proto, bool hasMana);
|
||||
static std::string const GetConsumableType(ItemTemplate const* proto, bool hasMana);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user