Commit Graph
319 Commits
Author SHA1 Message Date
Karrz1 ff699fb5cf Sync with WoW Forever 0.1.34: Blizzlike core
Brings forever up to date with our 0.1.34 code for the WoW Forever client 1.60.1.70862.
Blizzlike only: fixes from real game data (packet captures, live hotfixes, player caches, Wowhead and Questie data,
VMaNGOS for the vanilla world) and server fixes. No custom items or custom content; every rate and option defaults
to Blizzard's behaviour.

What is new since 2ae1313e, in short:
- Clients 70790, 70840 and 70862: message numbers, mail, guild window, charters, contact list, add-on whispers.
- Crash and exploit fixes: guild ranks, loot of emptied veins, quest lookups, taxi mask, battleground templates,
  vendor free buys, item sell price, auction house, falling out of the world, bnetserver request limit.
- Classes, talents, pets and buffs from the live game data and Blizzard's hotfixes of November.
- Quests, NPCs, spawns, trainers, loot, fishing, events, Merchant's Favor crates and writs, sealed crate turn-ins.
- Dungeon and raid scripts (Molten Core, Blackwing Lair, Zul'Gurub, Ahn'Qiraj, Shadowfang Keep, Deadmines ...).
- Pathing fixes that help pets and NPCs.
- Russian creature names, quest titles and quest texts.
- README: Blizzlike stance, branches, repack.
2026-11-09 17:27:57 +00:00
Karrz1 aa4ba30615 Scripts: UnitScript::OnDamageSpell, the damage with the spell that dealt it (#60)
Why: UnitScript::OnDamage gives a script the damage but not where it came from. A script that keeps a table of what hits the raid (which boss spell did how much) can not tell the spells apart.

What: one virtual UnitScript hook, empty by default, called just before OnDamage in Unit::DealDamage with the spell (null for a melee swing). Damage is passed by value, so a script can not change it. No change for scripts that do not override it.
2026-10-18 09:14:58 +08:00
Karrz1 812a3072d6 Scripts: PlayerScript::OnPingUnit and OnPingWorldPoint, called after a group ping is relayed (#59)
Why: a script can not see the pings a player sends to the group. Pings are the one way a player points at a target or a spot without chat, so a module that reacts to a player's orders (for example an "attack this" or "come here" ping) has no way to get them.

What: two virtual PlayerScript hooks, empty by default, and one ScriptMgr call each at the end of HandleSendPingUnit and HandleSendPingWorldPoint, after the packet went to the group. Nothing changes for the packets or for any script that does not override them.
2026-10-18 09:14:52 +08:00
Advocaite 3873938985 Core/Scripting: optional modules in src/modules and generic ScriptMgr hooks (#31)
Modules: every folder in src/modules with a CMakeLists.txt is added. A module
registers its library, script loader and config files with
trinity_add_module(); worldserver links the generated `modules` library, whose
AddModuleScripts() runs after AddScripts(). With no module it is empty and the
server behaves as before. Module configs are copied to worldserver.conf.d.
See src/modules/README.md.

New hooks (called where nothing ran before; no cost without scripts):
- WorldScript: OnWorldInitialized (world loaded, before the network starts),
  OnBeforeMapsUpdate (every tick, before the maps), CanCreateBattleground
- PlayerScript: OnChatSent (say/yell, whisper, group, guild; after the message
  was sent), OnAddonMessageSent (whisper, group), OnLootItem,
  OnBattlegroundQueueJoin, OnBattlegroundInvite, OnBattlegroundPortFailed,
  OnLfgJoin (only when the join was accepted), OnLfgProposal
- UnitScript: OnUnitDeath
- GroupScript: OnSubgroupChange
2026-10-13 16:52:49 +08:00
Advocaite cd640c7067 Classic 1.60.1.70009 (WoW Classic beta) client support
- Bnet/login flow for the Classic client (super districts, last char played, sub-region 70-1-70)
- Classic opcode translation (server + client tables), blocked/changed messages
- Classic packet layouts: char enum/create/name check, feature status, trainer list,
  creature/quest query responses, action buttons, loot
- Update fields: Classic create layouts and changes-mask remaps for Unit/Player/ActivePlayer data
- Skyborne races (95/96), fixed vanilla creature levels, height lookup for recorded spawns
- Custom SQL: auth realm, hotfix layouts, Skyborne, Northshire (VMaNGOS), trainers, vendors, Zephras Isle
2026-09-28 05:23:04 +08:00
Mykhailo Redko 0ecd978f81 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.

(cherry picked from commit ca1560f043df275d9241055adbf61a393666a533)
2026-05-26 23:08:28 +02:00
Shauren 4b6e6e1fec Core/Commands: Refactor chat command internals to slightly reduce template bloat
* Replace std::enable_if with concept constraints
* Move code not dependent on template arguments out of template function bodies
* Reduce number of ChatCommandResult copies made during parsing
* Changed ChatCommandTable subcommands argument from std::vector<> const& to std::span<> and convert command definitions to arrays
* Allow ChatHandler arguments to be const
2026-03-27 20:02:12 +01:00
Shauren e2976c8702 Core/Scripts: Fix wrong startup errors with arena scripts 2025-10-19 00:12:44 +02:00
Shauren e59059e1bd Core/Players: PlayerChoice improvements
* Add missing choice properties to database (InfiniteRange, ShowChoicesAsList)
* Allow limiiting the number of responses sent at the same time
* Fixed duration sent in SMSG_DISPLAY_PLAYER_CHOICE
* Remove dynamically generated response identifiers from database
* Remove auto rewarding choice responses
* Change response scripts to be bound to scriptname
2025-06-22 21:56:58 +02:00
Shauren f94d87b00f Core/Scripts: Mark script base class constructors noexcept 2025-06-13 19:31:03 +02:00
Shauren 5bc24dad58 Core/Scripts: Fixed WorldMapScript being unintentionally restricted to one script for a given map id 2025-05-19 16:58:12 +02:00
Shauren e8b2be3527 Core/Network: Socket refactors
* Devirtualize calls to Read and Update by marking concrete implementations as final
* Removed derived class template argument
* Specialize boost::asio::basic_stream_socket for boost::asio::io_context instead of type-erased any_io_executor
* Make socket initialization easier composable (before entering Read loop)
* Remove use of deprecated boost::asio::null_buffers and boost::beast::ssl_stream
2025-04-08 19:15:16 +02:00
ModoX 309ba22a15 Core/AI: Implemented conversation ai (#30538) 2024-12-28 23:25:10 +01:00
Jeremy be11f42a16 Core/Battlegrounds: Move to scripts (#29799)
* Introduce new BattlegroundScript class for map/bg specific scripts
* Remove all sub, zone specific, battleground classes except Arena
* Move all bg zone scripts to new BattlegroundScripts class in script folder
* Remove ZoneScript from Battleground class
* Remove some unused hooks from Battleground
2024-03-28 19:29:22 +01:00
Shauren 228c56f3c5 Scripts/Spells: Modernize spell script internals a bit - this makes Prepare macros unneccessary 2023-07-24 00:27:25 +02:00
Meji d015711fbb Core/SAI: Implemented new source type SMART_SCRIPT_TYPE_EVENT (3) (#28816) 2023-07-09 11:59:35 +02:00
ModoX 7f14b64e09 Core/Conversation: Implemented OnConversationStart and OnConversationUpdate hooks (#29086) 2023-06-28 01:30:23 +02:00
Shauren a03455acbb Core/AreaTriggers: Add Spell* argument to AreaTriggerAI::OnCreate script 2023-06-24 20:10:14 +02:00
ModoX 89e09dc44e Core/AI: Drop script_waypoints and move data to waypoint_data (#28879) 2023-04-10 04:04:33 +02:00
Shauren b6965b2c30 Core/Objects: Move EventProcessor update to WorldObject::Update 2023-02-05 16:24:13 +01:00
Shauren d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren 92ed5e8af1 Core/Misc: Include cleanup, 2023 edition 2023-01-07 22:38:21 +01:00
Shauren 515c0a43ef Core/Maps: Split Ebon Hold and Exile's reach by faction and removed forced sanctuary hack 2022-07-25 21:43:19 +02:00
Shauren 16a06346ae Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c648
2022-07-23 19:13:33 +02:00
Shauren 073a036d84 Core/Battlefields: Refactor Battlefield creation to be linked to host map creation instead of having globally accessible objects 2022-07-19 23:18:19 +02:00
Shauren 775be0682a Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects 2022-07-18 22:45:03 +02:00
Shauren 737d94d7ef Core/World: implement database support for default map and realm wide world states
Co-Authored-By: Shauren <[email protected]>
2022-06-25 22:48:27 +02:00
Shauren a2c1b699e6 Core/Transports: Path generation rewrite v2
* No TaxiPathNode row is skipped anymore (events/delays on first node now work)
* Fixed transport animation synchronization with client
* Fixed stoppable transports randomly resuming their path after relogging

Closes #27985
2022-06-07 16:02:51 +02:00
offl 7a0268d4f1 Core/Scripting: Get rid of ModifyVehiclePassengerExitPos (#27126)
(cherry picked from commit d7adc50daa5a20142e0f39a9f65d39869525fd0e)
2022-03-20 16:27:10 +01:00
Treeston 5e013a9996 Core/ChatCommands: Add trinity_string support for chat command help
(cherry picked from commit 26c510775c6a1995d81b16ad7459227381801dcc)
2022-02-27 21:23:11 +01:00
Treeston 3fd2eb126c [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)
(cherry picked from commit 1eca51b417678b9a48b28552925d5694105f82bb)
2022-02-27 20:08:41 +01:00
Seyden 272addbf2b Core/Scripts: Fix Hotswap not reinitializing AIs after destroying them and then crashing due to AI being nullptr (#27744) 2022-02-15 22:36:48 +01:00
Shauren f8ad7017dd Core/Misc: Move (or delete) constructors and destructors to .cpp files (avoids compiling them in every file that includes them) 2022-02-12 21:36:46 +01:00
Shauren d057e057d3 Core/Misc: Optimize ChatCommand includes (include only where neccessary) 2022-02-11 21:57:45 +01:00
Meji 27cba3f523 Core/Scripts: Added script hook to execute actions after completing an achievement (#27718) 2022-02-08 23:23:05 +01:00
Treeston 358dc78e47 Scripts/AreaTrigger: Rename OnlyOnceAreaTriggerScript::_OnTrigger to TryHandleOnce, and make its return value useful.
(cherry picked from commit 0c7f6ac89fcc5fdc7f4435a6c1b673c752eb1e41)
2022-02-05 14:53:54 +01:00
Treeston 75e5c44638 Scripts/IcecrownCitadel: correct Rimefang's script name
(cherry picked from commit fc3feebee9e26ec5bc21a46f37b5affe416582c6)
2022-02-05 13:32:55 +01:00
Carbenium eeffb310de 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)

(cherry picked from commit 92a02a5c8750913f596d7e3b58bf8439cb770c28)
2022-01-24 12:00:35 +01:00
Shaurenandaquadeus 0d3235f569 Core/Guilds: Separate guild rank id from guild rank order
Co-authored-by: aquadeus <[email protected]>
2022-01-09 23:12:00 +01:00
Carbenium 49523a74a4 Battlefields: Move BF scripts out of game
This commit introduces the usual script interface
for battlefields.

(cherry picked from commit f7faf20254a120a90b8ee8eb55a284a6351aabc3)
2022-01-07 00:20:57 +01:00
jackpoz c03af362c6 Core/Scripts: Show a message when aborting because two scripts have the same registered name
(cherry picked from commit 96df3b7adb02f763aaaa6138922bd032a75a9b9e)
2021-12-22 22:57:34 +01:00
Ovah 64fc549be8 Core/AI: call ModifyVehiclePassengerExitPos for CreatureScripts since the hook is available for that class as well
(cherry picked from commit ebf116e6a3381835fd2af885bd2721233485b684)
2021-12-20 23:56:31 +01:00
Aokromes 30cec73c61 Coding standards (#23514)
* Coding standards

* revert part

(cherry picked from commit fe744977c917957e112704ccd66e228b826b3f7a)
2021-12-13 00:42:17 +01:00
Wyrserth 1edd93bc0c 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

(cherry picked from commit 88c6c61b95ac2b2f911b519136770479d31de27d)
2021-12-08 23:51:07 +01:00
ccrs 672d4d6baa Core/AI: silence a freaking annoying VS IntelliSense warning
(cherry picked from commit 0eb5d240fa82592ff7a4b2df81206ac49df628e2)
2021-12-05 16:19:57 +01:00
Giacomo Pozzoni ed5ba915f1 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)

(cherry picked from commit 5b7ead65bb116195f4336934bcff830e1b2af5bb)
2021-11-23 22:54:24 +01:00
Shauren f2456ff319 Scripts/Areatriggers: Fixed all areatrigger scripts triggering both on enter and exit instead of only on enter 2021-11-10 00:01:50 +01:00
Treeston e4e8c1c59c Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4f3e52b0d2e23d9b9e147041849ce12)
2021-10-22 23:47:51 +02:00
Seyden 8f097e4425 Core/Scripts: Implement script name reloading
* Authored by Seyden
* Co-authored by Naios
* We thank Shauren for your helpful feedback
2021-10-22 12:52:37 +02:00
Shauren b6b46924f6 Core/Scripts: Make ObjectMgr::LoadScriptNames safe to call multiple times 2021-10-12 16:09:47 +02:00