Commit Graph

1034 Commits

Author SHA1 Message Date
Shauren f6b0d99e2c GCC build fix
Closes #22785
2018-11-12 00:39:53 +01:00
Treeston c16d461e16 Core/Util: Redesign SmartEnum to properly work for large enums (>64 entries) and play nice with IDEs (PR #22768) 2018-11-11 17:52:41 +01:00
Treeston 338e8ba0fe Core/Misc: Partial merge of 3.3.5-dbedit:
- Added SmartEnum.h for enum iteration, stringification, and more, courtesy of krabicezpapundeklu/smart_enum
- Moved a bunch of enums in SharedDefines.h to the new system
- Miscellaneous utility methods ported
2018-10-26 14:43:22 +02:00
ccrs 7417cbc655 Core/Shared: add BattlefieldBattleId definitions
Also rename BG_TEAMS_COUNT and BattlegroundTeamId
2018-10-24 16:45:26 +02:00
Treeston f2447a8dfc Core/DBC: Some cleanup of Cleanup (8edea4a follow-up) 2018-10-02 20:05:22 +02:00
Treeston 8edea4a3c2 Core/DBC: Sanitize DBC loading procedure. Extra checks. Capability to load strings from DB. Load SpellName from spell_dbc. 2018-10-02 19:01:57 +02:00
Treeston ab3eab990e Core/Misc: Revert 4990423, need to find out a better way to handle this. 2018-09-27 20:59:48 +02:00
Treeston 4990423dbf Core/Misc: Unify naming of DBC entry, storage and format identifiers based on DBC file name
* DBC file name: <dbc>.dbc
* Format string: DBCfmt_<dbc>
* DB Format string: DBCfmt_<dbc>_DBFormat
* DB index string: DBCfmt_<dbc>_DBIndex
* Entry struct: <dbc>Entry
* Global storage: s<dbc>Store
2018-09-27 18:19:20 +02:00
Treeston 1dc675f0a1 Core/Misc: constexpr a bunch of things, and a missing include of Windows.h somewhere
(that last one wasn't me!)
2018-09-27 14:42:42 +02:00
Treeston 8ad5322465 Core/Misc: Move some headers from game/ to shared/ 2018-09-27 14:01:34 +02:00
jackpoz deabd4ab45 Core/Packets: Reduce memory footprint of cached queries (#22297)
Ensure only the minimum required memory is used by caching query packets by calling shrink_to_fit()
2018-08-22 19:44:21 +02:00
Shauren fcb1e3e642 Core/PacketIO: Added missing move assignment operator to ByteBuffer 2018-04-19 17:35:57 +02:00
Shauren c01d4ceadc nopch build fix 2018-01-08 20:40:53 +01:00
Shauren b2b4f9d1e4 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

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
Shauren 6da6f1b415 Core/Networking: Activate single threaded optimization for io_service running in NetworkThread
(cherry picked from commit 9711dd3f70)
2018-01-06 12:29:23 +01:00
tkrokli f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Naios 85e460802d Build: Inherit the features and warning flags privately
(cherry picked from commit 1285347518)
2017-12-21 23:31:11 +01:00
Naios 92f96fc10e Build: Use the cotire library for precompiled header handling
* Required for handling flags inherited by linked projects
  correctly in the corresponding precompiled header.
* Reduces the maintenance effort for precompiled headers
2017-12-17 20:22:34 +01:00
Aokromes 6c9c106d39 Misc: More cleanup 2017-11-25 03:00:05 +01:00
Aokromes 59e94fd9bb Misc: More cleanup 2017-11-25 02:39:27 +01:00
jackpoz 9b7c73a19d Core/Misc: Fix static analysis issues 2017-11-12 12:38:18 +01:00
jackpoz b2a341df6e Core/Misc: Fix static analysis issues 2017-07-15 16:22:32 +02:00
ariel- 85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren 7874bee7bf Core/Misc: Cleanup worldserver/authserver main() functions to run destructors in predictable order
* world/auth servers will now fail to startup if listen ports are in use
* Restored "Network.OutUBuff" config option lost during boost transition

(cherry picked from commit 6c92a481a3)
2017-06-19 04:04:21 -03:00
Shauren f59bac4d14 Build fix 2017-06-05 20:00:28 +02:00
ariel- d56a28afee Core/Globals: add more AIName and MovementType checks to ObjectMgr
- Ninja fix AI factories (restores prev behaviour of not selecting stuff with PERMIT_BASE_NO)

Closes #19831
2017-06-02 04:17:29 -03:00
ariel- ce3787f190 Core/AI: Factory functions cleanup
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
2017-06-01 02:29:20 -03:00
xinef1 b955456008 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
2017-01-28 01:00:28 -03:00
tkrokli 6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
ariel- 3b6fd226be Core/Misc: fix interaction of spells like Shadowmeld with Threat reducing effects
- SPELL_AURA_MOD_TOTAL_THREAT should be temporary and not added/subtracted from total, only computed
- Cleanup of reference related code
- Kill getLast() and reverse iterator obsevers, LinkedList iterator can't be used as a standard reverse_iterator (ie with operator++). They weren't used anyways
2016-10-06 23:14:51 -03:00
jackpoz 4073cc510a Core/Packets: Port packet handling rework from 6.x branch (#17777)
* Core/Packets: Port packet handling rework from 6.x branch

Port packet handling reword from 6.x branch. Old handlers are still used at the moment, these changes allow to port old handlers to new packet-specifc ones.
2016-08-19 22:29:00 +02:00
jackpoz 1d7013e0e2 Core/MMAPs: Update recast
Update recast to https://github.com/recastnavigation/recastnavigation/commit/64385e9ed0822427bca5814d03a3f4c4d7a6db9f
2016-08-17 22:00:35 +02:00
jackpoz 194fbd1792 Core/Dynamic: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
2016-08-12 11:33:02 +02:00
r00ty-tc de918a0f64 Core/Maps - Improvements to Cinematic function
- Moves to own class for reading, storage and player subclass
 - Proper destruction handling for player (ensure cinematic is ended)
 - Timeout for cinematic if it reaches past the end without completing
 - boost::filesystem::path used for path/filename transform
 - Correct for assert trigger under certain circumstances
 - Other changes previously suggested
2016-05-11 11:56:25 +02:00
r00ty-tc 87b4533046 [Core/Maps] Activate creatures and objects during opening cinematics and other flyby
cameras (sunwell etc).

Requires re-running map extractor to extract camera m2 files from data
files. These are very small.

Closes #4755
Closes #16772
2016-04-14 01:34:17 +02:00
Shauren c0b6b164f0 Build fix 2016-04-09 18:58:06 +02:00
Shauren 836788ed3c Core/Misc: MSVC /W4 warning fixes
(cherry picked from commit 08c27d3205)
2016-04-09 18:25:53 +02:00
Shauren 702cfefddb Buildsystem: Initial changes to support building with vs clang toolset
(cherry picked from commit 4a3a178d7f)
2016-04-09 12:38:20 +02:00
Shauren b841546574 Core/Common: Moved MessageBuffer to common
(cherry picked from commit a81a204678)
2016-04-09 12:31:04 +02:00
Shauren 778f1725f8 Core/Misc: Moved RealmList to shared
(cherry picked from commit cfe8a6a58b)
2016-04-09 12:30:00 +02:00
DDuarte 980f28d2ce Core/Network: Change SocketMgr.StartNetwork to take the thread count by arg instead of config
AuthSocketMgr doesn't need "Network.Threads" config

Fixes "Missing name Network.Threads in config file authserver.conf"

Ref #16859
2016-03-28 02:02:29 +01:00
Naios 522f769fa3 Core/Shared: Converted the shared library to a shared library ,-).
* There is still the possibility to static link against shared.

(cherry picked from commit 25b0e743b1)
2016-03-24 02:46:26 +01:00
Naios 5ac4507c87 Core/Shared: Fix no PCH build 2016-03-18 14:28:03 +01:00
Naios 469f2d3ade CMake: Use inherited dependencies in database, shared and game 2016-03-18 02:52:59 +01:00
Shauren e32bb4de9c Build fix 2016-03-13 00:22:53 +01:00
Shauren 811b29c8e1 Core/Networking: Added new AsyncRead method to Socket class allowing to pass a custom completion handler
(Partially cherry-picked from f123c39659)
2016-03-12 23:56:18 +01:00
Shauren 3ed41235f3 Core/Misc: Removed unneccessary boost/asio/buffer.hpp include
(cherry picked from commit 01be486f2f)
2016-03-12 23:44:49 +01:00
Shauren 9b5adcc6fc Core/Networking: Fixed DelayedCloseSocket when compiled without TC_SOCKET_USE_IOCP (linux)
Closes #16769

(cherry picked from commit 0daba931ef)
2016-03-12 19:44:06 +01:00
Naios fbe724fab9 Core/Common: Generalize platform specific includes in common/Platform
(cherry picked from commit 30517cb1d3)
2016-03-11 19:09:56 +01:00
DDuarte 2ea31027e5 Core: Backport 6.x realm changes
Make acessible all the info about current realm (e.g name) anywhere, not only realm id
Reduce the number of differences between the two branches

Original changes by Shauren

Partial port of bacc90b6ba and 63def8aa32
2016-03-06 19:46:59 +00:00