Commit Graph

273 Commits

Author SHA1 Message Date
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
Shauren
eba31dea27 Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-05-24 22:34:25 +02:00
Shauren
4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
Shauren
4fb6ad5225 Fix dynamic build 2020-05-10 19:29:17 +02:00
Shauren
d889228259 Core/DataStores: Allow loading encrypted sections when key is known when reading from casc storage
Closes #24456
2020-05-10 15:29:47 +02:00
Shauren
16761e1d7c Tools/vmap assembler: Move TileAssembler from common to vmap4_assembler where it belongs 2020-05-10 15:24:43 +02:00
Shauren
57a5969c26 Merge pull request #24500 from funjoker/cherry-picks 2020-05-01 15:41:32 +02:00
jackpoz
49f25f6e33 Core/Misc: Fix static analysis issues
(cherry picked from commit 486b032343)
2020-04-28 13:47:58 +02:00
Shauren
ec87d048b4 Core/Misc: Enum flag v3 - allow enabling flag operations directly after enum definition when inside namespaces 2020-04-27 09:06:49 +02:00
Shauren
0763844fb6 Core/Misc: Improve enum flags with type safe operators 2020-04-26 15:27:48 +02:00
Shauren
7272508cb4 Core: Fix clang 10 warnings 2020-04-26 01:25:50 +02:00
jackpoz
bfcb276781 Core/Crash: Refactor and fixes
Code cleanup.
Fix buffer overflow crash.
Fix type being truncated to 199 characters.

(cherry picked from commit 9226e21205)
2020-04-24 17:18:48 +02:00
ariel-
ebc06b1d04 Core/Auras: reworked multiplicative AuraEffects calculation
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling
- Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter
- Fixes many cases of rounding error due to applying/unapplying of small factors
- Allows amounts to be zeroed (ie with an AuraEffect of amount -100)
- Do a partial revert of 6dc37a9add, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd)
- SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs)

Closes #18687

(cherry picked from commit c69a7d1223)
2020-04-24 17:18:47 +02:00
Shauren
aced88b09b Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business. 2020-04-20 20:36:24 +02:00
Shauren
0f0ca3a919 Core/DBLayer: Implement async transaction completion callbacks 2020-04-14 16:23:44 +02:00
Shauren
676eb6d77f Core/Entities: ObjectGuid improvements
* Support creation of all guid types
* Change ToString to output client compatible text (fixes calendar and auction mails)
* Fix saving and loading item soulbound trade allowed traders
* constexpr EnumClassFlag
2020-04-12 17:50:33 +02:00
Shauren
c81de0eb4e Core/Misc: Removed old incorrect define 2020-04-04 00:28:49 +02:00
Shauren
5526e14bcf Core/Entities: Fixed saving spawn difficulties to db for .npc add and .gob add (and other commands that modify creature/gameobject spawns table) 2020-04-03 17:41:48 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
96575e33bb Core/Items: Add location filters to Player::GetItemByEntry 2019-11-29 00:10:29 +01:00
Shauren
235ec18143 Core/DataStores: Work around buggy client db2 metadata 2019-11-28 00:23:09 +01:00
Shauren
ad774a8e0e Core/Spells: Make missing spell/aura effect handler assignments a compile time error instead of runtime crash 2019-11-21 14:36:16 +01:00
Shauren
aa64226b64 Core/Misc: Suppress openssl random generator uninitialized variable errors under valgrind 2019-11-08 20:17:59 +01:00
Shauren
e32d888c28 Core/DataStores: Fixed out of bounds memory access in sparse db2 loader
Closes #23900
2019-11-03 20:02:10 +01:00
Shauren
3ac790287a Core/DataStores: Updated db2 structures to 8.2.5 2019-10-27 00:12:45 +02:00
jackpoz
9780d23f47 Core/Misc: Fix static analysis issues
(cherrypicked from b375bab225)
2019-08-17 20:04:14 +02:00
Shauren
c22b2f0c7b Core/DataStores: Fixed loading parent indexes for files with multiple sections 2019-08-11 12:17:33 +02:00