80 Commits

Author SHA1 Message Date
Shauren
605e5f94c0 Core/Creatures: Moved autoattack handling from scripts to game 2024-01-08 22:23:12 +01:00
Teleqraph
8161bce524 Scripts/Spells: Implement Atonement (Passive, pet), Power Leech (Passive, pet) and Essence Devourer (#29170) 2023-08-11 10:59:39 +02:00
Teleqraph
6e42596374 Scripts/Spells: Implement Divine Image (#29034)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-08-10 11:00:06 +02:00
Shauren
2e7e49b749 Scripts/Spells: Removed unneccessary PrepareSpellScript and PrepareAuraScript uses 2023-07-24 10:48:50 +02:00
Shauren
3df16c12b7 Core/Scripts: Move EvadeReason outside of CreatureAI class 2023-01-19 21:23:06 +01:00
Shauren
d8a4668c77 Core/Misc: Add missing Containers.h include where neccessary 2023-01-06 16:44:11 +01:00
offl
d68abbf705 Scripts/Pets: Update Lil' K.T. (#28071)
(cherry picked from commit dfd1692e31)
2022-09-05 19:46:54 +02:00
offl
b0164fb2b9 Core/SAI: Rename LeavingWorld to OnDespawn & use it in SAI (#28059)
(cherry picked from commit b9450bcdd0)
2022-09-05 19:43:09 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
offl
b42e5d4251 Scripts/Pet: Update pet scripts to new register model (2/2) (#26662)
(cherry picked from commit 2681143141)
2022-03-11 15:25:29 +01:00
offl
72ea274df8 Scripts/Pet: Update pet scripts to new register model (1/2) (#26661)
(cherry picked from commit 51c94fed9a)
2022-03-11 15:25:17 +01:00
offl
8e9e15629f Core/Scripts: Verify & migrate spell school immunities to DB
Some already are stored in DB. Looks like they all are still valid for master

(cherry picked from commit 1ed79d7a2e)
2022-03-06 16:30:51 +01:00
Kargatum
373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4)
2022-03-05 20:07:57 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Maks Szokalski
663ec92794 Scripts: Minor loop refactors (#25325)
(cherry picked from commit dc9e0c1e86)
2022-02-04 12:06:01 +01:00
Peter Keresztes Schmidt
54d3110ca7 Scripts/World+Pet: Use std::chrono::duration overloads of EventMap (#25017)
Contributes to #25012

(cherry picked from commit 0072fa922d)
2022-01-23 16:02:35 +01:00
ForesterDev
3171cd3fa9 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

(cherry picked from commit e3b232fe0e)
2022-01-06 20:46:25 +01:00
Keader
08d3bc7488 Scripts/Pet: Fixed Mirror Image trying attacking invalid targets
(cherry picked from commit 456aaf2cea)
2022-01-06 19:41:22 +01:00
Sorikoff
74174332c6 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>
(cherry picked from commit 34fecde022)
2022-01-02 19:24:18 +01:00
Sorikoff
26ae6df032 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>
(cherry picked from commit 194691f7c3)
2022-01-01 14:38:52 +01:00
Sorikoff
44c8b5241a 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>
(cherry picked from commit 264a583903)
2021-12-31 20:15:58 +01:00
Artamedes
4e487c35a7 Scripts/Pet: Fix npc_pet_gen_soul_trader not following owner (#23772)
(cherry picked from commit 8ecc45cd1a)
2021-12-18 21:45:25 +01:00
Treeston
c13d83796f 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.
(cherry picked from commit 0e7c66cb4c)
2021-12-17 00:23:33 +01:00
OcelotGear
65abf9b482 Script/Hunter: fix Snake Trap's snakes' initialization.
Closes #23570.

(cherry picked from commit 085f40a278)
2021-12-16 22:01:40 +01:00
ccrs
4e6c59dca7 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()

(cherry picked from commit 5c09ff51f7)
2021-12-13 00:42:20 +01:00
Treeston
38d7c1530a 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.
(cherry picked from commit 1158f267df)
2021-12-12 02:09:15 +01:00
Giacomo Pozzoni
5f545f5402 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

(cherry picked from commit 797fba98e9)
2021-12-07 00:02:03 +01:00
DanVS
28cb2af1c5 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

(cherry picked from commit 5b0f4009df)
2021-11-09 00:26:59 +01:00
DanVS
3503e9dc92 Scripts/Pets: Some cleanup for Snake Trap. Tagging #21847, though this doesn't address it (yet).
(cherry picked from commit 15ab24756d)
2021-10-17 01:40:21 +02:00
Treeston
5d08e13108 Scripts/Pets: Some cleanup for Snake Trap. Tagging #21847, though this doesn't address it (yet).
(cherry picked from commit 15ab24756d)
2021-10-17 01:33:12 +02:00
ccrs
426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96)
2021-09-28 00:15:13 +02:00
Treeston
39dff738e1 Scripts/Pets: Mirror Image re-write, because it's a colossal mess right now. (PR #19818)
(cherry picked from commit 03ef79f3d9)
2021-06-19 01:35:41 +02:00
Treeston
bce43de7f3 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.
(cherry picked from commit 6113b9dec2)
2021-04-16 20:22:13 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Treeston
8be23fcbbd [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.

(cherry picked from commit e2a1ccd118)
2020-08-13 22:46:44 +02:00
ariel-
8abbc097a0 Core/Scripts: fix some /W4 warnings
(cherry picked from commit d6cae113c6)
2020-07-16 22:00:29 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Shauren
a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +02:00
Shauren
9299e9bde0 Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50 2017-05-13 19:37:33 +02:00
ariel-
b7bf703737 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

(cherry picked from commit 2ff855054f)

# Conflicts:
#	src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp
#	src/server/scripts/Spells/spell_dk.cpp
#	src/server/scripts/Spells/spell_druid.cpp
#	src/server/scripts/Spells/spell_hunter.cpp
#	src/server/scripts/Spells/spell_item.cpp
#	src/server/scripts/Spells/spell_mage.cpp
#	src/server/scripts/Spells/spell_paladin.cpp
#	src/server/scripts/Spells/spell_priest.cpp
#	src/server/scripts/Spells/spell_rogue.cpp
#	src/server/scripts/Spells/spell_shaman.cpp
#	src/server/scripts/Spells/spell_warlock.cpp
#	src/server/scripts/Spells/spell_warrior.cpp
2017-04-23 19:01:39 +02:00
treeston
1091174f03 Merge remote-tracking branch 'Treeston/3.3.5-petaggro' into 3.3.5 (PR #17800)
(cherry picked from commit aeeae8d09c)
2017-02-12 16:08:32 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
5411ca8cdf Core/Units: Removed attack speed float to int conversion special case in building SMSG_UPDATE_OBJECT 2016-11-25 17:58:48 +01:00
Vincent-Michael
7eceba09d7 Core/Misc: Fixed warnings 2016-06-08 13:06:16 +02:00
Chaouki Dhib
3cbbcdb51a 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.
(cherry picked from commit dc3327f9c5)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/MovementHandler.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
#	src/server/scripts/Kalimdor/zone_azshara.cpp
#	src/server/scripts/Kalimdor/zone_durotar.cpp
#	src/server/scripts/Outland/zone_hellfire_peninsula.cpp
2016-04-16 02:26:24 +01:00
Kittnz
a4c223a300 Pet/Misc: Implement Baby Blizzard Bear
(cherry picked from commit 8d992a888c)
2016-04-09 17:42:50 +02:00