Commit Graph

8953 Commits

Author SHA1 Message Date
ariel-
fa3eb754cb Core/Unit: fixed Lava Burst crit when Flame Shock is present on target
Closes #21268
2018-01-20 00:15:48 -03:00
ariel-
f1896144c0 Core/Auras: fixed EquippedItemClass check
follow-up to 29c3b7d8f6
2018-01-18 19:14:38 -03:00
ariel-
b8c281f497 Core/Auras: Don't remove shield only dependant auras on disarm
Closes #19782
2018-01-18 16:29:21 -03:00
ariel-
29c3b7d8f6 Core/Auras: define and implement attribute SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK
Closes #20148
2018-01-18 16:08:24 -03:00
ariel-
b75ff7d4bf Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c504314
See discussion on b64c504314
2018-01-18 01:07:29 -03:00
sirikfoll
e12e0ad582 Core/CombatAI: Npcs with TurretAI will be able to attack again
Needed after the new Threat system
2018-01-17 19:01:09 -02:00
sirikfoll
ed9e220991 Core/Player: Pass correct Zone ID to HandlePlayerLeaveZone
This will fix some issues with Wintergrasp, like phasing auras getting stuck and missing group invites for the battle, among others
2018-01-17 18:59:20 -02:00
ariel-
b64c504314 Core/Globals: throw some RAII into ObjectMgr, and load templates into vectors
Ref #14274
2018-01-17 02:17:49 -03:00
ariel-
ccf0807be0 Core/Unit: check remaining instead of full duration for Bounced by DR auras 2018-01-16 20:51:07 -03:00
Moein
891bca934e Core/SAI: Extended SMART_TARGET_VEHICLE_PASSENGER to allow specifying seat mask instead of single seat index (can now target all passengers) (#21245) 2018-01-16 21:28:41 +01:00
ariel-
3d7166c1c7 Core/Creatures: creatures only have one damage
Closes #21236
2018-01-16 14:44:04 -03:00
Treeston
1847555c8c Core/Threat: Fix a potential crash that would occur in specific edge cases of AI being a bit naughty. 2018-01-15 15:42:41 +01:00
ariel-
5153f464d8 Core/Auras: fix static analysis issues
CID 1384433
CID 1384436
2018-01-14 17:23:48 -03:00
ariel-
01537e1dfb Core/Unit: fix mess-up with CalcArmorReducedDamage parameter order 2018-01-14 17:19:26 -03:00
ariel-
46fcbb42d2 Core/Unit: fix typo 2018-01-14 09:30:42 -03:00
ariel-
f1986c6aaf Core/Entities: implement secondary damage for some weapons and removal of old voodoo
- Fixed correct Retaliation damage spell according to sniffs is 20240
- CalcArmorReducedDamage insisted on dealing a minimum of 1 damage even if damage was 0
- CalculateDamage was zero-phobic too: it defaulted to arbitrary max 5 damage

Closes #19081
2018-01-14 09:23:34 -03:00
ariel-
688e96fb4f Core/Unit: allow miss chance to exceed 60% cap with certain auras 2018-01-13 23:33:40 -03:00
ariel-
0e9b1635e0 Core/Unit: fix Sanctified Wrath (again)
- Actually only rank 1 was affected because of 50% reduction on rank 2
2018-01-13 21:59:20 -03:00
ariel-
22b24d8dae Core/Unit: fixed crash
Closes #21231
2018-01-13 21:36:06 -03:00
ariel-
d570e2af3e Core/Unit: simplified and arranged spell bonus calculation
- Remove duplicated SPELLMOD_BONUS_MULTIPLIER handling (both on done and taken)
- Handle properly bonus data, don't apply bonus by default, only player spells should take into account spell power
- Moved Earthliving Weapon coefficient to DB
- Refactored Avenging Wrath handling

Closes #13287
Closes #21230
2018-01-13 20:49:44 -03:00
ariel-
3b01cccd7e Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct
2018-01-13 20:49:43 -03:00
ariel-
31a3a6f0c5 Core: fix non pch build, redux 2018-01-13 17:07:25 -03:00
vincent-michael
5029a83962 Core: Fixed non pch build 2018-01-13 12:15:17 +01:00
ariel-
cb9e72e521 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876
2018-01-13 06:45:21 -03:00
jackpoz
1c60af6328 Core/SAI: Add a 5th parameter to SAI events 2018-01-12 20:17:53 +01:00
ariel-
f50a333418 Core/Misc: kill whitespace 2018-01-12 00:07:29 -03:00
lachtanek
c50aefac96 Core/Pools: Fixed spawning in pools with both explicitly and equally chanced entries (#21170) 2018-01-11 12:22:56 +01:00
Treeston
d9c772303c Core/Unit: Abide UNIT_FLAG2_DISABLE_TURN on creatures. Add that flag to Kologarn (from sniff). Hi sirikfoll. 2018-01-10 00:19:00 +01:00
Treeston
b53cbf467b 3dcd49e v2, slightly cheaper 2018-01-09 23:56:17 +01:00
Treeston
3dcd49ef90 Core/Threat: fix a potential super edge case iterator invalidation 2018-01-09 23:42:22 +01:00
Treeston
45168f9612 nopch fix 2018-01-09 22:04:35 +01:00
Treeston
f45c211987 Scripts/Commands: New command: .debug threatinfo 2018-01-09 18:09:24 +01:00
Chaouki Dhib
274dede3dc Core/Movement: Correct the allowed distance to target before a repositioning is necessary. #20173
Also getting rid of the wordserveur config parameter 'TargetPosRecalculateRange' since it is no longer needed.
2018-01-08 22:31:30 +01:00
xinef1
23823f5147 Core/Spells: Defined and implemented some new spell attributes (#18950) 2018-01-08 20:31:21 +01:00
Keader
57672fdf25 Core/Spells: Fixed Shapeshift using macro
Close #21197
Author: lineagedr
2018-01-07 20:51:30 -03:00
kelno
70eb18d0e5 Core/Creature: improve DB linked_respawn handling (#21172)
* Fixed SetCreatureLinkedRespawn function possible erasing/replacing a GameObject link (instead of a creature one)
2018-01-08 00:32:22 +01:00
Treeston
9ad11e67fb Core/Threat: Fix a potential exploit allowing players to damage a boss without them taking damage.
Scripts/Halion: General cleanup of old hacks no longer needed under new combat system.
2018-01-07 20:32:30 +01:00
Treeston
3bb33e3108 Core/Map: New Map::ForceRespawn to override objections and force a respawn (equivalent to force = true). Use this to fix various GM commands.
Scripts/Valithria: Fix an issue that could get the encounter stuck in an unloaded state.
2018-01-07 19:53:39 +01:00
DanVS
01b18182c0 Core/Spells: Mana potions in druid forms (#21160)
* Fix mana potions in druid forms
2018-01-07 11:26:57 +01:00
Treeston
a08ad9aac1 Core/Threat: only send periodic threat list updates while unit is engaged 2018-01-06 17:49:54 +01:00
Shauren
b2b4f9d1e4 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
Treeston
fdacf12739 Core/Combat: Some more sanity check asserts to try and track down #21187.
Also, some anti-annoyance treatment for dot tele.
2018-01-06 01:40:31 +01:00
Treeston
5a9fddaa5a Core/Combat: some more detailed assertions to possibly shed light on #21187. 2018-01-06 00:49:04 +01:00
Treeston
e0b609a178 Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177. 2018-01-04 15:19:37 +01:00
Treeston
9f9507e6a1 Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174.
- Some strings cleanup
2018-01-04 04:46:41 +01:00
ariel-
e245113660 Core/Spells: fix casting NO_TARGET event spells
Closes #19978
2018-01-03 22:49:13 -03:00
Treeston
08277f589e nopch fixes 2018-01-03 20:53:01 +01:00
Treeston
532ab1c7f8 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.
2018-01-03 20:04:19 +01:00
ariel-
a0dcd9c798 Core/Player: fix issue with SendLoot when using Disarm Trap at maximum range 2018-01-02 01:19:23 -03:00
ariel-
95df8d5028 Core/Player: removed redundant check 2018-01-02 00:29:31 -03:00