Commit Graph

88 Commits

Author SHA1 Message Date
Kitzunu
0c4feb6744 refactor(Core/Motd): Move motd from conf to db (#15111) 2023-02-20 22:07:26 +01:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
Kempec Halk
f780ae84b8 refactor(Core/MySQL): MySQL PreparedStatement Affected Row Count (#12002) 2023-01-28 11:05:55 +01:00
SoalHuang
db2433fd79 fix(Core/Auth): Cleanup PrepareStatements (#14220)
Co-authored-by: soalhuang <soniceme@163.com>
2023-01-28 11:02:48 +01:00
Axel Cocat
07ac386e61 feat(Core/Database): move MySQL handle and HandleMySQLErrno to protected (#14673)
* feat(Core/Database): move MySQL handle and HandleMySQLErrno to protected

* fix: initialization order
2023-01-15 11:02:43 -05:00
UltraNix
b9ea8b16af fix(Core/Session): Fixed loading global account data and tutorials. S… (#14038)
fix(Core/Session): Fixed loading global account data and tutorials. Source: TrinityCore.

Fixes #11974
2022-12-06 09:08:46 -03:00
M'Dic
2e6f6e26da Add (core\db): Support for Homebind Orientation (#13389)
Add (core\db) Support for Homebind Orientation
2022-10-12 14:39:02 -04:00
Kargatum
8a334e8210 feat(Core/DB): add support range loop for mysql result (#13355) 2022-10-10 02:46:48 +07:00
UltraNix
1c6eab5856 fix(Core): Crashfix. (#12643) 2022-08-07 18:22:12 -03:00
Kargatum
4fbec972a8 refactor(Cmake): add support build selected applications and tools (#11836) 2022-05-31 17:05:39 +07:00
Axel Cocat
fbd5e981ca fix(Scripts/Commands): fix baninfo command issues (#11871) 2022-05-27 00:21:43 -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
Kitzunu
336166c83e chore(Core/Misc): Improve wiki link in database error (#11496) 2022-04-23 15:49:35 -03:00
Kargatum
c0210ad7f0 feat(Core/DryRun): add support db autoupdate for DryRun (#9572) 2022-04-21 21:12:12 +02:00
Kitzunu
7ecd738674 feat(Core/Mail): Server mail (#10628) 2022-04-19 23:43:14 +02:00
IntelligentQuantum
b6a07d38c0 feat(Core/Characters): Replace DELETE + INSERT with REPLACE (#10862) 2022-03-15 09:40:55 +01:00
UltraNix
73957b95f6 fix(Core/Mail): do not show expired mails in packets (#10560)
Fixed #5920
2022-03-01 13:57:37 +01:00
Axel Cocat
743c028e31 fix(Core/Database): use char guid if character order is null (#10243)
Co-authored-by: temperrr <temperrr@users.noreply.github.com>
2022-02-27 14:48:18 +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
Kitzunu
c63ebde9d7 feat(Guild/Commands): guild rename (#10323)
* feat(Guild/Commands): guild rename

* cherry-pick commit (678cade116#)

* Update cs_guild.cpp
2022-02-03 06:01:16 -03:00
Skjalf
c45c23ffe7 fix(Core/Player): Align SaveSeasonQuestStatus() with TrinityCore (#10503) 2022-02-02 21:14:02 -03: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
e8f34b2309 feat(Core/Common): add support fmt style for ASSERT and ABORT (#10355)
* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp
2022-01-25 23:15:51 +01:00
Kargatum
6d7f58e6ed feat(Core/Common): delete old Tokenizer (#10121) 2022-01-21 14:59:05 +07:00
Kargatum
2ca5ad6af5 feat(Core/Database): add support set arguments for PrepareStatment (#10066)
- partical cherrypick 0b3f073ca2
2022-01-21 09:45:46 +07:00
Francesco Borzì
9dc88def35 refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-01-17 14:35:07 +01:00
Malcrom
dfac47a562 feat(Core/Creature): Allow 3 ids per spawn point. TESTING (#10169)
* feat(Core/Creature): Allow 3 ids per spawn point.

* Move GetRandomId to a function

* Update id to id1

* Fixed some errors crashing core and text

* Set ids to lowercase for GetRandomId function

* Update src/server/database/Database/Implementation/WorldDatabase.cpp

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

Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-01-14 19:21:50 -04:00
Malcrom
2fd8b00d7b feat(Core/Creature): Dual id Spawning WIP (#10115)
* feat(Core/Creature): Multi id Spawning WIP

* Update Creature.cpp

* Update PR

* Add Sql

* Update rev_1641837958335217980.sql

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

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

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

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

* Update rev_1641837958335217980.sql

* Update cs_npc.cpp

* Create changes_1641842959398297300.md

* Fixed issue added with random model PR

* Update GameEventMgr.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-01-10 22:09:14 -04:00
Malcrom
f1d4266efc BREAKING CHANGE:(DB/Creature) Remove modelId field in creature table (#10071)
* fix(DB/Creature) Clear modelId field in creature table

* Change clear column to remove column

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

* Update ObjectMgr.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: acidmanifesto <joshua.lee.betts@gmail.com>
2022-01-10 16:41:33 -04:00
Kitzunu
dbc35e3495 feat(DB/Creature): Allow to set swim and flight speeds (#10067) 2022-01-09 01:34:39 +01:00
acidmanifesto
2d4e17fd16 refactor(Core/Creature): Remove Inhabit Type (#9272)
This is in reference to issue: https://github.com/azerothcore/azerothcore-wotlk/issues/4361
This is comprised of a cherry pick and partial tc cherry pick:
592516ae69
dbadb6369c
34cfa69efd
12de860b4a
a22bc236eb
2022-01-06 10:33:22 -03:00
Francesco Borzì
b748730bc8 refactor(Core): remove unused imports (#9969) 2022-01-02 20:22:09 +01:00
Kargatum
e12494d993 feat(Core/Pets): Management refactoring (#9712)
* feat(Core/Pets): rework managment

* 1

* 2

* 3

* 4

* 5

* cs pet

* check before ressurect

* pet DECLINED_NAMES

* display

- https://github.com/azerothcore/azerothcore-wotlk/issues/9297

* ArenaSpectator

* 1
2021-12-30 18:45:13 -03:00
Skjalf
58302e4196 feat(Core/Player): Implement player specific settings (#9483) 2021-12-26 08:39:15 -03:00
Skjalf
ea1ffd6894 feat(Scripts/Commands): Implement item refund command (#9811) 2021-12-20 16:11:45 -03:00
Kitzunu
d0ee420b3a fix(Core/DatabseWorkerPool): Maria stuff (#9705) 2021-12-14 22:12:36 +01:00
Kitzunu
04fd8791e1 refactor(Core/DB): Deprecate MariaDB 10.4 and below (#9675) 2021-12-14 15:15:44 +01:00
Noxies
5ec50ac119 fix(Core/Commands): Item duplication exploit (#9650) 2021-12-11 13:21:07 -03:00
Noxies
c95c29838b feat(Scripts/Commands): Item restoration command (#9538)
* Implement item restore command & move itemmove to new item cmd

* Implement LANG_COMMAND_DISABLED

* Prevent command usage if no config is set

* WIP: `.item restore list`

* Fix restore list & create base for restore item

* Send item to player via mail

* Put player as last argument

* Use Postmaster & fix restore list

* Show item name in restore list

* Update HandleItemMoveCommand to be using the api

Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>

* Send item instantly if online
2021-12-08 23:57:15 -03:00
Kargatum
51adbffae4 feat(Core/Modules): add separated lib for modules (#9281) 2021-12-02 20:28:58 +07:00
acidmanifesto
29f49108a5 chore(Core): Remove unnecessary slang Cosmetic (#9325)
* Remove unnecessary slang

Removes ZOMG! that is used in the src in logging and notes. Completely Unnecessary. Contributes to nothing useful. Inflates source. Not needed at all in any shape or form. Not Developer Lingo either.

* Further Clean Up

Removed Profanity

* sensible grammar correction

* More ZOMG! removal
2021-11-25 04:31:54 -03:00
Skjalf
2187470df7 refactor(Scripts/Commands): Update cs_quest to the new model (#9267) 2021-11-24 01:21:16 -03:00
Kargatum
f62664c987 refactor(Core/Misc): headers cleanup (#9259) 2021-11-22 17:24:39 +07:00
UltraNix
70d8b88f3b feat(Core/Modules): Preparation to implement progression-system module. (#8837) 2021-11-06 10:06:12 -03:00
acidmanifesto
93bbff4cca feat(Core/SAI): Wp table add in orientation and delay collumn (#8927)
ADD (Core) Wp table add in orientation and delay collumn
TC Cherry pick of TrinityCore/TrinityCore@4b7d19c
2021-11-06 08:43:45 -03:00
dantav
aeafd1f376 fix(DatabaseWorkerPool): state correct MYSQL version in message (#8782) 2021-11-02 18:40:55 +01:00
IntelligentQuantum
668a86762b refactor(Scripts/Commands): Convert cs_character to new system (#8768) 2021-10-30 09:04:39 -03:00
Kargatum
a650fd495c feat(Core/Metrics): implement real time statistic visualization (#8663) 2021-10-28 14:47:29 +02:00
Skjalf
9c0894ab4a fix(Core/DB): Unrestrict the amount of mails loaded (#8687)
Partially reverts d5bb6ba1c4
2021-10-24 17:15:11 +02:00
Skjalf
f96b027ffd fix(Core/Mail): load mails on login instead of when requested (#8065) 2021-10-10 17:15:24 +02:00