Commit Graph

63 Commits

Author SHA1 Message Date
Shauren
2e7e49b749 Scripts/Spells: Removed unneccessary PrepareSpellScript and PrepareAuraScript uses 2023-07-24 10:48:50 +02:00
Teleqraph
88ff97c1f9 Core/Units: Added helper functions to modify UNIT_FLAG_UNINTERACTIBLE (#29159)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-07-20 19:09:27 +02:00
Naddley
1440fe03de Scripts/Deepholm: Scripted quest "All Our Friends Are Dead" (#28889) 2023-03-31 23:01:50 +02:00
Shauren
879c0cccfc Core/GameObjects: Implemented per player gameobject state and visibility for looted non-consumable chests 2022-10-21 22:11:00 +02:00
Shauren
46e0056196 Scripts/Instances: Add dungeon encounter data 2022-10-04 00:19:38 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
offl
c4906ce60b Core/Misc: Rename UNIT_FLAG_NOT_SELECTABLE to UNIT_FLAG_UNINTERACTIBLE (#26913)
(cherry picked from commit c4741a131a)
2022-03-15 23:03:26 +01:00
Giacomo Pozzoni
71c2f0af46 Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken (#26787)
* Core/AI: Add DamageEffectType and SpellInfo parameters to UnitAI::DamageTaken

* Update scripts

(cherry picked from commit 0800ab20a8)
2022-03-12 14:45:04 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
NoName
ee620856ad Core/Movement: Corrected Animation Tier handling (PR #24875)
Co-authored-by: Warpten <vertozor@gmail.com>
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit dad187615d)
2022-02-05 15:40:31 +01:00
Carbenium
82fce41852 Core/WorldObject: Replace non-std::chrono SummonGameObject overloads
Also fix intended despawn time of GOs used by the "Engineering a Disaster" quest

(cherry picked from commit 8642aaaf92)
2022-01-24 12:55:43 +01:00
Carbenium
3bba8d50b1 Core/WorldObject: Remove non-std::chrono SummonCreature overload
Remove
TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, uint32 vehId = 0, uint32 spellId = 0);

(cherry picked from commit a41f599be7)
2022-01-24 12:39:59 +01:00
Carbenium
03e4c0d7bf Core/Creature: Remove non-std::chrono overload of DespawnOrUnsummon
(cherry picked from commit 480dee3125)
2022-01-24 12:21:26 +01:00
Shauren
1ef00ccd10 Scripts/Stonecore: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Aqua Deus
0bbdfc6112 Scripts/Spells: Move spell_anchor_here to generic because is used by more than one boss (#27641) 2022-01-22 14:52:05 +01:00
Peter Keresztes Schmidt
c4098897a8 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod

(cherry picked from commit 418c3b1fd5)
2022-01-06 21:53:27 +01:00
Shauren
5d02739b98 Scripts: Fix rbac permission for skipping default boss sequencing check
(cherry picked from commit e660c8bc19)
2021-12-20 21:40:47 +01:00
Treeston
c13d83796f 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.
(cherry picked from commit 0e7c66cb4c)
2021-12-17 00:23:33 +01:00
Treeston
38d7c1530a 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.
(cherry picked from commit 1158f267df)
2021-12-12 02:09:15 +01:00
Giacomo Pozzoni
5f545f5402 3.3.5 gameobject summoner (#23289)
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments

(cherry picked from commit 797fba98e9)
2021-12-07 00:02:03 +01:00
Shauren
f2456ff319 Scripts/Areatriggers: Fixed all areatrigger scripts triggering both on enter and exit instead of only on enter 2021-11-10 00:01:50 +01:00
ariel-
861cf261c5 Core/Formations: update codestyle and fix crash
Closes #21288

(cherry picked from commit 73cc613dc8)
2021-06-16 19:26:32 +02:00
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