Commit Graph

27608 Commits

Author SHA1 Message Date
jackpoz
c93d6856c7 Core/Unit: Fix crash when exiting a vehicle
Ref #25649

(cherry picked from commit b84b925063)
2022-03-06 20:01:38 +01:00
jackpoz
730a8da9e9 Core/Unit: Set stand state on damage only to players
(cherry picked from commit 4cc1f85067)
2022-03-06 20:01:25 +01:00
offl
ca76786faf Core/Scripts: Move some speed values & UNIT_FLAG_NOT_SELECTABLE to DB
(cherry picked from commit 3cb70ee62a)
2022-03-06 20:01:06 +01:00
offl
38476e51e7 DB/GameObject: Matrix Punchograph
Closes #25881

(cherry picked from commit e5518b53fa)
2022-03-06 19:41:58 +01:00
offl
cdd2875649 DB/Creature: Remove UNIT_FLAG_PACIFIED
Ref #25764

(cherry picked from commit a9c83d5566)
2022-03-06 19:39:10 +01:00
jackpoz
3886c82d0f Scripts/EoE: Attempt to fix players getting stuck after dying
Attempt to fix players getting stuck after dying caused by a hack that calls SetControlled(true, UNIT_STATE_ROOT) by calling the opposite when a dead player leaves the instance, i.e. on releasing.
Close #24458

