151 Commits

Author SHA1 Message Date
Shauren
3a84fddd14 Scripts/Stratholme: Fix Ramstein the Gorger not spawning 2025-09-15 20:02:17 +02:00
Shauren
cbb532e4be Core/Groups: Use iterators instead of raw LinkedListElement to interact with group members 2025-07-11 17:40:34 +02:00
Jason Dove
c7f5696479 Core/Scenarios: Allow scripts to set instance scenario by id (#31104)
* add example at Stratholme service entrance
2025-07-09 00:26:37 +02:00
Shauren
605e5f94c0 Core/Creatures: Moved autoattack handling from scripts to game 2024-01-08 22:23:12 +01:00
Shauren
4370f2fe29 Scripts/Stratholme: Added missing dungeon encounter ids 2023-09-18 19:14:50 +02:00
Shauren
2e7e49b749 Scripts/Spells: Removed unneccessary PrepareSpellScript and PrepareAuraScript uses 2023-07-24 10:48:50 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
46e0056196 Scripts/Instances: Add dungeon encounter data 2022-10-04 00:19:38 +02:00
Shauren
76be303351 Core/Scripts: Save instance data in JSON format 2022-10-04 00:19:38 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
offl
012444ba80 Scripts/Spells: Add comments with id & name of spells part 4
(cherry picked from commit e7e4786606)
2022-03-10 23:53:31 +01:00
Maks Szokalski
bc04acb726 Add "On" to some gossip methods in AI (#25415)
* Add "On" to some methods

* Update npc_innkeeper.cpp

* Update zone_borean_tundra.cpp

(cherry picked from commit 41188eb535)
2022-02-05 22:18:19 +01:00
Shauren
0a1acb9c05 Scripts/Spells: Replace RegisterAuraScript with RegisterSpellScript and remove it
(cherry picked from commit 7d4fbf706a)
2022-02-04 00:27:10 +01:00
Carbenium
b3f2ff97ff Core/CreatureAI: std::chrono-ify DoSummon* methods
(cherry picked from commit 1245833cdd)
2022-01-24 13:11:13 +01:00
Carbenium
310f996b1d Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0);
to
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s);

