Commit Graph
399 Commits
Author SHA1 Message Date
MejiandShauren 895367e69f Core/BattlePets: Journal lock improvements (#27178)
Co-authored-by: Shauren <[email protected]>
2021-11-19 15:37:21 +01:00
Treeston 5fe69351b0 Core/Chat: Some hyperlink follow-ups:
* Ignore messages containing invalid links again instead of trying to sanitize them. Closes #22451.
* No longer filter messages on the addon channel. Closes #22450.

(cherry picked from commit e858706270c3059acf6915e7cf655eed0f7e88bb)
2018-09-18 01:28:57 +02:00
Shauren 3917c2ad01 Core/Misc: Send saved client settings instantly after login, not only after entering world 2021-11-06 18:33:44 +01:00
ModoX 68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Treeston 3418a33a87 Misc: Pass std::chrono types by value everywhere.
(cherry picked from commit 2ef9d301f0869b443122e2ba543af054c5b0e53c)
2021-10-14 19:39:42 +02:00
Shauren d0be92ec0a Core/Achievements: Defined all modifier tree types and implemented many of them 2021-06-07 15:37:34 +02:00
Treeston 34c7810fe5 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.

(cherry picked from commit 532ab1c7f8653d1a2e48aa1f1f8a9ba1041d4bb7)
2021-05-16 21:56:01 +02:00
jackpoz e17e4e6f07 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(cherry picked from commit 12701cb0c6c45eb105ad449eb9a56e76d84d691e)

 Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
	src/server/game/Battlefield/Battlefield.cpp
	src/server/game/Battlefield/Zones/BattlefieldWG.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Calendar/CalendarMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Item/Item.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Grids/ObjectGridLoader.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/TicketHandler.cpp
	src/server/game/Instances/InstanceSaveMgr.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Tickets/TicketMgr.cpp
	src/server/game/Tickets/TicketMgr.h
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_gobject.cpp
	src/server/scripts/Commands/cs_instance.cpp
	src/server/scripts/Commands/cs_list.cpp
	src/server/scripts/Northrend/zone_wintergrasp.cpp
	src/server/scripts/Spells/spell_item.cpp
2021-04-15 05:53:27 +02:00
Shauren d29dd1eeb5 Core/Misc: Change all unix time columns in character database to bigint (signed) 2021-04-05 23:47:05 +02:00
jackpoz f1388f37b6 Core/WorldSession: Fix idle WorldSessions getting kicked twice as fast as supposed
Fix SocketTimeOutTime and SocketTimeOutTimeActive settings being effectively halved by reducing the timeout time twice every update instead of just once, causing much faster kicks (i.e. after 30 seconds with 60 seconds set in the configs).

(cherry picked from commit 032194099e84bf0d47b121d82170c39fe73e0c87)
2021-02-25 18:50:55 +01:00
Matan Shukry 6dbaba7669 Core/Player: remaining XP logging overflow correction (#25934) 2021-01-26 16:48:28 +01:00
Matan Shukry bb24c6a11b Core/logs: added xp info on login & logout (#25867)
* Core/logs: added xp info on login & logout

* - Moved getters to header
- Changed %s to %u
2021-01-17 17:08:22 +01:00
Mikhail Redko 7625bd960e Core/WorldSession: Add RBAC permission for skipping idle connection check (#20595)
(cherry picked from commit 558382ed6d87942603fa309b16a30e64d07bb305)
2020-12-31 23:23:50 +01:00
Shauren b82a3a557a Core/DataStores: Updated db2 structures to 9.0.2
* Includes support for new character customization
2020-12-08 18:16:47 +01:00
Shauren cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01: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
Shauren 1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren 2c99678118 Core/PacketIO: Send the expected value in available hotfixes packet - realm address, not arbitrary number (it no longer has any effect for clearing client cache) 2020-08-13 14:15:26 +02:00
Treeston 77380f032b Core/Authserver: Split SRP6 into its own file (PR #25131)
(cherry picked from commit 7f7fa8b23d71297f75ff4ca3c1d6e38333a5cc76)
2020-08-03 21:16:30 +02:00
Treeston e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd915cf4ba16f428d3c1a249a71f4aa7a7)
2020-08-03 19:39:00 +02:00
Treeston 2c3fc47a96 Proper client timeout detection (#19906)
- Properly detect client timeout when logged into a character after a configurable time (default 60s) has passed without the client sending any packets.
- Fixes issues with crashed clients leaving characters in the world for a very long time (default 15 minutes), as well as edge case exploits involving intentionally pausing client execution for some amount of time.

(cherry picked from commit 7dfd472f8dff6ce067572e2887c2beb56d9ba9de)
2020-07-16 22:00:30 +02:00
Shauren 661470c658 Core/PacketIO: Convert all leftover packets to use packet classes 2020-07-02 00:07:38 +02:00
Peter Keresztes Schmidt bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
Shauren 5fce3604fc Core/PacketIO: Fixed receiving and sending db2 hotfix packets 2020-06-08 00:08:37 +02:00
Shauren bf8714b870 Core/Battlegrounds: Queue updates
* Fixed battleground queues for battlegrounds with id higher than 255
* Fixed queue display ingame after entering bg
* Fixed ingame display after leaving bg queue
* Fixed bg scoreboard
2020-05-31 16:49:18 +02:00
Shauren 0f0ca3a919 Core/DBLayer: Implement async transaction completion callbacks 2020-04-14 16:23:44 +02:00
Shauren 93aa30f447 Core/Misc: Moved CanSpeak() method to WorldSession class 2020-02-07 20:11:27 +01:00
Aokromes b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren 13440434c3 Core/DBLayer: Prevent mixing databases with query holders 2019-07-27 11:45:56 +02:00
Shauren f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
ariel- 26fe949619 Core/Server: fix duplicated inserts into tutorials table for newly created characters
(cherrypicked from 60dd803bbe01283b15e2b2c5b02d8f857b96745a)
2019-07-21 21:06:54 +02:00
xinef1 b485f3e673 Few small optimizations here and there (#18684)
Changes list:
- Added CharacterGuidByNameContainer which contains name -> guid unordered map (updated along CharacterInfo)
- Extended CharacterInfo structure with GuildId
- Extended CharacterInfo structure with ArenaTeamId[3], for all possible teams (2v2, 3v3, 5v5)
- Removed CHAR_SEL_GUID_BY_NAME and CHAR_SEL_CHAR_GUID_BY_NAME synchronous queries, name -> guid can be now retrieved in World::GetCharacterGuidByName
- Removed CHAR_SEL_GUID_RACE_ACC_BY_NAME synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_CHAR_LEVEL synchronous query, level can be retrieved by guid
- Changed CHAR_SEL_CHARACTER_ACTIONS_SPEC to asynchronous query, action bars are now loaded asynchronously
- Removed CHAR_SEL_CHARACTER_NAME_CLASS synchronous query, guid can be retrieved by name and rest of the data can be retrieved by guid
- Removed CHAR_SEL_PLAYER_ARENA_TEAMS and CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID synchronous queries, arena teams are now stored in CharacterInfo
- Replaced synchronous db calls with CharacterInfo lookups
- Removed ObjectMgr::GetPlayerGUIDByName, as it used db query
- Replaced some unnecessary UpdateObjectVisibility() calls because they were either duplicated (called few lines above in other function) or it is enough to call DestroyForNearbyPlayers because object is being removed or should be invisible and DestroyForNearbyPlayers is faster
- Corrected typo in Player::DestroyForPlayer, only items in slots 0 to EQUIPMENT_SLOT_END are sent to other players
- Renamed Player::GetGuildIdFromDB to Player::GetGuildIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetArenaTeamIdFromDB to Player::GetArenaTeamIdFromCharacterInfo and changed the function to use CharacterInfo structure
- Renamed Player::GetLevelFromDB to Player::GetLevelFromCharacterInfo and changed the function to use CharacterInfo structure
- Removed GameEventMgr::_questToEventLinks and associated functions, eventId is now stored in Quest class under _eventIdForQuest variable
- Changed some functions checking quest status to use other functions for quest status check instead of duplicating code
- Removed callback from add friend, because we can get the guid from appropriate storage, no need to make db query
- Removed callback from add ignore, because we can get the guid from appropriate storage, no need to make db query
- Added callback to unwrap wrapped items asynchronously
- Removed synchronous select in tutorials to check if we have any entries in db, if any entry exists in db, m_TutorialsChanged variable will have TUTORIALS_FLAG_LOADED_FROM_DB flag added and it is no longer necessary to query database

(cherrypicked from b955456008191e60b6bda1f22e3486a3792b08db)
2019-07-21 21:06:54 +02:00
Shauren 74a801182a Core/PacketIO: Updated packet encryption to 8.2 2019-07-14 19:20:45 +02:00
Shauren 455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael 5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren 7512ffb058 Core/Entities: Update updatefields to 8.0.1.27980 2018-10-10 22:11:41 +02:00
Shauren ee682544d0 Core/PacketIO: Updated opcode enum to 8.0 2018-10-01 21:01:10 +02:00
Shauren 4af15915bc Core/PacketIO: Updated opcodes and packet structures to 7.3.5 2018-02-18 16:33:49 +01:00
Shauren dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00
vincent-michael 7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren 20a3c9eed2 Core/PacketIO: Update opcodes to 7.3.2 2017-12-30 00:23:43 +01: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 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
Shauren beb3316089 Core/Shared: Include cleanup 2017-05-13 11:49:09 +02:00
Shauren 7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
Shauren 3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00
Shauren 6636ca8585 Core/DataStores: Updated sending out hotfixes 2017-04-19 19:10:49 +02:00
Shauren 8e2634b2b4 Core/DBLayer: Convert async queries to new query callbacks and remove old callback handling 2017-01-13 21:38:03 +01:00