Commit Graph
444 Commits
Author SHA1 Message Date
Spp 358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
Nay 7532013b27 Fix a typo in SmartScript.cpp
I blame vincent!
2012-09-08 02:15:38 +02:00
Santiago e3b9b15779 Core/SAI: Implement SMART_ACTION_SET_HOME_POS (101)
No parameters; allowed targets: self and position

Closes #7689
2012-09-08 00:55:47 +01:00
Nay 21d43781ac Tabs to spaces... 2012-09-07 03:33:16 +01:00
Nay 340dc33b52 Fix some code style issues in previous PR merge 2012-09-06 19:59:27 +01:00
Nay 334c078184 Core/SmartAI: Tiny tiny optimization in an if 2012-09-06 19:58:43 +01:00
Nay c66d254a39 Merge pull request #7658 from e000/creature-interrupt
[Core, Creature] Implement Creature/Pet Interrupts
2012-09-06 11:58:27 -07:00
w1sht0l1v3 68a54e6d91 Core/SAI: Add condition to run SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL code 2012-09-05 14:04:09 +03:00
e 89d6900f4b [CombatAI::SpellInterrupted] Fix Typo 2012-09-05 01:48:25 -04:00
e 98f5d4ef4a [Core, Creature] Implement Creature/Pet Interrupts 2012-09-04 23:04:59 -04:00
w1sht0l1v3 50cea6638b Core/SAI: Fix SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
Proper usage of params:
-param1: flat hp value
-param2: percent hp value
Note: only one of these params should be used(in case you set values in both,the script will chose percent)
2012-09-05 04:53:06 +03:00
Elron103 46852a3808 Core/Scripting: Fix DoAction function of SummonList incorrectly removing entries in SummonList 2012-09-02 00:19:13 +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
Vincent-Michael 6891fe6248 Core/Battlefield: Add missing stuff for wintergrasp 2012-08-21 23:03:30 +02: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
Vincent-Michael 634b3645d5 Core/Misc: Use proper headers to optimize compile 2012-07-30 05:38:40 +02:00
Santiago c7a0378a82 Core/SAI: Added new parameter to actions 90 and 91
Allows to set and remove all possible bytes1 based on `type` parameter
You can see them listed in Unit.h for reference
2012-07-21 01:29:15 -03:00
Kandera 0ac9c5b039 Core/Escort: few modifications to add the IMMUNE_TO_NPC flag after npc does a full reset. 2012-07-10 17:27:13 -04:00
Kandera 450f9e7d99 Core/Escort: fix issues with escorts not attacking enemies. 2012-07-10 16:19:18 -04:00
Shauren 577d5b4fd1 Core/SmartScript: Corrected size of pointId parameter for MOVE_TO_POS SAI action 2012-07-03 16:22:14 +02:00
Shauren ea9339b171 Core/SmartAI: Fixed SMART_ACTION_SET_RANGED_MOVEMENT parameters 2012-06-23 12:15:52 +02:00
Chaplain 716e2db0e1 Core/Misc: Code-style + some const methods. 2012-06-21 21:05:45 +03:00
QAston c22988e14f Merge pull request #6872 from Elron103/pull-requests
Scripts/Miscellaneous: Enable const-ness for various functions in ScriptedAI (Author: DorianGrey)
2012-06-20 23:18:58 -07:00
Elron103 f3aacb669c Scripts/Miscellaneous: Enable const-ness for various functions in ScriptedAI (Author: DorianGrey)
- Improve codestyle, since objects internal state is not changed here
- Make these functions available for inherited CanAIAttack() function
2012-06-20 21:29:41 +02:00
Discover- e190a202ca Core/CreatureAI: Implement an OnSpellClick hook instead of the ugly way that uses DoAction with EVENT_SPELLCLICK.
Core/SmartAI: Implement SMART_EVENT_ON_SPELLCLICK. Parameter is the clicker.

If someone could update the wiki accordingly for SAI I would appreciate that. Thanks to @Shauren for some help!
2012-06-19 00:07:20 +02:00
Nay 53b561f550 Core/SAI: Remove some unused conditions related code
SAI conditions were implemented in a different way than initially planned

