55 Commits

Author SHA1 Message Date
Shauren
c6e6e17b9a Core/Misc: Remove large functions from headers 2025-10-29 19:40:58 +01:00
Shauren
e59eef5432 Core/PacketIO: Updated to 11.0.0 2024-08-02 13:25:41 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
ModoX
0be7096b24 Core/Groups: Removed group_instance row deletion of empty groups
* table does no longer exist ref 9b924522d0

Closes #28331
2022-10-04 23:37:49 +02:00
Shauren
9b924522d0 Core/Instances: Delete InstanceSaveMgr and replace most of its uses with new InstanceLockMgr 2022-10-04 00:19:38 +02:00
Shauren
3ef5079fee Core/Loot: Move loot rolls from Group to Loot
* Partial port of cmangos/mangos-wotlk@ffdf9a05d6
2022-09-16 16:58:03 +02:00
dufernst
86ecc83514 Core/Groups: Execute all group related database cleanup at the beginning of LoadGroups. (#27935)
Makes certain group_member entries be deleted when their respective groups are removed during cleanup. In cases when LoadGroups aborts early if no groups remain to be loaded after cleanup they would otherwise not be removed.
2022-05-01 17:46:50 +02:00
Shauren
f0c56fde0a Core/Groups: Escape mysql keyword in group loading query 2022-04-12 13:29:53 +02:00
jackpoz
d0fe16b787 Core/Misc: Fix issues reported by static analysis
(cherry picked from commit 33dace231c)
2022-03-11 11:48:18 +01:00
Wyrserth
cc141e9bad Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes (#23398)
* Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes.

* Add #23396 to make testing easier.

* Prioritize assistants in raids.

* Fix dumb mistake and apply suggested change, thanks VincentVanclef and jackpoz!

(cherry picked from commit e906a2fe7d)
2021-12-11 13:06:25 +01:00
Shauren
d29dd1eeb5 Core/Misc: Change all unix time columns in character database to bigint (signed) 2021-04-05 23:47:05 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
1fd59700d7 Core/Groups: Fixed calculating canReset attribute
Broken in d6df19cd99.

(cherry picked from commit 0222d9fc1a)
2020-06-14 23:49:05 +02:00
Shauren
042418cf26 Revert "Core/Groups: fix wrong query for loading group instance data. canReset attribute was calculated in the wrong way"
This reverts commit 0c1dd398bd.

Closes #19745

(cherry picked from commit 023d252155)
2020-06-14 23:49:05 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
2072258ef4 Core/DBLayer: Escape mysql 8 keywords 2019-11-01 16:20:15 +01:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
e405ac5f41 Fixed nopch build and some leftover warnings 2016-07-20 13:27:04 +02:00
Shauren
a9a13d10f7 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-07-17 17:37:06 +02:00
Krudor
649e3a9ac5 Core/Instances: Add functionality for modifying instance entrance locations
Instances have since MoP (Possibly even Cataclysm) been able to set new locations for players when they zone into the instance.
A theoretic example of this could be after a certain boss has been defeated, a new entrance location is set to bring players entering the instance closer to the relevant content.
A real example would be Siege of Orgrimmar changing entrance locations many times as the raid progresses.

Added SetEntranceLocation for setting entrance locations that will be saved to DB the next time the instance is saved, and SetTemporaryEntranceLocation for when you don't want the value to be saved to the database.

Closes #17167
2016-07-16 14:58:33 +02:00
Shauren
70102f32fe Core/DataStores: Updated opcodes and db2 to 7.0.3.21414 2016-05-20 23:49:53 +02:00
Naios
329225b40d Core/Game: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
2016-03-11 18:35:49 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
et65
c6ab951025 Core/PacketsIO: Implemented or updated most of party related packets.
Packets updated or implemented :
- SMSG_INSTANCE_INFO : updated

- CMSG_SAVE_CUF_PROFILES : updated
- SMSG_LOAD_CUF_PROFILES : updated

- SMSG_PARTY_COMMAND_RESULT : updated

- CMSG_PARTY_INVITE : updated
- SMSG_PARTY_INVITE : updated
- CMSG_PARTY_INVITE_RESPONSE : updated
- CMSG_PARTY_UNINVITE : updated
- SMSG_GROUP_UNINVITE : updated
- CMSG_LEAVE_GROUP : updated
- SMSG_GROUP_DECLINE : updated

- SMSG_GROUP_DESTROYED : updated

- CMSG_MINIMAP_PING : updated
- SMSG_MINIMAP_PING : updated

- CMSG_CONVERT_RAID : updated
- CMSG_SET_EVERYONE_IS_ASSISTANT

- CMSG_DO_READY_CHECK : updated
- CMSG_READY_CHECK_RESPONSE : updated
- SMSG_READY_CHECK_COMPLETED : updated
- SMSG_READY_CHECK_RESPONSE : updated
- SMSG_READY_CHECK_STARTED : updated

- CMSG_REQUEST_PARTY_JOIN_UPDATES : implemented (source : sniffs)
- CMSG_REQUEST_PARTY_MEMBER_STATE : updated
- SMSG_PARTY_MEMBER_STATE : updated
- SMSG_PARTY_UPDATE : updated

- CMSG_REQUEST_RAID_INFO : updated

- CMSG_INITIATE_ROLE_POLL : updated
- SMSG_ROLE_POLL_INFORM : updated
- CMSG_SET_ROLE : updated
- SMSG_ROLE_CHANGED_INFORM : updated

- CMSG_CHANGE_SUB_GROUP : updated
- CMSG_SWAP_SUB_GROUPS : implemented

- CMSG_SET_ASSISTANT_LEADER : updated
- CMSG_SET_PARTY_LEADER : updated
- SMSG_GROUP_NEW_LEADER : updated

- CMSG_CLEAR_RAID_MARKER : implemented
- SMSG_RAID_MARKERS_CHANGED : implemented

- CMSG_UPDATE_RAID_TARGET : updated
- SMSG_SEND_RAID_TARGET_UPDATE_ALL : updated
- SMSG_SEND_RAID_TARGET_UPDATE_SINGLE : updated

- CMSG_OPT_OUT_OF_LOOT : updated
- CMSG_SET_LOOT_METHOD : updated

About group update flags:
- Not sure they are use for now.
- Pets now have their group update flags.
- Pets'power is no send to client anymore.
- Changes about them are inspired from SMSG_PARTY_MEMBER_STATS parsing of WowPacketParser, but it seems this packet is not use anymore.

CHAT_MSG_RAID has been fixed.

About Ready check:
- Correctly implemented this function.
- An update function has been added to Group class, and to GroupMgr class in order to manage the ready check expiration (when 35 seconds were gone, players who have not answered must be reported as AFK)

About Raid markers:
- Old spell effect SPELL_EFFECT_SUMMON_OBJECT_SLOT3 has been renamed to SPELL_EFFECT_CHANGE_RAID_MARKER and implemented. I'm sure about that because raid markers spells are the only spells that have this effect type.

Source: WowPacketParser, and sniffs from official.
2015-05-19 13:10:29 +02:00
Shauren
590693eb91 Core/Groups&Players: Fixed saving/loading after difficulty changes 2015-01-12 20:33:50 +01:00
Shauren
faa583c784 Core/Maps: Updated map difficulties 2015-01-10 01:35:47 +01:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Intel
e1cb43e831 Core/DataStores: Fixed build after rename 2014-11-05 23:33:56 +02:00
Shauren
9e1930959d Core/Entities: Changed object lowguid to uint64 2014-10-26 02:57:28 +02:00
Shauren
a363c88f03 Core/Guilds: Fifth part of converting int to bigint guids in database 2014-10-25 15:04:38 +02:00
Shauren
e7d9830a06 Core/Groups: Use full guid for group lookup 2014-10-22 00:35:00 +02:00
Shauren
7532864264 Buildsystem/MSVC: Warning fixes
C4800 'type' : forcing value to bool 'true' or 'false' (performance warning)
C4127 conditional expression is constant
2014-07-17 15:42:57 +02:00
Dehravor
6a5c43b0d8 Core/Loot: Implement round robin for under threshold items in case of master loot
Thanks @Shauren for pointing out
2014-03-16 19:12:01 +01:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +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
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
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +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
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
Kandera
4a0085ad2c Core/DBLayer: more type fixes 2012-03-29 12:21:38 -04:00
Nay
92d3548f0b Core/DBLayer: Even more types fixes... 2012-03-29 15:08:17 +01:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
Subv2112
f4075f0f94 Core/LFG:
Fix priority of the player when its added to the lfg group
        Better implementation of the Dungeon Deserter debuff
        Rewrite the NeedBeforeGreed loot
        Fixed players being shown as Unknown Entity when entering the lfg group
        Some incremental optimizations after original patch
Thanks to Retriman and Paecman for base implementation

Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
2012-01-14 17:37:28 +01:00