Commit graph

74 commits

Author SHA1 Message Date
Antz
9d20fe2b32 Initial project location adjustment 2020-02-17 09:22:43 +00:00
Antz
f1c9e0f94b [Sync] Project header sync 2020-02-17 09:22:26 +00:00
sanctum32
6658234c07 [12695] Improve WaypointMMGen
* Add correct Reset position (Npc will evade now to the last reached waypoint, and not to the next waypoint)
* Add proper return value for the CONDITION_LAST_WAYPOINT

* Let WaypointMMGen behave better after evading (keep PAUSED state, keep waittimer (original author @Schmoozerd)
2020-02-17 09:20:37 +00:00
sanctum32
c6ae586f4a [12684] Fix a VC90 compile problem. Also add some const correctness
author @Schmoozerd
2020-02-17 09:20:31 +00:00
rsa
60a7bec73f [12675] Fix MoveGen's interrupting after last commit
Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12473] - baa6525)
2020-02-17 09:20:25 +00:00
boxa
394be2c5bf [12674] Rework StopMove to not start movement if already stopped
thx to Schmoozerd for hint
thx to rsa for pointing to bug

Signed-off-by: Schmoozerd <schmoozerd@cmangos>
2020-02-17 09:20:24 +00:00
Schmoozerd
e269f49f8e [12672] Improve Waypoint Management
* Allow waypoints that have point-ids not from 1 to n
* Remove possibly bad sql-statements to "fix" the above property
* Simplify code a little bit

Remaining TODO: Bring commands up-to-date and also make things more simple instead of using the database to store visual waypoints
2020-02-17 09:20:23 +00:00
Antz
1997c1e903 Rebase resync 2020-02-17 09:19:44 +00:00
billy1arm
ef445ea523 [12632] Revert previous commit (see Notes) 2020-02-17 00:54:15 +00:00
Schmoozerd
a27787851c [c12537] Update Authorship information
(based on commit [12388] - 037f217)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
2020-02-16 21:27:46 +00:00
Schmoozerd
a05738717a [c12536] Happy New Year 2013
Update authorship information and prepare for easier ways next year

Signed-off-by: Schmoozerd <schmoozerd@cmangos>

(based on commit [12325] - b7dbcda)
2020-02-16 21:25:01 +00:00
Yaki Khadafi
ef498a7689 [0020] Update splines. Author: @Shauren.
Also use movement StatusInfo for players to write movement information.

Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
2020-02-16 02:54:19 +00:00
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
6379a746d7 Various Cleanups (game T-Z) 2012-07-19 21:52:26 +02:00
sixsixnine
2f0ed05566 [11912] Use mmaps for MovementGenerators 2012-02-06 23:18:34 +01:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
SilverIce
7c49e4afb6 [11782] fix the issue in FlightPathMovementGenerator that event for last path point was not processed 2011-09-02 14:04:26 +03:00
SilverIce
a7610f79c7 [11754] Implement jump (parabolic movement) effect
Also correct destination calculation in Unit::KnockBackFrom - now spline knockback effect works similar to client's effect (same amplitude, speed etc)
2011-07-26 13:56:06 +03:00
SilverIce
9d566398ad [11720] 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:

 1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
 2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
 3. Now possible to move by paths with multiple points, send whole path to client.
2011-07-08 17:25:13 +03:00
SilverIce
26d73759e2 [11711] Rewrite WaypointMovementGenerator 2011-07-04 05:48:36 +03:00
SilverIce
75e1e7c3a3 [11384] Use SPLINEFLAG_FLYING for flying creatures, SPLINEFLAG_UNKNOWN7 is never used. Simplify Map::CreatureCellRelocation code 2011-04-20 02:55:30 +03:00
VladimirMangos
04c21c95d3 [11159] Remove now redundent GetDBTableGUIDLow support.
Now any creatures/gameobjects loaded base at DB data
in non-instanceable/instanceable maps always have same guid
as in DB data.

* Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
2011-02-14 07:20:09 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
zergtmn
ec6089bbd8 [10935] Move script calls to ScriptMgr
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.

