* [Bot] Add Buff support for Bards under AI_IdleCastChecks
* Add InCombatBuffSong to Idle Bard cast Logic
* Fixes a number of Buffs that would fail to land on the Bot, causing casting loops
* Accidently removed If Statement added back.
* Update bot.cpp
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
* [Bots] Optimize inventory loading.
# Notes
- Bots previously were running 23 individual queries to load their inventory versus grabbing their inventory all at once and referencing it in memory.
* Typo.
* Update bot_database.cpp
* Update bot_database.cpp
* Update bot.cpp
* [Bots] Add Bot-specific Spell Settings.
# Notes
- Allows players to set `priority`, `min_level`, `max_level`, `min_hp`, `max_hp`, and `is_enabled` settings per spell based on targeted bot.
- Lets players disable spells they don't want their bots casting or change the criteria they cast them at if they want.
* Update botspellsai.cpp
* Update 2022_11_19_bot_spell_settings.sql
* Typo.
* Update botspellsai.cpp
* Cleanup and add Reload Methods to Perl/Lua.
* [Bots] Add support for Bot scripting.
# Perl
- Add support for `zone/bot.pl` and `zone/bot_v#.pl`.
- Add support for `global/global_bot.pl`.
- Add `$bot->SignalBot(signal_id)` to Perl.
- Add `$bot->OwnerMessage(message)` to Perl.
- Add `$entity_list->SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotID(bot_id, signal_id)` to Perl.
- Add `$entity_list->SignalBotByBotName(bot_name, signal_id)` to Perl.
- Add `EVENT_SPELL_EFFECT_BOT` to Perl.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Perl.
# Lua
- Add support for `zone/bot.lua` and `zone/bot_v#.lua`.
- Add support for `global/global_bot.lua`.
- Add `bot:SignalBot(signal_id)` to Lua.
- Add `bot:OwnerMessage(message)` to Lua.
- Add `entity_list:SignalAllBotsByOwnerCharacterID(character_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotID(bot_id, signal_id)` to Lua.
- Add `entity_list:SignalBotByBotName(bot_name, signal_id)` to Lua.
- Add `EVENT_SPELL_EFFECT_BOT` to Lua.
- Add `EVENT_SPELL_EFFECT_BUFF_TIC_BOT` to Lua.
# Supported Bot Events
1. `EVENT_CAST`
2. `EVENT_CAST_BEGIN`
3. `EVENT_CAST_ON`
4. `EVENT_COMBAT`
5. `EVENT_DEATH`
6. `EVENT_DEATH_COMPLETE`
7. `EVENT_SAY`
8. `EVENT_SIGNAL`
9. `EVENT_SLAY`
10. `EVENT_SLAY_NPC`
11. `EVENT_SPAWN`
12. `EVENT_TARGET_CHANGE`
13. `EVENT_TIMER`
14. `EVENT_USE_SKILL`
# Common
- Convert NPC pointers in common events to Mob pointers so bots are supported.
- Convert signal IDs to `int` where it wasn't already, allowing negative signals to be sent properly.
* Add EVENT_POPUP_RESPONSE.
* Cleanup and fix EVENT_COMBAT/EVENT_SLAY/EVENT_NPC_SLAY.
* Fix DoNPCEmote calls.
* Update attack.cpp
* Update event_codes.h
* Update bot_command.cpp
* [Bots] Add Quest API Support for Limits.
# Perl
- Add `$client->GetBotCreationLimit()` to Perl.
- Add `$client->GetBotCreationLimit(class_id)` to Perl.
- Add `$client->GetBotRequiredLevel()` to Perl.
- Add `$client->GetBotRequiredLevel(class_id)` to Perl.
- Add `$client->GetBotSpawnLimit()` to Perl.
- Add `$client->GetBotSpawnLimit(class_id)` to Perl.
- Add `$client->SetBotCreationLimit(creation_limit)` to Perl.
- Add `$client->SetBotCreationLimit(creation_limit, class_id)` to Perl.
- Add `$client->SetBotRequiredLevel(required_level)` to Perl.
- Add `$client->SetBotRequiredLevel(required_level, class_id)` to Perl.
- Add `$client->SetBotSpawnLimit(spawn_limit)` to Perl.
- Add `$client->SetBotSpawnLimit(spawn_limit, class_id)` to Perl.
- Add `$entity_list->GetBotListByCharacterID(character_id, class_id)` to Perl.
# Lua
- Add `client:GetBotCreationLimit()` to Lua.
- Add `client:GetBotCreationLimit(class_id)` to Lua.
- Add `client:GetBotRequiredLevel()` to Lua.
- Add `client:GetBotRequiredLevel(class_id)` to Lua.
- Add `client:GetBotSpawnLimit()` to Lua.
- Add `client:GetBotSpawnLimit(class_id)` to Lua.
- Add `client:SetBotCreationLimit(creation_limit)` to Lua.
- Add `client:SetBotCreationLimit(creation_limit, class_id)` to Lua.
- Add `client:SetBotRequiredLevel(required_level)` to Lua.
- Add `client:SetBotRequiredLevel(required_level, class_id)` to Lua.
- Add `client:SetBotSpawnLimit(spawn_limit)` to Lua.
- Add `client:SetBotSpawnLimit(spawn_limit, class_id)` to Lua.
- Add `entity_list:GetBotListByCharacterID(character_id, class_id)` to Lua.
# Notes
- Allows operators to set creation and spawn limits based on class, as well as required level.
- Using the class-inspecific methods sets the global limit or required level.
- Global limits are checked prior to class-specific limits and if they are not met, creation or spawn is disallowed.
- Modified preexisting Quest API to make use of this new stuff under the hood.
* Update bot_command.cpp
* Add client bot file.
* [Bots] Add Expansion Bitmask Quest APIs.
- Add `$bot->GetExpansionBitmask()` to Perl.
- Add `$bot->SetExpansionBitmask(expansion_bitmask)` to Perl.
- Add `bot:GetExpansionBitmask()` to Lua.
- Add `bot:SetExpansionBitmask(expansion_bitmask)` to Lua.
- Adds `expansion_bitmask` column to `bot_data` table.
- Allows server operators to limit expansion settings on a bot-by-bot basis.
- Allows limiting or allowing of AAs in `Bot::LoadAAs()` based on expansion bitmask.
- Default value is `-1` which just defaults to the `Bots:BotExpansionSettings` rule value.
- Setting bitmask saves to database and reloads AAs so bots automatically recalculate bonuses.
* Add save parameter.
* Typo.
* [Bots] Initial Cleanup of Functions, moved Bot Casting out of mob_ai.cpp
* Moved Bots off NPC AI_Spells Struct, and AI_Spells private attribute.
* Formatting Fixes, fixed LogAI entries, Added LogAIModerate Alias
* Add Constants.
* Added Bot DB Struct, fixed some potential casting issues
* Formatting
* Formatting
* [Code Cleanup] Zone data loading refactor
* Update client_packet.cpp
* strcpy adjustments
* Ensure safe points get reloaded properly
* Simplify GetPEQZone and getZoneShutDownDelay
* Bring in zone_store where needed
* Update client.cpp
* Signature
* Signature
* Convert helpers to using pointers
* PR comment
* Update worlddb.cpp
* Fix loading for instances
* Fix zoning with fallback as well
* Another place for instance fallback
* Delete EQApplicationPacket after use
* Correct issue where Creating EQApplicationPackets in zone/mob.cpp may not free pBuffer[]
* Handle freeing pBuffer[] if exists in zone/mob.cpp Create*Packet functions
* Handle freeing pBuffer[] in zone/object.cpp Create*Packet methods
* Delete leaked outapp variables in zone/trading.cpp
* Make CreateHorseSpawnPacket() safer by freeing pBuffer[] before replacing with new[]
* Prevent initial new ServerPacket from being leaked in command_reload
* Free pack after sending in command_setlsinfo
* Delete new NPC in command_viewnpctype after printing stats
* Fix compile error
* Delete EQApplicationPacket after sending in command_kick
* Remove unneeded safe_delete(outapp) after FastQueuePacket and fix minor whitespace issue
* Delete packet after sending in WorldServer::SendReloadTasks
* Cleanup logic and free leaked NPCType in Client::Doppelganger
* Free RespawnOption in Client::HandleRespawnFromHover in 'unexpected rez from hover request' branch
* Free EQApplicationPacket after sending in Bot::ProcessBotInspectionRequest
* Free Bot when returning from failed Bot::Save() in helper_bot_create()
* Initialize variable to nullptr to prevent garbage initial value
* Undo change in other PR
* Move delete of ItemInstance to avoid edge case leaking in ZoneDatabase::LoadWorldContainer()
* Delete ItemInstance after use in Client::Handle_OP_AdventureMerchantPurchase()
* Delete ItemInstance after use in NPC::GetEquipmentMaterial()
* Delete ItemInstance after use in Bot::AddBotItem()
* Delete GetItems_Struct in edge case when !TradeItemsValid in Client::Handle_OP_Trader()
* Move delete GetItems_Struct to handle edge case when Customer is not valid in Client::Trader_EndTrader()
* [Bots] Bot::PerformTradeWithClient Cleanup.
- Cleanups message and logic.
- Initial cleanup to eventually allow easy use with Perl/Lua quest API.
* Duplicated comment.
* - Fixed Bots Spell Damage being negative under some circumstances (heal target)
- Allow Bots to send non-melee damage reports in the same manner as Clients
- Refactor\Update Bots Spell Damage & Heal calculations to match current state of Clients.
- Allow Bots to actually utilize Spell Damage and Heal Amount stats
* Don't send packets to bots
* remove random tab
* align text lol
* Correct bot spell damage and healing pathways to account for rule Spell:IgnoreSpellDmgLvlRestriction
* Corrected to be more consistent in regard to the 'spells[spell_id].no_heal_damage_item_mod' modifier. This modifier doesn't seem to actually exist on any content, and bots didn't use it to begin with.
This restriction is present on players - do we want it on bots also?
* [Spells] Fix for numhits type 7 counter incrementing incorrectly.
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
bot fix
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
mercs
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
remove old variable and related code.
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
comments
* test
* complete
* Update effects.cpp
* Update spells.cpp
* Update effects.cpp
* [Spells] Support for bards using Disciplines while casting or /melody.
Support for spell field 'cast not standing' not allow casting from divine aura
* [Spells] Support for bards using Disciplines while casting or /melody.
DA bypass logic for spells with field 'cast_not_standing'
* updates
* stun and mez bypass
* Update spdat.cpp
* Update spdat.cpp
* Update spells.cpp
* clean
* requirement messages
* update
* pct
* save work
* Reform code 1_22_22
* updated
* update id to pointer
* Update spells.cpp
* rework 2
* update 1_23_22
* Update spells.cpp
* updates
* msg string works
* fix disc timers not be set
* more optimization
* update 1_23_22 PM
moved stop casting out
charm and harmony moved in
* update 1_25_22
rework of functions
* updates 1_26_22
* remove old checks
* gm override added for some
* update bard AA casting checks
* updates
* addbuff exception for bard
* debugs
* charm working
* update
* moved skill check here
* cast from item while singing
* lets not attack mounts
* instant cast items click
* aug clicks working
* aug tests
Bug? Cast time not display on aug clicks for bards
* aug recast from items semi ok
* added item timer function
* unified setting item recast timer
* clean up time
* update
* bard AA cast updates
* debugs removed
* debugs removed
* clean up
* clean up
* better placement of bindsight and numhits fix
* move and rename function
* Update spells.cpp
* add logs
* delete old DoCastingChecks
* Removed old bard pulse functions
* remove AEBardPulse and GroupPulse
* removed Raid::GroupBardPulse
* Pulse Restriction: Divine Aura
* Pulse Restrictions : Fear behavior
* Update spells.cpp
* Update spells.cpp
* [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic.
bots...
* [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic.
added recommended isvalidspell check
* [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic.
merged
* [Spells] Major update to Bard song pulsing, Bard item clicks while singing, and spell casting restriction logic.
removed defines since we have them as constants
* [Rules] Add Resurrection Sickness rule for Characters/Bots.
- Add RULE_BOOL(Character, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")
- Add RULE_BOOL(Bots, UseOldRaceRezEffects, false, "Older clients had ID 757 for races with high starting STR, but it doesn't seem used anymore")
- Add RULE_BOOL(Bots, UseResurrectionSickness, true, "Use Resurrection Sickness based on Resurrection spell cast, set to false to disable Resurrection Sickness.")
* Add rules for spell IDs.
* Fix bot health on spawn when resurrection sickness is disabled.
- Formatting.
* Remove 'this' keyword.