Commit Graph

1368 Commits

Author SHA1 Message Date
ariel-
7a38eaa5a1 Core/Unit: properly reset displayIds when having a shapeshift aura active
Closes #19309
2017-03-17 12:35:10 -03:00
ariel-
21d95a1d76 Core/Entities: virtualize CheckAttackFitToAuraRequirement
- Should've been like this to begin with
2017-03-12 17:48:07 -03:00
ariel-
9d639c55b1 Core/Auras: tidy up one little hack 2017-03-08 11:55:09 -03:00
Shauren
a1b622e9cc Core/Unit: reduce differences between branches
Very partial cherry pick of:

Core/Units: Updated melee/spell hit chance calculation
(cherry picked from commit 61c7161a10)
2017-03-06 21:37:46 -03:00
xinef1
7567cafec8 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
2017-03-01 22:19:25 -03:00
ariel-
c69a7d1223 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 6dc37a9add, 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
2017-02-27 14:24:20 -03:00
Gustavo
4224259d83 Core/Unit: Correct speed calculus when affected by SPELL_AURA_MOD_MINIMUM_SPEED (#18136) 2017-02-24 12:20:20 +01:00
Gustavo
3a67c8e361 Core/Misc Remove Tabs and Whitespaces (#19179) 2017-02-21 18:37:34 +01:00
xinef1
4eae29d421 Properly stop attacking after player leaves ffa area (like Gurubashi Arena) (#18952) 2017-02-20 15:03:11 -03:00
xinef1
2412886ef6 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
2017-02-13 20:42:06 +01:00
xinef1
14dfc377b4 Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer
Fixed some more crashes

* Correction
2017-02-05 23:42:31 +01:00
xinef1
59ce3d6c9b Core/Misc: Moved CharacterInfo out of world to separate class
Closes #19030
2017-02-05 23:14:19 +01:00
xinef1
3c605ba614 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
2017-02-05 22:29:23 +01:00
xinef1
78a729b6a4 Corrected immunity checking after recent changes (#19049)
- Shouldn't compare immunity to spells without schoolmask
2017-02-05 12:36:42 -03: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
xinef1
93746e8c4a 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
2017-02-04 19:50:32 -03:00
xinef1
86da1a19bb 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.
2017-02-04 22:37:16 +01:00
xinef1
0fa38d0ae0 Core/Pets: Fixed flashing pet attack button (#18906) 2017-02-04 19:38:36 +01:00
xinef1
587786ce66 Core/Spells: Properly send autorepeat cancel packet to self and fix some problems with autoshot (#18918)
Closes #13595
Closes #14460
2017-01-27 20:49:08 +01:00
xinef1
44388bc8fb Core/Pets: Disable pet interface for charmed units while mounted (#18607) 2017-01-21 14:50:09 +01:00
xinef1
38f9919a37 Core/Auras: Prevent remove of auras interrupted by turning if the turn could be caused by float calculation error (#18595) 2017-01-21 14:49:06 +01:00
ariel-
23f76b563f 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
2017-01-20 01:17:18 -03:00
ariel-
7283cbe140 Core/Spell: add missing null caster check
01d272d6cb follow-up

Closes #18875
2017-01-19 07:20:02 -03:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
ariel-
14c2b2d6cd Core/Spell: added some helpers to SpellInfo to reduce code duplication 2016-12-30 23:50:28 -03:00
ariel-
81f16b201b Core/Spell: Fixed Arcane Potency
- Removed old workaround in SpellAuras.cpp

Closes #18417
2016-12-30 02:29:34 -03:00
xinef1
7c3961244d Core/Units: Fixed bug in stun code making units summoned by npcs to never break out of stun (#18612) 2016-12-26 13:42:31 +01:00
xinef1
2aae46ad49 Core/Units: Fixed exploit where killing tamed pet could yield emblems (#18605) 2016-12-26 11:14:43 +01: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-
e1a2b1a813 Core/Misc: readd some codestyle changes inadvertently reverted
- Ref commit 6dc37a9add
2016-12-13 15:21:41 -03:00
ariel-
560c882b36 Core/Spell: partial revert of SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE immunity handling
- Bonus: without breaking Banish... yay!

Closes #18370
2016-12-13 15:20:28 -03:00
ariel-
bad4b059c8 Core/Unit: feral druid attacks should not be normalized
Closes #18460
2016-12-13 05:49:16 -03:00
ariel-
584abe107e Core/Unit: Fixed Blood Gorged ArPen bonus
- Also, fixes arp bonus for mace specialization being applied to attacks from non-mace weapon type
2016-12-13 02:54:01 -03:00
ariel-
3a52ad8d38 Core/Entities: Replace existing GetAuraEffectsByType + iteration uses with proper helper functions 2016-12-13 02:18:06 -03:00
ariel-
8b0122e7ed Core/Unit: added GetTotalAuraXXX overloads taking a predicate
- Redefined existing overloads to use the predicate logic, avoids code duplication and not checking same stack rules
2016-12-13 02:16:54 -03:00
ariel-
0b30693680 Core/Unit: added missing nullptr check in IsImmunedToSpellEffect
Closes #18461
2016-12-12 19:37:16 -03:00
ariel-
45f8135ac4 Core/Entities: don't absolute compare positions on UpdatePosition
Closes #18415
2016-12-11 17:37:43 -03:00
ariel-
f0772eea98 Core/Spell: implemented dispel reflection
Closes #18323
2016-12-11 15:08:01 -03:00
ariel-
01d272d6cb Core/Spell: improved immunity logic for dispels
- Fixes dispel magic removing immunity spells (Divine Shield for example). Ref issue #18370
2016-12-11 15:08:00 -03:00
ariel-
bd49d37258 Core/Auras: calculate periodic bonuses before specific mods, fixes Imp. Devouring Plague damage 2016-12-03 19:42:23 -03:00
Chaouki Dhib
eca3645d8b Core/Movement: minor MotionMaster refactor (#18367) 2016-12-01 23:45:32 +01:00
ariel-
0229cb865e Core/Spells: proc spells after damage apply, not before. Fixes #13025 2016-11-29 22:09:42 -03:00
Shauren
90a5811701 Core/Spells: Fixed logic related to movement while channeling
Closes #18289
2016-11-24 20:22:47 +01:00
ariel-
7ce1cb295d Core/Unit: add impurity attack power bonus to healing too (for Death Coil for example) 2016-11-20 04:13:53 -03:00
Shauren
6dc37a9add Core/Auras: Rewritten conditionally applying SPELL_AURA_MOD_WEAPON_CRIT_PERCENT, SPELL_AURA_MOD_DAMAGE_DONE and SPELL_AURA_MOD_DAMAGE_PERCENT_DONE auras
* Now the entire aura is removed when changing equipment
* All aura types can now depend on equipped items

(cherry picked from commit b9f7b500a3)
2016-11-20 01:46:47 -03:00
ariel-
c5d1b46569 Core/Unit: do not allow judgement spells to bypass damage immunity
3f19eea5e4 follow-up. Without the #16658 regression
2016-11-19 20:17:17 -03:00
ariel-
ef227d7e64 Core/Entities: fix interaction of traps with ffa pvp and sanctuary flags
- Traps should select ATTACKABLE not UNFRIENDLY targets (it shouldn't attack unfriendly targets on sanctuary zones for example)
- Made more readable the nasty oneliner in Unit::_IsValidAttackTarget

Closes #6464
Closes #18271
2016-11-19 15:43:22 -03:00
ariel-
5db308b686 Core/Entities: better support of absorb, resist and block procs
2e457b3be4 followup

Closes #18275
2016-11-19 13:56:19 -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
ariel-
e7ccd8ea3f 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
2016-11-18 02:15:45 -03:00