Commit Graph
2075 Commits
Author SHA1 Message Date
Ovahlord 3d29ffeb1a Partial revert of af9c6b4483
send the packet to all other players instead
2020-10-24 11:24:40 +02:00
Ovahlord af9c6b4483 Core/Units: do not send loot list packets to players when they are not in a group 2020-10-24 10:03:29 +02:00
Ovahlord a08ab06d36 Core/Units: converted SMSG_SPELL_ENERGIZE_LOG to packet class and no longer send PowerUpdate packets when gaining power via energize spell effects 2020-10-22 23:32:45 +02:00
Ovahlord 90e5e85afd Core/Misc: updated a bunch of packets to packet class 2020-10-21 12:04:13 +02:00
Ovahlord 616e50cb55 Core/Spells: fixed Blood DK T12 2p Bonus 2020-10-01 21:40:03 +02:00
Ovahlord 40afd8a20e Core/Units: prevent units from dropping under map surfaces when disabling hover movement 2020-10-01 17:00:51 +02:00
Ovahlord 44be244ced Core/Units: remove excessive spam of animation tier spline update packets on every movement update 2020-09-28 19:33:14 +02:00
Ovahlord 059dff081c Core/Units: fixed a typo in Lava Burst crit chance bonus 2020-09-27 18:16:07 +02:00
Ovahlord bf78c98459 Core/Spells: Lava Bursts that have been triggered by Elemental Overload will now crit as well when the target has been affected by Flame Shock 2020-09-27 16:35:55 +02:00
Ovahlord bf04bd36db Core/Units: do not update facing for mind controlled creatures 2020-09-24 14:31:18 +02:00
Ovahlord adffbaf375 Core/Units: restrict target guid based turning to creatures only 2020-09-23 20:48:45 +02:00
Ovahlord c9afa1a6ed Core/Units: renamed SetInFront to SetOrientationTowards to clarify its actual functionality and added comments to SetOrientationTowards, SetFacingTo and SetFacingToObject 2020-09-23 20:48:44 +02:00
Ovahlord 0a480f3ae8 Core/Units: update internal facing of units on every update tick when a target guid or a tracking channeled spell is being used 2020-09-23 20:48:43 +02:00
Ovahlord 3274117cec Core/Spells: cleaned up and improved spell focusing behavior
* removed hacky update_object call from SetSpellFocus helper
* corrected facing behaivior in SetSpellFocus
* spells with SPELL_ATTR5_DONT_TURN_DURING_CAST will no longer set a target guid for proper clientside facing behaivior
* channeled spells with a destination target will no longer pick a objectTarget
* update serverside orientation for channeled spells with SPELL_ATTR1_CHANNEL_TRACK_TARGET
2020-09-09 20:08:35 +02:00
Treeston 8385c3ffd3 Core/Movement: MoveSplineFlag::animId -> animTier, MoveSpline::GetAnimation() -> GetAnimationTier() 2020-09-08 20:52:34 +02:00
Shauren 64bc20bf35 Core/Players: Directly store PlayerSpell in m_spells, not as pointer 2020-09-07 21:36:13 +02:00
Ovahlord 94ad82b4e1 Core/Spells: fixed several miss chance calculations in melee and spell hit result calculations 2020-08-30 00:14:42 +02:00
Ovahlord 677990a1b8 Core/Spells: removed more unused parameters for 4.x since SPELL_AURA_MOD_CRIT_PERCENT_VERSUS is not used at all 2020-08-28 12:20:35 +02:00
Ovahlord dccd460088 Core/Spells: corrected Shatter bonus logic and fixed another warning 2020-08-28 12:10:53 +02:00
Ovahlord 74b44c91a7 fixed warnings 2020-08-28 11:54:53 +02:00
Ovahlord 25c980c390 Core/Units: ported spell crit chance updates from 335 branch 2020-08-28 11:46:07 +02:00
Ovahlord 4ab66b1462 Core/Units: added crit chance supression
According to blueposts and wikis, there is a supression to crit chances if the target is having a higher level than the attacker. Each level that the target is above the one of the attacker, the crit chance is reduced by 1%. Though this number is solely based on bluepost data so this needs extensive testing since fan made calculations point more towards 0.7%.
2020-08-27 17:00:00 +02:00
Shauren 3dfa88f20e Core/Spells: Relaxed aura exclusivity check to allow casting spells that have other, non-aura effects even if aura will not be applied 2020-08-23 20:21:40 +02:00
Shauren 0c08285932 Core/Spells Fixed scroll stacking check when not targeting self
* Reuse code that removes non-stackable auras at apply to check before casting the spell to keep reagents/cast item
2020-08-23 20:18:52 +02:00
Ovahlord 1ddb3d2456 Fixed more warnings 2020-08-23 17:38:45 +02:00
robinsch 1aaa949fff Core/Unit: Fixed race condition when loot recipient is in different map 2020-08-23 17:36:12 +02:00
Ovahlord 52cc952392 Core/Units: fixed virtual item slot check for parry chance calculation 2020-08-23 17:25:04 +02:00
Ovahlord 116f10104a Fixed a warning 2020-08-23 17:22:27 +02:00
Ovahlord a657a21c4a Core/Units: backported hit, dodge, parry and crit chance updates from 335 and fixed logics in 4.x specific code 2020-08-23 17:14:34 +02:00
Ovahlord aa31b0d16d Core/Movement: send SMSG_MOVE_UPDATE_TELEPORT for players only after receiving the ack opcode 2020-08-08 20:22:16 +02:00
Ovahlord d45d4ed0de Core/Misc: apply missile canceling codestyle changes based on master branch feedback 2020-08-06 13:38:28 +02:00
Ovahlord f42d242996 Core/Spells: implement and enable SMSG_MISSILE_CANCEL and use it in Murozond encounter 2020-08-04 16:53:59 +02:00
Ovahlord 9340f8d9df Core/Units: add new functionality for units to block or enable combat entirely via helper to reflect what CREATURE_DIFFICULTYFLAGS_IGNORE_COMBAT and client ai functions imply 2020-07-29 15:46:09 +02:00
Ovahlord 9a18121318 Core/Spells: SPELL_ATTR3_NO_DONE_BONUS will now also prevent bonus values for heal spell effects 2020-07-27 01:43:21 +02:00
Ovahlord a31111ebbb Core/Spells: allow Rune Strike to be permanently used while in Blood Presence 2020-07-23 22:52:55 +02:00
Ovahlord aec1d1a2fa Misc: fixed build 2020-07-23 17:00:54 +02:00
Ovahlord e677461c5d Core/Combat: more cleanups and converted threat packets back to packet class 2020-07-23 13:33:46 +02:00
KelnoandGiacomo Pozzoni 507868a9e1 Fixed PvP Combat timer never getting refreshed (#24058)
* Fixed PvP Combat timer never gets refreshed while meleeing

* Apply Treeston feedback

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
2020-07-22 19:24:19 +02:00
Treeston 1d02149384 Core/Combat: Properly unset engagement flag on death.
# Conflicts:
#	src/server/game/AI/CoreAI/GuardAI.cpp
#	src/server/game/Entities/Creature/Creature.cpp
2020-07-22 19:16:35 +02:00
Treeston db3282e65a Combat/Threat: Split ThreatManager::NotifyDisengaged off from ThreatManager::ClearAllThreat. NotifyDisengaged signifies intent to clear the engagement flag, and should only be called from AI. Fixes #23490.
# Conflicts:
#	src/server/game/AI/CreatureAI.cpp
#	src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
#	src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
#	src/server/scripts/Kalimdor/zone_desolace.cpp
#	src/server/scripts/Northrend/zone_borean_tundra.cpp
2020-07-22 18:38:35 +02:00
Ovahlord 47ef91c23d Core/Misc: more fixups 2020-07-22 18:10:50 +02:00
Treeston e54f8ca4f7 Core/Misc: Rename Unit::AttackedTarget to Unit::AtTargetAttacked to match naming scheme for these notifiers
# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Spells/Spell.cpp
2020-07-22 18:07:24 +02:00
Ovahlord e07f4f9dc2 Core/Units: dbe3bbefe734f8824e8f07c302e256f0d446b974 followup 2020-07-22 18:06:24 +02:00
Ovahlord 471efa832c Core/Units: build fixes 2020-07-22 17:54:53 +02:00
Treeston b634358967 Core/Entities: Fixed an issue where creatures would not properly assist formation members in certain scenarios. Tagging #21967.
# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
2020-07-22 17:45:10 +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 b4d5f46ea4 1b7ec4b follow-up 2020-07-22 17:33:08 +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 3d9ad131ee Core/Combat: Some more sanity check asserts to try and track down #21187.
Also, some anti-annoyance treatment for dot tele.

# Conflicts:
#	src/server/game/Combat/CombatManager.h
#	src/server/game/Combat/ThreatManager.h
#	src/server/scripts/Commands/cs_tele.cpp
2020-07-22 16:57:59 +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