Commit Graph
159 Commits
Author SHA1 Message Date
Shauren bec761a3e0 Core/Creatures: Set melee sheath as default only for creatures that do not have creature_addon data 2012-04-18 12:44:56 +02:00
leak c6cbe4c77c Core/DBLayer: Convert PAppend() queries to prepared statements No.1 2012-03-25 16:25:06 +02:00
Subv 56fac5e1af Memory: Get rid of some memory leaks, converted FormationMgr back to singleton 2012-03-25 09:25:28 -05:00
Shauren 479c0976ab Core/Creatures: Properly initialize m_zoneScript when it depends on zone id (OutdoorPvP/Battlefield) and fixed z offset for hovering creatures at creation 2012-03-23 00:48:32 +01:00
Machiavelli 48799f3376 Core/Units: Fix movementflag apply for flying/hovering creatures on respawn 2012-03-18 11:35:33 +01:00
Gyx 1e94ab8d51 Core/Game: Code style and remove unused core.
Signed-off-by: Gyx <[email protected]>
2012-03-17 20:13:37 +08:00
Machiavelli 7d60290c2e Core/Units: Offset z coordinate only if MOVEMENTFLAG_HOVER is present, not MOVEMENTFLAG_DISABLE_GRAVITY.
(Remnant from an early incorrect version of my UNIT_FIELD_HOVERHEIGHT patch)
2012-03-15 10:16:08 +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
Spp d38bc3a178 Core: Rename GetCreatureInfo to GetCreatureTemplate and minor cleanup here and there 2012-02-27 14:58:47 +01:00
Shauren dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01:00
Shauren d2567a9f2f Core/Entities: Removed unused variable 2012-02-16 21:46:37 +01:00
Spp 03c34ee507 Fix a lot of warnings 2012-02-16 13:56:28 +01:00
Subv 9791bb599a Merge pull request #5160 from TrinityCore/dynamic_vmaps
Added Dynamic Vmaps, RE-EXTRACT YOUR VMAPS
2012-02-09 11:17:05 -08: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
Subv2112 69ab572786 Codestyle/Logs: Add more detailed information in Creature::Respawn, replacing the useless previous log
Signed-off-by: Subv <[email protected]>
2012-02-03 19:37:28 -05:00
QAston c7ea952a47 Core/Entities: Rename UNIT_FLAG_OOC_NOT_ATTACKABLE and UNIT_FLAG_PASSIVE to UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC respectively. New names tell much more about what those flags do. 2012-02-03 18:46:05 +01:00
Shocker 08be716ef8 Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_* 2012-02-03 19:02:17 +02: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
Shocker 08bcbc89b0 Merge pull request #4229 from devilcoredev/fix_002
Core/Spells: Fix the spell immunity system to be effect-dependent
2012-01-04 13:41:51 -08:00
Shocker ecb1bdd7c3 Merge pull request #4489 from devilcoredev/fix_001
Core/Achievemens: Fix 'The Undying' and 'The Immortal' achievements
2012-01-04 13:27:43 -08:00
Giuseppe Montesanto bf73409f49 Fix 'The Undying' and 'The Immortal' achievements. 2012-01-01 04:34:14 +01:00
kiper 8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01: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
Giuseppe Montesanto 72e48ef8b3 Fix immunity system for many spells. 2011-12-14 16:13:10 +01:00
megamage 529af3cd09 Delete obj if it is not successfully added to grid. More to fix. 2011-11-28 14:05:25 -05:00
Shocker c2a2a4f713 Merge pull request #3872 from Bootz/master
Codestyle clean-up
2011-11-09 02:31:18 -08:00
kaelima 8ba790ef35 Core/Creature: Prevent Spirit Guides (bg spirit healers) to be seen by alive players. 2011-11-07 18:18:59 +01: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
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
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
Fredi Machado 97142102e0 Core/Misc: Added 'f' after float values 2011-10-17 07:38:27 -03:00
megamage c8251bc619 Remove some "_" from private methods as required by TC standards. Thanks to Shauren for pointing out. 2011-10-13 17:01:55 -04:00
megamage bcc55489f8 More cleanup of CanSeeOrDetect 2011-10-13 14:02:07 -04:00
megamage 5912e2444d Some cleanup of CanSeeOrDetect code. 2011-10-13 13:26:27 -04:00
megamage edc46d5606 Fix a crash caused by my previous commit. 2011-10-11 08:47:36 -04:00
megamage 3569121d80 Remove/Add creature from/to map when it changes map.
Note: creatures was never supposed to change map, but now the core allows them to move with transports...
2011-10-10 17:59:52 -04:00
megamage d156e066cf Rename "SetPosition" to "UpdatePosition".
Replace CreatureRelocation in scripts with new Creature::SetPosition.
2011-10-10 17:08:01 -04:00
megamage 76c9c30c2b Merge pull request #3399 from megamage/master
Fix the relocation of creatures across cells. Try to fix #3054.
2011-10-10 13:12:15 -07:00
Bootz 5b4c7783c2 REPO: Code-style clean-ups
* Fixed pMap->map
* Fixed pInstance->instance
* Fixed pInsta->instance
* Fixed pQuest->quest
* Fixed pWho->who
* Fixed pTarget->target
* Fixed pGo->go

~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
2011-10-07 19:45:43 -05:00
megamage eb8cbae0d5 Fix the relocation of creatures across cells. Try to fix #3054. 2011-10-07 17:36:23 -04:00
Bootz 81c0a3a847 REPO: code-style clean-up
* Fixed pPlayer->player
* Fixed pCreature->creature

~DevNote: codestyle for Player should be (*player), not *plr or *p...
same goes for Creatures (*creature)... more cleaning needed.
We've way too many codestyles happening here.
2011-10-07 11:08:09 -05:00
Nay 8373e6c32e Core/Creature: Do not attack non-combat pets.
Fixes an issue where non-combat pets were aggroing other creatures
2011-10-01 16:57:10 +01:00
Spp b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp cc06c41887 Core: Move FormationMgr to namespace
Also...
- Warning fixes
- Make Singleton constructors private
2011-09-28 11:11:38 +02:00
click 872c2d4d63 Core/Build: Fix non-PCH builds 2011-09-18 16:30:18 +02:00
QAston c0b1823524 Core/Entities: Replace Unit::canAttack usage with more accurate Unit::IsValidAttackTarget 2011-09-16 23:49:31 +02:00
Spp af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00