Commit Graph

160 Commits

Author SHA1 Message Date
Nay
7165fd769e Merge pull request #9862 from Ric101/condition_creature_type
Core/Conditions: Implement CONDITION_CREATURE_TYPE - 24
2013-07-30 06:25:04 -07:00
Vincent-Michael
0e4816771a Core/Conditions: Add more infos for invalid skill condition log error 2013-07-16 18:22:03 +02:00
Malcrom
66978cfc3b Core: Some function renaming. 2013-06-11 19:54:27 -02:30
Ascathor
3e985c636d Core/Conditions: Adding more information to the invalid quest condition log error 2013-06-04 17:52:32 +02:00
Ric101
6fe47e7fcc Core/Conditions: Missing grid search support for CONDITION_CREATURE_TYPE 2013-05-25 08:57:49 +01:00
Ric101
6820ca8bda Core/Conditions: Implement CONDITION_CREATURE_TYPE - 24 2013-05-25 07:51:23 +01:00
Shauren
7d46703413 Core/Misc: Another batch of fixes for issues found by static analysis 2013-05-17 21:30:02 +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
ille
4657cb896f Core/Conditions: add missing break
Core/Units: use attackers MeleeDamageSchoolMask to calculate benefit/mod for auras with SPELL_AURA_MOD_DAMAGE_TAKEN/SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN in Unit::MeleeDamageBonusTaken()
thx bonitas for pointing
2013-02-20 20:41:48 +01:00
Spp
8cd408ae6c Core/Misc: Some changes to minimize differences with 4.3.4 branch 2013-01-30 10:34:18 +01:00
Spp
802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Vincent_Michael
b13e5694b6 Core/Conditions: Implement CONDITION_UNIT_STATE = 21 2013-01-11 23:37:53 +01:00
Nay
5f28502c0a Merge pull request #8738 from joschiwald/spell_proc_conditions
Core/Conditions: implement CONDITION_SOURCE_TYPE_SPELL_PROC and use it i...
2013-01-06 18:29:55 -08:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren
f1170ba0fb Core: Fixed some level 4 warnings (msvc) 2012-12-31 20:43:14 +01:00
Subv
b4be02c8a0 Core/Conditions: Rename CONDITION_INSTANCE_DATA to CONDITION_INSTANCE_INFO.
And allow it to be used with GetData, GetData64 and GetBossState.
2012-12-30 16:03:25 -05:00
joschiwald
c19f78c363 Core/Conditions: implement CONDITION_SOURCE_TYPE_SPELL_PROC and use it in old and new proc system
Usage:
SourceTypeOrReferenceId: 24
- SourceGroup: always 0
- SourceEntry: spell id of aura which triggers the proc
- ConditionTarget:
 * 0 - Actor
 * 1 - ActionTarget
