Commit Graph

579 Commits

Author SHA1 Message Date
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
leak
847b4366f3 Core/DBLayer: Convert PExecute() queries to prepared statements 2012-03-19 16:48:08 +01:00
Machiavelli
41cc704bf8 Core/Movement:
- Don't abort relocation if movementflag restrictions were violated. There might be lag between client and server and even different parts of the core that made this approach improper.
- MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING, but it's a valid flag to receive from client.
- Fix falling to ground when unapplying fly/waterwalk aura. NOTE: This is a client-side initiated fall, in the future this should be initiated and updated by the server. (Working on it)
- Rename MOVEMENTFLAG_FALLING to MOVEMENTFLAG_FALLING_FAR
- Rename MOVEMENTFLAG_JUMPING to MOVEMENTFLAG_FALLING

Closes #5751
2012-03-17 20:36:12 +01:00
Shauren
01f3620d45 Core/Movement: Corrected movement info structure written in WriteMovementInfo 2012-03-17 18:01:56 +01:00
Machiavelli
87a121425c Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:56 +01:00
Machiavelli
5d2d2a5ac7 Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:21 +01:00
Machiavelli
80975faba2 Core/Movement: Add debug output to Worldsession::ReadMovementInfo to find out which movementflag restriction was violated. Please use this to give feedback. 2012-03-17 11:50:30 +01:00
Machiavelli
85da463686 Core/Movement: Fix brackets in macro 2012-03-16 23:37:50 +01:00
Machiavelli
65453620e8 Core/Movement: Do not process server side relocation if reading movementinfo from client resulted in violations (= hacking). 2012-03-16 18:15:08 +01:00
Machiavelli
cca93c7a22 Minor typo, major consequences. 2012-03-16 17:27:24 +01:00
Machiavelli
df31af5b4f Core/Movement: Add server-side check for movementflag correction in previous commit. This effectively prevents (most if not all) flyhacking. 2012-03-16 17:21:15 +01:00
Shauren
a3d7caba8a Core/Opcodes: Defined a new opcode 2012-03-16 12:34:37 +01:00
Machiavelli
e17a9cfb85 Core/Movement: Add server side filters for MOVEMENTFLAG_WATERWALKING, _FALLING_SLOW and _HOVER depending on required aura types. Fixes exploiting when aura unapply packets (such as corrected in previous commit) are blocked/altered before reaching the client. 2012-03-15 10:12:43 +01:00
Machiavelli
03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Spp
f1949b20a6 Some random cleanup here and there 2012-03-09 13:42:52 +01:00
Kandera
680a7083ff Core/Misc: add level to login/logout logs, it will help to find xp exploits (aokromes) 2012-03-05 10:58:52 -05:00
leak
66fc6482de Core/Warden: Switch to multi-threaded packet processing for warden 2012-02-28 23:05:30 +01:00
Shauren
7b2672b17b Core/Calendar: Fix compile without PCH 2012-02-25 15:32:55 +01:00
Nay
ad78d44da8 Core/Calendar: Change (revert) CalendarFlags vars to ints
P.S I'd like to have type safe enums (C#-like, also [Flags] attr)
2012-02-25 04:16:17 +00:00
Nay
d6c0a67a7c Core/Calendar:
- Fix build
- Use enums where possible
- Renaming
2012-02-25 04:00:32 +00:00
Shauren
0e86b3a578 Core/Calendar: Corrected structure of SMSG_CALENDAR_COMMAND_RESULT 2012-02-24 23:40:06 +01:00
Shauren
e5621dfd99 Compile fix 2012-02-24 23:30:09 +01:00
Spp
32eab3dca7 Core/Calendar: WIP Calendar. 2012-02-24 20:11:29 +01:00
Shauren
a934abbbb7 Core/Calendar
* Added sending SMSG_CALENDAR_RAID_LOCKOUT_REMOVED when instance save is removed
* Refactored sending SMSG_CALENDAR_RAID_LOCKOUT_ADDED/REMOVED into separate method
2012-02-24 19:31:40 +01:00
Nay
c4b6dc3a15 Core/Calendar: Initial work for calendar
Original author: Silinoron
(from calendar branch)
2012-02-24 16:46:29 +00:00
leak
abb017dbeb Core/Warden: Various cleanups and warning fixes 2012-02-19 18:49:38 +01:00
leak
8e3a4b956e Core/Warden: Base implementation for Warden functionality
Note: The default config file action for clients failing the checks can be changed for each check via the characters.warden_action table

