Commit Graph

10440 Commits

Author SHA1 Message Date
Giacomo Pozzoni
7d6f7e4d19 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%
2021-01-25 21:27:57 +01:00
Meji
28353e920b Core/Spells: Fixed spell effect 43 (SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER) (#25945) 2021-01-25 18:40:34 +01:00
Giacomo Pozzoni
661f554b9e 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"
2021-01-24 16:04:47 +01:00
jackpoz
d0231c5a8f Scripts/Commands: Improve ".debug objectcount"
Include the number of SetActive objects in ".debug objectcount" command
2021-01-23 15:54:25 +01:00
Giacomo Pozzoni
a22bc236eb 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
2021-01-22 19:48:50 +01:00
Jan Van Buggenhout
a832a1fe90 Core/Misc: Fix typo in SendAuthWaitQue method name (#25887) 2021-01-18 17:35:35 +01:00
Jan Van Buggenhout
ec689e7908 Core/Misc: Update WorldSocket::OnRead to WorldSocket::ReadDataHandler in comments and logging (#25885) 2021-01-18 17:27:36 +01:00
Jan Van Buggenhout
c7e03e4cef Core/PacketIO: Change size of SMSG_AUTH_CHALLENGE WorldPacket from 37 to 40 in WorldSocket::HandleSendAuthSession (#25886) 2021-01-18 17:23:41 +01:00
Matan Shukry
cdfa85957e Core/logs: added xp info on login & logout (#25867)
* Core/logs: added xp info on login & logout

* - Moved getters to header
- Changed %s to %u

(cherry picked from commit bb24c6a11b)

# Conflicts:
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Server/WorldSession.cpp
2021-01-17 17:45:00 +01:00
Shauren
ee330be5c8 Build fix
(cherry picked from commit 28d470c50e)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
2021-01-17 17:29:59 +01:00
jackpoz
1939736060 Core/Spells: Defined new spell attributes
(cherry picked from commit b2ddf547ff)

# Conflicts:
#	src/server/game/Miscellaneous/SharedDefines.h
2021-01-17 17:29:54 +01:00
xvwyh
7c6d92012a Core/Spells: Correct swapped TARGET_UNIT_NEARBY_ALLY and TARGET_UNIT_NEARBY_PARTY (#25837)
* Update SharedDefines.h

* Update SpellInfo.cpp
2021-01-14 10:41:03 +01:00
Trond B. Krokli
cf5f360299 Update LootMgr.cpp (#25849)
Typo correction for console & log output `>> Loaded reference loot templates in %u ms`

`refence` --> `reference`
2021-01-14 10:16:12 +01:00
Giacomo Pozzoni
fc1a0d9368 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.
2021-01-10 10:18:51 +01:00
Treeston
de33d50c19 Core/Warden: Max packet size 500 -> 450 2021-01-04 23:52:50 +01:00
Shauren
8d450f3f07 Core/Commands: Add .reload vehicle_template
(cherry picked from commit 4ca15ec065)

# Conflicts:
#	sql/base/auth_database.sql
#	src/server/game/Accounts/RBAC.h
2021-01-03 22:51:53 +01:00
Sevi
6392d9ac48 Core/Vehicles: add a way to delay the Vehicle despawn Time if its needed.
* New database table `vehicle_template` holds info for despawn delay with option to extend it in the future

(cherry picked from commit c7b10d3c5f)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Vehicle/Vehicle.cpp
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Globals/ObjectMgr.h
2021-01-03 22:10:55 +01:00
Kargatum
a32b6b8ac4 Core: whitespace cleanup, reduce double blank line to single (#25795)
* Core/Misc: fix double empty line

* worldserver.conf
2021-01-03 11:47:07 +01:00
Aurelio Arcabascio
4ea64b515a 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
2021-01-02 19:10:26 +01:00
Treeston
94c03b2107 Core/Maps: Move some more Map internals to actually be... internals. 2021-01-01 04:03:52 +01:00
Treeston
803dc789e4 Core/Maps: All RespawnInfo* handed to outside code are now RespawnInfo const*, to signify that outside code has zero business changing these. 2020-12-31 18:57:18 +01:00
Shauren
7d70fbc64c Core/RBAC: Reserve permission id 2020-12-31 12:52:31 +01:00
Giacomo Pozzoni
96b289cadb 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
2020-12-30 21:18:00 +01:00
Treeston
f8afcec9f3 Core/Maps: move pooling hand-off outside of Map::CheckRespawn (PR#25785)
fixes #25777
2020-12-30 21:08:22 +01:00
Giacomo Pozzoni
aabd2b49e2 Core/Maps: Attempt to fix picking the wrong min height (#25771)
Close #25652
2020-12-28 12:36:52 +01:00
Sevi
a843d8b10c Core/Vehicles: Add missing caster guid check
Merges #25773

(cherry picked from commit e26122dc54)
2020-12-28 11:55:55 +01:00
Shauren
7817f18c24 Core/Vehicles: Treat entering other vehicles mounted on main vehicle as swapping seats
(cherry picked from commit 110564e757)
2020-12-28 11:55:55 +01:00
Shauren
fe89e835fb Core/SmartAI: Reserve a param for SMART_ACTION_SOUND master branch specific functionality, for compatibility reasons 2020-12-27 22:28:27 +01:00
jackpoz
ed1c0b6ec9 Core/Maps: Partially revert 0c69316714
Revert define to constexpr as this also broke some calculations
2020-12-27 20:22:35 +01:00
jackpoz
1e3d85e283 Core/Maps: Partially revert 0c69316714
The development will continue in a PR
2020-12-27 19:33:52 +01:00
jackpoz
01b1f20d3e COre/Misc: Remove whitespace 2020-12-27 19:28:31 +01:00
jackpoz
0c69316714 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
2020-12-27 18:24:53 +01:00
Ovah
527db2170b Core/Units: do not send power update packets when gaining power via energize spell effects to match retail behavior (#25599)
This fixes possible clientside visual issues where power is being added twice until the next update_object packet is being sent
2020-12-27 00:05:37 +01:00
Ovah
b7ba856b63 Core/SAI: implement new smart actions to change AI Animkits and to enable/disable hover movement (#25623)
* Core/SAI: implement new smart actions to change AI Animkits and to enable/disable hover movement for units

SMART_ACTION_SET_AI_ANIM_KIT (parameter 1: animKitId)
SMART_ACTION_SET_HOVER (parameter1: enable/disable)

* Update SmartScriptMgr.cpp

* Update SmartScript.cpp

* removed SMART_ACTION_SET_AI_ANIM_KIT since it's reserved for master
2020-12-26 23:31:25 +01:00
Gildor
8217519ea2 Core/Visibility: Split BG/Arena visibility settings (#25690) 2020-12-26 23:30:16 +01:00
Giacomo Pozzoni
3b2c878dd0 Core/Spells: Implemented personal summons (#19231) (#25765)
* Core/Spells: Implemented personal summons (#19231)

* By default determined by summon property flag SUMMON_PROP_FLAG_PERSONAL_SPAWN

Closes #18254

(cherry picked from commit b7bb5e6a98)

# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
#	src/server/game/DataStores/DBCEnums.h
#	src/server/game/Entities/Creature/TemporarySummon.cpp
#	src/server/game/Entities/Creature/TemporarySummon.h
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Object/Object.h
#	src/server/game/Maps/Map.h
#	src/server/game/Spells/SpellEffects.cpp

* Build fix

* Implement feedback

* Fix parameters passed in wrong order
2020-12-26 22:32:01 +01:00
Treeston
c8c572d980 Game/ChatCommands: Make sure ChatHandler::extractPlayerTarget populates the strtok buffer for non-nullptr returns. Closes #25692, supersedes #25698. 2020-12-10 15:23:58 +01:00
jackpoz
1c08395e8a Core/Movement: Add a debug log when a player falls below the map 2020-12-09 19:52:12 +01:00
jackpoz
5270ff58da Core/Player: Adjust fall damage log
Move fall damage log to "entities.player.falldamage" category and include the usual debug info
2020-11-21 16:33:00 +01:00
Treeston
cc8287927b [3.3.5] Scripts/Commands: .learn adjustments (PR #25454) 2020-11-18 20:09:34 +01:00
Ovah
4abbeb2a60 Core/Maps: add new FLAG_ALLIANCE_ONLY and FLAG_HORDE_ONLY for instance spawn groups (PR #25656) 2020-11-17 23:41:15 +01:00
Ovah
850b88546f Scripts/Misc: Use InstanceMap* in InstanceScript instead of Map* (#25655)
# Conflicts:
#	src/server/game/Instances/InstanceScript.cpp
#	src/server/game/Instances/InstanceScript.h
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp
#	src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp
#	src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp
#	src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
#	src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp
#	src/server/scripts/Maelstrom/Stonecore/instance_stonecore.cpp
#	src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2020-11-17 19:45:13 +01:00
Shauren
b57530ebb1 Core/Commands: Exclude ambigious cast operator overloads from command Variant
Closes #25618
2020-10-30 13:36:14 +01:00
Keader
a93abcf803 Scripts/ScarletMonastery: Headless Horseman Rewrite (#25614) 2020-10-26 14:04:36 -03:00
jackpoz
28a1132211 Core/AI: Fix CorpseRemoved() and SMART_EVENT_CORPSE_REMOVED not being called for creatures without m_respawnCompatibilityMode
Fixes #24958
2020-10-25 13:29:58 +01:00
Giacomo Pozzoni
d7459ccced CI/GitHub: Switch to GCC 8 (#25610)
* CI/GitHub: Switch to GCC 8

Build on GitHub Actions using GCC 8 as it's the oldest supported GCC

* Core/Misc: Attempt to fix GCC 8 build
2020-10-25 10:31:29 +01:00
Shauren
53482f7299 Core/DBLayer: Fixed memory leaks with existing SQLQueryHolder uses and eliminated the possibilty of adding more in future (replaced manual memory management with smart pointers) 2020-10-24 17:37:24 +02:00
Keader
5e9a856ad7 Game/Player: Fixed Backlash/Backdraft priority (#25564)
Update #18516
2020-10-19 11:27:02 -03:00
Treeston
684910a230 AI/CreatureAI: Properly update Victim even while spell focusing 2020-10-13 23:44:37 +02:00
Gildor
c13ccaab5c Core/Spells: Aura refresh improvements (#25511) 2020-10-08 20:36:50 +02:00