Commit Graph
2306 Commits
Author SHA1 Message Date
Ovahlord ba10718ea7 Core/Units: removed a debug logging message that sneaked in 2023-12-11 21:02:39 +01:00
Ovahlord 5b5914beda Core/Units: no longer set PowerUpdate packets when gaining rage from damage taken 2023-12-11 20:48:45 +01:00
Ovahlord 8613a5623c Core/Units: use the weapon's/druid's base attack speed to calculate melee rage amounts instead of plain attack swing timers
The normalized rage calculation uses base speeds, which are the weapon's attack base attack speed and the druid's shapeshift base attack speed. The old implementation used plain swing timers which are affected by haste and thus resulting in negating any rage gains from faster attacks
2023-12-11 19:55:54 +01:00
Ovahlord 96e9b6189f Core/Units: fixed a typo which was causing armor mitigation to be bypassed 2023-12-10 18:45:59 +01:00
Ovahlord 0f035fe940 Core/Units: refactor rage generation to reflect patch 4.0.1 changes:
* melee attacks will now send their awarded rage within SMSG_ATTACKER_STATE_UPDATE and moved the rage reward mechnic from Unit::DealDamage into Unit::AttackerStateUpdate

* killed CleanDamage struct and provide plain unmitigated damage values instead as since patch 4.0.1 the rage gained from damage taken is fully normalized and ignores any kind of damage reduction or negation
2023-12-10 18:26:24 +01:00
Ovahlord 4f309c127a Core/Units: round rage gain values up so taking at least one point of damage will ensure you gain a rage point 2023-12-10 17:09:55 +01:00
Ovahlord 6cb2bd953d Core/Units: fixed a rounding issue that caused very low damage unintentionally being reduced to zero
*also feed the AttackerStateUpdate  SubDamage with the correct values
2023-12-10 16:58:21 +01:00
Ovahlord 8c3d501524 Core/Units: generating rage from damage taken will now use the full unmitigated damage amount instead of the final instead 2023-12-10 04:37:44 +01:00
Shauren 7d57ef7299 Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway
* Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
2023-10-31 22:00:52 +01:00
Shauren 388c504047 Core/Spells: Named and implemented most of SpellAttr8 2023-10-23 18:07:05 +02:00
Meji 56077b35c3 Core/Creatures: Improved movement interruption while casting spells 2023-10-21 20:41:40 +02:00
Shauren 3c0cf32b43 Core/Spells: Named and implemented most of SpellAttr7 2023-10-21 20:32:32 +02:00
Shauren 77c017555b Core/Auras: Registering a new owned aura will now search existing owned auras instead of applied auras to check for unstackable one 2023-10-18 21:43:46 +02:00
Ovahlord ff0eb86c54 Core/Achievements: ported start event and fail event mechanics from master branch 2023-10-11 01:38:01 +02:00
Ovahlord faa78b9e07 Core/Units: moved spell cast request includes out of unit class and use unique_ptr instead of optionals 2023-10-09 22:07:13 +02:00
Jeremy f8aa09f253 Core/Areas: Update AreaFlags from EnumeratedStings values 2023-10-09 20:41:30 +02:00
funjoker df32b341a5 DB/Creatures: Port master model system
Fixes incorrect displayid for creatures, due to probability
2023-09-15 23:52:51 +02:00
Ovahlord 5f2dbdd63c Core/Creatures: implement CREATURE_STATIC_FLAG_4_CANNOT_DAZE 2023-08-27 19:39:11 +02:00
Ovahlord aa459e53af Core/Creatures: apply CREATURE_STATIC_FLAG_5_240_DEGREE_BACK_ARC for parries and blocks as well 2023-08-27 19:14:56 +02:00
Shauren 7acc26f09f Core/Creatures: Implemented unkillable flag (prevent health from going below 1) 2023-08-27 17:44:24 +02:00
Ovahlord 577bdd5ff4 Core/Creatures: implement CREATURE_STATIC_FLAG_NO_LOOT 2023-08-27 17:41:50 +02:00
Ovahlord ff575bcef0 Core/Creatures: ported all existing static flag implementations from master branch 2023-08-27 17:16:18 +02:00
Shauren 1df15cf79e Core/Spells: Damage and healing bonus calculation fixes
* Spells with SPELL_DAMAGE_CLASS_NONE are now allowed to benefit from spellmods
2023-08-19 18:02:57 +02:00
Ovahlord 770f9e11db Core/Movement: sync spline code with master branch 2023-08-19 15:04:34 +02:00
Shauren 9480f79c2a Core/Scripts: Added damage and healing calculation hook to spell and aura scripts allowing to override base damage amount, flat value mod and percent value mod separately 2023-08-03 21:32:20 +02:00
Shauren 4b7aefb05b Core/Units: Fixed crash (previously was a memory leak) when vehicle creatures are deleted without ever being added to world
Closes #29166
2023-07-21 01:05:41 +02:00
Traesh ee8e20d81f Core/Units: Allow autoattack if channelling with SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL 2023-07-16 15:30:34 +02:00
Ovahlord 833b77c05e Core/Units: removed a deprecated pointer initialization for m_vehicleKit 2023-07-09 11:51:35 +02:00
Ovahlord 5f808b5247 Core/Entities: modernized several pointers and arrays in Player, Unit and Creature classes 2023-07-08 17:55:25 +02:00
Ovahlord d6801c5dc4 Core/Misc: fixed more deprecation warnings 2023-07-07 23:52:15 +02:00
Ovahlord d924871a2a Core/Misc: fixed a bunch of deprecation warnings 2023-07-07 22:14:22 +02:00
Shauren 07376de9fc Core/Spells: Always remove spell target from transport on teleport spells if spell destination does not target a position on the transport 2023-06-29 20:31:45 +02:00
Ovahlord 06d79464d3 Core/Spells: fixed rank 2 of Improved Searing pain having no effect
*the rank 2 spell does not have a 2nd spell effect containing the health threshold and since no glyph or talent is affecting this mechanic, we just use use the plain value instead of doing calculation shenanigans
2023-06-12 15:47:29 +02:00
Ovahlord 40ec92758c Core/Packets: converted SMSG_EMOTE to packet class 2023-06-05 13:24:02 +02:00
Ovahlord 8821936ec6 Core/Spells: spell crit supression will no longer increase the crit chance against lower level targets 2023-02-06 10:03:46 +01:00
Ovahlord e471f0b7da Core/Spells: fixed a typo in ed53552995 2023-01-23 10:11:20 +01:00
Ovahlord 836e7dae18 Core/Spells: removed deprecated code for Glyph of Regrowth 2023-01-23 10:10:28 +01:00
Ovahlord ed53552995 Core/Spells: Nourish will no longer get its bonus for active HoTs applied twice and optimized involved code 2023-01-23 10:08:52 +01:00
Shauren 674bba1cae Core/Auras: Fully remove auras that had all of their effect suppressed with immunity 2023-01-19 19:48:46 +01:00
Shauren f97d336d82 Core/Auras: Fixed possible iterator invalidation crashes caused by calling UpdateTargetMap inside loops iterating m_appliedAuras 2023-01-19 17:30:41 +01:00
Gosha cb18f8970c Core/Units: Removed duplicate call to WorldObject::UpdatePositionData (#28731) 2023-01-16 22:16:00 +01:00
Shauren 265c2fa508 Core/Battlefields: Refactor Battlefield creation to be linked to host map creation instead of having globally accessible objects 2022-12-26 13:24:59 +01:00
Ovahlord 9455b09518 Core/Packets: converted SMSG_PET_ACTION_SOUND to packet class and renamed its related method to Unit::SendPetActionSound 2022-12-11 20:12:35 +01:00
Ovahlord 92c9661804 Core/Packets: converted SMSG_PET_ACTION_FEEDBACK to packet class and added spellId argument to Unit::SendPetActionFeedback 2022-12-11 20:03:57 +01:00
Ovahlord dd43ca3e6a Core/Units: ensure that we use valid iterators when providing spell Ids in Unit::RemoveAppliedAuras and Unit::RemoveOwnedAuras 2022-11-23 21:01:09 +01:00
Ovahlord 181d1e2485 buildfix 2022-10-17 00:43:54 +02:00
Ovahlord 4b8bea57d8 Core/Units: ensure that we always have a valid caster when a charmed unit allows its charmer to cast spells directly 2022-10-16 17:58:58 +02:00
Ovahlord 6fa4c22daf Core/Misc: fixed more crashes related to the caster dependency removal 2022-10-09 10:45:10 +02:00
Shauren cf2bf7f77f Core/Spells: Corrected implementation of SPELL_ATTR1_ALLOW_WHILE_STEALTHED and SPELL_ATTR2_ALLOW_WHILE_INVISIBLE to use DispelType instead of checking effect types 2022-10-04 12:36:58 +02:00
Ovahlord 7d67f10f77 Core/Spells: added a missing check in Unit::IsMovementPreventedByCasting 2022-10-03 12:22:39 +02:00