Commit Graph

148 Commits

Author SHA1 Message Date
Shauren
de26cafbbe Core/WorldStates: Allow setting "hidden" field of SMSG_UPDATE_WORLD_STATE 2022-07-07 23:07:20 +02:00
Shauren
cfca26c264 Core/WorldStates: Migrate instance script worldstates to new system 2022-06-30 00:16:41 +02:00
Shauren
e2cf6d68fc Core/SpawnGroups: Renamed GetSpawnGroupsForInstance and its argument to not cause confusion with instance ids (equivalent to instance save id, not map id) 2022-06-24 21:38:29 +02:00
Shauren
1c62b0b90f Scripts/Instances: Replace manual criteria timer starts in instances with new GameEvents api 2022-04-24 13:58:18 +02:00
Shauren
e1abd8256b Core/Achievements: Implemented criteria flag "Reset on Start" and removed manual script workarounds for it 2022-04-24 12:36:28 +02:00
Ovah
203dfec2a1 Core/Maps: add new FLAG_ALLIANCE_ONLY and FLAG_HORDE_ONLY for instance spawn groups (PR #25656)
(cherry picked from commit 4abbeb2a60)
2022-03-01 21:46:43 +01:00
Traesh
543a7b79c3 Core/Maps: Add Map::DoOnPlayers helper function (#25233) 2022-02-16 23:54:26 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
Shauren
f8ad7017dd Core/Misc: Move (or delete) constructors and destructors to .cpp files (avoids compiling them in every file that includes them) 2022-02-12 21:36:46 +01:00
Carbenium
5f296fb7c7 Core/InstanceScript: std::chrono-ify DoRespawnGameObject
(cherry picked from commit d7ff8c272a)
2022-01-23 23:09:27 +01:00
ccrs
fce492d2e2 Core/Instance: 14788ce followup
No need to repeat code

(cherry picked from commit b9a8095967)
2021-12-13 00:42:19 +01:00
ccrs
934b72262d Core/Instance: add new method
(cherry picked from commit 14788ce026)
2021-12-13 00:42:18 +01:00
ccrs
6a63200e40 Core/Instance: add new hook & method
(cherry picked from commit 953b05459a)
2021-12-13 00:42:18 +01:00
ccrs
70fd6e7398 Core/Instances: improve DoRemoveAurasDueToSpellOnPlayers & DoCastSpellOnPlayers handling
(cherry picked from commit 22b3b21ae3)
2021-12-13 00:42:18 +01:00
Meji
0a83f74876 Core/Achievements: Update CriteriaType enum (#26856) 2021-09-08 22:07:01 +02:00
Treeston
5c80f50734 Core/Spawning: Actually check spawn group state before processing a respawn. It feels like that is something that should've been noticed at some point.
Also remove CreatureScript::CanSpawn since nobody uses it, and spawn groups do the same thing.

(cherry picked from commit 94b5d9bfa1)
2021-08-08 21:21:34 +02:00
Gooyeth
17004c4121 Core/Scripts: Add bossId in state error log. (#21421)
(cherry picked from commit b9aec3b4d3)
2021-06-21 00:06:41 +02:00
ariel-
3bc3b3eeeb Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c504314
See discussion on b64c504314

(cherry picked from commit b75ff7d4bf)
2021-06-16 01:29:25 +02:00
ariel-
21556667c1 Core/Globals: throw some RAII into ObjectMgr, and load templates into vectors
Ref #14274

(cherry picked from commit b64c504314)
2021-06-16 01:00:11 +02:00
ariel-
fccf1a8c62 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876

(cherry picked from commit cb9e72e521)
2021-06-13 00:59:13 +02:00
Shauren
0b2087ae41 Core/Criteria: Add all values of CriteriaStartEvent 2021-06-01 21:16:41 +02:00
Shauren
f922c6e7a4 Core/PacketIO: Renamed a bunch of opcodes based on more research (only those added after 6.0) 2020-09-19 12:44:42 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Treeston
06a1271a50 Core/Misc: random refactors
(cherry picked from commit 37dff2b7a1)
2020-08-23 17:47:41 +02:00
Treeston
27806eeac9 Core/Spawn: Move spawn group state management from sObjectMgr to the Map object, which makes it actually function as intended with instances. Woops.
(cherry picked from commit f279207d48)
2020-08-23 17:00:59 +02:00
Treeston
608c9aaabf Scripts/InstanceScript: Implement database framework for managing spawn groups based on boss state. (#20103)
(cherry picked from commit 84590be26d)
2020-08-22 13:48:44 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
deca201f77 Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection 2020-06-27 13:33:17 +02:00
ariel-
3f79c9f696 Core/AI: AreaBoundary refactor
- Added an auxiliary function IsInBounds to base CreatureAI
- Changed container to vector. Set had no sense because we're storing new pointers, they have different addresses even if the boundary is the same

(cherry picked from commit 2f99fa09c9)
2020-04-24 17:18:51 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
xinef1
4f65dc5e20 Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer
Fixed some more crashes

* Correction

(cherrypicked from 14dfc377b4)
2019-07-21 21:06:54 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shocker
aa9e0de0bb Core/Spells: Implement PROC_FLAG_ENCOUNTER_START 2018-10-13 13:09:20 +03:00
Shauren
9ffabae6bf Scripts/Misc: Use InstanceMap* in InstanceScript instead of Map* 2018-06-16 17:24:10 +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
Roc13x
1e62b53c66 Core/Instances: Fix combat resurrection charge gain (#21647)
Old logic stopped the recharge timer after the first recharge
2018-03-21 09:59:58 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
roc13x
87d1d72d09 Core/Instances: Prevent possible minion crash 2017-08-21 09:05:01 +02: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
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Krudor
d45f535d30 Update boss state load logic
Reset boss state to NOT_STARTED if state loads as FAIL
2017-03-25 17:54:19 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Krudor
8444ab7365 Core/Instances: Implemented base scenario system and objectives in dungeons
Closes #17905
Closes #18034
2016-11-06 23:30:49 +01:00
Shauren
a9a13d10f7 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-17 17:37:06 +02:00
Krudor
649e3a9ac5 Core/Instances: Add functionality for modifying instance entrance locations
Instances have since MoP (Possibly even Cataclysm) been able to set new locations for players when they zone into the instance.
A theoretic example of this could be after a certain boss has been defeated, a new entrance location is set to bring players entering the instance closer to the relevant content.
A real example would be Siege of Orgrimmar changing entrance locations many times as the raid progresses.

Added SetEntranceLocation for setting entrance locations that will be saved to DB the next time the instance is saved, and SetTemporaryEntranceLocation for when you don't want the value to be saved to the database.

Closes #17167
2016-07-16 14:58:33 +02:00
Shauren
0d9136f764 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-10 00:37:33 +02:00
Ovah
2bede7bffd Core/Instances: implemented handling for SMSG_BOSS_KILL_CREDIT (#17525) 2016-07-07 13:30:24 +02:00
Shauren
885d9b53c3 Core/DataStores: Updated dbc/db2 to 7.0.1.20994 2016-05-20 23:48:48 +02:00