Commit Graph

140 Commits

Author SHA1 Message Date
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
chadryx
983755a21d Added a new hook Called when a player's money is at limit 2014-08-27 19:01:41 +03:00
Rochet2
9beae1dc97 Removed OnQuestComplete hook, use QuestReward instead. Implemented OnQuestStatusChange hook
Also fixed some comments and added overrides
The OnQuestComplete hook was unused and didnt work properly
2014-08-24 14:31:38 +03:00
leak
1a27ce1267 Core/NetworkIO: Restore networking related scripting hooks
Closes #12607
2014-08-11 17:40:43 +02:00
DDuarte
a394205eca Core/Server: Add missing overrides 2014-08-09 20:17:40 +01:00
Shauren
6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
leak
dce92611f3 Refactored singletons to enable proper deconstruction during shutdown 2014-07-20 00:40:08 +02:00
leak
a738cd96dc Renamed WorldTcpSession back to WorldSocket 2014-07-07 22:03:41 +02:00
Subv
b5d5768d44 Fixed the crashes 2014-07-05 21:38:29 -05:00
leak
7befb26625 Some groundwork for replacing the ACE based WorldSocket handling 2014-07-06 01:26:29 +02:00
leak
e0aed65c8c ACE cleanup on game, now the major issue remains WorldSocket 2014-07-02 02:20:53 +02:00
leak
029bad6698 Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr
Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
2014-07-01 00:54:09 +02:00
Shauren
05ea2f76b8 Core/Misc: Fixed warnings 2014-06-24 02:01:40 +02:00
Aokromes
84e6af26e6 Merge pull request #11976 from Ascathor/master
Core/Misc: New ability to log account IP access history
2014-06-23 22:48:35 +02:00
Rochet2
7240fafe94 Core: Add loginFirst param to OnLogin hook to allow doing things on first login only
whitespacefix

Fix warning about unused param
2014-06-21 17:40:56 +03:00
Ascathor
6949735098 Core/Misc:
* Fix some codestyle, fix some typos

* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.

* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.

* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account

* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange

* Added new Hook to PlayerScripts: OnFailedPlayerDelete

* Added new variables to PlayerScripts: OnPlayerDelete
2014-06-13 16:25:11 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
Shauren
0f5632c70e Core/Misc: Fixed some -Weffc++ warnings 2014-04-20 16:48:35 +02:00
Vincent-Michael
89cc056a50 Fix 2014-04-18 17:02:04 +02:00
kontownik
91850fa9e4 Core/Scripts: New ItemScript trigger, OnItemRemove 2014-03-03 22:18:47 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren
8bcde41538 Core/Quests: Added stuff missing in previous commit 2013-12-25 12:17:23 +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
LilleCarl
731b3670fe Make damage and healing references, so that damage can be altered by scripts!
Correct typo (thanks AwkwardDev)
2013-10-11 21:49:06 +02:00
Carl Hjerpe
8737984b71 Implement script hooks: OnDamge, OnHeal 2013-10-01 18:35:09 +02:00
Nay
3561ab98ba Misc: Use override and final C++11 keywords in a few places (mostly scripts)
OVERRIDE and FINAL are TC macros (expand to nothing if compiler does not  support C++11)
2013-07-06 20:21:45 +01:00
Rochet2
a51cd86628 Quest Complete, OnLevelChanged 2013-06-10 13:23:30 +03: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
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Shauren
226e0fdd1b Unbreak the build and renamed sql file to proper date 2013-03-04 17:08:07 +01:00
Shauren
ae4d2845c9 Core: Fixed compile warnings and errors 2013-03-04 16:47:39 +01:00
Spp
61979f8591 Scripts/Player: Add OnMapChanged to PlayerScripts (after map changed)
Core/Dungeon Finder: Use OnMapChanged script to cast/remove Luck of the draw
- Also move code to force party update to LfgPlayerScript
- Remove some obsolete Lfg code after recent commits
2013-02-04 16:52:43 +01:00
Ellie
0daa5f97ea Grammar/Spelling fix. 2013-01-03 04:37:03 -08:00
Ellie
c2e610cde7 Core/Scripting: Created a hook for when a player is about to be saved. 2013-01-02 17:03:57 -08:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren
1297a93d90 Core/Scipts: Missed changes from 7be13b6fda 2012-12-17 15:01:20 +01:00
Shauren
7be13b6fda Core/Scripts: Fixed crash on shutdown 2012-12-17 11:44:41 +01:00
Carlos Vargas
6c6586fa43 Core/Scripts: Adding script hooks to allow for third party scripts to modify damage dealt.
Originally from the VAS Autobalance script, slightly modified.

Only addresses Spells, Dots, and Melee Damage. I'll have look at the current modules on ways of doing this but, Environmental Damage(fire/lava/drowning), Fall Damage, and Potentially AoE aren't covered by these.

Closes #7867

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-17 01:26:56 +00:00
Gacko
c65ccba1e1 Core/DB: Drop table script_texts 2012-12-13 14:48:01 +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
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
Spp
a566e3e58b Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING 2012-08-16 11:02:46 +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
Kandera
c70792df02 Core/Scripting: add the ability to access loot/go state changed events for gameobjects from cpp scripting. (malcrom's idea) 2012-05-16 08:47:43 -04:00
Shauren
a3bdaf7e6d Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work. 2012-04-14 17:49:51 +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
Kandera
42454640cf Core/Scripting: codestyle and comment for previous commit 2012-03-02 09:49:44 -05:00
Kandera
c1270bd758 Core/Scripting: added OnPlayerUpdateZone for player scripts 2012-03-02 09:42:17 -05:00