2012-12-22 01:37:54 +01:00
Vincent-Michael
e4f093cccc Core: Fix more typos (thx Expecto) 2012-12-01 13:51:02 +01:00
Vincent-Michael
f957dd462f Core/Conditions: Implemented CONDITION_SOURCE_TYPE_NPC_VENDOR = 23 2012-12-01 01:52:20 +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
w1sht0l1v3
44f3930cf0 Fix compile after bdbafc0184 2012-11-26 23:50:14 +02:00
Subv
bdbafc0184 Core/Conditions: Add CONDITION_GENDER = 20 2012-11-26 14:35:28 -05:00
Nay
0591c468ac Core/SAI: Add more details to an error log 2012-11-24 23:49:48 +00:00
joschiwald
e83c5d1a0f Core/Conditions: use proper SpellCastResult instead of Notification when CONDITION_SOURCE_TYPE_SPELL fails 2012-11-24 02:45:48 +01:00
Spp
b5c9ab8802 Core/Misc: Reduction of header dependencies - Step II 2012-11-20 12:30:30 +01:00
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Subv
e475b50f58 Core/Conditions: Fixed a mistake in Conditions loading which didn't allow to use SAI conditions with negative source entry (guid) 2012-10-21 15:33:31 -05:00
thesensei
e34b7e70c5 Core/Conditions: Add relation to creator
* This is used in spells with effect summon where the summoned creature doesn't get a *summonedby* flag and so relation to owner is not working. This way the unit get relation to the master who created it.
* World case where I'm going to use this is summoning Oculus drakes
* Blizzard seems to handle such cases with special spells in dbc that are missing and sniff gives nothing for them.  The number of spells is unknown, but existence of atleast 10 is seen. They are used usually as bonus effects to make the check however mechanic is unknown. Guessing it is good as adding this.
2012-09-21 00:07:56 +03: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
Vincent-Michael
59e86f8df9 DB/Creatures: Fix "Frostbrood Vanquisher" flying
CLoses #5927
2012-09-15 23:20:58 +02:00
Vincent-Michael
883db2af3e Core/Conditions: Convert CONDITION_MAP_DIFFICULTY in CONDITION_SPAWNMASK for more handling 2012-09-15 22:32:10 +02:00
Vincent-Michael
5305626214 Core/Conditions: Implemented CONDITION_MAP_DIFFICULTY 2012-09-15 20:27:01 +02:00
Nay
e3d9768a50 Core: Fix many "errors"/warnings and coding style (3)
Game

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 22:44:33 +01:00
Spp
8a1e7dd070 Core/Loading: Re-enable Server loading log 2012-08-16 00:23:44 +02:00
Spp
634776e0bc Fix compile under windows 2012-08-03 15:54:54 +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
c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
Nay
e56b2cdd59 Core: Fix a few compile warnings 2012-05-20 17:58:35 +01:00
Nay
2d0e5e2e0c Core/Conditions: Add missing code for CONDITION_TITLE
DB/Char: Add changes to character base
Thanks to manuel and QAston for noticing
2012-04-08 12:56:18 +01:00
Nay
7a5f6dd198 Core/Conditions: Add CONDITION_TITLE
Original patch by svetilo12
2012-04-07 23:15:16 +01:00
Nay
a92820b51c Core/DBLayer: Correct few more wrong read types (No. 1)
DB/World: Some consistency in the ints "length" field (not really a length)

From A to D world tables verified; missing all the others

int(11) -> int32
unsigned int(10) -> uint32
mediumint(8) -> int32
unsigned mediumint(8) -> uint32
smallint(6) -> int16
unsigned smallint(5) -> uint16
tinyint(4) -> int8
unsigned tinyint(3) -> uint8
2012-03-27 00:43:56 +01:00
Shauren
f85fdbebe7 Core/DBC: Remove store getters (useless since we don't have scripts as external dll) 2012-03-10 20:53:26 +01:00
click
a153e0ca06 Core: Remove some whitespace and tabs 2012-03-07 00:05:34 +01:00
Machiavelli
e2c20cca72 Core/Conditions: Small optimization in ConditonMgr, as well as proper rules for spellclick conditions in Clean(), and finally some documentation added on how to add new source types. 2012-03-01 14:43:35 +01:00
Machiavelli
8e8ff7c660 Core/Conditions: Remove some useless checks in Condition::Meets against a value that's _supposed to be_ const 0 in database. 2012-02-29 13:57:16 +01:00
Machiavelli
7567d5e359 Core/Conditions: Fix grouping for CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT
Perhaps in the future a more generic solution can be implemented to prevent lots of repetitive code
2012-02-22 11:54:01 +01:00
Spp
1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
QAston
18948755ca Merge. 2012-02-21 20:17:45 +01:00
QAston
f09b5a6bea Core/Db/Conditions:
-Drop condition CONDITION_SPELL_SCRIPT_TARGET, use other condition types instead
-Change CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET to CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
--allow using this condition for more spell implicit target types (not just ENTRY)
--SourceGroup value for this src type is now effMask and it's now required

Core/Spells: Unify the way implicit targets are handled, fully implement some partially implemented target types, fix some minor bugs found on the way, general improvements and cleanup.
2012-02-21 20:17:45 +01:00