Commit Graph

809 Commits

Author SHA1 Message Date
Hanabi
a6a2ca8ef7 feat(Core/GameObjects): Instance gameobject save data implementation (#11113)
* fix(Core): Save gameobject state on instances

Currently, azerothcore doesn't save gameobject states on instances.
Whenever there's a re-start or crash, the instance's gameobjects and
their states aren't saved, producing un-wanted behaviours and blocking instances at times.

Implemented CRUD for new table `instance_saved_data` that holds the states of gameobjects.

- When worldserver launches and gameobjects are loaded, this will check
  if this object's state exists on the DB and sets the previous state.
- On instance deletion (reset) these states are also removed based on
  the instance ID.
- Whenever a gameobject state changes inside a dungeon or raid, we save
  on the database the set state.

* Select query to synchronous and used FindMap()

* loading gameobject states on create

* reseting instance saved data

* missing reset methods and on create state

* database structure

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/Player/PlayerMisc.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Groups/Group.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* codestyle

* table changes

* table style

* codestyle

* table changes for columns

* data sanitization

* todo:

- Finish loading db data into the containers
- Using containers to find data
- How to get data from ObjectMGR inside Gameobject?

* loading on start up and db changes

* Removing unused data structure

* Uninitialised integer

* Whitespace

* clean-up and hooks to save states on memory

* Codestyle MySQL deprecated backticks

* i dont understand codefactor

* build

* Update data/sql/updates/pending_db_world/rev_1643395587559675400.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Globals/ObjectMgr.h

Co-authored-by: Kargatum <dowlandtop@yandex.com>

* review changes

* unecessary removal

* pushback instead of emplace

* wrong database update

* Update ObjectMgr.cpp

* missing check

* removing entry from the PR

* missing removals

* last delete

* build

* aha! Found the culprit for the sudden assert errors

* type safety, save only important gameobjects

* static cast to unsigned short

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* type changes

* queries fix

* fix build

* enabling which gameobjects to save on the database

* deadmines iron clad door

* Adjustment to gameobject onj create state and instances:

- Gnomeregan doors and Grubbis boss state
- Deadmines missing doors
- Stratholme gameobjects state saved

* forgot emi blastfuse change to despawn

* Leaving group logic

* codestyle

* fixing merge issues

* prevent bad behaviour

* brain meltdown

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

* Update data/sql/updates/pending_db_world/rev_1649359139539727000.sql

Co-authored-by: Claudiodfc <54484196+claudiodfc@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Kargatum <dowlandtop@yandex.com>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2022-05-24 10:33:45 -03:00
Maelthyr
dfc6adb081 refactor(Core/Combat): DeleteThreatLists() become ClearAllThreat() (#11824)
refactor(Chore/Combat): DeleteThreatLists() become ClearAllThreat()
2022-05-23 05:51:52 -03:00
temperrr
b6d79ac89e fix(Script/ZulGurub): Skeletons should appear in pit (#11561) 2022-05-23 05:47:30 -03:00
Maelthyr
c5368816fa Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758) 2022-05-18 05:36:57 -03:00
Maelthyr
5ede1177c5 refactor(Core/Combat): implement compatiblity layer for ResetAllThreat() (#11778)
* implement ResetAllThreat()

* .
2022-05-17 12:01:25 -03:00
Malcrom
aab3348e65 Fix(Script/SAI/Misc) Eversong Partygoers (#11786)
* Fix(Script/SAI/Misc) Eversong Partygoers

* Update zone_eversong_woods.cpp
2022-05-16 21:36:21 -03:00
acidmanifesto
06a62538cf fix (core\crash): fix client crash dk starter (#11726)
* fix (core\crash): fix client crash dk starter

Fixing it again. Something regressed.

* adjust timer and text playing

* improved timing

* Update chapter1.cpp
2022-05-13 13:00:59 -04:00
UltraNix
203450e949 fix(Scripts/BlackwingLair): Warrior Class Call should not restore to default stance on removal. (#11671) 2022-05-10 22:54:11 -03:00
Skjalf
12a0c6f1bc fix(Scripts/BlackwingLair): Prevent Chromaggus from hostilizing playe… (#11595)
* fix(Scripts/BlackwingLair): Prevent Chromaggus from hostilizing players in the floor underneath

* Update src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-05-03 07:18:45 -03:00
Skjalf
3c851c059a fix(Scripts/BlackwingLair): Prevent Chromaggus cage from looking (#11603) 2022-05-03 07:10:09 -03:00
Maelthyr
0363b95919 fix(Script/ZulGurub): High Priestess Jeklik improvements (#11458) 2022-05-02 21:02:40 -03:00
UltraNix
4e977d9ada fix(Scripts/BWL): Razorgore's Orb of Domination should not be usable during 2nd phase of the encounter. (#11580) 2022-05-02 21:01:00 -03:00
UltraNix
ef6c97e96e fix(Scripts/BlackiwingLair): Rogues should be teleported in front of Nefarian during Class Call event. (#11513) 2022-04-24 14:58:39 -03:00
Skjalf
88555b6564 refactor(Scripts/BlackwingLair): Refactor Chromaggus (#11501)
* refactor(Scripts/BlackwingLair): Refactor Chromaggus

* Update boss_chromaggus.cpp

* eof

* Update boss_chromaggus.cpp
2022-04-24 09:25:57 -03:00
Skjalf
c695d9b4bd fix(Scripts/BlackwingLair): Three drake bosses should be optional (#11506) 2022-04-24 02:48:35 -03:00
Skjalf
53bfc548a6 fix(Scripts/BlackwingLair): Bone Constructs should persist after Nefarian's death (#11504) 2022-04-24 02:05:27 -03:00
UltraNix
385176f434 fix(Core): Crashfix. (#11490)
* fix(Core): Crashfix.

* Update.
2022-04-23 11:32:09 -03:00
Kitzunu
1501445b0a chore(Core/Misc): nullptr cleanup (#11467) 2022-04-21 19:17:20 +02:00
temperrr
343732ee0b fix(Script/BWL): Fix initial shadowflame timers (#11443) 2022-04-20 09:10:31 -03:00
temperrr
33a70dbebc fix(Scripts/BlackwingLair): Chromaggus shimmer timer adjustment, fre… (#11437)
* Fix (Scripts/BlackwingLair): Chromaggus shimmer timer adjustment, frenzy and enrage changed

* codestyle

* urand
2022-04-19 06:32:45 -03:00
Skjalf
f9a76d99d4 fix(Scripts/BlackwingLair): Prevent Nefarian's adds corpse from decaying (#11424) 2022-04-17 11:50:53 -03:00
Skjalf
ca95a986ba fix(Scripts/BlackwingLair): Improve Nefarian's add animations (#11414) 2022-04-16 10:36:04 -03:00
UltraNix
3d609bfd24 fix(Core/Spells): Send proper caster's guid in SMSG_SPELL_START/SMSG_SPELL_GO packets in case of spells casted originally by gameobjects. (#11337)
Added visual channeling when mind controlling Razorgore by player.
Fixes #11275
2022-04-15 12:16:02 -03:00
IntelligentQuantum
ab4ee71762 feat(Core/Maps): AreaBoundary (#10525)
* cherry-picked commit (2da458c56d)
2022-04-15 14:10:41 +02:00
Axel Cocat
17e143763a fix(Core/Unit): Remove some hardcoded texts (#5816) 2022-04-15 13:17:06 +02:00
Skjalf
2f5a5dffcb fix(Scripts/BlackwingLair): Solve the issue with Nefarian occasionall… (#11398) 2022-04-14 17:27:04 -03:00
Nefertumm
6a931b6be2 fix(Core/BWL): Orb of Command areatrigger (#11385) 2022-04-13 08:55:06 -03:00
Nefertumm
1b1e29bef4 fix(Core/BWL): Nefarian class call spells (#11384) 2022-04-12 20:38:08 -03:00
UltraNix
f124ae14a9 fix(Scripts/BlackwingLair): Do not spawn more than 52 Razorgore's add… (#11274) 2022-04-11 12:01:40 -03:00
Nefertumm
1ee058dfd8 fix(Core/BWL): Nefarian spawns (#11326)
* fix(Core/BWL): Nefarian spawns

* Rogue class call with vanish

* backticks

* despawn skeletons after death

* Update boss_nefarian.cpp
2022-04-11 08:15:15 -03:00
UltraNix
1cce367645 fix(Scripts/BlackwingLair): Prevent Razorgores' eggs from respawning … (#11336)
* fix(Scripts/BlackwingLair): Prevent Razorgores' eggs from respawning after wipe.

* Update.

* Update.

* Update.
2022-04-09 08:59:47 -03:00
Nefertumm
4dcab1f7bc fix(Core/BWL): Razorgore spawns timer (#11320) 2022-04-07 12:28:32 -04:00
UltraNix
c047311788 Scripts/Spells: Suppression Aura should not hit stealthed units. (#11270)
* Scripts/Spells: Suppression Aura should not hit stealthed units.

Fixes #11249

* Update.

* Update data/sql/updates/pending_db_world/rev_1648996451912542300.sql

Co-authored-by: Nefertumm <nefertum.dev@protonmail.com>
2022-04-07 12:28:12 -04:00
Kitzunu
b41967a067 feat(Core/GameObject): Gob flag helpers (#11287) 2022-04-05 13:52:58 +02:00
Kitzunu
edb7cac19b feat(Core/Unit): NPCFlags helpers (#11286)
* cherry-pick commit (TrinityCore/TrinityCore@d611925)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
2022-04-05 13:52:42 +02:00
UltraNix
95ee81ae2a fix(Core/Spells): Razorgore's Explosion ignores LoS. (#11253)
* fix(Core/Spells): Razorgore's Explosion ignores LoS.

Fixes #11180

* Update.

* Update.

* Update.
2022-04-05 05:29:36 -03:00
UltraNix
5df8fd9ad7 fix(Scripts/BlackwingLair): Razorgore should not attack units with Conflagrate. (#11272)
Fixes #11183
2022-04-05 05:28:27 -03:00
Nefertumm
32009468c8 fix(Core/BWL): Blackwing Lair improvements (#11244) 2022-04-03 03:14:41 -03:00
UltraNix
b58ffb4f6b fix(Scripts/BlackwingLair): Chromaggus should not attack units afflic… (#11254)
…ted by Time Lapse: Bronze.
2022-04-03 03:04:23 -03:00
UltraNix
36e884dca8 fix(Scripts/BWL): Chromaggus Affliction debuff should target… (#11161)
… max 12 players.
2022-04-02 10:59:52 -03:00
UltraNix
353f518561 fix(Scripts/BlackwingLair): Suppression Trap casts its aura 5 sec afer re-activate. (#11252)
Fixes #11177
2022-04-02 07:37:31 -03:00
Kitzunu
535c7451a2 feat(Core/Unit): New helpers for DynamicFlags (#11230)
* feat(Core/Unit): New helpers for DynamicFlags

* cherry-pick commit (d611925dc7)

Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* oopsie

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-04-01 07:14:29 -03:00
UltraNix
4521dcb5c5 fix(Scripts/AlteracValley): Crashfix. (#10976)
* fix(Scripts/AlteracValley): Crashfix.

* Update.
2022-04-01 06:58:28 -03:00
Kitzunu
856aed6fc6 feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227) 2022-03-30 07:59:42 -03:00
Nefertumm
540b5fcaa4 fix(DB/Core/Misc): More adjustments to BWL (#11154) 2022-03-27 07:55:07 -03:00
Nefertumm
3a69d36a99 fix(Core/BWL): Victor Nefarius encounter not resetting properly (#11145) 2022-03-27 07:53:13 -03:00
IntelligentQuantum
a704aa3005 feat(Core/Spells): Move Spell death knight initiate visual to spell scripts (#11103) 2022-03-27 02:02:17 -03:00
UltraNix
2ddf2303ea fix(Scripts/Blackwing Lair): Supression traps should not be disarmed... (#11082)
…after Broodlord defeat.
2022-03-26 22:58:10 -03:00
Nefertumm
69a3904b8e fix(Core/BWL): Victor Nefarius Shadow Bolt (#11078) 2022-03-26 22:56:30 -03:00
acidmanifesto
606c5dc7a8 Fix (core) Death Comes from high Client Crash Fix (#11136)
This fixes the client side crash while flying as the EYE OF ACHERUS, apparrently if the player lacks the visual spell on his character the client would crash. This is something I just want NOT ABLE to identify in debugger, however, true story also by the way, @TheDdraig made a suggestion while being both stone and highly intoxicate that he came up with the insane nonsensible approach that actually solved the issue 100%.

Co-Authored-By: TheDdraig <62179779+TheDdraig@users.noreply.github.com>

Co-authored-by: TheDdraig <62179779+TheDdraig@users.noreply.github.com>
2022-03-25 10:13:03 -04:00