Commit Graph

871 Commits

Author SHA1 Message Date
Shauren
713dd276a7 Core/PacketIO: Fixed structure of SMSG_AUCTION_COMMAND_RESULT 2019-07-31 20:33:47 +02:00
ForesterDev
b9756de7e5 Core/PacketIO: Updated SMSG_OVERRIDE_LIGHT (#23635)
* Core/PacketIO: Updated SMSG_OVERRIDE_LIGHT

(cherry picked from commit 4c94108ba9)

# Conflicts:
#	src/server/game/Maps/Map.cpp
#	src/server/game/Server/Packets/MiscPackets.cpp
#	src/server/game/Server/Packets/MiscPackets.h
#	src/server/game/Server/Protocol/Opcodes.cpp
2019-07-25 11:08:31 +02:00
ForesterDev
adbb8da025 Core/PacketIO: updated totem packets (#23634)
(cherry picked from commit 5c813f6f02)

# Conflicts:
#	src/server/game/Entities/Totem/Totem.cpp
#	src/server/game/Handlers/SpellHandler.cpp
#	src/server/game/Server/Protocol/Opcodes.cpp
#	src/server/game/Server/WorldSession.h
2019-07-25 10:32:31 +02:00
Shauren
86b516c3f2 Core/Addons: Fixed Blizzard_* addons insecure lua errors
Closes #23599
2019-07-16 17:10:28 +02:00
Shauren
01124c6f4e Fix clang build 2019-07-15 18:30:17 +02:00
Shauren
cd3d317ebf Core/Addons: Improve WorldSession::ReadAddonsInfo
* Only allow built-in addons to be marked as secure
* Better protect against malformed packets
2019-07-15 17:47:35 +02:00
ccrs
bbb9d94acc Core/Server: 3785a35 followup 2019-07-14 13:21:49 +02:00
ccrs
3785a35511 Server/Packets: implement SMSG_RESYNC_RUNES packet structure 2019-07-13 18:58:04 +02:00
Nayd
9a9af3cc5f Core/Packets: Update and enable SMSG_WEATHER
(cherry picked from commit 6f7d048765)
2019-07-09 21:17:59 +02:00
Aokromes
574a7c8d3d Core/Misc: More coding standards (#23519)
* Core/Misc: More coding standards

* revert part

* "void  " or more to "void "

* fix? reject

* remove more double whitespaces

* remove more double whitespaces

* more standards

* more coding standards

* More standards

* more coding

* more coding standards

* more coding standards

* And more standards
2019-07-08 12:51:42 +02:00
ccrs
401777d024 Core/Unit: rename several getters to follow codestyle
uint8 GetLevel()
        uint8 GetLevelForTarget(WorldObject const* /*target*/)
        void SetLevel(uint8 lvl)
        uint8 GetRace()
        uint32 GetRaceMask()
        uint8 GetClass()
        uint32 GetClassMask()
        uint8 GetGender()
2019-07-01 21:36:32 +02:00
Treeston
396f87c30d Entities/Unit: Cleanup all the direct accesses to m_unitMovedByMe. Refactor the field to be protected. Add assertions to catch dangling pointers. 2019-06-23 16:44:37 +02:00
Wyrserth
e906a2fe7d 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!
2019-06-15 14:19:58 +02:00
jackpoz
a0bd68cf46 Core/Misc: Fix static analysis issues reported by Coverity 2019-05-18 16:12:23 +02:00
Chaouki Dhib
50d32fe493 Core/Movement: fix mistake in previous commit
975f1e364a
2019-04-15 23:47:23 +02:00
Chaouki Dhib
975f1e364a Core/Movement: Add time synchronisation (#18189) 2019-04-15 23:31:25 +02:00
ccrs
d8819147b0 Core/Misc: update SMSG_UPDATE_WORLD_STATE uses 2019-01-17 11:52:38 +01:00
ccrs
bcb0b03fac Server/Packets: port WorldStatePackets from master 2019-01-17 11:06:35 +01:00
Treeston
fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Shauren
bd21917ad6 Core/PacketIO: Fixed naming for SMSG_TRAINER_LIST profession related fields 2018-12-30 19:51:36 +01:00
Ghaster
bf3ab6d9c4 Core/Creatures: Port trainer changes from master
Closes #20493
2018-12-30 19:51:36 +01:00
ccrs
7417cbc655 Core/Shared: add BattlefieldBattleId definitions
Also rename BG_TEAMS_COUNT and BattlegroundTeamId
2018-10-24 16:45:26 +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
jackpoz
deabd4ab45 Core/Packets: Reduce memory footprint of cached queries (#22297)
Ensure only the minimum required memory is used by caching query packets by calling shrink_to_fit()
2018-08-22 19:44:21 +02:00
Treeston
8a4858bdcf Core/Handlers: Spell handler no longer downranks otherwise-negative spells because they have a potentially-positive aura effect. Closes #22153. 2018-07-19 12:46:31 +02:00
Treeston
2ef9d301f0 Misc: Pass std::chrono types by value everywhere. 2018-07-18 17:48:15 +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
Shauren
fcb1e3e642 Core/PacketIO: Added missing move assignment operator to ByteBuffer 2018-04-19 17:35:57 +02:00
Shauren
9617778336 Core/Players: Greatly simplifiy fdb2b90685 2018-04-11 00:05:59 +02:00
Shauren
fdb2b90685 Core/Players: Prevent creating characters with duplicate name by reserving name early in the process
Closes #21656
Closes #21809
2018-04-10 20:57:34 +02:00
ariel-
078b621c74 Core/Packet: nopch 2018-03-10 04:01:17 -03:00
ariel-
bc73251f3b Misc: fix bad copyright header 2018-03-10 03:57:32 -03:00
ariel-
0c2a6dee07 Core/Spell: fix spell visual for other players
- Ported SMSG_SPELL_GO and SMSG_SPELL_START to new packet system
2018-03-10 03:55:14 -03:00
ariel-
c099174ff7 Core/Misc: fix some /W4 warnings and some reported by GCC 6.3 2018-01-22 23:55:33 -03:00
Shauren
b2b4f9d1e4 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173

(cherry picked from commit dfd2660a85)
2018-01-06 12:30:28 +01:00
Treeston
532ab1c7f8 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2018-01-03 20:04:19 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
jackpoz
12701cb0c6 Core/Misc: Replace time(NULL) with GameTime::GetGameTime() 2017-12-24 22:50:59 +01:00
xinef1
2286da2166 Move some packets processing to map context (#18638)
Core/Network: Allow some packets to be processied in map context
2017-12-09 16:14:10 +01:00
jackpoz
032194099e Core/WorldSession: Fix idle WorldSessions getting kicked twice as fast as supposed
Fix SocketTimeOutTime and SocketTimeOutTimeActive settings being effectively halved by reducing the timeout time twice every update instead of just once, causing much faster kicks (i.e. after 30 seconds with 60 seconds set in the configs).
2017-11-30 20:35:57 +01:00
Mikhail Redko
558382ed6d Core/WorldSession: Add RBAC permission for skipping idle connection check (#20595) 2017-10-13 22:26:53 +02:00
Treeston
7dfd472f8d Proper client timeout detection (#19906)
- Properly detect client timeout when logged into a character after a configurable time (default 60s) has passed without the client sending any packets.
- Fixes issues with crashed clients leaving characters in the world for a very long time (default 15 minutes), as well as edge case exploits involving intentionally pausing client execution for some amount of time.
2017-06-27 00:22:33 +02:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren
7874bee7bf Core/Misc: Cleanup worldserver/authserver main() functions to run destructors in predictable order
* world/auth servers will now fail to startup if listen ports are in use
* Restored "Network.OutUBuff" config option lost during boost transition

(cherry picked from commit 6c92a481a3)
2017-06-19 04:04:21 -03:00
xinef1
a4aa95a5a3 Core/Misc: implemented petition manager (#19010)
- Implemented manager for petitions to perform all petition related tasks and synchronize data with database.
- This kills ugly synchronous querys on packet handlers
2017-04-27 02:02:33 -03:00
jackpoz
6940071994 Core/Misc: Fix static analysis issues 2017-02-25 15:54:11 +01:00
ariel-
dd1aa64563 Core/Packet: convert query packets into new system.
- Extra c++11-ification of existing code
- Refs #18637
2017-02-21 03:03:58 -03:00
jackpoz
76f3e0edea Core/WorldSocket: Handle unhandled exceptions
Properly handle unhandled exceptions happening with malformed packets.
Fix #19128
2017-02-18 11:36:02 +01:00
ariel-
60dd803bbe Core/Server: fix duplicated inserts into tutorials table for newly created characters 2017-01-29 14:00:19 -03:00