Credits to TOM_RUS
2012-02-19 13:51:16 +01:00
Nay
0a0233b215 Core/Packets: Use a single method to send SMSG_ACTIVATETAXIREPLY
Also fix a typo introduced in 703ad4889
2012-02-18 23:03:41 +00:00
kaelima
03b2717931 Core/Map:
- Fixed crash when a player was disconnected during a transfer to another map.
- Only call OnPlayerLeaveMap if player is removed from map. (Ty QAston)
2012-02-10 12:43:13 +01:00
Spp
c9762b0e38 Core: Change Handlers location 2012-01-26 10:54:53 +01:00
Subv2112
3d4f55723c Core/SAI: Linked events should be executed after the event that linked them is executed.
Core/SAI: Allow SMART_EVENT_GO_STATE_CHANGED to use ActionInvoker target

Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
2012-01-22 20:36:01 -05:00
Fredi
d03894536f Core/IO: Corrected SMSG_AUCTION_OWNER_NOTIFICATION packet structure 2012-01-14 19:40:13 -02:00
Subv2112
f4075f0f94 Core/LFG:
Fix priority of the player when its added to the lfg group
        Better implementation of the Dungeon Deserter debuff
        Rewrite the NeedBeforeGreed loot
        Fixed players being shown as Unknown Entity when entering the lfg group
        Some incremental optimizations after original patch
Thanks to Retriman and Paecman for base implementation

Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
2012-01-14 17:37:28 +01:00
Machiavelli
dbbac0bdaa Core/Movement: Implement spline movement subsystem.
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.

Technical changes:

* Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
* Precission increased. There are no more position desync issues since client's position calculation formulas used.
* Now possible to move by paths with multiple points, send whole path to client.

--
Original author of research and implementation: SilverIce. Massive kudos.
Original port for Trinity (ref #4629) Chaplain and Venugh
With the following incremental fixes during my review:

- Restore flightmaster end grid pre-loading
- Fix uninitialized Creature::m_path_id
- Add missing trinity_string entries for .movegens command
- Fix a bug in WaypointMovementGenerator that would trigger unexpected pausing at waypoints for various amounts of time

Known issues:
- Errors like WaypointMovementGenerator::LoadPath creature XXX (Entry: YYYYY GUID: ZZZZZZ) doesn't have waypoint path id: 0.
This is caused by bad DB data. This commit didn't "break" it.

Do not forget to re-run CMake before compiling.
2012-01-14 15:36:07 +01:00
Machiavelli
2293d2d7df Core/Movement: Prevent IdleMovementGenerator being put into MOTION_SLOT_IDLE and MOTION_SLOT_ACTIVE simultaneously 2012-01-13 16:43:49 +01:00
Subv2112
d02c781241 Core/Gossips: Fixed questgiver GOs that also have gossip menus, fixed gossip option selecting on GOs
Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
2012-01-09 09:29:45 -05:00
Subv2112
5584354444 Core/Players: Fix crash in LoadFromDB
Closes #4724
Closes #4673
2012-01-08 18:37:16 +00:00
Kaelima
e457649170 Merge pull request #4714 from elecyb/mover
Core-Vehicles: Change player mover when add/remove passenger (thanks Sub...
2012-01-08 06:41:02 -08:00
elecyb
fc4b033715 Core-Vehicles: Change player mover when add/remove passenger (thanks Subv)
Core-Misc: Restore correct mover for victim of possesion spell.

Closes #4704, #4707
2012-01-08 03:56:33 -03:00
Machiavelli
1dc6f6a2da Merge pull request #4646 from elecyb/crash1
Core/PacketIO: Fix crash and exploit caused when client sends tampered m...
2012-01-07 03:58:42 -08:00
danik
b35f831f2b Core/PacketIO: Prevented excessive WhoOpcode spam - solves possible crash/lag method 2012-01-06 19:36:17 +01:00
elecyb
7d7bb8363d Core/PacketIO: Fix crash and exploit caused when client sends tampered mover guids
Closes: #4056
2012-01-05 18:34:56 -03:00
Shocker
1a1d8a100b Core/Guilds: Players should be removed from guild when changing faction
Closes #4623
2012-01-05 00:50:33 +02:00
kandera
46fb199ee1 Core/Quests: Add implementation of seasonal quest reset. uses a new table much like character_queststatus_weekly. fixed typo where WEEKLY was WEKLY. Attempt 2 2012-01-04 07:59:32 -05:00
leak
ced346076b Merge pull request #4567 from Kiperr/master
Happy new year!
2011-12-31 16:13:28 -08:00
leak
cdbeb42e0f Core/DBLayer: Refactor prepared statement defines to new format (char db) 2012-01-01 01:09:38 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
leak
73cf793e56 Core/DBLayer: Refactor prepared statement defines Note:
The new format for the middle section is a 3-letter upper case abbreviation of the sql command being executed (select -> SEL, update -> UPD, etc.)
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
2011-12-31 20:14:38 +01:00
leak
8adac3f246 Core/DBLayer: Convert PExecute() queries to prepared statements No. 3 2011-12-31 00:32:05 +01:00
leak
b4ecd85da4 Core/DBLayer: Convert PExecute() queries to prepared statements No. 2 (fixup) 2011-12-27 16:31:10 +01:00