603 Commits

Author SHA1 Message Date
Paul Coene
99612ba7b3
[Bug Fix] All NPC classes could stun with kick/only warriors could be stunned (#4273)
* [Bug Fix] All NPC classes could stun with kick/only warriors could be stunned.

* Fix default NPCKickStun value to match existing code

* Remove else and make NPC the default.

* assign stun_level in declaration.
2024-04-24 17:20:58 -04:00
Xackery
d7d99152ac
[Feature] Fix ignore_default on lua mod damage (#4228)
* Fix ignore_default on lua mod damage

* Add missing init calls
2024-04-15 05:39:29 -05:00
Paul Coene
41c5369c18
[Pets] Fix errors in sync with client of sit/stand (#4245)
* [Pets] Fix errors in sync with client of sit/stand

* Forgot bot.h
2024-04-15 04:59:36 -05:00
Paul Coene
a5e8a4c2cd
[Messages] Fix bug where DoT messages stop coming out when mob dies. (#4249) 2024-04-15 04:57:55 -05:00
Alex King
9a09d820a5
[Quest API] Add GetConsiderColor() to Perl/Lua (#4253) 2024-04-15 04:53:48 -05:00
Paul Coene
b1d873d1fc
[Bug Fix] Using %T in channel messages on fresh corpse yields mob, not corpse name. (#4168)
* [Bug Fix] Using %T in channel messages on fresh corpse yields mob/player name, not corpse name.

* Undo changes to PC corpse.

* Use rename to fix %T usage on client for those in zone

* Fix indentation spacing

* Update to consolidate Rename as suggested.

* Fix for mobs with ` in name

* Fix to use GetName() instead of GetCleanName()
2024-04-05 09:29:48 -04:00
Xackery
b638795f9b
[Feature] Add LuaMod functions for CommonDamage and HealDamage (#4227)
* Add LuaMod functions for CommonDamage and HealDamage

* Remove extra bracket
2024-03-31 11:30:16 -04: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
Alex King
66cc947b2a
[Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua (#4179)
* [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
2024-03-22 23:53:35 -05:00
Alex King
ee12a7ad2e
[Bug Fix] Fix EVENT_KILLED_MERIT firing before NPC removal (#4185)
* [Bug Fix] Fix EVENT_KILLED_MERIT firing before NPC removal

# Notes
- NPCs were parsing this event too early and anything that checked if they were still alive in `EVENT_KILLED_MERIT` would show them still alive because of this.

# Image

* Code cleanup

* Update client.h

* Add GetRaidOrGroupOrSelf() to Perl/Lua

* Update to luabind::object, fix logic per comments.

* Fix

* Fix per comments.
2024-03-17 17:32:44 -04:00
catapultam-habeo
8c226054e7
[Feature] Adds rules to control level requirements for Double Backstab, Assassinate, and Double Bowshot (#29) (#4159)
Co-authored-by: mute <natanx@gmail.com>
2024-03-04 18:41:25 -05:00
Alex King
70ee95efc0
[Quest API] Add Bot Special Attacks for Immune Aggro/Damage (#4108)
* [Quest API] Add Bot Special Attacks for Immune Aggro/Damage

# Notes
- Adds `IMMUNE_AGGRO_BOT` and `IMMUNE_DAMAGE_BOT` for uses in special abilities.

* Cleanup

* Update attack.cpp
2024-03-02 15:19:31 -06:00
nytmyr
103a37e762
[Crash Fix] D20 crash if mitigation average resulted in 0 (#4131) 2024-02-28 20:35:56 -05:00
Alex King
a244509d63
[Quest API] Export Combat Record to Death Events (#4112)
# Perl
- Add `$combat_start_time`, `$combat_end_time`, `$damage_received`, and `$healing_received` to death events for NPCs.

# Lua
- Add `e.combat_start_time`, `e.combat_end_time`, `e.damage_received`, and `e.healing_received` to death events for NPCs.

# Notes
- Allows operators to hook in to the combat record logic so they can log the start and end of combat as well as the damage/healing received over the course of the fight.
2024-02-24 22:57:49 -06:00
Alex King
873c128f46
[Bug Fix] Fix Bot Weapons with No Races (#4110)
# Notes
- Bot weapons that have no races were not causing damage and saying the target was invulnerable because we were not checking the `Bots:AllowBotEquipAnyRaceGear` rule.
2024-02-24 22:55:40 -06:00
JJ
a99ce4fbdb
[Bug Fix] Revert 2df7d19 (#4101)
* [Bug Fix] Revert 2df7d19f97
This change breaks lich-type spells as seen in #4098. Per comment on original change, also don't see where Runes come into play.

* Revert invis change

* [Bug Fix] Correct Rune damage check location for invis break.

Correct the location of the CommonBreakInvis for runes. Appologize for the incorrect location. Thank you JJ for pointing me to the PR that caused the issue.

---------

Co-authored-by: Trust <fryguy503@gmail.com>
2024-02-19 22:35:32 -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
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
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
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
Paul Coene
5377bb3f49
[Bug Fix] Patch for recent change to DEATH (#4032) 2024-01-30 17:10:45 -05: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
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
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
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
fc627ed52d
[NPCs] Convert Load of NPC Emotes to Repositories (#3954)
* [NPCs] Convert Load of NPC Emotes to Repositories

- Convert `LoadNPCEmotes()` to repositories.

* Cleanup
2024-01-12 23:33:11 -06:00
Fryguy
d0e069f4f8
[Bug Fix] Rampage Number of Hits Limit (#3929)
* [Bug Fix] Rampage Number of Hits Limit

Rampage should Hit 1-2 times (Primary / Secondary) should not be Triple/Quadable

* requested name convention changes
2024-01-09 05:48:45 -05:00
Fryguy
66d9371714
[Bug Fix] Increase Precision in CheckDoubleAttack (#3928)
* [Bug Fix] Increase percision on CheckDoubleAttack.

On DA Checks where class was a non skill based DA Attacker (Bard or BST with granted DA) The DA check was too steep and should not have been dividing by 500 but rather 100. Also adjusted logic percision to use floats so loss of data does not occur.

* logging var names update

* Update attack.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
2024-01-08 22:34:41 -06:00
Fryguy
0418dc4aa3
[Bug Fix] Attack Corpse Skill Up Fix (#3924)
* [Bug] Attack Corpse Skillup Fix

Occasions where a corpse will allow skillups from attacks being turned on (even if no damage)

* requested changes
2024-01-08 22:32:18 -06:00
Fryguy
f12c87a04a
[Feat] Alt Sinister Strike Formula (#3921)
I have been informed that this was proven to be false, but the AA is pretty useless without some adjustment.

Adding this as a rule to allow server owners to adjust as needed.

Update Sinister Strikes
tapatalk.com/groups/monklybusiness43508/leksikon-s-half-assed-guide-to-monkly-aas-oow-incl-t510-s20.html?sid=a9c7745f287f3e89301c960c20f33248

Sinister Strikes:
19 Delay weapon -- Gives a 5 damage bonus to all hits
20 Delay weapon -- Gives a 6 damage bonus to all hits
24 Delay weapon -- Gives a 7 damage bonus to all hits
Given Quarm hammer with maxed non-GoD AAs:
0.7 HPS offhand = 4.9 DPS increase.
2024-01-08 22:31:04 -06:00
Fryguy
97dbf85a4c
[Bug Fix] Limit MeleeMitigationEffect to defender if only client. (#3918)
* [Bug] Limit MeleeMitigationEffect to defender if only client.

* Fix MeleeMitigation to properly Add (Substract due to negative values).

* defender fix
2024-01-08 22:30:29 -06:00
Fryguy
700f4645e2
[Rule] Stun Chance Percent Rule (#3922)
Added a rule for server operators to tune the Stun Chance from players when mobs are behind.

DEFAULT: 12
2024-01-08 02:40:01 -06:00
Fryguy
b30fbc70a3
[Bug] NPCs will now only proc on hit (#3913) 2024-01-08 01:47:55 -06:00
Fryguy
2b821e50ff
[Rule] Classic Triple Attack (#3903)
* [Rule] Classic Triple Attack

Classic Triple attack pre-dates skill based triple attack.

Originally it was only for a few classes but was expanded to Warrior, Monks, Berserkers and finally rangers for Dragons of Norrath. After which it was converted to a skill based feature.

These were innate starting level 60 and had a flat % to trigger.

* Requested Changes
2024-01-07 22:06:13 -05:00
Fryguy
2df7d19f97
[Bug Fix] Rune Invis Break (#3893)
Rune doesn't stop invis breaking
2024-01-07 15:57:09 -05:00
Fryguy
84b8bdd2b4
[Bug Fix] Clear Ramp when Clearing hate (#3892)
* [Bug Fix] Clear Ramp when Clearing hate

When clearing a client from the hatelist, also clear them from ramp

* Add additional calls missed

* requested changes

* extra tabs
2024-01-07 15:27:12 -05:00
Fryguy
b83373491e
[Rules] PC Push and NPCtoNPC Push (#3879)
* [Rules] PC Push and NPCtoNPC Push

Added knobs to increase/decrease push for players/clients by percentage.

Added toggle to enable or disable (disabled by default) NPCtoNPC push (2013 patch)

* Requested Changes

* Fix build errors
2024-01-07 12:13:17 -05:00
Fryguy
8fa6a0b496
[Rules] Restrict Finishing Blow to only Fleeing NPC's. (#3869)
* [Rules] Restrict Finishing Blow to only Fleeing NPC's.

Default is false to maintain current design

* Cleanup
2024-01-07 01:11:49 -06:00
Fryguy
70a4b6a2b1
[Bug Fix] DI/Death Pact Fix (#3867)
* [Bug Fix] DI/Death Pact Fix

Divine Intervention/Death Pact buffs were always fading the moment a person dropped below 16% regardless if it healed or not.  It will now only fade if it succeeds in healing, and it will only check to heal when a person drops below 16%

* Requested Updates
2024-01-07 01:05:16 -06:00
Alex King
259add68f5
[Commands] Cleanup #appearance Command (#3827)
* [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
2024-01-06 22:24:32 -06:00
Alex King
b93dec357f
[Quest API] Fix issue with death events. (#3823)
# Notes
- Death events were happening too early so stuff checking for dead NPCs was non-functional.
2023-12-31 17:37:26 -05: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
regneq
25872203ff
[NPC] Support for multiple emotes per type, emote variables (#3801)
* [forage rule feature] add a rule to disabled using common_food_ids from the list in forage.cpp.  currently set to enabled.

* NPC database emotes now supports basic variables. More than one variable can be used at a time.

* Format manifest

* Formatting

* Formatting

* Formatting

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-12-24 23:28:57 -06:00
Chris Miles
4fa9e1d66f
[Code Cleanup] Race constants refactor (#3782)
* [Code Cleanup] Race constants refactor

* Update races.h
2023-12-22 21:34:55 -06:00
Alex King
b19ad64800
[Bug Fix] Send Entity ID in Death Events to resolve #3721 (#3779)
* [Bug Fix] Send Entity ID in Death Events to resolve #3721

# Notes
- Due to some pointers becoming invalid you may get an invalid entity ID on the killed mob if we don't just directly send the entity ID in the export string.

* Update attack.cpp

* Remove GetID() export.
2023-12-17 19:43:41 -06:00
Alex King
aeeb350068
[Cleanup] Cleanup classes.cpp/classes.h (#3752)
* [Cleanup] Cleanup classes.cpp/classes.h

# Notes
- Remove unused methods and cleanup logic.

* Update classes.cpp

* Final push.
2023-12-13 18:38:45 -05:00
Fryguy
62711b13d8
Revert "[Bug Fix] Fix Killed XYZH support in EVENT_DEATH in Perl. (#3591)" (#3682)
This reverts commit 9b992167f00fabda47ed4740eb28a1351ea6caf5.
2023-11-06 17:30:55 -06:00
Chris Miles
adc64005f1
[Rules] Add rule to configure max number of procs per round Combat:MaxProcs (#3640) 2023-10-20 14:57:50 -04:00
Alex King
605480f1c4
[Bug Fix] Fix Finishing Blow Proc Chance (#3639)
# Notes
- We were double adding `spellbonuses` and not adding `itembonuses` per https://github.com/EQEmu/Server/issues/3636.
2023-10-19 16:19:43 -04:00