Commit Graph

173 Commits

Author SHA1 Message Date
Francesco Borzì
02a05fbd4c refactor(src/common): remove unused imports (#19506)
* refactor(src/common): remove unused imports

* fix: build

* chore: fix build

* chore: size_t -> std::size_t

* chore: fix fuckup from previous commit

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build with std::size_t

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build
2024-07-30 20:06:46 -03:00
Kitzunu
6c0afe1810 refactor(Core/WorldSession): Make SendNotification use fmt and parse acore_string (#19489)
* refactor(Core/WorldSession): Make SendNotification use `fmt`

* Make SendNotification use `fmt`

* Make SendNotification parse acore_string entries
2024-07-28 01:25:06 +02:00
Kitzunu
5a4692e45a chore(Core/Misc): #include cleanup (#19255) 2024-07-02 15:52:02 +02:00
Anton Popovichenko
9815025341 feat(Core/Network): Add Proxy Protocol v2 support. (#18839)
* feat(Core/Network): Add Proxy Protocol v2 support.

* Fix codestyle and build.

* Another codestyle fix.

* One more missing include.
2024-05-04 13:38:32 -03:00
Johaine
3a93ae1af1 feat(Core/Optimization): Correctly document sendBuffer size and optimize it. (#18647)
* Fix comment documenting WorldSocket

The buffer is constructed with 4096 bytes but later resized in
WorldSocketThread::SocketAdded() according to the configuration
setting Network.OutUBuff (currently 65536 bytes)

* Reuse calculated packet size

Instead of recalculating the current packet size three times at
worst, calculate it once and reuse it when required.

* Reduce reserved buffer size per WorldSocket

Don't reserve 64kB of memory for every WorldSocket's output
buffer.

Instead, start with a 4kB baseline for every WorldSocket and grow
the buffer size dynamically when we have single packets that do
not fit the current buffer.
2024-04-06 10:22:32 -03:00
Anton Popovichenko
aee2eefb92 feat(Core/Optimization): Reduce CPU consumption by allocating sendBuffer only when it is needed. (#18628)
* feat(Core/Optimization): Reduce CPU consumption by allocating the sendBuffer only when it is needed.

* Remove whitespaces.
2024-04-01 05:49:42 -03:00
Anton Popovichenko
73340b94e3 feat(Core/Compression): Move packets compression from map to network thread (#18602)
* feat(Code/Compression): Move packets compression from map to network thread.

* Code style fix

* Remove unicode letter
2024-03-28 08:57:29 -03:00
Nathan Handley
4321b8a4de feat(Core/Scripting): Implement new hook OnBeforePlayerLogout() (#18163)
* new hook OnPlayerPreLogout

* Changed PreLogout to BeforeLogout per review

* Renamed OnPlayerBeforeLogout to OnBeforePlayerLogout per review

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-01-14 00:10:49 +01:00
Winfidonarleyan
eb1ecc38a5 feat(Core/Scripting): move all script objects to separated files (#17860)
* feat(Core/Scripts): move all script objects to separated files

* Apply 5bfeabde81

* try gcc build

* again
2023-12-02 21:13:20 +01:00
Tristan 'Natrist' Cormier
4c94f62144 chore(Core/Account): move AccountMgr::IsGMAccount() to class WorldSession (#17845) 2023-11-28 21:44:48 +01:00
Winfidonarleyan
9ecb85acb5 chore(Cleanup): added new lines to the end of files where they are not present (#17774) 2023-11-19 11:57:37 +07:00
Winfidonarleyan
e90d7a2f92 chore(Core/Misc): sort includes (#17776)
* chore(Cleanup): sort includes

* fix build

* fix build again
2023-11-18 17:51:26 +01:00
Tristan 'Natrist' Cormier
f1cb3bfb3b refactor(Core/Network): remove redundant logging calls from some message handlers (#17565)
chore: removed redundant logging calls from some message handlers
2023-11-08 21:53:43 +01:00
Winfidonarleyan
c5564e1363 feat(Deps/Fmt): update fmt lib to 10.1.1 (#17643) 2023-11-05 13:15:45 +07:00
Stefano Borzì
168192b731 fix(CI): cppcheck failure step (#17240)
* feat: add cppcheck for scripts

* fix: cppcheck step failure

* trigger cppcheck build, it should fail

* fix: cppcheck should succeed

* fix: cppcheck
2023-09-21 12:43:57 +02:00
Kitzunu
1621da00da chore(misc): Mordenize maths (#17273) 2023-09-17 17:00:53 +02:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Tereneckla
9482836e33 fix(Core/Session): don't refund soul shards when logging out with warlock pets (#16803) 2023-07-21 19:16:11 -03:00
Mickaël Mauger
6edcf05cc2 fix(Core/AuctionHouse): Fix AH searches with high number of auctions (#13467)
Fix AH searches with high number of auctions
2023-06-27 20:11:21 +02:00
Walter Pagani
666b5847c3 chore(Core/MiscHandler): SendAreaTriggerMessage with integer parameter (#16506)
Add the possibility for SendAreaTriggerMessage to accept an integer parameter
2023-06-15 19:06:13 -03:00
天鹿
d75bcf0f67 chore(core): Cleanup code (#16012)
* Update SmartScript.cpp

* Update M2Stores.cpp

* Update PetHandler.cpp

* Update WaypointMovementGenerator.cpp

* Update WorldSession.cpp

* Update spell_item.cpp

* Update LoginDatabase.cpp
2023-04-19 21:34:48 -03:00
M'Dic
f10928fa5c fix (core) : Violating Flag correction (#15648) 2023-03-30 06:24:23 -03:00
Kitzunu
8b27d9c464 fix(Core/PacketIO): Require valid WorldSession for CMSG_KEEP_ALIVE (#15426)
* cherry-pick commit (de4340af37)

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-03-17 10:23:29 +01:00
Skjalf
591511c875 fix(Core/Session): Let movement flags update on their own when disabl… (#15366) 2023-03-12 17:39:08 -03:00
Skjalf
cbaa63eb64 fix(Core/Session): Inform the client when we can no longer fly (flyin… (#15363) 2023-03-12 13:25:54 -03:00
Kitzunu
cc6fcb6912 fix(Core/PacketIO): Reintroduce requeueing packets that are sent during login but need you to be logged in (#15145) 2023-02-21 00:33:18 -03:00
Kitzunu
abedfe245f fix(Core/PacketIO): Remove wrong QueuePacket() (#15124) 2023-02-19 13:33:46 +01:00
Kitzunu
d7e701a1cb feat(Core/PacketIO): Implement STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT (#15059)
Co-authored-by: Vladimir Merzliakov <29081+VladimirMangos@users.noreply.github.com>
Co-authored-by: megamage <35114+megamage@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2023-02-17 09:11:11 +01:00
AnchyDev
246b20683f feat(Core/Warden): Allow sending of custom lua payloads through Warden. (#14723) 2023-02-13 00:42:58 +01:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
UltraNix
61dec3f143 fix(Core/Socket): CMSG_WARDEN_DATA should not reset idle connections. (#14865) 2023-02-05 11:47:59 +01:00
Kitzunu
4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01: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
Winfidonarleyan
a1a1528cb4 feat(Core/Crypto): add support OpenSSL 3.0 (#13354) 2022-11-24 01:12:20 +07:00
M'Dic
8b9541873a feat(Core/ChatHandler/Conf): Flood Control Addon Messages (#12603)
* feat(Core/ChatHandler): Flood Control Addon Messages

Original Closed PR by @Kitzunu
https://github.com/azerothcore/azerothcore-wotlk/pull/11675

Cherrypicked TC:
cherry-pick commit (TrinityCore/TrinityCore@5384fc1)
cherry-pick commit (stoneharry/TrinityCore@a0629fc)

Co-Authored-By: stoneharry 3818405+stoneharry@users.noreply.github.com
Co-Authored-By: Shauren shauren.trinity@gmail.com
Co-Authored-By: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* update: (pr): Review Response

* update: (core): Chathandler

No reason why this case should even exist. Previous or current.  This cast is under two sided interations which will always lead to you being in a group of some sorts. there is literally zero sense having a above or equal to level 80 if statement here.

* update (cleanup): Code Style

suggestion per @Nefertumm

Co-Authored-By: Angelo Venturini <nefertum.dev@protonmail.com>

Co-authored-by: stoneharry <3818405+stoneharry@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Angelo Venturini <nefertum.dev@protonmail.com>
2022-08-17 10:37:34 -04:00
ZhengPeiRu21
631686be7e fix(Core): Instance Reset Exploit Fix (#12459)
* fix(Core): Fix Instance Reset Exploit

* Whitespace fix

* Remove unnecessary include

* Check player instance save IDs when adding to map

* Only compare playerBind during login
2022-07-24 14:37:42 -03:00
Kitzunu
763a521da8 fix(Core/PacketIO): Stop WorldSession packet processing loop immediat… (#11680)
* fix(Core/PacketIO): Stop WorldSession packet processing loop immediately when AntiDOS kicks/bans the player

* cherry-pick commit (0d0cb23a63)

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

* Update WorldSession.cpp

* Update src/server/game/Server/WorldSession.cpp

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-05-10 17:17:07 +02:00
Revision
a1707b2d14 feat(Core/Player): Allow stay in group when logged out (#10887)
* Config option

* Extra check

* Fixes

Updated some comments
Removed the config option from the first if since it's not necessary (afaik)

* REVERT

Reverting the if to what I had it at originally until I can get some input on it...

* Updated if

Got some input and this is working as intended

* Update World.cpp

* Update src/server/worldserver/worldserver.conf.dist

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

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-04-25 09:29:44 -03:00
Kitzunu
1501445b0a chore(Core/Misc): nullptr cleanup (#11467) 2022-04-21 19:17:20 +02:00
IntelligentQuantum
66f301bcea feat(Core/Packets): SMSG_WORLD_STATE_UI_TIMER_UPDATE (#11047) 2022-03-27 01:31:21 -03:00
IntelligentQuantum
a5cb274222 Core/Packet: MIRROR_TIMER (#10885) 2022-03-27 01:19:26 -03:00
IntelligentQuantum
6a6d0e5907 feat(Core/Packet): SMSG_DURABILITY_DAMAGE_DEATH (#10894) 2022-03-23 13:35:30 +01:00
IntelligentQuantum
86e438a1e7 Core/Packet: SMSG_LEVELUP_INFO (#10884) 2022-03-21 04:43:45 +07:00
Kargatum
78bdc89881 feat(Core/Battleground): rework bg queue system (#10817) 2022-03-15 14:36:49 -03:00
IntelligentQuantum
1f90a18a58 feat(Core/Packet): CMSG_SET_SHEATHED 2022-03-11 18:12:21 +01:00
IntelligentQuantum
8eeb6ef1b7 feat(Core/Packet): SMSG_CROSSED_INEBRIATION_THRESHOLD (#10893) 2022-03-06 15:49:55 -05:00
IntelligentQuantum
d6b9639259 Core/Packet: LFG (#9420)
* Core/Packet: LFG

* Update LFGHandler.cpp
2022-03-06 12:05:46 -05:00
IntelligentQuantum
b275499de4 refactor(Core/Packet): Pet (#9473)
Co-authored-by: temperrr <temperrr@users.noreply.github.com>
2022-03-01 13:50:50 +01:00
acidmanifesto
69e2f2e3aa fix/feat: (Core/PacketIO): updated sound and creature addon (#10813)
* fix\feat: (Core/PacketIO): updated sound and creature addon

updated SMSG_PLAY_SOUND, SMSG_PLAY_MUSIC and SMSG_PLAY_OBJECT_SOUND via tc cherry pick
https://github.com/TrinityCore/TrinityCore/pull/2363 and 0f1f7ef401 by @joschiwald  and @ForesterDev
This so far a attempt to align atleast with sound with tc, and correct a potentional issue of hearing creature sounds that is not in visible range. I notice PlaySound was being defined in some weird dependency as it isnt with tc so I renamed it to Playsound. Notice a isLarge still being used in the creature addon when it was depreciated, so i removed that a that seem to of interfered with visibilitydistanceType.

Co-Authored-By: joschiwald <736792+joschiwald@users.noreply.github.com>
Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
2022-02-26 10:05:58 -05: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