Commit Graph

51 Commits

Author SHA1 Message Date
Kitzunu
73bd2b446c fix(Core/Groups): Level restriction on allowing raid groups (#12110) 2022-06-21 13:18:03 -03:00
天鹿
40a5eef152 refactor(Core/Instances): Update CHAR_DELETE_INSTANCE_SAVED_DATA (#11866)
* Update InstanceSaveMgr.cpp

* Update Group.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update InstanceSaveMgr.cpp

* Update Group.cpp

* Update PlayerMisc.cpp

* Update InstanceSaveMgr.h

* Update Group.cpp

* Update PlayerMisc.cpp

* Update Group.cpp

* Update Group.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.h

* Update Group.h

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.cpp

* Update InstanceSaveMgr.cpp
2022-05-30 15:27:50 -03:00
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
UltraNix
3d4f9d6a18 fix(Core): Crashfix. (#11346)
Fixes #11281
2022-04-11 11:16:34 -03:00
Kitzunu
b709a22ddc feat(Core/Players): PlayerFlag helpers (#11294)
* feat(Core/Players): PlayerFlag helpers

* Update Player.h

* fix build
2022-04-05 18:53:50 +02:00
Kargatum
78bdc89881 feat(Core/Battleground): rework bg queue system (#10817) 2022-03-15 14:36:49 -03:00
UltraNix
9d12652c3e fix(Core/Misc): Remove from LFG/batleground queues when teleported to battleground/LFG dungeon. (#10740)
Players cannot queue up for battleground during LFG dungeon.
Players cannot queue up for LFG dungeon during battleground/arena match.
Fixes #10635
2022-02-20 12:33:04 -03:00
Kitzunu
455899dc75 fix(Core/Misc): Change const to be after type name (#10591) 2022-02-14 16:05:45 -03:00
Kitzunu
ead906c58f refactor(Core/Packets): Rewrite MSG_RANDOM_ROLL to new packet class (#10590)
* refactor(Core/Packets): Rewrite MSG_RANDOM_ROLL

* cherry-pick commit (c0f516caee)

Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-Authored-By: DJScias <439655+DJScias@users.noreply.github.com>

* handle crash check in DoRandomRoll()

* Update MiscPackets.h

* Update Player.h

Co-authored-by: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-authored-by: DJScias <439655+DJScias@users.noreply.github.com>
2022-02-11 10:30:49 +01:00
Kargatum
de13bf426e feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view`

* CString

* 1

* chore(Core/Misc): code cleanup

* cl

* db fix

* fmt style sql

* to fmt

* py

* del old

* 1

* 2

* 3

* 1

* 1
2022-02-05 00:37:11 +01:00
Kargatum
5969df4e30 refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp

* rework logging

* add fmt replace logs

* logging

* FMT_LOG_

* settings

* fix startup

* 1

* 2

* 3

* 4

* 5

* fmt::print

* to fmt
2022-01-27 16:44:41 +01:00
Kargatum
8b7df23f06 feat(Core/Time): Implement saparated manager for game time (#8630) 2022-01-24 17:55:00 +07:00
Skjalf
2d55974c0c Revert "fix(Core/Spells): Forward core changes (#8841)" (#9631)
This reverts commit 85d2c39a48.
2021-12-10 15:31:48 +01:00
acidmanifesto
85d2c39a48 fix(Core/Spells): Forward core changes (#8841) 2021-12-09 18:24:16 -03:00
Ollie Armitage
bb6b7f2fab fix(Core/Loot): Send Retrieval Mail for lost disenchant mats 2021-12-06 22:13:58 -03:00
Kargatum
f62664c987 refactor(Core/Misc): headers cleanup (#9259) 2021-11-22 17:24:39 +07:00
Skjalf
731d256420 refactor(Core/Cache): move the GlobalPlayerCache to its own class (#9166) 2021-11-18 16:53:36 +01:00
UltraNix
a0a5a9a223 fix(Core/DungeonFinder): premade LFG groups are considered as single-person groups (#9135)
- Closes #8812
2021-11-14 23:49:38 +01:00
UltraNix
1ec612e65b fix(Core/DungeonFinder): Premade groups should be treated as normal groups. (#8520)
Fixes #8339
2021-10-20 05:29:24 -03:00
Kargatum
52aa0e9966 feat(License): add new headers information about license (#7941)
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
2021-09-30 13:40:52 +07:00
Kitzunu
2f449326e0 refactor(Core): Rename ...Manager to ...Mgr (#6910)
* Rename MapManager.h to MapMgr.h

* Rename BanManager.h to BanMgr.h

* Rename MapManager.cpp to MapMgr.cpp

* Rename BanManager.cpp to BanMgr.cpp

* Rename MapRefManager.h to MapRefMgr.h

* Rename ThreatManager.h to ThreatMgr.h

* Rename GridRefManager.h to GridRefMgr.h

* Rename ThreatManager.cpp to ThreatMgr.cpp

* Rename GroupRefManager.h to GroupRefMgr.h

* Rename HostileRefManager.h to HostileRefMgr.h

* Rename HostileRefManager.cpp to HostileRefMgr.cpp

* Rename MMapManager.h to MMapMgr.h

* Rename FollowerRefManager.h to FollowerRefMgr.h

* Rename VMapManager2.h to VMapMgr2.h

* Rename IVMapManager.h to IVMapMgr.h

* Rename MMapManager.cpp to MMapMgr.cpp

* Rename VMapManager2.cpp to VMapMgr2.cpp

* Rename RefManager.h to RefMgr.h

* Rename WaypointManager.h to WaypointMgr.h

* Rename WaypointManager.cpp to WaypointMgr.cpp

* Rename MPQManager.h to MPQMgr.h

* Rename MPQManager.cpp to MPQMgr.cpp

* Rename IMMAPManager.h to IMMAPMgr.h

* fix build

* Update Main.cpp

* chore(Core/Misc): Remove toxic language

* Revert "chore(Core/Misc): Remove toxic language"

* fix build

* build
2021-09-15 17:50:28 +02:00
UltraNix
1b7d3708a6 fix(Core/Loot): (#7452)
- Players that did not participate in killing dungeon boss are not eligible to get loot.
- Players that are too far away from the looted object are not eligible to get loot.
- Players that released spirit and were outside the dungeon when the loot has been released are eligible to get loot.
- Players that have pending bind are not eligible to get loot.
- Properly get loot recipient for some chests in dungeons.
- All above fixes should work in any loot mode (group loot, master loot, etc.)
- Closes #2104.
2021-08-24 23:48:22 +02:00
Kargatum
b2a0714205 feat(Core/Arena): support cross-faction teams (#6448) 2021-06-26 15:37:33 +02:00
Kargatum
9ac6fddcae feat(Core/Database): port TrinityCore database API (#5611) 2021-06-22 06:21:07 +02:00
Kargatum
5787d00d54 chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2021-06-21 03:07:12 +02:00
Francesco Borzì
466cdb68d6 refactor(Core): code cleanup (part 2) (#6374) 2021-06-16 20:40:42 +02:00
Axel Cocat
0e8e21b812 fix(Core/Groups): fix group enchanting level not resetting properly (#5501) 2021-05-07 13:51:39 +02:00
Axel Cocat
f70ed8b8ca fix(Core): fix chests not despawning when opened in group (2) (#5387)
* fix(Core): fix chests not despawning when opened in group

* fix(Core): fix crashes in pr #5371

* Replaced nullptr checks

* Used if with initializer instead of separate scope
2021-05-01 07:03:59 +02:00
UltraNix
f4c226423d feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885) 2021-04-25 22:18:03 +02:00
Francesco Borzì
2c5cb29ad4 Revert "fix(Core): fix chests not despawning when opened in group (#5371)" (#5386)
This reverts commit cd6ee1c644.
2021-04-21 10:32:32 +02:00
Axel Cocat
cd6ee1c644 fix(Core): fix chests not despawning when opened in group (#5371) 2021-04-20 22:51:55 +02:00
Kargatum
4af4cbd3d9 feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging

* correct level for sql.sql

* del unused config options

* Correct build

* correct after merge

* whitespace

20:29:37 1. 'Player.cpp'. Replace (1)
20:29:37 2. 'ObjectMgr.cpp'. Replace (3)

* 1

* correct logging

* correct affter merge

* 1

* 2

* LOG_LEVEL_WARN

* #include "AppenderDB.h"

* 3

* 4

* 5

* 1. 'WorldSocket.cpp'. Replace (1)

* 6

* 1
2021-04-17 11:20:07 +02:00
Kargatum
2b3d46bd4f feat(Core/Hooks): added collection of hooks to extends AC (#3047)
This collection of hooks comes from the Maelstrom project. It allows to release modules such as :
- 3v3-soloqueue
- 1v1 arena
- pvestats

and many others
2021-04-13 13:26:39 +02:00
Francesco Borzì
f6a17164be fix(Core/License): issue with old files license (#4762) 2021-03-17 09:46:01 -06:00
Kitzunu
28f1dc5c0c refactor(Core): replace NULL with nullptr (#4593) 2021-03-02 01:34:20 +01:00
Kitzunu
dbc0ff6554 refactor(Core): sort #includes alphabetically (#4579) 2021-02-24 22:34:42 +01:00
Kargatum
ea93a5c1a1 feat(CI/Codestyle): added codestyle check (#3668) 2021-01-09 11:59:50 +01:00
Kargatum
a2b26272d2 refactor(Core/Game): restyle game lib with astyle (#3466) 2020-10-12 10:08:15 +02:00
Kitzunu
1f89282b22 refactor(Core): NULL -> nullptr (#3275)
* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
2020-08-31 11:55:09 +02:00
Kaev
2fa9f5c249 fix(Core): potential crashes/bugs reported by static analysis #2 (#2622) 2020-02-03 07:52:27 +01:00
Shard
35b6bedd81 fix(Core/DK): Don't allow starter dk to queue bg (#2584) 2020-01-26 16:25:48 +01:00
Kaev
999d588c37 fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617) 2020-01-25 14:26:38 +01:00
Shard
067d9e791f fix(Core/Battlegrounds) Rewrite RandomBG and enabling bg/arenas weights (#2516) 2019-12-28 09:40:13 +01:00
Nefertumm
c15206fc15 Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)
This reverts commit 51b8773528.
2019-02-15 15:14:49 -03:00
Viste(Кирилл)
51b8773528 feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)
i.e. world update start
2019-02-14 19:22:17 +01:00
Nefertumm
dd300003e2 Update license links (#783) 2018-03-12 10:54:57 +01:00
Yehonal
17332304fd Using TC structure allowing easier patches importing 2017-12-21 00:20:29 +01:00
Yehonal
b0c8eceb08 Refactoring part 2 [W.I.P] 2016-08-12 02:38:26 +02:00
Yehonal
2636b90869 Improved ScriptMgr with more hooks 2016-08-08 11:46:34 +02:00
Yehonal
f6eefedcd5 converted all tabs to 4 spaces 2016-06-26 19:23:57 +02:00