Signed-off-by: Nay <[email protected]>
2012-06-18 00:42:37 +01:00
Nay 0e4d6bf4df Missing break on 8c16cc2260
Signed-off-by: Nay <[email protected]>
2012-06-17 23:13:48 +01:00
Nay d61f9fb40c Fix build in GCC
Signed-off-by: Nay <[email protected]>
2012-06-17 22:11:27 +01:00
Nay 8c16cc2260 Core/SAI: Implement SMART_EVENT_ACTION_DONE (72, DoAction)
Param1 is event id
This event is triggered on spellclick (id=1001), fall on ground (id=1002) and charge (id=1003)

Signed-off-by: Nay <[email protected]>
2012-06-17 21:50:01 +01:00
click 50bd43661c Core: Remove a few silly warnings here and there (and adjust a comment to allow System.cpp to show properly in the nano-editor) 2012-06-13 18:38:21 +02:00
Shauren 15eb5f0749 Core/SmartAI: Allow calling talk action on targeted creature even if scripted object itself is not a creature 2012-06-12 22:22:18 +02:00
Kandera cdb3ab809b Core/Pets: removed logerror from previous commit 2012-06-11 12:29:26 -04:00
Kandera 9fe66cafbe Core/Pets: add ghoul reactions to owner emotes. thx joshwhedon 2012-06-11 12:26:20 -04:00
Subv 38f6f9d8cb Core/SAI: Missing change from previous commit 2012-06-11 11:15:33 -05:00
Shauren 28f8e42a69 Core/AI: Added EventInform hook for GameObjectAI and implemented it in SAI 2012-06-11 11:10:46 +02:00
Subv 089b0a44d7 Core/SAI: Fixed the cage GameObject template script, the script should start when the gameobject is activated, not in gossip hello 2012-06-07 08:09:16 -05:00
Discover- 19dbfbeb62 Core/SAI: Fixed a mistake in SMART_TARGET_INVOKER_PARTY which made it add the same player to the targetlist twice if there was a group. 2012-06-04 17:20:40 +02:00
Subv a757187d7d Fixed build 2012-06-03 16:39:10 -05:00
Subv c7cb120449 Core/EventAI: Check AIName for EventAI scripts while loading them, avoid iterating again 2012-06-03 16:27:25 -05:00
Nay cffcf633c3 Core/SAI: If spell id in SMART_ACTION_REMOVEAURASFROMSPELL is 0, remove all auras instead
Signed-off-by: Nay <[email protected]>
2012-06-02 14:29:15 +01:00
click 09c497bce2 Core/AI: Remove "enforced override"-check in the EventAI-manager in case of AI not being set to EventAI. 2012-06-02 14:43:07 +02:00
Discover- 1b77fd45fa Core/SAI: Revert SMART_ACTION_SET_STAND_STATE from 013fe44b92, can be done with SMART_ACTION_SET_UNIT_FIELD_BYTES_1. 2012-05-30 01:00:55 +02:00
Discover- 154a030a68 Core/SAI: Fix previous commit. Thanks Shauren for notifying. 2012-05-29 12:29:10 +02:00
Discover- 013fe44b92 Core/SAI: Implement SMART_ACTION_SET_RANGED_MOVEMENT (79) and SMART_ACTION_SET_STAND_STATE (101). Updated wiki accordingly. These were required in order to properly be able to convert EventAI to SmartAI. 2012-05-29 12:19:46 +02:00
kaelima 84b420160d Core/Pets: Some minor corrections to 3ea75c50d0 2012-05-24 16:29:43 +02:00
Kaelima 7a24a16e0b Merge pull request #6438 from MrSmite/PetAI_autocast_fix
Fix pet autocast spells such as Furious Howl and Leap
2012-05-24 07:16:33 -07:00
MrSmite 3ea75c50d0 Fixes broken autocast spells such as Furious Howl and Leap to cast when on autocast and "attack" is clicked.
Fixes wrong check for spell cooldown and removes check for duration (some spells with duration such as poison are stackable)
2012-05-24 06:36:32 -04:00
kaelima 2ae0cfc8b6 Core/GuardAI: General cleanup and removed some unnecessary code. 2012-05-23 16:40:44 +02:00