Commit Graph
292 Commits
Author SHA1 Message Date
Ovahlord 5d22ddd499 Core/Misc: rename Powers to PowerType 2026-06-09 08:19:48 +02:00
Ovahlord 266d1d7717 Core/Creatures: temporarily revert all summon changes in order to keep the master branch functional until the implementation is done 2026-02-28 11:06:35 +01:00
Ovahlord ec1ab2a5e7 Core/Creatures: move level and faction initialization into SummonInfo API 2025-08-17 15:12:10 +02:00
Ovahlord 5848eedb24 Core/Creature: implement initial SummonInfo API for handling summons in the future 2025-08-09 15:01:55 +02:00
Ovahlord 4b7d68830a Core/Misc: converted more macros to constexpr 2025-06-21 14:15:58 +02:00
Ovahlord 4539f848ac Core/Units: ported base attack time refactors from master branch 2025-06-19 23:18:17 +02:00
Ovahlord bb6a8ac297 Core/Units: moved CharmInfo class to an own file 2025-06-14 19:13:44 +02:00
Ovahlord 4f08f34e26 Core/Misc: converted more raw pointers to smart pointers 2025-06-14 12:55:35 +02:00
Shauren b5ec59a07e Core/Units: Power handling improvements 2023-12-18 10:02:19 +01: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
Shauren a7dc339a6a SHA-1: 8d16a79dea4c0100d36e13b068c42499a3a48154
* Core/Spells: Rename SpellAttr4 to use official attribute names

* Corrected implementation of SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET
* Implemented SPELL_ATTR4_NO_HELPFUL_THREAT
* Implemented SPELL_ATTR4_NO_PARTIAL_IMMUNITY
* Implemented SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING
* Implemented SPELL_ATTR4_USE_FACING_FROM_SPELL
* Implemented SPELL_ATTR4_BOUNCY_CHAIN_MISSILES
* Implemented SPELL_ATTR4_AURA_NEVER_BOUNCES
* Implemented SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL
* Implemented SPELL_ATTR4_AURA_IS_BUFF
* Implemented SPELL_ATTR5_MELEE_CHAIN_TARGETING

* Implemented SpellEffectAttributes::ChainFromInitialTarget
2022-09-30 01:16:39 +02:00
ariel- 3fbbea61bd Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
# Conflicts:
#	src/server/game/Spells/Auras/SpellAuras.h
2022-09-12 09:15:13 +02:00
ariel- a804af7219 Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct
2022-09-12 09:15:04 +02:00
ariel- 1d3fbff332 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling
2022-09-12 09:15:04 +02:00
Ovahlord 6e9ec1a4bf Core/Transports: undo all custom transport changes as preparation for cherry picks 2022-06-18 18:37:14 +02:00
ariel- af98e8516c Core/Auras: reworked multiplicative AuraEffects calculation 2021-11-28 12:14:05 +01:00
Ovahlord 83298b52a2 Core/Spells: ported SpellInterruptFlags updates from master branch and corrected some own implementations based on these new results 2021-03-25 15:53:26 +01:00
Ovahlord 754c138f89 Core/Spells: ported CastSpell unclusterfucking from 3.3.5 branch 2020-11-04 22:37:11 +01:00
Ovahlord 75a0e1c011 Core/Spells: updated Bloodworm's Blood Gorged behaivior to Cataclysm 2020-08-24 18:32:31 +02:00
Treeston d9e6e82c7d Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.

# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Pet/Pet.cpp
#	src/server/game/Entities/Unit/UnitDefines.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Spell.cpp
2020-07-22 17:32:51 +02:00
Treeston 942c3a77da Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2020-07-22 16:49:37 +02:00
Ovahlord e1d74d4dc6 Core/Misc: added more fallthrough attributes and added some missing breaks reported by CI 2020-07-19 12:24:58 +02:00
Ovah b09d6e2330 Core/Movement: reimplement follow movement (#124) 2020-06-26 21:22:21 +02:00
Ovahlord ca76ddf4b5 Core/Pets: fixed typos in pet scale mod calculation 2020-04-28 20:20:19 +02:00
Ovahlord 9c2c994958 Removed whitespace 2020-04-28 19:43:46 +02:00
Ovahlord f09564b9d0 Core/Pets: use TamedPetBaseScale field in CreatureModelData to determine additional pet scale values and updated scale calculation based on client function
Thanks @warpten for providing the data
2020-04-28 19:43:03 +02:00
Ovahlord a5b305ec9d Core/Pets: fixed build 2020-04-28 18:16:36 +02:00
Shauren 48695b7c9d Core/Auras: Prevent getting negative scale with auras
Closes #24040

# Conflicts:
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/Pet/Pet.cpp
2020-04-28 18:10:14 +02:00
Ovahlord e7ba484fcf Core/Units: reworked creature power regeneration handling
* players and creatures now share the same power regeneration regeneration function
* UpdatePowerRegeneration is now virtual and handles creature and player specific formulas individually
* handle update field flag UF_FLAG_UNIT_ALL to handle UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER and UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER for creatures as well
2020-04-27 14:20:33 +02:00
Ovahlord b653f2f819 Core/Units: ported power type updates from master branch 2020-04-22 03:13:02 +02:00
Ovahlord d30c811d9e Core/Creatures: reworked tempoary summon creation
* all stats and values will now be set before summons are getting added to map
* cleaned up summon spell effect handler to reduce duplicade code
* summoner guids will no longer be set for every minion and correctly handle assigning creator guids instead. These values will serve as fallback guid if there is no summoner guid
* friendly tempsummons will now inherit the guild data of their player and pass them on to further allied summons. This fixes guild specific visuals for creatures such as Guild Battle Standards and Guild Heralds.

Todo: check for regressions
2020-04-22 00:20:18 +02:00
Ovahlord c537a2658a Core/Units: reworked power regeneration for players
* use a reversed client function to get the power regeneration rate for all types of powers
* unified all player based regeneration updates into a single statsystem helper
* cleaned up unnecessary regeneration timers
* implement power regeneration for alternative powers
* corrected rage gain numbers based on simulationcraft formulas
2020-04-19 22:53:29 +02:00
Ovahlord 0ea2200879 Core/Pets: use default pet follow angle when loading pets from database 2020-04-19 15:08:21 +02:00
Shauren 47acc59f49 Core/DBLayer: Prevent committing transactions started on a different database 2020-04-15 21:02:26 +02:00
Shauren d003ebd8e4 Core/DBLayer: Prevent using prepared statements on wrong database 2020-04-15 19:18:58 +02:00
Ovahlord f1f00c3ec3 Core/Datastores: refactor DBC storage helpers to use a class and fixed no pch build 2020-03-18 15:24:25 +01:00
Ovahlord fcb79fee07 Core/Datastores: updated DBC structure names to generated member format 2020-01-25 12:36:32 +01:00
jackpoz 131986d1c2 Core/Misc: Replace time(nullptr) with GameTime::GetGameTime() 2020-01-11 03:30:41 +01:00
Aokromes d6d3f06f06 New year 2020-01-04 18:32:38 +01:00
funjoker 6c56916b29 Misc: Update copyright information
Happy new year
2020-01-01 18:47:28 +01:00
Ovahlord 6a5b23862d Core/Pets: cleaned up energy regeneration case for Death Knight ghouls and fixed an issue in focus regeneration that could lead to slower focus regeneration with high diffs 2019-12-09 21:21:03 +01:00
Ovahlord 3f4642d8b8 Core/Pets: corrected pet focus regeneration behaivior
* according to sniffs, focus is getting updated every second instead of every 4 seconds
* corrected pet focus regeneration from 6 focus per second down to 5 per second
2019-12-09 20:47:15 +01:00
Ovahlord 15f09fb82b Core/Misc: fixed warnings and building connection patcher with boost versions below 1.61 2019-11-06 00:51:04 +01:00
Ovahlord c074c3a9c6 Revert "Core/Misc: Replace time(NULL) with GameTime::GetGameTime()"
This reverts commit 5fe3a1f7f9.
2019-07-08 15:56:29 +02:00
Ovahlord 5fe3a1f7f9 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(ported commit: 12701cb0c6c45eb105ad449eb9a56e76d84d691e)
2019-07-08 12:19:19 +02:00
Ovahlord 108dea25a0 Core/Pets: summoned Death Knight ghouls will now cast their initial spells to make them stay on their place before starting to do things 2019-02-11 02:45:47 +01:00
Ovahlord f73630dd0e Core/Pets:
* corrected level 85 stats for Death Knight's Risen Ghoul
* removed an old leftover that was causing Blood Worms to have way too much health
* enabled and use Avoidance for Death Knight Ghouls used in Raise Dead and Army of the Dead
2019-02-10 18:43:54 +01:00
Ovahlord 815fa24e97 Core/Pets: fixed a compile warning 2019-01-26 19:45:10 +01:00
Ovahlord 49ba9704ff Core/Spells: fixed Holy Guardian of Ancient Kings not healing at all 2019-01-19 14:32:45 +01:00
Ovahlord 50ef4df56f Core/Pets: use a better way to handle Paladin Guardians classification 2019-01-19 07:50:55 +01:00