Commit Graph
2107 Commits
Author SHA1 Message Date
Ovahlord 4c8fe1c08e Core/Packets: converted SMSG_BATTLEFIELD_LIST to packet class and handle remaining fields 2020-11-02 02:33:29 +01:00
Shauren d6aa5e333e Core/DBLayer: Fixed memory leaks with existing SQLQueryHolder uses and eliminated the possibilty of adding more in future (replaced manual memory management with smart pointers) 2020-10-26 18:03:54 +01:00
Ovahlord ac8741e3bc Core/Packets: converted more packets to class 2020-10-23 12:30:45 +02:00
Ovahlord f8c35be20c Core/Players: fixed a possible crash when trying to send spell cooldowns for spells without a category entry 2020-10-22 21:37:31 +02:00
Ovahlord a311740d3b Core/Players: PCT spell mods are now additive as well (this got changed in 6.x) 2020-10-22 18:58:13 +02:00
Ovahlord 72d7819c2e Core/Misc: converted more packets to packet class and implement some new fields for them 2020-10-22 08:47:24 +02:00
Shauren 0f60c4d820 Core/Players: Corrected logic determining contested/friendly/hostile area types 2020-10-02 18:53:07 +02:00
Ovahlord 941194018d Core/Players: reduce excessive casting of spell_area spells by casting them only when zone and area ids actually change 2020-09-26 19:38:49 +02:00
Shauren 64bc20bf35 Core/Players: Directly store PlayerSpell in m_spells, not as pointer 2020-09-07 21:36:13 +02:00
Ovahlord afba1ba347 Core/Quests: launch gossips on rewarding quests only when the corresponding quest flag is present 2020-08-27 23:22:28 +02:00
Ovahlord 30e787d5a4 Core/Player: update agility dodge coefficients 2020-08-27 21:41:21 +02:00
Roc13x 110f178527 Core/Player: HasItemCount and DestroyItemCount now count bank bags 2020-08-24 23:49:47 +02:00
Roc13x c8d6fc99c0 Core/Player: Fix equipment sets not saving correctly
New sets were always saved to _equipmentSets[0], overwriting eachother
2020-08-24 23:49:47 +02:00
Shauren fa6f081037 Core/Creatures: Move gossip trainer assignment to creature_trainer table - same gossip can open different trainers depending on which creature it is assigned to 2020-08-22 18:22:57 +02:00
Ovahlord 0bf3444a80 Core/Packets: converted SMSG_CATEGORY_COOLDOWN to packet class and fixed packet structure 2020-08-09 20:51:06 +02:00
Roc13x 5360da31a2 Core/Items: Fix some cases where items could be created without random properties (#166) 2020-08-04 10:19:24 +02:00
Roc13x 8669b5d22c Core/Gossips: Make MenuID/OptionID consistently use uint32 types (#165) 2020-08-04 10:14:47 +02:00
Roc13x 31b6b77200 Core/Players: Several gold handling improvements (#155)
* Updated the following systems to support large (64bit) gold numbers:
- Auction House
- Mail
- Commands
- Guild bank withdraw limits
- Guild Bank eventlog
- Vendor

* Fixed some vendor checks for when BuyCount > 1
* Tweaked some checks for available gold space
2020-08-03 17:24:32 +02:00
Shauren 80e4effba5 Core/Mail: Load mails at login instead of on demand when queried by packets (logging in always sends one of the packets that cause mail loading anyway) 2020-08-01 15:21:13 +02:00
Shauren adb7e4dba8 Refactor mail loading to execute 2 database queries instead of 1+mails.size() 2020-08-01 15:15:07 +02:00
Treeston 7df7dcca7d Core/Threat: Threat system adjustments:
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226. Tagging #21501.
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.

# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:44:05 +02:00
Treeston d9e6e82c7d Core/Unit: UNIT_FLAG renames
[UNIT_FLAG_PLAYER_CONTROLLED -> UNIT_FLAG_POSSESSED]
[UNIT_FLAG_PVP_ATTACKABLE -> UNIT_FLAG_PLAYER_CONTROLLED]
Signed off by: Shauren, Warlockbugs.

# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Pet/Pet.cpp
#	src/server/game/Entities/Unit/UnitDefines.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Spell.cpp
2020-07-22 17:32:51 +02:00
Treeston 942c3a77da 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.
2020-07-22 16:49:37 +02:00
Ovahlord 280b8dc799 Fixed build 2020-07-22 15:21:50 +02:00
Treeston b031f55f21 Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.
Also change a very ugly hack in GetDialogStatus. Ew.

# Conflicts:
#	src/server/game/AI/CoreAI/GameObjectAI.h
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Quests/QuestDef.h
2020-07-22 15:10:28 +02:00
Treeston abcf9f9d42 Core/Player: Prevent changing equipment while charmed. Closes #20209. 2020-07-22 14:57:15 +02:00
Treeston ec04d3b2cd [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2020-07-22 13:43:23 +02:00
Peter Keresztes Schmidt cbd6fb2315 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
# Conflicts:
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/scripts/Battlefield/BattlefieldWG.cpp
#	src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp
#	src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
#	src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp
#	src/server/shared/DataStores/DBCDatabaseLoader.cpp
2020-07-18 22:47:52 +02:00
Ovahlord 961144d82d Core/Packets: converted SMSG_AURA_UPDATE and SMSG_AURA_UPDATE_ALL to packet class 2020-07-16 17:28:49 +02:00
Ovahlord d371c9d1f6 Core/Packets: converted MSG_MOVE_TELEPORT, MSG_MOVE_TELEPORT_ACK, CMSG_SET_ACTIVE_MOVER and SMSG_MOVE_UPDATE_TELEPORT to packet class and send SMSG_MOVE_UPDATE_TELEPORT for players after receiving MSG_MOVE_TELEPORT_ACK instead of sending it alongside MSG_MOVE_TELEPORT 2020-07-16 15:26:12 +02:00
Warpten d911a9bf74 Core/Players: implement Goblin's race entry discount bonus 2020-07-15 16:23:46 +02:00
Max Drosdo.www cb4e7821e3 Core/Player: Introduce separate level caps for each expansion 2020-07-13 20:35:57 +02:00
Ovahlord f8091d6aac Core/Movement: made SetDisableGravity and SetHover virtual and handle anim tiers in their new override inside of the Creature class.
* no longer set anim tiers when the target is rooted
2020-07-13 14:07:59 +02:00
Ovahlord d46fb93657 Core/Pools: ported pooling updates from 335 branch 2020-07-13 11:17:19 +02:00
Ovahlord c80ce80644 Core/Packets: updated SMSG_LOOT_MONEY_NOTIFY, SMSG_COIN_REMOVED, SMSG_LOOT_REMOVED and SMSG_LOOT_RELEASE to packet class 2020-07-08 14:53:54 +02:00
Rothend 2ef041bf36 Core/Player: do not consider FLAG_EXTRA_NO_XP_AT_KILL or pet status when deciding if a creature counts as a "gives experience or honor" target. (#24884)
Closes #23860
2020-06-26 21:27:36 +02:00
Ovahlord 4d39bb602e Core/Players: do not update position data on character creation
Retail does not have a zone id for newly created character until their first login so we do the same as well. This will drastically improve performance on character creations as we no longer unnecessarily load grids and map data.
2020-06-18 05:17:22 +02:00
Shauren 40f80fc0ed Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids
* Handle child maps being entered
* Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
2020-06-11 01:35:27 +02:00
Warpten 5cb747620a Core/Movement: Fixed Animation Tier handling (#113) 2020-06-03 00:49:18 +02:00
Ovahlord f1bd380b20 Core/Players: update mount capabilties when the liquid status of players change
* simplified checks for liquid restrictions in mount capability helper
* handle missing case for liquid exclusive mounts
* update position data on character login to avoid some edge case outdoors checks

closes #95
2020-06-01 15:10:13 +02:00
Ovahlord d8ec67df50 Core/Movement: converted collision height and move update opcodes back to movement structures and implement new movement status elements for future use 2020-05-10 19:21:33 +02:00
Ovahlord a2cea3ce08 Core/Movement: converted CMSG_MOVE_SET_COLLISION_HEIGHT_ACK and SMSG_MOVE_UPDATE_COLLISION_HEIGHT to packet class
* added new MovementInfo helpers for easy access to all packet related data
2020-05-10 01:31:53 +02:00
Ovahlord 5cf7de6aa7 Core/Units: make health regeneration functions for players and creatures virtual 2020-04-27 14:39:07 +02:00
Ovahlord e7ba484fcf Core/Units: reworked creature power regeneration handling
* players and creatures now share the same power regeneration regeneration function
* UpdatePowerRegeneration is now virtual and handles creature and player specific formulas individually
* handle update field flag UF_FLAG_UNIT_ALL to handle UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER and UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER for creatures as well
2020-04-27 14:20:33 +02:00
Ovahlord 6abab1704f Core/Spells: implement SPELL_AURA_INCREASE_SKILL_GAIN_CHANCE
*this fixes the Working Overtime guild perk
2020-04-23 18:19:59 +02:00
Ovahlord b653f2f819 Core/Units: ported power type updates from master branch 2020-04-22 03:13:02 +02:00
Ovahlord d30c811d9e Core/Creatures: reworked tempoary summon creation
* all stats and values will now be set before summons are getting added to map
* cleaned up summon spell effect handler to reduce duplicade code
* summoner guids will no longer be set for every minion and correctly handle assigning creator guids instead. These values will serve as fallback guid if there is no summoner guid
* friendly tempsummons will now inherit the guild data of their player and pass them on to further allied summons. This fixes guild specific visuals for creatures such as Guild Battle Standards and Guild Heralds.

Todo: check for regressions
2020-04-22 00:20:18 +02:00
Ovahlord c537a2658a Core/Units: reworked power regeneration for players
* use a reversed client function to get the power regeneration rate for all types of powers
* unified all player based regeneration updates into a single statsystem helper
* cleaned up unnecessary regeneration timers
* implement power regeneration for alternative powers
* corrected rage gain numbers based on simulationcraft formulas
2020-04-19 22:53:29 +02:00
Shauren ec6d64b9c6 Core/Player: Wait for correct transaction on character creation 2020-04-15 21:58:02 +02:00
Shauren ca881f7e3f Core/DBLayer: Implement async transaction completion callbacks 2020-04-15 21:41:14 +02:00