Signed-off-by: zergtmn <zerg@myisp.com>
2010-12-29 21:48:06 +05:00
Schmoozerd
16cd545df8 [10761] Basic support for target-name in MonsterSay/etc
Change MonsterSay's target to pointer.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-20 21:27:21 +03:00
Schmoozerd
146e7d3970 [10760] Remove unneeded non-player Say et al.
Now expected direct use non-player WorldObject::MonsterSay/etc version

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-11-20 21:26:07 +03:00
VladimirMangos
f5cf98e9f4 [10748] Convert MonsterSay/Say and similar functions to ObjectGuid use. 2010-11-19 20:34:23 +03:00
Ambal
f67d89f109 [10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-11-16 21:08:28 +02:00
DasBlub
61102e3b16 [10610] Renamed some functions from the Creature class
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
2010-10-14 22:07:04 +02:00
NoFantasy
3b35153b7d [10533] Revert [10528], simply wrong (scriptId already called properly)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-25 11:33:15 +02:00
NoFantasy
f92518ee14 [10528] Run creature_movement_scripts also at first waypoint
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-09-24 19:05:53 +02:00
NoFantasy
db7db6382a [10362] Implement creature_movement_template
Template can be used for several cases:
* Unique creature that are already spawned in database (requires creature.MovementType=2 like guid based creature_movement)
* Summoned creature that has a pre-defined path (requires creature_template.MovementType=2)

Note that creature_template.MovementType=2 should be used with care, and must not be used for creatures that may be summoned in random locations in world.

Added additional startup checks for existing creature_movement-table

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-16 14:39:45 +02:00
NoFantasy
647f731e3b [10358] A small spoon of changes and cleanup for WaypointMovementGenerator
* Initialization to ensure destination is always set (prevent evade problem)
* Simplify how behavior for node is processed, incl fix MovementInform script call (based on idea/past code from Quriq14)
* Make sure last node is also processed correct (DB script for last node will now work as expected)

As usual if any problems occur, you can call our toll free customer support number.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-14 23:38:49 +02:00
NoFantasy
c7761a6db9 [10355] Correctly clearUnitState at Interrupt of WaypointMovementGenerator for creature
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-08-13 12:31:38 +02:00
NoFantasy
2ad9cd34b2 [10299] Add new script call ProcessEventId
Let script library know when some event is about to start. Event id's may be found in several sources, such as spells, GO's and transport/taxi paths.
Database scripts may be prevented by returning true from script side whenever needed. If false, DB script will run like normal.
New database table event_id_scripts will need a ScriptName for the event id, in same way as for example areatrigger_scripts.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-31 17:52:38 +02:00
Lynx3d
01d326b90d [10202] Rename isInFlight() to IsTaxiFlying() and UNIT_STAT_IN_FLIGHT to UNIT_STAT_TAXI_FLIGHT.
Also add IsFreeFlying() function to Player class.
2010-07-17 02:06:28 +02:00
NoFantasy
312a076491 [9891] Implement *_scripts for creature_movement
New field script_id in creature_movement can be filled for each waypoint point and run the corresponding script from creature_movement_scripts.
Script_id can be any value and several points/creatures can share the same script (with limits of course, such as script depending on location and other factors).

DB projects are advised to move current text, spells and emotes data in creature_movement fields as these fields are strictly no longer needed and may be fully removed in the future.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-14 12:16:54 +02:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
VladimirMangos
3f5eccd8a9 [9830] Implement taxi/transport event scripts support. 2010-05-03 19:39:53 +04:00
VladimirMangos
57dcc84940 [9824] Use in taxi flight movegen original taxipath data. 2010-05-02 06:14:26 +04:00
VladimirMangos
5c7f6356d6 [9644] Changes in emotes work.
Waypoint/db script/event ai/'.npc playemote' emote data now auto select by emote id way to execute:
oneshot or persistent state

So if in referenced DB data wrongly used state emote as oneshot case this will work in different way now.
2010-03-30 22:13:55 +04:00
VladimirMangos
c179c45087 [9461] Some another cases when movegen can be lost while updating. 2010-02-27 01:21:16 +03:00
VladimirMangos
73eeac234f [9454] Fixed some time existed multi-map taxi problem.
Interrupt taxi movegen at far teleport time with remove related state.
Far teleport triggered code not expect this state set.
2010-02-26 00:48:10 +03:00
VladimirMangos
87b08b4fa1 [9445] Possible fix often crashes in waypoint movegen.
Thanks to DrKLO for research source of problem!
2010-02-24 22:40:16 +03:00
VladimirMangos
0dfc2093d5 [9437] Move waypoint's GetResetPosition function body to .cpp. 2010-02-23 04:16:48 +03:00
VladimirMangos
d3fc17a81d [9435] Avoid useless creature running around at evade
* If creature near respawn point and by defult do random movement
  then restart from current point
* If creature have default waypoints movegen restart from last
  updated point. Not reload waypoints
2010-02-22 22:56:13 +03:00
VladimirMangos
f47f5a1deb [9434] Prevent crash at script call that modify movegen list at MovementInform call. 2010-02-22 22:04:08 +03:00
tomrus88
db547a008a Get rid of monster movement flags, since it's really spline flags.
Thanks to Ralek for research.
2010-02-07 15:03:36 +03:00
VladimirMangos
64ba6c5714 [9213] Fixed typos in unit states used in waypoint movegen. 2010-01-19 16:15:23 +03:00
VladimirMangos
6a2e8064f1 [9208] Big cleanup in UNIT_STAT_* use
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
  Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
  UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
  And UNIT_STAT_CONFUSED_MOVE for check real move in this state
2010-01-18 11:59:10 +03:00