Commit Graph

299 Commits

Author SHA1 Message Date
Shauren
31ef525ecd Core/Misc: Add container utility function Trinity::Containers::EnsureWritableVectorIndex to replace if (i >= vec.size()) vec.resize(i + 1) copypaste everywhere 2021-06-13 00:59:15 +02:00
Shauren
b29cc8f31a Fix build 2021-05-29 22:04:49 +02:00
Shauren
6ecfe58cae Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2021-05-29 21:21:37 +02:00
Shauren
2de6e56d29 Core/Misc: Rename MapDefines.h to MMapDefines.h as it contains mmap defines exclusively 2021-05-29 14:48:18 +02:00
Shauren
480039f913 Core/Logging: Add functions that allow creating loggers and appenders from other sources than config files 2021-05-27 11:47:51 +02:00
Shauren
3c08eb190f Core/Misc: Add another boost hack. Fixes bnetserver/worldserver -c command line parameter when path contains spaces 2021-05-24 00:08:03 +02:00
Shauren
622cec8a8f Core/Vmaps: Fixed crash in unloading vmaps
Closes #26536
2021-05-21 12:31:21 +02:00
Shauren
67e16888ac Core/Chat: Chat translation improvements
* Remove hyperlinks from translated chat messages
* Implement case preservation rules depending on receiver client locale
2021-05-03 23:53:24 +02:00
Shauren
20aeb63026 Core/Vmaps: Extract more doodad sets 2021-04-25 00:11:42 +02:00
Shauren
e821693c16 Core/Vmaps: Reduce memory used by vmaps, part 2 2021-04-25 00:11:42 +02:00
Shauren
bb8f22ed20 Core/Vmaps: Reduce memory used by vmaps (and their size, slightly) 2021-04-25 00:11:36 +02:00
jackpoz
5b4f61d915 Core/Crash reporting: Add support to char* arrays
Add support to char* array showing the string value instead of the pointer address

