Commit Graph

527 Commits

Author SHA1 Message Date
Shauren
d03e90ef43 Core/Misc: Fix revision_data.h and boost/predef preprocessor macro conflict
(cherry picked from commit 1f5f245c02)
2025-08-30 22:55:25 +02:00
Shauren
9ffc85485a Core/Misc: Reduce differences between branches 2025-07-14 22:26:42 +02:00
CraftedRO
7b0d1f0913 Core/Misc: Minor corrections to urls and grammar in logs and comments (#30917) 2025-05-08 18:52:04 +02:00
Shauren
d8240fb513 Core/Misc: Fix msvc build with version 17.10
Closes #29999
2024-05-23 11:19:55 +02:00
Shauren
7952661e23 Core/Misc: Support boost 1.85
(cherry picked from commit cfa838df5d)
2024-04-22 11:57:54 +02:00
Mykhailo Redko
ca1560f043 Core/Players: Improvements for talent reset logic. (#29580)
* Clean up Player::ResetTalents() from unnecessary logic, such as withdrawing money. Move it to more suitable places.
* Implemented SMSG_TALENTS_INVOLUNTARILY_RESET and use it instead of old trinity_string.
* Do not reset the accumulated talent reset cost if CONFIG_NO_RESET_TALENT_COST is enabled.
2024-02-13 15:55:37 +01:00
Shauren
4e6118c919 Core/Misc: Replace std::abort with our ABORT macro
* libmysql is not a well behaved library on windows, it installs its own SIGABRT handler every time a new connection is opened, overriding our own

(cherry picked from commit 09dea76fb5)
2023-08-15 22:02:39 +02:00
Shauren
a4299c2a4b Core/Misc: Replace string to int conversion functions from Common.h with c++17 std::from_chars based ones Trinity::StringTo
(cherry picked from commit 3260b94dd6)
2023-08-15 21:59:52 +02:00
Shauren
aaa6e73c8c Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api)
(cherry picked from commit d791afae1d)
2023-08-15 20:10:04 +02:00
Shauren
3144566584 Core/Misc: Include cleanup, 2023 edition
(cherry picked from commit 92ed5e8af1)
2023-08-12 17:56:16 +02:00
Shauren
b7287e85e4 Core/Misc: Fixed deprecation warnings for c++20
(cherry picked from commit ba9bbbc9d0)
2023-08-12 14:24:24 +02:00
Ovah
4747515872 Core/Movement: Allow waypoints to use 0 as valid facing value (#26655) 2022-04-16 18:21:04 +02:00
offl
d7adc50daa Core/Scripting: Get rid of ModifyVehiclePassengerExitPos (#27126) 2021-10-20 01:04:02 +03:00
Shauren
e50102178b Core/Spells: Spell effect info access refactoring part 3 - removed direct SpellInfo::Effects field access from game 2021-08-31 00:13:44 +02:00
Felipe Trzaskowski
1f7c0790b6 Core/Misc: Fix dynamic scripts build when using libstdc++-11 (#26771) 2021-08-02 11:03:42 +02:00
ihm-tswow
471e5af32d Core/Game: Fix cache path with git flow branches (#26494)
- git flow may put forward slashes in branch names, so we cannot assume we are just creating one directory.
2021-05-05 21:36:26 +02:00
Kargatum
a32b6b8ac4 Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf
2021-01-03 11:47:07 +01:00
Treeston
26c510775c Core/ChatCommands: Add trinity_string support for chat command help 2020-09-21 02:37:18 +02:00
Treeston
1eca51b417 [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463) 2020-09-20 02:50:38 +02:00
Treeston
9e8915eaac remove trailing whitespace 2020-09-07 18:32:33 +02:00
Treeston
0c7f6ac89f Scripts/AreaTrigger: Rename OnlyOnceAreaTriggerScript::_OnTrigger to TryHandleOnce, and make its return value useful. 2020-09-07 18:25:49 +02:00
Treeston
fc3feebee9 Scripts/IcecrownCitadel: correct Rimefang's script name 2020-09-06 21:00:38 +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
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
Carbenium
92a02a5c87 Core/EventProcessor: std::chrono-ify CalculateTime
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset).
Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool)
2020-07-27 13:36:25 +02:00
Treeston
210176fd91 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
2020-07-26 01:53:34 +02:00
Shauren
524d167398 Dep: Switch to boost process instead of old standalone version 2020-07-15 19:33:12 +02:00
Peter Keresztes Schmidt
c92950b3e1 Core/DataStores: Update DBC field names to generated ones (#24999) 2020-07-12 15:36:55 +02:00
Carbenium
f7faf20254 Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.
2020-06-24 15:09:57 +02:00
Peter Keresztes Schmidt
b210bb3713 Core/Misc: Replace Trinity::make_unique with std (#24869)
(cherry picked from commit bab5fd87a3)
2020-06-23 18:03:16 +02:00
jackpoz
96df3b7adb Core/Scripts: Show a message when aborting because two scripts have the same registered name 2020-03-09 20:08:26 +01:00
ForesterDev
58313fc330 Core/PacketIO: update cinematic packets to new system. Implement CMSG_OPENING_CINEMATIC and CMSG_COMPLETE_MOVIE (#24135)
* Server/PacketIO: Enable SMSG_TRIGGER_CINEMATIC & SMSG_TRIGGER_MOVIE.

* Update SMSG_TRIGGER_CINEMATIC & SMSG_TRIGGER_MOVIE to new Format.

Signed-off-by: AriDEV <aridev666@gmail.com>

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Server/Packets/MiscPackets.cpp
#	src/server/game/Server/Packets/MiscPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp

* Core/Scripts: Add server-side script support for movie completion (#18308)

# Conflicts:
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Scripting/ScriptMgr.h
#	src/server/game/Server/Packets/MiscPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* Core/PacketIO: CMSG_COMPLETE_CINEMATIC, CMSG_NEXT_CINEMATIC_CAMERA and enabled some opcodes

# Conflicts:
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* Core/Protocol: Implemented CMSG_OPENING_CINEMATIC

# Conflicts:
#	src/server/game/Handlers/GuildHandler.cpp
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h

* fix build

Co-authored-by: Krudor <erikstrandberg93@hotmail.com>
Co-authored-by: MitchesD <majklprofik@seznam.cz>
Co-authored-by: Kaelima <kaelima@live.se>
2020-02-08 20:37:34 +01:00
Ujp8LfXBJ6wCPR
76831f1f46 Use boost::optional and boost::none instead of smelly pointer (#24134)
* Remove bad pointer usage from CharacterCache

Use TrinityCore Option type instead which is intended for this purpose. (Wrapper around boost::option until C++17 bump is finalised)

* Unify codestyle regarding TC optional type

Based upon advice from @Shauren
2020-02-08 20:29:18 +01:00
Ovah
f0485cea39 Core/Scripting: fixed build. Re-enable ModifyVehiclePassengerExitPos for CreatureScript to allow scripted creatures that already have an AI to benefit from its functionality as well 2020-01-28 06:12:42 +01:00
Ovah
ebf116e6a3 Core/AI: call ModifyVehiclePassengerExitPos for CreatureScripts since the hook is available for that class as well 2020-01-28 05:48:10 +01:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
ccrs
06c6b30ed4 Scripts/ScarletMonastery: instance script cleanup (#23889)
Adapt InstanceScript into newer structure and style
Adapt existing boss scripts into newer structure and style
Improve existing boss related definitions

Should make each boss more functionally reliable, but nothing new has been added
2019-10-26 23:33:30 +02:00
Ovah
3f7b2252a1 Core/Movement: add a velocity argument for the spline chain meta table (PR #23575) 2019-07-18 15:52:03 +02:00
Aokromes
fe744977c9 Coding standards (#23514)
* Coding standards

* revert part
2019-06-26 08:56:20 +02:00
Wyrserth
88c6c61b95 Core/Script: add script hook to allow overriding of a vehicle passenger's exit position (#23322)
* Core/Script: add script hook to allow overriding of a vehicle passenger's exit position.

* Allow to change orientation, and fix nopch.

* Keep original orientation, thanks jackpoz!

* Update Unit.cpp

Code cleanup

* Update Unit.cpp
2019-05-30 17:35:18 +02:00
Wyrserth
404c4f8091 Core/Scripts: implement a PlayerScript hook called when a quest's objective receives progress (#23286) 2019-05-17 20:38:15 +02:00
ccrs
0eb5d240fa Core/AI: silence a freaking annoying VS IntelliSense warning 2019-05-15 16:42:28 +02:00
Giacomo Pozzoni
5b7ead65bb Core/Scripts: Change PlayerScript and CreatureScript inheritance (#23048)
Remove UnitScript from PlayerScript and CreatureScript classes as that's how the original system that was PR'd worked, see https://github.com/TrinityCore/TrinityCore/pull/7867 for reference.
Please note these are used as global hooks and should really just invoke stateless functions.
If you need to hook methods from PlayerScript/CreatureScript and UnitScript, just define 2 different scripts (this is how the original system worked and how it was designed to work)
2019-02-15 20:29:14 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Treeston
042f5515e4 Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans 2018-08-23 16:34:42 +02:00
Treeston
8a4858bdcf Core/Handlers: Spell handler no longer downranks otherwise-negative spells because they have a potentially-positive aura effect. Closes #22153. 2018-07-19 12:46:31 +02:00
Treeston
2ef9d301f0 Misc: Pass std::chrono types by value everywhere. 2018-07-18 17:48:15 +02:00
Treeston
94b5d9bfa1 Core/Spawning: Actually check spawn group state before processing a respawn. It feels like that is something that should've been noticed at some point.
Also remove CreatureScript::CanSpawn since nobody uses it, and spawn groups do the same thing.
2018-02-22 20:31:42 +01:00
Shauren
2fd9dc2edb Core/Scripts: Fixed ENSURE_AI assertion failures when used in Reset()/InitializeAI() hooks with hotswap
Updates #20727
2018-02-05 20:52:19 +01:00