Commit Graph

36266 Commits

Author SHA1 Message Date
Treeston
2d14f744dd Core/Threat: Passive creatures now properly become engaged when adding an offline threat entry. Fixes RoS and Thaddius, maybe more. Closes #21269. 2020-07-22 17:13:29 +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
5fc74508e3 Core/Threat: Fix a potential crash that would occur in specific edge cases of AI being a bit naughty. 2020-07-22 17:11:08 +02:00
ariel-
32d189e8b7 Core/Misc: kill whitespace
# Conflicts:
#	sql/updates/world/3.3.5/2018_01_10_04_world_335.sql
#	src/server/game/Combat/ThreatManager.h
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/scripts/Kalimdor/boss_azuregos.cpp
2020-07-22 17:10:27 +02:00
Treeston
f91c2335f5 3dcd49e v2, slightly cheaper 2020-07-22 17:08:13 +02:00
Treeston
3b2818b143 Core/Threat: fix a potential super edge case iterator invalidation 2020-07-22 17:08:04 +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
Ovahlord
458f90323f DB: fixed auth database base sql 2020-07-22 17:06:14 +02:00
Ovahlord
008bb3c7cf DB: f45c211987 followup 2020-07-22 17:04: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
b733bde3bb Core/Threat: only send periodic threat list updates while unit is engaged 2020-07-22 16:58:41 +02:00
Treeston
aa9f8ef96b Revert "Scripts/Commands: Allow to use .tele in combat only to GMs"
This reverts commit 3ae5b72075 - 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
be3a81ac55 Core/Combat: some more detailed assertions to possibly shed light on #21187. 2020-07-22 16:56:59 +02:00
Ovahlord
65a7ba597f Core/Combat: added missing files 2020-07-22 16:56:31 +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
Ovahlord
4f9058a331 DB: 9f9507e6a1 followup 2020-07-22 16:51:38 +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
20a9a8d934 nopch fixes 2020-07-22 16:49:58 +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
2cc36c5eec Core/AI: UnitAI.h trimming part two. WaypointX methods kicked upstairs to CreatureAI.h. 2020-07-22 15:11:26 +02:00
Ovahlord
85884c49bf Core/AI: followup 2020-07-22 15:11:00 +02:00
Treeston
b031f55f21 Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.
Also change a very ugly hack in GetDialogStatus. Ew.

# Conflicts:
#	src/server/game/AI/CoreAI/GameObjectAI.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Quests/QuestDef.h
2020-07-22 15:10:28 +02:00
Treeston
7d361cc25c Core/Spell: Remove some leftover hack code from ::EffectSanctuary pertaining to vanish. None of this code did anything anymore.
# Conflicts:
#	src/server/game/Spells/SpellEffects.cpp
2020-07-22 15:08:14 +02:00
Ovahlord
5ccba1cb68 Core/Units: little typo fixup 2020-07-22 15:04:49 +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
Treeston
abcf9f9d42 Core/Player: Prevent changing equipment while charmed. Closes #20209. 2020-07-22 14:57:15 +02:00
Keader
be5aac09d8 Core/Scripts: Removed wrong AddThreat call in Pursuit spellscript
followup 52ad0c9e5c
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
Carbenium
64ed5c07fe Core/Scripts: Add two missing overrides 2020-07-22 14:56:28 +02:00
Keader
66fe69f98c Core/Scripts: Typo fix 2020-07-22 14:56:15 +02:00
Keader
dfd1ecf7e5 Core/Script: Krick and Ick, fixed spell Pursuit
Close #2261
2020-07-22 14:56:06 +02:00
Treeston
e4ced70a31 Core/Misc: random refactors 2020-07-22 14:55:48 +02:00
Treeston
c60b69a66f Scripts/Auchindoun: Fix a super edge case crash bug with GM far teleports during Blackheart's charm phase. Follow-up to d80d7c6. 2020-07-22 14:53:51 +02:00
Ovahlord
fcc4429b36 DB: e9cd7af2df followup 2020-07-22 14:51:46 +02:00
Gustavo
d55b5549c6 Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau) (#19897)
* Core/Scripts: Rewrite Boss Kalecgos (Sunwell Plateau)

Scripted all spells
Corrected behavior of Spectral Blast and Curse of Boundless Agony
Removed wrong wipe behavior
Fix problem where bosses would be stuck with banish
Added Boundaries
Corrected texts
Removed old hacks
Other minor fixes

# Conflicts:
#	sql/old/4.3.4/world/19_2017_06_18/2017_08_08_00_world.sql
#	src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
#	src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
2020-07-22 14:50:24 +02:00
Treeston
bdd776e1d1 Core/Unit: No code change, just updating a comment with insights gleaned from sniffs. 2020-07-22 14:46:28 +02:00
Treeston
4c38fa5906 Core/PlayerAI: Some adjustments:
- Add a 2 second delay before the AI begins using spells. This should provide opportunity for counterplay before that rogue activates cloak and goes on an unstoppable rampage among your healers. (Sorry, guys.)
- Stopped the AI from attacking invalid targets under some conditions. It should now properly leash back and follow the charmer if we try to select an invalid target.
- Stopped the AI from constantly re-creating the follow movement generator (and thus spamming movesplines).
2020-07-22 14:46:03 +02:00