Commit Graph

36299 Commits

Author SHA1 Message Date
Ovahlord
5dcc8b1df6 DB: 5706d49e49 followup 2020-07-22 17:42:22 +02:00
Treeston
6867b3b201 Scripts/SmartScripts: _SET_IN_COMBAT_WITH_ZONE and _CALL_FOR_HELP no longer use a target. Because that feature made no sense and was unused.
# Conflicts:
#	sql/old/4.3.4/world/27_2018_03_16/2018_08_22_11_world.sql
#	src/server/game/AI/SmartScripts/SmartScript.cpp
2020-07-22 17:41:25 +02:00
Treeston
6f6b6534bf Core/Creature: Some adjustments to Creature::CallForHelp. Now works even if the Creature hasn't selected a victim yet. 2020-07-22 17:38:22 +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
66e5c57765 Core/PassiveAI: Fix an incorrect check that was inducing evade spam with critters. Closes #19998, for real this time. 2020-07-22 17:36:01 +02:00
jackpoz
84ee3701d5 Core/Thread: Fix crash added in fd33b1cd02
Fix crash caused by dereferencing uninitialized field.
2020-07-22 17:34:54 +02:00
Ovahlord
03b1c4def6 DB: 1d27f83bda followup 2020-07-22 17:34:44 +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
b4d5f46ea4 1b7ec4b follow-up 2020-07-22 17:33:08 +02:00
Treeston
de81a77ef8 Core/Threat: Fix taunt behavior in some edge cases 2020-07-22 17:33:00 +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
4b07f238ae Core/Threat: Fix taunt logic relying on unspecified behavior by unordered boost heap iterators. Use ordered iterators instead, this is cheap for our use case anyway. This will make taunt behave consistently again.
Closes #21499.

# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:27:33 +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 6bbc95f3a0, which is made unnecessary by 65709e1c30.
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
18bcdbfd7d AI/SmartAI: Remove a silly incorrect piece of code that was breaking react state swaps on SAI creatures. Fixes #21353. 2020-07-22 17:18:52 +02:00
Treeston
d5816cc224 nopch fix 2020-07-22 17:18:37 +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
Treeston
528953ab8f Core/Creature: Adjust SelectVictim behavior: (PR #21324)
- No more automatic combat -> threat promotion. This matches anecdotal retail behavior - spells already in transit will not cause mob to chase you if its primary target vanishes before the spell hits.
- Prevent mobbing by stopping creatures from auto-acquiring a nearby target just because the primary target vanished.
2020-07-22 17:18:01 +02:00
Treeston
c8b05e927f Combat/Threat: Now set engaged state for all units on offline reference registration (vanished/invis'd units). For non-PASSIVE units, this will immediately cause an evade.
This fixes an exploit where creating the reference as offline (by vanishing while a spell was mid-flight) you could damage a creature further without it ever engaging you.
2020-07-22 17:17:33 +02:00
Treeston
0b64a60d5c Game/AI: Remove some unused old logic.
# Conflicts:
#	src/server/game/AI/CreatureAI.cpp
2020-07-22 17:17:18 +02:00
Treeston
7c666188c1 typo 2020-07-22 17:16:50 +02:00
Treeston
f9b4dd7420 Core/Creature: add an assertion to guard against infinite loops 2020-07-22 17:16:42 +02:00
Treeston
544b6a3381 Misc: assert -> ASSERT
# Conflicts:
#	src/common/DataStores/DBCFileLoader.h
#	src/server/scripts/Commands/cs_debug.cpp
2020-07-22 17:16:21 +02:00
Treeston
84bb8a8efe Core/Threat: Assistance threat (healing, buffs, etc.) is now properly split (instead of copied) between all creatures threatened by the action. Thanks to Foereaper for help with testing, and my apologies to healers everywhere.
(No apologies for charm AI though. You deserve that one.)
2020-07-22 17:13:38 +02:00
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