Commit Graph

165 Commits

Author SHA1 Message Date
Nathan Handley
4321b8a4de feat(Core/Scripting): Implement new hook OnBeforePlayerLogout() (#18163)
* new hook OnPlayerPreLogout

* Changed PreLogout to BeforeLogout per review

* Renamed OnPlayerBeforeLogout to OnBeforePlayerLogout per review

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-01-14 00:10:49 +01:00
avarishd
f476c8a6c9 feat(Core/Hooks): Add OnPlayerJustDied hook (#17973)
feat(Core/Hooks): Add OnPlayerJustDied
2023-12-10 19:06:23 -03:00
Tristan 'Natrist' Cormier
ac676f87ab chore(Core/Player): remove unused AnticheatSetSkipOnePacketForASH() function (#17947) 2023-12-09 01:09:52 +01:00
Winfidonarleyan
6faa364ad8 fix(Game/Scripting): add loading missing lfg scripts (#17949) 2023-12-06 16:21:46 -03:00
Andrew
0fa6a67815 feat(Core/Scripting): Implement AfterInstanceGameObjectCreate() global hook (#17935) 2023-12-03 18:04:16 -03:00
Winfidonarleyan
eb1ecc38a5 feat(Core/Scripting): move all script objects to separated files (#17860)
* feat(Core/Scripts): move all script objects to separated files

* Apply 5bfeabde81

* try gcc build

* again
2023-12-02 21:13:20 +01:00
Kitzunu
5bfeabde81 chore(Core/Misc): rename spellInfo pointers (#17914)
* Rename all
2023-12-02 06:03:15 -03:00
KJack
48a43c7f44 fix(Core/Creature): Resolve issue with dialog options randomly not working (#17596)
Remove unneeded ClearGossipMenuFor
2023-11-08 19:33:03 -03:00
KJack
f417a166bc feat(Core/Scripts): added OnAfterSpecSlotChanged hook (#17637) 2023-11-07 23:46:08 +07:00
KJack
751ffc7c70 feat(Core/Hooks): Add OnAfterDatabaseLoadCreatureTemplates hook (#17621)
* Add OnAfterDatabaseLoadCreatureTemplates hook
- fix issue where the fast template cache was not updated correctly after a CS reload of a single creature template

* Parameter naming tweak to reduce confusion.

* Refactor to streamline fastcache creation, remove threading concerns

* Remove unneeded resize when loading creature templates

* Update fast cache resizing to highest-performing option
2023-10-31 06:58:45 -03:00
Kitzunu
f757e93da5 refactor(Core/Misc): Make DeathState enum class (#17607) 2023-10-28 10:54:03 +02:00
Hasn
e644dd949f feat(Core/Scripting): Implement hook OnAfterCalculateLootGroupAmount() (#17456)
Add hook 'OnAfterCalculateLootGroupAmount' to GlobalScript, similar to existing hook 'OnAfterRefCount'. Allows for dynamic modification of the group loot rate
2023-10-08 17:18:44 -03:00
KJack
a23d5ee50d feat(Core/Scripting): Implement OnBeforeCreatureSelectLevel() hook (#17391)
* Add `OnBeforeCreatureSelectLevel()` hook
- allows modules to alter the level of a creature just before it is set

* Fix missing class name.

* Hook should catch even if the level isn't being changed.

* Trim whitespace.

* Revert "Trim whitespace."

This reverts commit 76768d85c0b9878828b71a008e709c1df7ddadc5.

* Fix whitespace
2023-10-01 02:25:06 -03:00
KJack
c25d0b38e8 feat(Core/GameObject): Implement OnGameObjectModifyHealth() hook (#17374) 2023-09-28 22:39:57 +02:00
Tralenor
0796df57ac feat(Core/Player): Addition of a Hook in CanFlyInZone check (#16590)
---------

Co-authored-by: tmoos <tmoos@meteomatics.com>
Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2023-09-20 22:40:08 +02:00
Skjalf
8d08a861aa feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook (#17209)
* chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up

* Revert "chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up"

This reverts commit f841ef9da313976179fb788d9573ff8ced05ecb9.

* feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook

* Update GlobalScript.cpp
2023-09-08 01:52:02 -03:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Žan Skamljič
cfc15abb16 fix(Scripts/Player): correct the parameter order in OnUpdateGatheringSkill (#16635) 2023-06-27 20:10:44 +02:00
Walter Pagani
7f9cdda17b chore(Core/ScriptMgr): Hooks used in mod-aoe-loot (#16589)
* Creating the necessary hooks for the loot aoe

* update hook

* Typing error

* Method name and add documentation

* codestyle

* Misc. fixes
2023-06-24 08:23:23 -03:00
Žan Skamljič
ee3ab6fe2a chore(Core/ScriptMgr): Add Hooks for profession skill gains (#16526) 2023-06-19 16:12:20 -03:00
Walter Pagani
c676a82837 chore(Core/ScriptMgr):Add Hook OnBeforeFillQuestLootItem (#16509)
* chore(Core/ScriptMgr):Add Hook OnBeforeLootItem

* Change name. Credit Anchy
2023-06-13 08:10:35 -03:00
天鹿
ab7c12fe41 chore(core): Cleanup code p2 (#16041)
* Update AchievementMgr.cpp

* Update M2Stores.cpp

* Update LFGHandler.cpp

* Update PetHandler.cpp

* Update WaypointMovementGenerator.cpp

* Update ScriptMgr.cpp

* Update SpellAuras.cpp

* Update Spell.cpp

* Update SecretMgr.cpp

* Update SpellScript.cpp

* Update SecretMgr.cpp

* Update Spell.cpp

* Update SpellAuras.cpp

* Add files via upload

* Update PetHandler.cpp

* Update PetHandler.cpp

* Update CalendarMgr.cpp

* Update LFG.h

* Update WaypointMovementGenerator.cpp

* Update MapScripts.cpp

* Update Unit.cpp

* Update SmartScript.cpp
2023-05-13 15:00:29 -03:00
AnchyDev
444793346d feat(Core/Hooks): Add parameter to detect XP origin for OnGiveXP hook. (#16109)
Added enum parameter to detect where XP originated from.
2023-05-05 22:39:36 -03:00
ZhengPeiRu21
5af67b384b feat: Add CanPlaceAuctionBid hook (#15154)
* feat: Add CanPlaceAuctionBid hook

* Codestyle fix
2023-04-17 21:06:04 -03:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
55Honey
a1fb48391b feat(Core/Scripting): Implement OnBeforeSetBossState (#14891) 2023-02-07 13:15:17 -03:00
UltraNix
b1bc1c24e4 feat(Core/Scripting): Added new hook: OnInstanceIdRemoved. (#14670)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: 55Honey <71938210+55Honey@users.noreply.github.com>
2023-02-04 19:56:20 -03:00
Skjalf
a73d4173df feat(Core/Scripting): Pass SpellInfo through the ModifyPeriodicDamage… (#14360)
feat(Core/Scripting): Pass SpellInfo through the ModifyPeriodicDamageAurasTick() hook
2022-12-24 11:38:21 -03:00
ZhengPeiRu21
7990de44c1 fix(Core): Correct Quest Details Display at Max Level (#13046)
* fix(Core): Quest Details Display at Max Level

* Add OnSetMaxLevel hook
2022-12-20 12:14:53 +01:00
Skjalf
6177ce4688 feat(Core/Scripting): Create OnStoreNewItem() hook (#13725) 2022-11-07 00:26:47 -03:00
Skjalf
8b7fb759c2 feat(Core/Scripting): Expand ModifySpellDamageTaken() to include the … (#13707)
feat(Core/Scripting): Expand ModifySpellDamageTaken() to include the spell data
2022-11-05 12:39:58 -03:00
Skjalf
ef8d7f4ed9 feat(Core/Scripting): Implement OnAuraApply() hook for unitscripts (#13658)
* feat(Core/Scripting): Implement OnAuraApply() hook for unitscripts

* fix build

* Update ScriptMgr.h
2022-11-02 22:34:52 -03:00
Skjalf
ab3548e2e4 feat(Core/Scripting): Expand ModifyHealReceived() to also include hea… (#13655)
feat(Core/Scripting): Expand ModifyHealReceived() to also include healing over time
2022-11-02 19:19:17 -03:00
M'Dic
967f8ce6d6 update (core): Startup console capitalizations (#13195) 2022-10-01 13:09:34 -04:00
DavuKnight
d8598c764e feat(core): OnFfaPvpStateUpdate Event (#13023)
* Event for Notification when the Player enters into or Leaves Ffa

* Bug and Formatting Fixes
2022-09-21 08:33:28 -04:00
ZhengPeiRu21
7a137767fa feat(Core): OnBeforeLootMoney hook (#13030) 2022-09-21 08:28:19 -04:00
ZhengPeiRu21
d9390e34b4 fix(Core): CanAccountCreateCharacter hook parameters (#13060) 2022-09-21 07:42:56 -04:00
ZhengPeiRu21
7dc598f364 feat(Core): CanAccountCreateCharacter hook (#13020) 2022-09-19 00:58:18 -03:00
ZhengPeiRu21
25f88caa42 fix(Core): Correct Post 3.1 Fishing Skill Leveling (#12996) 2022-09-18 22:09:47 -03:00
AnchyDev
9b6a3ee4f9 feat(Scripting/Hooks): Add OnBeforeOpenItem Hook (#12576) 2022-09-06 19:43:32 -03:00
ZhengPeiRu21
80e6a6d781 feat(Core): OnBeforeChooseGraveyard Hook (#12860) 2022-09-06 15:47:37 -03:00
AnchyDev
dcbf224392 feat(Core): Add OnGroupRollRewardItem hook. (#12538)
Added OnGroupRollRewardItem hook.
2022-07-26 21:08:41 -03:00
Skjalf
9920e01b2b feat(Core/Scripting): Add several UnitHooks (#12365) 2022-07-11 14:57:38 -03:00
Axel Cocat
aa89f6c3a6 feat(Core): add OnDisplayId hook (#12320) 2022-07-11 09:11:26 -03:00
Skjalf
32ba21d029 feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook

* reverse logic
2022-07-09 00:10:04 -03:00
Tralenor
6cf82e3bd6 feat(Core/DB): Add Hooks On creature/game object save to db (#11246)
* implement OnCreatureSaveToDB and OnGameObjectSaveToDB Hooks

* fix Whitespaces in ScriptMgr.h

Co-authored-by: Timothée Moos <t1997.m@gmx.net>
2022-05-06 00:42:49 -03:00
ZhengPeiRu21
44b7a0666c feat(Scripting/Hooks): implement OnQuestComputeXP() hook (#10934) 2022-03-24 10:27:15 +01:00
Kargatum
78bdc89881 feat(Core/Battleground): rework bg queue system (#10817) 2022-03-15 14:36:49 -03:00
Bogir[rus]
75439773d0 fix and bringing to a unified style warnings of server loading logs to be more visible at server startup (#10970) 2022-03-12 04:57:26 -03:00
acidmanifesto
69e2f2e3aa fix/feat: (Core/PacketIO): updated sound and creature addon (#10813)
* fix\feat: (Core/PacketIO): updated sound and creature addon

updated SMSG_PLAY_SOUND, SMSG_PLAY_MUSIC and SMSG_PLAY_OBJECT_SOUND via tc cherry pick
https://github.com/TrinityCore/TrinityCore/pull/2363 and 0f1f7ef401 by @joschiwald  and @ForesterDev
This so far a attempt to align atleast with sound with tc, and correct a potentional issue of hearing creature sounds that is not in visible range. I notice PlaySound was being defined in some weird dependency as it isnt with tc so I renamed it to Playsound. Notice a isLarge still being used in the creature addon when it was depreciated, so i removed that a that seem to of interfered with visibilitydistanceType.

Co-Authored-By: joschiwald <736792+joschiwald@users.noreply.github.com>
Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
2022-02-26 10:05:58 -05:00