Commit Graph

10259 Commits

Author SHA1 Message Date
Treeston
fc32c3fd3b Core/Warden: Ignore the length value in the database for MEM_CHECK checks. Hi there Aokromes. 2020-08-20 18:34:09 +02:00
Treeston
a3971ca4b0 Core/Warden: More refactors lifted from #25286. 2020-08-20 17:56:10 +02:00
Treeston
5b4288f05f Core/Warden: Some Warden refactors lifted from #25286. 2020-08-20 17:35:58 +02:00
Shauren
7d4fbf706a Scripts/Spells: Replace RegisterAuraScript with RegisterSpellScript and remove it 2020-08-20 16:03:47 +02:00
Shauren
75a6a7a0ad Core/Scripts: Unify RegisterSpellScript and RegisterAuraScript macros to do the same thing and implemented passing custom arguments to spell script classes 2020-08-20 15:49:59 +02:00
Peter Keresztes Schmidt
7bfeb03c13 Scripts/Commands: Convert argument parsing of event commands to new system (PR #25275) 2020-08-20 02:30:21 +02:00
Peter Keresztes Schmidt
4286e7aa02 Core/ChatCommands: Check whether a passed numeric enum value is valid (#25285) 2020-08-20 00:46:52 +02:00
NoName
01c7663bdd Core/PacketIO: Update SMSG_QUESTGIVER_OFFER_REWARD (#25251)
Co-authored-by: Carbenium <carbenium@outlook.com>
2020-08-19 14:47:55 +02:00
Treeston
f04f4e91ff Core/Warden: Add .debug warden force, allowing you to force specific warden checks to be sent 2020-08-19 00:25:44 +02:00
Peter Keresztes Schmidt
426513ec8e Scripts/Commands: Convert argument parsing of ahbot commands (PR #25264) 2020-08-17 22:04:44 +02:00
Shauren
a9a4f05a28 Core/Pets: Fix loading pet data
Closes #25269
2020-08-17 20:01:48 +02:00
Peter Keresztes Schmidt
9df61fd111 Core/ChatCommands: Parse SpellInfo also from enchant, glyph, talent and trade links (PR #25270) 2020-08-17 18:26:41 +02:00
Peter Keresztes Schmidt
dfeaa2e81f Core/ChatCommands: Add Variant.get<typename> overload (PR #25267)
Co-authored-by: Treeston <treeston.mmoc@gmail.com>
2020-08-17 14:45:32 +02:00
Treeston
66491dbfb3 make compilers happy 2020-08-17 14:42:27 +02:00
Shauren
bbcf00257e Core/Spells: Fix summoning warlock pets in case that pet has never been summoned before 2020-08-17 11:52:44 +02:00
Shauren
9c5876d8ab Core/Spells: Fix summoning SUMMON_PET type pets
Closes #25265
2020-08-17 09:19:43 +02:00
Treeston
ffc3e355fe Core/ChatCommands: Move Trinity::ChatCommands::Variant from boost::variant to std::variant (for real this time) 2020-08-17 02:23:38 +02:00
Treeston
7bceff1b2a revert 1aeb7a0 and f9e7dbd until I can work around GCC being silly 2020-08-17 01:05:09 +02:00
Treeston
1aeb7a0980 How did this even build in VS???? (don't kill me shauren) (f9e7dbd follow-up) 2020-08-17 00:55:19 +02:00
Treeston
f9e7dbd8b4 Core/ChatCommands: Move Trinity::ChatCommands::Variant from boost::variant to std::variant, which means we no longer need visitors 2020-08-17 00:49:07 +02:00
Peter Keresztes Schmidt
30a825e2ac Core/ChatCommands: Add support for std::array-type arguments (#25261) 2020-08-17 00:15:53 +02:00
Shauren
5c1fc5e387 Core/Pets: Pet management refactoring (#25191)
* Core/Pets: Pet management refactoring

* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet

Closes #3610
Closes #21266
2020-08-16 21:39:25 +02:00
Peter Keresztes Schmidt
7edad0d601 Core/ChatCommands: Do not parse partial strings for numeric paramters (PR #25259)
Check if integral/floating point type arguments were parsed successfully.

std::stoull will happily parse floating point strings until the decimal separator and return the value.
Make sure for all parsing methods that we actually parsed the whole token.

This allows to use handler arguments like Variant<uint32, float> which will be populated with the right type
depending on the token value (e.g "10" vs "10.0").
2020-08-16 21:32:31 +02:00
Giacomo Pozzoni
ca25e8d019 Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events (#25238)
* Core/SAI: Spell casts that cannot be executed because the unit is currently casting another spell will be retried asap with priority over other events

* Core/SAI: Re-sort the events only when needed

* Fix some priority reset and wrong mEventSortingRequired handling

* Code cleanup.
Sort only events loaded from db (not stored events, not timed action list).

* Code cleanup.
Raise priority of failed casts so they are retried before other spells

* Keep priority of the action fails and is rescheduled on next update

* Don't try recasting a spell in SMART_ACTION_CAST if there are multiple targets and at least 1 was successful
2020-08-16 16:50:04 +02:00
Peter Keresztes Schmidt
df29f60595 Core/ChatCommands: Honor exact matches during enum arg parsing (PR #25255) 2020-08-16 16:27:19 +02:00
scizzydo
4125a81bb1 Core/Warden: Fix for LUA_STR_CHECK (#25247)
The check above is what I use to actually get a real result for LUA_STR_CHECK, which when I used variables that would have a string to them it actually fails the check. When checking for items like a function if it exists of course it won't work... In addition, fixing the Unk2 to Unk3 causes people to be able to adjust the address of the check to the address 0x00419210 to make warden perform the FrameScript__Execute to run lua on the client. This seems to be the big request like in https://github.com/TrinityCore/TrinityCore/issues/23035
2020-08-16 14:50:08 +02:00
Peter Keresztes Schmidt
5e40eb20e2 Core/ChatCommands: Add support for enum type arguments (PR #25242) 2020-08-16 14:11:21 +02:00
Peter Keresztes Schmidt
6c7837f947 Core/Unit: Make HandleEmoteCommand typesafe (#25249)
* Scripts/ScarletMonastery: Fix wrong emote during Headless Horseman encounter

* Scripts/HoR: Fix wrong emote during escape event

* Core/Unit: Make improve type safety of HandleEmoteCommand

Change argument type to the expected enum type Emote

* Scripts/CoS: Use SetUInt32Value to set UNIT_NPC_EMOTESTATE

UNIT_NPC_EMOTESTATE is no flag field
2020-08-15 15:29:43 +02:00
Peter Keresztes Schmidt
34d403e83f Core/Spells: Mark constructors of Spell/AuraScript handlers as explicit (#25248)
Mostly to make clang-tidy happier
2020-08-15 13:50:26 +02:00
Peter Keresztes Schmidt
87211d9f4d Core/PacketIO: Update SMSG_QUESTGIVER_QUEST_DETAILS (#25232)
* Core/PacketIO: Update SMSG_QUESTGIVER_QUEST_DETAILS

* Core/PacketIO: Name RewardFactionFlags field of QuestInfo struct
2020-08-15 13:25:23 +02:00
Giacomo Pozzoni
298d799485 Core/AI: Remove code that removed UNIT_DYNFLAG_LOOTABLE from possessed units (#25229)
* Core/AI: Remove code that removed UNIT_DYNFLAG_LOOTABLE from possessed units

* Update PassiveAI.cpp

Restored logic that removes loot flag while being possessed

* Restored logic that removes loot flag while being possessed
2020-08-13 21:12:37 +02:00
Treeston
6116e5b385 Core/Warden: Warden refactors (PR #25235) 2020-08-11 18:04:36 +02:00
Giacomo Pozzoni
63a6e1e048 Core/SAI: Fix creatures casting with flag SMARTCAST_COMBAT_MOVE not switching to melee when the school of the spell they are trying to cast gets silenced (and other cases of spell failure) (#25226)
* Core/SAI: Fix creatures casting with flag SMARTCAST_COMBAT_MOVE not switching to melee when the school of the spell they are trying to cast gets silenced (and other cases of spell failure)

* Core/SAI: Retry casting after 500ms if a cast failed

Fixes #24914
2020-08-09 21:24:15 +02:00
jackpoz
c04f53b886 Core/Warden: Fix Warden reporting false positive checks
Issue introduced in 210176fd91
2020-08-08 17:24:18 +02:00
Keader
9b87a7e03b Game/ActionHouse: Fixed some clothes chests not showing in AH (#25150) 2020-08-08 10:31:35 -03:00
Ovah
764f22fc91 Core/Units: add new functionality for units to block or enable combat interactions (#25168)
* Core/Units: add new functionality for units to block or enable combat entirely via helper to reflect what CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT and client AI functions imply

* yeah...

* Nuke Creature::IsCombatDisallowed helper as its unused by now

* no combat extra flag may now be changed on transforms if the transformed entry does not have the flag
2020-08-07 14:51:40 +02:00
Shauren
e240e5936a Core/PacketIO: Name previously unknown fields in lfg packets 2020-08-06 22:08:21 +02:00
jackpoz
3c28573d02 Core/Misc: Code cleanup 2020-08-06 22:04:46 +02:00
Ovahlord
86107584c0 Core/Packets: updated CMSG_LFG_JOIN and CMSG_LFG_LEAVE to new packet handling
(cherry picked from commit 6abeb36584)

# Conflicts:
#	src/server/game/Handlers/LFGHandler.cpp
#	src/server/game/Server/Packets/AllPackets.h
#	src/server/game/Server/WorldSession.h
#	src/server/game/Server/WorldSocket.cpp
2020-08-06 21:48:51 +02:00
Jinnaix
db9072a183 Core/Unit: Creatures' minions now engage in combat if their controller is attacked (PR #25219)
Closes #24340
2020-08-06 20:03:09 +02:00
Treeston
629908172f Core/Object: Deduplicate some checks 2020-08-06 19:46:33 +02:00
jackpoz
02a018ea13 Core/Battlegrounds: Fix error messages in Isle of Conquest
Fixes #24032
2020-08-06 18:27:32 +02:00
jackpoz
2910d0fb24 Core/SAI: Fix creatures casting spells while moving with flag SMARTCAST_COMBAT_MOVE
Fixes #24019
2020-08-06 17:59:36 +02:00
Treeston
44a3aad0af Core/Authserver: Deprecation of sha_pass_hash (PR #25138)
see also #25157
2020-08-06 00:20:23 +02:00
Treeston
7b8b999516 Core/Common: Move old-style pointer+size HexStr methods to Trinity::Impl where they can't hurt anyone 2020-08-04 17:03:26 +02:00
Shauren
b3db50a3b4 Core/Misc: Fix compile errors found with msvc /permissive- 2020-08-04 15:42:08 +02:00
jackpoz
8ad6bd8a9b Core/Metric: Require WITH_DETAILED_METRICS CMake flag for MMaps metric 2020-08-04 14:10:33 +02:00
Giacomo Pozzoni
07fd84b679 Core/Misc: Fix static analysis issues (#25194) 2020-08-04 11:36:47 +02:00
Treeston
3164b58c7d 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)
2020-08-02 22:52:21 +02:00
Carbenium
228696bf80 Core/Common: Merge TimeTrackerSmall with TimeTracker 2020-08-01 12:43:55 +02:00