Commit Graph

23 Commits

Author SHA1 Message Date
Shauren ad3fc81db9 Core/Misc: Add missing Containers.h include where neccessary 2023-08-12 17:56:16 +02:00
Shauren e8dfd8c25c Core/Combat: Allow PvE combat references to become suppressed, just like PvP ones 2022-09-04 22:49:08 +02:00
Alan Deutscher b59706c8b6 Core/Spells: Delay combat flagging for spell targets until spell missile lands 2022-09-04 22:49:08 +02:00
Shauren d611925dc7 Core/Units: Reduce differences between branches part 1 - unit updatefield accessors 2022-03-29 11:30:49 +02:00
Lucas Nascimento 0cc0b3f926 Core/Combat: Fixed combat after remove charm (#27248)
https://github.com/TrinityCore/TrinityCore/pull/27038#issuecomment-958784361
2021-11-06 10:24:32 -03:00
Gildor 372c84392b Core/Combat: Allow refresh pvp combat when assisting a unit that is in pvp combat (#26773) 2021-08-08 13:18:08 +02:00
offl 06b554c36e Core/Creature: rename CREATURE_FLAG_EXTRA_IGNORE_COMBAT into CREATURE_FLAG_EXTRA_CANNOT_ENTER_COMBAT (#26762)
Co-authored-by: offl <offl@users.noreply.github.com>
2021-07-30 09:36:38 +02:00
Ovah 764f22fc91 Core/Units: add new functionality for units to block or enable combat interactions (#25168)
* 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

* yeah...

* Nuke Creature::IsCombatDisallowed helper as its unused by now

* no combat extra flag may now be changed on transforms if the transformed entry does not have the flag
2020-08-07 14:51:40 +02:00
Giacomo Pozzoni 6440c3bcac Core/Combat: Disable triggers entering combat (#25086)
* Core/Combat: Disable triggers entering combat

* Move check to database flags_extra flag in creature_template with value 0x00002000

* Fix Rotface puddle stalker too

* Rename 9999_99_99_99_world.sql to 2020_07_22_00_world.sql
2020-07-22 19:32:29 +02:00
Aokromes ed93932537 New year
Say bye bye to every year changing dates
2020-01-02 06:25:50 +01:00
ccrs 7ffe018571 Scripts/ICC: little bit of cleanup in Valithria after the "recent" changes 2020-01-02 01:06:38 +01:00
Treeston 51cf1c7136 != and == are not the same thing. 2019-07-21 22:25:04 +02:00
Treeston 0e7c66cb4c Core/AI: Finally move the "is creature engaged" flag to be a property of the creature AI, where it honestly always belonged. Fixes #17981 and #23602 for real this time. 2019-07-21 01:50:52 +02:00
Treeston f44539b642 Entities/Unit: Properly unset engaged flag for creates that cannot have a threat list on combat exit. Fixes #23518. 2019-07-03 21:01:29 +02:00
Treeston dbe3bbefe7 Core/Entities: Kick engagement logic upstairs to Unit (from ThreatManager), since all Units with AI need it (not just those with threat list). Fixes #17981. 2019-06-23 00:32:13 +02:00
Treeston fcfcb0eb6f Happy New Year, folks. It's 2019! 2019-01-01 15:45:25 +01:00
Treeston 042f5515e4 Core/AI: Clean up charm AI handling, we now have two unique_ptr instead of a crapton of booleans 2018-08-23 16:34:42 +02:00
Treeston 081eab3cf5 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.
2018-05-02 19:09:37 +02:00
Treeston 4da9321d2b Core/Combat: Unify combat permitted checks between CvC and PvC - only require "not friendly" in all cases. Fixes Yogg-Saron encounter. Closes #21380.
Also some bonus cleanup to Yogg's script to make transition cleaner.
2018-02-15 12:23:05 +01:00
Treeston 1847555c8c Core/Threat: Fix a potential crash that would occur in specific edge cases of AI being a bit naughty. 2018-01-15 15:42:41 +01:00
Treeston fdacf12739 Core/Combat: Some more sanity check asserts to try and track down #21187.
Also, some anti-annoyance treatment for dot tele.
2018-01-06 01:40:31 +01:00
Treeston 5a9fddaa5a Core/Combat: some more detailed assertions to possibly shed light on #21187. 2018-01-06 00:49:04 +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