mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Bots] [Quest API] Add ^clickitem, ^timer, fix GetBestBotSpellForCure (#3755)
* [Bots][Quest API] Add ^clickitem, ^timer, revamp bot timers, fix GetBestBotSpellForCure This adds the command **^clickitem** for bots. Bots can click items they are wearing with the provided slot ID, players can use **^invlist** on their bots to see items and slot IDs. This supports actionables. **^itemclick 13 byclass 11** would command all Necromancer bots to attempt to click their Primary item. This adds and supports charges for items to bots, when an item is used, it will lose a charge and cannot be clicked once no charges remain. This adds the following rules: **Bots, BotsClickItemsMinLvl** - Minimum level bots can use **^clickitem**. **Bots, BotsCanClickItems** - Whether or not **^clickitem** is allowed for bots. **Bots, CanClickMageEpicV1** - Whether or not players are allowed to command their bots to use the Magician Epic 1.0 This adds quest methods to Perl/Lua for: ClearDisciplineReuseTimer, ClearItemReuseTimer, ClearSpellRecastTimer GetDisciplineReuseTimer, GetItemReuseTimer, GetSpellRecastTimer SetDisciplineReuseTimer, SetItemReuseTimer, SetSpellRecastTimer Discipline and Spell methods use the spell_id to check, get and set. Item uses the item_id. Clear and Get support wildcards (no spell/item id) to clear all timers of the type or get the first timer of the type. Get will return the remaining time on the chosen timer, if any. Set supports a wildcard (no recast/reuse provided) to use the default of the provided type, you can also specify a recast/reuse timer to set that timer to the chosen value. **^timer** has been added as a bot command, defaulted for GM access. This can be used to set, get and clear timers of different types. Use **^timer help** for info. This revamps the way timers are set, stored, loaded for bots. **GetBestBotSpellForCure** was previously checking only the first spell found and not properly iterating through the checks. This requires modifications to the **bot_timers** table and is included in this commit. * Rebase Conflicts * Update queries to use repositories * Minor adjustment * Formatting * Handle delete as well * Cleanup. * Adjust primary keys to prevent conflicts --------- Co-authored-by: Akkadius <akkadius1@gmail.com> Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
@@ -107,6 +107,25 @@ public:
|
||||
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets);
|
||||
void SetSpellDurationRaid(int spell_id, int duration, int level, bool allow_pets, bool is_raid_group_only);
|
||||
|
||||
void ClearDisciplineReuseTimer();
|
||||
void ClearDisciplineReuseTimer(uint16 spell_id);
|
||||
void ClearItemReuseTimer();
|
||||
void ClearItemReuseTimer(uint32 item_id);
|
||||
void ClearSpellRecastTimer();
|
||||
void ClearSpellRecastTimer(uint16 spell_id);
|
||||
uint32 GetDisciplineReuseTimer();
|
||||
uint32 GetDisciplineReuseTimer(uint16 spell_id);
|
||||
uint32 GetItemReuseTimer();
|
||||
uint32 GetItemReuseTimer(uint32 item_id);
|
||||
uint32 GetSpellRecastTimer();
|
||||
uint32 GetSpellRecastTimer(uint16 spell_id);
|
||||
void SetDisciplineReuseTimer(uint16 spell_id);
|
||||
void SetDisciplineReuseTimer(uint16 spell_id, uint32 reuse_timer);
|
||||
void SetItemReuseTimer(uint32 item_id);
|
||||
void SetItemReuseTimer(uint32 item_id, uint32 reuse_timer);
|
||||
void SetSpellRecastTimer(uint16 spell_id);
|
||||
void SetSpellRecastTimer(uint16 spell_id, uint32 reuse_timer);
|
||||
|
||||
int CountAugmentEquippedByID(uint32 item_id);
|
||||
int CountItemEquippedByID(uint32 item_id);
|
||||
bool HasAugmentEquippedByID(uint32 item_id);
|
||||
|
||||
Reference in New Issue
Block a user