Commit Graph

41 Commits

Author SHA1 Message Date
Treeston
34c7810fe5 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.

(cherry picked from commit 532ab1c7f8)
2021-05-16 21:56:01 +02:00
Treeston
bce43de7f3 Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now.
(cherry picked from commit 6113b9dec2)
2021-04-16 20:22:13 +02:00
Treeston
9b141207d1 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has

(cherry picked from commit d507a7e338)
2021-04-16 15:22:42 +02:00
Treeston
8be23fcbbd [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.

(cherry picked from commit e2a1ccd118)
2020-08-13 22:46:44 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
9ffabae6bf Scripts/Misc: Use InstanceMap* in InstanceScript instead of Map* 2018-06-16 17:24:10 +02:00
Shauren
921235b3e9 Core/Misc: Fixed rotation of many gameobjects summoned in tol barad, garrison and various scripts 2018-05-07 17:45:09 +02:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +02:00
Shauren
38c6694b8e More nopch fixes 2017-05-25 00:24:37 +02:00
joschiwald
036f67c0c1 Core/Collision: Replaced phasemask with proper phases in GameObject collision calculation 2017-05-05 21:22:58 +02:00
ariel-
c429e7d489 Core/Entities: debloat SummonGameObject parameter list using proper wrappers and enable GO rotation in scripts
- There's still an overload allowing for x, y, z, o to be passed directly
- Fixed default animstate for GameObject creation in many places, it should be 255, not 100 (checked in sniffs)

(cherry picked from commit 62bfee37cb)

# Conflicts:
#	src/server/game/Battlefield/Battlefield.cpp
#	src/server/game/Battlegrounds/Battleground.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/GameObject/GameObject.h
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Object/Object.h
#	src/server/game/Spells/SpellEffects.cpp
#	src/server/scripts/Commands/cs_gobject.cpp
#	src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
#	src/server/scripts/Kalimdor/zone_feralas.cpp
#	src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
#	src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
#	src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
2017-02-11 20:50:29 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
ac1dc758b9 Core/Units: Cleanup hardcoded magic numbers for byte field offsets 2016-12-13 20:58:22 +01:00
Duarte Duarte
7eb4512eee Scripts: Minimize duplicated enum names in header files (#18346)
This reduces the number of cache resets with the Zapcc compiler

Standard followed is instance/raid TLA + DataTypes/CreaturesIds/etc
2016-12-01 01:51:07 +00:00
Naios
5534915f74 Core/Scripts: Split the huge scriptloader into smaller pieces
* Each subdirectory contains it's own translation unit now
  which is responsible for loading it's directory
* Improves merging & decoupling between 3.3.5 <-> 6.x
* Removes unused Battleground loader
* Ref #15671
2016-02-21 15:36:41 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Vincent-Michael
00b4e8b6cc Scripts: Added missing overrides 2015-11-15 03:38:02 +01:00
Nyeriah
a661c97e7e Scripts/Stonecore: Slight correction to last commit
(...a forgotten save)
2015-04-24 02:48:35 -03:00
Nyeriah
a735088ea1 Scripts/Stonecore: Prevent Slabhide from dying during air phases 2015-04-24 02:44:14 -03:00
Golrag
d999caee67 Core/AreaTrigger: Added 'bool entered' to OnTrigger 2015-04-18 11:22:30 +02:00
Carbenium
6252330a77 Merge pull request #14491 from doctaweeks/fixes-for-6.x
Fixes for 6.x
2015-04-05 00:16:36 +02:00
Shauren
76cbf05a2e Misc: Fixed license header formatting 2015-04-04 13:11:32 +02:00
Daniel M. Weeks
b948a4275e Add missing override keyword in scripts 2015-04-02 22:28:05 -04:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
joschiwald
45187b036f Core/Packets: rename packet structs to match client names 2014-12-30 00:39:51 +01:00
Mihapro
76fa042fdc Scripts/Instance: The Stonecore updates
Stonecore Teleporters scripted. Some corrections, better handlings, fixed Travis warnings ...

Closes #13626

(cherry picked from commit 9a941ae125)

Conflicts:
	src/server/scripts/Maelstrom/Stonecore/boss_high_priestess_azil.cpp
	src/server/scripts/Maelstrom/Stonecore/boss_ozruk.cpp
	src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
	src/server/scripts/Maelstrom/Stonecore/stonecore.cpp
2014-12-28 18:02:10 +00:00
joschiwald
b68b6417f6 Core: fixed few coverity issues and warnings 2014-12-07 01:24:00 +01:00
Intel
b08b54c8bb Core/Packets: CMSG_CREATURE_QUERY and SMSG_CREATURE_QUERY_RESPONSE handler 2014-11-14 01:55:29 +00:00
Shauren
e52357eb45 Warning fixes 2014-11-10 09:26:01 +01:00
Bernd Lörwald
fbfb294888 Core: Fix non-pch build 2014-11-08 20:47:20 +00:00
Mihapro
e5e8da85a1 Scripts/Instance: The Stonecore
(cherry picked from commit 50bf6cad6a)
2014-11-08 19:30:51 +00:00
Miha Penger
38c31711c0 DB/Quest: Good Help is Hard to Find script
Good Help is Hard to Find (14069) quest script
2014-03-05 20:27:33 +01:00
Vincent-Michael
2c6f5e1b61 Scripted: Remove Whitespace/Tabs 2013-08-09 20:37:09 +02:00
Vincent-Michael
0c96062687 Scripted/Kezan: Fix warnings 2013-08-06 20:32:15 +02:00
Nay
e139c1e9af Scripts/Kezan: Fix a typo (build) 2013-08-06 17:32:30 +01:00
Ukulutl
df9f34cde7 Scripts/Kezan: Fix quest "Good Help is Hard to Find"
Added Maelstorm to scriptloader

Close #10337

Signed-off-by: Nay <dnpd.dd@gmail.com>
2013-08-06 13:18:58 +01:00