Commit graph

101 commits

Author SHA1 Message Date
VladimirMangos
dde16bc48c [11126] Rewrite InstanceSaveMgr related code.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
  This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.

* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
   - MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
   - DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
   - BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())

   Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.

* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
  return DungeonPersistentState (same pointer in fact with proper subcalss type)

* InstanceResetScheduler renamed to DungeonResetScheduler
2011-02-10 05:20:56 +03:00
VladimirMangos
6cfa64db97 [11123] Move respawn data to InstanceSave.
This make prev commit more useful.
In future InstanceSave also planned store local pools state.
2011-02-09 06:09:32 +03:00
SilverIce
50e681146e [11115] Implement .gm setview command 2011-02-07 04:14:09 +02:00
Schmoozerd
aa4c1be8cf [11104] Update model data dependent from unit scale in .modify scale
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-02-02 21:36:12 +03:00
VladimirMangos
da228b707d [10972] Implement mass mail gm commands.
* New comamnds mirror related normal sedn commands:
   - send mass items
   - send mass mail
   - send mass money

* Instead player name it expect or numeric racemask or textual race/team name or 'all'.
2011-01-06 06:55:51 +03:00
VladimirMangos
231c6d77ce [10969] Some cleanups in MailDraft API
* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items its can't be just shared
  and need preoprtly cloned, but item close is high price operation (guid use, DB tiuched and etc)
  So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.
2011-01-06 02:11:21 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
VladimirMangos
4ad58ecb49 [10831] Fixed crash at send mail from console
Inspired by patch from rsa.
2010-12-07 03:48:26 +03:00
VladimirMangos
b305f203b9 [10811] Use ObjectGuids in chat commands.
Still exist 15 GUID_LOPART uses in code.
2010-12-02 07:09:11 +03:00
VladimirMangos
938622bedc [10802] Use ObjectGuid in Mail code.
Some catched bugs fixed in mixed uint32/guid values using cases.
2010-12-01 15:11:08 +03: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
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
VladimirMangos
9c96949da9 [10713] player/group instance binding fixes.
* Use anum instead raw uint8 type in args
* Fixed crash when gm at continent invite to group gm in instance
  and then teleport to instance using .goname.
  When group leader teleport to instance it must get group bind instead solo bind.
* In other semilar cases detection report error as before but replace solo by group bind instead
  assert crash at enter to map.
2010-11-10 04:36:01 +03:00
VladimirMangos
c955941b55 [10627] Use ObjectGuid for player's selection and unit's target 2010-10-20 08:19:48 +04: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
VladimirMangos
2170c9c919 [10529] Water level in movement use fixes.
* Move selection allowed upper and lower heights for target point
  into near point core function used for contact/close point selection.
  Selection base at possibility target point searcher fly/swim(or walk by water bottom).
* Use vamp water level data so have proper water level in instances in movements.
* Use increased ground search distance for water level case.
2010-09-25 08:01:28 +04:00
VladimirMangos
dbe9c6f190 [10371] More wide use ObjectGuid in group code.
Also drop some unused functions.
And fix some uint32 -> uint6 guid assigns.
2010-08-18 13:43:55 +04:00
VladimirMangos
344dff303e [10334] Update shift-link related functions for chat command parsing.
Also

* Better single | detection as non-link case (doubled by client)
* Commands .pdump now allow quoted filename (usefull if filename path include whitespaces)
2010-08-10 00:20:58 +04:00
VladimirMangos
59e672f1bc [10331] More basic chat command parsing functions and its uses.
* Commands .debug update and .modify bit removed as redundent
* Command .debug getvalue now can output values in float/int/hex/bitstring formats
* Command .debug setvalue now ca accept values in int/float/hex/bitstring formats
* Command .debug mod32value renamed to modvaue and can add int/float or apply hex mask
  (in 3 modes: |= &= &=~ ) to value in update field
* Command .debug moditemvalue added similar .debug modvalue for item case.
* Command .npc set movetype now propertly update spawned in world creature state.
* Command .modify spell renamed to .debug spellmods and restored to working state.
* Commands .account password and .account set password now allow use quoted strings
  for passwords and then now possible set from chat/console passwords with white spaces.
* Many commands converted to new functions without modify functionality
  except better error detection in some cases at wrong command syntax use.

* Also fixed warnings in reload commands after prev. chat commit. Thanks to SkirnirMaNGOS for reporting.
2010-08-09 03:52:11 +04:00
VladimirMangos
edace1948e [10324] Implement new basic functions for chat command parsing.
* Now can be used as quotes any strings with symbols ' " [] around.
  For example can be used: .additem [Tourch] or .additem "Tourch".
  And in similar cases wher before [] or "" only canbe used in commands.

* New functions support propertly extraction shift-links as optional first args
* Also added more safe functions for extraction int32/uint32/float values.

