Commit Graph

152 Commits

Author SHA1 Message Date
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
kaelima
7a2f7b0e63 Commands/Npc: Add AIName/ScriptName to npc info
Thanks Aokromes for suggestion
2011-12-18 22:45:23 +01:00
Machiavelli
203d4a4952 Core/Commands: Show time left until shutdown in .server info. (Aokromes' Suggestions)--; 2011-12-14 13:42:57 +01:00
Wilds
3103915994 Core/Spells: attribute research 2011-12-11 20:46:47 +01:00
kaelima
79903f31ce Core/Spells: Add own diminishing category for Dragon's Breath.
Will no longer share diminishing with Polymorph
Closes #3081
2011-11-13 00:51:33 +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
tobmaps
c0c6000a44 Core/Misc: Fix spelling typo 2011-11-02 19:13:51 +07:00
Liberate
a658d0b592 Core/Spells: Define and implement SPELL_ATTR4_PROC_ONLY_ON_DUMMY.
Fixes #2685
Fixes #2573
2011-10-19 22:08:54 +02:00
megamage
0bb86a3e97 Update code related to character name data.
Note: need to add/delete data when character is created/deleted.
2011-10-08 16:09:12 -04:00
Bizzy
4112a0d087 Core/Commands: Added '.ticket reset' for resetting ticket-id counter. Author: Bizzy 2011-10-04 17:41:55 +02: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
QAston
e949ad3adb Core/Spells: spell effect handling improvements
* Call spell effect handlers in 4 modes:
   - SPELL_EFFECT_HANDLE_LAUNCH - called when spell is launched (cast just finished)
   - SPELL_EFFECT_HANDLE_LAUNCH_TARGET - called when spell is launched for each target in spell target map
   - SPELL_EFFECT_HANDLE_HIT - called when spell hits its destination
   - SPELL_EFFECT_HANDLE_HIT_TARGET - called when spell hits it's target from spell target map
*Correctly implement SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL
*Remove spell system hacks which became obsolete with this commit
Core/SpellScripts:
add OnEffectLaunch, OnEffectLaunchTarget, OnEffectHit, OnEffectHitTarget hooks for new effect handle modes and remove OnEffect hook.
A generic rule of thumb how to update your scripts (will work for nearly all cases) for spell system noobs:
if your spell script used GetHitXXXX function, you need to use OnEffectHitTarget, otherwise use
OnEffectHit
2011-09-25 13:29:50 +02:00
Rochet2
a0a22ecbc8 Scripts/Commands: Added .dev command to show <Dev> tag in nickname 2011-09-21 11:35:29 -03:00
QAston
31e755c291 Core/Entities: Add Unit::IsValidAssistTarget and Unit::IsValidAttackTarget functions for proper serverside checks of related entity flags. 2011-09-16 22:17:48 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
3fac9914be Core: Code cleanup (here and there) 2011-09-05 14:01:50 +02:00
Nay
3ccfb5fefb Core/SAI: SMART_ACTION_FLEE: print flee emote if param1 is set 2011-09-04 18:51:16 +01:00
QAston
e7468b2e2c Core/Spells: Do not apply spellmods to spells with SPELL_ATTR3_NO_DONE_BONUS attribute. 2011-08-23 14:30:26 +02:00
Lopin
b92d6f3d20 Core/Commands: Added TrinityString instead of hardcoded string 2011-08-22 12:07:27 +02:00
QAston
fc5e924138 Core/Spells: Implement recently discovered target check attributes and move most of target checks to SpellInfo::CheckTarget function. 2011-08-19 14:54:15 +02:00
Machiavelli
3c9c1a9b69 Core/Spells: Rename SPELL_ATTR6_ONLY_CAST_WHILE_POSSESSED to SPELL_ATTR6_CAST_BY_CHARMER and assign m_caster in Spell::Spell instead of m_originalCaster 2011-08-19 12:27:03 +02:00
Lopin
868c1c53f2 Core/GameObjects: Unrevealed GO_FLAG_UNK1. Now GO_FLAG_NOT_SELECTABLE makes gameobjects to be unselectable even in GM mode 2011-08-19 11:45:49 +02:00
Machiavelli
917ffdffac Core/Spells: More research on SPELL_ATTR6_ONLY_CAST_WHILE_POSSESSED and implement new research (original caster should be charmer or owner) and implement QAston's earlier research (only castable while possessed). 2011-08-18 20:28:07 +02:00
Payn
69433862cb Core/Spells: Changed CHAIN_SPELL_JUMP_RADIUS down from 10y to 8y 2011-08-18 14:42:09 +02:00
QAston
a44e1c505e Core/Spells: Add new spell implicit target categories data - will be used in future patches. 2011-08-17 11:30:47 +02:00
QAston
1fb1988d46 Core/Spells: change Targets enum to use consistent naming schema. This is not a functional change, but it's needed for upcoming changes, also this makes target type research and use easier. 2011-08-16 19:42:36 +02:00
QAston
73bbc3aca8 Core/Spells: Update some targeting related attribute definitions to make them more clear and consistent. 2011-08-16 16:06:21 +02:00
QAston
e0d43388af Core/Spells: define SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS and SPELL_ATTR6_CAN_TARGET_INVISIBLE (big thanks to joschiwald for the second one) 2011-08-16 15:11:07 +02:00
leak
91a3bfe42a Core/Commands: .pinfo improvements
- Allow .pinfo <guid>
- Add map/zone/subzone/phase to output
2011-08-13 13:00:38 +02:00
QAston
b81fb4d423 Core/Spells: Rename SPELL_ATTR2_ALWAYS_APPLY_MODIFIERS to SPELL_ATTR2_DISPLAY_IN_STANCE_BAR, and make auras to be recalculated when permament instead of using that wrongly defined flag. 2011-08-11 23:11:10 +02:00
QAston
0d1a5314dc Core/Spells: Define some new attributes: SPELL_ATTR6_ONLY_CAST_WHILE_POSSESSED, SPELL_ATTR6_DONT_DISPLAY_COOLDOWN, SPELL_ATTR5_ALLOW_TARGET_OF_TARGET_AS_TARGET, SPELL_ATTR4_AREA_TARGET_CHAIN, SPELL_ATTR3_DONT_DISPLAY_RANGE 2011-08-11 23:03:43 +02:00
Silinoron
76fe596160 Core/Refer-a-Friend: Finish base work for Refer-a-Friend.
Any testing would be very much appreciated.
2011-08-03 09:28:12 -07:00
Machiavelli
0ecb47bc8a Core/Spells & Vehicles: Define and implement SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE and VEHICLE_SEAT_FLAG_CAN_CAST_MOUNT_SPELL.
Research done by QAston
2011-07-30 20:36:19 +02:00
QAston
495ead5f7f Revert "Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura)"
This reverts commit 07badd7385.
2011-07-28 23:44:39 +02:00
QAston
07badd7385 Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura) 2011-07-28 23:41:29 +02:00
Machiavelli
0dcc229071 Core/Commands: Allow muting offline players - the mute will become effective on next player login. 2011-07-27 17:51:57 +02:00
QAston
b0fe236265 Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo
*GetSpellProto is now GetSpellInfo
*SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].*
*sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo()
*SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff()
*SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class.
*GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections
*code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
2011-07-26 23:09:28 +02:00
Shauren
74e2d981ac Core/GameObject: Refactored destructible building handling, properly implemented spell effect repair 2011-07-22 21:22:05 +02:00
tobmaps
a3feb40eb6 Core/Spells: Define and implement SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS; revert SPELL_ATTR4_FIXED_DAMAGE
Closes #1307
Closes #2270
2011-07-22 23:30:23 +07:00
QAston
b9413f08b3 Core/Spells: Define and implement attributes SPELL_ATTR1_CANT_BE_REDIRECTED and SPELL_ATTR1_CANT_BE_REFLECTED, fixes some problems with Grounding Totem and Spell Reflection. 2011-07-13 20:14:55 +02:00
QAston
20e8c25b48 Core/Spells: Define and implement attribute SPELL_ATTR3_CANT_TRIGGER_PROC, change names of some attributes to better describe their functionality. 2011-07-13 17:18:04 +02:00
QAston
1c7616dcc8 Core/Spells: Define and implement SPELL_ATTR3_IGNORE_RESURRECTION_TIMER - now you can instantly resurrect with Rebirth spell. 2011-07-12 10:43:58 +02:00
QAston
cd1df639b2 Core/Spells: Define and implement SPELL_ATTR2_CANT_TARGET_TAPPED attribute. 2011-07-12 07:34:42 +02:00
QAston
2bf3bc334c Core/Spells: define spell attributes: SPELL_ATTR1_MELEE_COMBAT_SPELL, SPELL_ATTR1_FARSIGHT, SPELL_ATTR1_DONT_DISPLAY_IN_AURA_BAR 2011-07-05 15:40:17 +02:00
QAston
5b79175b7a Core/Spells: More spell attribute definitions. 2011-07-03 10:03:13 +02:00
QAston
29a7535638 Core/Spells: Define 2 more spell attributes: SPELL_ATTR6_CAN_TARGET_POSSESSED_FRIENDS and SPELL_ATTR6_CAN_TARGET_UNTARGETABLE 2011-07-02 17:06:19 +02:00
QAston
86dde83dda Core/Spells: Define many unknown SpellCastTargetFlags enum values, rename some target type enum values to follow standards, also correctly implement TARGET_UNIT_TARGET_PASSENGER. 2011-07-02 16:12:19 +02:00
QAston
ce75ced741 Core/Spells: define SPELL_ATTR1_CHANNEL_DISPLAY_SPELL_NAME(0x20000000) 2011-07-01 13:12:19 +02:00
QAston
3b8dce669d Core/Spells: Define attributes: SPELL_ATTR0_CAST_TRACK_TARGET(0x00400000), SPELL_ATTR1_CHANNEL_TRACK_TARGET(0x00004000), SPELL_ATTR0_ON_NEXT_SWING_2(0x00000400), add some attribute flag comments based on client research. 2011-07-01 12:47:26 +02:00