Commit Graph

26288 Commits

Author SHA1 Message Date
Treeston
e398bb1664 AI/SmartAI: Move SMART_EVENT_RESPAWN invocation from ::InitializeAI() to ::JustAppeared(). Closes #23313.
(cherry picked from commit 37fc38b917)
2021-12-12 01:27:04 +01:00
Treeston
9f7d3ebd6a Core/AI: Remove EnterEvadeMode calls from Guardian/Summon spell handlers. Add follow logic to CreatureAI::JustAppeared. Closes #23270.
(cherry picked from commit 8499434340)
2021-12-12 01:27:04 +01:00
Treeston
f9b8fe686d Entities/Unit: Adjust an overzealous assert to not catch self references, and add the inverse assert too. 396f87c follow-up.
(cherry picked from commit aeed616c22)
2021-12-12 01:27:04 +01:00
Treeston
d10554da14 Entities/Unit: Fix an issue where Unit pointers could be left dangling if a channeled Charm was interrupted by a control aura application. Closes #23440.
(cherry picked from commit f4b06fd0b7)
2021-12-12 01:27:04 +01:00
Treeston
edc7583119 Entities/Unit: Cleanup all the direct accesses to m_unitMovedByMe. Refactor the field to be protected. Add assertions to catch dangling pointers.
(cherry picked from commit 396f87c30d)
2021-12-12 01:26:41 +01:00
Treeston
06823f19cd Core/Misc: Add static versions of GetGUID and ToX methods to Object. The static versions return Empty/nullptr for null objects.
(cherry picked from commit b3ee407707)
2021-12-12 00:46:03 +01:00
Treeston
f29644efd5 some more cleanup, a5f8c0d follow-up
(cherry picked from commit 00728cef15)
2021-12-12 00:33:36 +01:00
Treeston
e3411b4740 Core/Creature: Attach out-of-combat health regen to the Engaged system, not the Combat flag. Closes #21571.
(cherry picked from commit a5f8c0d30c)
2021-12-12 00:33:23 +01:00
Treeston
dabdad3b47 Core/Misc: Rename Unit::AttackedTarget to Unit::AtTargetAttacked to match naming scheme for these notifiers
(cherry picked from commit 632a300dd2)
2021-12-12 00:33:18 +01:00
Treeston
35e55f1089 Core/Entities: Kick engagement logic upstairs to Unit (from ThreatManager), since all Units with AI need it (not just those with threat list). Fixes #17981.
(cherry picked from commit dbe3bbefe7)
2021-12-12 00:31:15 +01:00
jackpoz
dd22c6fe67 Core/Misc: Code cleanup
(cherry picked from commit eeced9ae15)
2021-12-11 23:20:05 +01:00
zartech22
1c3c59d7fa Core/Instance : Fix instance resetting exploit (#23263)
* Push offline players out of instance

Push offline players out of instance when reseting dungeon with a raid mode group

* Add SQL request to character

Add a SQL request to update the position of a player in a specified map

* Teleport to graveyard instead

(cherry picked from commit 678e0e606a)
2021-12-11 23:12:27 +01:00
Sorikoff
799fba7fd1 Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind (#23463)
* Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind

* Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind"

This reverts commit a8055960

* Revert "Revert "Scripts/Spells: Portal to Orgrimmar & Portal to Stormwind""

This reverts commit a5be792b

* Fix NoPCH

* Clean up

* Clean up

* fixup! Clean up

* Caster -> Target

* Rename 9999_99_99_99_world.sql to 2019_06_22_01_world.sql

(cherry picked from commit ac7c72d633)
2021-12-11 23:01:46 +01:00
Sorikoff
aa407adf3e Scripts/Spells: Ultra-Advanced Proto-Typical Shortening Blaster (#23456)
* Scripts/Spells: Ultra-Advanced Proto-Typical Shortening Blaster

* Fix NoPCH

* Correct header

* fixup! Clean up

* Rename 9999_99_99_99_world.sql to 2019_06_22_00_world.sql

(cherry picked from commit 40b09e3df1)
2021-12-11 22:58:16 +01:00
Wyrserth
b709ea9a8d Core/RBAC: add permission that prevents accounts from earning all achievements or only realm firsts (#23459)
* Core/RBAC: add permission that prevents accounts from earning all achievements or only realm firsts.

* Kill evil spaces.

* Rename 9999_99_99_99_auth.sql to 2019_06_21_00_auth.sql

* Update auth_database.sql

(cherry picked from commit 8163ea60c8)
2021-12-11 22:47:08 +01:00
Sorikoff
8fc52bc5e5 Scripts/Spells: Migrate Teleporting to Script (#23458)
* Scripts/Spells: Migrate Teleporting to Script

* Rename 9999_99_99_99_world.sql to 2019_06_21_02_world.sql

(cherry picked from commit e9d803ccee)
2021-12-11 22:28:55 +01:00
Shauren
4595e63dd7 Core/Spells: Deleted old script (partial port of a4cd4d8b87) 2021-12-11 21:40:30 +01:00
Keader
ba606753bd Scripts/Icecrown Citadel: Fixed some bugs on Blood Orb object and trash mobs around him
Followup: 394b119664
(cherry picked from commit 3b0743ea67)
(cherry picked from commit f9a366628a)
2021-12-11 21:37:53 +01:00
Killyana
2aca19a079 DB/Quest: "Where Kings Walk" and "Warchief's Blessing"
The script was deleted by 5f928f7949 But it wasn't done properly via the spell_area anyway

(cherry picked from commit 8d6295559d)
2021-12-11 21:34:48 +01:00
Killyana
0993b491dd DB/Quest: A Visit With The Ancestors
Closes #23284

(cherry picked from commit a3dec9068b)
2021-12-11 16:32:05 +01:00
Wyrserth
07dcb28f80 Spell/Fishing: ensure that the fishing bobber expires when the Fishing channeling ends, and don't allow fish to be hooked in the instant the spell is cast. (#23448)
(cherry picked from commit 9083fc149d)
2021-12-11 16:18:57 +01:00
Wyrserth
bfef73b510 Core/Loot: don't allow to regenerate chest loot inside instances and raids. (#23449)
(cherry picked from commit 4320cd7d37)
2021-12-11 16:18:41 +01:00
Shauren
3d3d255a47 Core/Conditions: Sync CONDITION_QUEST_OBJECTIVE_PROGRESS implementation with 3.3.5 2021-12-11 16:13:45 +01:00
Wyrserth
a032d84cf4 Core/FlightPath: teleport players at destination on floor Z when the flight ends (#23428)
* Core/FlightPath: teleport players at destination on floor Z when the flight ends, instead of having them fall from the air.

Closes #10051.

* Use the path destination's mapheight instead of the player position's.

* Update FlightPathMovementGenerator.cpp

(cherry picked from commit 6a0a800535)
2021-12-11 16:05:31 +01:00
Wyrserth
5331656785 Core/SAI: allow to start waypoint movement for a creature that is in combat. (#23426)
(cherry picked from commit d6e3660115)
2021-12-11 15:29:32 +01:00
DanVS
f15bcebdbe Core/Spell: Jump Speed Calculations (#22886)
* Jump Speed Calculations

* Fix

(cherry picked from commit 0197a2f990)
2021-12-11 15:25:57 +01:00
Wyrserth
2bcfc6680c Core/Misc: don't allow FindNearestCreature() and FindNearestGameObject() searches to return the entity that called them. (#23437)
Closes #23334.

(cherry picked from commit 015870bfe1)
2021-12-11 15:14:43 +01:00
Keader
b3493935b6 Core/Scripts: Fixed a reference error introduced in 394b119664
(cherry picked from commit 70cbedd75d)
2021-12-11 14:56:14 +01:00
Keader
f749b3a2e9 Scripts/Icecrown Citadel: Fixed Blood Orb Game Object (#23397)
Close #18005 and Update #18529

(cherry picked from commit 394b119664)
2021-12-11 14:55:18 +01:00
Sorikoff
c8d0e0fd6d Scripts/Isle of Quel'Danas: Thalorien Dawnseeker (#23382)
* Scripts/Isle of Quel'Danas: Thalorien Dawnseeker

* Kill warning

* Kill warning

* Fixes

* Code style

* Code style

* Accident

* Prevent Out of Bound & spelling

(cherry picked from commit e87f8b1aac)
2021-12-11 14:51:31 +01:00
Wyrserth
7745e3f943 Core/SAI: add cooldownMin (event_param2) and cooldownMax (event_param3) to SMART_EVENT_ACCEPTED_QUEST and SMART_EVENT_REWARD_QUEST. (#23422)
(cherry picked from commit 50be697e1f)
2021-12-11 14:14:10 +01:00
Wyrserth
4c5ae42a63 Core/Creature: drop current target when evading while a spell cast is in progress (#23420)
* Core/Creature: drop current target when evading while a spell cast is in progress.

Closes #18373.

* Update Creature.h, thanks jackpoz!

(cherry picked from commit 5ac9b20fcf)
2021-12-11 14:13:53 +01:00
Wyrserth
e846d4c3ef Core/SAI: don't allow to start a new SAI actionlist while the entity is already running one. (#23421)
(cherry picked from commit 2b1cde2560)
2021-12-11 14:13:11 +01:00
Wyrserth
ae43820ca0 Core/Commands: implement commands to look up a map/item/quest name for a given id (#23416)
* Core/Commands: implement commands to look up a map/item/quest name for a given id.

* Add entry to updates table.

* Rename 9999_99_99_99_auth.sql to 2019_06_16_00_auth.sql

* Add missed change, thanks jackpoz!

* Update auth_database.sql

(cherry picked from commit ce3dcdcb1a)
2021-12-11 14:12:54 +01:00
Wyrserth
01be9f44af Core/RDF: fix counting issue with the achievement Looking for More (and similar) (#23418)
* Core/RDF: allow the achievement Looking for More (and similar) to increase the counter based on how many random players were picked.

* Use getter/setter instead.

(cherry picked from commit 14c2bdc5da)
2021-12-11 14:12:54 +01:00
Wyrserth
3278f87789 Core/Loot: fix some other cases where a creature should not be able to set focus. (#23415)
(cherry picked from commit d50be8e020)
2021-12-11 14:12:54 +01:00
jackpoz
134fa22510 Core/Unit: Ignore On Transport spline movements if the Unit isn't on a transport anymore
On Transport splines use coordinates relative to the transport but if the transport is not found anymore than there is no way to get the absolute coordinates, leading to relative coordinates being used as absolute instead. The result is a Unit being set at position (0, 0, 0) or close by.

(cherry picked from commit c90f789eac)
2021-12-11 14:12:54 +01:00
jackpoz
0c1f707ca5 Core/Misc: Change some logs from INFO to ERROR when loading invalid creature template resistances and spells
(cherry picked from commit 078c5a3e18)
2021-12-11 14:12:53 +01:00
jackpoz
2d7ec53330 Core/Player: Fix teleporting FlyPath dismounting the player
Issue added in 72fc79a9e6

(cherry picked from commit 4019cae375)
2021-12-11 14:12:53 +01:00
Wyrserth
ef4d4e3d98 Core/Loot: make Loot::AddItem() honor LootItem::AllowedForPlayer() so that items that cannot be looted don't prevent skinning. (#23408)
(cherry picked from commit a1b2aa97fc)
2021-12-11 14:12:53 +01:00
Wyrserth
1c8f94a14f Core/Loot: implement automatic pass in group loot for items that cannot be looted. (#23413)
(cherry picked from commit 00fdf6e99a)
2021-12-11 14:12:52 +01:00
Wyrserth
59da957165 Core/Spells: don't allow spells with SPELL_EFFECT_CREATE_LOOT to be cast if there isn't enough space in inventory (#23404)
* Core/Spells: don't allow spells with SPELL_EFFECT_CREATE_LOOT to be cast if there isn't enough space in inventory,

* Move GetFreeInventorySpace() to a better place, thanks ccrs!

(cherry picked from commit 218055280a)
2021-12-11 13:29:39 +01:00
Wyrserth
264373bb65 Core/Creature: prevent dead creatures from setting a focus target, so they won't turn when hit by certain spells. (#23367)
(cherry picked from commit 0a24a6571b)
2021-12-11 13:06:44 +01:00
Giacomo Pozzoni
7a8d15d63b Core/CreatureTemplate: Outsourced resistances and spells into creatur… (#23343)
* Core/CreatureTemplate: Outsourced resistances and spells into creature_template_spell and creature_template_resistance

* Rename 2019_99_99_00_world.sql to 2019_06_15_01_world.sql

(cherry picked from commit d5fb0a30ec)
2021-12-11 13:06:25 +01:00
Wyrserth
cc141e9bad Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes (#23398)
* Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes.

* Add #23396 to make testing easier.

* Prioritize assistants in raids.

* Fix dumb mistake and apply suggested change, thanks VincentVanclef and jackpoz!

(cherry picked from commit e906a2fe7d)
2021-12-11 13:06:25 +01:00
Wyrserth
7b346bcf8d Core/Loot: fix some issues with master loot and don't allow players to see soulbound recipes that they already learned in the loot window. (#23410)
(cherry picked from commit e6ad9b10cf)
2021-12-11 13:06:25 +01:00
Giacomo Pozzoni
4e7727d575 3.3.5 game event respawn (#23391)
* Core/GameEvent: Remove respawn times of Creature and GameObjects when starting/stopping an event

* Add checks for pool

* Remove the check for pools

(cherry picked from commit 678f3dd687)
2021-12-11 13:06:13 +01:00
Wyrserth
6b7bc82641 Core/Spell: allow Northrend Inscription Research to unlock three recipes the first time it is cast. (#23401)
Also prevent double skill-up because of duplicate UpdateCraftSkill() calls.

(cherry picked from commit 2315d43b2c)
2021-12-11 12:06:54 +01:00
Giacomo Pozzoni
920a18c062 Core/Misc: Fix static analysis issues reported by Coverity Scan
(cherry picked from commit df92ceb9bc)
2021-12-11 12:03:43 +01:00
Wyrserth
81a8366ce5 Core/Player: allow AutoStoreLoot to specify if the looted item should be shown as if created by the player. (#23400)
(cherry picked from commit 8d53d16d16)
2021-12-11 12:03:31 +01:00