Commit Graph

607 Commits

Author SHA1 Message Date
Kandera
b9f60fe56c Core/Wintergrasp: finish implementation for battlefields. this is highly experimental enable at you're own risk. will almost definatly cause issues with the wintergrasp patch floating around 2012-08-20 16:23:24 -04:00
Warpten
094f98d3a9 Battlefield/Wintergrasp:
* Use correct spells on losing and winning factions
* Enums renaming, lowerCamelCase wherever applicable
* Rename some methods and class attributes for them to sound more English and less Engrish or even Frenglish (\o/)
* Use correct spells when trying to build mechanical units at the Workshops.
2012-08-20 13:50:49 -04:00
Kandera
dd05f1dcd2 fix crash with groups, added enum for battlfield leave reasons 2012-08-20 13:36:09 -04:00
Kandera
6318fd91ff added enum for battlefield leave reason. 2012-08-20 13:36:08 -04:00
Kandera
ba91b8bde9 change some packets. fix sql. 2012-08-20 13:36:06 -04:00
Spp
13aa00d5f2 Core/Logging: Restore dumping packets in binary format 2012-08-17 10:36:48 +02:00
Spp
97c4b92eb0 Core/Logging: Try to simplify configuration of loggers and appenders
Changed multiple lines to a simple format:
- Logger.name=Type,LogLevel,Flags,AppenderList
- Appender.name=Type,LogLevel,Flags,optional1,optional2
  * Type = File: optional1 = File name, optiona2 = Mode
  * Type = Console: optional1 = Colors

Created a default set of loggers and appenders.
- Root logger defaults to Error, that means you will see nothing on console by default (not even loading)
- You need to add the loggers to Loggers options if you want to enable them, otherwise Root logger will be used for all types

