Commit Graph

1016 Commits

Author SHA1 Message Date
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 64385e9ed0
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
Shauren
2345e84855 Final build fix for gcc 4.7 (no longer supported in 8 days) 2016-02-21 14:13:00 +01:00
Shauren
b2e03a7448 Core/Networking: Rewrite networking threading model
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking
Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet

(cherry picked from commit 97a79af470)
2016-02-20 13:08:03 +01:00
Shauren
55ef8d80a3 Core/Utils: Moved rng functions to separate header and added utility functions to select a random element from a container where each element can have different chance of being selected
(cherry picked from commit ae20b2ab56)
(cherry picked from commit 921d893c2a)
(cherry picked from commit 9ab10d6e68)
(cherry picked from commit 00c878e73a)
(cherry picked from commit ff9c999334)
(cherry picked from commit bc94bacce4)
(cherry picked from commit d5b0ffbe9b)
2016-02-09 19:26:29 +01:00
Rushor
923a368ac7 Update copyright note for 2016 2016-01-01 12:02:33 +01:00
Vincent-Michael
7d5e7102cd Core: Whitespace cleanup 2015-11-07 20:01:53 +01:00
Shauren
60da7c6552 Core/Networking: Fixed possible crashes happening if async query retrieving account data takes too long
Closes #14944

(cherry picked from commit 590c6e399d)
2015-10-31 16:04:14 +01:00
Shauren
97fe228334 Core/Threading: Fixed possible data races after making auth queries async by moving their processing to boost::asio::io_service::run threads
(cherry picked from commit f6bc87fe5d)
2015-10-31 15:56:02 +01:00
pete318
dcb7082277 Map local guids 6.x -> 3.3.35:
Implemented:
  ca83e14f8b
  ee1c1b97be
  18e4ab6911
  bf37446b3c
  cb854a2b7b

* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396e
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
* Added new function to return but not increment guid
* Adjusted .debug loadcells to show low guid in map before/after load
* Added debug messages for creature spawn/destroy, for map guid debugging
* Store all Gameobjects and Creatures added to OutdoorPvP, so the callback script can be removed when OutdoorPvP instance is destroyed.
2015-09-22 21:33:57 +02:00
StormBytePP
405f823f68 Core/BuildSystem: Merged crypto and gitrevision into common, cleaned include directory lists (to mimic 6.x buildsystem) 2015-08-24 03:38:54 +02:00
StormBytePP
0cc3d883e1 Core/Build: Renamed Revision.h to GitRevision.h to avoid compile failure when old revision.h file is present 2015-08-16 23:08:01 +02:00
StormBytePP
1f66d719f2 Core/BuildSystem: Merge collision, debugging, threading, utilities and configuration into "common" which does not depend on shared anymore and moved database out of shared library
These changes enables to build tools only without even having MySQL installed
2015-08-16 21:23:15 +02:00
Shauren
222eaccc51 Build fix for WheatyExceptionReport, c++ exceptions must not be thrown in SEH handlers 2015-08-16 18:08:03 +02:00
StormBytePP
94f69fb1bc Core/Build: Removed obsolete SystemConfig.h and made genrev be part of shared library, which allows cache hits to happen more likely 2015-08-16 17:15:38 +02:00
DDuarte
90c9290761 Add a missing include of d5cf594bfe 2015-08-16 01:09:29 +01:00
DDuarte
233615c785 Fix build warnings addded in d5cf594bfe 2015-08-16 00:45:50 +01:00
Shauren
cdbd563157 Core/Logging: Refactored appender creation to allow using logging without mysql dependency in tools (future task)
Conflicts:
	src/server/bnetserver/Main.cpp
	src/server/worldserver/Main.cpp
2015-08-16 00:09:02 +01:00
Vincent-Michael
9f04cbad21 Fix non pch build for Visual Studio 2015 compiler
(cherry picked from commit df1f4969d8)
2015-07-24 12:05:26 +01:00
DDuarte
d12fec67f2 Core/Misc: Add a few consts to methods
(cherry picked from commit 7d9843c380)

Conflicts:
	src/server/bnetserver/Packets/ConnectionPackets.h
	src/server/game/AI/SmartScripts/SmartAI.h
	src/server/game/Battlefield/Battlefield.h
	src/server/game/Battlegrounds/Battleground.h
	src/server/game/Entities/Object/Object.h
	src/server/game/Entities/Player/Player.h
	src/server/game/Guilds/Guild.h
	src/server/game/Instances/InstanceSaveMgr.h
	src/server/game/Support/SupportMgr.h
2015-07-24 12:02:57 +01:00