Commit Graph

1501 Commits

Author SHA1 Message Date
Treeston
710488ea20 Core/Unit: Random code style/naming adjustments 2018-08-27 19:37:29 +02:00
Treeston
5cea572a9a Core/Threat: Threat system adjustments:
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226. Tagging #21501.
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.
2018-08-27 19:08:17 +02:00
Treeston
ce06767ef5 Core/Unit: Inline some unnecessary helpers. 2018-08-27 13:37:50 +02:00
Treeston
d4ef2529e9 Core/Unit: Store charmer and charmed pointers on Unit directly, no more map lookups for Unit::GetCharmer and Unit::GetCharmed 2018-08-25 00:44:33 +02:00
Treeston
d2d9f470c3 Core/Unit: Acquire GetControllingPlayer. Use to fix duel bugs. 2018-08-23 23:46:52 +02:00
Treeston
abd3d55668 wops (042f551 follow-up) 2018-08-23 16:54:02 +02:00
Treeston
042f5515e4 Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans 2018-08-23 16:34:42 +02:00
Treeston
c0a7274ff1 Core/AI: Add a new LeavingWorld AI hook 2018-06-26 12:15:57 +02:00
Ovah
0dcc318e37 Core/Player: fix periodic eating and drinking emotes (#21280)
Closes: #12567
2018-06-22 20:23:46 -03:00
Killyana
f6333a1f74 Npc/Script: Hide attack button from pet bar for Acherus eye 2018-06-11 20:32:40 +02:00
ccrs
982643cd96 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
2018-06-03 10:06:57 -07:00
ccrs
76667e45a9 Core/Movement: crashfix workaround
untested
ref #18471
2018-05-05 18:53:59 +02:00
Treeston
7fe59c95d8 1b7ec4b follow-up 2018-05-04 13:46:21 +02:00
Treeston
081eab3cf5 Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.
2018-05-02 19:09:37 +02:00
ccrs
7118806231 Core/Movement: use helpers for validation 2018-04-23 23:35:31 +02:00
ccrs
2a45418032 Core/Movement: move MoveSplineInit (#21857)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations.
2018-04-23 20:33:14 +02:00
ccrs
f9914caefc Core/Misc: movement header cleanup 2018-04-19 13:31:39 +02:00
Treeston
74defba5a7 Core/Movement: Fix a potential crash on newly created pets. Closes #21791. 2018-04-07 17:23:26 +02:00
Treeston
2a84562dc8 Core/Movement: Replace old TargetedMovementGenerator into ChaseMovementGenerator and FollowMovementGenerator, full rewrite for both.
- Chase to angle is now functional. Pets use this to chase behind the target. Closes #19925.
- Chase to arbitrary range interval works. Not used anywhere, but you can technically make hunter-like mobs.
- Pets now follow the hunter cleanly and without stutter stepping. Also fix some other things. Closes #8924.
2018-04-06 18:09:55 +02:00
ariel-
5dec0e491b Core/Spells: all bleed effects should ignore armor
Closes #21759
2018-04-03 03:15:06 -03:00
Treeston
4692e10ca2 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good. 2018-04-01 13:52:36 +02:00
ariel-
a35d0a5f56 Core/Entities: completely remove 60% melee miss cap as there is no proof of its existence
- Auras modifying hit chance should have full effect now

Ref issue #21629
2018-03-16 12:28:22 -03:00
Keader
a891eb364e Core/Unit: Guardians no longer enter combat before reaching the target (#19816) 2018-03-11 13:23:23 +01:00
ariel-
7f947646f9 Core/Spell: fix SendSpellMiss requiring caster Unit 2018-03-10 19:51:36 -03:00
ariel-
93eda20d5c Core/Spells: Fix periodic rolling adding bonuses twice
Calculation is now done in CalculateAmount
2018-03-09 14:41:28 -03:00
ariel-
45c5e1b9d6 Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752
2018-03-09 14:41:28 -03:00
ariel-
e8d5aa56cc Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
Closes #15088
2018-03-09 14:41:28 -03:00
ariel-
9b38a6352c Core/Spells: rework part 2: Split up target selection logic
Target check only determines what kind of entities we can target, spell positivity determines if that entity is valid for attack/assist

Closes #8844
2018-03-09 14:41:28 -03:00
ariel-
efeae33495 Core/Spells: rework part 1: Improved positive detection logic 2018-03-09 14:41:28 -03:00
Shauren
241109327b Core/Creatures: Remove hover on death 2018-03-08 23:13:51 +01:00
Shauren
2baa81065b Core/Movement: Fixed creature hover
Closes #15177
2018-03-08 23:13:51 +01:00
ariel-
6e0b9a7916 Core/Creatures: port power type updates from master branch
Core/Misc: Added helper function Unit::SetFullPower
Cherry-picked from 8199eef81c

Core/Creatures: Updated power type handling (#20981)
Cherry-picked from 16a7a414ab
2018-03-07 03:34:45 -03:00
ariel-
98d6258efd Core/Entities: kill unused return value from Unit::HandleSpellClick
- AI hook will now receive the result by copy, as modifying it had no effect
- Some renaming: result->spellClickHandled, clickPair is actually clickBounds, the clickPair is the pair <creatureID, SpellClickInfo>
2018-02-24 15:52:09 -03:00
ariel-
1074a9b053 Core/Scripts: remove hack that caused aura to not be applied and saved twice on owned auras, causing an error on save
- This is handled by group stack rules actually
- Also reset removed aura counter when cleaning removed auras

Closes #21486
2018-02-23 13:16:42 -03:00
ariel-
fc678bb3c2 Core/Unit: clear charmed/possessed state before returning client control. Works like a charm
Closes #21471
2018-02-21 23:24:25 -03:00
ariel-
ba27711145 Core/Entities: unit states cleanup
- Added new UNIT_STATE_FOCUSING for creature focus system, this will stop creatures adding/clearing the UNIT_STATE_CANNOT_TURN mask (eg UNIT_STATE_STUNNED if stunned while focusing a spell)
- Added UNIT_STATE_CHARMED that gets set/removed on any charm type (UNIT_STATE_POSSESSED is only for possess as it's name suggests)
- The new states are checked against mask to know whenever client needs to regain character control

Closes and fixes #21460
2018-02-20 17:34:12 -03:00
jackpoz
d3d0640a8d Core/Misc: Fix static analysis issues
Fix static analysis issues reported by Coverity
2018-02-16 21:39:52 +01:00
ariel-
1826437c09 Core/Spells: implemented bonus SP coefficient from DBC
Ref #21415
2018-02-14 05:58:56 -03:00
ariel-
c7095375c3 Core/Unit: kill unused parameter from SpellxxxBonusTaken 2018-02-12 18:36:10 -03:00
ariel-
404240fb68 Core/Scripts: remove Tenacity hack, implemented with proper aura 2018-02-12 18:35:06 -03:00
tkrokli
57553ed96a Build fix (unused parameter 'stack' in Unit.cpp)
Ref. commit 4d14f613f3
2018-02-12 22:22:34 +01:00
ariel-
4d14f613f3 Core/Unit: corrected calculation for SPELL_AURA_MOD_DAMAGE_TAKEN/SPELL_AURA_MOD_HEALING auras
- Spell bonus calculation and penalty was done twice, but it's simply flat +SP, which should be taken into account before other bonuses
- Fixed missing code from SpellDamageBonusDone/SpellHealingBonusDone and killed multiplication by stack amount twice for default coefficient spells (already multiplied on level penalty)
2018-02-12 16:52:59 -03:00
ariel-
52873a7072 Core/Spells: calculate crit chance only for spells that do damage/healing
Refs #18813
2018-02-12 00:21:26 -03:00
ariel-
2d2c43f4b9 Core/Spells: fix SPELLMOD_DAMAGE application order for melee spells
Closes #20597
2018-02-04 21:28:15 -03:00
Shauren
21ad8761e9 Core/Spells: Exclude spells with no MaxLevel from coefficient downranking penalty 2018-01-27 13:06:48 +01:00
Shauren
2ab4e6c7aa Core/Spells: Fixed downranking coefficient penalty formula
Closes #21318
2018-01-27 12:19:18 +01:00
ariel-
e315e41d36 Core/Entities: don't allow client control if player is still affected by any lose of control state 2018-01-22 14:13:46 -03:00
ariel-
514c847881 Core/Unit: fixed Global cooldown cancelation on spell interrupt
Thanks to Nyeriah for the heads up
2018-01-22 03:55:14 -03:00
ariel-
4402f71eb7 Core/Spells: fix Spirit of Redemption
- Who would have suspected GetAuraEffect (iconId override) did a check against null spellfamilyflags?
- Remove mirror timers hack (triggered spell already allows underwater breathing)
2018-01-21 21:18:02 -03:00
Treeston
2c86c78f04 Core/Unit: Remove a superfluous threat state update in SetPhaseMask. 2018-01-21 15:34:39 +01:00