Restored outSQLDriver (LOG_FILTER_SQL_DRIVER), outSQLDev (LOG_FILTER_SQL_DEV), outArena (LOG_FILTER_ARENA) and outChar (LOG_FILTER_CHARACTER) functionality by creating new types (LOG_FILTER_CHARACTER is a rename of LOG_FILTER_DELETE.

Note: You need to update your config file... again (yeah sorry... trying to make it simpler)
2012-08-06 12:10:33 +02:00
Spp
3f42094b9c Core/Logging: Add option to remove timestamp, Log Level and Log Filter Type from logged msgs
- Appender config option .Timestamp and .Backup became obsolete
- New Appender config option .Flags added

Appender Console prefixes Log Level and Log Filter Type to the logged text as default
Appender File prefixes Timestamp, Log Level and Log Filter Type to the logged text as default
2012-08-05 15:38:25 +02: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
Chaplain
716e2db0e1 Core/Misc: Code-style + some const methods. 2012-06-21 21:05:45 +03:00
kaelima
c6c23b7f7e Core/DungeonFinder:
- Prevent players from vote kicking in combat (basic implementation, still needs a timer) partially closes #2563
- Prevent players from teleporting to a finished dungeon using macro commands. Closes #6748

Also add a missing change for ff77610e1d thanks 2010phenix for the hint.
2012-06-12 18:14:52 +02:00
Nay
f6fc2ef8cf Fix non PCH build 2012-06-10 03:28:51 +02:00
kaelima
d3c45cc3f2 Fixed build and removed an unused variable 2012-06-04 09:14:31 +02:00
kaelima
d86246b861 Core/Logging: Add optional binary packet logger usable with WowPacketParser, and remove the now useless WorldLog.
TODO: Port this to .pkt 3.1 format
2012-06-04 08:52:12 +02:00
kaelima
1dc6bd69aa Core/Auth: Correct a bad error log during authentication 2012-06-03 23:34:24 +02:00
kaelima
a32f4f439b Core/Protocol: Move some debug messages to their appropriate debug output mask. 2012-06-03 05:41:30 +02:00
kaelima
f1e6601032 Core/Protocol:
- Allow CMSG_LOGOUT_CANCEL to be recieved during serverside logout process (ignore it however, it's too late to abort)
- Fix STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT opcodes because of m_playerRecentlyLogout being set false too early in some cases
2012-05-27 19:57:49 +02:00
kaelima
624aab7d77 Core/Session: Fixed error "received unexpected opcode CMSG_CANCEL_TRADE" when a player is logging out. 2012-05-26 18:15:07 +02:00
kaelima
c40d86f05f Core/Protocol: Fix struct and make use of CMSG_UPDATE_PROJECTILE_POSITION. 2012-05-25 16:44:34 +02:00
kaelima
66d42b4f29 Core/Protocol: Process CMSG_UPDATE_MISSILE_TRAJECTORY packets 2012-05-23 14:24:45 +02:00
kaelima
c3287fee06 Core/SmartAI:
- Improve an error msg in ProcessAction
- Allow dist/angle to be 0.0f and set default if negative when using SMART_ACTION_FOLLOW
- Some minor cleanup in Opcodes.cpp, all smsg's should have Handle_ServerSide
2012-05-19 13:04:58 +02:00
Nay
fc0950dbf3 SQLS: Correct comments for 2012_02_16_00_world_conditions.sql
(Core/Opcs: Use Handle_NULL for an unused opcode)

Closes #6517 (pr)
2012-05-19 11:48:41 +01:00
kaelima
7f51c399c6 Core/DBLayer: CHAR_DEL_CHAR_AURA_FROZEN query should be asynchronous
Closes issue #6273

Also corrected one opcode name in Opcodes.cpp (changes nothing)
2012-04-30 02:07:59 +02:00
Machiavelli
e636531da3 Core/Movement: Fix pushback issues and client freeze. 2012-04-08 17:03:44 +02:00
kaelima
afb202869d Core/Protocol: Rename opcode SMSG_LFG_BOOT_PLAYER to SMSG_LFG_BOOT_PROPOSAL_UPDATE. (same opcode had two different names in core) 2012-04-08 03:13:50 +02:00
Gyx
5b7493fc66 Core/Misc: Code style and remove unused define.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 14:43:34 +08:00
Gyx
360014856d Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 13:42:04 +08:00
Nay
192d7d735d Core/DBLayer: Few more type corrections
Closes #5871
2012-03-24 23:05:24 +00:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
leak
847b4366f3 Core/DBLayer: Convert PExecute() queries to prepared statements 2012-03-19 16:48:08 +01:00
Machiavelli
41cc704bf8 Core/Movement:
- Don't abort relocation if movementflag restrictions were violated. There might be lag between client and server and even different parts of the core that made this approach improper.
- MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING, but it's a valid flag to receive from client.
- Fix falling to ground when unapplying fly/waterwalk aura. NOTE: This is a client-side initiated fall, in the future this should be initiated and updated by the server. (Working on it)
- Rename MOVEMENTFLAG_FALLING to MOVEMENTFLAG_FALLING_FAR
- Rename MOVEMENTFLAG_JUMPING to MOVEMENTFLAG_FALLING

Closes #5751
2012-03-17 20:36:12 +01:00
Shauren
01f3620d45 Core/Movement: Corrected movement info structure written in WriteMovementInfo 2012-03-17 18:01:56 +01:00
Machiavelli
87a121425c Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:56 +01:00
Machiavelli
5d2d2a5ac7 Update src/server/game/Server/WorldSession.cpp 2012-03-17 11:54:21 +01:00
Machiavelli
80975faba2 Core/Movement: Add debug output to Worldsession::ReadMovementInfo to find out which movementflag restriction was violated. Please use this to give feedback. 2012-03-17 11:50:30 +01:00
Machiavelli
85da463686 Core/Movement: Fix brackets in macro 2012-03-16 23:37:50 +01:00
Machiavelli
65453620e8 Core/Movement: Do not process server side relocation if reading movementinfo from client resulted in violations (= hacking). 2012-03-16 18:15:08 +01:00
Machiavelli
cca93c7a22 Minor typo, major consequences. 2012-03-16 17:27:24 +01:00
Machiavelli
df31af5b4f Core/Movement: Add server-side check for movementflag correction in previous commit. This effectively prevents (most if not all) flyhacking. 2012-03-16 17:21:15 +01:00
Shauren
a3d7caba8a Core/Opcodes: Defined a new opcode 2012-03-16 12:34:37 +01:00
Machiavelli
e17a9cfb85 Core/Movement: Add server side filters for MOVEMENTFLAG_WATERWALKING, _FALLING_SLOW and _HOVER depending on required aura types. Fixes exploiting when aura unapply packets (such as corrected in previous commit) are blocked/altered before reaching the client. 2012-03-15 10:12:43 +01:00
Machiavelli
03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Spp
f1949b20a6 Some random cleanup here and there 2012-03-09 13:42:52 +01:00
Kandera
680a7083ff Core/Misc: add level to login/logout logs, it will help to find xp exploits (aokromes) 2012-03-05 10:58:52 -05:00
leak
66fc6482de Core/Warden: Switch to multi-threaded packet processing for warden 2012-02-28 23:05:30 +01:00
Shauren
7b2672b17b Core/Calendar: Fix compile without PCH 2012-02-25 15:32:55 +01:00
Nay
ad78d44da8 Core/Calendar: Change (revert) CalendarFlags vars to ints
P.S I'd like to have type safe enums (C#-like, also [Flags] attr)
2012-02-25 04:16:17 +00:00
Nay
d6c0a67a7c Core/Calendar:
- Fix build
- Use enums where possible
- Renaming
2012-02-25 04:00:32 +00:00
Shauren
0e86b3a578 Core/Calendar: Corrected structure of SMSG_CALENDAR_COMMAND_RESULT 2012-02-24 23:40:06 +01:00
Shauren
e5621dfd99 Compile fix 2012-02-24 23:30:09 +01:00