Commit Graph

647 Commits

Author SHA1 Message Date
Shauren
f8cd39b2ed Core/Players: Improved alcohol handling, weeeeeeeeeeeeeeeee
Closes #7293
2012-08-07 17:45:10 +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
Nay
f9a0821b2b Core/PacketIO: Correct a value sent in BuildPlayerChat (just for the sake of being correct, no noticeable changes) 2012-08-03 22:50:02 +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
stfx
bb9b98098e Fix sending wrong world states in Shattrath 2012-07-25 11:50:34 +03:00
Shauren
1fd37ac61b Core/Object: Use updatefield flags extracted from client to determine whether to send or not a field value instead of sending all data to client for non-player objects 2012-07-22 14:20:26 +02:00
Nay
8ffafdc859 Core: Fix build 2012-07-13 16:56:58 +02:00
NNN666
e757ebf6ba Core/Player: Fix issues with 'ignore this slot' option on equipment manager usage 2012-07-13 16:27:11 +02:00
LordJZ
72fd203688 Fixed CHAR_SEL_PETITION_SIG_BY_GUID_TYPE. 2012-07-02 20:35:28 +04:00
kandera
3b808cd431 Merge pull request #6897 from Xees/master
Core/Item: Modify IsCurrencyToken to use IsCurrencyToken in item template
2012-06-22 06:35:45 -07:00
Abdollah Hasan
24a395c82d Core/Item: Modify IsCurrencyToken to use IsCurrencyToken in item template.
Changed all BAG_FAMILY_MASK_CURRENCY_TOKENS to IsCurrencyToken.
2012-06-22 16:34:06 +03:00
Machiavelli
cfb53dbf42 Merge pull request #6885 from Chaplain/clean
Core/Misc: Code-style + some const methods.
2012-06-22 05:31:04 -07:00
Abdollah Hasan
69285b1a4d Core/Player: Modify GetItemByEntry to include Currency. 2012-06-22 15:19:47 +03:00
Chaplain
716e2db0e1 Core/Misc: Code-style + some const methods. 2012-06-21 21:05:45 +03:00
Shauren
b24c15740f Build fix 2012-06-12 20:17:55 +02: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
kaelima
a43c3e815a Core/Protocol: Correct cooldowns sent with SMSG_PET_SPELLS and add summon duration 2012-06-05 13:17:43 +02:00
Shauren
5eee40249c Core/Items: Added custom flags field to item_template, currently 2 flag values are available
* ITEM_FLAGS_CU_DURATION_REAL_TIME determines item duration counts even if offline (replaced ugly negative duration workaround, easy to lose data when importing fresh wdb)
* ITEM_FLAGS_CU_IGNORE_QUEST_STATUS quest status will not affect this item appearing in loot, currently needed for Arena Master trinket
2012-05-31 15:39:18 +02:00
Vincent-Michael
ab77e597b1 Add function for SetObjectScale
Author: NoFantasy
Source: Mangos
2012-05-26 23:14:57 +02:00
Kandera
4bdc557382 Core/Bags: cleanup random tab. check for item in bag slots for getitembyguid and getitemcountwithlimitcategory 2012-05-24 09:51:57 -04:00
Nay
b1179d8f49 Core/Bags: Do not allow multiple unique bags in bank bag slots
Existing multiple bags will be removed and items mailed
Kudos to micha
Closes #2786
2012-05-23 21:25:50 +01:00
Kandera
df9791f1aa Core/Items: fix typo from previous commit (thx vincentmichael) 2012-05-22 14:05:53 -04:00
Kandera
99040237c7 Core/Items: correctly cast spells on item store. Closes #4208 2012-05-22 12:32:53 -04:00
Nay
e56b2cdd59 Core: Fix a few compile warnings 2012-05-20 17:58:35 +01:00
Kandera
5fc2c8cda3 Core/Items: fix compile error from previous commit. use item instead of bag. 2012-05-08 10:06:38 -04:00
Kandera
d2a33afc37 Core/Items: fix deletion of items when the bag they are in gets deleted on load. also checks for items that have no real bag for possible expoits. 2012-05-08 09:15:52 -04:00
Shauren
3c2dd7c5ed Scripts/Ulduar: Algalon the Observer 2012-04-19 23:19:27 +02:00
Kandera
17d87c0103 Core/Misc: researched the reasons for instance reset failure and added them as comments to the sendresetinstancefailed function. 2012-04-17 09:56:08 -04:00
Shauren
61cb2db1bd Core/Player: Removed _lastLiquid from Player class, no need to have it in both Unit and Player 2012-04-17 10:16:31 +02:00
Kandera
bb97ff7601 Attempt on converting updatewaterstate for use with units (pets and vehicles) 2012-04-16 12:27:06 -04:00
Shauren
63ec9f2299 Core/Player: Send calendar raid lockout remove before removing player from instance save (may invalidate instance save) 2012-04-14 11:09:40 +02:00
Subv
98e1847999 Player/Items: Fix the item durations when the item is stored in a bag different than the default backpack
Closes #1026
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-13 18:58:27 -05:00
click
a470a5ad93 Fix a typo in previous commit 2012-04-10 02:11:27 +02:00
click
5d7d635b9e Core: Add proper log output in Player::Create functions, warning admins about possible hackers during character creation 2012-04-10 02:06:10 +02:00
kaelima
3bbabb1400 Core/Spell: Fix crash when blinking on transports in instancable maps
Closes #789
2012-04-09 03:02:45 +02:00
kaelima
49e24e2dfb Core/Cleanup:
Mostly if(.. -> if (.. and for(.. -> for (..
but also some miscellaneous cleanup
2012-04-08 23:59:52 +02:00
Machiavelli
e636531da3 Core/Movement: Fix pushback issues and client freeze. 2012-04-08 17:03:44 +02:00
Shocker
cce6424337 Merge pull request #6001 from Tasssadar/master
Code style: Give field pointers in Player::DeleteFromDB() more appropriate name
2012-04-07 19:14:48 -07:00
kaelima
a5a123197b Core/Item: Fix possible exploit stacking critical strike when switching weapons during disarm. Closes #3532 2012-04-08 03:12:40 +02:00
Nay
945566e84e Scripts/SM: Fix dead anymation of Fairbanks
Patch by DennisRassmann (25/10/2010)
Closes #4998
2012-04-07 22:29:19 +01:00
kaelima
cadf311ac6 Core/Players: Reward XP to dead players inside battlegrounds
(29/05/2010)
2012-04-07 21:42:49 +01:00
Vojtěch Boček
cea3930610 Core: Give field pointers in Player::DeleteFromDB() more appropriate name 2012-04-04 19:07:22 +03:00
click
0447ddacef Core: Fix a crash in Player::DeleteFromDB due to loading wrong fields 2012-04-04 17:42:45 +02:00
Nay
b7f7e3118c Core/DBLayer: More type fixes
Thanks to Vasago for the help in spotting the errors
Thanks to Subv as well (so he doesn't feel lonely)
2012-04-01 22:41:47 +01:00
Nay
1bc99cd5af DB/Spawns: Fix previous commit (512aa8897b) 2012-04-01 14:55:19 +01:00
Nay
377c5ce36e Core/DBLayer: Fix another wrong type in mail related code 2012-04-01 03:09:01 +01:00
Shocker
b292437989 Merge pull request #5933 from GyxTom/master
Core/Misc: Code style and remove unused define
2012-03-30 14:49:44 -07:00
Shauren
5843851559 Core/DBLayer: More prepared statement corrections 2012-03-29 23:22:10 +02:00
Kandera
4a0085ad2c Core/DBLayer: more type fixes 2012-03-29 12:21:38 -04:00
leak
5e58905aa0 Core/DBLayer: More types fixes 2012-03-29 17:43:23 +02:00