Ovahlord
aec1d1a2fa
Misc: fixed build
2020-07-23 17:00:54 +02:00
Ovahlord
bf35a3e2e7
Scripts/World: drop unnecessary GameTime shenanigans from training dummy's script and correct scripting model for current combat / threading model. The dummy will no longer get stuck in a 'engaged' state.
...
* additionally the combat times will now be updated in realtime instead of a 500ms interval which will lead to pin-point accurate results.
2020-07-23 14:37:59 +02:00
Ovahlord
ea8d7093e9
Scripts: fixed build
2020-07-22 19:39:43 +02:00
Treeston
5823afac9f
Scripts/ICC: Professor Putricide no longer tries to add threat on units it cannot add threat on because of immunity flags. Instead, its AI manually controls the engagement state. Should close #23727 .
2020-07-22 19:22:54 +02:00
Treeston
d2df9bdf15
Scripts/Hyjal: Seriously, who calls EnterEvadeMode in a AI constructor????
2020-07-22 19:21:03 +02:00
Ovahlord
2c88471fe3
Scripts/Misc: more followups
2020-07-22 19:20:54 +02:00
Treeston
c7c4f267c4
Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time.
2020-07-22 19:14:52 +02:00
Ovahlord
82d9fba979
Scripts/Naxxramas: ported several updates for Thaddius
2020-07-22 18:46:55 +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
de6a514ec5
Core/Misc: fixed build
2020-07-22 18:35:41 +02:00
Treeston
a16d691dd8
Core/Entities: Kick engagement logic upstairs to Unit (from ThreatManager), since all Units with AI need it (not just those with threat list). Fixes #17981 .
...
# Conflicts:
# src/server/game/Combat/ThreatManager.cpp
# src/server/game/Entities/Creature/Creature.cpp
# src/server/game/Entities/Unit/Unit.cpp
# src/server/game/Entities/Unit/Unit.h
2020-07-22 18:05:06 +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
607069de36
Core/AI: Remove unnecessary parameter from DoZoneInCombat after eb1972f
2020-07-22 17:38:11 +02:00
Treeston
1d16b98d52
Core/AI: Some cleanup to DoZoneInCombat and Malygos' AI that I found while working out #22226 .
...
# Conflicts:
# src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
2020-07-22 17:37:49 +02:00
Treeston
d910f8b3cf
Scripts/Pets: Some cleanup for Snake Trap. Tagging #21847 , though this doesn't address it (yet).
2020-07-22 17:36:52 +02:00
Treeston
31f3cb203b
Core/Threat: My dictionary informs me that "fixtate" is not, in fact, a word. Corrected to "fixate".
...
fd33b1c follow-up
2020-07-22 17:33:27 +02:00
Treeston
93864a29c0
Core/Threat: Re-add fixtate system. I am being told Netherspite needs it.
2020-07-22 17:33:17 +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
bd0408ff1a
Core/Combat: Unify combat permitted checks between CvC and PvC - only require "not friendly" in all cases. Fixes Yogg-Saron encounter. Closes #21380 .
...
Also some bonus cleanup to Yogg's script to make transition cleaner.
# Conflicts:
# src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
2020-07-22 17:26:26 +02:00
Ovahlord
7bbc603efa
Core/Spells: feign death react state cleanup
2020-07-22 17:23:58 +02:00
Treeston
0d50435008
Scripts/AzjolNerub: Clean up Hadronox to hopefully avoid any further evade issues. Tag #20310 .
2020-07-22 17:22:35 +02:00
Treeston
fb83408023
Revert "Scripts/Northrend: Malygos now uses modifiable threat list when teleporting after vortex. Fixes a crash. Closes #21315."
...
This reverts commit 6bbc95f3a0078e5d121e7092a60fa85b24c725d9, which is made unnecessary by 65709e1c3081c97442792695cbc0f0826015d625.
2020-07-22 17:20:20 +02:00
Treeston
8cde9455b7
Scripts/Northrend: Malygos now uses modifiable threat list when teleporting after vortex. Fixes a crash. Closes #21315 .
2020-07-22 17:20:11 +02:00
Treeston
b708144ca9
Core/Threat: Custom ThreatListIterator that transparently iterates over the backing map (instead of using heap iterators) when working with the unsorted threat list. This greatly reduces the range of actions that can cause iterator invalidation.
...
Also some minor adjustments to .debug threat, which no longer hides certain invalid states from view.
2020-07-22 17:20:02 +02:00
Treeston
18c944cfda
Scripts/Ulduar: Flame Leviathan used a very weird mixture of victim logic and REACT_PASSIVE, which broke during transition to the new system. Replaced with a working version.
...
Closes #21265 .
2020-07-22 17:19:07 +02:00
Treeston
56773ed7f3
nopch fix
2020-07-22 17:19:03 +02:00
Treeston
0425a52d7e
Scripts/ICC: Valithria Dreamwalker's script no longer despawns unrelated mobs in Frostwing Halls, and thus won't get them stuck in a despawned state due to linked_respawn.
...
Closes #21286 .
2020-07-22 17:18:23 +02:00
Keader
24482e1398
Scripts/Utgarde Keep: Fixed Ingvar evade in phase 2 (again)
...
Closes #21264
2020-07-22 17:13:14 +02:00
Keader
c3d957f90e
Scripts/Pit of Saron: Fixed Tyrannus not working after evade
...
# Conflicts:
# src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp
2020-07-22 17:11:49 +02:00
Treeston
3e78cffa1c
Scripts/World: New target dummy AI, because I don't trust the existing one in light of #21187 .
...
# Conflicts:
# src/server/scripts/World/npcs_special.cpp
2020-07-22 17:07:56 +02:00
Treeston
34ed4c5923
nopch fix
...
# Conflicts:
# src/server/scripts/Commands/cs_debug.cpp
2020-07-22 17:06:48 +02:00
Treeston
635371e5f8
missing return
2020-07-22 17:06:24 +02:00
Treeston
cbec08f2b5
Scripts/Commands: New command: .debug threatinfo
...
# Conflicts:
# sql/base/auth_database.sql
# sql/old/4.3.4/auth/19_2017_06_18/2018_01_09_00_auth.sql
# sql/old/4.3.4/world/23_2017_11_15/2018_01_09_00_world.sql
# src/server/game/Accounts/RBAC.h
# src/server/game/Combat/ThreatManager.h
2020-07-22 17:02:48 +02:00
Treeston
4411a5389c
9ad11e6 follow-up, prevent Halion respawn without loot
...
tagging #21198
2020-07-22 16:59:17 +02:00
Treeston
c328eb6b10
typo fix
2020-07-22 16:59:08 +02:00
Treeston
523059f80e
Core/Threat: Fix a potential exploit allowing players to damage a boss without them taking damage.
...
Scripts/Halion: General cleanup of old hacks no longer needed under new combat system.
2020-07-22 16:59:00 +02:00
Treeston
aa9f8ef96b
Revert "Scripts/Commands: Allow to use .tele in combat only to GMs"
...
This reverts commit 3ae5b72075925f896c53603c26b2aa0dd7708fbf - see discussion on commit.
2020-07-22 16:58:32 +02:00
jackpoz
936d88c2ca
Scripts/Commands: Allow to use .tele in combat only to GMs
...
Allow to use .tele in combat only to players who can be GMs (even if they have .gm off)
2020-07-22 16:58:09 +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
c1237c788b
Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177 .
2020-07-22 16:52:02 +02:00
Moein
d82abd8256
MovementInform should overrides
2020-07-22 16:51:52 +02:00
Treeston
4fd7d9aa00
Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
...
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174 .
- Some strings cleanup
# Conflicts:
# sql/old/4.3.4/world/23_2017_11_15/2018_01_04_00_world.sql
# src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
2020-07-22 16:50:54 +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
280b8dc799
Fixed build
2020-07-22 15:21:50 +02:00
Treeston
7c75d6fb0c
some more cleanup (cbd025f follow-up)
2020-07-22 15:03:01 +02:00
Treeston
a5c63ba366
Scripts/MagistersTerrace: Fix some crashes in Selin Fireheart. His script is still a shitshow, though. Closes #20614 .
...
# Conflicts:
# src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
2020-07-22 15:02:53 +02:00
Treeston
787f057a1e
Scripts/Patchwerk: Finally fix that crash for real. Closes #20247 .
2020-07-22 14:58:43 +02:00
Treeston
e89467ea58
Scripts/Naxxramas: Fix an edge case crash with people teleporting out of the dungeon during the Patchwerk encounter (tagging #20247 )
2020-07-22 14:58:24 +02:00
Treeston
ad30a56ead
Scripts/Naxxramas: Missing nullptr check in Patchwerk. Closes #20247 .
2020-07-22 14:57:24 +02:00
Keader
be5aac09d8
Core/Scripts: Removed wrong AddThreat call in Pursuit spellscript
...
followup 52ad0c9e5c65a4add7dbcd9fac74c505aaa5b1cf
checked in sniffs, only ick add threat in target, wrong call in original script (why o keep it? o.o)
2020-07-22 14:56:56 +02:00