(cherry picked from commit 1131229ee9)
2022-01-24 11:55:32 +01:00
Carbenium
e660b870e9 Core/ScriptedAI: std::chrono-ify DoSpawnCreature
(cherry picked from commit f5076112cb)
2022-01-23 23:33:04 +01:00
Peter Keresztes Schmidt
111521d3c9 Scripts/EasternKingdoms: Use std::chrono::duration overloads of EventMap (#25019)
Contributes to #25012

(cherry picked from commit 5ef576d223)
2022-01-23 15:41:30 +01:00
Peter Keresztes Schmidt
c4098897a8 game/AI: Convert SelectAggroTarget to enum class (#24818)
* game/AI: Convert SelectAggroTarget to enum class

* game/AI: Rename SelectAggroTarget to SelectTargetMethod

(cherry picked from commit 418c3b1fd5)
2022-01-06 21:53:27 +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
Nitair
f6048aca9a Scripts/Stratholme: Baron Rivendare rewrite (#22572)
* Adding last state of rivendare rewrite

* Fix aura beeing removed on reset, fix death pact

* Not needed

* SQL: Changed remove/inset into update, fixed delete at conditions part

* Typo

* Remove link spell, fix blank lines, change magic numbers to enum

* Test changes with SpellScript and DoCastSelf

* Revert SpellScript and moved DoCastSelf for the aura into UpdateAI part

* Damn, copyright.

* Fix Unholy Aura

* Fix again (does attack now / does cast if encounter resets)

* Adding handling of the aura to the db

* Rename 2018_99_99_99_world_335.sql to 2019_05_31_02_world_335.sql

(cherry picked from commit ee5101fbf7)
2021-12-09 00:24:26 +01:00
Killyana
c375208e5b Rename spell correctly
(cherry picked from commit 4c53dd930e)
2021-11-21 13:30:00 +01:00
Killyana
0b1c3d3544 Creature/Script: Add missing abilities for Ghostly Citizen and Spectral Citizen
Closes #22662

(cherry picked from commit 21030d0cd0)
2021-11-21 13:29:37 +01:00
PolarCookie
fa07f74db2 Spell/Script: Scourge Disguise and Haunting Phantoms (#22727)
(cherry picked from commit 66720e5fd9)
2021-11-16 22:00:58 +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
Aokromes
3621482e44 kill some whitespaces
(cherry picked from commit cc49b7bb30)
2021-10-26 23:55:38 +02:00
Nitair
4f0aa11c6e Scripts/Stratholme: Baroness Anastari rework (PR #21687)
(cherry picked from commit dc28889151)
2021-09-25 22:45:56 +02:00
Keader
ad5b0fa9cd Core/Scripts: Fixed possible crashs related with JustDied
(cherry picked from commit 5bef3e426a)
2021-06-19 23:33:24 +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
Killyana
eba8916ca2 Typo
(cherry picked from commit b08280fcfe)
2021-04-15 05:53:27 +02:00
Killyana
2e828b4026 Scripts/Stratholme: Fix a DB error
Ref #20749

(cherry picked from commit be56a4669e)
2021-04-15 05:53:27 +02:00
jackpoz
bddd58d469 Scripts/Stratholme: Add missing header for no-pch build
(cherry picked from commit 9a515c29ba)
2021-04-15 05:53:27 +02:00
jackpoz
cf04609c9a Scripts/Stratholme: Fix build
(cherry picked from commit 828c5d08e7)
2021-04-15 05:53:27 +02:00
jackpoz
b99654924c Scripts/Stratholme: Fix build
(cherry picked from commit a98b2aa8c8)
2021-04-15 05:53:27 +02:00
Riztazz
d01914ffcc Scripts/Stratholme: Few changes to how Ysida behaves during the Baron run (#20749)
(cherry picked from commit 2a25d9d9a7)
2021-04-15 05:53:27 +02:00
Riztazz
dffef65da2 Scripts/Stratholme: spawn Timmy the Cruel if conditions are met (#20750)
* Timmy the cruel
* Rename some variables and use sniffed spawn position
* codestyle
* Use areaboundary instead
* include order
* aokromes request
* remove static
* never cp on tc

(cherry picked from commit c69825d96d)
2021-02-06 21:41:51 +01: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
ariel-
5903a10a83 Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Closes #19819

(cherry picked from commit 2335b9de1a)
2020-07-16 21:47:28 +02:00
ariel-
6604849716 Core/Scripts: unified scripted gossip/quest api
- Changed self-accessor on GameObjectAI to "me", like UnitAI
- Moved all related functions to AI, now Unit and GameObject have the same function names with identical behaviour
- Remove "OnUpdate" from CreatureScript/GameObjectScript, was never used and we already have AI Update method
- Quest methods no longer return a bool, the return value was used to call the AI version if the ScriptMgr one returned false
- Implemented GameObjectAI::Destroyed hook (was never called), implemented Damaged method
- Rename OnStateChanged to OnLootStateChanged to reflect when it's really called, and created a new hook OnStateChanged that only gets called on GOState change
- Since the functions are now only getting called from AI, made GetAI methods full virtual. (CanSpawn method is anyways going to be used on creatures with AI)

(cherry picked from commit f913f3bb89)
2020-05-03 03:04:32 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
xinef1
ad008c43b7 Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove
* remove some possible references item may have when it is deleted during save.
* Also clear all hostile references when unit is removed from map.

(cherrypicked from 86da1a19bb)
2019-07-21 21:06:54 +02: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
Shauren
9ffabae6bf Scripts/Misc: Use InstanceMap* in InstanceScript instead of Map* 2018-06-16 17:24:10 +02:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Aokromes
90badf9d7e Misc: More cleanup 2017-11-25 02:50:29 +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
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
treeston
dd0df772df Scripts/Events: Globally fix all ExecuteEvent loops to check UNIT_STATE_CASTING after each iteration, instead of just checking it once initially.
Fixes and closes #17892.

(cherry picked from commit ac62d7156f)

Drycoding is bad, mmkay?
(cherry picked from commit ed83a35fbe)
2017-02-19 15:09:02 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00