Commit Graph

575 Commits

Author SHA1 Message Date
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
ariel-
720ba9e973 Core/Scripts: prevent Arthas in CoS losing his gossip flag and halting instance progress 2017-12-28 12:16:37 -03:00
ariel-
deebac9639 Core/Scripts: more nopch 2017-12-15 20:23:50 -03:00
ariel-
7fb70e74f2 Core/Scripts: nopch fix 2017-12-15 20:19:55 -03:00
ariel-
a36e804ae4 Core/Auras: periodics refactor part 5: ported periodic trigger spell auras to scripts 2017-12-15 01:46:52 -03:00
ccrs
0db5516a1a Core/AI: reorder methods in ScriptedEscortAI
plus ninja rename
2017-12-11 21:00:04 +01:00
jackpoz
0daa170a2c Core/Misc: Fix static analysis issues
Fix static analysis issues reported by 3rd party tools
2017-12-08 15:21:13 +01:00
Aokromes
59e94fd9bb Misc: More cleanup 2017-11-25 02:39:27 +01:00
Aokromes
5f2c5f2ed3 Misc: Kill trailing white spaces 2017-11-25 01:05:15 +01:00
jackpoz
06ea65b0e6 Core/Misc: Fix static analysis issues 2017-11-12 15:46:56 +01:00
jackpoz
9b7c73a19d Core/Misc: Fix static analysis issues 2017-11-12 12:38:18 +01:00
Wyreth
8888e6d96d Scripts/Tanaris: move Aquementas to SAI & improve related event (#20464)
* Script/Tanaris: move Aquementas to SAI and improve related event

Closes #11668
2017-11-02 05:36:27 +01:00
dr-j
3bb5f17ff5 Quest/Script: Conversion of Bristlelimb Cage/Stillpine Captive cpp to SAI
Closes #19868
2017-10-31 20:24:56 +01:00
Killyana
48ecd81d61 Creature/Scripts: Add Aggro sound to Cairne Bloodhoo, Sylvanas Windrunner and Thrall 2017-10-28 21:05:13 +02:00
Andrew Letson
9fe890744c [3.3.5] DB/Scripts: Rivern Frostwind 2017-10-21 13:28:57 +02:00
ZenoX92
bf376c3bca DB/SAI: SAI scripts for Silithus creatures
Closes #20585
2017-10-10 18:58:51 +02:00
ZenoX92
ef09ea484b Creature/Script: Convert Spitelash Naga cpp to SAI
Closes #20558
2017-10-10 17:11:34 +02:00
sirikfoll
e2565c2597 Core/Misc: Remove Whitespaces 2017-08-11 23:06:37 -03:00
ccrs
7fff83d675 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)
2017-08-12 01:40:25 +02:00
treeston
74af880217 Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;
2017-07-09 02:07:29 +02:00
treeston
2739a5c5f5 Some more refactoring prep for combat/threat (#19930). 2017-07-03 17:33:34 +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
Treeston
1660bb7d27 Pet/Guardian AI hook re-organizing (#19824)
* Pet/Guardian AI hook re-organizing:
- Adjust OwnerAttacked/OwnerAttackedBy hooks on CreatureAI to fire for all owned units, not just player pets. This should allow guardians to more reliably recognize valid targets.
- Kill off the AttackedBy hook. While it was defined in CreatureAI.h as virtual, it was only ever invoked for player pets in specific situations. This makes it classic developer bait.
  - Adjust PetAI to use DamageTaken instead of AttackedBy.
  - Adjust behavior of AttackStart on PetAI to compensate.
2017-06-07 02:33:47 +02:00
ariel-
2335b9de1a Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Closes #19819
2017-06-06 17:57:04 -03:00
Shauren
abac1b34bc Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build

(cherry picked from commit f097e341f5)
2017-06-03 02:27:48 -03:00
ForesterDev
abea8bf4cb Core/Defines: define faction templates and replace magic numbers from scripts 2017-05-23 12:30:27 +02:00
ccrs
17579f8d91 Core/Creature: drop method SetPosition
eeeevil, use UpdatePosition. It was there just for old scripts compatibility.
2017-05-02 14:18:42 +02:00
ariel-
f913f3bb89 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)
2017-05-01 18:19:36 -03:00
ariel-
4c4dca6d69 Core/Misc: camelize GetFaction/SetFaction properly 2017-04-28 18:37:38 -03:00
ccrs
229444b74a Core/Misc: cleanup SetInFront uses
Set in front modifies only the serverside orientation, use with care.
Also check for current focus to prevent things like incorrect damage on casting creatures (ie dragon breath direction change in your face because of some taunt missclick)
2017-04-27 15:34:01 +02:00
ccrs
c7a57e2a09 Core/Unit: 2170541a51 followup
use true as default value since pretty much all the script calls will expect that
2017-04-27 14:55:06 +02:00
tkrokli
6cc267d909 Core/Scripts: Willix the Importer - $n in aggro text
* In the existing core script, Willix the Importer in Razorfen Kraul says
"Help! Get this $n off of me!" (showing the $n part in his SAY text)
instead of naming the attacker when using his 'SAY_AGGRO1' creature_text.

* With this commit change, unit target is no longer missing for Talk,
making Willix name the attacking unit when he shouts for help.
2017-04-23 01:15:00 +02:00
Gacko
e90757f763 Fix non-PCH build.
Even on 3.3.5. What's PCH for?
2017-04-15 12:43:19 +02:00
tkrokli
f6f36be004 Scripts: minimize duplicated enum names in header files (#19377)
* Scripts: Minimize duplicated enum names in header files

This reduces the number of cache resets with the Zapcc compiler

- Standard followed is instance/raid TLA + DataTypes/CreaturesIds/etc
- Partial cherry-pick of master commit 7eb4512eee
- Removed unused defines in sunken_temple.h (the core scripts using these have been moved to SAI)
2017-03-29 10:06:06 +02:00
xinef1
e1f14215d8 Core/Creatures: Various fixes for creatures, regarding combat conditions, despawning, and few others (#18998)
* Made some changes to kiting mechanics, simplified code and made taunt auras prolong combat no matter the distance from the spawn
Unified some creature despawning code, removed some brutal direct calls in scripts
Don't play death anim on forced despawn
Removed some redundant visibility changes on creature despawn
Fixed possible problem with pet initializing template info from difficulty greater than normal
Properly keep UNIT_FLAG_IN_COMBAT on UpdateEntry call
Moved RegenerateMana function to general Regenerate(Power) function
Fixed increased health regeneration from polymorph for pets
Implemented CREATURE_TYPE_FLAG_GHOST_VISIBLE, those creatures will be properly seen when player is dead also
Removed hackfix from Gaeriyan and Franclorn Forgewright, fixed properly
Simplified ForcedRespawnTime code in ForcedDespawn
Do not allow to assist unit while evading or when enemy is evading
Do not allow to attack other units when evading or when the unit is evading
Corrected distance checking code before creature is allowed to evade, should fix some common problems
Properly return summon position for summoned creatures as their respawn position
Properly stop all moving units on gossip hello, no matter their npc flags
2017-02-05 15:39:22 +01:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
Killyana
10f4138f6c Merge pull request #18702 from Rushor/peon
Scripts/Quest: Work Work! Move Lazy Peon script to SAI
2017-01-01 15:05:06 +01:00
Rushor
bee2975e4b Scripts/Quest: Work Work! Move Lazy Peon script to SAI 2017-01-01 14:22:58 +01:00
Keader
ca21779864 Core/Scripts: Black Temple misc fixes
Closes #18176
* Implemented faction change of Ashtongues when Shade of Akama dies
* Moved factions to black_temple.h
* Removed explicit from EnslavedSoulEvent (Reliquary of Souls)
* Fixed a typo in Skeram Script (followup 5f44890049)
* Fixed spell Shadow Inferno (Illidari Nightlord)
2016-12-27 22:05:06 -03:00
Keader
5f44890049 Core/Scripts: Added missing spells in Skeram (#18486) 2016-12-27 17:36:32 -03:00
Shauren
618cf0e1c2 Core/Units: Cleanup hardcoded magic numbers for byte field offsets
(cherry picked from commit ac1dc758b9)
2016-12-15 08:16:01 -03: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
tkrokli
86759c4537 [3.3.5] Core/Scripts: move npc_braug_dimspirit to SAI (#17853)
Additional change: The answers have been changed from containing only names
to include the text ` is my answer.` from the matching lines in `broadcast_text`.

- added DB creature_text entries for Braug Dimspirit
- added DB gossip_menu_option entries for this NPC
- implemented NPC `Say` line in reply to the wrong answers
- avoiding gossip exploits by turning off npcflags during talk
- added conditions for showing gossip depending on quest status
- removed deprecated SD comments in zone_stonetalon_mountains.cpp
2016-10-15 02:16:40 +02:00
tkrokli
028a7b8e45 Core/Scripts: move npc_saat to DB (#17813)
The core script only contains gossip handling + conditions.
- remove script from file the_black_morass.cpp
- thereby removing 1 line of hardcoded text
- remove redundant SD2 comments in header
- add SAI, gossip and conditions to DB
2016-10-15 02:13:37 +02: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
SnapperRy
790844e72d Script/Quest: A Cry For Help: (#18026)
- Add missing dialogue from Cowlen.
- Timers and emotes.
2016-10-03 23:47:41 +02:00