Commit Graph

185 Commits

Author SHA1 Message Date
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
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
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
jackpoz
68d947d42f Core/Log: Log all character kicks to "network.kick" category
(cherry picked from commit 31018c3652)
2022-01-01 12:56:24 +01:00
Giacomo Pozzoni
a9e325f6b7 Core/Logs: Log full guid instead of just low guid, part 2
(cherry picked from commit 3def52c1c4)
2022-01-01 00:51:54 +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
Aokromes
8f8ea509cb Core/Movement: Fix Warrior's Charge launch visual while jumping backw… (#23243)
* Core/Movement: Fix Warrior's Charge launch visual while jumping backwards

By Natureknight

* fix no-pch

(cherry picked from commit cc1a520299)
2021-12-05 14:03:47 +01:00
Chaouki Dhib
c19a4db1c1 Core/Movement: Add time synchronisation (#18189)
(cherry picked from commit 975f1e364a)
2021-11-30 22:11:36 +01:00
Chaouki Dhib
4507a02ada Core/Movement: Implement move time skipped handler (#22994)
* Implement CMSG_MOVE_TIME_SKIPPED handler and move it to MovementHandler.cpp

* Add better error handling

* Update MovementHandler.cpp

(cherry picked from commit f9ed72e351)
2021-11-23 21:18:07 +01:00
Treeston
e8e8e4b9d6 Core/Player: Delay resurrection on release for unreachable maps until teleport has completed. Closes #21481.
(cherry picked from commit 28591fd165)
2021-11-08 23:57:28 +01:00
ModoX
8b171d7c01 Core/Instances: Drop allowMount column in instance_template as it is already handled properly by SPELL_ATTR0_OUTDOORS_ONLY (#27148) 2021-10-23 11:42:47 +02:00
ModoX
68c2fc8ff5 Core/Characters: Made homebind location a WorldLocation (this implicitly adds orientation) (#27055) 2021-10-16 01:17:47 +02:00
Shauren
2d7af28e9f Core/Transports: Store information about continent transports 2021-10-02 19:59:56 +02:00
ccrs
426f9f2f92 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).

(cherry picked from commit 982643cd96)
2021-09-28 00:15:13 +02:00
Shauren
2e2b298618 Core/Movement: Fixed creature hover
Closes #15177

(cherry picked from commit 2baa81065b)
2021-08-24 12:44:38 +02:00
ariel-
fccf1a8c62 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876

(cherry picked from commit cb9e72e521)
2021-06-13 00:59:13 +02:00
jackpoz
e17e4e6f07 Core/Misc: Replace time(NULL) with GameTime::GetGameTime()
(cherry picked from commit 12701cb0c6)

 Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
	src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
	src/server/game/Battlefield/Battlefield.cpp
	src/server/game/Battlefield/Zones/BattlefieldWG.cpp
	src/server/game/Battlegrounds/BattlegroundMgr.cpp
	src/server/game/Calendar/CalendarMgr.h
	src/server/game/DungeonFinding/LFGQueue.cpp
	src/server/game/Entities/Corpse/Corpse.cpp
	src/server/game/Entities/Creature/Creature.cpp
	src/server/game/Entities/Item/Item.cpp
	src/server/game/Entities/Pet/Pet.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Grids/ObjectGridLoader.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/BattlefieldHandler.cpp
	src/server/game/Handlers/CalendarHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/LFGHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QueryHandler.cpp
	src/server/game/Handlers/TicketHandler.cpp
	src/server/game/Instances/InstanceSaveMgr.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/game/Tickets/TicketMgr.cpp
	src/server/game/Tickets/TicketMgr.h
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_gobject.cpp
	src/server/scripts/Commands/cs_instance.cpp
	src/server/scripts/Commands/cs_list.cpp
	src/server/scripts/Northrend/zone_wintergrasp.cpp
	src/server/scripts/Spells/spell_item.cpp
2021-04-15 05:53:27 +02:00
Shauren
9b5a46ca2b Core/Auras: Defined and implemented many new interrupt flags 2021-03-21 12:05:32 +01:00
Matan Shukry
818c19ec4b Core/Movement: Add trace log message with packet content to movement opcode handler 2021-03-05 00:28:07 +01:00
Matan Shukry
931a3871f8 Core/Movement: Don't rely on client for water state detection 2021-03-05 00:28:07 +01:00
Shauren
34cd11860d Core/Misc: Fixed nopch MSVC build
(cherry picked from commit e977bb4c4d)
2021-02-25 19:59:07 +01:00
Shauren
cab4c87d2d Core/PacketIO: Updated most packet structures to 9.0.1 2020-12-08 18:16:41 +01:00
ccrs
97585597f0 Core/Movement: waypoint movement (#20121)
Following the work done in #19361 this is the cleanup and improvement of the related logic of waypoint management.

Ref 28050f3 #18020
(taking the good parts and ignoring the incomplete work)

(cherry picked from commit 7fff83d675)
2020-08-23 00:45:46 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
eba31dea27 Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-05-24 22:34:25 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
8e98ceb293 Core/Movement: Implemented movement forces 2019-09-07 16:58:58 +02:00
xinef1
60663d1374 Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world

(cherrypicked from 7567cafec8)
2019-08-17 20:04:14 +02:00
xinef1
825719c25c Remove auras interrupted by falling when we fall to the ground or water (#19115)
(cherrypicked from 9b284ab329)
2019-08-17 20:04:14 +02:00
xinef1
cfefd27cb8 Added some missing SetFallInformation calls (#19121)
Fixed HP drop bug on zeppelins
Fixed possible packet relocation problems on huge transports

(cherrypicked from b3f04ec157)
2019-07-21 21:06:54 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shocker
8981120383 Core/Spells: Implement PROC_FLAG_JUMP 2018-10-13 12:11:14 +03:00
Shocker
937d6b1e6f Core/Spells: Implement AURA_INTERRUPT_FLAG_JUMP 2018-10-13 12:11:07 +03:00
Krudor
7d353acde9 Core/Instances: Fix an issue where instance greet messages were not properly sent out due to fetching the greet message for the instance difficulty selected by the player in the GUI, instead of the actual map difficulty in case a fallback difficulty was issued. (#22157) 2018-07-14 20:46:43 +02:00
Shauren
42f9deb21e Core/Maps: Implemented getting area id from gameobject spawns
Yes, you can now spawn LK platform anywhere and it will treat you as inside Icecrown Citadel
2018-03-28 22:01:22 +02:00
Shauren
bea7faa8f9 Core/Entities: Take terrain swaps into account when calculating LoS/height/area 2018-03-25 19:28:36 +03:00
xinef1
044a38629e Core/Movement: Typo fix for falling to void case (#18611)
(cherry picked from commit 3ea9f3b0e2)
2018-03-18 00:19:40 +01:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
e86a2c439a Core/Auras: Implemented using all aura interrupt flag fields 2017-12-17 16:45:50 +01:00
Shauren
43d268d75c Core/PacketIO: Renamed "movementInfo" to "Status" in movement packets in effort to preserve original naming (and to follow codestyle for naming public data members) 2017-08-16 23:22:41 +02:00
Shauren
a12a34b1dc Core/Game: Include cleanup - removed G3D classes from packets
* Use our own Position class instead, with the coords written to packets being part of type
2017-05-16 22:16:21 +02:00
Shauren
e253bb5a17 Core/PacketIO: Updated client packet structures to 7.2.0 2017-04-13 19:36:53 +02:00
Shauren
fcb50c5e65 Core/Movement: Remove PLAYER_FLAGS_IS_OUT_OF_BOUNDS flag if player manages to move back in bounds (pretty much gms only) 2017-03-20 20:30:28 +01:00
Shauren
047c6f072b Core/Movement: Handle move stop embedded in spell cast requests 2017-02-25 22:13:00 +01:00
Treeston
346e4824be Entities/Unit: Cleanup refactor. Changes: (#17819)
+ Unit::m_movedPlayer -> Unit::m_playerMovingMe
+ Player::m_mover -> Player::m_unitMovedByMe
+ Unit::GetMover() -> Unit::GetUnitBeingMoved()
+ Unit::GetPlayerMover() -> Unit::GetPlayerBeingMoved()
+ NEW: Unit::GetClientControllingPlayer()
(cherry picked from commit 8deda7ed7f)

# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Handlers/MovementHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/Spells/SpellEffects.cpp
#	src/server/game/Spells/SpellInfo.cpp
2017-02-12 16:24:25 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
807488df8a Core/PacketIO: Minor refactor in Opcode definitions, packet class type no longer needs to be defined manually, it is now inferred from handler argument 2016-08-06 12:34:38 +02:00
Shauren
d2733eb6f1 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-06-13 21:00:25 +02:00