Ovahlord
9340f8d9df
Core/Units: add new functionality for units to block or enable combat entirely via helper to reflect what CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT and client ai functions imply
2020-07-29 15:46:09 +02:00
Ovahlord
9a18121318
Core/Spells: SPELL_ATTR3_NO_DONE_BONUS will now also prevent bonus values for heal spell effects
2020-07-27 01:43:21 +02:00
Ovahlord
a31111ebbb
Core/Spells: allow Rune Strike to be permanently used while in Blood Presence
2020-07-23 22:52:55 +02:00
Ovahlord
aec1d1a2fa
Misc: fixed build
2020-07-23 17:00:54 +02:00
Ovahlord
e677461c5d
Core/Combat: more cleanups and converted threat packets back to packet class
2020-07-23 13:33:46 +02:00
Kelno and Giacomo Pozzoni
507868a9e1
Fixed PvP Combat timer never getting refreshed ( #24058 )
...
* Fixed PvP Combat timer never gets refreshed while meleeing
* Apply Treeston feedback
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com >
2020-07-22 19:24:19 +02:00
Treeston
1d02149384
Core/Combat: Properly unset engagement flag on death.
...
# Conflicts:
# src/server/game/AI/CoreAI/GuardAI.cpp
# src/server/game/Entities/Creature/Creature.cpp
2020-07-22 19:16:35 +02:00
Treeston
db3282e65a
Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490 .
...
# Conflicts:
# src/server/game/AI/CreatureAI.cpp
# src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
# src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
# src/server/scripts/Kalimdor/zone_desolace.cpp
# src/server/scripts/Northrend/zone_borean_tundra.cpp
2020-07-22 18:38:35 +02:00
Ovahlord
47ef91c23d
Core/Misc: more fixups
2020-07-22 18:10:50 +02:00
Treeston
e54f8ca4f7
Core/Misc: Rename Unit::AttackedTarget to Unit::AtTargetAttacked to match naming scheme for these notifiers
...
# Conflicts:
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Spells/Spell.cpp
2020-07-22 18:07:24 +02:00
Ovahlord
e07f4f9dc2
Core/Units: dbe3bbefe734f8824e8f07c302e256f0d446b974 followup
2020-07-22 18:06:24 +02:00
Ovahlord
471efa832c
Core/Units: build fixes
2020-07-22 17:54:53 +02:00
Treeston
b634358967
Core/Entities: Fixed an issue where creatures would not properly assist formation members in certain scenarios. Tagging #21967 .
...
# Conflicts:
# src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:45:10 +02:00
Treeston
7df7dcca7d
Core/Threat: Threat system adjustments:
...
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226 . Tagging #21501 .
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.
# Conflicts:
# src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:44:05 +02:00
Treeston
b4d5f46ea4
1b7ec4b follow-up
2020-07-22 17:33:08 +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
3d9ad131ee
Core/Combat: Some more sanity check asserts to try and track down #21187 .
...
Also, some anti-annoyance treatment for dot tele.
# Conflicts:
# src/server/game/Combat/CombatManager.h
# src/server/game/Combat/ThreatManager.h
# src/server/scripts/Commands/cs_tele.cpp
2020-07-22 16:57:59 +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
5ccba1cb68
Core/Units: little typo fixup
2020-07-22 15:04:49 +02:00
treeston
a09db6b4ba
Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
...
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;
# Conflicts:
# src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Spells/SpellEffects.cpp
# src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
# src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
# src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
# src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp
# src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
# src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
# src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
# src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
# src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
# src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
# src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
# src/server/scripts/Kalimdor/zone_tanaris.cpp
# src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
# src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
# src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
# src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
2020-07-22 14:35:53 +02:00
Treeston
ec04d3b2cd
[3.3.5] Combat/Threat rewrite - prep & refactor ( #19966 )
...
* Combat/Threat rewrite (PR #19930 ) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Ovahlord
9f116b86e9
Core/Movement: re-implement AbstractFollower as renamed version and index the pointers by following type (chase, follow, formation) for future access and improvements
2020-07-20 20:16:01 +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
Peter Keresztes Schmidt
cbd6fb2315
Build: Enable -Wimplicit-fallthrough on clang ( #25056 )
...
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs
Related: #25006
* Misc: Add some missing breaks (no-ops) to satisfy clang
Related: #25006
Closes #25055
* Build: Enable -Wimplicit-fallthrough on clang
Closes #25006
# Conflicts:
# src/server/game/Entities/Player/Player.cpp
# src/server/game/Spells/SpellInfo.cpp
# src/server/scripts/Battlefield/BattlefieldWG.cpp
# src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
# src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
# src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
# src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
# src/server/shared/DataStores/DBCDatabaseLoader.cpp
2020-07-18 22:47:52 +02:00
Ovahlord
405569dbff
Core/Spells:
...
* fixed Kill Command
* fixed Improved Kill Command crit chance bonus
* fixed Frenzy not triggering Focus Fire's visual effect correctly
closes #78
2020-07-17 16:21:37 +02:00
Ovahlord
40882b3f71
Core/Spells: define and implement SPELL_ATTR5_INCLUDE_MELEE_RANGE
...
*this attribute is being used to determine whenever a area targeting based spell shall include its melee range for target selection or not. This fixes many cases in which especially class abilities should hit targets that do not directly stand inside of the radius of a spell while maintaining that behaivior for spells without that attribute
2020-07-16 22:39:41 +02:00
Ovahlord
d371c9d1f6
Core/Packets: converted MSG_MOVE_TELEPORT, MSG_MOVE_TELEPORT_ACK, CMSG_SET_ACTIVE_MOVER and SMSG_MOVE_UPDATE_TELEPORT to packet class and send SMSG_MOVE_UPDATE_TELEPORT for players after receiving MSG_MOVE_TELEPORT_ACK instead of sending it alongside MSG_MOVE_TELEPORT
2020-07-16 15:26:12 +02:00
Ovahlord
d82c00c915
Core/Units: changed _formationFollowers from unit references to object guids to have a safer access to its stored units
2020-07-14 23:47:23 +02:00
Ovahlord
f8091d6aac
Core/Movement: made SetDisableGravity and SetHover virtual and handle anim tiers in their new override inside of the Creature class.
...
* no longer set anim tiers when the target is rooted
2020-07-13 14:07:59 +02:00
Ovahlord
9e2e37e074
Core/Spells: check for spell immunities only for effects that are affecting the checked target
2020-07-10 19:12:37 +02:00
Ovahlord
4f7eec88dc
Core/Packets: converted SMSG_LOOT_LIST to packet class
2020-07-08 14:19:44 +02:00
Ovahlord
696ab70f7f
Core/Movement: moved the cleanup of the idle motion slot to CleanupBeforeRemoveFromMap
2020-06-29 12:15:17 +02:00
Ovahlord
6bb5405296
Core/Movement: removed unnecessary logging from f1b16b4820
2020-06-28 22:20:11 +02:00
Ovahlord
f1b16b4820
Core/Movement: added a safety and error output if a follow target has a dead / invalid follower reference that should have been cleared before.
2020-06-28 14:23:02 +02:00
Ovahlord
9bd1cb8970
Core/Movement: handle special follow movement case for companions
2020-06-27 16:04:37 +02:00
Ovah
b09d6e2330
Core/Movement: reimplement follow movement ( #124 )
2020-06-26 21:22:21 +02:00
jackpoz
3f56ea8ba4
Core/Misc: Fix Clang 10 build warnings
...
(cherry picked from commit 48c5c0d7a2424df73343df127d415ee18eb84296)
2020-06-11 20:49:30 +02:00
Warpten
0af44ccc01
Core/Spells: implement DoT clipping
...
* Core/Spells: Implementation of DoT clipping.
* Core/Utilities: Backport "EnumFlags v3.0" from master.
* Core/Spells: Switch AURA_REMOVE_MODE to a flag set.
2020-06-04 18:16:03 +02:00
Warpten
5cb747620a
Core/Movement: Fixed Animation Tier handling ( #113 )
2020-06-03 00:49:18 +02:00
Ovahlord
f1bd380b20
Core/Players: update mount capabilties when the liquid status of players change
...
* simplified checks for liquid restrictions in mount capability helper
* handle missing case for liquid exclusive mounts
* update position data on character login to avoid some edge case outdoors checks
closes #95
2020-06-01 15:10:13 +02:00
Ovahlord
813b82efa3
Core/Units: CanFly and CanHover will now return positive results when the creature has the according movement flags dispite not having the template movement field set as enabled. This fixes several edge cases with manually enabled flight movement
...
* renamed IsLevitating to IsGravityDisabled for consistency
2020-05-16 19:21:27 +02:00
Ovahlord
d8ec67df50
Core/Movement: converted collision height and move update opcodes back to movement structures and implement new movement status elements for future use
2020-05-10 19:21:33 +02:00
Ovahlord
a2cea3ce08
Core/Movement: converted CMSG_MOVE_SET_COLLISION_HEIGHT_ACK and SMSG_MOVE_UPDATE_COLLISION_HEIGHT to packet class
...
* added new MovementInfo helpers for easy access to all packet related data
2020-05-10 01:31:53 +02:00
Ovahlord
298c2593df
Core/Units: fixed a crash that happened when despawning a pet while having units with no ownerguid stored in m_controlled
...
* minor fixups for vehicle energy power regeneration
* do not set ownerguids for summon vehicles
2020-04-29 14:27:27 +02:00
Ovahlord
bedd554c79
Core/Units: protect m_Controlled unit set against removing non-existing pointers and log owner and unit to track down potential crashes
2020-04-28 20:42:24 +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
5cf7de6aa7
Core/Units: make health regeneration functions for players and creatures virtual
2020-04-27 14:39:07 +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
153546acba
Core/Units: do not send owner based update fields for units that only have a creator guild but no summoner guid
2020-04-26 16:56:38 +02:00
Ovahlord
b653f2f819
Core/Units: ported power type updates from master branch
2020-04-22 03:13:02 +02:00