Commit Graph

1145 Commits

Author SHA1 Message Date
Jeremy
4fcc4a3300 Core/Movement: Fix some undermap issues with random movement/fear/blink (#22937)
* Core/Movement:
- Only move to point if there is a path that is not a shortcut (which will make the unit move through terrain)
- Added new function to check if there is a vmap floor without search distance
- Units that can fly, are underground but far above the vmap floor will stay underground (bronze drakes in tanaris)
- Don't remove PATHFIND_SHORTCUT from path type in some cases

* Core/Object: Ignore UpdateAllowedPositionZ for flying units.

- This will make flying units go through mountains instead of going to the top and back to the bottom to reach you.

* Core/Object: Revert some changes and let MovePositionToFirstCollision deal with a position without ground

* Missing groundZ change for objects on transport

* use CanFly instead of IsFlying

(cherry picked from commit 9fcbd8f15d)
2021-11-26 22:43:48 +01:00
jackpoz
43a41caafb Core/Misc: Fix GCC 8 warnings
(cherry picked from commit 1d04a3b216)
2021-11-24 23:40:15 +01:00
PolarCookie
f7299dce97 Core/Spell: SpellAura Redux (#22794)
* typo and correction

* spell aura no longer shared between targets

_spellAura isolated

* SPELL_AURA_CONTROL_VEHICLE is not strictly single target spell

Steam Tank Control and Wyrmrest Commander

units can reseat themselves again

* Rename 9999_99_99_99_world.sql to 2019_03_08_00_world.sql

(cherry picked from commit ec3cb05d7f)
2021-11-24 20:35:19 +01:00
jackpoz
7a2ef47495 Core/Spells: Adjust range checks to GameObject targets
(cherry picked from commit 72052aa9a5)
2021-11-24 20:35:17 +01:00
jackpoz
71b58c2e62 Core/Spells: Adjust range checks to GameObject targets
(cherry picked from commit 270a144083)
2021-11-24 20:35:17 +01:00
jackpoz
abb36a1e5b Core/Spells: Add range checks to GameObject targets
Close #23062
Patch by robinsch

(cherry picked from commit 76cc94f325)
2021-11-23 23:34:27 +01:00
Shauren
8cc6520b89 Core/Spells: SpellHistory updates
* Add duration override argument to StartCooldown (for cooldowns sent to client)
* Research new SMSG_SPELL_COOLDOWN flags
* Send interrupt school lockouts with newly defined SPELL_COOLDOWN_FLAG_LOSS_OF_CONTROL_UI
* Fixed packet structure of SMSG_MODIFY_COOLDOWN
* std::chorno-ification
2021-11-20 00:28:48 +01:00
Shauren
ce794f3978 Core/Spells: Fixed ErrorCube spell missiles
(cherry picked from commit 3b5014fdae)
2021-11-18 01:10:19 +01:00
Giacomo Pozzoni
d5c41d23e6 Core/Misc: Log more information in asserts (#22783)
* Core/Misc: Log more information in asserts

Add a new function GetDebugInfos() to types that could trigger an ASSERT() to easily include more useful information in crashlogs.
This is an initial commit that requires many more commits to implement the new GetDebugInfos() function in all required types.
If the type doesn't have the function, the global default one is picked which doesn't log anything.

* Core/Misc: Fix dynamic build

Add missing attribute for dynamic build

* Core/Misc: Fix gcc/clang build

* Core/Misc: Rename GetDebugInfos() to GetDebugInfo()

* Core/Misc: Fix FormatAssertionMessage() adding an extra '\0'

* Core/Misc: Add GetDebugInfo support to Unit

* Core/Misc: Add GetDebugInfo support to Creature

* Core/Misc: Add more info to GetDebugInfo for Creature

* Core/Misc: Add GetDebugInfo support to GameObject

* Core/Misc: Add GetDebugInfo support to Player

* Core/Misc: Add more GetDebugInfo info

* Core/Misc: Add GetDebugInfo support to Item

* Core/Misc: Add GetDebugInfo support to Bag

* Core/Misc: Add GetDebugInfo support to Transport

* Core/Misc: Add GetDebugInfo support to TempSummon, Minion, Guardian, Pet

* Core/Misc: Add GetDebugInfo support to Map, InstanceMap

* Core/Misc: Add GetDebugInfo support to Spell

* Core/Misc: Fix build warning

* Core/Misc: Add GetDebugInfo support to Aura

* Core/Misc: Add GetDebugInfo support to UnitAI

(cherry picked from commit 9a924fb9d5)
2021-11-16 20:36:58 +01:00
PolarCookie
87486cecff Core/Spells: fix issues with delayed spells and auras (#22382)
* Core/Spells: fix issues with delayed spells and auras

* Make Travis Happy

(cherry picked from commit a0999744ef)
2021-11-15 22:13:17 +01:00
ModoX
8b171d7c01 Core/Instances: Drop allowMount column in instance_template as it is already handled properly by SPELL_ATTR0_OUTDOORS_ONLY (#27148) 2021-10-23 11:42:47 +02:00
Treeston
a5989dcee9 Core/Unit: Store charmer and charmed pointers on Unit directly, no more map lookups for Unit::GetCharmer and Unit::GetCharmed
(cherry picked from commit d4ef2529e9)
2021-10-23 00:11:44 +02:00
Treeston
e4e8c1c59c Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans
(cherry picked from commit 042f5515e4)
2021-10-22 23:47:51 +02:00
Shauren
3e81db7b93 Core/Auras: Implemented SPELL_AURA_CAST_WHILE_WALKING_BY_SPELL_LABEL and SPELL_AURA_CAST_WHILE_WALKING_ALL 2021-10-16 18:44:59 +02:00
ModoX
68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Shauren
49eb3cf8fe Core/Spells: Implemented SPELL_EFFECT_TELEPORT_WITH_SPELL_VISUAL_KIT_LOADING_SCREEN 2021-10-13 11:49:30 +02:00
Shauren
8492c273dd Core/Spells: Implemented SpellReagentsCurrency.db2 2021-10-10 19:12:17 +02:00
Shauren
2965d201ab Core/Spells: Changed Spell::SendCastResult arguments to signed ints to match packet structure 2021-10-10 19:00:02 +02:00
ModoX
a048475cb0 Core/Spells: Implemented SpellValueMod duration (#26945) 2021-10-06 18:31:04 +02:00
Shauren
cbf1f2883a Core/Spells: Reduce number of CastSpell overloads to 1 2021-10-03 19:58:03 +02:00
Shauren
555b2d40ec Core/Spells: Send OriginalCastId in SMSG_SPELL_START and SMSG_SPELL_GO for triggered spells in 'game' project 2021-10-03 16:36:39 +02:00
Shauren
3af9be830d Core/Spells: Removed CastSpellExtraArgs constructors accepting ObjectGuid, they would become ambiguous with future changes 2021-10-03 14:58:35 +02:00
Treeston
f1ac141f25 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.

(cherry picked from commit 081eab3cf5)
2021-09-26 16:07:09 +02:00
Treeston
1493920495 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.

(cherry picked from commit 2a84562dc8)
2021-09-24 23:37:43 +02:00
Treeston
bc89e1cdb0 Core/Position: Refactor GetAngle -> GetAbsoluteAngle because code clarity is good.
(cherry picked from commit 4692e10ca2)
2021-09-23 22:21:29 +02:00
ariel-
a8226a1d67 Core/Spells: always initialize hitinfo aura
Ref 437c5c7b9d

(cherry picked from commit 07e42f7d41)
2021-09-19 22:21:04 +02:00
ariel-
c8d7289245 Core/Spells: fix delayed hit aura crash
Closes #21664

(cherry picked from commit 437c5c7b9d)
2021-09-19 22:19:22 +02:00
Meji
0a83f74876 Core/Achievements: Update CriteriaType enum (#26856) 2021-09-08 22:07:01 +02:00
ariel-
f420a439f9 Core/Spells: fix issues with delayed spells and auras
- Was losing info of delayed targets due to remove_if move-assigning targets, it needs to be saved into delayed target vector before returning from lambda
- Delayed auras applying on many targets are now handled gracefully

Closes #21609
Closes #21612

(cherry picked from commit 2828869844)
2021-09-06 20:40:42 +02:00
ariel-
5491b7f89f Core/Spells: only apply aura effects when needed. Fixes #21602
(cherry picked from commit abb602f7c1)
2021-09-06 20:10:16 +02:00
ariel-
b2de3efb4b Core/Spells: Fix some issues with channeled spells and aura duration mods
Closes #21584

(cherry picked from commit ac97655063)
2021-09-06 20:05:37 +02:00
ariel-
50fe2dc7e3 Core/Spell: fix LoS checks for GameObject spells
Closes #21580

(cherry picked from commit f7869ad38b)
2021-09-06 15:10:16 +02:00
Shauren
add2e6d212 Core/Spells: Avoid static analysis false positive 2021-09-05 23:04:33 +02:00
ariel-
60ff73eeba Core/Spell: fix SendSpellMiss requiring caster Unit
(cherry picked from commit 7f947646f9)
2021-09-05 22:48:28 +02:00
ariel-
a2ea26816e Core/Spell: fix target checks
- Aura will be applied at last moment possible (after damage) to prevent regressions on #18395
- Partial revert of 9b38a6352c as it wasnt handling correctly checks without spells

Closes #21578
Closes #21579
Closes #21581

(cherry picked from commit d6b9f148a7)
2021-09-05 22:43:48 +02:00
Shauren
8a4e1119ac Core/Spells: Unify spell effect access api in both branches 2021-09-04 15:13:15 +02:00
Shauren
3dd75a49b1 Core/Spells: Removed SpellEffIndex effIndex argument from spell effect handlers, it was commented out in almost every handler 2021-08-28 19:51:29 +02:00
Shauren
bc2c76a5b8 Core/Spells: Refactor building SMSG_SPELL_EXECUTE_LOG to not create 192 empty vectors on every spell cast 2021-08-28 18:30:45 +02:00
ariel-
962f6d7988 Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752

(cherry picked from commit 45c5e1b9d6)
2021-08-28 15:59:11 +02:00
ariel-
65dca120d3 Core/Spells: rework part 4: iterate over effects first
Ref #18395

Implement far spell queue processing
Closes #7395

(cherry picked from commit 080d2c6cd4)
2021-08-28 15:59:11 +02:00
ariel-
f3548d45d0 Core/Spells: rework part 3: spells only handle at most one UnitAura and one DynObjAura during its lifetime
Closes #15088

(cherry picked from commit e8d5aa56cc)
2021-08-28 15:59:11 +02:00
ariel-
52ae3c89d1 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

(cherry picked from commit 9b38a6352c)
2021-08-28 15:59:11 +02:00
ariel-
1e1415a491 Core/Spells: rework part 1: Improved positive detection logic
(cherry picked from commit efeae33495)
2021-08-28 15:59:11 +02:00
Traesh
fb6761c273 Core/Spells Implement targets 133, 134, 135 : TARGET_UNIT_LINE_CASTER_TO_DEST_*** (#26786) 2021-08-15 11:09:46 +02:00
Treeston
e47e95b6dc Core/VMap: Add outdoor state to Map::GetFullTerrainStatusForPosition. Add WorldObject::IsOutdoors, basic member access.
Ref #21479.

(cherry picked from commit e79c595b69)
2021-08-08 21:21:34 +02:00
Cannix
64234b35ed Core/Spells: Execute item casts immediately instead (#21396)
(cherry picked from commit 7e71b4535a)
2021-08-08 21:21:34 +02:00
Jeremy
69edf282fa Partial: Core/Entities: Reduce the probability of units dropping under the map (#21322)
Reduce the probabilty of going under the map

(cherry picked from commit 9e0faace9a)

Revert "Core/Entities: Reduce the probability of units dropping under the map (#21322)"

(cherry picked from commit 2dadbda24a)
2021-08-08 21:21:34 +02:00
ariel-
d91e099b10 Core/Spells: prevent creatures to focus channeled spells without SPELL_ATTR1_CHANNEL_TRACK_TARGET
- Creatures stuck here wouldn't try attacking because of this
- Remove one workaround in halion script, now it's unneeded

Ref #11311

(cherry picked from commit 29f7258dc8)
2021-06-21 12:47:03 +02:00
ariel-
5323a7d386 Core/Spells: fixed server being too overzealous with autoshot
- Interrupting it when casting another spell and switching targets

Ref #21390

(cherry picked from commit 93cbe815cb)
2021-06-21 00:06:41 +02:00
ariel-
13be704cb4 Core/Spells: implement SPELLVALUE_CRIT_CHANCE
(cherry picked from commit 546a605bd0)
2021-06-19 23:33:44 +02:00