Commit Graph

34 Commits

Author SHA1 Message Date
jackpoz b8908606fc Core/AH: Fix memory leak
Fix memory leak in Auction House when creating an auction with stackable items and a stack of the same amount in the inventory. Leak added in 15a2acfb52 .
2013-12-16 19:38:49 +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
Spp cfaea769bc Core/RBAC: Move RBAC code to namespace rbac 2013-09-27 13:35:45 +02:00
kaelima 1455a08906 Core/Auctionhouse: Fix crash when reloading AH items
- Removed a really strange comment
2013-06-10 12:47:01 +02:00
Shauren 8be181c7e6 Core/Misc: Fixed a bunch of issues found by static analysis 2013-05-17 20:39:53 +02:00
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
Shauren 27ceee92fb Core/AuctionHouse: Fixed field type mismatches when saving auction to database (db fields are unsigned int) and prevent posting auctions with bids or buyouts over gold cap
Closes #9762
2013-05-07 18:47:36 +02:00
Spp 377cfdb560 Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
- Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender
- Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
2013-03-08 13:15:25 +01:00
Spp ffdf54b082 Core/RBAC: Remove couple of harcoded checks for GM level and use Permission 'Log gm trade' 2013-02-25 15:59:16 +01:00
Vincent_Michael cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Nay 28dffbee11 Core/AuctionHouse: Partially revert 3cf2600688 to keep compatibility with the "AHBot patch"
Note: Trinity needs/wants an auction house bot in the core but for that to happen AHBot needs to be rewritten (possibly using Mango's implementation as a base)
2012-12-18 23:25:31 +00:00
MrSmite 3cf2600688 Core/AuctionHouse: Fix a possible auctionhouse crash 2012-12-18 21:34:02 +01:00
Spp e954498560 Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch 2012-11-27 13:03:12 +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 58ec4e5319 Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete)
- Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly.
- Reset daily slots/money withdraw for all members at same time, configurable
- Better debug messages
2012-11-02 22:26:10 +01:00
Spp 013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp 8c5f011e79 Core/Achievements: Force all calls to AchievementMgr be done through Player functions (Remove GetAchievementMgr)
Note: No real use in 3.3.5 but will be used in 4.3.4
2012-09-18 14:29:53 +02:00
Spp 984493108b Core/Logging: Fix incorrect error level for some warden messages
Core/Logging: Fix incorrect filter type for many network messages
Core/Logging: Use OPCODE filter type for network messages related to wrong packets
2012-08-21 22:12:55 +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
Shauren 4df39dae95 Core/AuctionHouse: Refactored and corrected building auction mail messages 2012-07-19 15:33:14 +02:00
Shauren c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
leak c6cbe4c77c Core/DBLayer: Convert PAppend() queries to prepared statements No.1 2012-03-25 16:25:06 +02:00
leak 2a5caef4a6 Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee.
2012-03-14 18:51:51 +01:00
thomas33 20cd4c71ee Core: more more cleanup 2012-03-14 17:51:11 +01:00
Elron103 c044eb5711 Core/Auction House: Delete item_instance entries correctly, prevent invalid entries 2012-02-27 23:41:19 +01:00
Shocker 7e4fa9174d Core/Auction House: Fix item loss issue when inserting multiple stacks (by Elron103)
Closes #5428
2012-02-26 02:16:45 +02:00
Shauren dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01:00
click 5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
Subv 9c01620938 Core/AuctionHandler: Move the MAX_AUCTION_ITEMS check to where it actually does something in HandleAuctionSellItem, thanks @e000 for the suggestion 2012-02-17 17:46:50 -05:00
Subv bfbf118e7e Fixed a typo 2012-02-14 20:43:44 -05:00
Subv 15a2acfb52 Core/AuctionHouse: Updated CMSG_AUCTION_SELL_ITEM to allow new 3.3.5a features.
Patch by Kiddie.
closes #2970
2012-02-14 20:12:23 -05:00
Shocker 08be716ef8 Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_* 2012-02-03 19:02:17 +02:00
Spp c9762b0e38 Core: Change Handlers location 2012-01-26 10:54:53 +01:00