fix level up while dead -> check if player is not dead, then update health/mana/rage/..
Co-authored-by: gontrannopier <gontrannopier@gontrannopier.com>
* implement world state script
based on
0b87ca9d9e
Co-authored-by: killerwife <killerwife@gmail.com>
* refactor to use onleave and onenter instead of spell_area
allows players to right click remove adal's buff
* add MapMgr.h
* refactor: use condition enum instead of uint32, prefix WORLD_STATE where needed
* remove lock from WorldState::Update
sWorldState->Update() is only called from World::Update
* remove unsafe SmartAI action of setWorldState
---------
Co-authored-by: killerwife <killerwife@gmail.com>
* new BattlegroundDesertionTypes for hook OnBattlegroundDesertion
* chore: minor improvements
---------
Co-authored-by: laasker <79991768+laasker@users.noreply.github.com>
* move several enum definitions in a new files
* move more things
* remove the include comment
* move the related code to CharmInfo in this own file
*original idea of Ovahlord
Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
* fix clang build errors and few blank lines
* missing forward declaration
* new tentative to fix gcc/clang build
* add several include could be necessary for gcc/clang compilation
* .
* revert some include since the last AC update
* fix some loop inconsistencies
* align all enums in UnitDefine.h
---------
Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
* chore(Core/DBC): define unused unknown dbc fields
* Name unused unknown dbc fields using WDBX and wowdev.wiki
* rename SpellShapeshiftEntry to SpellShapeshiftFormEntry to properly match the DBC used
* rename sSpellShapeshiftStore to sSpellShapeshiftFormStore to properly match the DBC used
* Comment out unused field for GlyphPropertiesEntry
* Comment out unused field for MapEntry
* forgot one
* SpellShapeshiftfmt to SpellShapeshiftFormfmt
* SpellShapeshiftFormEntryfmt
* feat(Core/Optimization): Optimize build of units update object by leveraging cache.
* Remove whitespaces.
* Add alternative hooks to handle transmog and other similar things.
* Fix build on some compilers.
* Fix codestyle
* Fix build again.
* Take into account updateType.
* fix(Core/Spells): Fix sobering spells and possible uint8 overflow/underflow in SPELL_EFFECT_INEBRIATE handler.
* fix(Core/Spells): Improvements for SPELL_AURA_MOD_FAKE_INEBRIATE handling
* Class Comparison Logic Encapsulation - Parity
* Add Context to IsClass
* Add Unit IsClass script hook
* Replace additional getClass with IsClass
* Update CanUseItem to replace getClass with IsClass
* Add separate context for pet vs ability
* Change Create to Init since not all referenced contexts are creation
* Align spacing in ClassContext
* Drop context on LFGManager max power
* Update IsClass context that wraps around Missle Barrage
* Rename context for swapping weapons
* Be more specific than CLASS_CONTEXT_TALENT
* Remove duplicate context
* Moved IsClass Hook to Player
* Removed unused parameter in virtual base function
* Added maybe_unused to IsClass virtual in order to compile
To match the override signature, the virtual base needs to include the parameter in question, so using [maybe_unused] to signal to the compiler to allow it
* Remove extra blank line
* Add ABILITY_REACTIVE context
* Add context for PET_CHARM
* Remove explicit nullopt check per review
* Code Readability - Change if to if else in pet
Due to the return pattern, this doesn't change functionality in any way
* Add OnPlayer to disambiguate
---------
Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
* Bug fixes
- Corrected std::chrono from seconds to milliseconds
- Got rid of leftover code that caused objects to not show up on time
* Removed logic to set gameobject as active
- More alignement with TC.
- Reduces CPU usage drastically
* Revert back to using time_t instead of std chrono
* Invoke SetNoCreate() method to reduce CPU usage drastically
* Remove setActive from static and motion transports
* Fix performance issues
* Added SetFarVisible to WG and some dungeon scripts
- Also removed setActive(true) from creatures in Wintergrasp. As for gameobjects they are set to active upon being damaged/destroyed and removed from active on rebuild (reset)
* Removed comments related to VISIBILITY_COMPENSATION
* Fix log
* Deleted unused files + corrected a check
* Added missing header
* Removed unused parameter
* Removed another unsued parameter
* Changed vector to set for i_visibleNow
- Changed vector to set for i_visibleNow in VisibleNotifer
- Adjusted HaveAtClient to accept Object*
- Adjusted SendUpdateToPlayer to send createobject packet only if not known to client