Commit Graph
13932 Commits
Author SHA1 Message Date
Giacomo Pozzoni f1f1bc01ba Core/Movement: Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() on Gossip Hello (#24005)
Fix WaypointMovementGenerator ignoring EscortAI::SetEscortPaused() when talking to a NPC, scheduling a 3 minutes pause on the WaypointMovementGenerator even if it was already disabled with no timer, waiting for the player to select a gossip entry to resume the movement.

(cherry picked from commit a9e534762f2517a37d595cdfef527ab55b6339ba)
2021-12-21 00:46:32 +01:00
ForesterDev 9124fd1f1f Core/Items: implement some helper methods for easier readability (#24113)
(cherry picked from commit 573ddf4d22564d022e30807c5ba2c6eb1a2c8b2e)
2021-12-21 00:46:13 +01:00
Ovah 5c258c1bbd Core/Scripting: fixed build. Re-enable ModifyVehiclePassengerExitPos for CreatureScript to allow scripted creatures that already have an AI to benefit from its functionality as well
(cherry picked from commit f0485cea394a84e93ebacc24f3535d5eb14a4053)
2021-12-20 23:56:45 +01:00
Ovah 64fc549be8 Core/AI: call ModifyVehiclePassengerExitPos for CreatureScripts since the hook is available for that class as well
(cherry picked from commit ebf116e6a3381835fd2af885bd2721233485b684)
2021-12-20 23:56:31 +01:00
Ovah cdeb752941 Core/Movement: improved RandomMovementGenerator wait handling to get closer to retail behaivior (#24093)
* according to observations Blizzard is letting creatures do 2 up to 10 spline movements right after each other before waiting for a couple seconds

(cherry picked from commit 78c1216bcf60b9e376d9afd9484ff478bda641b1)
2021-12-20 23:47:37 +01:00
Kelno ce8c83ef6f Core/Maps: cosmetic correction on comment (#24096)
(cherry picked from commit d0efd76c92084a896c87a7df5be5d879ac7f3eca)
2021-12-20 23:47:37 +01:00
Ovahlord 606597f4f8 Core/Movement: reset position update interrupt info after the interrupt checks have been executed
* for discussion see: https://github.com/TrinityCore/TrinityCore/commit/02daf1bf3afc570c26e8e9f431866fcb3720174a#r36916229

(cherry picked from commit 01584cb0b9fe623fdf5694b985a53aa45f9f1d30)
2021-12-20 23:47:37 +01:00
Ovah 43a7091e8a Core/Movement: properly fix aura interrupts during movement (#24068)
We want our movement to be fully updated before even thinking about interrupting anything. The old logic was updating positions, interrupting stuff and afterwards updating movement generators. This way we were ending up with false interrupts.

properly fixes #22908

(cherry picked from commit 02daf1bf3afc570c26e8e9f431866fcb3720174a)
2021-12-20 23:47:23 +01:00
jackpoz 0ed58b0952 Core/MMaps: Handle path on same position
Handle path on the same polygon between 2 very close positions as a normal path.

(cherry picked from commit d293dd37822d93f9023d3ff9d39052ed976e236b)
2021-12-20 23:16:21 +01:00
Giacomo Pozzoni 1a070fd127 Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon (#24083)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon

Second try of handling paths on same poly in a better way than just building a shortcut

* Fix movement generators using paths with start/end positions far from mmap polygons

* Include flag PATHFIND_FARFROMPOLY even with a normal path if start or end were far away from mmap poly

(cherry picked from commit 67d9d04d63cc74196059646b2e57f50a4a4fd2ca)
2021-12-20 23:15:54 +01:00
NoName 5e267dda71 Core/Gameobject: Rename GO_STATE_ACTIVE_ALTERNATIVE to GO_STATE_DESTROYED (#24062)
* Step 1: Rename GO_STATE_ACTIVE_ALTERNATIVE to GO_STATE_DESTROYED

* Update src/server/shared/SharedDefines.h

Co-Authored-By: Trond B. Krokli <[email protected]>

Co-authored-by: Trond B. Krokli <[email protected]>
(cherry picked from commit 50d9d9196da90f7696cf83f07115df3d4880c879)
2021-12-20 23:13:47 +01:00
jackpoz 4bab876fe4 Core/PathGenerator: Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9
Temporarily revert 29bf280e3496cf13c24ccb20e37da29d3bfa74d9 since our recast implementation always expects a path to have different polygons.
A proper fix will be implemented later on, splitting a path with 1 single polygons in smaller steps in a similar way of how FindSmoothPath() works

(cherry picked from commit 9f8477cd112bf0f52e23afc9cdee4adfcf540de5)
2021-12-20 23:01:40 +01:00
NoName 37178ff311 Core/Spells: SPELL_AURA_48 implementation (#24054)
by xvwyh

(cherry picked from commit b3b7f0761d5605d57f9d62ca8e22a8cd9a4df24b)
2021-12-20 22:30:41 +01:00
Killyana ef794af489 Spell: "Fierce Lightning Stike" must hit only one target
(cherry picked from commit 89421422865b0d7743db22bb165bba0a3d8f2cfc)
2021-12-20 22:15:44 +01:00
Shauren 5d02739b98 Scripts: Fix rbac permission for skipping default boss sequencing check
(cherry picked from commit e660c8bc19198d9e2e912c5243498469f75b0ee6)
2021-12-20 21:40:47 +01:00
Kelno 45585b5305 Fixed PvP Combat timer never getting refreshed (#24058)
* Fixed PvP Combat timer never gets refreshed while meleeing

* Apply Treeston feedback

Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit 2b024e8fbff24b071217cd88f052fdeaa48b47ba)
2021-12-20 21:25:46 +01:00
Regigicas aa81d8979f Core/SAI: Fix SMART_ACTION_SET_MOVEMENT_SPEED behavior (#24059)
(cherry picked from commit 13696204368ed933695bc0b738905f545dcbc836)
2021-12-20 21:25:33 +01:00
xvwyh 9b79d1b410 Core/DynamicObjects: Restore the ability of DynamicObjects to be world objects which was accidentally removed in f0f4a620fb breaking Far Sight (#24046)
Fixes #17081

(cherry picked from commit d4ba47a76e71a0ac103a1ff9b892593bc9c6a67a)
2021-12-20 21:22:37 +01:00
Giacomo Pozzoni dd929665e5 Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon (#24036)
* Core/PathGenerator: Fix path generator returning shortcuts when start and end are on the same polygon

Fix path generator returning shortcuts when start and end are on the same polygon by handling this case as if start and end were on 2 different polygons. This will ensure BuildPointPath() gets called which calls FindSmoothPath(), making sure each step is not longer than SMOOTH_PATH_STEP_SIZE (4 yards)

* Change ingame cast error message to SPELL_FAILED_NOPATH from SPELL_FAILED_OUT_OF_RANGE if the generated path is too long

(cherry picked from commit 29bf280e3496cf13c24ccb20e37da29d3bfa74d9)
2021-12-20 20:35:37 +01:00
Shauren d44d218046 Core/Phasing: Delete old and unused enum 2021-12-19 18:12:28 +01:00
Shauren 68a25f5e9b Core/Scripts: Add missing implementation for samePhase argument of ScriptedAI::ForceCombatStopForCreatureEntry 2021-12-19 18:12:12 +01:00
ccrs d7571e5d1f Scripts/ICC: little bit of cleanup in Valithria after the "recent" changes
(cherry picked from commit 7ffe0185711095b0f62a5edf1e1819935d02851c)
2021-12-19 18:05:23 +01:00
Killyana 956a342845 Core/Movement: Remove a wrong set SetWalk from HomeMovementGenerator
(cherry picked from commit 9f057d708267935053d94bdded9ea9efc10d1dd3)
2021-12-19 17:44:10 +01:00
Killyana a7cf209428 Core/Creature: Clear creature focus after an evade
(cherry picked from commit a32aeceb0da5d691eb655e80eb9ea7b32fc44839)
2021-12-19 17:44:00 +01:00
Giacomo Pozzoni d095d4afe9 Fix fleeing speed to 66% run speed (#24025)
* Core/Movement: Fix fleeing speed to 66% run speed

Fix fleeing speed to 66% run speed until the creature starts returning home

* Fix build

* Don't check speed type

* Don't apply speed reduction twice

* Fix no-pch (1st try)

* Make sure every spell focus is interrupted when seeking assistance

(cherry picked from commit 4ccf01de3947f50629c20192da3f99cb8c693b35)
2021-12-19 17:39:25 +01:00
Killyana d946d74ff9 Core/AI: Fix creatures not updating their target properly once engaged
Closes  #21562

(cherry picked from commit 7fb74326205acbc5c0fa6b2aa9731d891e788d64)
2021-12-19 15:54:20 +01:00
Giacomo Pozzoni 8d32849b34 Core/MMaps: Fix charge underwater/falling (#24010)
* Core/MMaps: Fix charge underwater

Fix charge sometimes returning "no path available" when swimming/underwater.
Fix charge selecting a destination point 4 yards above swimming/underwater targets

* Allow falling units to charge targets that are below (lower Z coordinate)

* Disable "raycast" pathfinding as it's not blizzlike.

This might show some strange paths when charging with a target in front.
It also fixes some falling undermap issues.

This Reverts 272009ebee

* Remove Z offset when charging a target as it never made sense

(cherry picked from commit 88a14251e2765880e90cb41be7919cd39e3308e2)
2021-12-19 15:54:09 +01:00
Giacomo Pozzoni 292df30394 Core/Movement: Fix wrong orientation set when pausing movement (#23986)
* Core/Movement: Fix wrong orientation set when pausing movement

* Update MoveSpline.h

* Update Unit.cpp

(cherry picked from commit e698c17a2688385e62744cdf5eb37b12b9e304fa)
2021-12-19 15:48:43 +01:00
Killyana a09d5d4854 Creature/AI: Reset CoolDowns on evade
Closes  #24008

(cherry picked from commit cb11ad97fb9eb6202b54913b0f522eda4935d533)
2021-12-19 15:46:40 +01:00
Michael 72e61625bc additional output for additem command (#24006)
* additional output for additem command

when removing items with additem:

if the user provides an amount too large of a negative amount, the command will now output the amount of items that could not be destroyed.

* renamed sql file to hopefully avoid conflicts

* added clarification to failure string

* changed unneeded else if condition to else

* code style; braces

* Update and rename 9999_99_99_99_world.sql to 2019_12_28_01_world.sql

(cherry picked from commit 6b19f4a0ab1f77ea969a080a6eea0379baf9f8df)
2021-12-19 15:46:20 +01:00
jackpoz 2327ff4d6d Core/Movement: Fix fleeing speed to 66% run speed
Fix AssistanceMovementGenerator using 100% MOVE_RUN speed instead of 66% . Please note that the fleeing mechanic still has some open issues that this single commit doesn't fix

(cherry picked from commit 862d47394b8c879f42902f03ecd112b65ff631c2)
2021-12-19 15:34:20 +01:00
Giacomo Pozzoni b40cadd5a1 Core/Movement: Fix stunned falling units freezing the client (#24000)
(cherry picked from commit 8f94c9ef6b843f69d014b7e3a4b3b30e5d1515e4)
2021-12-19 15:33:57 +01:00
Keader b9def15aa7 Scritps/ICC: Fixed resistance calculation for Mutated Transformation (Professor Putricide) (#23858)
More Info in: #23837

(cherry picked from commit 9f7b464a6aa5b64bf5ec5c0f586853fbc71029c6)
2021-12-19 15:33:41 +01:00
Giacomo Pozzoni 96ec8477f0 Core/Creatures: Fix spell_school_immune_mask being applied against positive spells too (#23999)
(cherry picked from commit 18a4cbee5eb10cf0502ffae9c89ad468a2c58012)
2021-12-19 15:31:34 +01:00
Giacomo Pozzoni fda1630f74 Core/Spells: Fix Spellsteal stealing Silence buff of Arcane Torrent (#23992)
(cherry picked from commit 7920347f439b1c17805182a4f22d3b3b9f521a29)
2021-12-19 15:30:59 +01:00
Giacomo Pozzoni 1635a34228 Core/Movement: Add more LOS checks (#23991)
Add more LOS checks to ensure Units don't cross trees/walls when fleeing/moving

(cherry picked from commit 13ad8b66d9f4abcb55b4369a24d89d8cde3ca361)
2021-12-19 15:30:13 +01:00
Meji c4fee8c5cf Core/Spells: Implemented spell effect 204 (SPELL_EFFECT_CHANGE_BATTLEPET_QUALITY) (#27425) 2021-12-19 13:27:27 +01:00
jackpoz e6ac3316b7 Core/Map: Load the grid of TempSummons owned by Players
Ensure to load the grid of TempSummons owned by Players when the relocate to another cell

(cherry picked from commit afbc47891965f9c31c4b31c66931a2dbc9846f93)
2021-12-19 13:14:33 +01:00
Shauren e539de68e1 Core/Creatures: Fixed crash when guards get killed by periodic auras whose caster is offline or despawned
(cherry picked from commit 046e98bc5da89c31af9f68d18d78d8f8e9161f6a)
2021-12-19 13:12:30 +01:00
Giacomo Pozzoni 64eb65cd45 Core/Creature: Remove empty spell ids from CreatureAddon.auras vector
Close #23969

(cherry picked from commit f20265feafbf28f722338649740bd11a9e48f2e7)
2021-12-19 01:46:07 +01:00
jackpoz 73e7719dbf Core/Creature: Log an error for Creatures spawned with temporary auras
The errors still need to be addressed.
Close #23225

(cherry picked from commit 54f94567649c78d146f4087cc874e4d0cbcff28b)
2021-12-19 01:44:53 +01:00
Killyana 89edc84c23 Core/Log: Gameobjects may have faction template id = 0
Ref https://github.com/TrinityCore/TrinityCore/pull/22922

(cherry picked from commit 8b03fe95061f870efbe5352530c25a0175c4d8ee)
2021-12-19 01:36:54 +01:00
Killyana 5317d98e33 Tabs
(cherry picked from commit d8e12d826c300704d027970a93c5943798be8186)
2021-12-19 01:09:44 +01:00
Treeston a8e4add6cc Core/Spell: Reset threat to zero when the hunter use Feign Death
Closes #23874

(cherry picked from commit d4b00df78191bb0e6b79bc99e6ca7a2bf8091eba)
2021-12-19 01:09:30 +01:00
ccrs d967d03151 Core/AI: add another helper for "ScriptedAI::ForceCombatStop"
(cherry picked from commit 3842ab2781e4ca518d98d4f50566e42eeced18bf)
2021-12-19 01:05:59 +01:00
Giacomo Pozzoni 9bede687ce Core/GameObjects: Skip LoS checks for traps (#23936)
* Core/GameObjects: Skip LoS checks for traps

* Core/GameObjects: Fix spells cast by traps missing always

* Scripts/Spells: Fix WSG heal buff not healing

The WSG green heal buff is now cast by a GameObject so the spell target should be used to calculate the healing, not the GameObject.

(cherry picked from commit 909941e1b44250b0fa646d363af817f40ca48355)
2021-12-19 01:05:54 +01:00
Ovah e42aae1895 Fixed pets repositioning themselves after every cast (#23923)
(cherry picked from commit 4ddf7f59761df525e6ab5ef99175258a1d86101d)
2021-12-19 00:37:22 +01:00
Trond B. Krokli 3e835a77bb Core/Spells: add spell fix to Trained Rock Falcon (#23896)
fixed by sirikfoll

(cherry picked from commit 42f1861f3023af2eff66dc64e78164f3c480337e)
2021-12-18 23:43:49 +01:00
Shauren 22987b705b Core/PacketIO: Restrict CMSG_STANDSTATECHANGE to only allow the same stand states that client can send by itself
(cherry picked from commit 267bdde3232566e210659df47dc7580e676e9ee5)
2021-12-18 23:39:11 +01:00
ccrs 6443116d5b Scripts/ScarletMonastery: instance script cleanup (#23889)
Adapt InstanceScript into newer structure and style
Adapt existing boss scripts into newer structure and style
Improve existing boss related definitions

Should make each boss more functionally reliable, but nothing new has been added

(cherry picked from commit 06c6b30ed484850228c57313dc2c024c38e2055f)
2021-12-18 23:36:17 +01:00