215 Commits

Author SHA1 Message Date
Alex King
d1d6db3a09
[Feature] Implement Big Bags (#4606)
* [Feature] Implement "Big Bags"

* Update worlddb.cpp

* Update shareddb.cpp

* Cleanup

* Cleanup

* Add slot ID conversions

* Update shareddb.cpp

* Update database_update_manifest.cpp

* Update database_update_manifest.cpp

* Update database_update_manifest.cpp

* Update database_update_manifest.cpp

* Update ruletypes.h

* Update database_update_manifest.cpp

* Inventory load fix

* Wrap Handle_OP_MoveItem in a transaction, taking 200+ queries from 200ms+ to 5-20ms

* Speed up lazy loading

* [Performance] Significantly Improve Client Network Resends

* Improve resend algorithm to be exact about when to resend

* Manifest merge

* Update database_update_manifest.cpp

* Post merge

* Add forced interactive update

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2025-02-03 16:14:41 -06:00
Alex King
40fecbfaf5
[Performance] Move Discipline Loading to Client::CompleteConnect() (#4466)
* [Performance] Move Character Discipline Loading

* Push

* Final
2024-09-09 18:20:12 -05:00
Alex King
e3588781aa
[Cleanup] Remove unused methods (#4449) 2024-08-22 11:48:02 -04:00
Mitch Freeman
e49ab924cc
[Feature] Add Barter/Buyer Features (#4405)
* Add Barter/Buyer Features

Adds barter and buyer features, for ROF2 only at this time including item compensation

* Remove FKs from buyer tables

Remove FKs from buyer tables

* Bug fix for Find Buyer and mutli item selling

Update for quantity purchases not correctly providing multi items.
Update for Find Buyer functionality based on zone instancing.
Update buyer messaging
Update buyer LORE duplicate check

* Revert zone instance comment

* Revert zone_id packet size field

* Add zone instancing to barter/buyer

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-07-30 16:23:37 -04:00
Mitch Freeman
fc79614fac
[Feature] Add RoF2 Bazaar Support (#4315)
* 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>
2024-05-26 15:38:25 -05:00
Chris Miles
099c6d657b
[Spells] Add content filtering to NPC spells (#4309)
* [Spells] Add content filtering to NPC spells

* Update mob_ai.cpp

* Add NPC spell reloading

* Oops

* Naming

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2024-05-17 11:59:20 -04:00
twincannon
c87aadbf0c
[Commands] #npcspawn Changes (#4311)
* Changes to npcspawn create command so it takes more stats from the target npc

* Add see invis stats to npccreate command

* WIP npcspawn command changes

* Add npcspawn clone and help args, fix some broken things with npcspawn

* Cleanup comments and add apostraphes to zone shortname query

* Make it so npcspawn remove only removes spawn2 row and optionally removes spawngroup and spawnentry, make create and add spawn the npc at client loc

* Make npcspawn create use the same syntax for spawngroup naming as npcspawn add

* Revert npcspawn create and add to use npc location rather than client, other misc tweaks
2024-05-16 15:17:37 -04:00
Fryguy
772fed5e30
[Feature] Corpse Overhaul (#3938)
# 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>
2024-02-07 23:02:30 -05:00
Chris Miles
c654c1d674
[Loot] Remove from shared memory, simplification (#3988)
* First pass of pulling loot out of shared memory, functional

* More code cleanup

* More cleanup

* More cleanup

* More cleanup

* Add loot reload type

* Reload, logging

* Update npc.h

* Cleanup

* Logging, don't load attempt to load loottable id 0

* Update worldserver.cpp

* Update client.cpp

* Update zone_loot.cpp

* PR feedback

* Update zone.cpp

* Memory leak suggestion

* Update CMakeLists.txt

* Post rebase issues
2024-02-05 15:17:53 -06:00
Alex King
297e358c02
[Factions] Remove from shared memory and simplify (#3999)
* [Factions] Remove from shared memory and simplify

- Removes factions from shared memory and moves to zone based storage of repositories and changes the NPC `faction_list` to also use repositories.
- This affects NPC Factions and Faction Associations.

* Bug fixes.

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Cleanup

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Final push

* Update CMakeLists.txt

* Consolidate reloading.

* [Cleanup] PR # 3999 (#4039)

* [Fixes for PR # 3999

* [Reload actual in game factions, not just the umbrella data.

* syntax

* Fix typo

* Foix bug where primary_faction not filled in when no hits

* Fix typos

* Fix splash factions for kills.

* Fix typo

* Fix more variable names to be accurate

* Fix Loads to load new ones as they come in.

* Load npc_factions without primary (tasks) and support old task faction

* Rename to make way for new LoadFactionAssocition (by faction_id)

* Fix some review comments

* Add code to load factions for splash tasks and quests.

* Fix issue with sign and RewardFaction, fix Log Message

---------

Co-authored-by: Paul Coene <noudess@gmail.com>
2024-02-04 10:38:38 -05:00
Alex King
ae79022e06
[Zone] Convert Fishing/Foraging to Repositories (#4008)
* [Zone] Convert Fishing/Foraging to Repositories

# Notes
- Convert `LoadFishing()` and `LoadForage()` to repositories.

* Update forage.cpp

* Cleanup
2024-01-30 05:55:09 -05:00
Alex King
2e0ed82986
[Grids] Convert Grid/Grid Entries to Repositories (#4011)
* [Grids] Convert Grid/Grid Entries to Repositories

- Convert `AddWaypoint()`, `AddWaypointForSpawn()`, `DeleteWaypoint()`, `GetHighestWaypoint()`, `GetRandomWaypointFromGrid()`, `GridExistsInZone()`, and `ModifyGrid()` to repositories.

* Update grid.cpp

* Update questmgr.cpp

* Update waypoints.cpp

* Update waypoints.cpp
2024-01-28 23:37:34 -06:00
Alex King
b89772ca91
[Pets] Convert Load of Pets Beastlord Data to Repositories (#3995)
* [Pets] Convert Load of Pets Beastlord Data to Repositories

# Notes
- Convert `GetBeastlordPetData()` to repositories.
- Add support for `unsigned` versions of `float`, `double`, and `decimal`, without this we defaulted to `std::string`, such as with `pets_beastlord_data`.

* Update repository-generator.pl

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2024-01-28 23:05:43 -06:00
Alex King
1cb72642ac
[Traps] Convert Load/Set of Traps to Repositories (#3994)
# Notes
- Convert `LoadTraps()` and `SetTrapData()` to repositories.
2024-01-28 22:38:21 -06:00
Alex King
c09a3a5bba
[Spawn2] Convert Spawn2 Methods to Repositories (#4014)
* [Spawn2] Convert Spawn2 Methods to Repositories

# Notes
- Convert `CreateSpawn2()`, `GetCondition()`, `LoadSpawnConditions()`, `LoadSpawnEvent()`, `UpdateSpawnCondition()`, and `UpdateSpawnEvent()` to repositories.

# Images

* Update spawn2.cpp
2024-01-28 20:24:33 -06:00
Alex King
d41bd8f963
[Zones] Convert Get/Set of Zone Timezone to Repositories (#3946)
* [Zones] Convert Get/Set of Zone Timezone to Repositories

- Convert `GetZoneTimezone()` and `SetZoneTimeZone()` to repositories.

* Update time_zone.cpp
2024-01-13 00:10:14 -06:00
Alex King
73a099c5ea
[Character] Character EXP Modifiers in Memory (#3934)
* Cleanup

* Final push.

* Update zonedb.cpp

* Update zone.h

* Update exp.cpp

* Update zonedb.cpp

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2024-01-13 00:03:36 -06:00
Alex King
77c0eb3998
[Character] Convert Character Corpses to Repositories (#3941)
* asdsa

* Final push

* Update character_corpses_repository.h

* Update character_corpses_repository.h

* Update zonedb.cpp

* Update zonedb.cpp

* Final push

* Update character_corpses_repository.h
2024-01-13 00:02:44 -06:00
Alex King
1bb8678abe
[Cleanup] Remove GroupCount() and RaidGroupCount() (#3943)
# Notes
- These are unused.
2024-01-12 23:41:21 -06:00
Alex King
47968774d9
[Cleanup] Remove unused Grid methods (#3944)
# Notes
- Remove `AssignGrid()`, `GetGridType()`, `GetGridType2()`, and `GetWaypoints()` as they are unused.
2024-01-12 23:41:06 -06:00
Alex King
d7dc717249
[Mercenaries] Convert Mercenaries to Repositories (#3947)
* [Mercenaries] Convert Mercenaries to Repositories

- Convert all Mercenary methods to repositories aside from inner join queries that cannot be converted.

* Update base_merc_subtypes_repository.h

* Update base_merc_subtypes_repository.h

* Regenerate repositories
2024-01-12 23:40:26 -06:00
Alex King
f1d5e3eedf
[Zones] Convert SaveZoneCFG to Repositories (#3950)
* [Zones] Convert SaveZoneCFG to Repositories

# Notes
- Convert `SaveZoneCFG()` to repositories.

* Comment

* safe_heading

* Update zone_data.cpp
2024-01-12 23:28:16 -06:00
Alex King
e182d685d3
[Commands] Convert NPC Spawn Methods to Repositories (#3956)
* [Commands] Convert NPC Spawn Methods to Repositories

# Notes
- Convert `AddNewNPCSpawnGroupCommand()`, `AddNPCTypes()`, `AddSpawnFromSpawnGroup()`, `CreateNewNPCCommand()`, `DeleteSpawnLeaveInNPCTypeTable()`, `DeleteSpawnRemoveFromNPCTypeTable()`, `NPCSpawnDB()`, and `UpdateNPCTypeAppearance()`.

* Regenerate.

* Cleanup.
2024-01-12 23:02:19 -06:00
Alex King
06e8d258e4
[Objects] Convert Add/Delete/Update of Objects to Repositories (#3966)
* [Objects] Convert Add/Delete/Update of Objects to Repositories

- Convert `AddObject()`, `DeleteObject()`, and `UpdateObject()` to repositories.

* Update object_manipulation.cpp

* Update object_manipulation.cpp

* Update object_manipulation.cpp
2024-01-12 22:55:46 -06:00
Alex King
8cb15f9357
[Pets] Convert Pets to Repositories (#3968)
* [Pets] Convert Pets to Repositories

# Notes
- Convert `GetPoweredPetEntry()` to repositories.

* Update pets.cpp
2024-01-12 22:41:56 -06:00
Alex King
eb33e5a064
[Ground Spawns] Convert Ground Spawns to Repositories (#3967)
# Notes
- Convert `LoadGroundSpawns()` to repositories.
2024-01-12 22:41:08 -06:00
Alex King
71f78b757e
[Respawns] Convert Respawn Times to Repositories (#3949)
* [Respawns] Convert Respawn Times to Repositories

- Convert `respawn_times` based methods to repositories.

* Missed some.

* Comments
2024-01-12 22:38:31 -06:00
Alex King
20778ad7d9
[Character] Convert NoRentExpired to Repositories (#3860)
* [Character] Convert NoRentExpired to Repositories

- Create a custom `GetSecondsSinceLastLogin` repository method to use in `NoRentExpired`.

* Update character_data_repository.h
2024-01-07 00:25:58 -06:00
Alex King
44d63c47d9
[Account] Convert UpdateGMStatus to Repositories (#3859)
- Convert `UpdateGMStatus` to repositories.
- Convert parameter of status to `int`.
2024-01-07 00:24:02 -06:00
Alex King
b288202c96
[Account] Convert Get/Update Account Karma to Repositories (#3858)
* [Account] Convert Get/Update Account Karma to Repositories

- Convert `GetKarma` and `UpdateKarma` to repositories.

* Update zonedb.cpp
2024-01-07 00:23:18 -06:00
Alex King
1227f35382
[Cleanup] Remove bot-based saylink method (#3852)
# Notes
- With the new saylink functionality, bots no longer need their own saylink method.
2024-01-06 23:48:37 -06:00
Alex King
2dd0e51936
[Character] Convert Delete/Load/Save of Character Disciplines to Repositories (#3850)
* [Character] Convert Delete/Load/Save of Character Disciplines to Repositories

- Convert `DeleteCharacterDiscipline` and `SaveCharacterDiscipline` to repositories.
- `LoadCharacterDiscipline` already used repositories, cleaned up the logic.

* Update effects.cpp

* Update client.cpp

* Update effects.cpp

* Update client.cpp

* Update zonedb.cpp

* Update client.cpp
2024-01-06 23:41:01 -06:00
Alex King
fd787af53a
[Character] Convert Delete/Load/Remove/Save of Character AA to Repositories (#3849)
* [Character] Convert Delete/Load/Remove/Save of Character AA to Repositories

- Convert `DeleteCharacterAAs`, `LoadAlternateAdvancement`, `RemoveExpendedAA` and `SaveAA` to repositories.
- Add `AACategory` namespace for AA Categories.
- Cleanup some logic/formatting in modified methods.

* Move namespace.
2024-01-06 23:30:04 -06:00
Alex King
aa39ac8023
[Character] Convert Load/Save of Character Currency to Repositories (#3848)
* [Character] Convert Load/Save of Character Currency to Repositories

- Convert `LoadCharacterCurrency` and `SaveCharacterCurrency` to repositories.

* Update zonedb.cpp
2024-01-06 23:28:37 -06:00
Alex King
397096996c
[Character] Convert Delete/Load/Save of Character Bandolier to Repositories (#3845)
* [Character] Convert Delete/Load/Save of Character Bandolier to Repositories

- Converts `DeleteCharacterBandolier`, `LoadCharacterBandolier`, and `SaveCharacterBandolier` to repositories.

* Update zonedb.cpp

* Update zonedb.cpp

* Update zonedb.cpp

* Update zonedb.cpp

* Update zonedb.cpp
2024-01-06 23:25:13 -06:00
Alex King
f8de9b9167
[Character] Convert Load/Save of Character Potion Belt to Repositories (#3844)
* [Character] Convert Load/Save of Character Potion Belt to Repositories

- Converts `LoadCharacterPotionBelt` and `SaveCharacterPotionBelt` to repositories.

* Update zonedb.cpp

* Update zonedb.cpp
2024-01-06 23:15:58 -06:00
Alex King
eb5eb0ca30
[Character] Convert Delete/Load/Save of Character Spells to Repositories (#3842)
* [Character] Convert Delete/Load/Save of Character Spells to Repositories

- Converts `DeleteCharacterSpell`, `LoadCharacterSpellBook`, and `SaveCharacterSpell` to repositories.

* Update zonedb.cpp
2024-01-06 23:12:40 -06:00
Alex King
bc4bebb4a9
[Character] Convert Delete/Save of Character Memmed Spells to Repositories (#3841)
* [Character] Convert Delete/Save of Memmed Spells to Repositories

- Converts `DeleteCharacterMemorizedSpell` and `LoadCharacterMemmedSpells` to repositories.

* Update zonedb.cpp

* Update zonedb.cpp
2024-01-06 23:09:12 -06:00
Alex King
c1e984dfc1
[Character] Convert Delete/Load/Save of Character Material to Repositories (#3846)
* [Character] Convert Delete/Load/Save of Character Material to Repositories

- Convert `DeleteCharacterMaterialColor`, `LoadCharacterMaterialColor`, and `SaveCharacterMaterialColor` to repositories.

* Cleanup
2024-01-06 23:03:54 -06:00
Alex King
a5d9a8596a
[Character] Convert Delete/Load/Save of Character Leadership Abilities to Repositories (#3847)
# Notes
- Converts `DeleteCharacterLeadershipAbilities`, `LoadCharacterLeadershipAbilities`, and `SaveCharacterLeadershipAbilities` to repositories.

# Images
## Load

## Save

## Delete
2024-01-06 22:42:56 -06:00
Alex King
6c18cd0bee
[Quest API] Add HasItemOnCorpse() to Perl/Lua (#3824)
# Perl
- Add `$client->HasItemOnCorpse(item_id)`.

# Lua
- Add `client:HasItemOnCorpse(item_id)`.

# Notes
- Allows operators to see if a player has an item on any of their corpses.
- May need to address having to allocate and deallocate memory for every corpse that could possibly exist for a player.
2023-12-30 22:09:48 -06:00
Alex King
4712ca471b
[Cleanup] Gender constants cleanup (#3817)
* [Cleanup] Gender constants cleanup

# Notes
- Convert to a `Gender` namespace using `constexpr`.
- Cleanup spots where we were using magic numbers for gender values.

* Cleanup
2023-12-30 11:22:09 -05:00
Chris Miles
0811a899d1
[Spawn] Split spawn2 enabled into its own state table (#3664)
* [Spawn] Split spawn2 enabled into its own state table

* Update spawn2.cpp

* Update repo

* Make spawn2 enabled/disabled instance aware

* Update questmgr.cpp

* Make sure packet stuff is aware of instance_id

* Update questmgr.cpp

* Update database_update_manifest.cpp

* Cleanup

* Revert "Cleanup"

This reverts commit 64b58bfc5273dac13bb88f92522e31773bb80ffc.

* Update database_instances.cpp
2023-11-06 17:34:42 -06:00
Alex King
52d64781b5
[Feature] Add Expansion and Content Flag support to Blocked Spells (#3638)
* [Feature] Add Expansion and Content Flag support to Blocked Spells

# Notes
- Allows operators to filter blocked spells behind expansions or content flags.
- Requested in https://github.com/EQEmu/Server/issues/3582

* [Tradeskills] Add learned_by_item_id field (#3637)

* [Feature] Add Expansion and Content Flag support to Blocked Spells

- Allows operators to filter blocked spells behind expansions or content flags.
- Requested in https://github.com/EQEmu/Server/issues/3582

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2023-10-20 17:45:58 -05:00
Alex King
fb20d92166
[Bug Fix] Fix Appearance Issues (#3520)
* [Bug Fix] Fix Appearance Issues

# Notes
- Changing race, gender, or texture of a Mob could result in it changing sizes due to use not sending the size as part of the appearance packet.
- Also converts the parameterized method to a struct parameter so that we can optionally send things without back-filling multiple arguments.

* Gender cleanup.

* Fix.

* Formatting.
2023-07-31 20:15:13 -05:00
Alex King
8f6d606f53
[Bug Fix] Fix Tradeskill Combines with augmented items (#3490)
* [Bug Fix] Fix Tradeskill Combines with augmented items

# Notes
- Keeps players from doing tradeskill combines with augmented items.
- Behavior is Live-like, we don't need a rule since `EVENT_COMBINE` is separate and processed prior to the recipe check.

* Update tradeskills.cpp

* Update tradeskills.cpp

* Cleanup

* Update tradeskills.cpp
2023-07-15 00:39:19 -05:00
Alex King
75560ee830
[Performance] Character tribute is now bulk saved (#3340)
* [Performance] Character tribute is now bulk saved

This pull request combines individual `character_tribute` queries during `Save()` into one.

This pull request also adds a primary key of `id` to `character_tribute` and renames the pre-existing `id` column to `character_id`, this allows us to use repositories for this table.

* Update zonedb.cpp

* Update zonedb.cpp
2023-05-25 19:21:18 -04:00
Alex King
65fd323eab
[Cleanup] Remove LoadSpawn2() and PopulateZoneSpawnListClose() from spawn2.cpp/zonedb.h (#3344)
# Notes
- These are unused.
2023-05-24 22:42:20 -05:00
Chris Miles
612029de6e
[Performance] Character bind is now bulk saved (#3338)
* [Performance] Character bind is now bulk saved

* Fix bind heading
2023-05-09 13:22:57 -05:00
Alex
5a6314e1a9
[Fix] Fixes for corpses not properly saving some item instance data correctly. (#3123)
* Convert ZoneDb::LoadCharacterCorpseData to use a cleaner api that has a better layout.

* Update corpse save methods to use a new cleaner api.

* Add item to corpse will use a few new fields that don't yet save.

* Fix for some issues moving data to corpses.

* Make CreateItem more explicit to avoid overlooking places it's used and add more arguments.

* DB changes

* Revert of the changes to the database.CreateItem api change.

* Missed one.

* Fixes for mr Krab

* Small formatting

---------

Co-authored-by: KimLS <KimLS@peqtgc.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-23 01:16:52 -05:00