Commit Graph

259 Commits

Author SHA1 Message Date
ariel-
bd96262248 Core/OutdoorPvP: refactor using Position and Quat to pack parameters
- Moved statics to cpp
- Save scriptids into an array

(cherry picked from commit 3e7b64b2f7)
2020-07-16 22:00:29 +02:00
Peter Keresztes Schmidt
bab5fd87a3 Core/Misc: Replace Trinity::make_unique with std (#24869) 2020-06-23 08:54:12 +02:00
treeston
57e3a67c94 Fix an issue where CanSpawn would never get invoked on creatures without per-guid script.
(cherry picked from commit aeaa8ecfab)
2020-06-14 23:49:04 +02:00
Shauren
c7306439e7 Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower 2020-06-12 01:29:18 +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
ariel-
1929ca3aa1 Core/Scripts: remove OnDummyEffect hook/sOnDummyEffect ai hook
- Duplicated logic never used, sometimes only ScriptMgr version was called, sometimes only AI
- They only encourage bad scripting practices
- You can still use OnSpellHit or a SpellScript

(cherry picked from commit b6b59f6c23)
2020-04-29 01:36:46 +02:00
Shauren
aced88b09b Core/AuctionHouse: After taking a break at the start of patch 8.3 auction house is now back in business. 2020-04-20 20:36:24 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
ariel-
5f70be050f Core/Scripts: fix Nightfall proc chance and reduce it for victims with level above 60
Closes #15734

(cherrypicked from eac9c1f0b9)
2019-08-17 20:04:14 +02:00
Kittnz
5291842a33 Game/Scripting: Add OnPlayerRepop hook
Called when a player presses release when he died

(cherrypicked from d550ba7392)
2019-06-15 18:41:09 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
sirikfoll
e64cd5669d Core/Scripting: Fixed hotswap calling evade mode for dead creatures
(cherry-picked from afa8527338)
2018-12-09 14:18:42 +01:00
Shauren
8ed52e9dc3 Core/Scripts: Fixed ENSURE_AI assertion failures when used in Reset()/InitializeAI() hooks with hotswap
Updates #20727

(cherry picked from commit 2fd9dc2edb)
2018-02-05 23:41:39 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
66621a85e9 Core/Quests: Implemented player choice rewards 2017-12-31 23:22:55 +01:00
Traesh
89c91c271b Core/Quests: Implemented player choices
* Implemented SPELL_EFFECT_LAUNCH_QUEST_CHOICE
* Script hook for player choices
2017-12-31 23:22:55 +01:00
Traesh
422ad436c7 Core/Scripts: Added new QuestScript hooks (#20950)
* OnQuestStatusChange and OnQuestObjectiveChange
2017-12-04 17:35:37 +01:00
funjoker
465012978f Core/Scripting: Implemented Conversation scripts (#20758) 2017-11-18 12:40:56 +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
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
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
Traesh
9cc5273cd2 Core/AreaTriggers: Areatrigger rework script system + fix priest angelic feather
Closes #19171
2017-03-21 18:14:23 +01:00
Krudor
5a36a2eb17 Core/Scripts: Add support for spawn specific C++ scripts
Closes #19247
2017-03-18 11:31:31 +01:00
treeston
ee6e27a1d6 Various: Fix coverity reported issues.
(cherry picked from commit 84cf239fda)

Core/Scripts: kill whitespace
(cherry picked from commit 83771597c1)
2017-03-05 01:19:55 +01:00
treeston
59d48ce7e4 Core/Movement: Add new SplineChainMovementGenerator that allows accurate replication of sniffed waypoints in static sequences, along with DB facilities that allow loading of waypoints from DB.
(cherry picked from commit 6d00d3f283)

Merge remote-tracking branch 'Treeston/3.3.5-splinechains' into 3.3.5 (PR #17946)
(cherry picked from commit 20f483967f)

Core/Movement: Add a convenience default ctor to SplineChainResumeInfo, and fix PCH build in some configurations (zzz why do we even keep Appveyor and Travis around).
(cherry picked from commit 4fa646c0b2)

PCH build fix. Again.

(( Alright, you made me waste 20 minutes of my life on a full nonPCH rebuild of the core now. ))
(( I hope you're happy. ))
(cherry picked from commit 4a1a460241)
2017-03-01 22:03:35 +01:00
Rochet2
117b45d768 Core/Scripts: Enhance quest status hook by making it catch more status changes (#17865)
(cherry picked from commit c52566a888)
2017-02-26 15:36:01 +01:00
treeston
e941d7e04b Creature/Scripting: Move CreatureAI::CanRespawn to CreatureScript::CanSpawn. Now also applies to initial spawn. Dynamic spawning prep.
(cherry picked from commit b3d44d6c36)

Game/Scripting: Follow-up to b3d44d6. Fix script selection for creatures on difficulty > 0.
(cherry picked from commit 91c2b3162d)

Build fix.
(cherry picked from commit a9f1151f2c)

Fine, this time I actually built it. Promise.
(cherry picked from commit 0c2c88ed50)
2017-02-26 15:30:15 +01:00
Traesh
6ab3877c91 Core/Entities: Basic AreaTrigger System (#18035)
* Implemented AreaTrigger Templates
* Implemented AreaTrigger Splines
* Implemented SPELL_AURA_AREA_TRIGGER
* and many more
2017-01-29 00:00:43 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Traesh
96f7ce4bfa Core/Scripting: Added missing hotswap code for SceneScripts 2017-01-01 03:23:04 +01:00
Krudor
1530c95697 Core/Scripts: Add server-side script support for movie completion (#18308) 2016-12-17 18:27:43 +01:00
ariel-
780d1019f2 Core/ScriptMgr: use vector instead of list to contain Spell and Aura scripts and hooks
(cherry picked from commit cbb5c073ce)
2016-11-14 05:35:41 -03:00
Traesh
d4887311e3 Core/Scenes: Implemented scene system
Closes #17858
Closes #17976
2016-09-25 16:13:12 +02:00
Naios
0eb573b7bd Core/Scripts: Fix a crash when adding/removing objects from the map while swapping
* Ref #17833

(cherry picked from commit 79adaf4ee0)
2016-09-15 15:15:48 +02:00
Shauren
a9a13d10f7 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-17 17:37:06 +02:00
Shauren
2056ce4d66 Scripts: Build fix 2016-07-17 15:20:56 +02:00
Naios
58dd647a88 Core/Scripting: Fix acquiring of references between script swaps
* Delay unloading of shared libraries to the next update tick
  to prevent crashes in the destructor of the last referenced
  script instance.
* Closes #17557

(cherry picked from commit 445746c402)
2016-07-13 22:01:14 +02:00
Shauren
70137b8f3a Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-06 00:05:13 +02:00
Naios
1a891f3a5e Core/Scripting: Don't force event cancellation when swapping creatures.
* EventProcessor::KillAllEvents(force = false) should only be used
  by the EventProcessor.

(cherry picked from commit d68316fcd2)
2016-07-05 00:19:38 +02:00
Shauren
70102f32fe Core/DataStores: Updated opcodes and db2 to 7.0.3.21414 2016-05-20 23:49:53 +02:00
Naios
8bf3d181b6 Core/Scripting: Kill pending unit events when swapping AI's
(cherry picked from commit 851c73b3e4)
2016-05-01 17:50:34 +02:00
Naios
a3936c143d Core/Scripting: Fix an assertion which was triggered at lazy unloading
* Also fixes 2 warnings

(cherry picked from commit e82a934387)
2016-04-12 16:54:11 +02:00
Naios
89a3fc2167 Core/Scripting: Fix loading of spell/aurascripts
* Broken since 9cc97f226d
* There is still a crash when using lazy unloading which I
  will fix in a later commit (this commit should fix at least
  the static build and normal usage of the dynamic build).
* Closes #16948

(cherry picked from commit 410cf0dd05)
2016-04-12 15:43:27 +02:00
Naios
926dfd1b57 Core/Scripting: Fix another warning when building statically
(cherry picked from commit 498c1e22ca)
2016-04-11 22:37:28 +02:00
Naios
9cc97f226d Core/Game: Rewrote the ScriptMgr to support script reloading.
* Finally this commit enables dynamic script hotswapping
  and finished the PR #15671.
* Split the storage layout to use optimized storages
  for database bound and unbound scripts.
* Add several unload workers to reload scripts correctly
  -> Requires further investigation.
* Fixes memory leaks in ScriptMgr when dropping invalid scripts.
* Fixes VehicleScripts
* Makes OutdoorPvP scripts reloadable
* Makes InstanceMapScripts reloadable
* Makes CommandScripts reloadable
2016-04-11 21:14:00 +02:00
Naios
bc0f2b6e5a Core/Game: Add a dynamic script reloader which reloads scripts modules on changes.
* is responsible for registering plain modules.
* requires compilation with the `WITH_DYNAMIC_LINKING` flag.
* requires further support of the ScriptMgr.
2016-04-11 21:13:59 +02:00
Naios
59e3cf82ac Core/Game: Move scheduled map scripts counter methods into MapManager
* Since those have nothing to do with core scripts and are
  not wished inside the ScriptMgr
2016-04-11 20:07:24 +02:00
Shauren
4e67383621 Merge branch '3.3.5-instanceextend' into 3.3.5 (PR #16392)
(cherry picked from commit 62aff401f6)
2016-04-05 20:35:59 +02:00
Naios
bf33159a70 Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.
2016-03-24 01:31:51 +01:00
Naios
28d8f7f70d CMake: Use inherited dependencies in scripts
* Removes the circular dependency between game <-> scripts

(cherry picked from commit 96bc31924a)
2016-03-19 23:19:54 +01:00