Commit Graph

110 Commits

Author SHA1 Message Date
Spp
8da0bbdbb3 Core: Fix compile (Thanks to Sovak for reporting). Remove many warnings and Fix possible out of bounds access to Void storage 2012-08-17 10:25:29 +02:00
Subv
d82266bc0e Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
	src/server/authserver/Server/AuthSocket.cpp
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Chat/Chat.h
	src/server/game/Chat/Commands/Level1.cpp
	src/server/game/Chat/Commands/Level2.cpp
	src/server/game/Chat/Commands/Level3.cpp
	src/server/game/DataStores/DBCStores.cpp
	src/server/game/DataStores/DBCStructure.h
	src/server/game/Entities/Object/Object.cpp
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Globals/ObjectMgr.cpp
	src/server/game/Guilds/Guild.cpp
	src/server/game/Guilds/GuildMgr.cpp
	src/server/game/Handlers/AuctionHouseHandler.cpp
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/ChatHandler.cpp
	src/server/game/Handlers/GroupHandler.cpp
	src/server/game/Handlers/ItemHandler.cpp
	src/server/game/Handlers/MailHandler.cpp
	src/server/game/Handlers/MiscHandler.cpp
	src/server/game/Handlers/MovementHandler.cpp
	src/server/game/Handlers/PetHandler.cpp
	src/server/game/Handlers/QuestHandler.cpp
	src/server/game/Handlers/VehicleHandler.cpp
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/game/Spells/SpellMgr.cpp
	src/server/game/World/World.cpp
	src/server/scripts/Commands/cs_debug.cpp
	src/server/scripts/Commands/cs_modify.cpp
	src/server/scripts/Commands/cs_reload.cpp
	src/server/scripts/Kalimdor/azuremyst_isle.cpp
	src/server/shared/Logging/Log.cpp
	src/server/shared/Logging/Log.h
	src/server/worldserver/worldserver.conf.dist
2012-08-07 13:44:22 -05:00
Nay
5518daa74b Core/Chat: Send addon prefix in addon messages
Correct structure of some CMSG_MESSAGECHAT_ADDON_x opcodes
Fix a compile error in HandleReforgeItemOpcode
2012-08-04 15:58:09 +01:00
Nay
48db4b2b7d Core/PacketIO: Fix and enable SMSG_MESSAGECHAT
TODO: 	- Send addon prefix in this packet when language is Addon
	- Cleanup uses of SMSG_MESSAGECHAT (17 different "handlers" for it is not okay) (long term)
	- Missing a CMSG_MESSAGECHAT_ADDON_x or two
2012-08-04 01:39:18 +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
Vincent-Michael
4a3df36bd9 Core/Commands: Convert more misc commands in commandscript 2012-07-29 15:03:26 +02:00
Vincent-Michael
6f69a3326d Convert misc commands in commandscript 2012-07-29 01:23:51 +02:00
Vincent-Michael
a9812a0860 Core/Commands: Convert ticket commands in commandscript 2012-07-15 22:20:22 +02:00
Vincent-Michael
9e84942917 Core/Commands: Convert ban / unban / baninfo / banlist commands in commandscript 2012-07-14 13:37:57 +02:00
Vincent-Michael
91cd7109e4 Core/Commands: Convert lookup commands in commandscript 2012-07-06 21:38:18 +02:00
Vincent-Michael
f8374fac0b Core/Commands: Convert guild commands in commandscript 2012-07-02 21:57:50 +02:00
Vincent-Michael
5de44b3632 Core/Commands: Convert reset commands in commandscript 2012-06-21 23:41:03 +02:00
Vincent-Michael
d3bf4626d0 Core/Commands: Convert list commands in commandscript 2012-06-21 17:21:23 +02:00
Xees
a312cd4ba1 Scripts/Commands: Convert character and server commands to commandscript
Closes #6856

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-06-21 00:11:11 +01:00
Vincent-Michael
c19f13e6fc Core/Commands: Convert cast commands in commandscript 2012-06-19 20:42:11 +02:00
Vincent-Michael
0e8889415d Core/Chat: Convert instance commands in commandscript 2012-06-14 17:33:46 +02:00
Shocker
83e1e17649 Merge pull request #6008 from cookta2012/troy09
Core/Commands: Some porting and organizing

Moving a commands around eliminating a unnecessary file, and porting the "demorph" command
 * moved the "wpgps" command into the cs_debug.cpp because it seems more fitting
 * organized the "modify speed" commands into a table of their own
 * moved the "gps" command into the cs_misc.cpp
