Bot.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include "../NPC.h"
  3. #include <set>
  4. struct TradeItemInfo;
  5. class Bot : public NPC {
  6. public:
  7. Bot();
  8. ~Bot();
  9. int32 BotID; // DB id
  10. int32 BotIndex; // Bot id with its owner (player)
  11. bool IsBot() { return true; }
  12. void GiveItem(int32 item_id);
  13. void GiveItem(Item* item);
  14. void RemoveItem(Item* item);
  15. void TradeItemAdded(Item* item);
  16. void AddItemToTrade(int8 slot);
  17. bool CheckTradeItems(map<int8, TradeItemInfo>* list);
  18. void FinishTrade();
  19. void GetNewSpells();
  20. map<int32, int8>* GetBotSpells() { return &dd_spells; }
  21. bool ShowHelm;
  22. bool ShowCloak;
  23. bool CanTaunt;
  24. Entity* GetCombatTarget();
  25. void SetCombatTarget(int32 target) { combat_target = target; }
  26. Spell* SelectSpellToCast(float distance);
  27. void MessageGroup(string msg);
  28. void SetRecast(Spell* spell, int32 time);
  29. bool ShouldMelee();
  30. Spell* GetNextBuffSpell() { return GetBuffSpell(); }
  31. Spell* GetHealSpell();
  32. Spell* GetRezSpell();
  33. void SetMainTank(Entity* tank) { main_tank = tank; }
  34. void Camp(bool immediate=false);
  35. void ChangeLevel(int16 old_level, int16 new_level);
  36. private:
  37. bool CanEquipItem(Item* item);
  38. bool IsSpellReady(Spell* spell);
  39. Spell* GetTauntSpell();
  40. Spell* GetDetauntSpell();
  41. Spell* GetHoTWardSpell();
  42. Spell* GetDebuffSpell();
  43. Spell* GetCombatBuffSpell();
  44. Spell* GetDoTSpell();
  45. Spell* GetDDSpell();
  46. Spell* GetBuffSpell();
  47. Spell* GetCureSpell();
  48. int8 GetHealThreshold();
  49. set<int8> trading_slots;
  50. int32 combat_target;
  51. Entity* main_tank;
  52. map<int32, int8> bot_spells;
  53. map<int32, int8> dd_spells;
  54. map<int32, int8> dot_spells;
  55. map<int32, int8> heal_spells;
  56. map<int32, int8> hot_ward_spells;
  57. map<int32, int8> debuff_spells;
  58. map<int32, int8> buff_spells;
  59. map<int32, int8> combat_buff_spells;
  60. map<int32, int8> taunt_spells;
  61. map<int32, int8> detaunt_spells;
  62. map<int32, int8> rez_spells;
  63. map<int32, int8> cure_spells;
  64. // First int32 = spell id (change to timer id later), second int32 is time the spell is available to cast again
  65. map<int32, int32> recast_times;
  66. };