# 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>
# 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
* [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
* [Bug Fix] Rampage Number of Hits Limit
Rampage should Hit 1-2 times (Primary / Secondary) should not be Triple/Quadable
* requested name convention changes
* [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>
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.
* [Bug] Limit MeleeMitigationEffect to defender if only client.
* Fix MeleeMitigation to properly Add (Substract due to negative values).
* defender fix
* [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
* [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
* [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
* [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
* [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
* [Cleanup] Gender constants cleanup
# Notes
- Convert to a `Gender` namespace using `constexpr`.
- Cleanup spots where we were using magic numbers for gender values.
* Cleanup
* [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>
* [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.
# Notes
- Allows operators to modify the level gap penalty and level gap required for the penalty for defensive procs' level gap penalty.
- Setting `Spells:DefensiveProcPenaltyLevelGap` to `-1` will disable the penalty.
* [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