Commit Graph

80 Commits

Author SHA1 Message Date
ccrs
3e886c5561 Scripts/Pet: implement Dance Rune Weapon + minor tweaks to npc_pet_mage_mirror_image script
damage is now halved, years ago it wasn't, so we got that going at least
stat scaling missing - the low damage might even come from this instead of the aura
periodic auras still unknown
2021-08-20 03:41:49 +02:00
offl
2681143141 Scripts/Pet: Update pet scripts to new register model (2/2) (#26662) 2021-07-11 14:56:06 +03:00
offl
51c94fed9a Scripts/Pet: Update pet scripts to new register model (1/2) (#26661) 2021-07-11 14:55:47 +03:00
offl
03c727326d Scripts/Spells: Add comments with id & name of spells part 3 2021-05-31 04:13:29 +03:00
offl
1ed79d7a2e Core/Scripts: Verify & migrate spell school immunities to DB
Some already are stored in DB. Looks like they all are still valid for master
2021-01-26 23:43:50 +02:00
Kargatum
a32b6b8ac4 Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf
2021-01-03 11:47:07 +01:00
Maks Szokalski
dc9e0c1e86 Scripts: Minor loop refactors (#25325) 2020-08-28 23:13:26 +02:00
Peter Keresztes Schmidt
0072fa922d Scripts/World+Pet: Use std::chrono::duration overloads of EventMap (#25017)
Contributes to #25012
2020-07-14 21:15:15 +02:00
ForesterDev
e3b232fe0e Core/AI: refactor SpellHit and SpellHitTarget. (#24691)
* Core/AI: refactor SpellHit and SpellHitTarget.

- now caster/target is WorldObject instead of Unit
- remove SpellHitByGameObject / SpellHitTargetGameObject (handled by SpellHit / SpellHitTarget)
- rename parameters in scripts according parent methods

* Restore logic in Algalon script

* Changed check for REMORSELESS_WINTER hit to avoid dublicate call, because it has TARGET_UNIT_CASTER for effects 0/1 and TARGET_GAMEOBJECT_SRC_AREA for effect 2

* Fix build after merge
2020-06-07 10:22:13 +02:00
Keader
456aaf2cea Scripts/Pet: Fixed Mirror Image trying attacking invalid targets 2020-05-30 11:31:53 -03:00
Sorikoff
34fecde022 Scripts/Pet: Lil' K.T (#24528)
* Lil' K.T.

* Rename 9999_99_99_99_world_335.sql to 2020_05_10_00_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-05-10 16:23:13 +02:00
Sorikoff
194691f7c3 Scripts/Pets: Mojo (#24431)
* Mojo

* Update

* Rename 9999_99_99_99_world.sql to 2020_04_11_01_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-11 19:47:09 +02:00
Sorikoff
264a583903 Scripts/Pet: Baby Blizzard Bear & Egbert (#24349)
* Baby Blizzard Bear & Egbert

* SQL

* Update 9999_99_99_99_world.sql

SQL fix

* Rename 9999_99_99_99_world.sql to 2020_04_04_00_world.sql

Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-04 15:29:21 +02:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
Artamedes
8ecc45cd1a Scripts/Pet: Fix npc_pet_gen_soul_trader not following owner (#23772) 2019-09-06 22:14:09 -03:00
Treeston
0e7c66cb4c Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time. 2019-07-21 01:50:52 +02:00
OcelotGear
085f40a278 Script/Hunter: fix Snake Trap's snakes' initialization.
Closes #23570.
2019-07-18 03:36:00 +02:00
ccrs
401777d024 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()
2019-07-01 21:36:32 +02:00
Treeston
1158f267df Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490. 2019-06-23 23:31:51 +02:00
Giacomo Pozzoni
797fba98e9 3.3.5 gameobject summoner (#23289)
* Scripts/Misc: Change IsSummonedBy(Unit*) to IsSummonedBy(WorldObject*)

* Scripts/Misc: Fix build

* Core/TempSummons: Rename GetSummoner() to GetSummonerUnit()

* Core/TempSummons: Add support to TempSummons::GetSummoner() to return GameObject too

* Fix build

* Core/TempSummons: Allow GameObject to be owner of TempSummon

* Core/TempSummons: Add support to SAI for GameObject owner of TempSummon

* Scripts/Misc: Fix no-pch build

* Core/TempSummons: Implement PR comments
2019-05-23 21:08:29 +02:00
Giacomo Pozzoni
20772dbf5d Scripts/Spells: Fix implementation of #22332 (#23228)
Change the way #22332 moved spell damage calculations from SpellEffectDMG to scripts, using OnEffectLaunchTarget and SetEffectValue instead
2019-05-02 14:34:23 +02:00
DanVS
8051ff13df Core/Scripts: Move some spells to scripts (#22332) 2019-01-05 01:54:33 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
DanVS
5b0f4009df Core/Scripts: Unify Chrono Literals (#22420)
* Unify Chrono Literals

* Retire IN_MILLISECONDS

* Build fix

* Build fix (sequel)

* Retire urand()

* Edge cases

* Build

* Whitespaces

* More edge cases

* Additional cases
2018-09-17 18:38:22 +02:00
DanVS
ba9943d8a4 Core/Entities: Ethereal Soul-Trader (#22050) 2018-07-25 15:35:03 +02:00
Treeston
5df7ffaf84 Core/GameObject: Hunter traps now always put the Hunter in combat with the target when triggered. Closes #21847. 2018-07-24 21:15:06 +02:00
Treeston
15ab24756d Scripts/Pets: Some cleanup for Snake Trap. Tagging #21847, though this doesn't address it (yet). 2018-07-24 20:57:09 +02:00
ccrs
982643cd96 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
2018-06-03 10:06:57 -07:00
Treeston
03ef79f3d9 Scripts/Pets: Mirror Image re-write, because it's a colossal mess right now. (PR #19818) 2018-01-29 14:27:15 +01:00
Treeston
532ab1c7f8 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2018-01-03 20:04:19 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Treeston
6113b9dec2 Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now. 2017-12-31 03:23:42 +01:00
Treeston
d507a7e338 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has
2017-12-30 20:28:41 +01:00
Treeston
c7896f3102 Core/Unit: For convenience, explicitly redirect CastSpell with nullptr as first argument to the Unit* overloads. No more ->CastSpell((Unit*)nullptr, ...) all over the place! 2017-07-21 18:02:48 +02:00
Treeston
e2a1ccd118 [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2017-07-01 20:18:02 +02:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren
d6201e5dbb Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50
(cherry picked from commit 9299e9bde0)
2017-06-19 13:16:13 -03:00
ariel-
d6cae113c6 Core/Scripts: fix some /W4 warnings 2017-06-11 18:06:39 -03:00
ariel-
d0f760420a Core/Scripts: remove no longer needed scripts, use db attribute for disabling procs
(e7ccd8ea3f followup)

- Fix some broken procs after c0cb823a91

Closes #19068
2017-02-22 17:54:12 -03:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
ariel-
5b56c94e6d Core/Spell: restore old proc system behaviour on auras self proc.
- Use Spell::m_triggeredByAuraSpell and compare against trigger aura, it requires scripts to set triggeredByAura parameter.
- Fixed existing scripts lacking it

DB/Spell: Anger Capacitor (Tiny Abomination in a Jar) proc

Closes #18269
2016-11-19 03:05:44 -03:00
ariel-
4bdebba520 Core/Scripts: fix static analysis issues
- Bonus: indentation fixes in zone_wintergrasp.cpp
2016-10-16 23:12:36 -03:00
ariel-
dbba3ad5a5 Core/Scripts: Fix some runtime errors 2016-10-07 00:14:46 -03:00
ariel-
192f8186bd Core/Scripts: add more headers required for NoPCH 2016-10-04 21:10:57 -03:00
ariel-
dc7a1894c5 Core/Scripts: add headers required for NoPCH build 2016-10-04 21:08:03 -03:00
ariel-
2ff855054f Core/Scripts: Convert spells to new proc system
- Converted Unit::HandleDummyAuraProc function to AuraScripts
  * Extra: DMC: Madness now uses DB texts. yay!
  * Extra: improvements on Imp. Spell Reflection (range and max targets, filter caster with conditions)

- Fixed Glyph of Succubus. (Closes #6599)

- Changed old (not-blizz) behavior of Vampiric Embrace:
  * Before: party heal affected the priest too and self heal was reduced by that amount to not over-heal
  * Now: self heal amount not affected, rather filter the priest out of the party heal using conditions :)

- Solve bug in AQ 3p set bonus, it should only trigger when healing others, not self heals.
- Priest T10 2p bonus (heal) now rolls its effect properly

- Use brand new GetEffectiveHeal to fix #17142
- While we're at it, also close #17034 for good
- Converted Unit::HandleAuraProc function to AuraScripts (#17941)
- Converted Unit::HandleAuraProc function to AuraScripts (cont'd) (#17955)
- Corrected Flametongue weapon damage formula
- Actually check offhand weapon for flametongue in Lava Lash script
- Implemented halved proc chance for Missile Barrage on Arcane Barrage, Fireball, Frostbolt and Frostfire Bolt cast
- Converted Unit::HandleProcTriggerSpell function to AuraScripts (#17956)
- De-hack Earth shield. Fixes #13808
- Updated Honor among Thieves
- Implemented mana proc for Mark of Conquest in case of ranged attack
- Fixed Scent of Blood giving more stacks than the talent rank currently learnt.
- Ported old proc table. Proc system is dead. Long live the proc system!
- Recklessness should get charges removed per cast. Closes #15529
- Use proc system to remove Molten Core charges on Incinerate/Soul Fire cast. Closes #15942

Closes #3463
Closes #5401
Closes #15595
Closes #15974
Closes #16679
Closes #17925
2016-10-04 20:21:58 -03:00
treeston
8c690f9edc Pet/DK: Make Risen Ghoul and Bloodworms no longer suicidally charge into not-yet-engaged mob packs. 2016-08-17 11:38:31 +02:00
Chaouki Dhib
dc3327f9c5 Core/Movement: Clean up and improvements on Unit::SetSpeed (#16843)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch):
- the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior.
- Removed the unused method parameter "forced" from Unit::SetSpeed
- Renamed Unit::SetSpeed to SetSpeedRate
- Removed the unused method parameter "forced" from Unit::UpdateSpeed
- Added utility method Unit::SetSpeed which take the new flat value.
2016-04-16 01:36:32 +02:00
Kittnz
8d992a888c Pet/Misc: Implement Baby Blizzard Bear 2016-03-28 12:30:36 +02:00
Naios
9e43365b3d Core/Scripts: Split the huge scriptloader into smaller pieces
* Each subdirectory contains it's own translation unit now
  which is responsible for loading it's directory
* Improves merging & decoupling between 3.3.5 <-> 6.x
* Removes unused Battleground loader
* Ref #15671

(cherry picked from commit 5534915f74)
2016-02-22 16:25:54 +01:00