(cherry picked from commit dc21ac342e)
2022-03-06 19:00:26 +01:00
Giacomo Pozzoni
a4a3e2e759 Core/Creature: Allow to skip Rate.Corpse.Decay.Looted when calling SetCorpseDelay() (#25989)
Add a second parameter to SetCorpseDelay() that specifies if Rate.Corpse.Decay.Looted setting should be ignored, false by default (aka don't ignore by default).
Add a second parameter to SMART_ACTION_SET_CORPSE_DELAY to specify if Rate.Corpse.Decay.Looted should be included, false by default (aka ignore by default).

(cherry picked from commit d5fc86af8b)
2022-03-06 18:59:38 +01:00
Giacomo Pozzoni
1ec33095e6 Core/Warden: Send Lua checks only when ingame (#25977)
(cherry picked from commit 3e6b3f88b0)
2022-03-06 18:54:04 +01:00
Matan Shukry
e93ef06b05 Core/Commands: Implemented command to teleport character to npc
Closes #25870

(cherry picked from commit d2be584f99)
2022-03-06 16:37:42 +01:00
offl
8e9e15629f Core/Scripts: Verify & migrate spell school immunities to DB
Some already are stored in DB. Looks like they all are still valid for master

(cherry picked from commit 1ed79d7a2e)
2022-03-06 16:30:51 +01:00
Giacomo Pozzoni
4c30b2a182 Core/SAI: Add new action SMART_ACTION_SET_HEALTH_PCT (#25932)
* Core/SAI: Add new action SMART_ACTION_SET_HEALTH_PCT

Add new action SMART_ACTION_SET_HEALTH_PCT (142) with one single parameter "percent" to set the Unit health.
Close #25317

* Do not allow 0%

(cherry picked from commit 7d6f7e4d19)
2022-03-06 01:43:57 +01:00
Meji
23d77ecb81 Core/Spells: Fixed spell effect 43 (SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER) (#25945)
(cherry picked from commit 28353e920b)
2022-03-06 01:38:14 +01:00
Giacomo Pozzoni
a66b968f91 Core/Misc: Fix static analysis issues (#25924)
* Core/Misc: Fix static analysis issues

* Fix infinite loop in ".debug send opcode"
Fix using uninitialized memory in ".debug send opcode"

(cherry picked from commit 661f554b9e)
2022-03-06 01:35:01 +01:00
jackpoz
4e3d23188e Scripts/Commands: Improve ".debug objectcount"
Include the number of SetActive objects in ".debug objectcount" command

(cherry picked from commit d0231c5a8f)
2022-03-06 01:23:14 +01:00
Giacomo Pozzoni
5180abfb19 Core/Creature: Add new db field InteractionPauseTimer (#25880)
* Core/Creature: Add new db field InteractionPauseTimer

Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer)

* Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value

* Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer

* Handle InteractionPauseTimer set to 0 as "don't stop at all"

* Implement InteractionPauseTimer in creature_movement_override

creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature)

* Read default InteractionPauseTimer from worldserver.conf

* Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql

(cherry picked from commit a22bc236eb)
2022-03-06 00:56:46 +01:00
Jan Van Buggenhout
dbf528be69 Core/Misc: Fix typo in SendAuthWaitQue method name (#25887)
(cherry picked from commit a832a1fe90)
2022-03-06 00:31:02 +01:00
Jan Van Buggenhout
9df5eb27e0 Core/Misc: Update WorldSocket::OnRead to WorldSocket::ReadDataHandler in comments and logging (#25885)
(cherry picked from commit ec689e7908)
2022-03-06 00:27:11 +01:00
Giacomo Pozzoni
c2068bd423 CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts (#25832)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 9af6bf15aa)
2022-03-06 00:24:04 +01:00
offl
1d09bd112a DB/Creature: Remove UNIT_FLAG_STUNNED in more cases
Ref #25764

(cherry picked from commit 7b79adf5b1)
2022-03-06 00:05:49 +01:00
xvwyh
2a595d55b2 Core/Spells: Correct swapped TARGET_UNIT_NEARBY_ALLY and TARGET_UNIT_NEARBY_PARTY (#25837)
* Update SharedDefines.h

* Update SpellInfo.cpp

(cherry picked from commit 7c6d92012a)
2022-03-05 23:51:50 +01:00
Trond B. Krokli
5159a11241 Update LootMgr.cpp (#25849)
Typo correction for console & log output `>> Loaded reference loot templates in %u ms`

`refence` --> `reference`

(cherry picked from commit cf5f360299)
2022-03-05 23:51:04 +01:00
Jinnaix
53eebf39f3 Scripts/Diremaul - Dire Maul crystal and forcefield fix (#25332)
* Scripts/Diremaul
Diremaul Crystal and Forcefield fix

* Apply suggestions from code review

Apply suggestions

Co-authored-by: MaxtorCoder <warsongkiller.s8@gmail.com>

* Fix stuff

* _private member

* use std array instead of c-arrays and standartized guid container namings

* Process feedback

* finalize

* blubb

* small changes

* whoops

* Process feedback

* Missing include

* Process feedback

* Apply suggestions from code review

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>

* remove unused field

Co-authored-by: MaxtorCoder <warsongkiller.s8@gmail.com>
Co-authored-by: Ovah <dreadkiller@gmx.de>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 26002c530f)
2022-03-05 23:09:23 +01:00
Giacomo Pozzoni
6b242eee13 Core/Unit: Fix movement hiccups in water (#24020)
* Core/Unit: Allow to define Units which can enter water but cannot swim

Allow to define Units which can enter water but cannot swim, i.e. crabs walking at the bottom of a sea.

* Add UNIT_FLAG_SWIMMING to creatures when entering combat

* Fix charmed creatures not entering water

* Always allow Creatures controlled by players to enter water

* Add swimming flag when possessing a unit and remove it properly at the end, even if the creature engaged combat before and after.
When adding/removing UNIT_FLAG_SWIMMING manually calling Creature::RefreshSwimmingFlag(true) might be required.

(cherry picked from commit fc1a0d9368)
2022-03-05 23:04:24 +01:00
offl
701a3927c1 DB/Creature: Remove remaining UNIT_FLAG_PACIFIED part 1
Ref #25764

(cherry picked from commit 95a2b906b0)
2022-03-05 22:42:48 +01:00
wotlk-enthusiast
850d60c4b3 Scripts/Utgarde Pinnacle: Svala Sorrowgrave Intro and Ritual of the Sword (#24503)
* Scripts/Svala SorrowGrave - Fix broken intro event and Ritual of the Sword

* Added missing header for non-PCH build.

* Added error checking for Svala's targeting, and tightened up the timing on the intro event.

* Update WorldDB\Creature_Template_Movement for Svala

* Fix movement during intro and ritual event

* Rename SQL file for merge

Co-authored-by: Carbenium <carbenium@outlook.com>
(cherry picked from commit a225717b99)
2022-03-05 22:39:32 +01:00
offl
08782f4f8a DB/Creature: Add UNIT_FLAG2_UNK1 (CREATURE_DIFFICULTYFLAGS_2_HIDE_BODY)
(cherry picked from commit 27722d42ef)
2022-03-05 22:21:25 +01:00
Mikhail Redko
f258d2443f Scripts/Spells: Implement effect "Party Time" & Add Rejuvenation when eating Deviate Fish (#25802)
* Scripts/Spells: Implement effect "Party Time" & Add Rejuvenation when eating Deviate Fish

* Rename XXXX_XX_XX_XX_world.sql to 2021_01_06_08_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit a9db8a9b9a)
2022-03-05 22:19:26 +01:00
Treeston
d8de3ac118 Core/Warden: Max packet size 500 -> 450
(cherry picked from commit de33d50c19)
2022-03-05 21:47:08 +01:00
Mikhail Redko
81555a8ea4 Core/Misc: Remove unneeded null-terminator after switch from wchar_t to std::wstring in 309851e. Fixes creation characters with declined russian names (#25797)
Closes #23775

(cherry picked from commit eaa22b8a17)
2022-03-05 21:46:57 +01:00
Shauren
8514164d43 Core/Proto: cleanup double newlines in generated code 2022-03-05 21:13:29 +01:00
Kargatum
373ed8f46b Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf

(cherry picked from commit a32b6b8ac4)
2022-03-05 20:07:57 +01:00
Aurelio Arcabascio
05a9b2d2cb Core/Player: auto-attacked player stands up from sit or sleep state (#25684)
* Fixed Auto Attack bug on sitting player

* Victim now stands during sleep and stand emotes

(cherry picked from commit 4ea64b515a)
2022-03-05 19:41:18 +01:00
Treeston
5b9fec5f0b Core/Maps: Move some more Map internals to actually be... internals.
(cherry picked from commit 94c03b2107)
2022-03-05 17:12:51 +01:00
Treeston
b5f3a6fd80 Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these.
(cherry picked from commit 803dc789e4)
2022-03-05 17:12:23 +01:00
Giacomo Pozzoni
da0d9ee283 Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance (and other SMART_ACTION_CAST fixes) (#25778)
* Core/SAI: Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance

Fix SMART_EVENT_FLAG_NOT_REPEATABLE flag being ignored when specifying a chance, always making the action trigger.

* Fix SMART_ACTION_CAST with SMART_EVENT_FLAG_NOT_REPEATABLE not casting the spell at all if rolled chance was successful but creature couldn't cast the spell

* Prevent linked actions if SMART_ACTION_CAST couldn't be completed and will be retried later

(cherry picked from commit 96b289cadb)
2022-03-05 17:11:58 +01:00
Treeston
a8d00ddd69 Core/Maps: move pooling hand-off outside of Map::CheckRespawn (PR#25785)
fixes #25777

(cherry picked from commit f8afcec9f3)
2022-03-05 17:07:46 +01:00
jackpoz
abbac041bf Scripts/ICC: Fix teleporter not removing players from Gunship
A more generic solution might be better, maybe depending on spell flags

Ref #25652

(cherry picked from commit 0ad1854d1c)
2022-03-05 17:03:54 +01:00
Giacomo Pozzoni
30ebecc0de Core/Maps: Attempt to fix picking the wrong min height (#25771)
Close #25652

(cherry picked from commit aabd2b49e2)
2022-03-05 17:03:14 +01:00
jackpoz
90a05037cf Core/Maps: Partially revert 0c69316714
Revert define to constexpr as this also broke some calculations

(cherry picked from commit ed1c0b6ec9)
2022-03-05 17:03:02 +01:00
jackpoz
bea8894bce Core/Maps: Partially revert 0c69316714
The development will continue in a PR

(cherry picked from commit 1e3d85e283)
2022-03-05 17:02:38 +01:00
jackpoz
26962127a5 COre/Misc: Remove whitespace
(cherry picked from commit 01b1f20d3e)
2022-03-05 17:02:30 +01:00
jackpoz
c14f4dc835 Core/Maps: Use the same logic to calculate grid coords to avoid mismatches
Use the same logic of (CENTER_GRID_ID - x / SIZE_OF_GRIDS) in GridMap::getMinHeight() as Map::GetGrid() to avoid coord grid mismatches caused by floating point precision, i.e. getting the wrong grid.
Replace defines with constexpr in grids to make debugging easier.

Closes #25652

(cherry picked from commit 0c69316714)
2022-03-05 17:02:19 +01:00
jackpoz
13bf0e71b9 Scripts/Commands: Include map min height in ".gps" command
(cherry picked from commit 9994459bd1)
2022-03-05 17:01:36 +01:00
offl
c6df84da70 Core/Scripts: Add missing spells to Black Morass
(cherry picked from commit f62306f52d)
2022-03-05 16:59:14 +01:00
offl
c7f64a70a0 DB/Spell: Add effects to more spells from Violet Hold
Turned out almost all spells from BM were copied to create Violet Hold. Not only serverside spells and not only their effects but also attributes and icons. The scripts were also copied, possibly unchanged

(cherry picked from commit 8ca575ed52)
2022-03-05 16:58:55 +01:00
Ovah
dde5a3e326 Core/SAI: implement new smart actions to change AI Animkits and to enable/disable hover movement (#25623)
SMART_ACTION_SET_HOVER (parameter1: enable/disable)

* added SMART_ACTION_SET_AI_ANIM_KIT as immediately deprecated

(cherry picked from commit b7ba856b63)
2022-03-05 16:46:42 +01:00
Gildor
6b681ebc8a Core/Visibility: Split BG/Arena visibility settings (#25690)
(cherry picked from commit 8217519ea2)
2022-03-05 16:25:30 +01:00
offl
2e7277ada4 Core/Scripts: Add missing spells to Violet Hold
(cherry picked from commit bb94aec975)
2022-03-05 16:21:22 +01:00
Treeston
57f382d91c Game/ChatCommands: Make sure ChatHandler::extractPlayerTarget populates the strtok buffer for non-nullptr returns. Closes #25692, supersedes #25698.
(cherry picked from commit c8c572d980)
2022-03-05 01:02:18 +01:00
jackpoz
362a1c32c2 Core/Movement: Add a debug log when a player falls below the map
(cherry picked from commit 1c08395e8a)
2022-03-05 00:56:56 +01:00