Commit Graph

1289 Commits

Author SHA1 Message Date
Keader
f0cd28be3d Core/Unit: Remove incorrect check that dont allow units attack your vehicle/passenger (#17932) 2016-10-14 23:41:38 +02:00
ariel-
b1777979c3 Core/Unit: disallow parry for totems 2016-10-14 02:14:19 -03:00
ariel-
4cdbc1a09b Core/Spell: Fix 2 more off by one probability calc and duplicated logic in spell hit roll 2016-10-09 20:18:07 -03:00
ariel-
10437a1e2e Core/Unit: enabled parry for all creatures, not only humanoids
If there's some creature that _shouldn't_ parry, use the `flags_extra` field in `creature_template` table
2016-10-09 01:55:14 -03:00
ariel-
d078029124 Revert "Core/Unit: prevent m_extraAttacks underflow. Fixes a freeze with SPELL_EFFECT_ADD_EXTRA_ATTACKS"
This reverts commit f09e7cbbfe.
2016-10-07 12:50:08 -03:00
SnapperRy
79c1b5942c Revert "Core/Creature: don't give kill and achievement credit if a creature kills itself."
Causes an issue where a creature killed by a reflected spell will not give credits.

Thanks Aokromes for noticing. Reverting this until a better solution is found.

This reverts commit 5417a1a37f.
2016-10-06 11:16:05 +02:00
SnapperRy
5417a1a37f Core/Creature: don't give kill and achievement credit if a creature kills itself.
Prevents Wintergrasp vehicles from giving credit when killed by Wintergrasp Water and other similar exploits.
2016-10-06 10:50:50 +02:00
ariel-
8a82a3ba81 Core/Unit: implemented crit suppression
Thanks Riztazz for the infos :P
2016-10-06 01:06:37 -03:00
ariel-
a0e317b991 Core/Scripts: De-hack glyph of Barkskin with proper spell 2016-10-06 00:59:26 -03:00
ariel-
f09e7cbbfe Core/Unit: prevent m_extraAttacks underflow. Fixes a freeze with SPELL_EFFECT_ADD_EXTRA_ATTACKS 2016-10-05 22:46:26 -03:00
ariel-
5b7078c30a Core/Unit: fix weapon skill up.
Closes #18044
2016-10-05 13:07:44 -03:00
ariel-
b5e8e0a5db Core/Auras: reset periodic aura timers by default. Except when aura comes from triggered spell
Closes #17961
2016-10-05 03:10:05 -03:00
ariel-
e641d0c7d7 Core/Spells: Implementation of QAston proc system
- Move checks from Unit::IsTriggeredAtSpellProcEvent (old system) to Aura::IsProcTriggeredOnEvent (new system)
- Templatize SpellModOp param of Player::ApplySpellMod, also killed charge counter from SpellModifier and Player system for handling charges... no point in having 3 different systems doing the same thing
- Automatically add default entries to spellProcMap, based on spellinfo (else auras won't proc without an entry) Based on old Unit::ProcDamageAndSpellFor
- Old Unit::ProcDamageAndSpellFor renamed to Unit::ProcSkillsAndReactives and made private, will no longer handle auras.
- Start making use of HealInfo::AbsorbHeal in unit calculations, add effective healing info to HealInfo struct
- Changes in spell reflection system, emulates old behaviour, delaying aura drop
- Removed old charge count hacks in SpellMgr::LoadSpellInfoCorrections
- Removed bogus error log when procChance is 0: Some auras have initial 0 procChance but modified by SPELLMOD_CHANCE_OF_SUCCESS
- Fixed TriggerAurasProcOnEvent logic that tried to trigger twice from actor.
- Allow non damaging spells with DamageClass Melee or Ranged to proc character enchants. Ref issue #17034:

  * http://web.archive.org/web/20110309092008/http://elitistjerks.com/f47/t49865-paladin_retribution_pve/
  * When an auto-attack lands (does not dodge/parry/miss) that can proc a seal the of the following things happen independently of each other (see 2 roll system).

  * 1) A "hidden strike" which uses melee combat mechanics occurs. If it lands it refreshes/stacks SoV DoT. Only white swings can trigger a refresh or stack. (This hidden strike mechanic can also proc things like berserking..)
  * 2) A weapon damage based proc will occur if you used a special (CS/DS/judge) or if you have a 5 stack (from auto attacks). This attack can not be avoided.

  * Holy Vengeance is the "hidden strike" it has an apply aura effect and damage class melee.
