Commit Graph
141 Commits
Author SHA1 Message Date
ariel- 3485cb38ed Core/Spells: remove 'Vanish Purge' hack, the spell is present on DB and is copy of one in vanilla DBC
Thanks to killerwife for the heads-up

(cherry picked from commit 303efcf0e4ee9ce3cfe308a3d6aa2aece1aa39da)
2021-06-19 23:33:25 +02:00
ariel- 5fbddef85f Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct

(cherry picked from commit 3b01cccd7eafaff9f3b8236a544e4fa46818926c)
2021-06-14 00:19:50 +02:00
Treeston 34c7810fe5 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.

(cherry picked from commit 532ab1c7f8653d1a2e48aa1f1f8a9ba1041d4bb7)
2021-05-16 21:56:01 +02:00
Treeston 9b141207d1 [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

(cherry picked from commit d507a7e3388382960108b24143da48e5f912b4a7)
2021-04-16 15:22:42 +02:00
Matan Shukry 6b9ff7442e Scripts/Spells: Removed unused rogue spell scriptss (#26157) 2021-02-27 13:50:05 +01:00
Matan Shukry 7159de62b6 Scripts/Spells: Remove const from AuraEffect argument for AuraEffectProcFn 2021-02-13 14:08:16 +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
Shauren 1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06: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
Aokromes b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
xinef1 ca26c33145 Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities
- Implemented binary resistances
- Corrected resistances calculations
- Pets properly inherit players spell penetration
- Fixed doubled block calculation for damaging melee spells
- Auras removing snare effects will only remove the snaring component
- Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath)
- Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools
- Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction
- Demonic Circle: Teleport no longer removes root effects

(cherrypicked from 93746e8c4a79c8256cd4896533315683f143508c)
2019-07-21 21:06:54 +02:00
vincent-michael 5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
joschiwald 570da66533 Scripts/Spells: Fixed eviscerate and envenom damage
Closes #21923
Closes #21874
2018-05-12 12:49:12 +02:00
Shauren 007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
vincent-michael 7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
joschiwald b12b37058c Scripts/Spells: Fixed Rogue Stealth SpellScript
Ref #20883
2017-11-18 21:33:46 +01:00
ariel- b86150352d Core/Scripts: added missing null checks for DamageInfo struct
(cherry picked from commit 666422d82751439aaf3ddd05dae086900dffcbf2)

# Conflicts:
#	src/server/scripts/Spells/spell_dk.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-09-05 11:57:29 +02:00
ariel- 12646fe4b3 Core/Scripts: fix undefined reference errors in Linux
Closes #19915
2017-06-19 14:34:00 -03:00
Shauren 24b8aa1166 Build fix for VS 2015 2017-06-17 23:26:27 +02:00
Shauren 6c9b5e4cf5 Core/Spells: Fixed Atonement 2017-06-17 15:31:52 +02:00
Shauren 12d0306543 Core/Spells: Use ValidateSpellInfo in all scripts 2017-06-03 01:34:21 +02:00
Shauren 2200b4b0e1 Nopch fix 2017-05-24 21:30:43 +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
tkrokli 65eefebe43 More warning fixes
- unused variables reported by clang in travis-ci
2017-04-26 10:53:38 +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 2ff855054f52bf2dcf81aa7a7da7bab7f8a99686)

