Commit Graph

97 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
Grimgravy
511235cca3 fix(Scripts/Quest): Fires Over Skettis (#19567)
* fix(Scripts/Quest): Fires Over Skettis

* Update spell_item.cpp

---------
2024-09-23 14:05:11 +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
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
avarishd
f510e122a0 fix(Script/Quest): Protecting Our Own (#19247)
* fix(Core/Spells): Gor'drek's Ointment

* Update spell_item.cpp

* ;
2024-07-17 13:19:48 +02:00
Kitzunu
172f73db92 fix(Core/Misc): unused param (#19286) 2024-07-05 15:06:03 -03:00
Andrew
d9f4ba5e1d fix(Scripts/Item): Fix Fel Mana Potion not benefiting from Alchemist'… (#19281)
fix(Scripts/Item): Fix Fel Mana Potion not benefiting from Alchemist's Stone
2024-07-05 06:32:33 -03:00
Kitzunu
bc91074b14 fix(build): mac (#19229) 2024-06-29 11:48:58 -03:00
avarishd
63c8c6480e fix(Core/Spells): Eye of Grillok improvements (#19148)
* fix(Core/Spells): Eye of Grillok improvements

* my eyes

* discovery of RegisterSpellAndAuraScriptPair

* comment
2024-06-29 07:33:23 -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
Nathan Handley
425a490a7b feat(Core/Unit): New helper HasActivePowerType and script hook OnPlayerHasActivePowerType (#18293)
* Create HasActivePower for script intercept

* Replace relevant player-related getPowerType() comparators with HasActivePowerType

* Change OnPlayerHasActivePowerType to regular bool instead of optional

---------

Co-authored-by: NathanHandley <nathanhandley@protonmail.com>
2024-02-09 06:27:02 -03:00
IntelligentQuantum
016bb86d3b refactor(Scripts): remove useless includes (#18004) 2023-12-22 18:41:28 +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
avarishd
9c225fca58 fix(DB/SAI): Doomguard Commander - Crystal Prison (#17782)
* fix(DB/SAI): Doomguard Commander - Crystal Prison

* flags
2023-11-19 12:48:35 +01:00
Winfidonarleyan
e90d7a2f92 chore(Core/Misc): sort includes (#17776)
* chore(Cleanup): sort includes

* fix build

* fix build again
2023-11-18 17:51:26 +01:00
avarishd
67811a6369 fix(Script/Spell): Carinda's Scroll of Retribution usable on players (#17601) 2023-11-12 16:32:16 +01:00
avarishd
9c09ddc3df fix(DB/Creature): Hellfire Peninsula - Stonescythe mobs (#17604)
fix(DB/Creature): HFP - Stonescythe mobs
2023-11-02 08:54:11 -03:00
Kitzunu
f757e93da5 refactor(Core/Misc): Make DeathState enum class (#17607) 2023-10-28 10:54:03 +02:00
avarishd
5aca484574 fix(Core/Scripts): Venomhide Hatchling improvements (#17454) 2023-10-10 20:25:26 -03:00
Skjalf
cc60bc0c35 fix(Scripts/Spells): Fix Healing & Mana injectors not giving bonus to… (#17348)
* fix(Scripts/Spells): Fix Healing & Mana injectors not giving bonus to engineers

* Update SpellEffects.cpp

* Update spell_item.cpp
2023-09-25 06:10:23 -03:00
avarishd
7c43738214 fix(Spells/Scripts): Gnomish Poultryizer (#15554)
fix(Spells/Scripts): Gnomish Poultryizer not breaking on damage
2023-08-10 14:37:14 -03:00
M'Dic
7e58650cf5 revert(Core): ChrRace.dbc full implementation (#16114)
* revert (core): ChrRace.dbc full implementation

we revert this due to several issues arrising. Although the dbc reading is done in full and correctly. Azerothcore relied on the original handling (althought not propper) for so long that  there is

* revert

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql
2023-04-29 08:23:11 -03:00
M'Dic
3eae4c5713 fix(core/dbc): improve ChrRace DBC handling (#14843)
Cherry pick of https://github.com/TrinityCore/TrinityCore/pull/24508

Co-authored-by: HelloKitty <5829095+HelloKitty@users.noreply.github.com>
2023-04-28 01:29:33 +02:00
天鹿
d75bcf0f67 chore(core): Cleanup code (#16012)
* Update SmartScript.cpp

* Update M2Stores.cpp

* Update PetHandler.cpp

* Update WaypointMovementGenerator.cpp

* Update WorldSession.cpp

* Update spell_item.cpp

* Update LoginDatabase.cpp
2023-04-19 21:34:48 -03:00
Kitzunu
35195a6eef refactor(Scripts/Item): Make Goblin Weather Machiene script more read… (#15467)
* refactor(Scripts/Item): Make Goblin Weather Machiene script more readable

* need to validate spells ofc

* initialize the var to make ci happy
2023-03-22 06:06:32 -03:00
Kitzunu
97a01b430d fix(Script/Item): Elixir of Shadows for pets (#14514)
* closes https://github.com/azerothcore/azerothcore-wotlk/issues/13067
2023-01-07 23:08:19 +01:00
Kitzunu
7b774c8141 fix(Core/Spell): Roll 'dem Bones (#14522)
* fix(Core/Spell): Roll 'dem Bones

* closes https://github.com/azerothcore/azerothcore-wotlk/issues/14357

* Partial cp of 029527365f

Co-Authored-By: joschiwald <736792+joschiwald@users.noreply.github.com>

* newline pleb

Co-authored-by: joschiwald <736792+joschiwald@users.noreply.github.com>
2023-01-07 20:05:42 +01:00
Kitzunu
4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01:00
UltraNix
a490a9ac31 fix(Scripts/Items): Green Whelp Armor affects only enemies level 50 a… (#13800)
...nd below.
2022-11-16 01:25:32 -03:00
Angelo Venturini
ad4ce0895f fix: Qaston revert (#13320)
* Revert "fix(Core/QAston): fixed shields oneshotting (#13271)"

This reverts commit e05f61d1b3.

* Revert "fix(Core): Crash (#13292)"

This reverts commit a818bcf3e2.

* Revert "fix: Crash (#13241)"

This reverts commit be423a91b5.

* delete sql

* Revert "refactor(Core/Spells): Implement QAston Proc System (#11079)"

This reverts commit cbd3fd0967.

* add sql revert

* fix sql

* remove update from world.updates
2022-10-05 21:53:20 +02:00
Angelo Venturini
be423a91b5 fix: Crash (#13241) 2022-10-03 16:14:43 -03:00
IntelligentQuantum
cbd3fd0967 refactor(Core/Spells): Implement QAston Proc System (#11079)
* .

* sql

* .

* .

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* Update spell_item.cpp

* Update Unit.cpp

* 16

* 17

* 18

* 19

* 20

* 21

* Update Unit.cpp

* REVERT UltraNIX Commit

* 22

* 23

* .

* .

* .

* warrior

* warlock

* shaman rogue priest paladin mage

* spell item

* hunter

* druid

* dk

* war

* error style

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* .

* DOND DEL ME WAD DO DO

* error 2

* .

* .

* .

* FIX

* Update SpellInfoCorrections.cpp

* Update SpellInfoCorrections.cpp

* .

* ja genau

* Update .gitignore

* .

* .

* .,

* .

* .

* .

* .

* Update Unit.cpp
2022-10-02 19:39:34 +02:00
Kitzunu
434b98e60b fix(Scripts/Spells): Remove some magic numbers (#13193) 2022-10-01 11:44:43 -04:00
Angelo Venturini
47f9f4917a fix(Core/Item): Renataki's Charm of Beasts (#13124) 2022-09-28 00:22:08 -03:00
Grimgravy
e273d6f4f0 fix(Scripts/Quest): improved egg freezing (#12575) 2022-09-21 17:03:43 +02:00
UltraNix
0ae93c1c94 fix(Scripts/Item): Winter Veil Disguise Kit cannot be used during pre… (#12883)
...paration phase.
2022-09-06 21:38:50 -03:00
UltraNix
a70762910a fix(Core/Spells): Sleep aura from Magic Dust should be removed if tar… (#12020)
* fix(Core/Spells): Sleep aura from Magic Dust should be removed if target is too high level.

Fixes #11947

* Update.
2022-06-22 13:52:29 -04:00
Maelthyr
d928d8d96a refactor(Core/Unit): PC&NPC Immunity (#11986)
* initial

* refactor(Core/Unit): PC & NPC Immunities

Cherry-pick TC: 74af880217

Co-authored-by: Treeston <treeston.nmoc@gmail.com>

* fix builds error

Cherry-pick TC: 74af880217

Co-authored-by: Treeston <treeston.nmoc@gmail.com>

* Fix nef combat, and replace SetFlag by SetUnitFlag

* fix combat with jedoga

Co-authored-by: Treeston <treeston.nmoc@gmail.com>
2022-06-18 08:16:45 -04:00
IntelligentQuantum
f7760b4ea0 fix(Spell/Scripts): MOVE Drinking to spell scripts (#11105) 2022-04-15 14:16:30 +02:00
ZhengPeiRu21
948911bd7a fix(Scripts/Items): Fix Goblin Bomb Dispenser (#10612)
* fix(Scripts/Items): Fix Goblin Bomb Dispenser

* Update spell_item.cpp

Fix brackets
2022-04-09 11:37:55 -04:00
IntelligentQuantum
b680ea3dae feat(Scripts/Spells): Move to spell scripts - Brittle Armor & Mercurial Shield (#11116)
* .

* Update SpellEffects.cpp
2022-04-01 07:02:06 -03:00
Kitzunu
856aed6fc6 feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227) 2022-03-30 07:59:42 -03:00
IntelligentQuantum
d1ecdc8f61 feat(Core/Spells): Move Spell item dimensional ripper area52 to spell scripts (#11099) 2022-03-27 01:58:58 -03:00
IntelligentQuantum
5719e46236 feat(Core/Spells): Move spell_item_runic_healing_injector to spell scripts (#11088) 2022-03-27 01:53:16 -03:00
Kitzunu
455899dc75 fix(Core/Misc): Change const to be after type name (#10591) 2022-02-14 16:05:45 -03:00
IntelligentQuantum
93520f6466 feat(Core/Position): own file (#10505) 2022-02-08 05:12:42 -03:00
Kargatum
8b7df23f06 feat(Core/Time): Implement saparated manager for game time (#8630) 2022-01-24 17:55:00 +07:00
Nefertumm
b7dcf93be4 Fix(Core/Item): Wraith Scythe scales with spell power (#9901) 2022-01-03 15:05:45 -05:00