Commit Graph

18194 Commits

Author SHA1 Message Date
jackpoz
dd825c5614 Core/Maps: Fix crash caused by setActive(false) called after DespawnOrUnsummon()
Fix crash caused by WorldObject::setActive(false) called after WorldObject::DespawnOrUnsummon() happening because the WorldObject would be set as not active but then Map::RemoveFromActiveHelper() would not be called because of not being in world anymore.
Whenever setActive() gets desync'd with what Map actually contains a rare crash would happen since Map only reads a few values of the active WorldObject, making it hard to reproduce. If this happens again some ASSERT calls should be added (or a check in Map::RemoveFromMap() could be added about if the WorldObject is in Map::m_activeNonPlayers container).

(cherry picked from commit 1c833f28e4)
2021-12-02 00:39:20 +01:00
Killyana
36e009baf2 Core: Restore reset in EscortAI::InitializeAI (#23197)
Closes  #23008

(cherry picked from commit 56b65329e5)
2021-12-02 00:39:20 +01:00
Jozef Dúc
b717603a9b Core/Object: Range check (#23179)
* Should solve #23062. All credits to @xvwyh

* Remove unused variables

* Remove unused variable

* Cast int32 to uint32

* Remove G3D headers from core header file

* Change door distance

* Update GameObject.cpp

Add newline

* Update GameObject.h

Indentation

(cherry picked from commit 32e1de39a2)
2021-12-02 00:39:20 +01:00
jackpoz
73c6c13ace Core/GameObject: Code cleanup
(cherry picked from commit 16a154c4e8)
2021-12-02 00:39:20 +01:00
Killyana
a18808212e Core/GameObject: Remove summoned gobs properly from the map without effecting other cases
Ref 0e8e3828f4
Ref #23115

(cherry picked from commit 9db64666dc)
2021-12-02 00:39:20 +01:00
ForesterDev
a2c0f6d321 Scripts/Commands: add some missing checks for .guild create command (#23201)
* Core/Conditions: implement CONDITION_GAMEMASTER

* Scripts/Commands: add some missing checks for .guild create command

(cherry picked from commit ae8750716f)
2021-12-02 00:39:20 +01:00
Keader
93a9ee9c12 Scripts/Trial of the Crusader: Fixed Resilience will Fix achievement
Broken by 2362e9c794

(cherry picked from commit f163c2f96a)
2021-12-02 00:39:20 +01:00
Killyana
62d3010e56 Core/GameObject: Delete summoned gobs and DestroyForNearbyPlayers gobs spawned with negative spawn time once the gob is deactivated
(cherry picked from commit 0e8e3828f4)
(cherry picked from commit 65afe47580)
(cherry picked from commit 21667f97cb)
2021-12-02 00:39:19 +01:00
Sorikoff
8f0afc81da Scripts/Scarlet Enclave: Unworthy Initiate (#23195)
(cherry picked from commit 4468a538ff)
2021-12-02 00:38:42 +01:00
Sorikoff
575bcc8c82 Scripts: Minor improvements to recently migrated scripts (#23189)
Ref: 2cfaeb1400
(cherry picked from commit 90d4254a87)
2021-12-02 00:37:00 +01:00
Keader
4b3e6b9998 Scripts/Spells: Fixed a console error inspell_dru_lifebloom
Closes #23192

(cherry picked from commit 961bc9d829)
2021-12-02 00:37:00 +01:00
Trond B. Krokli
001b9fb05c Core/conf: conf.dist typo & grammar corrections (#23190)
- Typo and spelling corrections
- Grammar corrections, English grammar
- Minor adjustments in example code readability
- Capitalization adjustments to keep consistency
  with existing idioms, phrases and concepts

(cherry picked from commit f9b1e4a032)
2021-12-02 00:37:00 +01:00
jackpoz
5600316c9f Core/Calendar: Improve calendar timezone handling
Improve calendar timezone handling by at least creating events with the correct time if both client and server are in the same timezone. There is currently no information received from the client about in which timezone it is.

(cherry picked from commit b33934f6ce)
2021-12-01 00:46:05 +01:00
Aokromes
dad95d16b2 Core/SmartScripts: Implement SMART_ACTION_PLAY_CINEMATIC
By Malcrom

(cherry picked from commit 63aa5d1e35)
2021-11-30 23:10:57 +01:00
jackpoz
b02143118f Core/Database: Delete gameobject_addon data when deleting a GameObject from the database
Close #23076

(cherry picked from commit f88a5b12bd)
2021-11-30 23:05:27 +01:00
Killyana
f98e82103f Spell/Script: Kill logs spam for spell_ioc_parachute_ic
Closes #23163

(cherry picked from commit c318b3e16d)
2021-11-30 22:41:16 +01:00
ccrs
171947fa62 Core/Movement: replace multiset::find with std::find in MotionMaster
same reasoning as 11de6b5
Container's find uses the defined custom comparator

(cherry picked from commit 6e011c974d)
2021-11-30 22:33:16 +01:00
ccrs
72301bf02f Core/Movement: implement and use new remove method in MotionMaster
All erases within MotionMaster are now done by itr.
Previous impl used value erase which uses the custom comparator which does not identify elements uniquely --> wrong values were deleted

ref #23187#discussion_r275791179

(cherry picked from commit 11de6b5f86)
2021-11-30 22:32:53 +01:00
Sorikoff
d72e809ecf Scripts/Spells: Migrate Some Scripted Spells to Scripts (#23185)
* Migrate spells to scripts

* Simplify code

* I need to sleep

* Update chapter1.cpp

* Use actual damage

* No need in null check here

(cherry picked from commit 2cfaeb1400)
2021-11-30 22:30:53 +01:00
Chaouki Dhib
c19a4db1c1 Core/Movement: Add time synchronisation (#18189)
(cherry picked from commit 975f1e364a)
2021-11-30 22:11:36 +01:00
ForesterDev
edd911b14d Core/Social: Separated checks for friend and ignored limits (#23181)
(cherry picked from commit 2a6eef76e2)
2021-11-30 20:58:49 +01:00
Shauren
21fefb3189 Core/GameObjects: Defined more GameObjectFlags and GameObjectDynamicLowFlags 2021-11-30 19:31:16 +01:00
Shauren
66225c27e4 COre/Misc: GCC warning fix 2021-11-29 12:11:24 +01:00
Shauren
4978750444 Warning fixes (log format in a809932f50) 2021-11-28 01:11:52 +01:00
Shauren
a809932f50 Core/Spells: Implemented spell effect 254 (SPELL_EFFECT_JUMP_CHARGE) 2021-11-28 00:05:38 +01:00
Shauren
684cd9d968 Core/Movement: Implement initializing parabolic splines using jump gravity instead of max parabolic height 2021-11-27 21:56:00 +01:00
jackpoz
aeece162b9 Core/MMaps: Fix crash added in 386b5a6fd9
(cherry picked from commit 17bb608a5e)
2021-11-27 01:40:13 +01:00
jackpoz
b4cff8159e Core/MMaps: Simplify d182e5f7e7 and handle PATHFIND_INCOMPLETE in ChaseMovementGenerator as "cannot reach the target"
(cherry picked from commit 386b5a6fd9)
2021-11-27 01:38:24 +01:00
jackpoz
bf1bf510fb Core/MMaps: Fallback to shortcut for flying units if Detour returned an incomplete path.
Fallback to shortcut for flying units if Detour returned an incomplete path. This is needed when a flying unit should fly to the floor below to reach the target, but since Recastnavigation doesn't support "jumping down" the unit would not find a path to the target.

(cherry picked from commit d182e5f7e7)
2021-11-27 01:38:11 +01:00
Giacomo Pozzoni
d37a8ea038 Core/Database: Close the MySQL connection only after getting the last error code
(cherry picked from commit 3230ca74d2)
2021-11-27 01:25:47 +01:00
Jozef Dúc
10fcfde78b Core/Creatures: Filter out trainer spells that belong to a skill that can never be learned by a player with given class and race combination (#23176)
Closes #23172

(cherry picked from commit f221fcdd4b)
2021-11-27 01:18:19 +01:00
PolarCookie
0bde06c402 Core support for breadcrumb quests (#23157)
* Breadcrumb quests support in core

* To Winterspring! & Starfall

* translating ZenoX92's list, part 1

* Carendin Summons is Blood Elf only

* Breadcrumb to an exclusive group

* translating ZenoX92's list, part 2

* class quests

* breadcrumb trails

* better prevquest check

* less harsh error warnings

* minor optimization

* Rename 9999_99_99_99_world.sql to 2019_04_10_00_world.sql

(cherry picked from commit 5ed77113b6)
2021-11-27 00:21:08 +01:00
Aokromes
2ed9d01efc Core/Spell: Move a log to category
(cherry picked from commit 1374658d72)
2021-11-26 22:44:18 +01:00
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
PolarCookie
fe0cff0cae Core: VehicleJoinEvent crash fix (#23136)
(cherry picked from commit 73e3fdc8b4)
2021-11-26 22:33:43 +01:00
Ovah
d5daa2ad49 Core/Objects: use the actual collision height of players and creatures to get more accurate liquid status results (#23070)
(cherry picked from commit b9e9ccf93c)
2021-11-26 22:24:07 +01:00
r00ty-tc
4c996bdf8b Core/GameEventMgr: Log error if loading GO/Creature into event that is part of pool - Only warn, still load the GO/Creature - These should be added to game_event_pool by pool ID instead
(cherry picked from commit 8bb88657f8)
2021-11-26 22:06:18 +01:00
Killyana
f7048afac1 Core: Remove wrong emotes played in combat
Ref #23152

(cherry picked from commit c52eb49f71)
2021-11-26 11:22:26 +01:00
Gustavo
b86a66c5be Core/Scripts: Fix Blood summon position (#23088)
* Core/Scripts: Fix Blood summon position

Updates #13162

(cherry picked from commit cc3293c002)
2021-11-26 11:21:24 +01:00
Gustavo
6aaf9aaf3b Core/Misc: Warning fixes (/W4) (#23149)
* Core/Misc: Warning fixes (/W4)

(cherry picked from commit 50f122de77)
2021-11-26 11:18:15 +01:00
Shauren
e538759dfd Build fix 2021-11-25 21:02:46 +01:00
Meji
b02f382ed7 Core/Trainers: Implemented learning battle pets from trainers (#27312) 2021-11-25 20:56:37 +01:00
Meji
93c668ac50 Core/BattlePets: Implemented BattlePetSpeciesFlags::NotAccountWide (#27303)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
2021-11-25 20:55:12 +01:00
ModoX
52824eedd3 Core/Spells: Use Unit::Kill instead of Unit::DealDamage for SPELL_EFFECT_INSTAKILL (#27316) 2021-11-25 19:25:38 +01:00
jackpoz
721f4c6032 Core/Misc: Fix static analysis issues
Fix static analysis issues spotted by Coverity Scan

(cherry picked from commit 750d89beed)
2021-11-24 23:45:36 +01:00
jackpoz
71cb10afe0 Core/Misc: Fix static analysis issues
Fix static analysis issues spotted by Coverity Scan

(cherry picked from commit a12ea482f3)
2021-11-24 23:45:27 +01:00
jackpoz
43a41caafb Core/Misc: Fix GCC 8 warnings
(cherry picked from commit 1d04a3b216)
2021-11-24 23:40:15 +01:00
sirikfoll
dc5cab3bf4 Core/GameObject: Properly dismount players on GameObject Use
Closes #23124

(cherry picked from commit dbfc6ce773)
2021-11-24 23:34:48 +01:00
ForesterDev
b26c2f5c13 Core/Conditions: implement CONDITION_GAMEMASTER (#23108)
(cherry picked from commit 262ddaf819)
2021-11-24 22:56:14 +01:00
PolarCookie
e182a38b01 Core/Item: Item Signature (#23119)
(cherry picked from commit a926a3088d)
2021-11-24 22:42:13 +01:00