Commit Graph

232 Commits

Author SHA1 Message Date
Spp
663db1cee3 Core/Misc: Add default count param to HasItemCount 2012-10-23 13:11:57 +02:00
Spp
7831ecdb18 Core: "Initial support for C++11 compilers" 2012-10-02 15:06:19 +02:00
Spp
380db44583 Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct 2012-10-02 12:17:42 +02:00
Gacko
e9a2b3f10e Scripts/Sm: Fix quest I was a lot of things
(Modified - Nayd)

Closes #6295
Closes #7577
2012-09-22 02:26:55 +01:00
w1sht0l1v3
2ff0910d67 Core/Scripts: Reliquary of Souls: fix encounter start and essence phases. 2012-09-13 03:40:17 +03:00
Nay
21d43781ac Tabs to spaces... 2012-09-07 03:33:16 +01:00
kaelima
7c971be3c5 Core/Misc: Fix some warnings and logic mistakes found by static code analysis 2012-09-05 17:18:05 +02:00
Shauren
1e9fc84a12 Core: Warning fixes
C4100: 'x' : unreferenced formal parameter
C4310: cast truncates constant value
C4389: '==' : signed/unsigned mismatch
C4668: 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
C4701: potentially uninitialized local variable 'x' used
C4826: Conversion from 'HMODULE' to 'DWORD64' is sign-extended. This may cause unexpected runtime behavior.
C6067: Parameter '3' in call to 'sprintf' must be the address of the string
C6387: 'argument 1' might be '0': this does not adhere to the specification for the function 'CloseHandle'
2012-09-04 14:40:41 +02:00
Nay
b2bcc52fda Revert "Core: Blood Furnace - Broggok event"
This reverts commit 153e88a16b.
2012-09-04 01:03:06 +01:00
Gacko
913645d5c7 Core: Blood furnace - Update method header to lastest rev 2012-09-03 22:25:26 +02:00
Gacko
153e88a16b Core: Blood Furnace - Broggok event
Move prisoners back in cages after respawn. They didn't reset correctly
for players which were still in the instance after wipe
2012-09-03 20:09:45 +02:00
Nay
107bd5f5a3 Scripts: Fix non pch build 2012-09-01 00:11:44 +01:00
Gacko
74d4aec49b Core/Spell: Unlocking zuluhed chains
Core/Spell: Unlocking zuluheds chains

Core/Spell: Unlocking zuluheds chains

Core/Spell: Unlocking zuluheds chains
2012-09-01 00:35:52 +02:00
Nay
abbb896cfb Core: Fix many "errors"/warnings and coding style (2)
Scripts; also reverted a change to AuthSocket

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 22:44:03 +01:00
Nay
e909e5515b Scripts/Hellfire: Add missing include 2012-08-29 22:36:04 +01:00
Gacko
e07a8db6da Scripts/Hellfire: Rework Blood Furnace 2012-08-29 22:23:15 +01:00
kaelima
f92946e128 Core/Misc: Fix some mem-leaks and uninitialized variables. 2012-08-12 20:06:12 +02:00
Nay
d1b10082a2 Whitespace is the root of all evil (version 2) 2012-08-03 22:55: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
634b3645d5 Core/Misc: Use proper headers to optimize compile 2012-07-30 05:38:40 +02:00
Kandera
9eab1a23cf fix build again 2012-07-06 10:52:15 -04:00
Kandera
6862d4da25 fix build from r2bcc291 2012-07-06 10:47:50 -04:00
Kandera
2bcc29136a Scripts/Spells: fix wrath of the astromancer and stop the startup error. 2012-07-06 10:21:00 -04:00
Shauren
c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
Shauren
e0997874f5 Core/SpellScripts: Changed OnUnitTargetSelect hook to OnObjectAreaTargetSelect, it will now work with WorldObject instead of only Units and call it even for empty target lists 2012-06-29 21:53:35 +02:00
QAston
e53b44b6ba Merge pull request #6491
Core/Spells: convert some spell effects to SpellScripts
Closes #6491
2012-06-14 19:12:03 +02:00
Shauren
be5f0b0f47 Core/Scripts: Fixed crash in mob_phase_hunterAI, this entire script is crappy and needs rewrite anyway. 2012-06-09 22:50:56 +02:00
joschiwald
7e454b26ac more updates 2012-06-03 02:35:00 +02:00
Vincent-Michael
ab77e597b1 Add function for SetObjectScale
Author: NoFantasy
Source: Mangos
2012-05-26 23:14:57 +02:00
Shauren
1851a2e9e3 Scripts: Replaced calls to ForcedDespawn with DespawnOrUnsummon (calls appropriate AI hooks in case of temporary summons) and made ForcedDespawn private 2012-04-24 16:53:37 +02:00
Ramusik
c47d295e2a Scripts/Outland: Boss Doomlord Kazzak
- Implement Berserk
- Some style corrections
2012-04-21 21:44:20 +03:00
Machiavelli
bc96df1aae Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
2012-04-08 17:40:05 +02:00
Gyx
a1c4786ba0 Core/Script: Code style and some rewriting.
MoveInLineOfSight(Unit* unit) -> MoveInLineOfSight(Unit* who)

