Commit Graph

48 Commits

Author SHA1 Message Date
郑佩茹
bbd283598d Fix Evading issue 2022-08-18 13:46:22 -06:00
郑佩茹
29e14042e7 Update to work with latest AzerothCore master 2022-07-27 10:15:08 -06:00
Skjalf
cd3151df40 fix(Scripts/RuinsOfAhnQiraj): Implement Rajaxx waves (#12513) 2022-07-25 12:12:08 -03:00
UltraNix
801e68b1dd fix(Core/Creatures): Added new AI function OnTeleportUnreacheablePlayer to teleport all unreachable players. (#12193)
* fix(Core/Creatures): Implemented CREATURE_FLAG_EXTRA_TELEPORT_UNREACHABLE_PLAYERS.

Fixed #11750

* Update.

* Update.

* Update.
2022-07-24 13:10:41 -03:00
Skjalf
9920e01b2b feat(Core/Scripting): Add several UnitHooks (#12365) 2022-07-11 14:57:38 -03:00
Maelthyr
32334f5f14 refactor(Core/Unit): minor changes for the combat system (#11904)
Cherry-pick from TC: https://github.com/TrinityCore/TrinityCore/pull/19966

Co-authored-by: Treeston <treeston.nmoc@gmail.com>
2022-06-13 19:40:29 -03:00
Maelthyr
dfc6adb081 refactor(Core/Combat): DeleteThreatLists() become ClearAllThreat() (#11824)
refactor(Chore/Combat): DeleteThreatLists() become ClearAllThreat()
2022-05-23 05:51:52 -03:00
Maelthyr
c5368816fa Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758) 2022-05-18 05:36:57 -03:00
Kitzunu
5def0cdd12 chore(Core/CreatureAI): improve log (#11468)
* chore(Core/CreatureAI): improve log

* Update CreatureAI.cpp

* Update CreatureAI.cpp
2022-04-23 15:10:07 +02:00
IntelligentQuantum
ab4ee71762 feat(Core/Maps): AreaBoundary (#10525)
* cherry-picked commit (2da458c56d)
2022-04-15 14:10:41 +02:00
UltraNix
ff654397e8 fix(Core/Creatures): Properly reset encounter if boss despawns on evade. (#11251)
Fixes #8167
2022-04-02 11:46:27 -03:00
Nefertumm
ede60e2bc0 chore(Core/Texts): Rename parameter for creature texts (#10317) 2022-01-31 06:48:55 -03:00
Kargatum
5969df4e30 refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp

* rework logging

* add fmt replace logs

* logging

* FMT_LOG_

* settings

* fix startup

* 1

* 2

* 3

* 4

* 5

* fmt::print

* to fmt
2022-01-27 16:44:41 +01:00
Kitzunu
d1cc65b1c7 refactor(Core/Misc): isEmpty to IsEmpty (#10011) 2022-01-13 21:43:15 -05:00
Francesco Borzì
cbc7e5466a refactor(Core): remove unused imports (#9767) 2021-12-19 19:41:14 +01:00
Andrius Peleckas
36fc50e1a8 fix(Core/Formations): fixed possible finite loop related to GROUP_AI_FLAG_EVADE_TOGETHER (#9279) 2021-11-25 23:46:12 -03:00
Kargatum
f62664c987 refactor(Core/Misc): headers cleanup (#9259) 2021-11-22 17:24:39 +07:00
schell244
efe999309a fix(Core/CreatureAI): enemy stealth alert ignoring LOS (#9161) 2021-11-20 10:38:08 +01:00
Andrius Peleckas
31f028abfc feat(Core/Formations): implemented a new formation groupAI flag "GROUP_AI_FLAG_EVADE_TOGETHER" (#8758) 2021-11-16 15:14:34 -03:00
sschepens
b7f8083915 feat(Core/Misc): change how Position struct is retrieved (#9017)
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bc changes by return a Position object instead of accepting a Position parameter by reference.

Cherry pick of 2585e799f9
2021-11-10 23:43:00 +01:00
UltraNix
affa6f9084 refactor(Core/Combat): Cleanup DoZoneInCombat function. (#8789)
* Core/Combat: Cleanup DoZoneInCombat function.

Updates #7960

* Restore distance parameter.

* You don't belong here.

* Update
2021-11-09 00:54:44 +01:00
UltraNix
e57e0e7cd1 fix(Core/Creatures): AttackStart in MoveInLineOfSight is called only for aggressive mobs. (#8878)
Fixes #8868
2021-11-02 11:43:18 -03:00
Kitzunu
d464ee7083 refactor(Core/CreatureAI): Turn hardcoded entries into flagsExtra (#8189) 2021-10-12 13:35:22 +02:00
Kargatum
52aa0e9966 feat(License): add new headers information about license (#7941)
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
2021-09-30 13:40:52 +07:00
Kitzunu
f6f18cb538 fix(Core/Creature): remove combo points on evade (#7861) 2021-09-17 13:42:04 +02:00
Silker
4dc642d530 fix(Creature/Core): Boss phased reset (#7828)
Co-authored-by: Si1ker <Si1ker@users.noreply.github.com>
Co-authored-by: lineagedr <lineagedr@users.noreply.github.com>
Co-authored-by: Footman <footman@hotmail.de>
2021-09-16 14:32:36 +02:00
Kitzunu
2f449326e0 refactor(Core): Rename ...Manager to ...Mgr (#6910)
* Rename MapManager.h to MapMgr.h

* Rename BanManager.h to BanMgr.h

* Rename MapManager.cpp to MapMgr.cpp

* Rename BanManager.cpp to BanMgr.cpp

* Rename MapRefManager.h to MapRefMgr.h

* Rename ThreatManager.h to ThreatMgr.h

* Rename GridRefManager.h to GridRefMgr.h

* Rename ThreatManager.cpp to ThreatMgr.cpp

* Rename GroupRefManager.h to GroupRefMgr.h

* Rename HostileRefManager.h to HostileRefMgr.h

* Rename HostileRefManager.cpp to HostileRefMgr.cpp

* Rename MMapManager.h to MMapMgr.h

* Rename FollowerRefManager.h to FollowerRefMgr.h

* Rename VMapManager2.h to VMapMgr2.h

* Rename IVMapManager.h to IVMapMgr.h

* Rename MMapManager.cpp to MMapMgr.cpp

* Rename VMapManager2.cpp to VMapMgr2.cpp

* Rename RefManager.h to RefMgr.h

* Rename WaypointManager.h to WaypointMgr.h

* Rename WaypointManager.cpp to WaypointMgr.cpp

* Rename MPQManager.h to MPQMgr.h

* Rename MPQManager.cpp to MPQMgr.cpp

* Rename IMMAPManager.h to IMMAPMgr.h

* fix build

* Update Main.cpp

* chore(Core/Misc): Remove toxic language

* Revert "chore(Core/Misc): Remove toxic language"

* fix build

* build
2021-09-15 17:50:28 +02:00
Viste
a9796af174 fix(Core/Misc): bunch of crashfixes (#7307) 2021-09-14 14:38:56 +02:00
Shiroe
f8c8e98a0a feat(Core): port aggro distance from vMaNGOS (#6214)
Read detection_range values from creature_template
2021-07-08 18:01:27 +02:00
Kargatum
5787d00d54 chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2021-06-21 03:07:12 +02:00
Francesco Borzì
7d9fe22e28 refactor(Core): code cleanup (part 1) (#6361) 2021-06-16 12:58:14 +02:00
Kargatum
4af4cbd3d9 feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging

* correct level for sql.sql

* del unused config options

* Correct build

* correct after merge

* whitespace

20:29:37 1. 'Player.cpp'. Replace (1)
20:29:37 2. 'ObjectMgr.cpp'. Replace (3)

* 1

* correct logging

* correct affter merge

* 1

* 2

* LOG_LEVEL_WARN

* #include "AppenderDB.h"

* 3

* 4

* 5

* 1. 'WorldSocket.cpp'. Replace (1)

* 6

* 1
2021-04-17 11:20:07 +02:00
Francesco Borzì
f6a17164be fix(Core/License): issue with old files license (#4762) 2021-03-17 09:46:01 -06:00
Kitzunu
28f1dc5c0c refactor(Core): replace NULL with nullptr (#4593) 2021-03-02 01:34:20 +01:00
Kitzunu
dbc0ff6554 refactor(Core): sort #includes alphabetically (#4579) 2021-02-24 22:34:42 +01:00
Yehonal
c8f43d8584 feat(Core/Movement): Improved pathfinding, collisions and movements (#4220)
Npc positioning
Implemented slope check to avoid unwanted climbing for some kind of movements (backwards, repositioning etc.)
Implemented backwards movement
Re-implemented circle repositioning algorithm (smartest than retail, but with the same feeling)
Fixed random position of summoned minions
Improved pet following movement. Also, they attack NPC from behind now. Thanks to @Footman

Swimming creatures
Fixed max_z coordinate for swimming creatures. Now only part of their body is allowed to be out of the water level
Fixed pathfinder for swimming creatures creating shortcuts for specific segments, now they swim underwater to reach the seashore instead of flying above the water level.
Creatures with water InhabitType but no swimming flag now, when not in combat, will walk on water depth instead of swimming. Thanks @jackpoz for the original code
UNIT_FLAG_SWIMMING in UpdateEnvironmentIfNeeded to show the swimming animation correctly when underwater
Implemented HasEnoughWater check to avoid swimming creatures to go where the water level is too low but also to properly enable swimming animation only when a creature has enough water to swim.

Walking creatures
Extended the DetourNavMeshQuery adding area cost based on walkability (slope angle + source height) to find better paths at runtime instead of completely remove them from mmaps
improve Z height in certain conditions (see #4205, #4203, #4247 )

Flying creatures
Rewriting of the hover system
Removed hacks and improved the UpdateEnvironmentIfNeeded. Now creatures can properly switch from flying to walk etc.
Spells
LOS on spell effect must be calculated on CollisionHeight and HitSpherePoint instead of position coords.
Improved position for object/creature spawned via spells
Improved checks for Fleeing movements (fear spells)

Other improvements
Implemented method to calculate the CollisionWidth from dbc (used by repositioning algorithm etc.)
Improved raycast and collision checks

Co-authored-by: Footman <p.alexej@freenet.de>
Co-authored-by: Helias <stefanoborzi32@gmail.com>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2021-02-01 01:34:27 +01:00
Stefano Borzì
df600f9946 fix(Core/CreatureAI): revert NPC repositioning and path system (temporarily) (#4274) 2021-01-14 19:17:34 +01:00
Stefano Borzì
b2761626fe feat(Core/CreatureAI): improve npc position during the combat (#3369)
+ tangent equation to find correct angle and distance when moving

+ implemented proper backward

* Improved performance + random angle margin

* chore: add tollerance calculation in instance

* improved LOS checks with movements

* implemented collisions using raycast (imported by TC)

+ improved collision detection for CanReachPositionAndGetCoords

+ improved collision check

+ set correct flags for the backward movement

+ first implementation of slope angle (to improve)

Co-authored-by: Yehonal <yehonal.azeroth@gmail.com>
2021-01-04 20:23:08 +01:00
FALL1N1
0baecd3e8f fix(Core/Pathfinding): Improve - Point movement (#3658) 2020-12-01 10:58:00 -06:00
Kargatum
a2b26272d2 refactor(Core/Game): restyle game lib with astyle (#3466) 2020-10-12 10:08:15 +02:00
Kitzunu
1f89282b22 refactor(Core): NULL -> nullptr (#3275)
* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
2020-08-31 11:55:09 +02:00
Stoabrogga
dcb714a5ef fix(Core/CreatureAI): Skip creatures in evade mode for DoZoneInCombat (#2599) 2020-02-14 08:06:58 +01:00
Jinyang li
4b6342b42f Core/NPC: Creatures now alert when they detect stealthed players (#1060)
Creatures stop when they detect a stealthed player like in retail.
Closes #1020
2018-10-31 20:25:23 +01:00
Nefertumm
dd300003e2 Update license links (#783) 2018-03-12 10:54:57 +01:00
Yehonal
17332304fd Using TC structure allowing easier patches importing 2017-12-21 00:20:29 +01:00
Yehonal
b0c8eceb08 Refactoring part 2 [W.I.P] 2016-08-12 02:38:26 +02:00
Yehonal
f6eefedcd5 converted all tabs to 4 spaces 2016-06-26 19:23:57 +02:00
Yehonal
e8e94a0a66 First Commit
For Azeroth!
2016-06-26 10:39:44 +02:00