Commit graph

210 commits

Author SHA1 Message Date
VladimirMangos
0065693c4c [10231] Use VMAP::VMAPLoadResult instead raw int loadMap result. 2010-07-20 01:27:07 +04: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
TGM
e4495d4c2d Fixed typo in enum value name.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-15 21:59:03 +04:00
VladimirMangos
f72b8e60a5 [10196] Use enum for instance reset event types, some related cleanup code. 2010-07-15 18:31:38 +04:00
Lynx3d
5e89098a61 [10165] New collission system (vmap) implementation
Important:
* You have to re-extract and assemble vmaps
* Update your config file, new option 'vmap.enableIndoorCheck' added

New features:
* Include WMO+DBC area information for correct subarea identification and indoor check
* Support for WMO liquid (fishing/swimming in cities, instances and oterh WMO based environments)

Technical changes:
* New Bounding Interval Hierarchy (BIH) data structure for better performance
* Referenced model data for reduced memory usage,
  needs more files, but reduces overall file size from ~1.9GB to ~550MB

Additional Authors:
arrai (DBC handling and indoor detection)
faramir118 (windows support and bug investigation)
And of course thanks Vladimir for a lot of patience and support!
2010-07-08 23:17:26 +02:00
crackm
52e4c0ab17 [10146] Implement SCRIPT_COMMAND_PLAY_MOVIE (19)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-07-03 23:58:41 +04:00
VladimirMangos
67a7892075 [10114] Store associated InstanceSave for dungeon map in Map object 2010-06-27 21:11:26 +04:00
VladimirMangos
e88a718c5d [10094] Extract instance reset scheduler from InstanceSaveMgr
Reset scheduler code not need explicit access to instance saves,
and no reson mix it with instance save managment code in single class
2010-06-22 04:40:33 +04:00
VladimirMangos
1eed65d5ac [10082] Drop now unused dotconfpp lib code. 2010-06-20 02:20:51 +04:00
SilverIce
6ca609629c [10073] Make object active at applying view on it
also isActiveObject check moved to WorldObject - all worldobjects are inactive by default, excluding players
this is a final part of cameras implementation