(cherry picked from commit 4c0c4ab271)
2021-04-16 21:03:23 +02:00
Jeremy
446fc391f0 Core/Entities: Fix some weird movement due to los issues (#21125)
* Core/Entities: Fix some weird movement due to los issues
- Made LoS check use collisionHeight instead of midsection. Value was too low.
- Gnomes will now have a breath bar more quickly than for example a tauren.
- Changes have been made to checking for ground z as well, some tweeking might be needed but removed most of the scattered +2.0f/+0.5f/we
* Add 0.05f to isInAir check in Creature::UpdateMovementFlags

(cherry picked from commit e42903ec16)
2021-04-15 05:53:27 +02:00
jackpoz
8313053a3b Shared/Metric: Fix crash on shutdown
Fix crash on shutdown with metrics enabled but InfluxDB stopping before worldserver

(cherry picked from commit 45b2bcfaf2)
2021-03-15 20:17:31 +01:00
Traesh
56e9560661 Core/Spells Handle auras 328 & 396 (SPELL_AURA_TRIGGER_SPELL_ON_POWER_*) 2021-03-05 23:25:51 +01:00
Shauren
55eef73c48 Core/PacketIO: Increase max allowed incoming packet size for CMSG_HOTFIX_REQUEST 2021-03-02 01:06:28 +01:00
jackpoz
246871e3d5 Shared/Metric: Stop metrics on shutdown
Properly stop metric information gathering and sending on shutdown.
Issue reported by AddressSanitizer.

(cherry picked from commit e9c475d45f)
2021-02-25 18:50:55 +01:00
jackpoz
96406e3408 Core/Crash reporting: Fix buffer overflow
(cherry picked from commit c7043b25f6)
2021-02-25 18:50:55 +01:00
Treeston
2c0b94a000 Some misc streamlining/cleanup:
- std::chrono overloads for SummonCreature
- Removed misleading const qualifier from SummonCreature (it wasn't being honored)
- Rename parameters of SummonCreature to follow convention
- EventProcessor has a new method (AddEventAtOffset) that adds an event...at an offset. Genius.

PS: Hi there Keader.
(cherry picked from commit 76a4c7d974)
2021-02-25 18:50:55 +01:00
jackpoz
159aa97d72 Dep/Recast: Update recastnavigation to 2c85309280
(cherry picked from commit 7ef22e4305)
2021-02-15 19:13:25 +01:00
jackpoz
1c24819741 Core/Misc: Fix static analysis issues
(cherry picked from commit 97f33dc779)
2021-02-06 21:41:51 +01:00
Shauren
5a0e348a95 Dep/Boost: Support for boost 1.74 - heap
Closes #25470

(cherry picked from commit 868c82aa6c)
2020-12-12 18:50:19 +01:00
Shauren
98939d258a Dep/Boost: Partial support for boost 1.74 - asio
Ref #25470

(cherry picked from commit 155e37831e)
2020-12-12 18:50:13 +01:00
Shauren
7a406db506 Core/Collision: Fixed false positive errors in console about vmap loading 2020-12-08 18:16:47 +01:00
Shauren
c5d2299365 Core/Misc: Added another overload to MakeIteratorPair (and constexpr IteratorPair) 2020-12-08 18:16:47 +01:00
Shauren
00d621921e Core/Misc: Add std::clamp to advstd 2020-12-08 18:16:47 +01: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
sirikfoll
7586daad62 Core/Misc: Remove Whitespaces
(cherry picked from commit e2565c2597)
2020-08-23 00:48:19 +02:00
jackpoz
77e6355fba Core/Misc: Fix static analysis issues
(cherry picked from commit 9cf4dd7345)
2020-08-19 00:14:06 +02:00
Golrag
c46aa9d5b5 Core/VMaps: Fix no collision triangles
(cherry picked from commit 89d641f1e6)
2020-08-18 18:53:13 +02:00
Treeston
94e164f9c9 Utilities/Containers: New RandomResize implementation with guaranteed asymptotic linear time for all container types (#19974)
(cherry picked from commit ac50034df7)
2020-08-18 18:53:13 +02:00
Ovah
71db17220a Core/Spells: enable and implement SMSG_MISSILE_CANCEL (#25215) 2020-08-16 12:07:51 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
8be23fcbbd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.

(cherry picked from commit e2a1ccd118)
2020-08-13 22:46:44 +02:00
Treeston
73922d2a85 Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)

(cherry picked from commit 3164b58c7d)
2020-08-03 22:37:47 +02:00
Treeston
77380f032b Core/Authserver: Split SRP6 into its own file (PR #25131)
(cherry picked from commit 7f7fa8b23d)
2020-08-03 21:16:30 +02:00
Treeston
ac37ca040b how does VC++ never catch these? 5e36bf7 follow-up
(No more witty one-liners. Let me go to bed please.)

(cherry picked from commit 35411e5ed9)
2020-08-03 19:47:19 +02:00
Treeston
287e18a57c Core/Authserver: Auth cleanup phase 1b, the "I didn't hit Stage All" commit. Sorry. (5e36bf7 follow-up)
(cherry picked from commit 4f570e5d08)
2020-08-03 19:45:11 +02:00
Treeston
059bd630e9 Core/Authserver: Auth cleanup phase 1a, the "stuff I ran across while making phase 2" commit.
- Did you know BigNumber quietly assumes every byte array it gets is little-endian, even though openssl bignums use big-endian? Now you do!
- In entirely unrelated news, make the above behavior explicit through a default-true boolean, same as existing GetBytes derivatives.
- Also, if you are in the enlightened openssl 1.1 crowd, there's no more endian wrangling involved, because openssl now does all of that for us. Progress!

(cherry picked from commit 5e36bf7c67)
2020-08-03 19:41:41 +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 210176fd91)
2020-08-03 19:39:00 +02:00
Treeston
51ce3b1c1d [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.

Closes #16489

(cherry picked from commit f6c849729b)
2020-07-16 22:00:24 +02:00
Shauren
4499f203a3 Core/DataStores: Fixed sending localized hotfixes and improved db2 loading error messages 2020-07-01 00:34:51 +02:00
Shauren
79cd94d26d Core/Misc: Changed GetLocaleByName to return invalid value on invalid input instead of LOCALE_enUS
* Also added IsValidLocale helper function
2020-06-30 00:22:25 +02:00
Shauren
40c71ea9fc Core/Misc: Remove unused variables 2020-06-29 09:23:38 +02:00
Shauren
2fcb79e2de Core/DataStores: Fixed loading db2 strings
Closes #24916
2020-06-29 00:10:37 +02:00
Shauren
6040f8eb31 Core/Collision: Port new parts for retrieving area/liquid data from gameobjects added when porting 42f9deb21e to 3.3.5 2020-06-28 12:26:39 +02:00
Shauren
deca201f77 Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection 2020-06-27 13:33:17 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
Carbenium
abff505a6e common: Add a missing include guard 2020-06-15 00:22:12 +02:00
Shauren
c7306439e7 Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower 2020-06-12 01:29:18 +02:00