11686 Commits

Author SHA1 Message Date
Alex King
8edf7a07e3
[Base Data] Remove from shared memory and simplify (#4045)
* [Base Data] Remove from shared memory and simplify

- Removes Base Data loading from shared memory and puts it into zone.
- Changes type of `level` and `class` to `uint8_t` from `uint32_t` for consistency since we're renaming fields here anyway.
- Renames `unk1` to `hp_regen` in `base_data` table.
- Renames `unk2` to `end_regen` in `base_data` table.
- These changed fields were already mapped, we just hadn't renamed them for whatever reason.
- Regenerates Base Data repository.
- Adds `#reload base_data` to reload base data in real time.

* Cleanup

* Update shareddb.h

* Cleanup.

* Update shareddb.cpp

* Update main.cpp
2024-02-05 17:11:20 -06:00
Alex King
b6b779723e
[Feature] Add optional is_forced parameter to Zone::Repop (#4046)
* [Feature] Add optional `is_force` parameter to Zone::Repop

# Perl
- Add `quest::repopzone(is_force)`.

# Lua
- Add `eq.repop_zone(is_force)`.

# Commands
- Cleanup `#repop` to use new parameter in `Zone::Repop`.

# Notes
- Allows operators to forcefully repop a zone without using a second method to clear the respawn timers.

* is_forced

* Update repop.cpp

* Update repop.cpp
2024-02-05 16:10:56 -06: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
fcbf5cae47
[Commands] Add #show special_abilities (#4043)
* [Commands] Add #show special_abilities

# Notes
- Allows operators to see what special abilities an NPC has.
- Move special ability values to `common/emu_constants.h`.
- Add `EQ::constants::GetSpecialAbilityMap()` and `EQ::constants::GetSpecialAbilityName()`.
- Add `NPC::DescribeSpecialAbilities(client)` to describe special abilities to a specified client.

# Images

* Update npc.cpp
2024-02-05 14:34:10 -06:00
Alex King
0ffea36905
[Quest API] Add GetAAEXPPercentage() and GetEXPPercentage() to Perl/Lua (#4044)
* Initial Push

* Push

* Push.
2024-02-04 18:16:28 -05:00
Paul Coene
3f9a604c5c
[GM Commands] Fix typo in #rules help. (#4042) 2024-02-04 15:00:43 -05: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
JJ
029581772d
[Cleanup] Remove redundant check in Object::HandleCombine (#4041)
Some minor formatting updates.
2024-02-03 17:07:43 -05:00
nytmyr
175f2b16f5
[Bug Fix] Fix for potential crash of DS damage on death (#4040)
On the unfortunate timing of a bot or owner dying when the bot deals damage due to a DS and the owner pointer is no longer valid.
2024-02-03 08:54:34 -05:00
Alex King
71f47dbcef
[Objects] Add fix_z column to ground spawns (#3992)
* [Objects] Add is_floating column to objects/ground spawns

# Notes
- Allows ground spawns/objects to float without having `FixZ()` called.

* Remove from object.

* Database version

* Fix

* Change to fix_z
2024-02-01 04:42:51 -06:00
Alex King
6297c56db2
[Bot Commands] Separate Bot Commands into Individual Files (#4035)
# Notes
- Separate all bot commands into individual files like regular commands.

# Images
2024-02-01 04:35:33 -06:00
Alex King
6efd7c5177
[Feature] Add support to crosszone/worldwide spells to affect bot pets (#4036)
* [Bug Fix] Move break in ServerOP_WWSpell handler

# Notes
- This break was cancelling loop early, m

* [Feature] Add support to crosszone/worldwide spells to affect bot pets
2024-02-01 04:27:00 -06:00
Alex King
24578f6c1e
[Bug Fix] Fix Bot Non-Melee Damage Messages (#4038)
# Notes
- These were not displaying because bots pass the `attacker && attacker->GetOwner()` check which assumes they're a pet because we weren't confirming it wasn't a bot.

# Image
2024-02-01 04:26:38 -06:00
Alex King
490ed50c9f
[Bug Fix] Fix Issue with Bot Dual wield (#4037)
# Notes
- Bots were using primary weapons even for dual wield attacks so they were never attacking with their secondary even when they should be.
2024-02-01 04:26:25 -06:00
Alex King
7c982df0e3
[Release] 22.43.3 (#4034)
### API

* Add lock_status method to world API ([#4028](https://github.com/EQEmu/Server/pull/4028)) @Akkadius 2024-01-29

### Alternate Currency

* Convert Load of Alternate Currencies to Repositories ([#3993](https://github.com/EQEmu/Server/pull/3993)) @Kinglykrab 2024-01-29

### Beacon

* Cleanup Beacons Code ([#4024](https://github.com/EQEmu/Server/pull/4024)) @Kinglykrab 2024-01-29

### Bots

* Convert Bot Database Methods to Repositories ([#4023](https://github.com/EQEmu/Server/pull/4023)) @Kinglykrab 2024-01-29
* Missing boolean returns on DeletePetStats and SaveInspectMessage ([#4031](https://github.com/EQEmu/Server/pull/4031)) @joligario 2024-01-30

### Code

* Add Raid Loot Type Constants ([#4022](https://github.com/EQEmu/Server/pull/4022)) @Kinglykrab 2024-01-29
* Cleanup cross-zone/world-wide OPCode handling ([#4003](https://github.com/EQEmu/Server/pull/4003)) @Kinglykrab 2024-01-29

### Commands

* Cleanup #petitems Command ([#4005](https://github.com/EQEmu/Server/pull/4005)) @Kinglykrab 2024-01-29

### Crash Fix

* Fix Possible Crash in HateList::Find ([#4027](https://github.com/EQEmu/Server/pull/4027)) @Kinglykrab 2024-01-28

### Fixes

* Fix NPC After Death Emotes ([#4021](https://github.com/EQEmu/Server/pull/4021)) @Kinglykrab 2024-01-29
* Fix database loading routines ([#4030](https://github.com/EQEmu/Server/pull/4030)) @Akkadius 2024-01-29
* Fix issue in character_corpses Repository Query ([#4029](https://github.com/EQEmu/Server/pull/4029)) @Kinglykrab 2024-01-29
* Limit Pet Taunt Distance ([#4018](https://github.com/EQEmu/Server/pull/4018)) @fryguy503 2024-01-26
* Limit Player Taunt Distance ([#4019](https://github.com/EQEmu/Server/pull/4019)) @fryguy503 2024-01-26
* Patch for recent change to DEATH ([#4032](https://github.com/EQEmu/Server/pull/4032)) @noudess 2024-01-30
* spawn_conditions map was being emptied by mistake ([#4033](https://github.com/EQEmu/Server/pull/4033)) @noudess 2024-01-30

### Grids

* Convert Grid/Grid Entries to Repositories ([#4011](https://github.com/EQEmu/Server/pull/4011)) @Kinglykrab 2024-01-29

### Mercenaries

* Add expansion settings update to Mercs:Enable ([#4001](https://github.com/EQEmu/Server/pull/4001)) @Kinglykrab 2024-01-29

### Merchants

* Convert Merchant Load to Repositories ([#4007](https://github.com/EQEmu/Server/pull/4007)) @Kinglykrab 2024-01-29

### Pets

* Convert Load of Pets Beastlord Data to Repositories ([#3995](https://github.com/EQEmu/Server/pull/3995)) @Kinglykrab 2024-01-29

### Quests

* Use separate variable for quest idle override. ([#4026](https://github.com/EQEmu/Server/pull/4026)) @noudess 2024-01-27

### Rules

* Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets ([#4002](https://github.com/EQEmu/Server/pull/4002)) @Kinglykrab 2024-01-29

### Spawn2

* Convert Spawn2 Methods to Repositories ([#4014](https://github.com/EQEmu/Server/pull/4014)) @Kinglykrab 2024-01-29

### Traps

* Convert Load/Set of Traps to Repositories ([#3994](https://github.com/EQEmu/Server/pull/3994)) @Kinglykrab 2024-01-29

### Zone

* Convert Fishing/Foraging to Repositories ([#4008](https://github.com/EQEmu/Server/pull/4008)) @Kinglykrab 2024-01-30
v22.43.3
2024-01-30 19:26:50 -05:00
Paul Coene
fa783c3c6b
[Bug Fix] spawn_conditions map was being emptied by mistake (#4033) 2024-01-30 18:48:28 -05:00
Paul Coene
5377bb3f49
[Bug Fix] Patch for recent change to DEATH (#4032) 2024-01-30 17:10:45 -05:00
JJ
f98c79fdba
[Bots] Missing boolean returns on DeletePetStats and SaveInspectMessage (#4031) 2024-01-30 12:07:02 -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
Chris Miles
bc59882a65
[Hotfix] Fix database loading routines (#4030) 2024-01-29 00:14:33 -06: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
8e3218aaf7
[Cleanup] Cleanup cross-zone/world-wide OPCode handling (#4003)
* [Cleanup] Cleanup cross-zone/world-wide OPCode handling

# Notes
- Cleans up the logic greatly for cross-zone/world-wide methods since we were doing extraneous status checks and needlessly allocating memory for variables.

* Update worldserver.cpp
2024-01-28 23:07:27 -06:00
Alex King
9276966418
[Rules] Add rules for cross-zone/world-wide casts to affect Bots/Mercenaries/Pets (#4002)
* [Rules] Add rules for cross-zone/world-wide casts to affect bots/mercenaries/pets

# Notes
- These rules allow operators to have cross-zone/world-wide casts/removals of spells affect bots, mercenaries, and/or pets.
- Adds `World:AllowWorldWideSpellsOnBots`.
- Adds `World:AllowWorldWideSpellsOnMercs`.
- Adds `World:AllowWorldWideSpellsOnPets`.
- Adds `Zone:AllowCrossZoneSpellsOnBots`.
- Adds `Zone:AllowCrossZoneSpellsOnMercs`.
- Adds `Zone:AllowCrossZoneSpellsOnPets`.

* Consolidate to 3 rules
2024-01-28 23:06:21 -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
a1f2a21c99
[Bug Fix] Fix NPC After Death Emotes (#4021)
* [Bug Fix] Fix NPC After Death Emotes

- `DoNPCEmote` was being called on the corpse, not the NPC, so it wasn't working for some reason despite it working for years.
- Cleaned up some other logic and variable names in `NPC::Death` while I was in there.

* Update attack.cpp

* Update npc.cpp

* Update attack.cpp

* Update attack.cpp
2024-01-29 00:03:34 -05: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
a38fd8f986
[Alternate Currency] Convert Load of Alternate Currencies to Repositories (#3993)
# Notes
- Convert `LoadAlternateCurrencies()` to repositories.
2024-01-28 22:36:26 -06:00
Alex King
337b6f38e0
[Mercenaries] Add expansion settings update to Mercs:Enable (#4001)
# Notes
- Adds an expansion settings update to the `Mercs:Enable` command, only updates if the expansion setting isn't already `-1` or doesn't already contain the bitmask for Seeds of Destruction (16384).
- This will enable Mercenary Liaisons spawning properly in Plane of Knowledge for the hiring of mercenaries.
2024-01-28 21:58:58 -06:00
Alex King
b4414d3052
[Merchants] Convert Merchant Load to Repositories (#4007)
* [Merchants] Convert Merchant Load to Repositories

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

# Images
## Load

* Change to LoadMerchants()
2024-01-28 21:55:59 -06:00
Alex King
bfeeb0ce05
[Commands] Cleanup #petitems Command (#4005)
- Adds support to `#petitems` to allow you to target bot's pets to view their items, defaults to your pet if you have one.
- If you have no pet or no bot pet targeted it won't function.
2024-01-28 21:55:35 -06:00
Alex King
e640e3cad3
[Cleanup] Add Raid Loot Type Constants (#4022)
* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.

* [Cleanup] Add Raid Loot Type Constants

# Notes
- Add constants for Raid loot types.
2024-01-28 21:45:32 -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
ce907c9519
[Bots] Convert Bot Database Methods to Repositories (#4023)
* [Bots] Convert Bot Database Methods to Repositories

* Final push.

* Cleanup.

* Cleanup.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot_database.cpp
2024-01-28 20:23:31 -06:00
Alex King
7a770e0e08
[Beacon] Cleanup Beacons Code (#4024)
# Notes
- Use constants where possible.
- Change `resist_adjust` parameter in `Beacon::AELocationSpell` from `resist_adjust` to `in_resist_adjust` so we're not possibly causing parameter shadowing.
2024-01-28 20:20:09 -06:00
Chris Miles
97c3205657
[API] Add lock_status method to world API (#4028) 2024-01-28 20:18:32 -06:00
Alex King
ff2e56abc7
[Bug Fix] Fix issue in character_corpses Repository Query (#4029)
* [Bug Fix] Fix issue in character_corpses Repository Query

# Notes
- Query had an extra ` inside of it, causing it to fail.

* Update character_corpses_repository.h
2024-01-28 20:18:24 -06:00
Alex King
9ee16f8bf7
[Crash Fix] Fix Possible Crash in HateList::Find (#4027)
# Notes
- We were not doing any pointer validation, so we were causing crashes in some cases.
- Example: http://spire.akkadius.com/dev/release/22.43.2?id=19163
2024-01-28 02:44:04 -06:00
Paul Coene
5b43bf4a5e
[Quests] Use separate variable for quest idle override. (#4026)
* [Quests] Use separate variable for quest idle override.

* Fix missing zone->
2024-01-27 14:09:00 -05:00
Fryguy
4c769c46b3
[Bug Fix] Limit Player Taunt Distance (#4019)
* [Bug Fix] Player Taunt Distance

Previously this was not regulated on the server side and allowed players to exploit situations where the client did not enforce Z distance checks.

Rule Name: MaximumTauntDistance
Rule Default: 150

Calculation is Rule Squared

* remove `this`
2024-01-26 15:44:05 -05:00
Fryguy
8a87e00b66
[Bug Fix] Limit Pet Taunt Distance (#4018)
* [Bug Fix] Limit pet taunt distance

Previously this was not regulated and allowed players to exploit unlimited taunt distance.

Rule Name: PetTauntRange
Rule Default: 150

Calculation is Rule Squared.

* Remove `this`
2024-01-26 15:43:20 -05:00
Alex King
0ebc7f9bb6
[Release] 22.43.2 (#4017)
### Bots

* ^mez command spell list fix ([#3998](https://github.com/EQEmu/Server/pull/3998)) @dariusuknuis 2024-01-19

### Code

* Cleanup position methods ([#4015](https://github.com/EQEmu/Server/pull/4015)) @Kinglykrab 2024-01-25

### Commands

* Add `#npcedit set_grid [Grid ID]` to `#npcedit` ([#4004](https://github.com/EQEmu/Server/pull/4004)) @Kinglykrab 2024-01-22

### Crash Fix

* Fix crash when creating Frogloks/Drakkin ([#4016](https://github.com/EQEmu/Server/pull/4016)) @Kinglykrab 2024-01-25
* Reverting PR #3877 ([#3997](https://github.com/EQEmu/Server/pull/3997)) @fryguy503 2024-01-17

### Database

* Drop deprecated item_tick table ([#3977](https://github.com/EQEmu/Server/pull/3977)) @Akkadius 2024-01-14
* Drop item_tick if exists tweak in manifest ([#3985](https://github.com/EQEmu/Server/pull/3985)) @Akkadius 2024-01-15
* Increase max spawngroup name from 50 to 200 ([#3991](https://github.com/EQEmu/Server/pull/3991)) @Akkadius 2024-01-22

### Fixes

* Fix Mercenaries Buffs/Zoning Issues ([#4000](https://github.com/EQEmu/Server/pull/4000)) @Kinglykrab 2024-01-22
* Fix zone database update manifest ([#3972](https://github.com/EQEmu/Server/pull/3972)) @Kinglykrab 2024-01-13
* Fixes to zone idle while empty changes. ([#4006](https://github.com/EQEmu/Server/pull/4006)) @noudess 2024-01-23
* Reversed logic on InLiquid ([#3979](https://github.com/EQEmu/Server/pull/3979)) @fryguy503 2024-01-14

### Instances

* Convert Instance Quest Methods to Repositories ([#4012](https://github.com/EQEmu/Server/pull/4012)) @Kinglykrab 2024-01-25

### Logging

* Force Info category to be always on in file/console logs ([#3990](https://github.com/EQEmu/Server/pull/3990)) @Akkadius 2024-01-22

### Merchants

* Change database structure for merchant slots ([#3974](https://github.com/EQEmu/Server/pull/3974)) @joligario 2024-01-14

### Messages

* Fix disciple message added by previous patch. ([#3986](https://github.com/EQEmu/Server/pull/3986)) @noudess 2024-01-15

### Quest API

* QuestReward should now summon item to the inventory instead of the cursor. ([#3996](https://github.com/EQEmu/Server/pull/3996)) @regneq 2024-01-22

### Repositories

* Add `rank` to reserved words ([#3982](https://github.com/EQEmu/Server/pull/3982)) @Akkadius 2024-01-15
* Fix datetime zero-value save behavior ([#3976](https://github.com/EQEmu/Server/pull/3976)) @Akkadius 2024-01-14

### Spawn2

* Spawn condition value should default spawn_conditions value ([#3980](https://github.com/EQEmu/Server/pull/3980)) @noudess 2024-01-14

### Zoning

* Additional logs for zoning under instance checks ([#3989](https://github.com/EQEmu/Server/pull/3989)) @Akkadius 2024-01-22
v22.43.2
2024-01-25 16:30:50 -06:00
Alex King
9ac25338bb
[Crash Fix] Fix crash when creating Frogloks/Drakkin (#4016)
* [Crash Fix] Fix crash when creating Frogloks/Drakkin

# Notes
- https://github.com/EQEmu/Server/pull/3920 introduced an issue where we were using `uchar` for `race_selection` and `class_selection` which was not functioning properly within `IsPlayerRace()`.

* Update client.cpp
2024-01-25 06:19:59 -05:00
Alex King
e9285fd2ca
[Instances] Convert Instance Quest Methods to Repositories (#4012)
* [Instances] Convert Instance Quest Methods to Repositories

# Notes
- Convert `UpdateInstanceTimer()` and `GetInstanceTimerByID()` to repositories.
- Cleanup other instance methods.

* Update questmgr.cpp
2024-01-25 05:50:10 -05:00
Alex King
5b85f89c21
[Cleanup] Cleanup position methods (#4015)
# Notes
- Cleanup logic.
2024-01-24 22:47:24 -06:00
Paul Coene
7fed8fc8c8
[Bug Fix] Fixes to zone idle while empty changes. (#4006) 2024-01-22 19:33:00 -05:00
Alex King
26769f40d9
[Commands] Add #npcedit set_grid [Grid ID] to #npcedit (#4004)
* [Commands] Add #npcedit grid_id to #npcedit

# Notes
- Adds `#npcedit grid_id [Grid ID]` to `#npcedit`.

* set_grid
2024-01-22 17:49:18 -05:00
regneq
f6148b9b8d
[Quest] QuestReward should now summon item to the inventory instead of the cursor. (#3996)
* [forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp.  currently set to enabled.

* [Quest] change QuestReward summonitem to SummonItemToInventory.

* add closing brackets in QuestReward functions.
2024-01-22 17:35:15 -05:00
Chris Miles
ca1299bf1d
[Database] Increase max spawngroup name from 50 to 200 (#3991) 2024-01-22 17:34:54 -05:00
Chris Miles
3fb24dc0a3
[Logging] Force Info category to be always on in file/console logs (#3990) 2024-01-22 17:34:48 -05:00
Chris Miles
dcd7bffa54
[Zoning] Additional logs for zoning under instance checks (#3989) 2024-01-22 17:34:41 -05:00