Commit Graph

136 Commits

Author SHA1 Message Date
Exitare
98ceb1c067 fix(Core/PlayerScript) Align player script function names (#21020)
Co-authored-by: sudlud <sudlud@users.noreply.github.com>
2025-02-16 14:59:41 +01:00
Takenbacon
ee69a569c4 fix(Core/Grids): Grid improvements (#20955) 2025-02-14 22:11:27 +01:00
Kitzunu
ed008a8780 refactor(Core/Spells): Add helpers for HasAuraType (#20802) 2024-12-01 08:50:59 -03:00
Andrew
7da3ab573c fix(Scripts/Events): Earning Spirit of Sharing should remove the othe… (#20732)
fix(Scripts/Events): Earning Spirit of Sharing should remove the other buffs
2024-11-25 03:15:07 -03:00
Jelle Meeus
3a705edd5b fix(Scripts/Events): Hallow's End Headless Horsemen fly intro (#20366)
manually set move flags
2024-11-02 06:37:40 -03:00
Francesco Borzì
cb7e28df05 refactor(src/server/game/*): remove unused imports (big part 1) (#20310) 2024-10-27 10:25:40 +01:00
Benjamin Jackson
1edac37ac3 refactor(Core): Make more use of helpers. (#19835)
* Init.

* Reword.

* Update codestyle script.

Co-Authored-By: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Add gameobject type ID check, reorder checks.

* Add helper/codestyle check for unit type.

* `IsUnit()` -> `IsCreature()`

* Add `IsUnit()` method.

* Use type mask.

https: //github.com/TrinityCore/TrinityCore/commit/cc71da35b5dc74abf71f8691161525a23d870bb5
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com>

* Replace instances of `isType` with `IsUnit`.

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
2024-09-03 14:41:31 -03:00
Grimdhex
643362d697 refactor(Core/Object): adds consistency in the use of type object check (#19671) 2024-08-25 09:57:37 -03:00
Grimdhex
61f3a631c3 fix(Server): remove double blank lines at the end of several files (#19735) 2024-08-25 07:21:14 -03:00
Francesco Borzì
e592fdd248 refactor(Scripts/misc): remove unused imports (#19458) 2024-07-22 16:20:41 -03:00
sudlud
4b506a8cdd fix(Scripts/FireworkShow): set firework gameobjects active (#19403)
- improve visibility of the show
- prevent glitches in the show execution
- each gameobject only exists for a very short duration, so there
  should be no relevant performance impacts
2024-07-19 17:08:46 +02:00
sudlud
7b8e2514bf fix(Scripts/Midsummer): correctly despawn gameobjects (#19387) 2024-07-14 12:24:06 -03:00
sudlud
3d03cb64ba fix(Scripts/Midsummer): fix handling of unwanted npc and gameobject s… (#19141)
fix(Scripts/Midsummer): fix handling of unwanted npc and gameobject spawns

- properly spawn bonfire spell focus for city bonfires
- properly despawn unwanted creatures and gameobjects which are spawned
  by linked traps
- all midsummer bonfire gameobjects have a linked trap "181290 Midsummer Bonfire Spawn Trap"
- the trap is linked to the spell "28784 Summon Midsummer Bonfire Bunnies" which then spawns
  npc "16592 Midsummer Bonfire", npc "16606 Midsummer Bonfire Despawner" and gameobject
  "181371 Midsummer Bonfire Spell Focus" i have no idea how this trap is beeing triggered,
  but it's doing only harm right now
2024-06-24 05:10:31 -03:00
天鹿
680c219770 fix(Scripts/Midsummer): use GUID storage rather than Player object (#19109)
* Update midsummer.cpp

* Update midsummer.cpp

* Update midsummer.cpp
2024-06-21 10:45:56 -03:00
Benjamin Jackson
c3a2b83eba fix(Scripts/Midsummer): Resolve Ribbon Pole crash. (#19108)
* Init.

* Add todo.

For you, Nyeriah. 😛
2024-06-20 22:06:49 -03:00
sudlud
0f82c8e8dd fix(Core/Events) Implement Fireworks Spectacular (#18860)
* init sql file for fireworks spectacular - add entry in game_event

* add missing delete statement

* add gameobjects 180698 'Party Table, 180699 'Festive Keg, 180700 'Hay Bale 1'

* update comment, add gameobject 180754 Toasting Goblet

- todo: pooling (?) - the tables are quite full
- todo: why are there tables missing? e.g. below:
.go ga 82615

* add gameobject 180905 'Festive Mug'

* add gameobjects 'Firework, Show, Type%'

* add vendors

* add revelers and bruisers

TODO: also add 15906 'Ironforge Reveler'

* remove '%Firework Show%' spawns

- these will be spawned temporarily via script

* add firework gameobject SmartAI

* WIP stormwind fireworks show

steps to test the show:
.go xyz -8984 498 96 0
.gob add temp 180749

* improve handling of fireworks show, add gameobject 180749 'Cheer Speaker' spawns

how to test:
.go ga 64640
.event start 72

* prepare fetching correct show based on map+zone

* introduce typedef for FireworkShow

* Add Teldrassil show

.go ga 64651
.event start 72

* fix Teldrassil and Stormwind shows, add initShow() debug message, replace magic numbers for fireworkShow sizes

- these were broken due to an error in my txt parsing script

* add Shattrath show

.go c 139914
.event start 72

* add Silvermoon show

.go ga 64670
.event start 72

* add Booty Bay show

.go ga 64630
.event start 72

* add Thunder Bluff show, add Exodar show, set firework gameobjects active, update comments, remove _maxCount

* add Underciy show

.go ga 64641
.event start 72

* fix Undercity show indexes

* move code from midsummer.cpp to new file firework_show.cpp

* add Orgrimmar show

.go ga 64647
.event start 72

* add Ironforge show

.go ga 64634
.event start 72

* update shows from sniff parses using fixed export script

* update 'Party Table, 'Festive Keg' and 'Hay Bale 1' spawns with additional sniffs

* update 'Toasting Goblet' spawns with additional sniffs

* update 'Festive Mug' spawns with additional sniffs

* update 'Fireworks Revelers' spawns with additional sniffs

* remove duplicate AND from sql file

* attempt moving FireworkShows to the heap

* start firework show at the full hour and also handle late starts correctly

- also perform a minor cleanup

* do not touch gameobject with guid 16586 which is linked to harvest festival

* move firework_show.cpp to subfolder firework_show

* move firework_show arrays to seperate header files

* update show handling, still not final

* update for new struct design, Teldrassil show running correctly already

* update remaining shows for new firework show structs

* rename go_cheer_speaker to go_firework_show

* update debug / error messages

* update all firework shows for local spawnIndex handling

* spawn 'Toasting Goblet's for 10min after show ende

* add reveler SAI and make revelers cheer on show end

* remove log_error messages

* add comment for festive mugs

* Update firework_show.cpp

* add missing include for uint32

* replace an uint32 with an int

* revert unintended changes in midsummer.cpp

* add #include "GameObjectScript.h"

* remove ThunderBluff Reveler spawns with wandering movement

- these probably should have waypoints instead or just got parsed incorrectly
- it should be safe to remove these for now and probably investigage this further later on

* update function names
2024-05-12 18:39:14 +02:00
Anton Popovichenko
f792b0d708 feat(Core/Scripts): Optimize PlayerScripts by calling only overridden/implemented functions. (#18672)
* feat(Core/Scripts): Optimize PlayerScripts by calling only overridden/implemented functions.

* Fix codestyle.

* Fix typo

* PLAYERHOOK_END is not a hook

* Address code review feedback.

Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>

* Codestyle fixes

* Fix typo



Co-authored-by: PkllonG

---------

Co-authored-by: Winfidonarleyan <dowlandtop@yandex.com>
2024-04-11 17:08:30 -03:00
sudlud
a2f21bd46e fix(Scripts/Midsummer): Add SpellScript for "Fire Festival Fortitude" (#18246)
- implement zone wide buff
- Blizzard originally used gameobject 181431 'Fire Festival Fury Trap'
  for this implementation
2024-02-01 09:17:17 -03:00
Benjamin Jackson
c9bc5084be fix(Scripts/Midsummer): Correct behavior for Striking Back quests. (#18171)
* Init.

Make use of spell for summoning Ahune's lieutenants, set up gossip/smart scripts for the cast and lieutenant summon speech, and remove permanent lieutenant spawns.

Partially cherry-picked from 91268f6631

Co-Authored-By: Xfurry <172444+xfurry@users.noreply.github.com>

* Use GUIDs for creature delete, add game_event_creature delete.

* Various adjustments.

Move comment block, add Desolace stones gossip menu options, add a delete before insert.

* Set up conditions.

* Add spell cast comments.

Sourced from Wrath Classic Wowhead.

* Add basic combat SmartAI.

* Remove comment block.

* Add creature name comments.

* Use `id1` in preparatory creature delete.

---------

Co-authored-by: Xfurry <172444+xfurry@users.noreply.github.com>
2024-01-21 00:05:18 +01:00
sudlud
8720e08da8 fix(DB/SAI): Move GameObjectScript go_midsummer_bonfire to SAI (#18135) 2024-01-14 11:08:18 -03:00
daobashun
9c95ac6d2e fix(Scripts/PilgrimsBounty): Correct text for Turkey Tracker (#18123)
* closes https://github.com/chromiecraft/chromiecraft/issues/6356
2024-01-08 19:41:26 +01:00
sudlud
87c3421262 fix(Scripts/Midsummer): Improve Torch Catching based on sniffs (#18071)
- Update creature 26188 '[PH] Torch Catching Target Bunny' with sniffed values
- correctly randomize torch target positions
2024-01-01 09:06:54 -03:00
sudlud
1710d4d1c3 fix(Scripts/Midsummer): Implement Midsummer Bonfire mechanics (#18023) 2023-12-25 03:06:15 -03:00
sudlud
f2007aa59e refactor(Scripts/Midsummer): use scheduler provided by CreatureAI (#17955) 2023-12-08 23:44:51 +01: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
sudlud
09d9a0b73f fix(Scripts/Midsummer): AuraEffectRemoveFn -> AuraEffectApplyFn (#17793) 2023-11-19 13:28:38 +01:00
Kitzunu
bbadc32bea Revert Visibility Notifier changes (#17682)
* Revert "fix(Core/Grid): Implement missing GridUnload setting (#17569)"

This reverts commit 79b39f9655.

* Revert "fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)"

This reverts commit 60e27511c5.

* Revert "fix(Core): GridCleanUpDelay Log (#17436)"

This reverts commit 90b16ca065.

* Revert "feat(Core/Grids): Implement visibility notifier (#15919)"

This reverts commit 2779833768.
2023-11-12 00:48:49 +01:00
Ludwig
cb483d124f fix(Script/Spell): fix AOE circle bug on Midsummer Torch Catching (#17654)
* fix(Spells/Midsummer): fix script for spell 46747 SPELL_FLING_TORCH_DUMMY

* SpellInfoCorrections: fix target of spell 46747 Fling torch

* DB: assign spell 46747 Fling torch to item 34833 Unlit Torches

* remove whitespaces at src/server/game/Spells/SpellInfoCorrections.cpp:4610
2023-11-09 00:19:57 +01:00
Ludwig
630b90a633 fix(Scripts/Midsummer): Implement Ribbon Pole dance effects (#17417)
* fix(Scripts/Midsummer): Implement Ribbon Pole dance effects

* midsummer.cpp: remove whitespaces at end of lines

* midsummer.cpp: fix unused parameter error

* add spacing after 0.0f

* replace Milliseconds(...) by ...ms and Seconds(...) by ...s

* cleanup comments

* remove manual cleanups / despawns from DoCleanupChecks()

- rely on NPC despawn timers
- manual cleanup / removal actually is a bit excessive

* set INTERVAL_DANCING_FLAMES to 15s

* set despawn time to 1min for big dancing flames according to spell 46827

* set spawnDist to 12 for big dancing flames according so spell 46827

* use library function Acore::Containers::RandomShuffle() to shuffle _danclerList

* sql: do not set SmartAI for NPC 17066

already using ScriptName and can't have both

* combine 3 sql files into 1

* remove INTERVAL_... enum values

* remove unnecessary checks of if(_bunny)

* sql: fix smartscript comment

* rename spell define to correct spell name
2023-10-18 14:22:26 +02:00
avarishd
ad66728973 fix(DB/Creature): Drunken Brewfest Reveler model (#17494)
* fix(DB/Creature): Drunken Brewfest Reveler model

* clarify enum

+ farm lines
2023-10-17 15:37:53 -03:00
Ludwig
de50ce3305 fix(Scripts/Midsummer): Randomize ribbon pole beam color (#17380)
* fix(Scripts/Midsummer): Randomize ribbon pole beam color

* Update data/sql/updates/pending_db_world/rev_1695820418952974700.sql

Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com>

* Add Validate() to spell script spell_midsummer_ribbon_pole

---------

Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com>
2023-10-01 09:26:18 +02:00
Ludwig
1004dae7e5 refactor(Scripts/Midsummer): Add/Update Validate() for spell checks (#17390) 2023-09-30 09:54:27 +02:00
Ludwig
7a1c303d49 refactor(Scripts/Midsummer): Assign enum values to gameobjects and sp… (#17379)
* refactor(Scripts/Midsummer): Assign enum values to gameobjects and spells

* rename GO_TORCH_TOSS_TARGET_BUNNY to NPC_TORCH_TOSS_TARGET_BUNNY

* add more enum values to enum flingTorch
2023-09-29 18:30:35 +02:00
AG
2779833768 feat(Core/Grids): Implement visibility notifier (#15919)
* Cherry-picked from TrinityCore (unable to find author)
2023-09-28 22:28:28 +02:00
Ludwig
6649ad08d7 fix(Scripts/Midsummer): Make beam target Ribbon Pole top (#17358)
* fix(Scripts/Midsummer): Make beam target Ribbon Pole top

progress #12145

* refactor(Scripts/Midsummer): shorten spell_midsummer_ribbon_pole_visual::UpdateTarget
2023-09-26 18:51:59 -03:00
Ludwig
e2e393502c fix(Scripts/Midsummer): Add missing torch shadows (#17323) 2023-09-24 16:24:33 -03:00
Grimgravy
6990a1d2a4 fix(Scripts/Quest): improve Catch the Wild Wolpertinger! (#17333) 2023-09-24 16:23:58 -03:00
Ludwig
58f8fe6426 refactor(Scripts/Midsummer): Remove old unused code for spell 45644 (#17324)
- spell 45644 used to be linked to spell_midsummer_juggling_torch

- spell 45644 was later linked to new implementation
  spell_midsummer_torch_catch in e1e4c6cddc

- old implementation of spell 45644 was never removed from
  spell_midsummer_juggling_torch
2023-09-23 18:55:45 -03:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Gultask
c0bbb52483 fix(Scripts/Midsummer): Stop Bonfires from spawning more gameobjects (#16618)
* Update midsummer.cpp

* .
2023-06-24 20:29:05 -03:00
Revision
6e39ffa64e fix(Core/GameObject): Pumpkin Shrine (#13460)
Co-authored-by: M'Dic <joshua.lee.betts@gmail.com>
2023-03-16 18:57:36 +01:00
Kitzunu
bd6034e1a9 refactor(Core/AI): Some more refactoring prep for Comat Threat system… (#15026)
Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com>
2023-02-13 21:39:40 +01:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
Maelthyr
afb071bb04 refactor(Scripts): Update vanilla scripts to std::chrono (#14876)
Co-authored-by: Maelthyrr <AmanThul-Project@proton.me>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2023-02-05 12:35:48 -03:00
Skjalf
bf30c66ba4 feat(Core/GameObject): Expand IsSummonedBy() to GameObjects (#14789)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
2023-01-29 09:44:33 -03:00
Skjalf
b4e3f1310b feat(Core/Unit): Add KillSelf overload (#14785)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
2023-01-28 17:57:23 -03:00
M'Dic
437d93926f fix (core): macos12 depreciation workflow error / security CWE-120 (#14746)
* fix (core): macos12 depreciation workflow error

Fix workflow error message:
azerothcore-wotlk/src/common/Utilities/Util.cpp:558:9: fatal error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        sprintf(buffer, "%02X", bytes[i]);

* Update BattlegroundAV.cpp

* more macos12 fixit

* Update spell_generic.cpp
2023-01-23 06:13:27 -05:00
UltraNix
e2bf207ae4 fix(Scripts/Spells): Apple Trap should not activate without the playe… (#13868)
fix(Scripts/Spells): Apple Trap should not activate without the player being on a Rental Ram.

Fixes #13186
2022-12-06 09:42:17 -03:00
Maelthyr
3024bee3ba refactor(Core/UnitAI): Update target selector (#13169)
* refactor(Core/UnitAI): Update TargetSelector.

Cherry-pick:
*https://github.com/TrinityCore/TrinityCore/pull/19930

Co-authored-by: Treeston <treeston@users.noreply.github.com>

* fix GGC/CLang errors in scripts

* .

* missing a file and fix a script error

* .

* fix path changes dude to a miss click in the second commit

* .

Co-authored-by: Maelthyrr <lynethris@protonmail.ch>
Co-authored-by: Treeston <treeston@users.noreply.github.com>
2022-12-06 09:27:13 -03:00
UltraNix
7f4fe2e3ec fix(Scripts/Spells): Hallow's End Candy punpkin treat should turn pla… (#13808)
...yer into a pirate.
2022-11-21 18:59:24 -03:00