Commit Graph

150 Commits

Author SHA1 Message Date
leak
3d0063abee Core: Fix warnings 2012-03-24 15:37:54 +01:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
kaelima
6217583627 Core/Map:
- Remove mysterious restriction in visibilityhelper for gameobjects
- Some cleanup in CheckAreaExploreAndOutdoor() and GridDefines.h
- Set nocreate for cells visited in Map::VisitNearbyCellsOf
2012-03-12 04:33:24 +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
Shauren
e5d23103f3 Core/Maps
* Corrected liquid type extraction in maps - MCLQ chunk must be parsed together with MH2O (they stack)
* Fixed liquid detection in WMO objects
* Implemented LiquidType.dbc use, players will now get proper auras in special liquids
* Turned off slime damage by default (Naxxramas uses periodic damage aura for this purpose)
* Implemented liquid type overrides basing on area/zone
* Renamed final temp_gameobject_models to GameObjectModels.dtree (the temporary one produced by vmap extractor remains unaffected)

Note: Map and Vmap re-extraction is required
2012-03-07 13:09:35 +01:00
Machiavelli
6bb689b494 Core/Units: Properly update passenger position if vehicle uses waypoint movement. Fixes e.g. Icefang path 2012-03-01 17:06:41 +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
Shauren
9c3357c1de Core/Calendar
* Fixed raid resets display in calendar
* Active instance locks will now be added to calendar as soon as they are created (not after login)
2012-02-24 19:06:53 +01:00
Spp
1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
Subv
8660f20703 Merge pull request #5290 from kandera/fix_blink
fix blink making you fall under ground when blinking into water (needs c...
closes #5289
2012-02-18 04:36:23 -08:00
Kandera
e277588689 fix blink making you fall under ground when blinking into water (needs correct liquid level calculations) 2012-02-17 14:25:08 -05:00
leak
ba4d1c36f1 Core/Maps: Remove redundant if() 2012-02-16 16:17:56 +01:00
Spp
03c34ee507 Fix a lot of warnings 2012-02-16 13:56:28 +01:00
Subv
f8df838db9 Fixed build, thanks Amit86 for noticing 2012-02-14 13:47:35 -05:00
Subv
8a72aede16 Codestyle: Renamed some variables to fit codestyle, corrected order in structure/class fields to match alignment (they use slightly less memory now)
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-14 12:46:26 -05:00
Subv
ff9830c18d Core/Spells: Blink wont be able to trespass solid objects anymore (walls/doors)
Refactored some code

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-11 19:23:18 -05: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
Subv2112
93d199f043 Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements
Please re-extract vmaps
2012-02-09 13:58:22 -05: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
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
megamage
ce0dfa88a6 Revert "Temp fix for *nix build."
It builds in *nix without this patch.

This reverts commit e84fffe588.
2011-12-22 10:15:17 -05:00
megamage
e84fffe588 Temp fix for *nix build. 2011-12-22 08:57:16 -05:00
megamage
8cf2062c1f Update grid system. Try to fix some crashes and transport passengers (now they are despawned after a while). 2011-12-20 17:07:09 -05:00
Shauren
b4df932e71 Core/Dungeon Finder: Implemented Luck of the Draw buff 2011-12-18 22:09:03 +01:00
Shauren
23a5c5e855 Core/Maps: Removed some incorrect checks in GetHeight, flying creatures should now fall correctly when killed 2011-12-13 18:19:25 +01:00
kaelima
11fb0beaf0 Core/Misc: Fixed some duplicate checks for player typeid in Unit::Kill and Spell::EffectSummonDeadPet. Also some random cleanup 2011-12-10 13:48:41 +01:00
megamage
cde7ea260e Make AddToMap return bool. 2011-11-28 13:23:20 -05:00
megamage
49b2407077 Add an ASSERT to find out the reasons of some crashes. 2011-11-28 11:32:52 -05:00
Shauren
358b33239a Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit 2011-11-23 19:17:33 +01:00
megamage
d9e4d991c9 Fix a crash when player is logged out when not in map. 2011-11-12 08:16:52 -05:00
megamage
07cf71fdd4 Some cleanup of add/remove to/from map. 2011-11-11 17:50:26 -05:00
megamage
31a88d4fe5 Fix the crash when removing object from an unloaded grid. Object should always be unlinked from grid no matter if the grid is loaded. 2011-11-10 17:31:45 -05:00
megamage
23b3f16f3a Add some ASSERT in add/remove obj to/from grid. 2011-11-10 10:18:32 -05:00
Shocker
c2a2a4f713 Merge pull request #3872 from Bootz/master
Codestyle clean-up
2011-11-09 02:31:18 -08:00
megamage
462a2b9876 Change more ace_guard to trinity_guard 2011-11-08 10:48:49 -05:00
Bootz
d1334624da Core: Codestyle clean-up
"pl"->"player"

 Note: codestyle methods needs maintained, Player* player.
still to do properly clean-up chat.cpp.
2011-11-07 11:18:00 -06:00
Bootz
f75ec5ba2b Core: Codestyle clean-up
"plr"->player

Note: codestyle methods needs maintained, Player* player.
2011-11-07 11:06:39 -06:00
megamage
495ef10b0d Change ObjectAccessor to an ACE_Null_Mutex singleton, since its members have been protected by individual locks.
Also make some of its member functions static.
2011-11-07 09:44:09 -05:00
megamage
91f56c181c More cleanup of grid system. 2011-10-22 10:01:29 -04:00
megamage
80a18b9e56 Some cleanup of grid system. 2011-10-22 09:36:05 -04:00
kaelima
be0b2fcf97 Core/Grid:
- Simplified CellArea calculation (Original author: SilverIce)

- Removed unused code in Cell class (Original author: SilverIce)

- Improve some Visit functions.
2011-10-19 17:40:44 +01:00
Liberate
fd45c111b0 Core/Grid: Fix a typo in e0d933fed8. Grids should work correctly again. Thanks Kaelima. 2011-10-18 23:16:33 +02:00
megamage
7231ab959f Clean up grid system. Get rid of GridLoader. This patch should not change any logic, except the incorrect calculation of the number of loaded corpse (which only affects log). 2011-10-18 14:31:34 -04:00
megamage
ffdfd9252b More clean up of grid system. 2011-10-18 11:51:30 -04:00
megamage
e27ef59548 Clean up grid system: allow directly creating Cell from x, y. 2011-10-18 11:18:49 -04:00
megamage
e0d933fed8 Use method IsCoordValid() to replace explicit checks. 2011-10-18 11:05:32 -04:00
megamage
c29ff41001 Rename some classes in grid system.
Note: The naming of classes is still confusing. "cell" usually refers to class "Grid", and "grid" usually refers to class "NGrid". But it requires a lot of changes to clean this up.
2011-10-18 10:53:34 -04:00
Spp
bc023c6dfb Core: Fix some warnings 2011-10-18 12:39:01 +02:00
Spp
805e14a463 Core/Grid: Replaced ambiguous operator overloads with functions (Makes it clear to read) 2011-10-18 11:42:40 +02:00
megamage
3ba22d0d06 Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management. 2011-10-10 17:39:34 -04:00