* First pass of player_event_loot_items
* Second pass of player_event_loot_items
* Third pass of player_event_loot_items
* Example without RecordDetailEvent template
* Cleanup the removal of the template
* Fourth Pass
Add retention for etl tables
Rename tables/fields to etl nomenclature
Combine database work to one atomic load
* Reposition to reduce db tasks
* Refactor etl processing for easier additions
* Add merchant purchase event
testing passed though appears that the event itself has a few bugs. Will fix them in another commit
* Fix PlayerEventMerchantPurchase in client_packet.cpp
* WIP - Handin
* Handin Event added
* Cleanup
* All a rentention period of 0 days which deletes all current records.
* Updates
Cleanup and refactor a few items.
* Cleanup and Formatting
Cleanup and Formatting
* Add etl for
Playerevent::Trade
PlayerEvent::Speech (new event to mirror functionality of qs_speech
* Add etl for
Playerevent::KilledNPC, KilledNamedNPC and KilledRaidNPC
* Add etl for Playerevent::AA_purchase
Add etl for Playerevent::AA_purchase
* Cleanup before PR
* Review comment updates.
* Add world cli etl:settings to output a json on all player event details.
* Add reserve for all etl_queues
Correct a failed test case for improper next id for etl tables when table is first created.
* Potential solution for a dedicated database connection for player events.
* Simple thread for player_events. Likely there is a better way to do this.
* Add zone to qs communications for recordplayerevents
First pass of enabling zone to qs direct transport to allow for PlayerEvents to bypass world.
* Cleanup a linux compile issue
* Add augments to LOOT ITEM and DESTROY ITEM
* Add augments to ITEMCREATION, FORAGESUCCESS, FISHSUCCESS, DESTROYITEM, LOOTITEM, DROPPEDITEM, TRADERPURCHASE, TRADERSELL, GUILDTRIBUTEDONATE and cleaned up the naming convention of augments
* Formatting fixes
* Swap out GetNextTableId
* Statically load counter
* Add counter.clear() since the counter is static
* Upload optional QS conversion scripts
* Remove all qs_tables and code referencing them
* Update database.cpp
* Simplify ProcessBatchQueue
* Simplify PorcessBatchQueue
* Simplify event truncation
* Build event truncation to bulk query by retention groups
* Post rebase
* Update player_events.h
* Fix build
* Update npc.cpp
* First pass of direct zone to qs sending for player events
* Remove keepalive logic
* Fix event ordering
* Cleanup
* Update player_event_logs.cpp
* Wipe event data after ETL processed
* Split up database connections, hot reload logs for QS
* Load rules from database vs qs_database
* Update player_event_logs.cpp
* Hot toggle queryserv connect
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* Implement spell AI pulling, fix throw stone
* more pull tweaks
* holding check at start of ai process
* fully implement ^pull logic to always return, can still be overidden by ^attack
* Rewrite ^pull logic and handling. **MORE**
Add ^setassistee command to set who your bots will assist. Bots will always assist you first before anyone else.
If the rule Bots, AllowCrossGroupRaidAssist is enabled bots will assist the group or raid main assists.
Rewrites logic in handling of pull and returning to ensure bots make it back to their location.
* Move HateLine to a better ID
* cleanup ST_Self logic in CastChecks
* Removed unused BotSpellTypeRequiresLoS
* Move fizzle message to define
* add timer checks to Idle/Engaged/Pursue CastCheck to early terminate
* Add back !IsBotNonSpellFighter() check to the different CastCheck
* Correct IsValidSpellRange
* Implement AAs and harmtouch/layonhands to ^cast --- fix IsValidSpellRange
* Add PetDamageShields and PetResistBuffs to IsPetBotSpellType()
* Add priorities to HateLine inserts for db update
* Remove SpellTypeRequiresCastChecks
* Add bot check to DetermineSpellTargets for IsIllusionSpell
* merge with previous
* Correct bot checks for ST_GroupClientAndPet
* Remove misc target_type checks
* Add lull/aelull to ^cast
* Add more checks for CommandedSubTypes::AETarget
* remove unneeded checks on IsValidSpellTypeBySpellID
* add to aelull
* rewrite GetCorrectSpellType
* Add IsBlockedBuff to CastChecks
* Add spellid option to ^cast to allow casting of a specific spell by ID
* ^cast adjustments for spellid casts
* Add missing alert round for ranged attacks
* More castcheck improvements
* CanUseBotSpell for ^cast
* remove ht/loh from attack ai
* remove SetCombatRoundForAlerts that triggered every engagement
* Add RangedAttackImmunity checks before trying to ranged attack
* move bot backstab to mob
* fix MinStatusToBypassCreateLimit
* more backstab to mob cleanup
* add bot checks to tryheadshot / tryassassinate
* adjust version number for bots
* add back m_mob_check_moving_timer, necessary?
* add sanity checks for classattacks
* Get rid of Bots:BotGroupXP and change logic to support Bots:SameRaidGroupForXP
Bots won't do anything if not in the same group so this should more accurately control only when in the same raid group.
* add "confirm" check to ^delete
* Update bot.cpp
* Remove `id` from bot_settings, correct types
* Implement blocked_buffs and blocked_pet_buffs
* more blocked buff tweaks
* add beneficial check to ^blockedbuffs
* command grammar
* missing )
* Move getnames for categories and settings to mob, rename hptomed/manatomed
* add GetBotSpellCategoryIDByShortName and CopyBotBlockedPetBuffs, update ^defaultsettings command
* cls cleanup
* Allow bots to clear HasProjectIllusion flag
* Add PercentChanceToCastGroupCure
* Implmenet PetCures, add some missing types for defaults/chance to cast
* Change GetRaidByBotName to GetRaidByBot
* Typo on PetBuffs implement
* Change GetSpellListSpellType to GetParentSpellType
* missing from GetChanceToCastBySpellType
* Fix performance in IsValidSpellRange by flipping HasProjectIllusion
* merge with prev
* merge with cls cleanup
* Reorder IsTargetAlreadyReceivingSpell/CheckSpellLevelRestriction/IsBlockedBuff
* Combine GatherGroupSpellTargets and GatherSpellTargets
* Cleanup IsTargetAlreadyReceivingSpell
* Fix ^petsettype to account for usable levels of spells and remove hardcoded level limits.
* Remove Bot_AICheckCloseBeneficialSpells and use AttemptCloseBeneficialSpells for better performance
* remove default hold for resist buffa
* move IsValidSpellRange further down castchecks
* raid optimizations
* correct name checking to match players
* more name checks and add proper soft deletes to bots
* organize some checks in IsImmuneToBotSpell
* Fix GetRaidByBotName and GetRaidByBot checks to not loop unnecessarily
* Move GatherSpellTargets to mob
* Change GetPrioritizedBotSpellsBySpellType to vector
Some slipped through in "organize some checks in IsImmuneToBotSpell"
* Move GatherSpellTargets and Raid to stored variables.
Missing some in "organize some checks in IsImmuneToBotSpell"
* comment out precheck, delays, thresholds, etc logging
missed some in "organize some checks in IsImmuneToBotSpell"
* Missing IsInGroupOrRaid cleanup
* Implement AIBot_spells_by_type to reduce looping when searching for spells
* Add _tempSpellType as placeholder for any future passthru
* todo
* Move bot_list from std::list to std::unordered_map like other entities
* Fix missing raid assignment for GetStoredRaid in IsInGroupOrRaid
* TempPet owned by bots that get the kill will now give exp like a client would
* Remove unnecessary checks in bot process (closescanmoving timer, verify raid, send hp/mana/end packet
* Fix client spell commands from saving the wrong setting
* Cleanup ^copysettings command and add new commands
* Add pet option to ^taunt
No longer has toggle, required on/off option and an optional "pet" option to control pets' taunting state
* Allow pet types to ^cast, prevent failure spam, add cure check
* more raid optimizations, should be final.
10 clients, 710 bots, 10 raids, ~250 pets sits around 3.5% CPU idle
* Move spell range check to proper location
* Implement ^discipline
* remove ^aggressive/^defensive
* remove this for a separate PR
* cleanup
* Add BotGroupSay method
* todo list
* Add missing bot_blocked_buffs to schema
* Remove plural on ^spelltypeidsand ^spelltypenames
* Move spelltype names, spell subtypes, category names and setting names to maps.
* move los checks to mob.cpp
* Bot CampAll fix
* Bots special_attacks.cpp fix
* Add zero check for bot spawn limits
If the spawn limit rule is set to 0 and spawn limit is set by bucket, if no class buckets are set, it defaults to the rule of 0 and renders the player unable to spawn bots.
This adds a check where if the rule and class bucket are 0, it will check for the spawn limit bucket
* Add HasSkill checks to bot special abilities (kick/bash/etc)
* code cleanup 1
* code cleanup 2
* code cleanup 3
* code cleanup 4
* fix ^cast wirh commanded types
* Remove bcspells, fix helper_send_usage_required_bots
* linux build fix
* remove completed todo
* Allow inventory give to specific ID slots
* Update TODO
* Correct slot ranges for inventorygive
* Add zone specific spawn limits and zone specific forced spawn limits
* remove bd. from update queries where it doesn't exist
* Rename _spellSettings to m_bot_spell_settings
* Add IsPetOwnerOfClientBot(), add Lua and Perl methods
* Make botOwnerCharacterID snakecase
* Throw bot_camp_timer behind Bots:Enabled rule
* Move various Bot<>Checks logging to BotSpellChecks
* Remove from LogCategoryName
* Consolidate IsInGroupOrRaid
* Consolidate GatherSpellTargets
* Add missing Bot Spell Type Checks to log
* Add GetParentSpellType when checking spelltypes for idle, engaged, pursue CastChecks.
* Consolidate AttemptForcedCastSpell
* Consolidate SetBotBlockedBuff/SetBotBlockedPetBuff
* Add list option to ^spellpriority commands.
* Move client functions to client_bot
* Move mob functions to mob_bot
* Move bot spdat functions to spdat_bot
* Move SendCommandHelpWindow to SendBotCommandHelpWindow and simplify
* Change char_id to character_id for bot_settings
* update todo
* Fix typo on merge conflict
* Cleanup command format changes, remove hardcoded class IDs in examples.
* Set #illusionblock for players to guide access
* Move client commands for bot spells from gm commands to existing bot commands
* Fix alignment issues
* More alignment fixes
* More cleanup 1
* More cleanup 2
* Fix BotMeditate to med at proper percentages
* Correct GetStopMeleeLevel checks for some buff checks
* Add back hpmanaend update to bot raid, force timer update to prevent spamming
* Remove log
* Cleanup ranged and ammo calculations - Adds throwing check for match
* Add check in distance calculations to stay at range if set even if no ammo or ranged
* Move melee distance calculations to better function
* Add GetBuffTargets helper
* Missing p_item, s_item in CombatRangeInput
* Linux test?
* Reduce GetCorrectBotSpellType branching slightly
This is still an ugly ass function but my brain is melted
* Line fixes
* Make bot pets only do half damage in pvp
* Add bot pet pvp damage to tune
* Add bot pet check for AIYellForHelp
* Add bots to UseSpellImpliedTargeting
* Move toggleranged, togglehelm and illusionblock to new help window. Add actionable support
* Add bot and bot pet checks to various spells, auras and targeting checks that were missing.
* update todo
* New lines
* Correct DoLosChecks
* Remove Log TestDebug
* Remove _Struct from struct declarations
* Add bot check to IsAttackAllowed for GetUltimateOwner to skip entity list where possible
* Wrap SaveBotSettings in Bots Enabled check
* Remove comment
* Wrap bot setting loading for clients in bots enabled rule
* Cleanup BlockedBuffs logic in SpellOnTarget
* Rename BotSpells_Struct/BotSpells_Struct_wIndex
* Rename spawn/create status bypass rules, fix return for spawn limit
* Remove unnecessary return in CanBuffStack, cleanup
* Enable recastdelay support for clients
* Remove unused variables
* Rename _assistee to bot_assistee
* hardcode BotCommandHelpWindow colors
* todo
* Fix ^cast summoncorpse
* todo
* Reimplement secondary colors to BotSendCommandHelpWindow
* Give ^copysettings/^defaultsettings more options, cleanup.
* Cleanup some commands
* Add comment to CheckLosCheat/CheckLosCheatExempt
* Make struct BotSpellSettings snake case
* Allow duplicate casts of same spell on target for heals and cures
* Add default delay to cures
* Remove unused methods
* Implement missing ^spellresistlimits/^resistlimits command
* Move functions out of mob.h and cleanup
* Return for GetRawBotList
This checks offline bots too
* Rename BotGroupSay to RaidGroupSay
* Prevent bots from forming their own group if a bot that is a group leader is removed from the raid
* Linux fix?
* IsPetOwner fixes
* Add remove option to list for ^blockedbuffs / ^blockedpetbuffs
* Implement ^spellannouncecasts to toggle announcing casts of spell types
* Remove rule Bots:BardsAnnounceCasts
* Update bot.h
* Remove unused no_pets option from GatherSpellTargets
* Move ^attack response back to normal chat window (other)
* Set lower limit of spell delays to 100 rather than 1
* Correct pet checks on GetUltimateSpell functions
* Add rules (Bots, AICastSpellTypeDelay, Bots, AICastSpellTypeHeldDelay) to prevent spamming of failed spell type AI casts
* Correct pet buff type logic to catch DS/Resists with other spell effects in them
* Fix defaults for clients
* Add more logic for necros/shaman for default heal thresholds due to lich and canni
* Rename SpellHold, SpellDelay, SpellMinThreshold, SpellMaxThreshold, SpellRecastDelay to fit SpellType style naming
* Use GetTempSpellType() for announce check in RaidGroupSay
* Make all spell shortnames plural where applicable
* Update bot.cpp
* Bots:BotsUseLiveBlockedMessage filter to spell failure
* Move GetSpellTargetList to only get called when necessary to reduce overhead
* formatting
* Formatting
* Simplify case SE_Illusion and SE_IllusionCopy for GetIllusionBlock
* Clean up InterruptSpell
* Cleanup IsBot() checks for DetermineSpellTargets->ST_GroupClientAndPet
* Cleanup range/aoe_range check in SpellFinished
* Cleanup DetermineSpellTargets->ST_GroupNoPets
* Cleanup DetermineSpellTargets->ST_Self for bot summon corpse
* Cleanup DetermineSpellTargets->ST_Pet
* Cleanup bot logic in TryBackstab
* Cleanup IsAttackAllowed checks for bots and their pets
* Cleanup StopMoving for bots
* Cleanup CanThisClassTripleAttack
* Fix casting for GetIllusionBlock checks
* Formatting
* Fix DetermineSpellTargets for group spells (this also wasn't properly checking the rule Character:EnableTGB in master)
* Cleanup spelltarget grabbing logic, consolidate group heals in to GetNumberNeedingHealedInGroup
* Throw added client los pet checks behind LoS cheat rule for bots
* CLeanup give_exp on npc death logic and ensure client pets always pass.
* Undo unintended rename from previous refactor
* Remove pointless Bots, SameRaidGroupForXP rule
* Revision to 0690783a9d1e99005d6bee0824597ea920e26df9
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* Zone optimizations
* More changes
* More
* Update entity.cpp
* Beautiful
* Amazing
* Feature flag all logic
* Broadcast to group
* Update mob.cpp
* Updates
* Update client.cpp
* Update client.cpp
* Add rule Zone:EnableEntityClipping
* Little bit of cleanup
* Don't send update to self while in group
* Remove visibility work and feature flags
* Cleanup
* Logging
* Improve CheckSendBulkNpcPositions
* No need to cast
* Field cleanup
* Build initial list on zone-in
When the guild membership was large (1k+) the client would studder for half a sec when a guild member would login or logout. This was reproduceable with a guild size of 2k members though floor would be client dependent most likely.
* [Performance] Minor improvements to ScanCloseMobs
* Remove timer checks one level up to reduce branching
* Reserve memory in m_close_mobs to avoid frequent re-allocations if not already reserved.
* initial work porting this to upstream
* more
* track complete connect
* it sucks to suck
* Few optimizations
* Move sent_inventory init
* Move var
* Adjustments
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Bug Fix] Corpse Call removing Rez Effects
When calling a corpse, it should not remove rez effects.
* Update client_process.cpp
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
* Add RoF2 Bazaar Support
Enable RoF2 bazaar features
* Add augments to Trader Items
* Cleanup
Cleanup of formatting and unused functions
* Update PlayerProfile for correct char_id in trader transactions. Further cleanup.
* Add parcel delivery price functionality
Add parcel delivery price functionality via rules and new delivery cost struct.
* Add RoF support for bazaar window outside of bazaar with parcel delivery
* Further Testing and ActiveTransaction added
Further testing and a few fixes and messages added. Add active transaction check to ensure two clients cannot purchase from the bazaar window at the same time
* Cleanup and Formatting updates
Cleanup and Formatting updates
* Update database manifest for the trader table against default peq trader table
* Logs and formatting
* Update bazaarsearch to be content_db aware
* Fix crash
* Simplify search
* Search fixes
* Push up more search logging
* More search fixes
* Formatting
* Update trader_repository.h
* Add Rule for Bazaar Parcel Delivery
Add a rule Bazaar:EnableParcelDelivery to enable/disable bazaar parcel delivery. Default is True.
* Fix crash
* Update Bazaar Search
Adds/Tested bazaar search with move to content_db
- race, class, money, number of returned items, stats, name, slot, level, traders, local traders, specific trader.
Outstanding
- type, more stats to add (heroic, etc)
* Formatting
* Push
* Update bazaarsearch to include all stats that are available in RoF2
* Update BazaarSearch
Updates the bazaar search for item types. They should be working as per RoF2+ types.
* Formatting
* Final updates to BazaarSearch
Add search by augmentation slots available on the item.
This enables all but Prestige, which I believe are not implemented yet.
* Add Titanium functionality correct ItemType Search
Add Titanium /trader /bazaar functionality.
Added itemtype=armor bazaar search. It was missed in the search work
* Close off for loops
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Merchants] Add New Classic Greed/Faction/Charisma Prices Rule
* Fix size of greed field.
* Fix { formatting and add {} to one liners
* Fix return type of GetGreedPercent
* Remove code that slipped in from another patch
* Fix greed to be unsigned
* Update client.cpp
* Update client_packet.cpp
* Update client.cpp
Fix bad name in extra log message added manually from merge.
* Update client_packet.cpp
Spacing.
* Update client.cpp
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
* Add Parcel Feature
Add the parcel system for RoF2 client
* Fixed a duplicate define
* Reformat
reformating and review changes
* Further Formatting
* Memory Mgmt Updates
Refactored to using unique_ptr/make_unique/etc to avoid manual memory mgmt.
Other format changes
* Refactor db structure
Refactor for db structure of parcels to character_parcels
Removal of parcel_merchants
Addition of npc_types.is_parcel_merchant
Cleanup as a result
* Refactor to use item id 99990 for money transfers. Removed the money string function as a result, though simplified the messaging related to money. Other updates based on feedback.
* Move prune routine out of scheduler and into a world process.
Removed RuleI from #define
* Update
* Update database.cpp
* Update database_update_manifest.cpp
* Update main.cpp
* Update client_process.cpp
* Update parcels.cpp
* Remove parcel merchant content to optional sql instead of manifest.
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Bug Fix] Hero forge armor bug on login and show helm toggle.
* Merge in KayenEQ provided revert of original work around
* Fix botched merge section.
* [Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua
- Add `$mob->RestoreEndurance()`.
- Add `$mob->RestoreHealth()`.
- Add `$mob->RestoreMana()`.
- Add `mob:RestoreEndurance()`.
- Add `mob:RestoreHealth()`.
- Add `mob:RestoreMana()`.
- Allows operators to easily restore a mob to full health, mana, or endurance.
- `RestoreHealth` is just a more verbosely named `Heal`.
- Convert spots in source to use these short hands instead of directly using `SetEndurance(GetMaxEndurance())`, `SetHP(GetMaxHP())`, or `SetMana(GetMaxMana())`.
* Update mob.h
* Update mob.h
* [Feature] Add additional Guild Features
This adds the following guild features and design pattern
- the existing guild system was used
- guild features are based on RoF2 within source with translaters used to converted between client differences
- backward compatible with Ti and UF, and allows for mixed client servers
- Guild Back for Ti and UF is based on RoF2 Permissions for banking if Guild Leader does not use Ti/UF
- Guild Ranks and Permissions are enabled.
- Guild Tributes are enabled.
- Event logging via rules for donating tribute items and plat
- Rules to limit Guild Tributes based on max level of server
- Rewrote guild communications to client using specific opcodes
-- Server no longer sends a guild member list on each zone
-- Guild window is updated when a member levels, rank changes, zone changes, banker/alt status using individual opcodes
-- When a member is removed or added to a guild, a single opcode is sent to each guild member
-- This reduces network traffic considerably
Known issues:
- Visual bug only. Guild Tributes window will display a 0 for level if tribute is above max level rule setting.
- Visual bug only. Guild Mgmt Window will not display an online member if the player has 'show offline' unchecked and a guild member zones within the Notes/Tribute tab. This is resolved by selecting and de-selecting the 'Show Offline' checkbox.
* Updated RoF2 Guild Comms
Updated RoF2 Guild Comms
Update RoF2 Opcodes
Rewrote RoF2 Guild Communications using specific opcodes.
Added database changes - they are irreversible
* Formatting
* Update base_guild_members_repository.h
* Format GuildInfo
* Format GuildAction enum
* Formatting in clientlist
* quantity vs quantity
* desc vs description
* Format structs
* Inline struct values
* Formatting
* Formatting
* Formatting fixes
* Formatting items
* Formatting
* Formatting
* struct formatting updates
* Updated formatting
* Updated
- std:string items
- naming conventions
- magic numbers
* Repo refactors
Other formatting updates
* Remove test guild commands
* Updated #guild info command
* Add new repo methods for Neckolla ReplaceOne and ReplaceMany
* Fix guild_tributes repo
* Update database_update_manifest.cpp
* Phase 1 of final testing with RoF2 -> RoF2.
Next phase will be inter compatibility review
* Remove #guild testing commands
* Fix uf translator error
Rewrite LoadGuilds
* Use extended repository
* FIx guild window on member add
* LoadGuild Changes
* Update guild_base.cpp
* Few small fixes for display issue with UF
* Update guild_base.cpp
* Update guild_members_repository.h
* Update zoneserver.cpp
* Update guild.cpp
* Update entity.h
* Switch formatting
* Formatting
* Update worldserver.cpp
* Switch formatting
* Formatting switch statement
* Update guild.cpp
* Formatting in guild_base
* We don't need to validate m_db everywhere
* More formatting / spacing issues
* Switch format
* Update guild_base.cpp
* Fix an UF issue displaying incorrect guildtag as <>
* Updated several constants, fixed a few issues with Ti/UF and guild tributes not being removed or sent when a member is removed/disbands from a guild.
* Formatting and logging updates
* Fix for Loadguilds and permissions after repo updates.
* Cleanup unnecessary m_db checks
* Updated logging to use player_event_logs
* Updated to use the single opcodes for guild traffic for Ti/UF/RoF2. Several enhancements for guild functionality for more reusable code and readability.
* Update to fix Demote Self and guild invites declining when option set to not accept guild invites
* Potential fix for guild notes/tribute display issues when client has 'Show Offline' unchecked.
* Updates to fox recent master changes
Updates to fix recent master changes
* Updates in response to comments
* Further Updates in response to comments
* Comment updates and refactor for SendAppearance functions
* Comment updates
* Update client spawn process for show guild name
Add show guild tag to default spawn process
* Update to use zone spawn packets for RoF2
Removed several unused functions as a result
Updated MemberRankUpdate to properly update guild_show on rank change.
Updated OP_GuildURLAndChannel opcode for UF/RoF2
* Cleanup of world changes
Created function for repetitive zonelist sendpackets to only booted zones
Re-Inserted accidental delete of scanclosemobs
* Fixes
* Further world cleanup
* Fix a few test guild bank cases for backward compat
Removed a duplicate db call
Fixed a fallthrough issue
* Update guild_mgr.cpp
* Cleanup
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
# Corpse Overhaul
Changelog:
- Player corpses now have two timers, one specific to the rezability of the corpse and the other to cover the overall rot timer of the player corpse.
- The rezability timer is based on the online presence of the player/account and is not affected by being offline.
- The rot timer is not affected by offline/online status and will count to the rot status of the corpse.
- Corpses can be rezzed multiple times, however only the first rez that yeilds returned xp will be counted. Not other rez will return any xp. This allows for a "Poor mans COTH" as was used many times in the early eras.
- All Corpse class private/protected member variables are all now prefixed with m_
- Added Corpses logging category along with many debug logs
- Removed LoadCharacterCorpseData
- Removed LoadCharacterCorpseEntity
- Added LoadCharacterCorpse(const CharacterCorpsesRepository::CharacterCorpses, const glm::vec4 &position) which simplifies areas of consumption and reduces double queries from removing LoadCharacterCorpseData and replacing LoadCharacterCorpseEntity
- All parameters that were prefixed with in_ have been dropped
- Removed two queries from CheckIsOwnerOnline and have it query the world's CLE by account_id since that is how live works
- Regenerated repository character_corpses
- Cleaned up many list iterators to use range based for loops
- Rate limit Corpse::Process m_is_rezzable with a 1 second check timer
- General code cleanup
- Added a Server Up check to bury all corpses in instances to prevent lost corpses if an instance is released during server down. This facilitates player recovery via shadowrest or priests of luclin.
This PR also now fixes a long standing issue with HasItem performance in our script plugins. It is significantly faster, we will need to coordinate quest changes and comms with operators.
```lua
if ($client->HasItemOnCorpse($item_id)) {
return 1;
}
```
```lua
--corpse
if self:HasItemOnCorpse(itemid) then
return true
end
```
Testing Completed:
- Create a Corpse
- Standard rezzing
- Ghetto Coth (No Extra XP)
- Rezzing after graveyard move
- Divine Rez works as intended
- No XP Rez (Corpse Call) does not give XP
- Corpse Burying
- Cross Instance Graveyard Corpse movement/Rezzing
- DZ End/Quit Corpse Movement/Rezzing
- Server Shutdown/Reinit DZ Corpse Movement/Rezzing
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Bug Fix] Class Trainers dont steal your money!
Class trainers log an error when you have reached your max train in the specific skill. They will continue to "Appear" to eat money and practices however they will be returned on logout/in or zone.
* Remove un-needed logic due to legacy code.
* more cleanup
* [Character] Convert NoRentExpired to Repositories
- Create a custom `GetSecondsSinceLastLogin` repository method to use in `NoRentExpired`.
* Update character_data_repository.h
* [Commands] Cleanup #appearance Command
# Notes
- Cleanup messages and logic.
- Cleanup appearance type constants to use a namespace with constexpr instead.
- Cleanup animation constants to use a namespace with constexpr instead.
* Update emu_constants.cpp
* Cleanup
* [Character] Record character stats to
* Record stats on disconnect as well
* Record later in connect process
* Move enter zone code path so we're after bonuses
* Ok this spot for real
* Adjust recording
* Update client_packet.cpp
* Timestamps
* Update database_update_manifest.cpp
* Update client_packet.cpp
* Fix stat bonuses
* [Data Buckets] Zone-Based Data Bucket Caching
# Notes
- Adds a data bucket cache so we're not needlessly hitting the database every time we need to read a data bucket value.
* Cleanup and unify GetData access patterns
* Cache work
* Push
* Add to cache when we fetch and do a db hit
* Handle bucket misses in cache
* Formatting
* Logging
* [Data Buckets] Zone-Based Data Bucket Caching
- Adds a data bucket cache so we're not needlessly hitting the database every time we need to read a data bucket value.
* Cleanup and unify GetData access patterns
* Cache work
* Push
* Add to cache when we fetch and do a db hit
* Handle bucket misses in cache
* Formatting
* Remove redundant fetches from cache since GetData does the same thing
* Push progress
* Distributed cache work
* Logging
* Fix issue with scoping where same named keys could return overlapping results
* Misses cache tweak, logging, comments
* Add bot, client, and NPC bucket methods to Lua.
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Feature] Add Water Line of Sight Checks
This adds rules to enable or disable checks for spells and autofire to prevent casting or autofire from landing if the player or bot do not match their targets plane in regards to water.
Currently players and bots can cast or autofire if they are not in the water but their target is and vice versa, this should not be possible.
RuleB(Combat, WaterMatchRequiredForAutoFireLoS) set to True (default) checks that both parties are in or out of the water for AutoFire to work.
RuleB(Spells, WaterMatchRequiredForLoS) set to True (default) checks that both parties are in or out of the water for spells to land.
* Cleanup.
* Cleanup.
* Cleanup.
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
* [Fix] Fix an issue with EVENT_DISCONNECT not firing on regular /camp
# Notes
- We were only sending `EVENT_DISCONNECT` on GM instant camps or linkdeads.
* Update client_process.cpp
* Fix for GENERIC_9_STRINGS
* Add Bot Heal Message Display
Creates a new rule to display Bot heal messages to the Bot Owner
* 2021-03-25 11L04pm
Spell and Heal Rule added to allow for Bot spell and heal damage to be sent to the Bot Owner's Group. Also added a check to remove duplicate message for #damage on self.
* Update .gitignore
* BOT work
Added BOT logging damage/heals to owner
Added BOT message to owner for harmony fails
Made var Critical global to remove duplicate crit messages
Added a NULL check to Mob:GetCleanname()
* Bot Group Work
Fixed botid=charid spawn on zone issue
Added a group_list update on zone to refresh from database to fix a dangling pointer to a Bot object that was camped but was previously in a group within the zone being entered.
Modified Bot::ProcessBotGroupInvite to use the client of the bot when doing the Bot initialization so that a leader can invite another owner's Bot
* Jan 4
Basic structure in place for Raid::AddBot though not working
* Basement Jan 5
* End of day Jan 5
Working Raid Invite to a Bot.
* Update to Client::QueuePacket to not attempt to send a packet to a BoT. Not clean, but a broad solution.
* Updated Raid::VerifyRaid
* Some Bot Raid working
* Before VS Crash
* Use Case 1, 2, 3,4,7 working.
Need to fix 5, 6, 8
* Work on usecase 5
* A few more use cases working
* New work on Raid invite with a invitor having a group
* Bot Raid inviting working for all use cases
* A few changes
* end of day jan 10
* Jan 11
* end of day Jan 11
* Bot Invite/Accept cleanup
* Start of moving raid bot functions to their own methods
* More bot raid changes
* More raid spell work
* end of day Jan 16
* spawn work
* Spawn on login working
* End of Day Jan 18
* Raid leader and mana/hp updates fixed
* Spell Tracking
* Issue with Bot Death in raid when casted upon. 1741 raid.cpp
* Bot Death fixed and few other crashes
* Working on botgroup removal
* Bot Disbanding Work 90%
* Looks like BOTs are working
* Fixed a bot crash
* bug tracing on entity list mismatch
* safe_delete resoves problem. No to track down leak
* seems to be working
* Memory corruption found - sending packets to BoTs using Client class
* added Raid::IsRaidMemberBot()
* Update p_raid_instance
* g3
* Final - Bot Raid Working
* Fixed IsRaidMemberBot to remove memory leak
Fixed altcombat crash though RaidMainAssist (428) needs fixing
* add RaidMember.IsBot
* Repaired IsBot function to be more preformant. Now works on standard performance machine
* Fixed Bard AE Target Spells
Removed assert for buffs
* updated based on Feb 2022 master updates
* Added bot_db_updates and version increment
* Cleanup of bot raid work and inclusion of bot_raid in cmake
* Delete .gitignore
* Revert "Delete .gitignore"
This reverts commit 8523658d3bacdc068bcafaa652d2100afecddfc2.
* Fixed a packet issue
* Merged upstream/master
Merged upstream/master and removed ifdef BOTS as per recent dev approach for BOTS. Functionality is there, compiles and tests ok. A few problems to be resolved though this is a good baseline.
* Added sql update for raid_members to add isbot
* Updated Bot Follow Function
Bot will now follow the Group Leader if IsClient, otherwise follows the Bot Owner
* Updates to Bot Raid System
When camping a client, remove them from the raid. If they are leader, place leadership to the next client.
Update a few crash checks in bot_raid.cpp
* [BOTS] Added RuleB Enabled checks and updated base repo for raid_members
Updated several RuleB(Bots, Enabled) checks
Updated the base repo to be autogenerated.
Raid functionality should work with a non-bots enabled database.
* Few quick updates
* Updates
Corrected a number of comments. Compiled and tested against bot and non-bot database though requires the isbot column in raid_members for both.
Moved the db update out of the bot stream to make bot check code easier.
* Formatting and other small updates
* A few more RuleB(Bots, Enabled) additions
* Fix issue with conflict of bot ID versus character ID.
* Delete CMakeSettings.json
* Comment Updates and other
Several updates including
- fixed comments from PR
- added id to raid_members and unique index on name to avoid botid and charid conflicts
- updated a few raid functions for iterators
- reordered several raid operations to ensure send leader packet to be the last item to ensure proper updating on the client
- update sql to use Replace instead of Insert for botid conflicting with charid
* Exploit fix for Raid Bots
Added item from @Nite to disallow spawning or camping bots if Raid is engaged. Avoids abusive situations.
* Initial Commit
* fix Raid Window after zoning
The raid window was not fully updating for clients not in the zone.
* Cleanup
* Update
Fixed comments
* Resolve crash for MOTD
Fixed a crash situation sending a raid MOTD to BOTS.
* Update ruletypes.h
* Updated to resolve a few recent comments
Fixed some comments within attack.cpp
* fix sql query
* update repository
* prevent duplicate entries in raid after group invite, and cleanup
* fixes for botgroups not following, and add already in raid messages.
* fix messagestring
* fixes
* Cleanup, and resolving issues with disbanding
* refactoring
* more cleanup/fixing.
* fixes for removing from ground in raid
* Refactoring/fixing multiple clients
* fix for compiling
* Bugs from refactoring fixed
* Testing completed, cleaning up unwanted items/duplicate code.
* Cleaned up AICastSpell
* fix typos
* Refactoring
* Adding Raid checks to AI_Process/cleanup
* Fix a typo
Was getting a SQL error on BOT spawn. Fixed typo.
* fix for crash
* Fixed crash when inviting player, more refactoring
* AI_Process Refactoring work
* More Refactoring/fixes for follow
* Finish Refactoring AI_Process
* cleanup
* cleanup
* cleanup
* cleanup
* fix melee attack loop
* fix for leashowner.
* fix for leashowner.
* Bots persist in raid after client death/LD/Camp
* Fix Bot Groups when zoning after death.
* Fix Bots in group following after client death
* remove unnecessary query
* Allow Raid members to invite Bots if owner is in raid. cleanup
* optimization of raid verification
* remove this
* Code Cleanup
* formatting
* formatting
* formatting
* fix for macro
* add return for TryClassAttacks
* fix query
* fix for crash
* restrict camping/spawn in combat.
* Fix other crash issue.
* update learnmembers to use Strings::To, cleanup magic numbers
* fix for merge.
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
* Plumbing
* Batch processing in world
* Cleanup
* Cleanup
* Update player_event_logs.cpp
* Add player zoning event
* Use generics
* Comments
* Add events
* Add more events
* AA_GAIN, AA_PURCHASE, FORAGE_SUCCESS, FORAGE_FAILURE
* FISH_SUCCESS, FISH_FAILURE, ITEM_DESTROY
* Add charges to ITEM_DESTROY
* WENT_ONLINE, WENT_OFFLINE
* LEVEL_GAIN, LEVEL_LOSS
* LOOT_ITEM
* MERCHANT_PURCHASE
* MERCHANT_SELL
* SKILL_UP
* Add events
* Add more events
* TASK_ACCEPT, TASK_COMPLETE, and TASK_UPDATE
* GROUNDSPAWN_PICKUP
* SAY
* REZ_ACCEPTED
* COMBINE_FAILURE and COMBINE_SUCCESS
* DROPPED_ITEM
* DEATH
* SPLIT_MONEY
* TRADER_PURCHASE and TRADER_SELL
* DISCOVER_ITEM
* Convert GM_COMMAND to use new macro
* Convert ZONING event to use macro
* Revert some code changes
* Revert "Revert some code changes"
This reverts commit d53682f997e89a053a660761085913245db91e9d.
* Add cereal generation support to repositories
* TRADE
* Formatting
* Cleanup
* Relocate discord_manager to discord folder
* Discord sending plumbing
* Rename UCS's Database class to UCSDatabase to be more specific and not collide with base Database class for repository usage
* More discord sending plumbing
* More discord message formatting work
* More discord formatting work
* Discord formatting of events
* Format WENT_ONLINE, WENT_OFFLINE
* Add merchant purchase event
* Handle Discord MERCHANT_SELL formatter
* Update player_event_discord_formatter.cpp
* Tweaks
* Implement retention truncation
* Put mutex locking on batch queue, put processor on its own thread
* Process on initial bootup
* Implement optional QS processing, implement keepalive from world to QS
* Reload player event settings when logs are reloaded in game
* Set settings defaults
* Update player_event_logs.cpp
* Update player_event_logs.cpp
* Set retention days on boot
* Update player_event_logs.cpp
* Player Handin Event Testing.
Testing player handin stuff.
* Cleanup.
* Finish NPC Handin.
* set a reference to the client inside of the trade object as well for plugins to process
* Fix for windows _inline
* Bump to cpp20 default, ignore excessive warnings on windows
* Bump FMT to 6.1.2 for cpp20 compat and swap fmt::join for Strings::Join
* Windows compile fixes
* Update CMakeLists.txt
* Update CMakeLists.txt
* Update CMakeLists.txt
* Create 2022_12_19_player_events_tables.sql
* [Formatters] Work on Discord Formatters
* Handin money.
* Format header
* [Formatters] Work on Discord Formatters
* Format
* Format
* [Formatters] More Formatter work, need to test further.
* [Formatters] More Work on Formatters.
* Add missing #endif
* [Formatters] Work on Formatters, fix Bot formatting in ^create help
* NPC Handin Discord Formatter
* Update player_event_logs.cpp
* Discover Item Discord Formatter
* Dropped Item Discord Formatter
* Split Money Discord Formatter
* Trader Discord Formatters
* Cleanup.
* Trade Event Discord Formatter Groundwork
* SAY don't record GM commands
* GM_Command don't record #help
* Update player_event_logs.cpp
* Fill in more event data
* Post rebase fixes
* Post rebase fix
* Discord formatting adjustments
* Add event deprecation or unimplemented tag support
* Trade events
* Add return money and sanity checks.
* Update schema
* Update ucs.cpp
* Update client.cpp
* Update 2022_12_19_player_events_tables.sql
* Implement archive single line
* Replace hackers table and functions with PossibleHack player event
* Replace very old eventlog table since the same events are covered by player event logs
* Update bot_command.cpp
* Record NPC kill events ALL / Named / Raid
* Add BatchEventProcessIntervalSeconds rule
* Naming
* Update CMakeLists.txt
* Update database_schema.h
* Remove logging function and methods
* DB version
* Cleanup SendPlayerHandinEvent
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
# Notes
- Allows operators to set a minimum and maximum status that an item will show for players.
- Allows operators to have items on a merchant that only a GM can see.
- Some servers may use status for different things, so having a minimum and a maximum will allow for more functionality.
- Default of `min_status` is `0` (Player) and default of `max_status` is `255` (Max).