Commit Graph

634 Commits

Author SHA1 Message Date
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
Shauren
901af6546b Core/CLI: Fixed utf-8 console input on windows 2019-01-12 18:03:50 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Aokromes
538c5b8687 Core/GameEvent: weekend xp rate (#17782)
* Core/GameEvent: weekend xp rate
by kline

* Update to recent code

* compile fix try
things of copy and paste 4 years old code xd

* more code update

* forgot to change this

* Update worldserver.conf.dist

* Added function to calculate weekend event xp rates

By greenbagels

* Cleaning using scripts

* Implement daymask and rename variables etc.

* Rename script file weekend -> boosted

* Update src/server/game/World/World.cpp

Co-Authored-By: Aokromes <Aokromes@users.noreply.github.com>

* Fix xp multiplier not applying to quest rewards

* Disable xp boost script when no boosted days selected
2018-11-28 16:44:28 +01:00
Treeston
e50344b6df Core/Chat: Some more chat filtering cleanup:
* Always filter control characters
* Clean up stripping of duplicate whitespace
* Adjust .conf.dist to accurately describe what the config settings do
2018-09-18 02:08:33 +02:00
Treeston
e858706270 Core/Chat: Some hyperlink follow-ups:
* Ignore messages containing invalid links again instead of trying to sanitize them. Closes #22451.
* No longer filter messages on the addon channel. Closes #22450.
2018-09-18 01:28:57 +02:00
Aokromes
67e839b6bf Update worldserver.conf.dist 2018-09-13 23:38:10 +02:00
Killyana
70955ed3a6 Misc: Update Quests.LowLevelHideDiff to wotlk
Closes #17421
2018-09-13 03:27:32 +02:00
Killyana
e87edc0de7 Misc: Reverse Quests.HighLevelHideDiff changes
Ref #17421
2018-09-13 01:41:32 +02:00
Treeston
f27284594b [3.3.5] Core/Chat: Unify chat hyperlink parsing (PR #22417)
- Validate most link properties all the time
- If enabled, also validate link text (needs locale)
- Instead of blocking the entire message, sanitize it
- Apply filtering to DND/AFK messages. Closes #22399
2018-09-13 00:11:27 +02:00
Aokromes
c8cecd9527 Misc: Update Quests.HighLevelHideDiff to wotlk
Closes #17421
2018-09-12 11:52:55 +02:00
Shauren
0ead73516a Core/Misc: Improved ip2location code and set it to disabled by default 2018-06-23 21:31:09 +02:00
Gooyeth
2fe4ab94c5 Common: Replace ip2nation by ip2location. (#21957)
Replace ip2nation by ip2location.

Download: https://lite.ip2location.com/database/ip-country
2018-06-23 01:32:39 +02:00
ccrs
982643cd96 Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
2018-06-03 10:06:57 -07:00
jackpoz
7b7dc1b508 Core/Misc: Fix FreezeDetector triggered on startup
Fix FreezeDetector triggering the assert on startup if scripts took more than a few seconds to initialize.
2018-05-12 13:59:34 +02:00