For more wide use new functuons specialized extraction functions also need chnaged to same way work.
This is goal for future work at this part code.
2010-08-06 06:31:25 +04:00
VladimirMangos
0cc1fbe697 [10322] In chat command handlers use char* arg instead "const char*"
We in any case modify args string content at parsing in commands,
so cast it to char* early. This let avoid lot later casts.

Some other code style exist in related code.
2010-08-06 01:14:33 +04:00
NoFantasy
25d9fd265b [10293] Correct a not exitan...non-existin... a word that is often spelled wrong
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-07-30 18:26:08 +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
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
VladimirMangos
41f8cfb14c [10123] Fixed recent problem with enter to dungeons in group.
Problem related to implicit get map id from player in Group::GetBoundInstance
when in some cases check done before player mapid update.
2010-06-30 00:45:14 +04:00
VladimirMangos
67a7892075 [10114] Store associated InstanceSave for dungeon map in Map object 2010-06-27 21:11:26 +04:00
NoFantasy
3eb2d2910e [10112] Rename GetObjectSize function to GetObjectBoundingRadius
To reflect better what the function should actually return and also to clarify when used in misc calculations.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 14:14:23 +02:00
NoFantasy
2375a1cb71 [10110] Add function Get/SetObjectScale and update code where scale is set.
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-06-27 12:39:29 +02:00
VladimirMangos
a504b4d200 [10106] More modes for .go commands
* Now '.go' command can be used with creature_entry/gameobject_entry shift links (output of .lookup creature/object commands)
* Now '.go object' command sipport id-mode and name part mode similar .go creature case: .go object id #gameobject_id or .go object $namepart.
* HandleGoHelper use in more commands also.
2010-06-26 17:26:00 +04:00
VladimirMangos
2f3c518935 [10096] Allow negative X coordinate in .go command 2010-06-22 14:13:59 +04:00
VladimirMangos
619f01e150 [10086] Implement use .go command with shiftlinks or player name.
* Now if for .go command provided no X Y Z args command will not teleport player to nowhere.
* Instead command allow used with player name and work as simplifed .goname
  (teleport to player _point_ in user instance binding, not to player instance)
* Also command can be used with diferent point coordinates provided shift-links:
  - player (result for example .lookup player account)
  - creature (result .list creature command)
  - gameobject (result .list object command)
  - tele (result .lookup tele)
  - taxinode (result .lookup taxinode)
2010-06-20 07:13:20 +04: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
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
a27ff3e79d [9602] Simplify creating mail draft with content text, cleanup includes. 2010-03-18 12:10:47 +03:00
VladimirMangos
996a523302 [9583] Fixed speed recalculation at remove .mod speed rate while mounted/etc. 2010-03-14 20:55:54 +03:00
VladimirMangos
a12fecab0d [9575] Use ObjectGuid in Map object stores/world access/search. 2010-03-12 14:38:38 +03:00
VladimirMangos
c8fd454a79 [9551] Add and use PackedGuid wrapper.
Also
* use more wide bytebuff << >> operators for objects
* use at read packet faisl alsways exception way instead some time used bool results.
2010-03-08 20:23:16 +03:00
patman128
ebee99c396 [9432] Propertly show zone coords in .gps after recent changes.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-02-22 18:53:27 +03:00
VladimirMangos
b2019913d4 [9422] Return success result for Zone<->map coordinates convertions.
This will prevent #INF-inity values in gps for zones where
zone coordinates calculation impossible with current code.

Also fix small typo in debug output format for honor
2010-02-20 17:50:37 +03:00
VladimirMangos
eaecc467d5 [9212] Implement pet speed synchronization with owner only for follow mode.
* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
2010-01-19 03:56:26 +03:00
mns
dd6a6fcd58 [9157] Prevent crash after .goname/namego teleports at same bg/arena.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-12 07:37:02 +03:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
b482518
65c12d4998 [9095] Allow apply .modify scale to targeted creature (without save scale).
Also add command description to mangos.sql.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-01-01 18:21:39 +03:00
VladimirMangos
b5980f061a [8833] Implement new commands for add/remove/lookup titles.
Inspired by patch suggested by LordJZ.
2009-11-19 07:16:13 +03:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
dc725ad6b8 [8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
2009-11-08 03:54:41 +01:00
VladimirMangos
d009994f59 [8768] Rewrite code for prepare and send mails.
* Move send functions to new MailDraft class from WorldSession
* Simplify use different args combinations used in SendMailTo
  by groupping its by functionality in Helper classes. This also will prevent wrong way use args combinations.
2009-11-03 17:34:23 +03:00
VladimirMangos
a9af7f2b1c Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties. 2009-10-06 02:12:02 +04:00
VladimirMangos
7974e1ebcb Merge branch 'master' into 320 2009-09-10 05:46:08 +04:00