2012-04-23 17:21:42 -07:00
Machiavelli
74b5b3bd8e Core/Commands: Remove recently defunct .hover command. All this spell did before hoverheight changes was .cast/.unaura spell 11010. And since we do not have .autoattack, .steadyshot, .heroicstrike, .shootwand etc. either, there's no place for this command in the core (there never was). 2012-04-12 12:04:04 +02:00
faramir118
e3f198ca56 couple wrong return types 2012-04-11 19:58:12 +02:00
cookta2012
7e793575be Moving a commands around eliminating a unnecessary file, and porting the "demorph" command
* moved the "wpgps" command into the cs_debug.cpp because it seems more fitting
* organized the "modify speed" commands into a table of their own
* moved the "gps" command into the cs_misc.cpp
2012-04-05 17:43:06 -05:00
Subv
2987d4f40d Core/Commands: Allow combatstop command to be used from console with the player name as parameter
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-01 11:03:47 -05:00
Shauren
c8bf09d504 Core/DBLayer: Match field type reads in core with data types in db for prepared statements 2012-03-24 16:44:01 +01:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
Shauren
5c00e93602 Core/Commands: Added lost group commands 2012-02-25 16:56:25 +01:00
Aokromes
995fa11e01 This is ........... 3 commits to fix the typos of 3 rows.... 2012-01-05 19:11:04 +01:00
Aokromes
894d4c0d66 More typo fix by Persephone. 2012-01-05 12:28:09 +01:00
Aokromes
65a427a322 Typo fix by higi closes #3633 2012-01-05 11:36:17 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
Machiavelli
db8c10c7bf Core/Commands: Make GM Ticket commands console enabled. (Aokromes' Suggestions)--; 2011-12-14 14:12:42 +01:00
Bootz
f75ec5ba2b Core: Codestyle clean-up
"plr"->player

Note: codestyle methods needs maintained, Player* player.
2011-11-07 11:06:39 -06:00
kaelima
b5cb41b4ea Core/Player: Make chat tag (last byte in SMSG_MESSAGECHAT) a bitmask. 2011-11-07 07:16:31 +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
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
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
327fe7c247 Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console 2011-09-08 15:11:55 +02:00
Spp-
eddcb8ffbf AccountMgr singleton converted to namespace with free functions as it has no internal state 2011-09-08 10:49:58 +02:00
Chaplain
fb27848510 Core: Clean up here and there.
*replase postfix iterator increment\decrement with prefix in cycles
*replase strlen(*char) != 0 with *char[0] != '\0'
*replase strlen(rStr.c_str()) with rStr.length()
2011-08-23 18:09:08 +03:00
QAston
df87f00e73 Core/Commands: Add .cast dest #spellid #x #y #z which orders selected unit to cast a spell at selected destination. 2011-08-06 22:50:46 +02:00
Spp-
b2a84d9f1e Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons) 2011-07-27 12:14:27 +02:00
Shocker
bdba5cd900 Core/Commands: Move .gps to command scripts and add .wpgps command, used for generating partial SQL queries for pathing 2011-06-29 16:36:54 +03:00
click
6667277a16 Core/Commands: Remove deprecated command for modifying pet training points (.pet tp) - removed in patch 3.0.2 and replaced with talentpoints (command for adjusting that already exists).
Closes #135.
2011-06-26 10:35:35 +02:00
click
158966dc79 Core: Codestyle cleanup 2011-06-11 22:35:29 +02:00
Shauren
dc3ff5e5f2 Core/Chat Commands: Partly revert "add name of GM (or Console) into output of gmannounce command (and also fix typo from previous commit)" as .gmnameannounce does exactly that
Core/Chat Commands: Allowed named announcement commands to run from console

This reverts commit 574f55382a.
2011-05-11 10:05:26 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
Azazel
791130f6fa Core/Chat: move chat link validation code into separate classes and improve some validation logic
Core/Misc: fix non-pch build
2011-04-27 16:22:42 +06:00
Azazel
0ef149d357 Core/Chat: allow quest links with quest level = -1 and items with enchants/gems 2011-04-19 14:08:03 +06:00
Azazel
c36846d78a Core/GM System: rename columns of gm_surveys, gm_subsurveys, gm_tickets and lag_reports tables to lowerCamel, move queries to prepared statements and refactor the code of TicketMgr. 2011-04-19 14:04:18 +06:00
Azazel
9079b27c56 Core/Chat: fix client crash by wrong quest shift-link structure.
Protection only work with ChatStrictLinkChecking.Severity = 3
(original patch by VladimirMangos)
2011-04-12 17:23:35 +06:00