Commit Graph
1938 Commits
Author SHA1 Message Date
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
xinef1 89f728cd5b Core/Misc: Fixed player corpse looting, added player corpse loot and some more (#19122)
* Fixed corpse looting in wintergrasp
Added corpse loot for wintergrasp quests and To the Looter Go the Spoils (1166) achievement
Don't generate money for loot if no loot mode is available
Simplified few things

(cherrypicked from 2412886ef69d305df1bd6e6422ca3134c0ab1449)
2019-07-21 21:06:54 +02:00
xinef1 ad4e63bae1 Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030

(cherrypicked from 59ce3d6c9bd82d55cbfa505bb945b71cab21a12f)
2019-07-21 21:06:54 +02:00
xinef1 36a4e008d0 Corrected immunity checking after recent changes (#19049)
- Shouldn't compare immunity to spells without schoolmask

(cherrypicked from 78a729b6a4f1643eea7120da87a5a10f268dd3c3)
2019-07-21 21:06:54 +02:00
xinef1 fe63cd3dbb 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

(cherrypicked from e1f14215d86fc9f0cd041f0e87bf0a689c086329)
2019-07-21 21:06:54 +02: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
xinef1 ad008c43b7 Core/Misc: Fix various crashes, also related to multithreading (#19012)
* When iterating groups we have to either do it not in multithreaded context (map updates) or start with checking maps (they are guaranteed to change in single thread update).
* Properly clear ComboPoint references on player remove
* remove some possible references item may have when it is deleted during save.
* Also clear all hostile references when unit is removed from map.

(cherrypicked from 86da1a19bb36edf3242dafac6e45e87434ddff73)
2019-07-21 21:06:54 +02:00
ariel- 17703e8924 Core/Spell: remove duplicated SPELL_AURA_MOD_DEBUFF_RESISTANCE handling.
Each spell had two rolls in which it could be resisted, effectively adding to the resist chance.

Closes #7406

(cherrypicked from 23f76b563f3002e1557eb5dd75e0d26bd22357ab)
2019-07-21 21:06:54 +02:00
Shauren 3262bc827d Core/DataStores: Updated db2 structures to 8.2 2019-07-14 19:20:45 +02:00
xinef1 b711f0bcae Core/Spells: Added SPELL_FAILED_NOTHING_TO_STEAL error (#19036)
Corrected Dispel check in sanctuary area
Added root check for SPELL_EFFECT_JUMP and SPELL_EFFECT_JUMP_DEST

(cherrypicked from 3c605ba614c45c4b8f99c12fb49f342c068054a5)
2019-06-15 18:41:09 +02:00
xinef1 d1cbd8a837 Core/Pets: Fixed flashing pet attack button (#18906)
(cherrypicked from 0fa38d0ae03e3d301fb1f94c48122ea81f000131)
2019-06-15 18:41:09 +02:00
xinef1 67000a7826 Core/Spells: Properly send autorepeat cancel packet to self and fix some problems with autoshot (#18918)
Closes #13595
Closes #14460

(cherrypicked from 587786ce6661fb4741ff623458b3c6c590f642fe)
2019-06-15 18:41:09 +02:00
Shauren 455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
Shauren 31fda79556 Core/PacketIO: Updated packet structures to 8.1.5 2019-06-08 17:03:15 +02:00
vincent-michael 5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
xinef1 e1cda57955 Core/Pets: Disable pet interface for charmed units while mounted (#18607)
(cherry-picked from 44388bc8fb7d51c2454372d40a4c929b887ee668)
2018-12-09 14:18:42 +01:00
xinef1 4afee01b01 Core/Auras: Prevent remove of auras interrupted by turning if the turn could be caused by float calculation error (#18595)
(cherry-picked from 38f9919a37e0a3f17c454d4353d9ff2b79382e6b)
2018-12-09 14:18:42 +01:00
ariel- 0a0042282b Core/Spell: add missing null caster check
01d272d6cb348c968c531620c341f760e50cb97b follow-up

Closes #18875

(cherry-picked from 7283cbe140c51b917277e30ec352da84f0330c5c)
2018-12-09 14:18:42 +01:00
Traesh 9d210476e5 Core/Creatures: Update creature model handling with new display scale (#22567) 2018-11-07 20:23:30 +01:00
Shauren 0a779bd791 Core/PacketIO: Updated packet structures to 8.0.1 2018-11-05 00:00:34 +01:00
Shocker 6325dddb16 Core/Spells: Implement PROC_FLAG_ENTER_COMBAT 2018-10-13 12:50:50 +03:00