Commit Graph

616 Commits

Author SHA1 Message Date
Robingad
995fb23bc1 Core/Scripts: Add SpellInfo argument to ScriptMgr::ModifySpellDamageTaken (#26141) 2021-02-28 18:42:36 +01:00
Shauren
f269f60d8a Scripts/Quests: Implemented new quest scripting hook, OnQuestAcknowledgeAutoAccept, used when player closes quest frame after viewing details of autoaccept quests 2021-02-26 20:42:29 +01:00
Shauren
7851cd3a96 Core/AreaTriggers: Code cleanup 2021-01-30 18:10:21 +01:00
Matan Shukry
0417c5ff5f Core/AreaTriggers: Implementation for sever side area triggers
- Spawn GridLoader to spawn area triggers correctly now
- Removed SAI completely
- Removed remnants of smart scripts. Created different issue for it
- Calling InitDbPhaseShift and not InDbPhaseShift
- changed SpawnId to uint64 rather than uint32
- not using CellGuidSet typedef as to not include ObjectMgr.h in the header
2021-01-30 18:10:21 +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
Treeston
fe938b99f8 Core/Scripts: Implemented OnlyOnceAreaTriggerScript (#20288)
(cherry picked from commit 971ed856a4)
2020-08-29 00:41:22 +02:00
Aokromes
8534c23dfe Core/Scripting: remove long time dead code
(cherry picked from commit 7ed36d353a)
2020-08-29 00:15:09 +02:00
Yehonal
ae4dacfd1d Core/Scripts: FOR_SCRIPTS macro shouldn't return early (#20187)
FOR_SCRIPTS, insteadof FOR_SCRIPTS_RET, shouldn't return
otherwise methods such as void ScriptMgr::OnPlayerEnterMap(Map* map, Player* player) will end prematurely

(cherry picked from commit 4ee16fb536)
2020-08-23 16:06:43 +02:00
ccrs
97585597f0 Core/Movement: waypoint movement (#20121)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.

Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)

(cherry picked from commit 7fff83d675)
2020-08-23 00:45:46 +02:00
r00ty-tc
03b125e6d1 Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object
 - Toggleable spawn groups (with C++/SAI/command options to use them)
 - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone.
 - Backward compatibility mode (set via group and for summons)
   to support creatures/gos that currently don't work well with this
   (this should be removed once the exceptions are fixed)

Fixes and closes #2858
Tags #8661 as fixable.
Fixes and closes #13787
Fixes #15222.

(cherry picked from commit 59db2eeea0)
2020-08-22 12:59:57 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
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
ForesterDev
c34b83a467 Core/Defines: define faction templates and replace magic numbers from scripts
(cherry picked from commit abea8bf4cb)
2020-06-14 23:49:03 +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
Seyden
a9174d5eb7 Core/Scripts: Implement generic script loaders (and script registry macros) to greatly reduce code duplication (#19526) 2017-07-20 00:15:02 +02: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
DoctorKraft
96ef820e20 Core/Hotswap: Fix Reload on Linux
* Closes #19465

(cherry picked from commit 04dfd78dac)
2017-05-23 19:09:51 +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
Shauren
3a418a0bbc Core/Common: Include cleanup 2017-05-11 22:29:51 +02:00
Shauren
43510a258c Core/Hotswap: Replace #ifdef conditions with comparisons of values defined in CompilerDefs.h 2017-04-15 17:15:28 +02:00
S.V
886e9e839b Core/ScriptReloadMgr: Fixed scripts hot swapping on OS X (#19365) 2017-04-05 22:02:34 +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
019fc08feb Core/Movement: Fix a DB spline chain overload I missed in 2170541
(cherry picked from commit 3ec1b2f27e)
2017-03-02 20:51:25 +01:00
treeston
205ec4c3bf Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.

(cherry picked from commit 2170541a51)

Code style follow-up, I blame Notepad++.
(cherry picked from commit 7860da0de6)
2017-03-02 20:47:29 +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