- Fixed Blood Tap interaction with Death Runes (btw, don't know what was going on with those MiscValueB, spell 45529 doesn't have any MiscValueB in SPELL_EFFECT_ACTIVATE_RUNE)
- Ported some AuraEffect checks from old Unit.cpp function. added new AuraScript hook to check procs of an specific effect
- Allow only AuraEffects that passed the check to proc, this won't block whole aura from proccing (and lose charges) if at least one of the effects procs, though
- Changes in spell mod system (for SPELLMOD_CASTING_TIME). fixes #17558.
- Added an exception for SPELLMOD_CRITICAL_CHANCE too, fixes #15193
2016-10-04 20:21:55 -03:00
Shauren
23902ff266 Core/Spells: Calculate hitMask and store it in DamageInfo/HealInfo structures 2016-10-04 20:19:12 -03:00
Shauren
256d07f26f Core/Units: Clear UNIT_NPC_EMOTESTATE on death (blizzlike)
Closes #15263
Closes #18027

(cherry picked from commit cd326db30f)
2016-10-04 20:32:51 +02:00
ariel-
3bd5e0bf2f Core/Unit: fix a copy/paste mistake 2016-10-04 10:11:00 -03:00
ariel-
0c24e4ee0e Core/Unit: rewrite of the attack table system
- Removed a bunch of duplicated code
- Fix off-by-one errors in Unit::RollMeleeOutcomeAgainst and Unit::MeleeSpellHitResult (TC's combat table was actually of 100.01%)
- Implemented boss-level hit table (6.5% dodge/14% parry), bosses only had 5.6% of each until now
- Updated formula for chance and damage of Glancing hits

Sources:
- http://wow.gamepedia.com/index.php?title=Attack_table&oldid=2071465
- http://web.archive.org/web/20100903145646/http://www.mmo-champion.com/threads/650071-Expertise-Hit-for-Paladins-%28updated-for-3.3%29?daysprune=60
2016-10-04 01:26:34 -03:00
SnapperRy
c25f7c48b5 Core/Unit: don't reset offhand timer for players when starting attack.
Creatures are unaffected by this change. Not sure how they should behave in this case, so leaving it alone for now.

Closes #945.
2016-10-04 00:23:49 +02:00
joschiwald
8024ae4d26 Core/Spells: use spellinfo helper methods
(cherry picked from commit 12a52595ed)
2016-10-02 00:25:21 +02:00
treeston
2170541a51 Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.
2016-09-20 20:19:15 +02:00
Treeston
cf628880d5 Map/Instances: Greatly simplify PermBindAllPlayers logic. (#17940) 2016-09-16 13:09:16 +02:00
SnapperRy
c41b4000f9 Fix wrong copy-paste from last commit.
Sorry.
2016-09-15 13:52:24 +02:00
SnapperRy
4eb799560c Core/Achievement: do not consider overkill damage for ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE. 2016-09-15 13:50:20 +02:00
ariel-
19e757af5c Core/Entities: moved duplicated triggered cast proc check to Unit::ProcDamageAndSpellFor, it was preventing some always triggered auras from proccing. 2016-09-06 22:23:34 -03:00
ariel-
746b838870 Core/Spells / Scripts: Fix Lock and Load. Closes #16731 2016-09-04 04:21:04 -03:00
ariel-
be8d113699 Another build fix.
(it was probably better to just revert the commit instead)
2016-09-02 04:03:27 -03:00
ariel-
7e8a08c351 Note to self: drycoding is bad 2016-09-02 04:00:52 -03:00
ariel-
4829cca9fb Core/Spell: no need to bloat existing parameter lists. (f81754a306 follow up) 2016-09-02 03:59:14 -03:00
ariel-
f81754a306 Core/Spells: register SPELLMOD_CRITICAL_CHANCE in casting spell modifiers. 2016-09-01 01:34:17 -03:00
ariel-
81ec57b94f Core/Spells: Move Missile Barrage, Hot Streak and Brain Freeze mage talents to proc system. Also implement T8 4P Bonus.
Closes #1536
2016-08-31 22:43:19 -03:00
Naios
0c97ef5f74 Core/Unit: Force cancel unit events before invalidating the object on destruction
* Closes #16675
2016-08-29 22:03:48 +02:00
treeston
211eee0fce Entities/Unit: Add overload to NearTeleportTo taking Position const&. 2016-08-26 21:02:25 +02:00
SnapperRy
42a32a3c7c Core/Unit: do not refresh last damaged timer if hit by SPELL_AURA_DAMAGE_SHIELD.
Fixes spells like Retribution Aura, Thorns and Damage Shield that were preventing units from evading.
2016-08-25 22:16:34 +02:00
ariel-
f183ed3c50 Core/Unit: removed ancient workaround changing spell caster based on triggering aura.
Keep an eye out for those broken scripts!

Closes #17739
2016-08-21 18:02:36 -03:00
Treeston
6f85422f0b Core/Spells: Fix orientation- and targeting-related issues if the creature isn't currently engaged in combat. (#17120)
Also disable spell focus system for vehicle control auras.

Closes #16572
Closes #17016
2016-08-21 11:07:38 +02:00
Shauren
836fe5d1ed Core/Spells: Fixed possible null pointer dereference
Coverity CID 1357406

(cherry picked from commit cc07a491f6)
2016-08-20 15:51:15 +02:00
Treeston
8deda7ed7f Entities/Unit: Cleanup refactor. Changes: (#17819)
+ Unit::m_movedPlayer -> Unit::m_playerMovingMe
+ Player::m_mover -> Player::m_unitMovedByMe
+ Unit::GetMover() -> Unit::GetUnitBeingMoved()
+ Unit::GetPlayerMover() -> Unit::GetPlayerBeingMoved()
+ NEW: Unit::GetClientControllingPlayer()
2016-08-20 12:43:04 +02:00
Chaouki Dhib
d7600f1126 Core/Units: Fixed melee range check (#17693)
* Split Spell::CheckRange() into 2 methods since that method had more than one responsibility.
* Moved melee range logic into its own function
* Moved melee range logic method GetMeleeRange from Spell to Unit class. Unit::IsWithinMeleeRange() and Spell::GetMinMaxRange() both use that method.
2016-08-15 18:17:07 +02:00
robinsch
dd67f4ed96 Core/Spell: Remove all raid auras on party leave (#17663)
Core/Spell: Remove all raid auras on party leave
2016-08-14 17:26:03 +02:00
Aokromes
b51409a5d3 Core/Logs: Fine tunning some logs 2016-08-05 21:22:12 +02:00
ariel-
c271e196c8 Core/Spell: fix one logic fail when calculating level penalty
(http://wow.gamepedia.com/index.php?title=Spell_power&oldid=1751770#Spells_learned_before_level_20)
2016-07-30 04:06:37 -03:00
Killyana
0be0606593 Core/Entities: Remove wrong immunity
Closes #17363
2016-07-19 22:21:41 +02:00
ForesterDev
22c4e87ebb Core/Entities: add missing null pointer checks in HandleProcTriggerSpell. CID 1356245 (#17629) 2016-07-19 10:46:30 +02:00
ariel-
2feb53ecb6 Core/Entities: implement SPELL_AURA_MOD_CRIT_CHANCE_FOR_CASTER, fixes talent Point of no Escape 2016-07-19 02:57:01 -03:00
robinsch
bc358fc381 Core/Spell: Sheath of Light should add remaining ticks to healing done when refreshed (#17583) 2016-07-15 19:46:39 +02:00
SnapperRy
a732749d72 Core/Unit: remove emote state when creature attacks another unit (#17542) 2016-07-15 18:31:52 +02:00
Meruemu
4a46fee03e Core/Entities: Fix flag CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN implementation. (#17548) 2016-07-11 10:15:05 +02:00
Shauren
14b93c04ee Core/Units: Fixed autoattack range
Closes #17539
2016-07-09 13:03:03 +02:00
Golrag
0b98544286 Core/Unit: Add proc cooldown to all units (#17546) 2016-07-08 21:52:30 +02:00
ariel-
cfbfa8158a Core/Unit: remove duplicate resist roll in Unit::MeleeSpellHitResult (#17520) 2016-07-06 08:58:59 +02:00