Commit Graph

648 Commits

Author SHA1 Message Date
Treeston
1eca51b417 [3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463) 2020-09-20 02:50:38 +02:00
Treeston
75f9e7396e [3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443) 2020-09-12 19:42:10 +02:00
jackpoz
5498f3be96 Core/PathFinding: Enable pathfinding (MMaps) by default 2020-09-06 21:34:19 +02:00
Treeston
eaf8fa75a1 Core/Misc: Add support for custom link colors. Clean-up hyperlink validation, no more long-ass defines. Remove UI.ShowQuestLevelsInDialogs. 2020-09-02 22:01:51 +02:00
Jinnaix
812c2af4da Core/Misc: Update Worldserver.conf for AhBot Pricing -make things more clear (#25341)
* AhBot Pricing: Make things more clear

* Change default value to BuyPrice and add some more information to how two sided AH works

* Sync c++ configs with .conf ones

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-08-29 17:05:59 +02:00
Treeston
d717b9dc3e Core/Misc: Update worldserver.conf.dist to match actual defaults. 2020-08-21 12:13:38 +02:00
Treeston
a3971ca4b0 Core/Warden: More refactors lifted from #25286. 2020-08-20 17:56:10 +02:00
Shauren
39c5e03b74 Core/CrashHandler: #ifdef cleanup to make VS not choke when parsing, fixed file being all red in editor 2020-08-07 17:19:18 +02:00
Shauren
b3db50a3b4 Core/Misc: Fix compile errors found with msvc /permissive- 2020-08-04 15:42:08 +02:00
Treeston
3164b58c7d Core/Authserver: Re-organize the accounts table (PR #25135)
- no longer use sha_pass_hash for anything else core-side (.account, SOAP, RA)
- salt/verifier/session_key are now binary
- old s/v/sha_pass_hash fields kept around for backwards compatibility
- sha_pass_hash is still updated (for now), s/v are not
- sha_pass_hash is only read if s/v have been manually changed
- SRP6 b now uses the full 32 bytes of randomness (instead of randomly only using 19)
2020-08-02 22:52:21 +02:00
Giacomo Pozzoni
deceb11b5f Log sync db queries in World::Update() loop (#25174)
* Core/Misc: Log sync queries on critical path

* Fix build

* Rename

* Fix warning

* Fix no-pch

* Change WarnAboutSyncQueries() to be header-only
2020-07-30 21:42:27 +02:00
Shauren
2f0893d279 Core/Misc: Replace database query in WorldSession::HandleAddFriendOpcode with async version 2020-07-30 17:41:20 +02:00
Giacomo Pozzoni
8a2c79c850 Core/Metric: Log detailed metrics about each opcode handler (#25153)
* Core/Metric: Log detailed metrics about each opcode handler

* Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none)

* Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics

* Update dashboard

* Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored

* Use typedef Milliseconds

* Refresh realms on load
2020-07-28 14:27:54 +02:00
Giacomo Pozzoni
3c0ac7302f Core/Metric: Add more metrics about World::Update() loop (#25098)
* Core/Metric: Add more metrics about World::Update() loop

* Add new Performance profiling grafana dashboard

* Add new cmake setting WITHOUT_METRICS that disables all metrics

As new metrics are added, someone might want to disable them if unused.

* Add more metrics about World::Update() loop

* Remove old performance profiling features

Remove "server set difftime" command, "-RecordUpdateTimeDiffInterval" and "MinRecordUpdateTimeDiff" worldserver config settings and their related code.
The whole UpdateTime class could be removed too.

* Update and rename 2020_07_99_99_world.sql to 2020_07_24_00_world.sql
2020-07-24 00:30:16 +02:00
ipriver
a46d047f94 fixed indentation for cmake files 2020-06-24 14:42:02 +02:00
Peter Keresztes Schmidt
b210bb3713 Core/Misc: Replace Trinity::make_unique with std (#24869)
(cherry picked from commit bab5fd87a3)
2020-06-23 18:03:16 +02:00
Shauren
a9f9f737b2 Core/Misc: Properly close database connections when using --update-databases-only arg 2020-06-22 09:53:10 +02:00
ipriver
dc467ee0f6 Additional cmake entry for configs
Closes #24812

Co-authored-by: Carbenium <carbenium@outlook.com>
2020-06-19 15:06:03 +02:00
Max Drosdo.www
1e9c84a3ea Worldserver/CLI: console printf fix (#24802)
* Remove extra cli printf call for non-Windows systems

* Codestyle changes

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-06-17 22:14:27 +02:00
Giacomo Pozzoni
247564a7ab Core/Creature: Allow to disable HP regen in Raids even if the target is unreachable (#24646) 2020-05-21 14:48:09 +02:00
ForesterDev
e1a8ebc064 Core/PacketIO: updated SMSG_DURABILITY_DAMAGE_DEATH (#24442)
- use RATE_DURABILITY_LOSS_ON_DEATH for death from falling
- add note, that RATE_DURABILITY_LOSS_ON_DEATH doesn't change log message

(cherry picked from commit a1831e0c1e)

# Conflicts:
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Server/Packets/GameObjectPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp

Co-authored-by: MitchesD <majklprofik@seznam.cz>
2020-04-14 14:00:53 +02:00
jackpoz
31018c3652 Core/Log: Log all character kicks to "network.kick" category 2020-04-08 21:05:01 +02:00
myuzhobcplidtkieno
ae553f8966 Added the ability to use TLS when connecting to a database. (#24348)
* Added the ability to use TLS when connecting to a database.

* Trying to kickstart CI checks

* Revert the kickstart change

Co-authored-by: myuzhobcplidtkieno <myuzhobcplidtkieno@github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-04-07 22:08:28 +02:00
jackpoz
caae3886d2 Core/Misc: Remove whitespace at the end of lines 2020-04-05 19:11:00 +02:00
Shauren
fe1003bdbd Core/DBLayer: Prevent using prepared statements on wrong database
(cherry picked from commit e8e89f58fb)

# Conflicts:
#	src/server/bnetserver/REST/LoginRESTService.cpp
#	src/server/bnetserver/Server/Session.cpp
#	src/server/database/Database/DatabaseWorkerPool.cpp
#	src/server/database/Database/Implementation/HotfixDatabase.h
#	src/server/database/Database/MySQLConnection.cpp
#	src/server/database/Database/MySQLConnection.h
#	src/server/database/Database/PreparedStatement.cpp
#	src/server/database/Database/PreparedStatement.h
#	src/server/database/Database/QueryHolder.cpp
#	src/server/database/Database/SQLOperation.h
#	src/server/database/Database/Transaction.h
#	src/server/game/Accounts/BattlenetAccountMgr.cpp
#	src/server/game/Achievements/AchievementMgr.cpp
#	src/server/game/AuctionHouse/AuctionHouseMgr.cpp
#	src/server/game/AuctionHouseBot/AuctionHouseBot.cpp
#	src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
#	src/server/game/BattlePets/BattlePetMgr.cpp
#	src/server/game/Battlegrounds/ArenaTeam.cpp
#	src/server/game/BlackMarket/BlackMarketMgr.cpp
#	src/server/game/Chat/Channels/Channel.cpp
#	src/server/game/Entities/Corpse/Corpse.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/Item/Item.cpp
#	src/server/game/Entities/Pet/Pet.cpp
#	src/server/game/Entities/Player/CollectionMgr.cpp
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Garrison/Garrison.cpp
#	src/server/game/Globals/ObjectMgr.cpp
#	src/server/game/Groups/Group.cpp
#	src/server/game/Guilds/Guild.cpp
#	src/server/game/Guilds/GuildFinderMgr.cpp
#	src/server/game/Guilds/GuildMgr.cpp
#	src/server/game/Handlers/AuctionHouseHandler.cpp
#	src/server/game/Handlers/CharacterHandler.cpp
#	src/server/game/Handlers/ItemHandler.cpp
#	src/server/game/Handlers/MailHandler.cpp
#	src/server/game/Handlers/MiscHandler.cpp
#	src/server/game/Handlers/PetitionsHandler.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Handlers/TicketHandler.cpp
#	src/server/game/Loot/Loot.cpp
#	src/server/game/Mails/Mail.cpp
#	src/server/game/Maps/Map.cpp
#	src/server/game/Movement/Waypoints/WaypointManager.cpp
#	src/server/game/OutdoorPvP/OutdoorPvP.cpp
#	src/server/game/Pools/PoolMgr.cpp
#	src/server/game/Quests/QuestObjectiveCriteriaMgr.cpp
#	src/server/game/Reputation/ReputationMgr.cpp
#	src/server/game/Scenarios/InstanceScenario.cpp
#	src/server/game/Server/WorldSession.cpp
#	src/server/game/Server/WorldSocket.cpp
#	src/server/game/Spells/SpellHistory.cpp
#	src/server/game/Support/SupportMgr.cpp
#	src/server/game/Tools/PlayerDump.cpp
#	src/server/game/World/World.cpp
#	src/server/scripts/Commands/cs_account.cpp
#	src/server/scripts/Commands/cs_ban.cpp
#	src/server/scripts/Commands/cs_battlenet_account.cpp
#	src/server/scripts/Commands/cs_group.cpp
#	src/server/scripts/Commands/cs_lfg.cpp
#	src/server/scripts/Commands/cs_list.cpp
#	src/server/scripts/Commands/cs_message.cpp
#	src/server/scripts/Commands/cs_misc.cpp
#	src/server/scripts/Commands/cs_npc.cpp
#	src/server/scripts/Commands/cs_tele.cpp
#	src/server/scripts/Commands/cs_wp.cpp
#	src/server/shared/DataStores/DB2DatabaseLoader.cpp
#	src/server/shared/Realm/RealmList.cpp
2020-03-31 13:42:01 +00:00
Aokromes
ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
jackpoz
00703ee238 Core/Misc: Enable MaxCoreStuckTime setting by default
Enable MaxCoreStuckTime setting by default to force worldserver to exit in case of infinite loops.
Note that this will not affect existing setups with the setting MaxCoreStuckTime set to 0 in the local worldserver.conf .
2019-10-26 19:49:41 +02:00
Giacomo Pozzoni
fb059722fd Core/Calendar: Add some additional validation when creating events (#23797)
* Core/Calendar: Add some additional validation when creating events

Allow only 30 player events and 100 guild events to be created.
Don't allow to create guild events if player is not in guild.
Send some more error messages to the client (not blizzlike errors but better than nothing).

* Core/Calendar: Add some additional validation/checks

Add guild id check in GetPlayerEvents().
Change error message in HandleCalendarCopyEvent() to be the same as in HandleCalendarAddEvent() when creating an event in the past.

* Core/Calendar: Add some additional validation/checks

Reduce the number of CMSG_CALENDAR_ADD_EVENT packets a seconds allowed from 10 to 3.

* Core/Calendar: Add some additional validation/checks

Implement 5 seconds cooldown between the creation of calendar events

* Core/Calendar: Add some additional validation/checks

Don't allow to copy events of a different player/guild

* Core/Calendar: Implement automatic deletion of old events

Implement automatic deletion of events older than 1 month (30 days).
Fix debug assertion triggered when deleting a character with calendar events.
Avoid double std::set lookup when deleting events when deleting a character.

NB: The whole CalendarMgr/CalendarHandler code should be checked line by line for bugs/crashes/exploits.
2019-09-17 09:11:56 +02:00
Treeston
4211645834 [3.3.5] Core/Authserver: TOTP rewrite: (PR #23633)
- Proper management commands (.account 2fa)
- Secrets can now be encrypted (set TOTPTokenSecret in .conf)
- Secret now stored in binary
- Argon2 and AES primitives
- Base32/64 support
2019-08-10 21:34:51 +02:00
Treeston
a5e73e41c0 Core/Pooling: Quest pooling rewrite: (PR#23627)
- Split quest pooling from PoolMgr (into QuestPoolMgr)
- Proper saving/restoring on server restart
- No more hacking into sObjectMgr to insert/remove available quests
2019-08-04 12:22:57 +02:00
Treeston
fedf1f557b Core/Chat: Custom channel preservation rewrite. Channel data is now loaded at startup, and written to the DB periodically, instead of both things happening in real time. 2019-08-01 23:42:14 +02:00
Treeston
26440857c1 Core/Spawns: Exterminate CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY with extreme prejudice. (It didn't work anyway.) 2019-07-15 15:57:04 +02:00
Wyrserth
5707019256 Core/Player: apply LevelReq.Trade only to the player initiating a trade, aligning it with the other LevelReq.* config options. 2019-07-13 01:08:16 +02:00
Wyrserth
1bdbede7e0 Misc/Config: set decay timer for unlooted normal creatures to 5 minutes.
Now that respawns do not care about the previous corpse's state, there's no reason to force a very frustrating faster despawn.
2019-07-06 16:15:45 +02:00
Gooyeth
c30a27ef18 Core/Battleground: Implement previous opponent timer on Arena queue. (#21754) 2019-07-06 01:35:23 +02:00
ccrs
626a24822b Misc: some corrections after recent merges 2019-06-29 16:01:58 +02:00
ccrs
fb28cee6ee Core/Log: 1f85348 followup
add missing logger entries
2019-06-05 21:53:40 +02:00
Wyrserth
d8ce37e0c9 Core/Console: start CliRunnable thread after all log messages have been printed. (#23321) 2019-05-26 23:01:50 +02:00
ccrs
fdb71ce19e Core/AI: logs, codestyle & cosmetics standarization 2019-05-15 19:23:28 +02:00
ccrs
dfa54d3bf4 Core/Object: re-change faction template related logs 2019-04-29 22:48:45 +02:00
ccrs
aee26eb467 Core/Misc: standarize a couple logs 2019-04-28 19:41:30 +02:00
Trond B. Krokli
f9b1e4a032 Core/conf: conf.dist typo & grammar corrections (#23190)
- Typo and spelling corrections
- Grammar corrections, English grammar
- Minor adjustments in example code readability
- Capitalization adjustments to keep consistency
  with existing idioms, phrases and concepts
2019-04-21 15:59:48 +02:00
Shauren
d56c671064 Core/Dep: Boost 1.70 compatibility
(cherry picked from commit bcda8dd742)
2019-04-14 01:04:02 +02:00
jackpoz
92bf5b1ba7 Core/Misc: Add console option to update databases only
Add "--update-databases-only" console argument to stop worldserver execution after having updated all databases (if specified in config file)
2019-03-17 21:34:13 +01:00
Giacomo Pozzoni
fa8c0dd534 Revert "Core/AuctionHouse: use DisableMgr to disable specific items (#19289)"
This reverts commit f6d3a5b9b9.
2019-03-12 16:09:45 +01:00
ForesterDev
f6d3a5b9b9 Core/AuctionHouse: use DisableMgr to disable specific items (#19289)
* Core/AuctionHouse: use DisableMgr to disable specific item for AuctionHouse or AuctionHouseBot
2019-03-12 09:34:34 +01:00
jackpoz
d05ab073cb Core/Misc: Update 85e3169fbd about SOAP
Change again how SOAP is stopped if SOAP successfully binds but worldserver fails to bind its sockets.
A crash remains if SOAP fails to bind because it calls exit() and that triggers asserts everywhere.
2019-01-18 22:57:23 +01:00
jackpoz
46f2595f51 Core/Networking: Set SO_REUSEADDR on *nix platforms 2019-01-18 20:31:47 +01:00
jackpoz
85e3169fbd Core/Misc: Fix shutdown with SOAP enabled
Fix worldserver entering a loop when having SOAP enabled but failing to bind both SOAP and worldserver listened socket. SOAP thread would keep trying to bind the socket over and over checking World::IsStopped() condition that was never set to true
2019-01-18 17:58:24 +01:00
Kittnz
d1c3ee9579 Core/Objects: increase sight range of objects & correct general default visibility distance (#22891)
This can be used for anything really.
Note: This does not make the object active.

#21111 #21681
2019-01-16 20:47:25 +01:00