Commit Graph

386 Commits

Author SHA1 Message Date
Shauren
5dbfaecd5c Core/WorldStates: Migrate battleground worldstates to new system 2022-07-10 18:59:29 +02:00
Shauren
a31e681944 Core/Spells: Rename SpellAttr0 to use official attribute names 2022-04-24 18:40:10 +02:00
Shauren
111fc6ac6f Core/Battlegrounds: Replace manual criteria timer starts in battlegrounds with new GameEvents api 2022-04-24 12:09:10 +02:00
Shauren
5558769405 Core/Battlegrounds: Replaced overriding m_team with more fine grained approach 2022-04-16 12:15:37 +02:00
Shauren
798693c0b8 Core/Battlegrounds: Set PLAYER_FLAGS_EX_MERCENARY_MODE for mercenary players 2022-04-16 12:15:37 +02:00
Shauren
84486ded67 Core/Battlegrounds: Store mercenary status separately from the aura obtained from gossip as it can be removed at any time 2022-04-16 12:15:37 +02:00
Traesh
87723e32e2 Core/Battlegrounds: Implement mercenary system 2022-04-16 12:15:37 +02:00
Shauren
b47185cabf Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag 2022-03-27 18:14:47 +02:00
Gildor
1bfbc371d5 Core/Battlegrounds: Avoid reset BG and Arena scoreboard stats and BG map achievement criterias when relogin if player was already in the BG (#27280)
(cherry picked from commit fade6fbf4f)
2022-03-24 11:48:37 +01:00
Gildor
1b56e13e87 Core/Battlegrounds: Avoid increasing player count per team when re-logging if player was already in the BG (#27266)
(cherry picked from commit 6c512113d3)
2022-03-22 00:17:33 +01:00
Shauren
ad4f4bfab7 Core/Misc: Minor game include cleanup 2022-02-13 00:49:10 +01:00
jackpoz
676d877296 Core/Battlegrounds: Fix error messages in Isle of Conquest
Fixes #24032

(cherry picked from commit 02a018ea13)
2022-01-26 16:36:37 +01:00
Treeston
d11c3807b3 Core/Time: Rename GetGameTime{System, Steady}Point methods
The names are a bit unhandy. Rename them (shorter but still meaningful).

GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()

Also add 2 new typedefs:

typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;

Closes #25042

(cherry picked from commit 896b68d5c2)
2022-01-23 21:36:03 +01:00
jackpoz
89cb6bc683 Core/Battleground: Attempt to fix a crash
Please report this error if you get it

(cherry picked from commit d1f9cf84a5)
2021-12-31 20:33:52 +01:00
jackpoz
7d63166ff3 Core/GameObject: Fix battleground flags not showing burning animation
Fix battleground flags not displaying the typical burning animation when they "despawn" (they don't actually despawn, they just change state)

(cherry picked from commit 90bb10aa3a)
2021-12-18 23:02:49 +01:00
ccrs
4e6c59dca7 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()

(cherry picked from commit 5c09ff51f7)
2021-12-13 00:42:20 +01:00
ccrs
df2f6ad219 Core/Shared: add BattlefieldBattleId definitions
Also rename BG_TEAMS_COUNT and BattlegroundTeamId

(cherry picked from commit 7417cbc655)
2021-11-15 18:52:02 +01:00
Shauren
2d7af28e9f Core/Transports: Store information about continent transports 2021-10-02 19:59:56 +02:00
Meji
0a83f74876 Core/Achievements: Update CriteriaType enum (#26856) 2021-09-08 22:07:01 +02:00
ariel-
29bfa32fc3 Core/Entities: don't allow client control if player is still affected by any lose of control state
(cherry picked from commit e315e41d36)
2021-06-16 20:38:56 +02:00
Shauren
0b2087ae41 Core/Criteria: Add all values of CriteriaStartEvent 2021-06-01 21:16:41 +02:00
Shauren
4b6ddfbbcc Core/Criteria: Add all values of CriteriaFailEvent 2021-06-01 21:04:22 +02:00
Treeston
34c7810fe5 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.

(cherry picked from commit 532ab1c7f8)
2021-05-16 21:56:01 +02:00
Shauren
fb66575d38 Core/Grids: Move packet sending functionality out of MessageDistDeliverer and into separate, customizable class and unify LocalizedPacketDo, LocalizedPacketListDo as generic localizable action 2021-05-01 20:16:10 +02:00
Shauren
f759809d9d Core/PacketIO: Use new time utilities in packets instead of plain time_t/uint32 2021-04-06 19:10:28 +02:00
Jeremy
e9357dc7f2 Core/Auras: Implement SPELL_AURA_BATTLEGROUND_PLAYER_POSITION_FACTIONAL (397) & SPELL_AURA_BATTLEGROUND_PLAYER_POSITION (398) (#25988) 2021-02-08 23:11:40 +01:00
Shauren
2e4609f6e1 Core/Chat: Send broadcast text id in sound packets to allow playing encrypted sound files 2020-12-27 22:43:36 +01:00
Shauren
b82a3a557a Core/DataStores: Updated db2 structures to 9.0.2
* Includes support for new character customization
2020-12-08 18:16:47 +01:00
Shauren
f922c6e7a4 Core/PacketIO: Renamed a bunch of opcodes based on more research (only those added after 6.0) 2020-09-19 12:44:42 +02:00
Shauren
b231903932 Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port 2020-09-04 13:38:24 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Shauren
deca201f77 Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection 2020-06-27 13:33:17 +02:00
Shauren
3f5dbf1f88 Fix GCC build 2020-06-03 00:40:44 +02:00
Shauren
41c3675bb9 Fix warnings 2020-05-31 17:18:18 +02:00
Shauren
bf8714b870 Core/Battlegrounds: Queue updates
* Fixed battleground queues for battlegrounds with id higher than 255
* Fixed queue display ingame after entering bg
* Fixed ingame display after leaving bg queue
* Fixed bg scoreboard
2020-05-31 16:49:18 +02:00
Shauren
d435d5d5ba Core/PacketIO: Fixed BattlefieldStatusHeader structure and QueueID values for other battleground types 2020-05-27 00:29:13 +02:00
Golrag
d7623adf0e Core/Battlegrounds: Use the following fields from DB2/battleground_template data in the Battleground Class:
* isArena
* name
* queueId
* min & max players (per team)
* map id
* script id
* start max dist
* type id
* min & max level
* Save the WorldSafeLocsEntry* instead of the Position in the BattlegroundTemplate struct
2020-05-02 12:05:30 +02:00
Xinef
38d3c5ed16 Core/Achievements: Greatly optimize achievement system by splitting large types by miscvalue
Closes #18633

(cherry picked from commit 9b44ed9cda)
2020-05-01 16:31:01 +02:00
Traesh
98b1c02a1c Core/Packets Fix SMSG_START_TIMER struct & update to new packet system (#22614) 2020-04-27 21:31:27 +02:00
Xinef
6f7ff9a3ef Core/Achievements: Optimized resetting achievement criteria by condition and changed the functionality to properly reset all possible criteria with given condition
Closes #18905

(cherry picked from commit 7c7b877c3f)
2020-04-26 22:58:51 +02:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
3ac790287a Core/DataStores: Updated db2 structures to 8.2.5 2019-10-27 00:12:45 +02:00
xinef1
60663d1374 Ensure that all actions are compared to fixed point in time (ie. world update start) (#18910)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world

(cherrypicked from 7567cafec8)
2019-08-17 20:04:14 +02:00
Shauren
f6e2b8cdc1 Core/DBLayer: Prevent committing transactions started on a different database 2019-07-27 10:52:33 +02:00
Shauren
e8e89f58fb Core/DBLayer: Prevent using prepared statements on wrong database 2019-07-27 01:00:37 +02:00
Shauren
0e4c569770 Core/PacketIO: Updated packet structures to 8.2 2019-07-14 19:20:44 +02:00
Shauren
455959c606 Core/PacketIO: Rewrite updatefield handling 2019-06-08 17:06:57 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
0a779bd791 Core/PacketIO: Updated packet structures to 8.0.1 2018-11-05 00:00:34 +01:00
Shauren
5bd61e91bf Core/Misc: Graveyards can now use conditions, SourceType = 27, SourceEntry = graveyard_zone.ID 2018-03-14 23:31:49 +01:00