# 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
Shauren 8f49a32d13 Core/Spells: Removed even more uses of SpellIcon to identify spells 2017-04-03 00:27:16 +02:00
mik1893 5a93f2b974 Core/Spells: Proc handler script converions (#17122)
* Blazing Speed (Mage)
* Blessed Recovery (Priest)
* Druid Forms Trinket
* Idol Of Mutilation
* Nature's Guardian (Shaman)
* Nether Protection (Warlock)
* Piercing Shots and Bonus 4P T9 Hunter
* Lightning Shield (Shaman)
* Acclimation (DK)
* Move DK T10 4P Melee Bonus
* Move DK Improved Blood Presence triggered heal (DK)
* Rogue T10 2P Bonus
* Illumination (Paladin)
* Soul Preserver
* Death Choice trinket
* stack trinket scripts (ToC25 Caster Trinket, Lightning Capacitor, Thunder Capacitor)
* Battle Experience (ICC - Gunship)
* Blood Reserve (enchant proc)
* Darkmoon Card Greatness
* Charm of the Amani Witch Doctor
* Mana Drain

(cherry picked from commit 5b8e68ee6335ecbc9fea253eaceecb20c50aa41e)
2017-01-08 22:37:18 +01:00
vincent-michael 86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Ivan Beňovic 8ff5b35be1 Core/Spells: Add SpellMissInfo argument to BeforeHit hooks and call them also when the spell doesn't hit. (#17613) 2016-07-20 09:08:58 +02:00
Shauren d92f529d93 Core/Spells: Fixed Stealth and Vanish
Closes #15779
2016-04-29 21:21:58 +02:00
Shauren cc262ec12e Core/Spells: Updated Eviscerate and Envenom formulas
Closes #16886
Closes #16887
2016-04-29 20:05:41 +02:00
ccrs 7672ca1945 Core/Spells: Rogue Honor Among Thieves
(cherry picked from commit 983bbe4a4c28ee0eda19daa3ab8b713a99ffa00d)
2016-04-05 18:36:57 +02:00
Shauren 70412e7e25 Core/Misc: MSVC warning fixes 2016-04-05 00:15:56 +02:00
Vincent-Michael 478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Vincent-Michael 00b4e8b6cc Scripts: Added missing overrides 2015-11-15 03:38:02 +01:00
Shauren 675a2fcd3b Core/Util: Fixed flag128 and removed flag96 - previously if flag128 and flag96 were used in together the result was always a bool instead of expected flag result due to implicit boolean conversion 2015-04-27 00:33:27 +02:00
Shauren 56186319bd Core/Spells: Cooldown updates
* Refactored cooldown handling to separate class shared by creatures and players
* Updated and enabled cooldown packets
* Implemented creature school lockouts
* Implemented spell charges
* Fixed AuraUpdate structure
* Fixed aura flag AFLAG_NOCASTER handling
* Implemented spell charge related auras
2015-02-17 01:01:44 +01:00
jackpoz e6f26cfb1f Core/Misc: Fix static analysis issues
Fix some static analysis issues reported by Coverity.
Rename SpellMgr::EnsureSpellInfo() to SpellMgr::AssertSpellInfo() to be consistent with other similar methods.
2015-02-08 19:40:03 +01:00
Vincent-Michael ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Shauren 941904d5ea Core/Items: Updated item stat calculations
* Implemented item modifiers
* Implemented item bonuses
2014-12-23 00:25:43 +01:00
Rat 2144d6c851 Core/Spells: core now builds without scripts project, still not stable 2014-11-24 18:57:49 +01:00
Intel 43d5fb5eae Core/DataStores: Updating spells dbc part 2 2014-11-10 02:51:55 +02:00
Intel f847f55385 Core/DataStores: Updating spells dbc part 1 2014-11-09 23:53:48 +02:00
Shauren bea5cad67d Core/Entities: Fourth part of removing GetGUIDLow() uses 2014-10-22 21:22:04 +02:00
Vincent-Michael da91ae1f22 Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_druid.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/scripts/Spells/spell_warrior.cpp
2014-09-27 05:23:46 +02:00
jackpoz 16a884d999 Core/Misc: Refactor scripts to fix static analysis warnings
Eighth batch of fixes targeting 80 issues reported by Coverity
2014-09-25 21:19:34 +02:00
Shauren 8e288dd673 Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlefield/Battlefield.h
	src/server/game/Battlegrounds/ArenaScore.h
	src/server/game/Battlegrounds/ArenaTeam.cpp
	src/server/game/Battlegrounds/ArenaTeam.h
	src/server/game/Battlegrounds/ArenaTeamMgr.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.h
	src/server/game/Battlegrounds/BattlegroundQueue.h
	src/server/game/Battlegrounds/BattlegroundScore.h
	src/server/game/Battlegrounds/Zones/BattlegroundAB.h
	src/server/game/Battlegrounds/Zones/BattlegroundAV.h
	src/server/game/Battlegrounds/Zones/BattlegroundEY.h
	src/server/game/Battlegrounds/Zones/BattlegroundIC.h
	src/server/game/Battlegrounds/Zones/BattlegroundSA.h
	src/server/game/Battlegrounds/Zones/BattlegroundWS.h
	src/server/game/DungeonFinding/LFG.h
	src/server/game/DungeonFinding/LFGMgr.cpp
	src/server/game/DungeonFinding/LFGMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/DungeonFinding/LFGQueue.h
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Creature/GossipDef.cpp
	src/server/game/Entities/Creature/GossipDef.h
	src/server/game/Entities/Creature/TemporarySummon.cpp
	src/server/game/Entities/DynamicObject/DynamicObject.cpp
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Object/Object.h
	src/server/game/Entities/Object/ObjectDefines.h
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Globals/ObjectAccessor.cpp
	src/server/game/Globals/ObjectAccessor.h
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Groups/Group.cpp
	src/server/game/Groups/Group.h
	src/server/game/Guilds/Guild.cpp
	src/server/game/Guilds/Guild.h
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattleGroundHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/GroupHandler.cpp
	src/server/game/Handlers/GuildHandler.cpp
	src/server/game/Handlers/ItemHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/NPCHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Handlers/TradeHandler.cpp
	src/server/game/Handlers/VehicleHandler.cpp
	src/server/game/Movement/Spline/MoveSplineInit.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/game/Spells/Spell.cpp
	src/server/scripts/Commands/cs_debug.cpp
	src/server/scripts/Commands/cs_gm.cpp
	src/server/scripts/Commands/cs_misc.cpp
	src/server/scripts/Commands/cs_modify.cpp
	src/server/scripts/Commands/cs_reset.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
	src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
	src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_azshara.cpp
	src/server/scripts/Kalimdor/zone_durotar.cpp
	src/server/scripts/Kalimdor/zone_moonglade.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
	src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
	src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp
	src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_generic.cpp
	src/server/shared/Packets/ByteBuffer.h
2014-09-20 11:05:30 +02:00
Shauren 2a1a294383 Scripts/Commands: Fixed build with -DSCRIPTS=0 2014-09-14 16:54:21 +02:00
jackpoz 54d28af46d Merge branch 'PortgasDAce/1' into 4.3.4
Close pull request #12731
2014-08-24 14:04:54 +02:00
Shauren 4a741258f1 Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlegrounds/ArenaScore.h
	src/server/game/Battlegrounds/Zones/BattlegroundAB.h
	src/server/game/Battlegrounds/Zones/BattlegroundAV.h
	src/server/game/Battlegrounds/Zones/BattlegroundEY.h
	src/server/game/Battlegrounds/Zones/BattlegroundIC.h
	src/server/game/Battlegrounds/Zones/BattlegroundSA.h
	src/server/game/Battlegrounds/Zones/BattlegroundWS.h
	src/server/game/Entities/Creature/Creature.h
	src/server/game/Entities/DynamicObject/DynamicObject.h
	src/server/game/Entities/Item/Item.h
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Guilds/Guild.h
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/TradeHandler.cpp
	src/server/game/Miscellaneous/SharedDefines.h
	src/server/game/Server/WorldPacket.h
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/World/World.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/shared/Packets/ByteBuffer.h
2014-08-12 00:45:24 +02:00