Signed-off-by: Gyx <2359980687@qq.com>
2012-04-01 19:56:41 +08:00
Gyx
d9088c083c Core/Script: Code style and some rewriting.
JustDied(Unit* Killer) -> JustDied(Unit* killer)
JustDied(Unit* /*Killer*/) -> JustDied(Unit* /*killer*/)
JustDied(Unit* /*unit*/) -> JustDied(Unit* /*killer*/)
JustDied(Unit* /*slayer*/)) -> JustDied(Unit* /*killer*/)
JustDied(Unit* /*victim*/) -> JustDied(Unit* /*killer*/)
JustDied(Unit* victim) -> JustDied(Unit* killer)
JustDied(Unit* /*who*/) -> JustDied(Unit* /*killer*/)
JustDied(Unit* who) -> JustDied(Unit* killer)
JustDied(Unit*) -> JustDied(Unit* /*killer*/)

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-31 18:56:37 +08:00
Gyx
391d68be20 Core/Script: Code style.
WaypointReached(uint32 i) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 /*waypointId*/)
WaypointReached(uint32 uiI) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*i*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiWPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*wp*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 waypointId)

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 15:44:24 +08:00
Gyx
a20fa23ea6 Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 15:15:48 +08:00
Gyx
e050945c91 Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 11:13:37 +08:00
leak
e37a4e5fe2 Merge pull request #5870 from Elron103/pull-requests5
Core: Fix warnings
2012-03-24 16:14:21 -07:00
Elron103
7daf69f20c Core: Fix warnings 2012-03-24 18:25:24 +01:00
Shauren
78e8de5913 Core/Scripts: Fixed script unloading 2012-03-24 17:09:42 +01:00
leak
3d0063abee Core: Fix warnings 2012-03-24 15:37:54 +01:00
Shauren
f0ac821e0b Scripts/Serpentshrine Cavern: Fixed crash in boss_leotheras_the_blind caused by uninitialized variable; also replaced unsafe AI typecasting with Get/SetGUID 2012-03-19 17:03:39 +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
Gyx
5cb16b65fc Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 17:54:48 +08:00
Gyx
7877eae6ba Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 12:17:15 +08:00
Gyx
d8b4bc590a Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 21:41:15 +08:00
Gyx
cd38e7df2b Core/Script: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 20:31:23 +08:00
Gyx
bef1b0c402 Core/Script: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:40:57 +08:00
Gyx
ddc0f5d7d6 Core/Script: Clean-Up in Scripts.
InstanceScript* m_instance -> InstanceScript* instance

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:35:13 +08:00
Gyx
76c18e00c7 Core/Script: Clean-Up in Scripts.
GameObject* pGO -> GameObject* go

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:28:10 +08:00