645 Commits

Author SHA1 Message Date
Chris Miles
25826c6686
[Performance] Client / NPC Position Update Optimizations (#4602)
* 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
2025-01-21 15:35:19 -06:00
Alex King
d95b64e0b8
[Cleanup] Fix GM Flag Spell Restriction Bypasses (#4571)
* [Cleanup] Fix GM Flag Spell Restriction Bypasses

* Update spells.cpp
2025-01-06 00:18:25 -06:00
Alex King
5c6e7a8b09
[Cleanup] Convert Event Parses to Single Line (#4569)
* [Cleanup] Convert Event Parses to Single Line

* Push

* Update spells.cpp

* Update spells.cpp

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-12-12 00:43:22 -06:00
Fryguy
e06b0c4b0c
[Bug Fix] Master of Disguise should apply to illusions casted by others. (#4506)
Many era comments outline how Master of Disguise would apply to Project Illusion spells on you:

https://thesafehouse.org/forums/forum/everquest-wing/main-lounge/14249-new-aa-master-of-disguise/page4

https://thesafehouse.org/forums/forum/everquest-wing/training-studios/18143-master-of-disguise-broken

```
Im not a big fan of wolf form, but having a 1200 min NDT is pretty nice  I also agree its great to shrink on a raid once and not have to worry about it. 7 aa is a little steep imho, but with a name change and some frog potions, I may reapply to my guild as the servers only froggy rogue /cackle.
```

```
share form of the great wolf gave a 1500min timer.
```
2024-10-11 13:39:36 -04:00
Alex King
448a33a60c
[Quest API] Add Scripting Support to Mercenaries (#4500)
* [Quest API] Add Scripting Support to Mercenaries

* Cleanup

* Cleanup

* Update lua_merc.h

* Update mob.cpp

* XYZH

* Final

* Update attack.cpp

* Update attack.cpp

* Simplify event invocation

* Inline example

* Nullptr init example

* EVENT_TIMER simplify add EventPlayerNpcBotMerc

* EVENT_TIMER_START

* Remove has_start_event

* EVENT_TIMER_START with settimerMS

* EVENT_POPUP_RESPONSE

* Consolidation

* Update attack.cpp

* Push

* Update quest_parser_collection.h

* Comments

* Cleanup per comments

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-10-10 21:29:29 -04:00
Fryguy
8f86cb353e
[Bug Fix] Spells - Self Only (Yellow) cast when non group member is targeted (#4503)
* [Bug Fix] Spells - Self Only (Yellow) cast when non group member is targeted

When using a Yellow gem invis spell, it should cast on yourself regardless of the targetted entity.

* Update spells.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2024-10-10 21:27:49 -04:00
Alex King
a7c3b41afc
[Quest API] Add Buff Fade Methods to Perl/Lua (#4501)
* [Quest API] Add Buff Fade Methods to Perl/Lua

* BuffFadeSongs()
2024-10-09 02:12:33 -05:00
Chris Miles
bcd943a964
[Code Cleanup] Optimization Code Cleanup (#4489)
* Initial push

* More

* More

* Further simplify

* More cleanup

* More consolidation

* Fix

* Update

* Update npc.cpp

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2024-09-30 18:34:42 -04:00
Alex King
40738b29e3
[Quest API] Add Area-Based Quest Methods to Perl/Lua (#4447)
* [Quest API] Add Area-Based Quest Methods to Perl/Lua

* Convert some to mob

* Fix
2024-08-26 20:29:07 -05:00
Alex King
b7f8d0f179
[Feature] Extend Spell Buckets Functionality (#4441) 2024-08-22 18:49:52 -04:00
KayenEQ
d8ddd0aab9
[Bug Fix] Aegolism Spell line stacking (#4399)
* fix stacking issues with Aegolism spell line

Issue: When casting buffing a player with aegolism spell line, who already has cleric AC, symbol and heroism spell, it would overwrite heorism buff and leave other two.

Aegolism spell line when applied when a client has Heroism spell line, AC spell line, and symbol spell line. Should overwrite the Heroism spell and fade the AC and Symbol buffs.

* Update spdat.cpp
2024-07-07 00:53:46 -04:00
Fryguy
850053a136
[Bug] Prevent Resurrection Spells from being resisted (#4393)
* [Bug] Prevent Ressurection Spells from being resisted

Added IsRessurectionSpell(uint16 spell_id) to assist with checking on a spell is a ressurection spell.

This was noticed when Dragons of Norrath launched and the Tier 5 Progression AA provided SPA 180 2% SE_ResistSpellChance

* Helps if I spell it correctly

* Update per feedback
2024-06-14 11:51:33 -05:00
Alex King
8640776a21
[Cleanup] Cleanup Body Type Code (#4366)
* [Cleanup] Cleanup Body Type-based Code

* Update bodytypes.cpp

* Final

* Update body_type.cpp

* Cleanup

* Cleanup

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-06-02 04:25:06 -04:00
Alex King
76b9ce0ac1
[Cleanup] Cleanup Special Ability Code (#4365)
* [Cleanup] Cleanup Special Ability-based Code

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update emu_constants.cpp

* Update special_ability.cpp

* Cleanup

* Update emu_constants.cpp
2024-06-01 18:20:43 -05:00
Fryguy
2df5f3f55a
[Bug Fix] When refreshing buffs, attempt to use the same buffslot if the buff still exists. (#4338) 2024-05-26 06:59:22 -04:00
Akkadius
405d963005 [Hotfix] "GM flag" vs "GM Flag" 2024-05-04 18:44:19 -05:00
Alex King
aa0e53f5fc
[Messages] Add GM Status and Invulnerability Messages (#4266)
* [Messages] Add GM Status and Invulnerability Messages

* Update zoning.cpp

* Finalize.

* Update corpse.cpp

* Update message

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-05-04 18:07:17 -05:00
Xackery
39bb7e1723
[Lua] Add IsImmuneToSpell Lua Mod (#4278)
* Add IsImmuneToSpell lua mod

* Add lua_parser.h include in spells.cpp
2024-04-28 08:20:34 -04:00
Paul Coene
ac12ba153e
[Spells] Normal Group Spells (non-raid) landed twice on caster (#4240) 2024-04-15 05:07:24 -05:00
KayenEQ
043eeced6f
[Bug Fix] Client not updating HP bar when an HP Buff with a Heal is applied. (#4237)
* [Bug Fix] HP Bar not updating when applying HP Buff with a heal.

Bug: When an HP buff with a heal effect is applied for first time, the heal portion of the effect heals the client and updates HPs currently server side, but client side the HP bar does not register it as a heal thus you display as less than full HP. However due to server thinking your healed, you are unable to correct it by healing.

Solution: You need to resend the HP update after buff completed and action packet resent.

* add SE_MaxHPChange to fix

would result in same bug
2024-04-02 01:13:29 -05:00
Alex King
d77966797e
[Quest API] Add Spell Blocked Event to Perl/Lua (#4217)
* [Spells] Add Unblockable Spell Table and Spell Blocked Event

- Add `EVENT_SPELL_BLOCKED`, exports `$blocking_spell_id`, `$cast_spell_id`, `$blocking_spell`, and `$cast_spell`.

- Add `event_spell_blocked`, exports `e.blocking_spell_id`, `e.cast_spell_id`, `e.blocking_spell`, and `e.cast_spell`.

- Adds `spells_unblockable` table with a `spell_id` and `is_unblockable` column.
- This table will need to be populated based on known spells that should be unblockable.

- This event will allow operators to perform events when spells are blocked.

* Cleanup

* Cleanup

* Update spells.cpp

* Remove unused repositories.

* Finalize

* Update lua_parser_events.cpp
2024-03-31 22:58:30 -05:00
KayenEQ
9e3bf91374
[Spells] Implemented SPA 463 SE_SHIELD_TARGET (#4224)
SPA 463 SE_SHIELD_TARGET

Live description: "Shields your target, taking a percentage of their damage".

Only example spell on live is an NPC who uses it during a raid event "Laurion's Song" expansion. SPA 54492 'Guardian Stance' Described as 100% Melee Shielding

Example of mechanic. Base value = 70. Caster puts buff on target. Each melee hit Buff Target takes 70% less damage, Buff Caster receives 30% of the melee damage.
Added mechanic to cause buff to fade if target or caster are separated by a distance greater than the casting range of the spell. This allows similar mechanics to the /shield ability, without a range removal mechanic it would be too easy to abuse if put on a player spell. *can not confirm live does this currently

Can not be cast on self.
2024-03-30 13:34:03 -04:00
KayenEQ
20d9417628
[Spells] SPA148 Stacking Fix (#4206)
Update to SPA148 which acts to block spells buffs that are of lesser value than the current buff for specific effect slots. This effected was preventing detrimental debuffs from being applied that were using same effect slot. This bug affected a very small amount of spell interactions and was fixed on live in 2018.  Example being Vishmitars Corruption (6642) being blocked by SteelOak Skin (5352)

 I confirmed the behavior on live myself. The detrimental buff  if in conflict should now be applied instead of blocked.
2024-03-27 14:39:40 -04:00
Alex King
abdec39cdd
[Quest API] Add Archetype Methods to Perl/Lua (#4181)
* [Quest API] Add Archetype Methods to Perl/Lua

- Add `$mob->GetArchetypeName()`.
- Add `$mob->IsIntelligenceCasterClass()`.
- Add `$mob->IsPureMeleeClass()`.
- Add `$mob->IsWisdomCasterClass()`.

- Add `mob:GetArchetypeName()`.
- Add `mob:IsIntelligenceCasterClass()`.
- Add `mob:IsPureMeleeClass()`.
- Add `mob:IsWisdomCasterClass()`.

- Allows operators to use mob archetypes to perform different operations.
- Add a namespace for archetypes instead of constants.
- Utilize `IsIntelligenceCasterClass()`, `IsPureMeleeClass()`, and `IsWisdomCasterClass()` where necessary.
-

* Update mob.cpp
2024-03-23 14:37:35 -05:00
Paul Coene
0c582cc4f9
[Bug Fix] Cleanup NPC Mana Tap Logic (#4134)
* [Bug Fix] Cleanup NPC Mana Tap Logic

Mana Tap rule logic was invalid - Cleaned up and simplified, either we care about npc mana or we dont.

* Updated for bypass all rule

* Change so melee targets get blocked even with requiremana rule off

---------

Co-authored-by: Trust <fryguy503@gmail.com>
2024-03-01 22:48:50 -05:00
hg
e920e35a5c
[Cleanup] Use explicit conversions for enum formatting (#4064)
This is prep for updating to fmt 10 which removed implicit conversions
for enums.
2024-02-12 02:58:48 -06: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
Paul Coene
86705000b0
Push discpline messages under melee->disciplines (#3987)
* Push discpline messages under melee->disciplines

* Added safe_delete()

* Remove fryguy's new message code and fix existing instead
2024-01-19 08:55:26 -05:00
Paul Coene
27256215b8
[Messages] Fix disciple message added by previous patch. (#3986) 2024-01-15 14:01:24 -05:00
Fryguy
e6dc980315
[Bug Fix] Harm Touch Critical Ratio (#3915)
* [Bug] HT Crit Ratio

This is used to tune and bring HT Crits more in line with the correct values as proven in screenshots.

* requested changes

* mistakenly kept mob::
2024-01-08 22:27:56 -06:00
Fryguy
ec465616b4
[Feature] Rule: UseLiveBlockedMessage Bard Spam (#3933)
When using `UseLiveBlockedMessage` rule, bard will get massively spammed when doing aoe songs that are blocked. Not sure it is resonable to try and filter out all stacking messages from songs, but rather just block bards as a whole. I can not think of many cases where bards care of songs land or not when using this rule.
2024-01-08 22:26:10 -06:00
Fryguy
409b6bf424
[Bug Fix] IsOfClientBotMerc() for Discipline Messages (#3940) 2024-01-08 23:23:09 -05:00
Fryguy
e5db19965f
[Rule] Ensure mana taps only effect NPC's that have mana. (#3907)
* [Rule] Ensure mana taps only effect NPC's that have mana.

* Requested Changes

* fail at the beginning of a cast.

* Fixes
2024-01-08 06:23:54 -05:00
Fryguy
b2d5007466
[Bug Fix] TGB - Added logic to stop bard errors on group songs. (#3906)
* [Bug Fix] TGB - Added logic to stop bard errors on group songs.

Occasionally bards would get an error when singing songs with another group member targetted.

* Logic Fix

* Fixed missing brace
2024-01-08 01:27:45 -06:00
Fryguy
c36b3f030b
[Bug Fix] Disciplines should show when someone casts them. (#3901)
* [Bug] Discs should show when someone casts them.

* Correction to location

* requested changes

* Additional fixes
2024-01-07 22:17:30 -05:00
Fryguy
6db6d7dca9
[Bug Fix] Depop Charm Pet and Detach Debuffs on Evacuate (#3888)
* [Bug Fix] depop charm pet and detach debuffs on evac.

This will depop charm pets and deteach debuffs to prevent some social aggro issues and exploitable conditions with charming and pulling a mob across the zone with no aggro concerns.

* Added Rules
2024-01-07 16:44:15 -05:00
Fryguy
00eb462d47
[Bug Fix] Snare and DOT Stacking (#3897)
Dots won't overwrite regen but regen won't stack with dots.

Sow type spells won't stack if a snare effect is already in place.
2024-01-07 16:01:33 -05:00
Fryguy
48c6db3a9c
[Bug Fix] Buff Sync (#3896)
Align client and server on buff position (easiest fix to sync client/server)
2024-01-07 15:56:27 -05:00
Fryguy
9d5d13fbd0
[Rule] Casting Charm on over level = Aggro (#3886)
Casting charm on target with level above max level of spell will give resist message and aggro
2024-01-07 14:53:42 -05:00
Fryguy
d9cfc3a858
[Feature] Legacy Manaburn Rule (#3872)
* [Feature] Legacy Manaburn Rule

Enabling this rule allows the legacy style Manaburn and LifeBurn early 2003 and earlier.

* Requested Changes

* Requested Change
2024-01-07 12:34:43 -05:00
Fryguy
e52e4d5b3f
[Bug Fix] Bard Caster Level Fixes (#3883)
Bards do not gain benefits from spells like Intellectual Superiority
2024-01-07 12:13:44 -05:00
Fryguy
0c3149a6e5
[Bug Fix] Rez Effects Stacking (#3882)
Nothing conflicts with stacking with resurrection effects
2024-01-07 12:13:36 -05:00
Fryguy
c08200188f
[Bug Fix] Harm Touch Unholy Disc Type (#3874)
* [Bug Fix] Harm Touch Unholy Disc Type

Added an small if block in the ResistSpell() function to set the correct resist type, disease,when HT is casted while the Unholy Disc is up.

* Remove Extra Space
2024-01-07 12:12:21 -05:00
Fryguy
41d9a15c74
[Bug Fix] Vampiric Embrace Fixes (#3873)
* [Bug Fix] Vampiric Embrace Fixes

Fixed the difference of procs for Vampiric Embrace between Necros and Shadow Knights.

* Space

* Cleanup

* Update spdat.h

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
2024-01-07 12:12:15 -05:00
Fryguy
6ec09f300a
[Bug Fix] Dire Charm Reset (#3875)
* [Bug Fix] Dire Charm Reset

Added Druid and Necro Dire Charm to Failure Check

* [Rule] RequireMnemonicRetention for Spells 9-12 Rule

Rule is default false to maintain current server setup.

Enabling will require clients to have the required ranks of Mnemonic Retention in order to cast.

This is a stopgap as on live, the buttons are not even available to use. This will mimic the functionality but denying the cast.

* Revert "[Rule] RequireMnemonicRetention for Spells 9-12 Rule"

This reverts commit c65e86223da7fbd961ff1f54f059ccb4e20b5290.
2024-01-07 04:47:09 -05:00
Fryguy
079f612730
[Feature] Legacy Fizzle Code (#3868)
* [Feature] Legacy Fizzle Code
Enabling UseLegacyFizzleCode will enable the legacy fizzle code system.

New fizzle codes modeled on extensive testing in 2001/2002 (thank you druid's grove and graffe)

* requested adjustments

* Requested Changes
2024-01-07 04:46:27 -05:00
Fryguy
2c971fb2de
[Rules] Resist Softcap rules (#3863)
* [Rules] Resist Softcap rules

This rule will allow you to adjust the Resist softcap to help tune resists as you need.

* Fix naming

* Cleanup
2024-01-07 04:46:14 -05:00
Alex King
a724e92638
[Character] Convert Clear/Delete/Get/Update of Character Item Recast to Repositories (#3857)
* [Character] Convert Clear/Delete/Get/Update of Character Item Recast to Repositories

- Convert `ClearOldRecastTimestamps`, `DeleteItemRecast`, `GetItemRecastTimeStamp`, `GetItemRecastTimestamps`, and `UpdateItemRecast` to repositories.

* Update shareddb.cpp

* Update shareddb.cpp

* Update zonedb.cpp
2024-01-07 00:21:14 -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
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