Commit Graph

39 Commits

Author SHA1 Message Date
ratkosrb d7d5dcc2fe Add correct areatrigger teleport messages.
And a bit of refactoring.
2019-12-07 20:53:42 +02:00
ratkosrb 66659fe13f Cleanup and reorganization of Unit and SpellEntry headers. (#312)
* Move some unit and spell defines to dedicated header.

* Reorder functions in unit header.

* Clean up until spell category.

* Finish cleaning up spell functions.

* Cleanup combat system methods.

* Done cleaning up unit header.

* Reduce not needed includes.
2019-11-24 22:20:44 +02:00
ratkosrb df76eff1d3 Fix a ton of warnings found using clang. (#308) 2019-11-20 20:27:36 +02:00
ratkosrb 4afe949345 Replace usage of NULL with nullptr. 2019-11-12 19:53:42 +02:00
ratkosrb 07a42a3b74 Ignore client movement when being teleported by server. 2019-08-03 00:54:12 +03:00
ratkosrb 73f125e970 Move some movement defines to config. 2019-06-29 14:49:46 +03:00
ratkosrb 50e4fd2a29 Verify the mover guid before handling skipped time. 2019-06-28 18:40:40 +03:00
ratkosrb a3773e2558 Remove duplicate line. 2019-06-28 18:36:16 +03:00
ratkosrb 49f5d61322 Implement no fall time check. 2019-06-26 22:46:23 +03:00
ratkosrb 44f7e89909 Implement new movement checks. 2019-06-25 21:09:52 +03:00
ratkosrb f6bfb9a2ed Reject movement packet if a cheat is detected.
Completely neutralizes some cheats, without kicking innocent players on false positive. The packet is rejected and correct position and flags are sent back to the client.
2019-06-20 23:35:51 +03:00
ratkosrb 7f7160b2b7 Add warden and comprehensive movement checks (#216)
* Initial Warden Implementation.

* Send notification to gamemasters.

* Implement support for all modules.

* Misc improvements.

* Fix copy paste error.

* Update wrong file header.

* Fix travis build.

* Fix possible crash.

* Add new anticheat.

* Resolve issue when being teleported.

* Add config checks.

* More config checks.

* Move enum to more appropriate header.

* Fix compile for old builds.

* Sent root on possessed creature after active mover packet.

* Allow out of order acks.

* Return result of tests in handle speed ack.

* Stop disconnected player from moving.

* Remove no longer needed include.

* Fix wrong speed when jumping in water.

* Add back the braces.

* Only send heartbeat for resendable changes.

Fixes https://github.com/vmangos/core/issues/212
2019-06-19 21:11:58 +03:00
ratkosrb b6f4a2574b Implement movement counters (#197)
* Implement movement counters.

* Fix 1.8.4 build.

* Remove redundant check

* Minor changes.

* Fix problem with fear while mind controlling rooted unit.

* Fix wrong guid being sent in speed change.

* Move some functions around.

* Differentiate between possess and charm.

* Hack fix for mind control bug in 1.8.4.

* Fix bug with Mind Vision.

* Use namespace instead of class.
2019-06-12 18:29:21 +03:00
ratkosrb da12f9ad92 Fix fear movement on transports.
Sending SMSG_MONTER_MOVE is what makes players fly away.
2019-05-24 00:22:25 +03:00
ratkosrb f2f3a170e5 Fix mind control on old clients. 2019-03-23 23:33:50 +02:00
ratkosrb f7cd03b5d9 Initial support for 1.8.4 client. 2019-02-11 20:40:19 +02:00
ratkosrb 9b6c791a6c Reduce code duplication in last commit. 2019-01-27 10:04:57 +02:00
ratkosrb 97572da72f Fix some movement issues with older clients. 2019-01-27 09:58:30 +02:00
ratkosrb 9998f2de90 Add separate handler for SPELL_EFFECT_SUMMON_POSSESSED.
This fixes the eye of killrog + mind control crash without hacks.
2019-01-02 18:27:18 +02:00
ratkosrb 6735de0174 Improvements to PvP flagging.
Based on https://github.com/cmangos/mangos-classic/commit/d63bebd45742b75bc6f0b02206263a8f16182fec
2018-11-27 12:36:52 +02:00
ratkosrb 2905cf0772 Fix some movement issues on 1.9. 2018-11-22 04:40:08 +02:00
ratkosrb acaa54ae9d Initial support for 1.9.4 client.
You can enter world and objects display correctly. Lots of startup errors though.
2018-11-19 05:31:20 +02:00
sipertruk 8953934843 Flight transitions and related fixes (#4)
* Flight transitions and related fixes

* Fix compile error on Debian.
2018-05-05 19:57:59 +03:00
sipertruk 964d17361d Fix pet named unknown after teleport. (#7)
* Fix pet named unknown after teleport.

* Comment fix.
2018-04-04 20:01:19 +10:00
sipertruk ce3d55f96c fix macos fix side effect on far teleport (#1249) 2018-01-25 22:09:18 +02:00
bladez b7fdc2c10b Resolve a crash when temporary summoned and possessed units despawn prematurely (#480)
* Prevent Player::m_mover being left as a dangling pointer if a possessed creature despawns before the spell ends

* Removed ModPossessPet unapply for Dream Vision
2017-11-04 14:43:59 +11:00
bladez 05f2b0bc8a Prevent a crash in HandleSetActiveMoverOpcode if the player is kicked, or mover is null (#454) 2017-11-02 20:05:05 +11:00
GuybrushGit 3097ce2f43 Fix for flight resetting on gear equip. (#2112)
* Prevent MSG_MOVE_SET_*_SPEED being sent when the speed doesn't change.

* Prevent MSG_MOVE_SET_*_SPEED being sent to flying players.
2017-08-19 05:10:00 +03:00
sipertruk b298629ff5 fix eyes of the beast (#1497) 2017-07-16 01:51:11 +01:00
sipertruk a695de846d Transport fixes (#1124)
* transport fixes

* better way for transport update
2017-06-29 08:04:44 +01:00
sipertruk 745b319b89 clear visibility list if needed (#969) 2017-06-03 18:56:26 +01:00
Prithu 4502232a5f Revert MSG_MOVE_*ROOT and speed ack changes (#858) 2017-05-26 01:21:22 +01:00
Staden 470db9370b Don't close loot window upon player movement #689
Not sure why this check exists at all but it's probably for a good reason.
2017-05-16 17:07:29 +01:00
Prithu 2add70e6da Fix creature movespline interrupt and improvements (#581)
* Fixed stop spline not being sent for non-player units, causing NPCs to appear to be sliding

* No longer send movement info or spline on movespeed ack, instead we just send a speed update

Fixes an issue where the ACK was received after a MSG_MOVE_ROOT and the spline was resent, causing movement while rooted and then a rubberband

* Added a param to StopMoving which allows us to force a stop spline even if the current spline is finalized. Useful for ensuring all movement stops on death
2017-05-10 04:18:47 +01:00
Prithu 9a701a5c04 Fix teleporting during move splines due to rooting effects and movesplines being incorrectly interrupted (possible DC fix) (#454)
* Fixed movement splines initiated at the same time as a stop spline (one which doesnt send a stop code) causing the target to stand still and teleport at the end of the movement
For more information, look at the network timestamps. Movement splines w/ no stop code is completed after movement gen spline is sent, causing it to be ignored

Note that fear, blind, and other abilities that apply movement speed modifiers only (somewhat) worked because of MovementHandler::HandleForceSpeedChangeAckOpcodes resending the spline on a speed change

* Now rely on the move spline packet to remove MOVEFLAG_ROOT, rather than broadcasting MSG_MOVE_UNROOT when we receive acks from the client - fixes speed up when we send MSG_MOVE_UNROOT later than the spline and a minor teleport due to differing coords

TODO: Broadcast MSG_MOVE_*ROOT in Unit::SetMovement, and try without MSG_MOVE_ROOT in the client ack

* Now check move flags rather than client state for whether a unit is rooted, since we can control it and it will be accurate based on SetMovement when we initiate a spline

* Now broadcast MSG_MOVE_*ROOT in SetMovement rather than on client acks, so we're consistent with the server state

* Implemented debug option for clearing unit motions

* Removed debug statements, prepping for PR

* Fixed no-motion movemotion option

* Forgot a comment

* Reverted packet size to 31 since it seems to make no difference
2017-04-24 05:39:27 +01:00
Martin Jesper Low Madsen 917fc1c59f Fixes transportation issues on MacOS #2 (#232) 2017-04-02 08:39:13 +01:00
Martin Jesper Low Madsen 6ad1c72bf9 Fixes transportation issues on MacOS (#89) 2017-03-25 20:10:42 +00:00
StadenElysium 43452c0d9c License update (#27) 2017-03-15 17:27:20 +00:00
shenna c9151a5715 Initial Commit / Core Files 2017-03-10 00:38:11 +03:00