Commit Graph

71 Commits

Author SHA1 Message Date
Shauren
66d8ccde7f Core/PacketIO: Fixed chat packet building in CreatureTextMgr
Closes #14871
2015-06-15 00:25:18 +02:00
Shauren
cb854a2b7b Core/Maps: Removed dbguid/spawnid grid searchers, they are no longer neccessary 2015-06-08 17:48:21 +02:00
Gacko
007ab5b801 Fix warning 2015-05-03 12:17:58 +02:00
Shauren
ca83e14f8b Core/Entities: Reworked guid scopes
* Added ObjectGuid traits to easily access whether guid type can be generated globally (ObjectMgr) or not
* This adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396eb0b
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
2015-04-28 21:19:46 +02:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Shauren
15fbb6f46f Core/Entites: Updated GUID format 2014-10-29 21:13:21 +01:00
DDuarte
07a640de0d Core: Fix warnings, mostly wrong printf formatters 2014-10-27 21:56:44 +00:00
Shauren
7afab9f783 Core/Entities: Updated HighGuid values 2014-10-27 12:03:35 +01:00
Shauren
9e1930959d Core/Entities: Changed object lowguid to uint64 2014-10-26 02:57:28 +02:00
Shauren
76f1f85d8b Core/Entities: Second part of required database changes for migrating guids to 128 bit - all fields storing lowguid must be extended to uint64 2014-10-23 21:34:03 +02:00
Shauren
cffbcea877 Core/Entities: Sixth part of removing GetGUIDLow() uses 2014-10-22 23:31:10 +02:00
Shauren
034561792c Core/Entities: Second batch of removing implicit conversions of ObjectGuid to uint64 2014-10-21 20:27:00 +02:00
DDuarte
c678eaa71e Core/MapScripts: Use proper enum value for boss whisper in SCRIPT_COMMAND_TALK 2014-09-19 15:19:53 +01:00
DDuarte
878b7d3811 Core/MapScripts: Use proper source unit in SCRIPT_COMMAND_TALK
Closes #13161
2014-09-19 15:04:24 +01:00
Shauren
7d1d55124c Merge branch 'ObjectGuid' of https://github.com/TrinityCore/TrinityCore
Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Scripting/MapScripts.cpp
	src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
	src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
	src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp
	src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
	src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp
	src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
	src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp
	src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
2014-09-16 21:50:01 +02:00
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
joschiwald
59baaeec48 Core/Chat: cleanup MonsterText methods 2014-09-13 20:41:31 +02:00
DDuarte
27479cf571 Core/Scripts: Nuke db_script_string table and make SCRIPT_COMMAND_TALK with broadcast_text instead
Original code by @Ascathor with modifications
Closes #13092
2014-09-13 02:45:51 +01:00
jackpoz
0f07dcfea6 Core/Scripts: Fix possible crash
Fix possible NULL dereference crash spotted by Coverity.
2014-08-06 20:55:43 +02:00
Shauren
7532864264 Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
2014-07-17 15:42:57 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Malcrom
fe95371d9a Core/Scripting: Replace casted with cast as casted is not a word. 2013-12-25 14:16:55 -03:30
Shauren
107af52853 Core/Chat: Refactored building chat packets
* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
2013-12-23 14:23:49 +01:00
jackpoz
4416c16045 Core/Scripts: Fix possible NULL dereferences
Fix possible NULL dereferences probably caused by a typo.
2013-11-29 20:48:45 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
Shauren
ce55647c41 Core/Transports
* Rewritten path generation, now uses splines - timers are a lot more accurate now
* Implemented stopping transports
* Implemented spawning transports in instances
* Implemented spawning gameobjects as transport passengers
* Transport passengers are now stored in creature/gameobject table using gameobject_template.data6 from transport's template as map id
2013-10-16 18:37:29 +02:00
Shauren
112bc49c9a Core/Units: Removed most calls to SendMovementFlagUpdate for creatures 2013-06-30 16:31:24 +02:00
Malcrom
66978cfc3b Core: Some function renaming. 2013-06-11 19:54:27 -02:30
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Spp
802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
b5c9ab8802 Core/Misc: Reduction of header dependencies - Step II 2012-11-20 12:30:30 +01:00
Spp
55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
Gyx
360014856d Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 13:42:04 +08:00
Spp
f495e0efe4 Warning fixes and some random cleanup here and there 2012-03-07 14:09:18 +01:00
Shauren
dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01: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
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
Shauren
358b33239a Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit 2011-11-23 19:17:33 +01: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
kaelima
801ab6dd37 Core/MapScripts: Fixed SCRIPT_COMMAND_QUEST_EXPLORED again after 26869bda30. 2011-10-11 23:40:04 +02:00
megamage
3ba22d0d06 Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management. 2011-10-10 17:39:34 -04:00
Machiavelli
f266d3d957 One last culprit... 2011-10-08 14:36:38 +02:00
Machiavelli
26869bda30 Core: Fix a boatload of crashes after the mass cleanup... Thanks to Broodwyrm for spotting the culprits 2011-10-08 14:33:53 +02: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
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
Bootz
f1ccb83dc0 REPO: Code-style change
* Fixed pUnit-unit
2011-10-07 10:48:56 -05:00