Commit Graph
1959 Commits
Author SHA1 Message Date
Treeston aa811d57b6 Partial revert of 15a207f, which was causing issues (ref #4943 and #19768). Instead, fix the underlying issue from 15a207f one level further down - Unit::getAttackerForHelper() shouldn't return units that we aren't in combat with (victim can be such a unit for players/player pets, which can startattack from a distance without entering combat). (#19814)
Fixes the following issues:
- Player pets would aggro neutral mobs as soon as they start autocasting (Imp's Firebolt) if they're in react range (due to victim != null, autocast counts as autoattack and sets victim)
- Neutral mobs would randomly evade when aggro switched between targets.

Closes #19768, #19485 and #10921.

(from PR #19814)

(cherry picked from commit 69fd6245dc41dca658cadb4e99c1ee6593fe000b)
2020-06-14 23:49:04 +02:00
Treeston 496263fccb Fix evade issues when a spell hits the target just before evading. (#19815)
- Creatures should no longer get stuck in evade mode following a target if a spell hits the creature just as it's entering evade mode.
- Fixes and closes #4943. Finally.

(cherry picked from commit 1945874f965a2aef951bc3dfae1144bd42365dcb)
2020-06-14 23:49:04 +02:00
ariel- f1eb73001c Core/Spell: fixed some problems with per caster aura states
- Update clients whenever target has more than one application of an aura that applies such aurastate
- Update again when one application gets removed
- Fixed Fire and Brimstone computing damage if any warlock applied the Immolate (should only count for own)

Closes #19790

(cherry picked from commit e27c385b48fce359a168d602dabae8c55fa85563)
2020-06-14 23:49:04 +02:00
ariel- 19eeca684f Core/Unit: don't clear low health aura states on death
- Confirmed with sniffs, healthless states aren't cleared
- Prevents some procs from happening

Closes #19754

(cherry picked from commit 05b42eef7efbd545ca33e478eb1cc2c807ebe71e)
2020-06-14 22:47:27 +02:00
ariel- 3698f3a262 Core/Entities: allow guardian pets to inherit spellmods
(cherry picked from commit 97e608b05302818170ab8ada03077b8dafc55af9)
2020-06-14 20:09:45 +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
Shauren 4d69cc1c56 Core/Misc: GCC build and warning fixes 2020-05-21 22:15:58 +02:00
funjoker 314a35f0cd Core/Creatures: Update creature scaling to use content tuning
Closes #22831
2020-05-02 22:37:28 +02:00
ariel- 4f6d38fe9d Core/Entities: moved PetAura handling to Player where it belongs
(cherry picked from commit 231ec8331b2ba3cded9f0d67c77c949cd45f5a60)
2020-04-29 01:36:47 +02:00
ariel- 93c19c4194 Core/Misc: camelize GetFaction/SetFaction properly
(cherry picked from commit 4c4dca6d694bd1064b403a31a5b1c776a326f3ce)
2020-04-29 01:36:41 +02:00
ccrs a46286a803 Core/Unit: revert 3ea46e57af
After discussion we realized, ariel and me, that Creature and Unit IsMovementPreventedByCasting() have not the same checks (order matters)

(cherry picked from commit 5a2f0ce29e29d934c200f617fec6dad619fab9a5)
2020-04-28 22:42:17 +02:00
ariel- 6a96addadd Core/Unit: 229444b74a follow-up
- IsFocusing is made virtual again, so there's no need to keep a duplicated function

This reverts commit 5043639c563514c079ba6eb959dd4c1c555fa494.

(cherry picked from commit 3ea46e57afe26778704647084cc6fa55a798e510)
2020-04-28 17:51:57 +02:00
ccrs 104e745edf 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)

(cherry picked from commit 229444b74a7e2176db142e0446d4268995c5aad6)
2020-04-28 17:51:25 +02:00
ccrs 2d4549023a Core/Unit: 2170541a51 followup
use true as default value since pretty much all the script calls will expect that

(cherry picked from commit c7a57e2a093ada2ece7a01eac2f627aeb26b08d5)
2020-04-28 17:42:26 +02:00
ccrs 9a57e95f10 Core/Misc: 522f537048 followup
(cherry picked from commit 5043639c563514c079ba6eb959dd4c1c555fa494)
2020-04-28 14:54:44 +02:00
xinef1 9842ca3f4a Core/Spells: Corrected aura SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK handling for auras with very high values (#19054)
(cherry picked from commit e30e11d4c74872c6de87df831696aa643321f6d9)
2020-04-28 14:49:14 +02:00
ariel- 9ef39fa5d2 Core/Movement: allow focused spells to not break movement if it's movement allowed spell
- Core/Unit: made IsFocusing virtual

Thanks to ccrs for suggestion

(cherry picked from commit 522f537048189b40a12d68583485d1de7fcbf1d2)
2020-04-28 12:35:23 +02:00
ariel- 8889b6f54c Core/Unit: fix SPELL_AURA_MOD_DAMAGE_DONE damage calculation on non-melee schools
for Keader :P

(cherry picked from commit 66ac1509ae925edc8848cdf6c370f8ed52c688ec)
2020-04-27 14:58:52 +02:00
ariel- 60824d8c7a Core/Spell: fix nopch build x2
(cherry picked from commit abaa9d635a6c52f78ec5eb87a5a39890645d5649)
2020-04-27 14:31:29 +02:00
ariel- 52e00746cf Core/Spell: fixed SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT to actually check effects
- This commit enables stack rule 3 to be properly used to fix auras that should be active but only one providing effects, even if the spell has multiple auras

Closes #19454

(cherry picked from commit 9900899dd9d7f685a1c862bc75e7614e3f0a3ce6)
2020-04-27 14:31:21 +02:00
ariel- f31e380499 Core/Spell: check aura positivity per effect on spell hit
- Fixes applying DR to positive effects, and changing duration of whole aura

Closes #19447

(cherry picked from commit 232e631390a504b51d82a7b678b7cf26d49d182a)
2020-04-27 12:25:52 +02:00
ariel- fc0a037eef Core/Spell: fix SPELL_ATTR3_IGNORE_HIT_RESULT bypassing reflects
Closes #19440

(cherry picked from commit 83177e771a373514913d066e14d5a7f9775407fe)
2020-04-27 12:25:52 +02:00
ariel- 7dcc185a15 Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill
- This fixes yet another integer overflow due to the possibility of having time_t max showing up
- Also change respawntime and resettime fields to bigint on respawn/instance related tables
- Start using prepared statements on the InstanceSaveMgr

(cherry picked from commit 4c593f12caa162c1bfb831bdbed934bb39155ddb)
2020-04-27 12:25:52 +02:00
ariel- e5e37f0d86 Core/Unit: fix crash on magic school autoattacks
Closes #19436

(cherry picked from commit 0b50ea072e504ac7d5bf87b08d564955785f7197)
2020-04-27 12:25:52 +02:00
ariel- 1960a95425 Core/Unit: cleanup and minor fixes of miss and resist calculations
- Removed Unit::GetUnitMeleeSkill as it was basically a copy of GetMaxSkillValueForLevel
- Removed static from GetEffectiveResistChance, as this was passed anyways, changed name to CalculateAverageResistReduction, which better reflects what it does
- Fix melee miss chances calculated from attacker maxskill instead of victim maxskill
- Do actual checks if spell can be resisted/missed in MagicSpellHitResult (ie chances > 0)
- Fixed SPELLMOD_RESIST_MISS_CHANCE calculation in MeleeSpellMissChance
- Minor codestyle and cleanup of diminishing returns calcs

(cherry picked from commit e565b34f6d24411e210151d0d03e524f94cdff85)
2020-04-27 12:25:52 +02:00
ariel- 16e3796c7f Core/Misc: fix static analysis issues
CID 1373466
CID 1373481
CID 1373482

(cherry picked from commit e478434146fd479fab955aaa80eb925c15e29809)
2020-04-27 12:25:52 +02:00
ccrs 14c6a4d823 [3.3.5] Core/Movement: MotionMaster & MovementGenerators cleaning (#19361)
(cherry picked from commit 21b8c4997a260b5e2dc24ab07df17d3daa6b8b5d)
2020-04-27 12:25:52 +02:00
Shauren 0763844fb6 Core/Misc: Improve enum flags with type safe operators 2020-04-26 15:27:48 +02:00
Shauren 72ffe65dac Core/Units: Fixed bug in source of cherry-picked commit 2020-04-24 18:44:06 +02:00
Chaouki Dhib 5d076cfe29 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.

(cherry picked from commit a1f2f30c145f6ad9c4baeffeff32618e71ff537c)
2020-04-24 17:18:49 +02:00
S.V b8b6fd9ca0 Core/Creatures: Fixed GMs being considered in party/raid with nearby creatures without CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT
Ref #19340

(cherry picked from commit eea16ce35630762703b8f71d31c827179c37bfc4)
2020-04-24 17:18:49 +02:00
ariel- e44d0c8873 Core/Spell: fix an issue with vehicle spells changing orientation of base vehicle
Closes #17234

(cherry picked from commit 4096b02a560499d2cb2f40c67ac0b30ed4c48ffd)
2020-04-24 17:18:49 +02:00
ariel- 848f0d1323 Core/Entities: don't finalize movesplines before deleting.
- The whole MotionMaster will be destroyed along with the unit, freeing the allocated memory.

Closes #19324

(cherry picked from commit b53d0530cd9be97d549993a6b6c46e2cb7a4e779)
2020-04-24 17:18:49 +02:00
ariel- c16cebca64 Core/Unit: properly reset displayIds when having a shapeshift aura active
Closes #19309

(cherry picked from commit 7a38eaa5a1fe23d8fedb2bfce518abb972b823f7)
2020-04-24 17:18:48 +02:00
ariel- a098b454b8 Core/Entities: virtualize CheckAttackFitToAuraRequirement
- Should've been like this to begin with

(cherry picked from commit 21d95a1d767c95910d4508e0e83f34b4f89f587a)
2020-04-24 17:18:47 +02:00
ariel- ebc06b1d04 Core/Auras: reworked multiplicative AuraEffects calculation
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling
- Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter
- Fixes many cases of rounding error due to applying/unapplying of small factors
- Allows amounts to be zeroed (ie with an AuraEffect of amount -100)
- Do a partial revert of 6dc37a9add631888fe5fbcd43d19c2b07bed8a57, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd)
- SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs)

Closes #18687

(cherry picked from commit c69a7d1223b2ce108a221e5cc70f76cd80ae6675)
2020-04-24 17:18:47 +02:00
Shauren bbfbb7d4bf Core/PacketIO: Implement building SMSG_UPDATE_OBJECT only for selected fields and use that to fix quest objects not glowing after accepting quests 2020-04-23 20:22:53 +02:00
Shauren 3700e0ef5d Core/Misc: Defined new summon properties titles 2020-04-07 17:27:40 +02:00
Aokromes b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren bec4ed0f16 Core/Items: Fixed crash in selecting azerite essences
* Also fixed OVERRIDE_SPELLS auras for SPELLFAMILY_GENERIC
2019-12-01 00:13:51 +01:00
Shauren 1238583312 Core/Spells: Fixed value of aura effects for stat mod auras applied by items 2019-11-30 12:11:29 +01:00
Shauren 0a2d9ad2f7 Core/Items: Add ItemContext param to Item::Create function 2019-11-23 00:03:42 +01:00
Shauren 8e98ceb293 Core/Movement: Implemented movement forces 2019-09-07 16:58:58 +02:00
Traesh c924840ce7 Core/Spells: Implement SpellMisc::LaunchDelay 2019-08-31 11:11:23 +02:00
ariel- 9d16dce633 Core/Auras: tidy up one little hack
(cherrypicked from 9d639c55b186f14de806bcc92c231585bc2f590b)
2019-08-17 20:04:14 +02:00
xinef1 60663d1374 Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world

(cherrypicked from 7567cafec84080d26ea513242a1f540a823b8f9d)
2019-08-17 20:04:14 +02:00
Gustavo 1d2f20d59a Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED (#18136)
(cherrypicked from 4224259d83c336ef46fa627a8ba0015200a788eb)
2019-08-17 20:04:14 +02:00
ariel- 77fc6ceea8 Core/Spell: Added the possibility to explicitly disable auraEffect procs using attributes
- Renamed IsProcTriggeredOnEvent to GetProcEffectMask, since long ago this function returned bool, new name should better reflect its use

(cherrypicked from e7ccd8ea3fccad92af3553f544aad49be5d1a9ed)
2019-08-17 20:04:14 +02:00
xinef1 4380fe2751 Properly stop attacking after player leaves ffa area (like Gurubashi Arena) (#18952)
(cherrypicked from 4eae29d421e1d7a28aaa50d401cbbf09c50bd476)
2019-08-17 20:04:14 +02:00
Ovah 9bd8d90728 Core/Spells: implement SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL (#23467) 2019-08-17 14:56:22 +02:00