Commit Graph

568 Commits

Author SHA1 Message Date
Francesco Borzì
cb7e28df05 refactor(src/server/game/*): remove unused imports (big part 1) (#20310) 2024-10-27 10:25:40 +01:00
Dan
d9e2773519 refactor(Scripts/ZulAman): refactor Jan'alai (#20195)
* Janalai (#13)

* wip

* nullcreature

* wipppp

* first attempt at working state

* hatcherai

* test

* conditions for hatching

* some potential fixes

* some debuggo

* some small fixes

* general fixes

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* more debug

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* fixed?

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* remove dumb bomb count

it is not needed

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* other debug

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* remove script for egg

* F

* Revert "F"

This reverts commit 246c66ccdac52e38c95c63f0ee59f1add97f4d64.

* Revert "remove script for egg"

This reverts commit b85933583fd480f941b839623c7291b6d5887246.

* different spell ids

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* Update boss_janalai.cpp

* restore data sets

changing this in a different PR, but data is still being set here
2024-10-26 00:44:25 +02:00
Andrew
96082065f6 refactor(Scripts/ZulAman): Move Hexlord adds to SAI (#20185) 2024-10-13 07:47:05 -03:00
ConorB
1d99440f74 fix(cpp/db): how to win friends and infleunce enemies missing dialogue (#20132)
* fix(cpp/db): Quest how to win friends and infleunce enemies missing dialogue during torture

Scarlet Crusader (id: 28940), Scarlet Marksman (id: 28610), Scarlet Preacher (id: 28939) and
Scarlet Commander (id: 28936) were missing some dialog in the database and script
npc_crusade_persuaded always succeeded when the spell on Keleseth's Persuader (item id: 39371
and spell id: 52781) procced. It now only succeeds thirty percent of the time. Increased ppmRate for spell to 8.
Finally removed aggro when scarlet was 'persuaded'

closes Azerothcore issue #20110

* fix(cpp): trailing white space

* fix(db): error in text

* fix(db): syntax error

* fix(cpp/db): using urand and removed db name from insert

* fix(db): remove broadcast text and missing creature text

* fix(DB): change sql queries to comply with rules

Added a delete query before insert and backticks to column and table names

* add empty newline at the end

---------

Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
2024-10-12 13:06:42 +02:00
Rorschach91
84646a7955 fix(Script/DeathKnight): A Special Surprise Npcs issues. (#20178) 2024-10-11 23:52:06 -03:00
kissingers
0cb6081bc7 fix(Scripts/ZulAman): Nalorakk can't able to trigger instance events when death (#19895)
* ignore .vs path

* Fix Nalorakk not able to trigger instance events when death

* Revert "ignore .vs path"

This reverts commit 81e949727645d0356eb8bb9490152971dbb9b09b.

* Remove instance null check

* Remove instance null check

* Revert "Remove instance null check"

This reverts commit b97b45284edb3166bc3c253adf1773b031bb1507.
2024-10-11 08:06:28 +02:00
ConorB
6ef16f18bb fix(Script): Fix npc following player after starting duel (#20161)
* fix(Script): Changed npc move script

Death Knight Initiate (id: 28406) was not turning to face the player
after they engaged a duel instead the npc followed the player
wherever they went. Change was to remove script line for follow
and replace with SetFacingToObject and specify the player
as the object.

Closes AzerothCore issue #20108

* fix(script): Fix npc following player whitespace issue

Attempt to fix code styling fail on whtiespace

* fix(script): Fix npc following player another whitespace issue

Found more whitespace that was made by the fix to previous whitespace
2024-10-10 14:43:57 +02:00
Francesco Borzì
5a96ce283d refactor(Scripts): remove unused imports (#20086) 2024-09-29 13:20:21 +02:00
Kitzunu
386aea03ee chore(Core/Misc): Some cleanup (#19970)
* remove weird blanks

* update if

* ) ) to ))

* missed some ) )

* now switch

* .
2024-09-21 19:34:31 +02:00
Mershl
0ac7ab03bb fix(Scripts/UBRS): increase Drakkisath's conflagrate interval from 10s..13s to 18s..25s, avoiding near infinite CC chains (#19806)
fix(Scripts/UBRS): increase Drakkisath's conflagrate interval from 10..13s to 18s..25s, avoids infinite CC chains (conflagrate is a 10s CC)
2024-09-11 11:19:14 -03:00
kissingers
cf95c1dfbd fix(Scripts/ZulAman): Nalorakk sometimes not move when player close (#19893)
* Fix nalorakk sometimes not move when player close

* init _phase

* Revert "Fix nalorakk sometimes not move when player close"

This reverts commit b42cd4634bb4ffd225eaa7480428c6ba6b4817c6.
2024-09-07 15:39:31 +02: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
221dbd3fdb chore(Apps/Codestyle): add new codestyle checks for pointers and range loops (#19841)
* chore(Apps/Codestyle): add new codestyle checks for pointers and range loops

* revert a typo
2024-09-03 13:02:38 -03:00
Kitzunu
9af86553c5 chore(Core/Misc): update floor and ceil to std (#19837) 2024-09-03 08:01:00 -03:00
daobashun
e1692ae5b6 fix(scripts/npc_calvin_montague): Convert to SAI, Add emotes when completing quests (#18087)
* Magic uses sniffing IDs
Use the sniffer timer and factions

* Wait 3 minutes if the mission fails

* 1. When a task fails, it enters passive mode
2. Add 'quest_details' data to the database

* Remove spaces

* Delete blank lines

* Modify the code as required

* Update src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Remove curly braces

* Change the name of a private member variable

* Move the c ++ script to smart script

* Delete the C++ script
Re-add the deleted quest_details data

* del blank lines

* Delete the C++ script file

* Modify the annotation
Return to the home pointset phase to 0
Return to the home point to allow the SAI phase reset

* Remove spaces

* Delete functions that are not in use

* Update rev_1704025138911597700.sql

* fix merge error - delete zone file

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2024-08-28 21:05:40 +02: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ì
2dd53e3521 refactor(Scripts): remove unused imports (#19503) 2024-07-29 14:44:52 -03:00
Francesco Borzì
e8bd391505 refactor(Scripts/EasternKingdoms): remove unused imports (#19457) 2024-07-23 08:56:46 -03:00
Jelle Meeus
5674c23d04 fix(Scripts/BlackwingLair): Nefarian say low health and rewrite p3 (#19405)
* Nefaran says low hp and shadowflame texts, use ScheduleHealthCheckEvent

* use drakonic bone spells

* remove no longer needed _scheduler

* remove extra file
2024-07-17 08:09:38 -03:00
Jelle Meeus
9109de6500 fix(Scripts/Karazhan): Nightbane Combat Abilities (#19321)
* fix(Scripts/Karazhan): NightbaneCombatAbilities

update fear

WIP add comments

increase air phase

* remove distracting ash from ground phase

* :sort
2024-07-17 01:46:23 +02:00
avarishd
e92a5829a0 fix(Scripts/ZG): Jin'do using wrong hex spell (#19389) 2024-07-14 13:24:23 -03:00
Kitzunu
f41b80ddf1 fix(Build): -Wsign-compare (#19320) 2024-07-07 20:02:31 +02:00
Kitzunu
9e6eca979b fix(Scripts/ShadeOfAran): Make immune to Mind-numbing and Cure of Tongue (#19309)
* closes https://github.com/chromiecraft/chromiecraft/issues/6900
2024-07-06 11:22:13 +02:00
Dan
b959d5cc87 refactor(Scripts/ZulAman): Nalorakk refactored (#19010)
* init

* update movement

* updates and debug

* stuck :/

scheduler doesn't seem to update when at the end of wp movement???

* fix wps and implement fight

* finalise

* unused

* Update boss_nalorakk.cpp

* keep oprientation

* ran_intro
2024-07-04 20:13:41 +02:00
Kitzunu
5a4692e45a chore(Core/Misc): #include cleanup (#19255) 2024-07-02 15:52:02 +02:00
Jelle Meeus
47ad691c92 refactor(Scripts/EasternKingdoms): RegisterSpellScript macro (#19241)
* zone_undercity spell:spell_blight_worm_ingest

* zone_blasted_lands spell:spell_razelikh_teleport_group

* zone_isle_of_queldanas spell:spell_bh_cleanse_quel_delar
2024-07-01 23:28:03 +02:00
Jelle Meeus
0d7f4c43e8 refactor(Scripts/SunwellPlateau): Spell Scripts registry macros (#19223) 2024-06-29 06:06:38 -03:00
Benjamin Jackson
fd87ce1bf3 fix(Scripts/Karazhan): Destroy Netherspite portals on death. (#19203)
Init.
2024-06-28 05:52:46 -03:00
Benjamin Jackson
617341230e fix(Scripts/Karazhan): Allow portal color effects to overlap on players. (#19204)
Init.
2024-06-28 05:25:36 -03:00
Jelle Meeus
7e0dff5839 fix(Scripts/Karazhan) Nightbane take off phase handling (#18934)
* nightbane fly skip ground phase

use conditional schedule takeoff instead

invincibility fix and timing

no need to delay ScheduleGround

* (WIP) cursed boss

new inro
lands
attack flag is not removed.. cant attack :)

* fix intro, refactor fly to air, handle waypoints, air facing, urn,...

* add PassiveAI header

* revert removal of helper target on roof
2024-06-27 18:03:19 +02:00
Jelle Meeus
a740c252f9 refactor(Scripts/BlackrockMountain): Spell Scripts registry macros (#19186)
* boss_garr aura:spell_garr_separation_nexiety_aura

* boss_garr spell:spell_garr_frenzy

* molten_core aura:spell_mc_play_dead_aura

* boss_magmadar spell:spell_magmadar_lava_bomb

* boss_majordomo_executus spell:spell_hate_to_zero

* boss_majordomo_executus aura:spell_majordomo_separation_nexiety_aura

* boss_majordomo_executus spell:spell_summon_ragnaros

* boss_shazzrah spell:spell_shazzrah_gate_dummy

* boss_baron_geddon aura:spell_geddon_inferno_aura

* boss_baron_geddon aura:spell_geddon_armageddon_aura

* boss_razorgore spell:spell_egg_event

* instance_blackwing_lair spell:spell_bwl_shadowflame

* fixup! boss_majordomo_executus aura:spell_majordomo_separation_nexiety_aura

* fixup! boss_garr aura:spell_garr_separation_nexiety_aura

* fixup! fixup! boss_garr aura:spell_garr_separation_nexiety_aura
2024-06-27 18:03:08 +02:00
Jelle Meeus
b259ec6df7 refactor(Scripts/Karazhan): Spell Scripts registry macros (#19184)
* instance_karazhan aura:spell_karazhan_brittle_bones_aura

* instance_karazhan aura:spell_karazhan_overload_aura

* instance_karazhan spell:spell_karazhan_blink
2024-06-26 22:26:19 +02:00
Andrew
9e122a0cad fix(Core/AI): Fix bosses being stuck IN_PROGRESS if despawnonevade fl… (#19070)
fix(Core/AI): Fix bosses being stuck IN_PROGRESS if despawnonevade flag is used
2024-06-16 18:57:51 +02:00
Benjamin Jackson
d6d49a9e45 refactor(Core/ObjectMgr): Implement display probabilities. (#19068)
* Init.

Cherry-picked from TC commits 9d210476e5 and c488fb219a

Co-Authored-By: Traesh <9392905+traesh@users.noreply.github.com>
Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* Add brute data.

Needs validation against what existed before, i.e. Classic change prevention.

* Add validation info for brute data.

* Remove incomplete data queries.

* Requested changes.

* Whitespace.

* Requested change.

Table name.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Requested change.

Table name.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Resolve the funny merge conflicts.

I wonder why git blame doesn't work on a file with 20k lines in it that's odd huh champ.

* Remove unused parameter.

* Remove uses of unused parameter.

* Use unused parameter.

Hopefully?

* I will cry.

* Sobbing endlessly.

* Remove comment.

* Adjust table structure query.

Remove length parameters and allow null for build value.

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Adjust column datatype and add check constraint.

---------

Co-authored-by: Traesh <9392905+traesh@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2024-06-16 18:12:16 +02:00
daobashun
0abc66e57d fix(DB/Stratholme): add Magistrate Barthilas escape event in Stratholme (#17669)
* 1. Added Magistrate Barthilas escape event
2. Fighting the Magistrate Barthilas at the entrance will close the 2 gates leading to the plaza
3. A fight in the slaughterhouse will close the door to the side of the slaughterhouse and will not open until a fight with baron Rivendare
4. Associate some conversation text to Broad*castTextId
5. Added an action for the player to stand up - turn around - salute when the player approaches Aurius
6. Added combat AI to Aurius to prepare for the event where Aurius helps players kill baron Rivendare

* Error in SQL statements is fixed

* Fixed Magistrate Barthilas not turning into human form when he died. Transfiguration should be used on himself

* Fix a misspelling in a note

* fix error

* Save the status of the escape event to the database

* Remove spaces

* Modify the code formatting

* enum format restore

* Modify the enum

* Delete data/sql/updates/pending_db_world/斯坦索姆 fix.sql

Delete files that were accidentally pushed

* fix "Grand Crusader Dathrohan" Unable to speak when transforming and dying and the worldserver console error

* 1 waypoint  1 plus 1s suspension time.
2 Transmission data plus map number.

* The door to the slaughterhouse is opened when there is a player dying and all players in the party are not in combat

* Remove spaces and add comments

* Change as requested

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

Test if this button can be updated directly

Co-authored-by: KJack <kgithub@kellerg.com>

* Use the full sniffing path

* fix error

* edit

* Moved the escape time to smartscript
Delete the closed door

* Remove spaces

* Fixed where barthilas were not in the slaughterhouse after moving to near the slaughterhouse after the save location was restarted

* Delete unused classes

---------

Co-authored-by: KJack <kgithub@kellerg.com>
2024-06-07 08:11:13 +02:00
Jelle Meeus
b42ca49329 fix(Karazhan/Nightbane): Rain of Bones cast on one random player/pet, summon Skeletons at that location (#18892)
* replace skeletonspawn scheduler with spellscript

* Revert "replace skeletonspawn scheduler with spellscript"

This reverts commit 974bcb805be57c3175d63d91afe656c0bc327a9e.

* random target and remember position

* target position instead of player

* make pets valid targets for rain of bones

* change 100 to 100.0f
2024-05-13 20:39:17 +01:00
Jelle Meeus
d709080029 fix(Karazhan/Nightbane): no longer killable during flight (#18890)
add unkillable during flight phase

_flying: takeoff/landing, moving to location
Phase 2: in the air and casting air spells
2024-05-12 21:06:42 +02:00
天鹿
81280cd560 refactor(Scripts/Karazhan): 'uint' It can never be less than 0 (#18726)
Update boss_chess_event.cpp
2024-04-27 06:17:38 -03:00
Anton Popovichenko
fd029f81aa fix(Scripts/Karazhan): Fix crash in chess event. (#18695)
Fix crash in chess event
2024-04-10 16:21:53 -03:00
Anton Popovichenko
73340b94e3 feat(Core/Compression): Move packets compression from map to network thread (#18602)
* feat(Code/Compression): Move packets compression from map to network thread.

* Code style fix

* Remove unicode letter
2024-03-28 08:57:29 -03:00
Benjamin Jackson
a9b3f01579 fix(Scripts/Karazhan): Correct chess piece gossip faction check. (#18513)
Correct chess piece gossip faction check.

Co-authored-by: 天鹿 <18535853+pklloveyou@users.noreply.github.com>
2024-03-09 18:46:19 -03:00
Alethrion
ab2f527248 fix(Scripts/Karazhan): Chess Event Cross Faction (#18478)
Chess_Event_Cross_Faction
2024-03-09 09:31:30 -03:00
Andrew
6df652a8dd fix(Core/Creature): Prevent combat movement disabled creatures from r… (#18428)
* fix(Core/Creature): Prevent combat movement disabled creatures from repositioning if target moves within model boundary

* fixbuild

* Apply suggestions from code review
2024-02-27 10:11:39 -03:00
Nathan Handley
df33a57b78 feat(Core/Unit): New helper IsClass and script hook OnPlayerIsClass (#18243)
* Class Comparison Logic Encapsulation - Parity

* Add Context to IsClass

* Add Unit IsClass script hook

* Replace additional getClass with IsClass

* Update CanUseItem to replace getClass with IsClass

* Add separate context for pet vs ability

* Change Create to Init since not all referenced contexts are creation

* Align spacing in ClassContext

* Drop context on LFGManager max power

* Update IsClass context that wraps around Missle Barrage

* Rename context for swapping weapons

* Be more specific than CLASS_CONTEXT_TALENT

* Remove duplicate context

* Moved IsClass Hook to Player

* Removed unused parameter in virtual base function

* Added maybe_unused to IsClass virtual in order to compile

To match the override signature, the virtual base needs to include the parameter in question, so using [maybe_unused] to signal to the compiler to allow it

* Remove extra blank line

* Add ABILITY_REACTIVE context

* Add context for PET_CHARM

* Remove explicit nullopt check per review

* Code Readability - Change if to if else in pet

Due to the return pattern, this doesn't change functionality in any way

* Add OnPlayer to disambiguate

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-02-10 12:25:00 -03:00
Dan
af880d516f refactor(Scripts/ZulAman): refactor Halazzi (#18267)
* initial

* some fixes

* last booboos

* fixes after test

* finale

* actual final

* blegh
2024-02-07 23:43:38 -03:00
Alethrion
e5a130d67f fix(Scripts/Karazhan): Add cleave and threat resets to Nightbane (#18133)
* Threat_Reset_Cleave

* Minor_Fix

* Fix_Threat_Timing

* Fix_Cleave_Targeting
2024-01-14 11:09:50 -03:00
Andrew
a11434b24f refactor(Core/GameObject): Move the GameObject state save handling to… (#18080)
* refactor(Core/GameObject): Move the GameObject state save handling to instance level

* Update GameObject.h

* remove leftover

* small improvements
2024-01-01 01:51:33 -03:00
Alexandru-Mihai Maftei
ebe89b875f fix(Scripts/ScarletMonastery): Prevent Whitemane from dying before resurrecting Mograine (#18082)
The current code only prevents Whitemane from dying before casting sleep, but the players can inflict enough DPS on her before that, that she can die before resurrecting Mograine.
When this happens, the dungeon is broken and cannot progress.
2023-12-30 12:47:02 -03:00
IntelligentQuantum
6a6cefb512 chore(Scripts/EK): remove useless includes (#18075)
* chore(Scripts/Kalimdor): remove useless includes

* chore(Scripts/EK): remove useless includes
2023-12-28 16:15:16 -03:00