(based on commit efc9623)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also remove template-way code selection for object for Map::AddToActive/Map::RemoveFromActive.
This simplify function use from not Map code.
2010-06-18 00:19:12 +04:00
SilverIce
e427ce80cc [10052] Camera System
(based on SilverIce's repo commit 4f2f4ab + next 3 more)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-14 07:23:03 +04:00
XTZGZoReX
aa62225c68 [9996] Remove grid state debugging code and move state machine to MapManager. 2010-05-28 15:01:04 +02:00
XTZGZoReX
28c3de5093 [9995] Move GridMap class (and related structs/enums) to separate cpp/h.
Also rename some structs/enums and fix some code style.
2010-05-28 13:34:14 +02:00
NoFantasy
5a72466935 [9890] Add TYPEMASK_WORLDOBJECT to enum TypeMask
Check typemask and replace a few dynamic_cast with more simple casts.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-13 17:51:49 +02:00
NoFantasy
31ec245b68 [9889] Extend features available for SCRIPT_COMMAND_TALK
* Allow other than Creature to talk.
* Add "buddy-talk", using creature entry in datalong2 (the npc who will do the talk instead of the original source). Value in datalong3 is how far to look for the buddy.
* Add data_flags making it possible to have conversations between units, controlling who does the talking and to whom, including make player do the talking when player is not already the source.

Notes and details are added in the comments for SCRIPT_COMMAND_TALK

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-13 16:39:04 +02:00
NoFantasy
b208effca6 [9883] Change SCRIPT_COMMAND_TALK to support CHAT_TYPE_* using enum ChatType
Making data consistent with other, similar tables like EventAI's text tables.
This convert existing data and also adds support for all chat types.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-12 14:09:38 +02:00
NoFantasy
3790084fb1 [9870] Add script id to all remaining SCRIPT_COMMAND_* error message outputs.
Note that script id can be id from different DB tables. It will however make it easier to find the source of any error.
More code cleanup and style corrections.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-11 11:46:18 +02:00
NoFantasy
d02313d94c [9869] Extend SCRIPT_COMMAND_QUEST_EXPLORED to allow player<->player as source/target
Additional code cleanup and output script id in error messages.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-05-11 11:00:58 +02:00
hunuza
68abd76c97 [9844] Fix some whitespace errors.
Signed-off-by: hunuza <hunuza@gmail.com>
2010-05-07 12:25:12 +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
6dec6c8a9f [9836] Make log output code more consistent for diff build modes.
* Make possible have debug output if build in release mode.
* But preserver current optimization in avoid debug output args
  calculation if debug ouput disabled if done using DEBUG_LOG
* Implement in same way BASIC_LOG, DETAIL_LOG. Recommended use
  its instead explicit access to sLog
* Use variadic macros for DEBUG_LOG and other new defines.
  All supported VS/GCC have its support as C++ extension.
* Add DEBUG_FILTER_LOG and semilar defines for filered log output and use its.
* Also move recent added debug output for transport events under LOG_FILTER_TRANSPORT_MOVES
2010-05-04 22:29:11 +04:00
VladimirMangos
5d84dbb492 [9749] Partly revert "[9736] Added more usable interface for grid visits"
In part related broadcasts by explicit provided Map pointer (in different object GetMap() requested)

This is must fix recent crashes in Map::MessageBroadcast
2010-04-15 09:25:15 +04:00
SilverIce
e3f3f3410a [9736] Added more usable interface for grid visits
(based on SilverIce's repo commit f20f01e)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-04-12 15:15:55 +04:00
SilverIce
53eeebf2fe [9725] removed PlayerNotifier and related Map::UpdatePlayerVisibility function, used UpdateObjectVisibility instead
(based on SilverIce's repo commit e226019)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Note: this changes not affect in any good/bad way recent problem with player guids.
2010-04-11 06:27:57 +04:00
hunuza
6750ce9185 [9650] Some corpse related clean ups.
Old bones remove code anyway was dead, so remove it.

Signed-off-by: hunuza <hunuza@gmail.com>
2010-03-31 16:40:47 +02: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
XTZGZoReX
51fd11c92c [9638] Replace all C assert()s with MaNGOS ASSERT() macro. 2010-03-29 19:29:42 +02:00
balrok
1b2eefd721 [9598] update battlegrounds per map + cleanup at delete
this will be useful, if we have multithreaded mapupdates one day

since i couldn't reproduce any errors regarding to self deletions of
battlegrounds i removed the m_deleteThis variable
2010-03-17 00:47:22 +01:00
VladimirMangos
e692862827 [9593] Fixed bug in instance binding in case heroic/25-man raids difficulties
In fact typo in my old commit at adding support MapDifficulty.dbc.
2010-03-16 18:15:29 +03:00
NoFantasy
29b2c80449 [9577] Implement SCRIPT_COMMAND_DESPAWN_SELF (self = creature in this context)
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-12 17:32:24 +01:00
NoFantasy
dbbc45828a [9576] Implement SCRIPT_COMMAND_CREATE_ITEM to use when no spell exist
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-03-12 16:19:34 +01:00
VladimirMangos
a12fecab0d [9575] Use ObjectGuid in Map object stores/world access/search. 2010-03-12 14:38:38 +03:00
VladimirMangos
c4f3578226 [9571] Create and use ObjectGuidGenerator/IdGenerator template classes.
* This is let finally hide guid structure in ObjectGuid.h/.cpp code.
* Shared related code.

NOTE: while switch to use new clasess one more problem has been detected
with not-safe code in .pdump work for future per-map multi-threading.
It's need rewrited before will possible safe use in like case.
For current single world thread case it's safe.
2010-03-11 16:32:09 +03:00
VladimirMangos
530580876f [9565] Add detection code for partly cave area 3780 2010-03-10 17:26:28 +03:00
VladimirMangos
244d25189c [9433] Implement detection subzones 4716 and 4740 of zone 4395. 2010-02-22 18:53:49 +03:00
VladimirMangos
5af05a314e [9405] Make all movements instant applied.
* Drop delayed moves list in Map code
* Apply movement coords update always at call including movement to different cell/grid.
* Instead removed functionality mark creature as need move notify broadcast at next tick, do it.

This must resolve porblesm with CreatureRelocation in past not always update position to new expected at call
And in resul next code fail or work in strange way. Mark creature for notifier call at next Update
let safe main part remopved functionality implemented in another way: prevent cascade (or infinity chain)
in move updates. In fiture possible implement move notify call not at each tick for save time.
2010-02-18 01:09:33 +03:00
VladimirMangos
54559b5c03 [9401] Resolve porblems with waypoints moved/etc after [9400]
* Move movegen Interrupt/Reset calls from CreatureRelocation that called and from another movegens.
* Add this called to NearTeleportTo creature case and new MonsterMove* functions that considered
  as special moves similar instant movegens.
* NearTeleportTo/MonsterMove functions recomended used instead explicit use CreatureReolcation+SendMosterMOve pairs
  for proper reaction at movement from creature movement generators.
2010-02-17 17:22:43 +03:00
Lynx3d
c044d64618 [9400] Creature relocation acts like instant movement generator, so current generator expects interrupt/reset calls to react properly.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-16 23:09:28 +03:00
AlexDereka
ebfb0f9835 [9389] Cleanup config data. Use proper names and expected types. 2010-02-15 15:29:06 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
AlexDereka
4338c9105d [9324] Fix some gcc warnings 2010-02-08 02:27:34 +03:00
VladimirMangos
7c20d0a1d8 [9311] Switch to support client 3.2.2 (build 11403)
Merge branch '330'

You need regenerate dbc/map/vmap files. Use updated ad.exe for this.
2010-02-05 22:41:25 +03:00
SilverIce
0c8fccbd47 [9307] Grid containers, cleanup
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-05 01:46:40 +03:00
VladimirMangos
07e699b8d3 [9304] Propertly detect underground area 4425 2010-02-04 23:21:12 +03:00
VladimirMangos
55bc9e8da7 Include build in to .map files data.
This let not update map fiels format version at switch to new build
for prevent use wrong .map files. Build checked at loading.
2010-02-03 16:17:13 +03:00
tomrus88
b85417df73 Movement packets cleanup. 2010-02-01 17:03:04 +03:00
NoFantasy
76748cb75a [9268] Fix one areaflag for city subarea
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-30 13:34:38 +01:00
NoFantasy
2b3971ed26 [9249] Move instance call OnPlayerEnter() to after really added to map
Also clarify log message and comment for function.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-24 16:10:28 +01:00
XTZGZoReX
0ff9250de2 [9245] Remove CellLock class and all cell-level thread locking.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
2010-01-23 21:36:15 +01:00
VladimirMangos
e15f548bed Merge branch 'master' into 330 2010-01-08 16:03:27 +03:00